diff --git a/bot/src/slashCommands/commands/sync.ts b/bot/src/slashCommands/commands/sync.ts index 7fec6d5f2..94ebdb402 100644 --- a/bot/src/slashCommands/commands/sync.ts +++ b/bot/src/slashCommands/commands/sync.ts @@ -18,6 +18,7 @@ const choices: Array<[string, string]> = ( ["CG MUSECA", "api/cg-prod-museca"], ["CG Pop'n", "api/cg-prod-popn"], ["MYT WACCA", "api/myt-wacca"], + ["MYT ONGEKI", "api/myt-ongeki"], ] as Array<[string, string]> ) diff --git a/client/src/app/pages/dashboard/import/ImportPage.tsx b/client/src/app/pages/dashboard/import/ImportPage.tsx index 49920853e..0b878e2cc 100644 --- a/client/src/app/pages/dashboard/import/ImportPage.tsx +++ b/client/src/app/pages/dashboard/import/ImportPage.tsx @@ -342,7 +342,7 @@ function ImportInfoDisplayer({ game }: { game: Game }) { key="SL-ITG" /> ); - } else if (game === 'ongeki') { + } else if (game === "ongeki") { Content.unshift( } key="ARTEMiS Exporter" - /> + />, + ); - }// else if (game === "jubeat") { + } // else if (game === "jubeat") { // Content.unshift( // , // @@ -536,6 +537,16 @@ function ImportTypeInfoCard({ key="myt-wacca" /> ); + case "api/myt-ongeki": + return ( + + ); case "file/eamusement-iidx-csv": return ( + + + diff --git a/client/src/components/imports/MYTIntegrationPage.tsx b/client/src/components/imports/MYTIntegrationPage.tsx index cace38a6a..a8f0391a4 100644 --- a/client/src/components/imports/MYTIntegrationPage.tsx +++ b/client/src/components/imports/MYTIntegrationPage.tsx @@ -17,7 +17,7 @@ import ImportStateRenderer from "./ImportStateRenderer"; interface Props { // Other games will be added in the future. - game: "wacca"; + game: "wacca" | "ongeki"; } export default function MytIntegrationPage({ game }: Props) { diff --git a/common/src/constants/import-types.ts b/common/src/constants/import-types.ts index 1d5f96458..8eb752d5b 100644 --- a/common/src/constants/import-types.ts +++ b/common/src/constants/import-types.ts @@ -34,6 +34,7 @@ const API_IMPORT_TYPES: Record = { "api/flo-iidx": true, "api/flo-sdvx": true, "api/min-sdvx": true, + "api/myt-ongeki": true, "api/myt-wacca": true, "api/cg-dev-museca": true, "api/cg-dev-popn": true, diff --git a/common/src/types/import-types.ts b/common/src/types/import-types.ts index ad5cff171..5fd654493 100644 --- a/common/src/types/import-types.ts +++ b/common/src/types/import-types.ts @@ -13,6 +13,7 @@ export type APIImportTypes = | "api/flo-iidx" | "api/flo-sdvx" | "api/min-sdvx" + | "api/myt-ongeki" | "api/myt-wacca" // cg has dev and prod supported diff --git a/server/example/conf.json5 b/server/example/conf.json5 index 3cd00f7d8..6287d202f 100644 --- a/server/example/conf.json5 +++ b/server/example/conf.json5 @@ -80,6 +80,7 @@ "api/cg-gan-sdvx", "api/cg-gan-popn", "api/cg-gan-museca", + "api/myt-ongeki", "api/myt-wacca", ], }, diff --git a/server/src/lib/score-import/import-types/api/myt-ongeki/converter.test.ts b/server/src/lib/score-import/import-types/api/myt-ongeki/converter.test.ts new file mode 100644 index 000000000..96c3a036a --- /dev/null +++ b/server/src/lib/score-import/import-types/api/myt-ongeki/converter.test.ts @@ -0,0 +1,203 @@ +import ConvertAPIMytOngeki from "./converter"; +import CreateLogCtx from "lib/logger/logger"; +import { ParseDateFromString } from "lib/score-import/framework/common/score-utils"; +import { + OngekiBattleScoreRank, + OngekiClearStatus, + OngekiComboStatus, + OngekiLevel, + OngekiTechScoreRank, +} from "proto/generated/ongeki/common_pb"; +import t from "tap"; +import { dmf } from "test-utils/misc"; +import ResetDBState from "test-utils/resets"; +import { TestingOngekiChartConverter, TestingOngekiSongConverter } from "test-utils/test-data"; +import type { MytOngekiScore } from "./types"; + +const logger = CreateLogCtx(__filename); + +const parsedScore: MytOngekiScore = { + playlogApiId: "806ca7ac-76f5-4d99-8760-770df60e1ff5", + info: { + musicId: 678, + level: OngekiLevel.ONGEKI_LEVEL_MASTER, + techScore: 1003385, + battleScore: 4987905, + overDamage: 13151, + techScoreRank: OngekiTechScoreRank.ONGEKI_TECH_SCORE_RANK_SS_PLUS, + battleScoreRank: OngekiBattleScoreRank.ONGEKI_BATTLE_SCORE_RANK_GREAT, + comboStatus: OngekiComboStatus.ONGEKI_COMBO_STATUS_NONE, + clearStatus: OngekiClearStatus.ONGEKI_CLEAR_STATUS_OVER_DAMAGE, + isFullBell: true, + isTechNewRecord: true, + isBattleNewRecord: true, + isOverDamageNewRecord: true, + platinumScore: 893, + userPlayDate: "2022-09-28T12:04:21.400Z", + }, + judge: { + judgeCriticalBreak: 967, + judgeBreak: 19, + judgeHit: 0, + judgeMiss: 5, + maxCombo: 525, + bellCount: 174, + totalBellCount: 174, + damageCount: 0, + }, +}; + +t.test("#ConvertAPIMytOngeki", (t) => { + t.beforeEach(ResetDBState); + + function convert(modifier: any = {}) { + return ConvertAPIMytOngeki(dmf(parsedScore, modifier), {}, "api/myt-ongeki", logger); + } + + t.test("Should return a dryScore on valid input.", async (t) => { + const res = await convert(); + + t.strictSame(res, { + song: TestingOngekiSongConverter, + chart: TestingOngekiChartConverter, + dryScore: { + service: "MYT", + game: "ongeki", + scoreMeta: {}, + timeAchieved: ParseDateFromString("2022-09-28T12:04:21.400Z"), + comment: null, + importType: "api/myt-ongeki", + scoreData: { + score: 1003385, + noteLamp: "CLEAR", + bellLamp: "FULL BELL", + judgements: { + cbreak: 967, + break: 19, + hit: 0, + miss: 5, + }, + optional: { + damage: 0, + bellCount: 174, + totalBellCount: 174, + platScore: 893, + }, + }, + }, + }); + t.end(); + }); + + t.test("Should reject unspecified difficulty", (t) => { + t.rejects( + () => + convert({ + info: { + level: OngekiLevel.ONGEKI_LEVEL_UNSPECIFIED, + }, + }), + { + message: /Can't process a score with unspecified difficulty/u, + } + ); + t.end(); + }); + + t.test("note lamp", async (t) => { + t.hasStrict( + await convert({ + info: { + comboStatus: OngekiComboStatus.ONGEKI_COMBO_STATUS_ALL_BREAK, + clearStatus: OngekiClearStatus.ONGEKI_CLEAR_STATUS_FAILED, + }, + }), + { + dryScore: { scoreData: { noteLamp: "ALL BREAK" } }, + } + ); + t.hasStrict( + await convert({ + info: { + comboStatus: OngekiComboStatus.ONGEKI_COMBO_STATUS_FULL_COMBO, + clearStatus: OngekiClearStatus.ONGEKI_CLEAR_STATUS_FAILED, + }, + }), + { + dryScore: { scoreData: { noteLamp: "FULL COMBO" } }, + } + ); + t.hasStrict( + await convert({ + info: { + comboStatus: OngekiComboStatus.ONGEKI_COMBO_STATUS_NONE, + clearStatus: OngekiClearStatus.ONGEKI_CLEAR_STATUS_OVER_DAMAGE, + }, + }), + { + dryScore: { scoreData: { noteLamp: "CLEAR" } }, + } + ); + t.hasStrict( + await convert({ + info: { + comboStatus: OngekiComboStatus.ONGEKI_COMBO_STATUS_NONE, + clearStatus: OngekiClearStatus.ONGEKI_CLEAR_STATUS_CLEARED, + }, + }), + { + dryScore: { scoreData: { noteLamp: "CLEAR" } }, + } + ); + t.hasStrict( + await convert({ + info: { + comboStatus: OngekiComboStatus.ONGEKI_COMBO_STATUS_NONE, + clearStatus: OngekiClearStatus.ONGEKI_CLEAR_STATUS_FAILED, + }, + }), + { + dryScore: { scoreData: { noteLamp: "LOSS" } }, + } + ); + t.end(); + }); + + t.test("platinum score should be null if value is 0", async (t) => { + t.hasStrict( + await convert({ + info: { + platinumScore: 0, + }, + }), + { + dryScore: { scoreData: { optional: { platScore: null } } }, + } + ); + t.end(); + }); + + t.test("Should reject unspecified clear status", (t) => { + t.rejects( + () => + convert({ + info: { + clearStatus: OngekiClearStatus.ONGEKI_CLEAR_STATUS_UNSPECIFIED, + }, + }), + { + message: /Can't process a score with an invalid combo status and\/or clear status/u, + } + ); + t.end(); + }); + + t.test("Should throw on missing chart", (t) => { + t.rejects(() => convert({ info: { musicId: 999999 } }), { + message: /Can't find chart with id 999999 and difficulty MASTER/u, + }); + t.end(); + }); + + t.end(); +}); diff --git a/server/src/lib/score-import/import-types/api/myt-ongeki/converter.ts b/server/src/lib/score-import/import-types/api/myt-ongeki/converter.ts new file mode 100644 index 000000000..d65620198 --- /dev/null +++ b/server/src/lib/score-import/import-types/api/myt-ongeki/converter.ts @@ -0,0 +1,134 @@ +import { + InternalFailure, + InvalidScoreFailure, + SongOrChartNotFoundFailure, +} from "lib/score-import/framework/common/converter-failures"; +import { ParseDateFromString } from "lib/score-import/framework/common/score-utils"; +import { + OngekiClearStatus, + OngekiComboStatus, + OngekiLevel, +} from "proto/generated/ongeki/common_pb"; +import { FindChartOnInGameID } from "utils/queries/charts"; +import { FindSongOnID } from "utils/queries/songs"; +import type { ConverterFunction } from "../../common/types"; +import type { MytOngekiScore } from "./types"; +import type { DryScore } from "lib/score-import/framework/common/types"; +import type { EmptyObject } from "utils/types"; + +const DIFFICULTIES = { + [OngekiLevel.ONGEKI_LEVEL_UNSPECIFIED]: undefined, + [OngekiLevel.ONGEKI_LEVEL_BASIC]: "BASIC", + [OngekiLevel.ONGEKI_LEVEL_ADVANCED]: "ADVANCED", + [OngekiLevel.ONGEKI_LEVEL_EXPERT]: "EXPERT", + [OngekiLevel.ONGEKI_LEVEL_MASTER]: "MASTER", + [OngekiLevel.ONGEKI_LEVEL_LUNATIC]: "LUNATIC", +}; + +const getNoteLamp = (comboStatus: number, clearStatus: number) => { + if ( + comboStatus === OngekiComboStatus.ONGEKI_COMBO_STATUS_UNSPECIFIED || + clearStatus === OngekiClearStatus.ONGEKI_CLEAR_STATUS_UNSPECIFIED + ) { + return undefined; + } + + if (comboStatus === OngekiComboStatus.ONGEKI_COMBO_STATUS_ALL_BREAK) { + return "ALL BREAK"; + } + + if (comboStatus === OngekiComboStatus.ONGEKI_COMBO_STATUS_FULL_COMBO) { + return "FULL COMBO"; + } + + if ( + clearStatus === OngekiClearStatus.ONGEKI_CLEAR_STATUS_OVER_DAMAGE || + clearStatus === OngekiClearStatus.ONGEKI_CLEAR_STATUS_CLEARED + ) { + return "CLEAR"; + } + + if (clearStatus === OngekiClearStatus.ONGEKI_CLEAR_STATUS_FAILED) { + return "LOSS"; + } + + return undefined; +}; + +const ConvertAPIMytOngeki: ConverterFunction = async ( + data, + _context, + importType, + logger +) => { + if (data.info === undefined || data.judge === undefined) { + throw new InvalidScoreFailure("Failed to receive score data from MYT API"); + } + + const difficulty = DIFFICULTIES[data.info.level]; + + if (difficulty === undefined) { + throw new InvalidScoreFailure( + `Can't process a score with unspecified difficulty (musicId ${data.info.musicId})` + ); + } + + const noteLamp = getNoteLamp(data.info.comboStatus, data.info.clearStatus); + + if (noteLamp === undefined) { + throw new InvalidScoreFailure( + "Can't process a score with an invalid combo status and/or clear status" + ); + } + + const chart = await FindChartOnInGameID("ongeki", data.info.musicId, "Single", difficulty); + + if (chart === null) { + throw new SongOrChartNotFoundFailure( + `Can't find chart with id ${data.info.musicId} and difficulty ${difficulty}`, + importType, + data, + {} + ); + } + + const song = await FindSongOnID("ongeki", chart.songID); + + if (song === null) { + logger.severe(`Song/chart desync: ${chart.songID} for chart ${chart.chartID}`, { chart }); + throw new InternalFailure(`Song/chart desync: ${chart.songID} for chart ${chart.chartID}`); + } + + const dryScore: DryScore<"ongeki:Single"> = { + service: "MYT", + game: "ongeki", + scoreMeta: {}, + timeAchieved: ParseDateFromString(data.info.userPlayDate), + comment: null, + importType, + scoreData: { + score: data.info.techScore, + noteLamp, + bellLamp: data.info.isFullBell ? "FULL BELL" : "NONE", + judgements: { + cbreak: data.judge.judgeCriticalBreak, + break: data.judge.judgeBreak, + hit: data.judge.judgeHit, + miss: data.judge.judgeMiss, + }, + optional: { + damage: data.judge.damageCount, + bellCount: data.judge.bellCount, + totalBellCount: data.judge.totalBellCount, + // Set platinum score to explicitly null if the value is 0 + // There is no distinction between 0 and null/undefined in gRPC + // Handles playlogs from older versions when Platinum Score didn't exist + platScore: data.info.platinumScore || null, + }, + }, + }; + + return { chart, song, dryScore }; +}; + +export default ConvertAPIMytOngeki; diff --git a/server/src/lib/score-import/import-types/api/myt-ongeki/parser.ts b/server/src/lib/score-import/import-types/api/myt-ongeki/parser.ts new file mode 100644 index 000000000..5029c071a --- /dev/null +++ b/server/src/lib/score-import/import-types/api/myt-ongeki/parser.ts @@ -0,0 +1,56 @@ +import { + FetchMytTitleAPIID, + GetMytHostname, + StreamRPCAsAsync, +} from "../../common/api-myt/traverse-api"; +import { credentials } from "@grpc/grpc-js"; +import ScoreImportFatalError from "lib/score-import/framework/score-importing/score-import-error"; +import { OngekiUserClient } from "proto/generated/ongeki/user_grpc_pb"; +import { GetPlaylogRequest } from "proto/generated/ongeki/user_pb"; +import type { ParserFunctionReturns } from "../../common/types"; +import type { MytOngekiScore } from "./types"; +import type { KtLogger } from "lib/logger/logger"; +import type { GetPlaylogStreamItem } from "proto/generated/ongeki/user_pb"; +import type { integer } from "tachi-common"; +import type { EmptyObject } from "utils/types"; + +async function* getObjectsFromGrpcIterable( + iterable: AsyncIterable +): AsyncIterable { + for await (const item of iterable) { + yield item.toObject(); + } +} + +export default async function ParseMytOngeki( + userID: integer, + logger: KtLogger +): Promise> { + const profileApiId = await FetchMytTitleAPIID(userID, "ongeki", logger); + const endpoint = GetMytHostname(); + const client = new OngekiUserClient(endpoint, credentials.createSsl()); + const request = new GetPlaylogRequest(); + + request.setProfileApiId(profileApiId); + + let iterable; + + try { + const stream = StreamRPCAsAsync(client.getPlaylog.bind(client), request, logger); + + iterable = getObjectsFromGrpcIterable(stream); + } catch (err) { + logger.error( + `Unexpected MYT error while streaming Ongeki playlog items for userID ${userID}: ${err}` + ); + + throw new ScoreImportFatalError(500, `Failed to get scores from MYT.`); + } + + return { + iterable, + context: {}, + classProvider: null, + game: "ongeki", + }; +} diff --git a/server/src/lib/score-import/import-types/api/myt-ongeki/types.ts b/server/src/lib/score-import/import-types/api/myt-ongeki/types.ts new file mode 100644 index 000000000..794b70f20 --- /dev/null +++ b/server/src/lib/score-import/import-types/api/myt-ongeki/types.ts @@ -0,0 +1,3 @@ +import type { GetPlaylogStreamItem } from "proto/generated/ongeki/user_pb"; + +export type MytOngekiScore = GetPlaylogStreamItem.AsObject; diff --git a/server/src/lib/score-import/import-types/api/myt-wacca/converter.ts b/server/src/lib/score-import/import-types/api/myt-wacca/converter.ts index 5094cb297..6a1c69b70 100644 --- a/server/src/lib/score-import/import-types/api/myt-wacca/converter.ts +++ b/server/src/lib/score-import/import-types/api/myt-wacca/converter.ts @@ -81,12 +81,8 @@ const ConvertAPIMytWACCA: ConverterFunction = async const song = await FindSongOnID("wacca", chart.songID); if (song === null) { - logger.error( - `WACCA: Can't find corresponding song ${chart.songID} for chart ${chart.chartID}` - ); - throw new InternalFailure( - `Can't find corresponding song ${chart.songID} for chart ${chart.chartID}` - ); + logger.severe(`Song/chart desync: ${chart.songID} for chart ${chart.chartID}`, { chart }); + throw new InternalFailure(`Song/chart desync: ${chart.songID} for chart ${chart.chartID}`); } const lamp = convertClearStatus(data.clearStatus); diff --git a/server/src/lib/score-import/import-types/api/myt-wacca/parser.ts b/server/src/lib/score-import/import-types/api/myt-wacca/parser.ts index edc77ea21..126cf5785 100644 --- a/server/src/lib/score-import/import-types/api/myt-wacca/parser.ts +++ b/server/src/lib/score-import/import-types/api/myt-wacca/parser.ts @@ -39,7 +39,10 @@ export default async function ParseMytWACCA( // Note: I don't think this actually does anything on the network, so // it shouldn't really fail. Still, wrap just in case. - logger.error(`Unexpected MYT during WaccaUserClient creation for ${userID}: ${err}`); + logger.error(`Unexpected MYT during WaccaUserClient creation for ${userID}: ${err}`, { + userID, + err, + }); throw new ScoreImportFatalError(500, `Failed to connect to MYT.`); } diff --git a/server/src/lib/score-import/import-types/common/api-myt/util.ts b/server/src/lib/score-import/import-types/common/api-myt/util.ts index 922f7c263..790da63e9 100644 --- a/server/src/lib/score-import/import-types/common/api-myt/util.ts +++ b/server/src/lib/score-import/import-types/common/api-myt/util.ts @@ -3,12 +3,14 @@ import type { Game } from "tachi-common"; export function GameToMytGame(game: Game): MytGame | undefined { switch (game) { - case "wacca": - return "wacca"; case "chunithm": return "chunithm"; case "maimaidx": return "maimai"; + case "ongeki": + return "ongeki"; + case "wacca": + return "wacca"; default: return undefined; } diff --git a/server/src/lib/score-import/import-types/common/types.ts b/server/src/lib/score-import/import-types/common/types.ts index f838499ee..ffd9d9fe6 100644 --- a/server/src/lib/score-import/import-types/common/types.ts +++ b/server/src/lib/score-import/import-types/common/types.ts @@ -1,5 +1,6 @@ import type { ConverterFailure } from "../../framework/common/converter-failures"; import type { DryScore } from "../../framework/common/types"; +import type { MytOngekiScore } from "../api/myt-ongeki/types"; import type { MytWaccaScore } from "../api/myt-wacca/types"; import type { SDVXEamusementCSVData } from "../file/eamusement-sdvx-csv/types"; import type { S3Score } from "../file/solid-state-squad/types"; @@ -56,6 +57,7 @@ export interface ImportTypeDataMap { "api/eag-iidx": unknown; "api/eag-sdvx": unknown; + "api/myt-ongeki": MytOngekiScore; "api/myt-wacca": MytWaccaScore; "api/cg-dev-sdvx": CGSDVXScore; @@ -99,6 +101,7 @@ export interface ImportTypeContextMap { "api/min-sdvx": KaiContext; "api/eag-iidx": KaiContext; "api/eag-sdvx": KaiContext; + "api/myt-ongeki": EmptyObject; "api/myt-wacca": EmptyObject; "api/cg-dev-jubeat": CGContext; diff --git a/server/src/lib/score-import/import-types/converters.ts b/server/src/lib/score-import/import-types/converters.ts index 0e5b66341..0a4065ecb 100644 --- a/server/src/lib/score-import/import-types/converters.ts +++ b/server/src/lib/score-import/import-types/converters.ts @@ -1,3 +1,4 @@ +import ConvertAPIMytOngeki from "./api/myt-ongeki/converter"; import ConvertAPIMytWACCA from "./api/myt-wacca/converter"; import { ConverterAPICGMuseca } from "./common/api-cg/museca/converter"; import { ConverterAPICGPopn } from "./common/api-cg/popn/converter"; @@ -43,6 +44,7 @@ export const Converters: ConverterMap = { "api/flo-iidx": ConvertAPIKaiIIDX, "api/flo-sdvx": ConvertAPIKaiSDVX, "api/min-sdvx": ConvertAPIKaiSDVX, + "api/myt-ongeki": ConvertAPIMytOngeki, "api/myt-wacca": ConvertAPIMytWACCA, "ir/barbatos": ConverterIRBarbatos, diff --git a/server/src/lib/score-import/import-types/parsers.ts b/server/src/lib/score-import/import-types/parsers.ts index 6874072e4..c454db249 100644 --- a/server/src/lib/score-import/import-types/parsers.ts +++ b/server/src/lib/score-import/import-types/parsers.ts @@ -3,6 +3,7 @@ import { ParseEagSDVX } from "./api/eag-sdvx/parser"; import { ParseFloIIDX } from "./api/flo-iidx/parser"; import { ParseFloSDVX } from "./api/flo-sdvx/parser"; import { ParseMinSDVX } from "./api/min-sdvx/parser"; +import ParseMytOngeki from "./api/myt-ongeki/parser"; import ParseMytWACCA from "./api/myt-wacca/parser"; import { ParseCGDevMuseca, @@ -65,6 +66,7 @@ export const Parsers = { "api/cg-gan-popn": ParseCGGanPopn, "api/cg-gan-museca": ParseCGGanMuseca, + "api/myt-ongeki": ParseMytOngeki, "api/myt-wacca": ParseMytWACCA, "ir/barbatos": ParseBarbatosSingle, diff --git a/server/src/proto/generated/ongeki/common_grpc_pb.d.ts b/server/src/proto/generated/ongeki/common_grpc_pb.d.ts new file mode 100644 index 000000000..51b4d6959 --- /dev/null +++ b/server/src/proto/generated/ongeki/common_grpc_pb.d.ts @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/server/src/proto/generated/ongeki/common_grpc_pb.js b/server/src/proto/generated/ongeki/common_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/server/src/proto/generated/ongeki/common_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/server/src/proto/generated/ongeki/common_pb.d.ts b/server/src/proto/generated/ongeki/common_pb.d.ts new file mode 100644 index 000000000..d0a56117c --- /dev/null +++ b/server/src/proto/generated/ongeki/common_pb.d.ts @@ -0,0 +1,85 @@ +// package: mythos.ongeki.v0 +// file: ongeki/common.proto + +import * as jspb from "google-protobuf"; + +export interface OngekiLevelMap { + ONGEKI_LEVEL_UNSPECIFIED: 0; + ONGEKI_LEVEL_BASIC: 1; + ONGEKI_LEVEL_ADVANCED: 2; + ONGEKI_LEVEL_EXPERT: 3; + ONGEKI_LEVEL_MASTER: 4; + ONGEKI_LEVEL_LUNATIC: 5; +} + +export const OngekiLevel: OngekiLevelMap; + +export interface OngekiRankingTypeMap { + ONGEKI_RANKING_TYPE_UNSPECIFIED: 0; + ONGEKI_RANKING_TYPE_TECH_SCORE: 1; + ONGEKI_RANKING_TYPE_BATTLE_SCORE: 2; + ONGEKI_RANKING_TYPE_OVER_DAMAGE: 3; + ONGEKI_RANKING_TYPE_PLATINUM_SCORE: 4; +} + +export const OngekiRankingType: OngekiRankingTypeMap; + +export interface OngekiTechScoreRankMap { + ONGEKI_TECH_SCORE_RANK_UNSPECIFIED: 0; + ONGEKI_TECH_SCORE_RANK_D: 1; + ONGEKI_TECH_SCORE_RANK_C: 2; + ONGEKI_TECH_SCORE_RANK_B: 3; + ONGEKI_TECH_SCORE_RANK_BB: 4; + ONGEKI_TECH_SCORE_RANK_BBB: 5; + ONGEKI_TECH_SCORE_RANK_A: 6; + ONGEKI_TECH_SCORE_RANK_AA: 7; + ONGEKI_TECH_SCORE_RANK_AAA: 8; + ONGEKI_TECH_SCORE_RANK_S: 9; + ONGEKI_TECH_SCORE_RANK_S_PLUS: 10; + ONGEKI_TECH_SCORE_RANK_SS: 11; + ONGEKI_TECH_SCORE_RANK_SS_PLUS: 12; + ONGEKI_TECH_SCORE_RANK_SSS: 13; + ONGEKI_TECH_SCORE_RANK_SSS_PLUS: 14; +} + +export const OngekiTechScoreRank: OngekiTechScoreRankMap; + +export interface OngekiBattleScoreRankMap { + ONGEKI_BATTLE_SCORE_RANK_UNSPECIFIED: 0; + ONGEKI_BATTLE_SCORE_RANK_NO_GOOD: 1; + ONGEKI_BATTLE_SCORE_RANK_USUALLY: 2; + ONGEKI_BATTLE_SCORE_RANK_GOOD: 3; + ONGEKI_BATTLE_SCORE_RANK_GREAT: 4; + ONGEKI_BATTLE_SCORE_RANK_EXCELLENT: 5; + ONGEKI_BATTLE_SCORE_RANK_UNBELIEVABLE: 6; +} + +export const OngekiBattleScoreRank: OngekiBattleScoreRankMap; + +export interface OngekiClearStatusMap { + ONGEKI_CLEAR_STATUS_UNSPECIFIED: 0; + ONGEKI_CLEAR_STATUS_FAILED: 1; + ONGEKI_CLEAR_STATUS_CLEARED: 2; + ONGEKI_CLEAR_STATUS_OVER_DAMAGE: 3; +} + +export const OngekiClearStatus: OngekiClearStatusMap; + +export interface OngekiComboStatusMap { + ONGEKI_COMBO_STATUS_UNSPECIFIED: 0; + ONGEKI_COMBO_STATUS_NONE: 1; + ONGEKI_COMBO_STATUS_FULL_COMBO: 2; + ONGEKI_COMBO_STATUS_ALL_BREAK: 3; +} + +export const OngekiComboStatus: OngekiComboStatusMap; + +export interface OngekiBossAttributeMap { + ONGEKI_BOSS_ATTRIBUTE_UNSPECIFIED: 0; + ONGEKI_BOSS_ATTRIBUTE_FIRE: 1; + ONGEKI_BOSS_ATTRIBUTE_AQUA: 2; + ONGEKI_BOSS_ATTRIBUTE_LEAF: 3; +} + +export const OngekiBossAttribute: OngekiBossAttributeMap; + diff --git a/server/src/proto/generated/ongeki/common_pb.js b/server/src/proto/generated/ongeki/common_pb.js new file mode 100644 index 000000000..25e02b443 --- /dev/null +++ b/server/src/proto/generated/ongeki/common_pb.js @@ -0,0 +1,118 @@ +// source: ongeki/common.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { + if (this) { return this; } + if (typeof window !== 'undefined') { return window; } + if (typeof global !== 'undefined') { return global; } + if (typeof self !== 'undefined') { return self; } + return Function('return this')(); +}.call(null)); + +goog.exportSymbol('proto.mythos.ongeki.v0.OngekiBattleScoreRank', null, global); +goog.exportSymbol('proto.mythos.ongeki.v0.OngekiBossAttribute', null, global); +goog.exportSymbol('proto.mythos.ongeki.v0.OngekiClearStatus', null, global); +goog.exportSymbol('proto.mythos.ongeki.v0.OngekiComboStatus', null, global); +goog.exportSymbol('proto.mythos.ongeki.v0.OngekiLevel', null, global); +goog.exportSymbol('proto.mythos.ongeki.v0.OngekiRankingType', null, global); +goog.exportSymbol('proto.mythos.ongeki.v0.OngekiTechScoreRank', null, global); +/** + * @enum {number} + */ +proto.mythos.ongeki.v0.OngekiLevel = { + ONGEKI_LEVEL_UNSPECIFIED: 0, + ONGEKI_LEVEL_BASIC: 1, + ONGEKI_LEVEL_ADVANCED: 2, + ONGEKI_LEVEL_EXPERT: 3, + ONGEKI_LEVEL_MASTER: 4, + ONGEKI_LEVEL_LUNATIC: 5 +}; + +/** + * @enum {number} + */ +proto.mythos.ongeki.v0.OngekiRankingType = { + ONGEKI_RANKING_TYPE_UNSPECIFIED: 0, + ONGEKI_RANKING_TYPE_TECH_SCORE: 1, + ONGEKI_RANKING_TYPE_BATTLE_SCORE: 2, + ONGEKI_RANKING_TYPE_OVER_DAMAGE: 3, + ONGEKI_RANKING_TYPE_PLATINUM_SCORE: 4 +}; + +/** + * @enum {number} + */ +proto.mythos.ongeki.v0.OngekiTechScoreRank = { + ONGEKI_TECH_SCORE_RANK_UNSPECIFIED: 0, + ONGEKI_TECH_SCORE_RANK_D: 1, + ONGEKI_TECH_SCORE_RANK_C: 2, + ONGEKI_TECH_SCORE_RANK_B: 3, + ONGEKI_TECH_SCORE_RANK_BB: 4, + ONGEKI_TECH_SCORE_RANK_BBB: 5, + ONGEKI_TECH_SCORE_RANK_A: 6, + ONGEKI_TECH_SCORE_RANK_AA: 7, + ONGEKI_TECH_SCORE_RANK_AAA: 8, + ONGEKI_TECH_SCORE_RANK_S: 9, + ONGEKI_TECH_SCORE_RANK_S_PLUS: 10, + ONGEKI_TECH_SCORE_RANK_SS: 11, + ONGEKI_TECH_SCORE_RANK_SS_PLUS: 12, + ONGEKI_TECH_SCORE_RANK_SSS: 13, + ONGEKI_TECH_SCORE_RANK_SSS_PLUS: 14 +}; + +/** + * @enum {number} + */ +proto.mythos.ongeki.v0.OngekiBattleScoreRank = { + ONGEKI_BATTLE_SCORE_RANK_UNSPECIFIED: 0, + ONGEKI_BATTLE_SCORE_RANK_NO_GOOD: 1, + ONGEKI_BATTLE_SCORE_RANK_USUALLY: 2, + ONGEKI_BATTLE_SCORE_RANK_GOOD: 3, + ONGEKI_BATTLE_SCORE_RANK_GREAT: 4, + ONGEKI_BATTLE_SCORE_RANK_EXCELLENT: 5, + ONGEKI_BATTLE_SCORE_RANK_UNBELIEVABLE: 6 +}; + +/** + * @enum {number} + */ +proto.mythos.ongeki.v0.OngekiClearStatus = { + ONGEKI_CLEAR_STATUS_UNSPECIFIED: 0, + ONGEKI_CLEAR_STATUS_FAILED: 1, + ONGEKI_CLEAR_STATUS_CLEARED: 2, + ONGEKI_CLEAR_STATUS_OVER_DAMAGE: 3 +}; + +/** + * @enum {number} + */ +proto.mythos.ongeki.v0.OngekiComboStatus = { + ONGEKI_COMBO_STATUS_UNSPECIFIED: 0, + ONGEKI_COMBO_STATUS_NONE: 1, + ONGEKI_COMBO_STATUS_FULL_COMBO: 2, + ONGEKI_COMBO_STATUS_ALL_BREAK: 3 +}; + +/** + * @enum {number} + */ +proto.mythos.ongeki.v0.OngekiBossAttribute = { + ONGEKI_BOSS_ATTRIBUTE_UNSPECIFIED: 0, + ONGEKI_BOSS_ATTRIBUTE_FIRE: 1, + ONGEKI_BOSS_ATTRIBUTE_AQUA: 2, + ONGEKI_BOSS_ATTRIBUTE_LEAF: 3 +}; + +goog.object.extend(exports, proto.mythos.ongeki.v0); diff --git a/server/src/proto/generated/ongeki/playlog_grpc_pb.d.ts b/server/src/proto/generated/ongeki/playlog_grpc_pb.d.ts new file mode 100644 index 000000000..51b4d6959 --- /dev/null +++ b/server/src/proto/generated/ongeki/playlog_grpc_pb.d.ts @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/server/src/proto/generated/ongeki/playlog_grpc_pb.js b/server/src/proto/generated/ongeki/playlog_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/server/src/proto/generated/ongeki/playlog_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/server/src/proto/generated/ongeki/playlog_pb.d.ts b/server/src/proto/generated/ongeki/playlog_pb.d.ts new file mode 100644 index 000000000..a8729a659 --- /dev/null +++ b/server/src/proto/generated/ongeki/playlog_pb.d.ts @@ -0,0 +1,274 @@ +// package: mythos.ongeki.v0 +// file: ongeki/playlog.proto + +import * as jspb from "google-protobuf"; +import * as ongeki_common_pb from "../ongeki/common_pb"; + +export class PlaylogInfo extends jspb.Message { + getMusicId(): number; + setMusicId(value: number): void; + + getLevel(): ongeki_common_pb.OngekiLevelMap[keyof ongeki_common_pb.OngekiLevelMap]; + setLevel(value: ongeki_common_pb.OngekiLevelMap[keyof ongeki_common_pb.OngekiLevelMap]): void; + + getTechScore(): number; + setTechScore(value: number): void; + + getBattleScore(): number; + setBattleScore(value: number): void; + + getOverDamage(): number; + setOverDamage(value: number): void; + + getPlatinumScore(): number; + setPlatinumScore(value: number): void; + + getTechScoreRank(): ongeki_common_pb.OngekiTechScoreRankMap[keyof ongeki_common_pb.OngekiTechScoreRankMap]; + setTechScoreRank(value: ongeki_common_pb.OngekiTechScoreRankMap[keyof ongeki_common_pb.OngekiTechScoreRankMap]): void; + + getBattleScoreRank(): ongeki_common_pb.OngekiBattleScoreRankMap[keyof ongeki_common_pb.OngekiBattleScoreRankMap]; + setBattleScoreRank(value: ongeki_common_pb.OngekiBattleScoreRankMap[keyof ongeki_common_pb.OngekiBattleScoreRankMap]): void; + + getComboStatus(): ongeki_common_pb.OngekiComboStatusMap[keyof ongeki_common_pb.OngekiComboStatusMap]; + setComboStatus(value: ongeki_common_pb.OngekiComboStatusMap[keyof ongeki_common_pb.OngekiComboStatusMap]): void; + + getClearStatus(): ongeki_common_pb.OngekiClearStatusMap[keyof ongeki_common_pb.OngekiClearStatusMap]; + setClearStatus(value: ongeki_common_pb.OngekiClearStatusMap[keyof ongeki_common_pb.OngekiClearStatusMap]): void; + + getIsFullBell(): boolean; + setIsFullBell(value: boolean): void; + + getIsTechNewRecord(): boolean; + setIsTechNewRecord(value: boolean): void; + + getIsBattleNewRecord(): boolean; + setIsBattleNewRecord(value: boolean): void; + + getIsOverDamageNewRecord(): boolean; + setIsOverDamageNewRecord(value: boolean): void; + + getUserPlayDate(): string; + setUserPlayDate(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PlaylogInfo.AsObject; + static toObject(includeInstance: boolean, msg: PlaylogInfo): PlaylogInfo.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PlaylogInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PlaylogInfo; + static deserializeBinaryFromReader(message: PlaylogInfo, reader: jspb.BinaryReader): PlaylogInfo; +} + +export namespace PlaylogInfo { + export type AsObject = { + musicId: number, + level: ongeki_common_pb.OngekiLevelMap[keyof ongeki_common_pb.OngekiLevelMap], + techScore: number, + battleScore: number, + overDamage: number, + platinumScore: number, + techScoreRank: ongeki_common_pb.OngekiTechScoreRankMap[keyof ongeki_common_pb.OngekiTechScoreRankMap], + battleScoreRank: ongeki_common_pb.OngekiBattleScoreRankMap[keyof ongeki_common_pb.OngekiBattleScoreRankMap], + comboStatus: ongeki_common_pb.OngekiComboStatusMap[keyof ongeki_common_pb.OngekiComboStatusMap], + clearStatus: ongeki_common_pb.OngekiClearStatusMap[keyof ongeki_common_pb.OngekiClearStatusMap], + isFullBell: boolean, + isTechNewRecord: boolean, + isBattleNewRecord: boolean, + isOverDamageNewRecord: boolean, + userPlayDate: string, + } +} + +export class PlaylogJudge extends jspb.Message { + getJudgeCriticalBreak(): number; + setJudgeCriticalBreak(value: number): void; + + getJudgeBreak(): number; + setJudgeBreak(value: number): void; + + getJudgeHit(): number; + setJudgeHit(value: number): void; + + getJudgeMiss(): number; + setJudgeMiss(value: number): void; + + getMaxCombo(): number; + setMaxCombo(value: number): void; + + getBellCount(): number; + setBellCount(value: number): void; + + getTotalBellCount(): number; + setTotalBellCount(value: number): void; + + getDamageCount(): number; + setDamageCount(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PlaylogJudge.AsObject; + static toObject(includeInstance: boolean, msg: PlaylogJudge): PlaylogJudge.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PlaylogJudge, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PlaylogJudge; + static deserializeBinaryFromReader(message: PlaylogJudge, reader: jspb.BinaryReader): PlaylogJudge; +} + +export namespace PlaylogJudge { + export type AsObject = { + judgeCriticalBreak: number, + judgeBreak: number, + judgeHit: number, + judgeMiss: number, + maxCombo: number, + bellCount: number, + totalBellCount: number, + damageCount: number, + } +} + +export class PlaylogJudgeRate extends jspb.Message { + getRateTap(): number; + setRateTap(value: number): void; + + getRateHold(): number; + setRateHold(value: number): void; + + getRateFlick(): number; + setRateFlick(value: number): void; + + getRateSideTap(): number; + setRateSideTap(value: number): void; + + getRateSideHold(): number; + setRateSideHold(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PlaylogJudgeRate.AsObject; + static toObject(includeInstance: boolean, msg: PlaylogJudgeRate): PlaylogJudgeRate.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PlaylogJudgeRate, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PlaylogJudgeRate; + static deserializeBinaryFromReader(message: PlaylogJudgeRate, reader: jspb.BinaryReader): PlaylogJudgeRate; +} + +export namespace PlaylogJudgeRate { + export type AsObject = { + rateTap: number, + rateHold: number, + rateFlick: number, + rateSideTap: number, + rateSideHold: number, + } +} + +export class PlaylogMatchingUser extends jspb.Message { + getUserName(): string; + setUserName(value: string): void; + + getMusicLevel(): ongeki_common_pb.OngekiLevelMap[keyof ongeki_common_pb.OngekiLevelMap]; + setMusicLevel(value: ongeki_common_pb.OngekiLevelMap[keyof ongeki_common_pb.OngekiLevelMap]): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PlaylogMatchingUser.AsObject; + static toObject(includeInstance: boolean, msg: PlaylogMatchingUser): PlaylogMatchingUser.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PlaylogMatchingUser, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PlaylogMatchingUser; + static deserializeBinaryFromReader(message: PlaylogMatchingUser, reader: jspb.BinaryReader): PlaylogMatchingUser; +} + +export namespace PlaylogMatchingUser { + export type AsObject = { + userName: string, + musicLevel: ongeki_common_pb.OngekiLevelMap[keyof ongeki_common_pb.OngekiLevelMap], + } +} + +export class PlaylogCard extends jspb.Message { + getCardId(): number; + setCardId(value: number): void; + + getCardLevel(): number; + setCardLevel(value: number): void; + + getCardAttack(): number; + setCardAttack(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PlaylogCard.AsObject; + static toObject(includeInstance: boolean, msg: PlaylogCard): PlaylogCard.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PlaylogCard, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PlaylogCard; + static deserializeBinaryFromReader(message: PlaylogCard, reader: jspb.BinaryReader): PlaylogCard; +} + +export namespace PlaylogCard { + export type AsObject = { + cardId: number, + cardLevel: number, + cardAttack: number, + } +} + +export class PlaylogBoss extends jspb.Message { + getBossId(): number; + setBossId(value: number): void; + + getBossLevel(): number; + setBossLevel(value: number): void; + + getBossAttribute(): ongeki_common_pb.OngekiBossAttributeMap[keyof ongeki_common_pb.OngekiBossAttributeMap]; + setBossAttribute(value: ongeki_common_pb.OngekiBossAttributeMap[keyof ongeki_common_pb.OngekiBossAttributeMap]): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PlaylogBoss.AsObject; + static toObject(includeInstance: boolean, msg: PlaylogBoss): PlaylogBoss.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PlaylogBoss, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PlaylogBoss; + static deserializeBinaryFromReader(message: PlaylogBoss, reader: jspb.BinaryReader): PlaylogBoss; +} + +export namespace PlaylogBoss { + export type AsObject = { + bossId: number, + bossLevel: number, + bossAttribute: ongeki_common_pb.OngekiBossAttributeMap[keyof ongeki_common_pb.OngekiBossAttributeMap], + } +} + +export class PlaylogEvent extends jspb.Message { + getEventId(): number; + setEventId(value: number): void; + + getEventName(): string; + setEventName(value: string): void; + + getEventPoint(): number; + setEventPoint(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PlaylogEvent.AsObject; + static toObject(includeInstance: boolean, msg: PlaylogEvent): PlaylogEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PlaylogEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PlaylogEvent; + static deserializeBinaryFromReader(message: PlaylogEvent, reader: jspb.BinaryReader): PlaylogEvent; +} + +export namespace PlaylogEvent { + export type AsObject = { + eventId: number, + eventName: string, + eventPoint: number, + } +} + diff --git a/server/src/proto/generated/ongeki/playlog_pb.js b/server/src/proto/generated/ongeki/playlog_pb.js new file mode 100644 index 000000000..755bddd1e --- /dev/null +++ b/server/src/proto/generated/ongeki/playlog_pb.js @@ -0,0 +1,2050 @@ +// source: ongeki/playlog.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { + if (this) { return this; } + if (typeof window !== 'undefined') { return window; } + if (typeof global !== 'undefined') { return global; } + if (typeof self !== 'undefined') { return self; } + return Function('return this')(); +}.call(null)); + +var ongeki_common_pb = require('../ongeki/common_pb.js'); +goog.object.extend(proto, ongeki_common_pb); +goog.exportSymbol('proto.mythos.ongeki.v0.PlaylogBoss', null, global); +goog.exportSymbol('proto.mythos.ongeki.v0.PlaylogCard', null, global); +goog.exportSymbol('proto.mythos.ongeki.v0.PlaylogEvent', null, global); +goog.exportSymbol('proto.mythos.ongeki.v0.PlaylogInfo', null, global); +goog.exportSymbol('proto.mythos.ongeki.v0.PlaylogJudge', null, global); +goog.exportSymbol('proto.mythos.ongeki.v0.PlaylogJudgeRate', null, global); +goog.exportSymbol('proto.mythos.ongeki.v0.PlaylogMatchingUser', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.mythos.ongeki.v0.PlaylogInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.mythos.ongeki.v0.PlaylogInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.mythos.ongeki.v0.PlaylogInfo.displayName = 'proto.mythos.ongeki.v0.PlaylogInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.mythos.ongeki.v0.PlaylogJudge = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.mythos.ongeki.v0.PlaylogJudge, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.mythos.ongeki.v0.PlaylogJudge.displayName = 'proto.mythos.ongeki.v0.PlaylogJudge'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.mythos.ongeki.v0.PlaylogJudgeRate = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.mythos.ongeki.v0.PlaylogJudgeRate, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.mythos.ongeki.v0.PlaylogJudgeRate.displayName = 'proto.mythos.ongeki.v0.PlaylogJudgeRate'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.mythos.ongeki.v0.PlaylogMatchingUser = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.mythos.ongeki.v0.PlaylogMatchingUser, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.mythos.ongeki.v0.PlaylogMatchingUser.displayName = 'proto.mythos.ongeki.v0.PlaylogMatchingUser'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.mythos.ongeki.v0.PlaylogCard = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.mythos.ongeki.v0.PlaylogCard, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.mythos.ongeki.v0.PlaylogCard.displayName = 'proto.mythos.ongeki.v0.PlaylogCard'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.mythos.ongeki.v0.PlaylogBoss = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.mythos.ongeki.v0.PlaylogBoss, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.mythos.ongeki.v0.PlaylogBoss.displayName = 'proto.mythos.ongeki.v0.PlaylogBoss'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.mythos.ongeki.v0.PlaylogEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.mythos.ongeki.v0.PlaylogEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.mythos.ongeki.v0.PlaylogEvent.displayName = 'proto.mythos.ongeki.v0.PlaylogEvent'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.mythos.ongeki.v0.PlaylogInfo.prototype.toObject = function(opt_includeInstance) { + return proto.mythos.ongeki.v0.PlaylogInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.mythos.ongeki.v0.PlaylogInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.mythos.ongeki.v0.PlaylogInfo.toObject = function(includeInstance, msg) { + var f, obj = { + musicId: jspb.Message.getFieldWithDefault(msg, 1, 0), + level: jspb.Message.getFieldWithDefault(msg, 2, 0), + techScore: jspb.Message.getFieldWithDefault(msg, 3, 0), + battleScore: jspb.Message.getFieldWithDefault(msg, 4, 0), + overDamage: jspb.Message.getFieldWithDefault(msg, 5, 0), + platinumScore: jspb.Message.getFieldWithDefault(msg, 6, 0), + techScoreRank: jspb.Message.getFieldWithDefault(msg, 7, 0), + battleScoreRank: jspb.Message.getFieldWithDefault(msg, 8, 0), + comboStatus: jspb.Message.getFieldWithDefault(msg, 9, 0), + clearStatus: jspb.Message.getFieldWithDefault(msg, 10, 0), + isFullBell: jspb.Message.getBooleanFieldWithDefault(msg, 11, false), + isTechNewRecord: jspb.Message.getBooleanFieldWithDefault(msg, 12, false), + isBattleNewRecord: jspb.Message.getBooleanFieldWithDefault(msg, 13, false), + isOverDamageNewRecord: jspb.Message.getBooleanFieldWithDefault(msg, 14, false), + userPlayDate: jspb.Message.getFieldWithDefault(msg, 15, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.mythos.ongeki.v0.PlaylogInfo} + */ +proto.mythos.ongeki.v0.PlaylogInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.mythos.ongeki.v0.PlaylogInfo; + return proto.mythos.ongeki.v0.PlaylogInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.mythos.ongeki.v0.PlaylogInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.mythos.ongeki.v0.PlaylogInfo} + */ +proto.mythos.ongeki.v0.PlaylogInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setMusicId(value); + break; + case 2: + var value = /** @type {!proto.mythos.ongeki.v0.OngekiLevel} */ (reader.readEnum()); + msg.setLevel(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setTechScore(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setBattleScore(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt32()); + msg.setOverDamage(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt32()); + msg.setPlatinumScore(value); + break; + case 7: + var value = /** @type {!proto.mythos.ongeki.v0.OngekiTechScoreRank} */ (reader.readEnum()); + msg.setTechScoreRank(value); + break; + case 8: + var value = /** @type {!proto.mythos.ongeki.v0.OngekiBattleScoreRank} */ (reader.readEnum()); + msg.setBattleScoreRank(value); + break; + case 9: + var value = /** @type {!proto.mythos.ongeki.v0.OngekiComboStatus} */ (reader.readEnum()); + msg.setComboStatus(value); + break; + case 10: + var value = /** @type {!proto.mythos.ongeki.v0.OngekiClearStatus} */ (reader.readEnum()); + msg.setClearStatus(value); + break; + case 11: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsFullBell(value); + break; + case 12: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsTechNewRecord(value); + break; + case 13: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsBattleNewRecord(value); + break; + case 14: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsOverDamageNewRecord(value); + break; + case 15: + var value = /** @type {string} */ (reader.readString()); + msg.setUserPlayDate(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.mythos.ongeki.v0.PlaylogInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.mythos.ongeki.v0.PlaylogInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.mythos.ongeki.v0.PlaylogInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.mythos.ongeki.v0.PlaylogInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMusicId(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } + f = message.getLevel(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } + f = message.getTechScore(); + if (f !== 0) { + writer.writeInt32( + 3, + f + ); + } + f = message.getBattleScore(); + if (f !== 0) { + writer.writeInt32( + 4, + f + ); + } + f = message.getOverDamage(); + if (f !== 0) { + writer.writeInt32( + 5, + f + ); + } + f = message.getPlatinumScore(); + if (f !== 0) { + writer.writeInt32( + 6, + f + ); + } + f = message.getTechScoreRank(); + if (f !== 0.0) { + writer.writeEnum( + 7, + f + ); + } + f = message.getBattleScoreRank(); + if (f !== 0.0) { + writer.writeEnum( + 8, + f + ); + } + f = message.getComboStatus(); + if (f !== 0.0) { + writer.writeEnum( + 9, + f + ); + } + f = message.getClearStatus(); + if (f !== 0.0) { + writer.writeEnum( + 10, + f + ); + } + f = message.getIsFullBell(); + if (f) { + writer.writeBool( + 11, + f + ); + } + f = message.getIsTechNewRecord(); + if (f) { + writer.writeBool( + 12, + f + ); + } + f = message.getIsBattleNewRecord(); + if (f) { + writer.writeBool( + 13, + f + ); + } + f = message.getIsOverDamageNewRecord(); + if (f) { + writer.writeBool( + 14, + f + ); + } + f = message.getUserPlayDate(); + if (f.length > 0) { + writer.writeString( + 15, + f + ); + } +}; + + +/** + * optional int32 music_id = 1; + * @return {number} + */ +proto.mythos.ongeki.v0.PlaylogInfo.prototype.getMusicId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.mythos.ongeki.v0.PlaylogInfo} returns this + */ +proto.mythos.ongeki.v0.PlaylogInfo.prototype.setMusicId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional OngekiLevel level = 2; + * @return {!proto.mythos.ongeki.v0.OngekiLevel} + */ +proto.mythos.ongeki.v0.PlaylogInfo.prototype.getLevel = function() { + return /** @type {!proto.mythos.ongeki.v0.OngekiLevel} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.mythos.ongeki.v0.OngekiLevel} value + * @return {!proto.mythos.ongeki.v0.PlaylogInfo} returns this + */ +proto.mythos.ongeki.v0.PlaylogInfo.prototype.setLevel = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); +}; + + +/** + * optional int32 tech_score = 3; + * @return {number} + */ +proto.mythos.ongeki.v0.PlaylogInfo.prototype.getTechScore = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.mythos.ongeki.v0.PlaylogInfo} returns this + */ +proto.mythos.ongeki.v0.PlaylogInfo.prototype.setTechScore = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int32 battle_score = 4; + * @return {number} + */ +proto.mythos.ongeki.v0.PlaylogInfo.prototype.getBattleScore = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.mythos.ongeki.v0.PlaylogInfo} returns this + */ +proto.mythos.ongeki.v0.PlaylogInfo.prototype.setBattleScore = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional int32 over_damage = 5; + * @return {number} + */ +proto.mythos.ongeki.v0.PlaylogInfo.prototype.getOverDamage = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.mythos.ongeki.v0.PlaylogInfo} returns this + */ +proto.mythos.ongeki.v0.PlaylogInfo.prototype.setOverDamage = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional int32 platinum_score = 6; + * @return {number} + */ +proto.mythos.ongeki.v0.PlaylogInfo.prototype.getPlatinumScore = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.mythos.ongeki.v0.PlaylogInfo} returns this + */ +proto.mythos.ongeki.v0.PlaylogInfo.prototype.setPlatinumScore = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional OngekiTechScoreRank tech_score_rank = 7; + * @return {!proto.mythos.ongeki.v0.OngekiTechScoreRank} + */ +proto.mythos.ongeki.v0.PlaylogInfo.prototype.getTechScoreRank = function() { + return /** @type {!proto.mythos.ongeki.v0.OngekiTechScoreRank} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {!proto.mythos.ongeki.v0.OngekiTechScoreRank} value + * @return {!proto.mythos.ongeki.v0.PlaylogInfo} returns this + */ +proto.mythos.ongeki.v0.PlaylogInfo.prototype.setTechScoreRank = function(value) { + return jspb.Message.setProto3EnumField(this, 7, value); +}; + + +/** + * optional OngekiBattleScoreRank battle_score_rank = 8; + * @return {!proto.mythos.ongeki.v0.OngekiBattleScoreRank} + */ +proto.mythos.ongeki.v0.PlaylogInfo.prototype.getBattleScoreRank = function() { + return /** @type {!proto.mythos.ongeki.v0.OngekiBattleScoreRank} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {!proto.mythos.ongeki.v0.OngekiBattleScoreRank} value + * @return {!proto.mythos.ongeki.v0.PlaylogInfo} returns this + */ +proto.mythos.ongeki.v0.PlaylogInfo.prototype.setBattleScoreRank = function(value) { + return jspb.Message.setProto3EnumField(this, 8, value); +}; + + +/** + * optional OngekiComboStatus combo_status = 9; + * @return {!proto.mythos.ongeki.v0.OngekiComboStatus} + */ +proto.mythos.ongeki.v0.PlaylogInfo.prototype.getComboStatus = function() { + return /** @type {!proto.mythos.ongeki.v0.OngekiComboStatus} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** + * @param {!proto.mythos.ongeki.v0.OngekiComboStatus} value + * @return {!proto.mythos.ongeki.v0.PlaylogInfo} returns this + */ +proto.mythos.ongeki.v0.PlaylogInfo.prototype.setComboStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 9, value); +}; + + +/** + * optional OngekiClearStatus clear_status = 10; + * @return {!proto.mythos.ongeki.v0.OngekiClearStatus} + */ +proto.mythos.ongeki.v0.PlaylogInfo.prototype.getClearStatus = function() { + return /** @type {!proto.mythos.ongeki.v0.OngekiClearStatus} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** + * @param {!proto.mythos.ongeki.v0.OngekiClearStatus} value + * @return {!proto.mythos.ongeki.v0.PlaylogInfo} returns this + */ +proto.mythos.ongeki.v0.PlaylogInfo.prototype.setClearStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 10, value); +}; + + +/** + * optional bool is_full_bell = 11; + * @return {boolean} + */ +proto.mythos.ongeki.v0.PlaylogInfo.prototype.getIsFullBell = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 11, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.mythos.ongeki.v0.PlaylogInfo} returns this + */ +proto.mythos.ongeki.v0.PlaylogInfo.prototype.setIsFullBell = function(value) { + return jspb.Message.setProto3BooleanField(this, 11, value); +}; + + +/** + * optional bool is_tech_new_record = 12; + * @return {boolean} + */ +proto.mythos.ongeki.v0.PlaylogInfo.prototype.getIsTechNewRecord = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 12, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.mythos.ongeki.v0.PlaylogInfo} returns this + */ +proto.mythos.ongeki.v0.PlaylogInfo.prototype.setIsTechNewRecord = function(value) { + return jspb.Message.setProto3BooleanField(this, 12, value); +}; + + +/** + * optional bool is_battle_new_record = 13; + * @return {boolean} + */ +proto.mythos.ongeki.v0.PlaylogInfo.prototype.getIsBattleNewRecord = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 13, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.mythos.ongeki.v0.PlaylogInfo} returns this + */ +proto.mythos.ongeki.v0.PlaylogInfo.prototype.setIsBattleNewRecord = function(value) { + return jspb.Message.setProto3BooleanField(this, 13, value); +}; + + +/** + * optional bool is_over_damage_new_record = 14; + * @return {boolean} + */ +proto.mythos.ongeki.v0.PlaylogInfo.prototype.getIsOverDamageNewRecord = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 14, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.mythos.ongeki.v0.PlaylogInfo} returns this + */ +proto.mythos.ongeki.v0.PlaylogInfo.prototype.setIsOverDamageNewRecord = function(value) { + return jspb.Message.setProto3BooleanField(this, 14, value); +}; + + +/** + * optional string user_play_date = 15; + * @return {string} + */ +proto.mythos.ongeki.v0.PlaylogInfo.prototype.getUserPlayDate = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 15, "")); +}; + + +/** + * @param {string} value + * @return {!proto.mythos.ongeki.v0.PlaylogInfo} returns this + */ +proto.mythos.ongeki.v0.PlaylogInfo.prototype.setUserPlayDate = function(value) { + return jspb.Message.setProto3StringField(this, 15, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.mythos.ongeki.v0.PlaylogJudge.prototype.toObject = function(opt_includeInstance) { + return proto.mythos.ongeki.v0.PlaylogJudge.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.mythos.ongeki.v0.PlaylogJudge} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.mythos.ongeki.v0.PlaylogJudge.toObject = function(includeInstance, msg) { + var f, obj = { + judgeCriticalBreak: jspb.Message.getFieldWithDefault(msg, 17, 0), + judgeBreak: jspb.Message.getFieldWithDefault(msg, 18, 0), + judgeHit: jspb.Message.getFieldWithDefault(msg, 19, 0), + judgeMiss: jspb.Message.getFieldWithDefault(msg, 20, 0), + maxCombo: jspb.Message.getFieldWithDefault(msg, 21, 0), + bellCount: jspb.Message.getFieldWithDefault(msg, 22, 0), + totalBellCount: jspb.Message.getFieldWithDefault(msg, 23, 0), + damageCount: jspb.Message.getFieldWithDefault(msg, 24, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.mythos.ongeki.v0.PlaylogJudge} + */ +proto.mythos.ongeki.v0.PlaylogJudge.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.mythos.ongeki.v0.PlaylogJudge; + return proto.mythos.ongeki.v0.PlaylogJudge.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.mythos.ongeki.v0.PlaylogJudge} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.mythos.ongeki.v0.PlaylogJudge} + */ +proto.mythos.ongeki.v0.PlaylogJudge.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 17: + var value = /** @type {number} */ (reader.readInt32()); + msg.setJudgeCriticalBreak(value); + break; + case 18: + var value = /** @type {number} */ (reader.readInt32()); + msg.setJudgeBreak(value); + break; + case 19: + var value = /** @type {number} */ (reader.readInt32()); + msg.setJudgeHit(value); + break; + case 20: + var value = /** @type {number} */ (reader.readInt32()); + msg.setJudgeMiss(value); + break; + case 21: + var value = /** @type {number} */ (reader.readInt32()); + msg.setMaxCombo(value); + break; + case 22: + var value = /** @type {number} */ (reader.readInt32()); + msg.setBellCount(value); + break; + case 23: + var value = /** @type {number} */ (reader.readInt32()); + msg.setTotalBellCount(value); + break; + case 24: + var value = /** @type {number} */ (reader.readInt32()); + msg.setDamageCount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.mythos.ongeki.v0.PlaylogJudge.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.mythos.ongeki.v0.PlaylogJudge.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.mythos.ongeki.v0.PlaylogJudge} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.mythos.ongeki.v0.PlaylogJudge.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getJudgeCriticalBreak(); + if (f !== 0) { + writer.writeInt32( + 17, + f + ); + } + f = message.getJudgeBreak(); + if (f !== 0) { + writer.writeInt32( + 18, + f + ); + } + f = message.getJudgeHit(); + if (f !== 0) { + writer.writeInt32( + 19, + f + ); + } + f = message.getJudgeMiss(); + if (f !== 0) { + writer.writeInt32( + 20, + f + ); + } + f = message.getMaxCombo(); + if (f !== 0) { + writer.writeInt32( + 21, + f + ); + } + f = message.getBellCount(); + if (f !== 0) { + writer.writeInt32( + 22, + f + ); + } + f = message.getTotalBellCount(); + if (f !== 0) { + writer.writeInt32( + 23, + f + ); + } + f = message.getDamageCount(); + if (f !== 0) { + writer.writeInt32( + 24, + f + ); + } +}; + + +/** + * optional int32 judge_critical_break = 17; + * @return {number} + */ +proto.mythos.ongeki.v0.PlaylogJudge.prototype.getJudgeCriticalBreak = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 17, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.mythos.ongeki.v0.PlaylogJudge} returns this + */ +proto.mythos.ongeki.v0.PlaylogJudge.prototype.setJudgeCriticalBreak = function(value) { + return jspb.Message.setProto3IntField(this, 17, value); +}; + + +/** + * optional int32 judge_break = 18; + * @return {number} + */ +proto.mythos.ongeki.v0.PlaylogJudge.prototype.getJudgeBreak = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 18, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.mythos.ongeki.v0.PlaylogJudge} returns this + */ +proto.mythos.ongeki.v0.PlaylogJudge.prototype.setJudgeBreak = function(value) { + return jspb.Message.setProto3IntField(this, 18, value); +}; + + +/** + * optional int32 judge_hit = 19; + * @return {number} + */ +proto.mythos.ongeki.v0.PlaylogJudge.prototype.getJudgeHit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 19, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.mythos.ongeki.v0.PlaylogJudge} returns this + */ +proto.mythos.ongeki.v0.PlaylogJudge.prototype.setJudgeHit = function(value) { + return jspb.Message.setProto3IntField(this, 19, value); +}; + + +/** + * optional int32 judge_miss = 20; + * @return {number} + */ +proto.mythos.ongeki.v0.PlaylogJudge.prototype.getJudgeMiss = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 20, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.mythos.ongeki.v0.PlaylogJudge} returns this + */ +proto.mythos.ongeki.v0.PlaylogJudge.prototype.setJudgeMiss = function(value) { + return jspb.Message.setProto3IntField(this, 20, value); +}; + + +/** + * optional int32 max_combo = 21; + * @return {number} + */ +proto.mythos.ongeki.v0.PlaylogJudge.prototype.getMaxCombo = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 21, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.mythos.ongeki.v0.PlaylogJudge} returns this + */ +proto.mythos.ongeki.v0.PlaylogJudge.prototype.setMaxCombo = function(value) { + return jspb.Message.setProto3IntField(this, 21, value); +}; + + +/** + * optional int32 bell_count = 22; + * @return {number} + */ +proto.mythos.ongeki.v0.PlaylogJudge.prototype.getBellCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 22, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.mythos.ongeki.v0.PlaylogJudge} returns this + */ +proto.mythos.ongeki.v0.PlaylogJudge.prototype.setBellCount = function(value) { + return jspb.Message.setProto3IntField(this, 22, value); +}; + + +/** + * optional int32 total_bell_count = 23; + * @return {number} + */ +proto.mythos.ongeki.v0.PlaylogJudge.prototype.getTotalBellCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 23, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.mythos.ongeki.v0.PlaylogJudge} returns this + */ +proto.mythos.ongeki.v0.PlaylogJudge.prototype.setTotalBellCount = function(value) { + return jspb.Message.setProto3IntField(this, 23, value); +}; + + +/** + * optional int32 damage_count = 24; + * @return {number} + */ +proto.mythos.ongeki.v0.PlaylogJudge.prototype.getDamageCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 24, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.mythos.ongeki.v0.PlaylogJudge} returns this + */ +proto.mythos.ongeki.v0.PlaylogJudge.prototype.setDamageCount = function(value) { + return jspb.Message.setProto3IntField(this, 24, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.mythos.ongeki.v0.PlaylogJudgeRate.prototype.toObject = function(opt_includeInstance) { + return proto.mythos.ongeki.v0.PlaylogJudgeRate.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.mythos.ongeki.v0.PlaylogJudgeRate} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.mythos.ongeki.v0.PlaylogJudgeRate.toObject = function(includeInstance, msg) { + var f, obj = { + rateTap: jspb.Message.getFieldWithDefault(msg, 1, 0), + rateHold: jspb.Message.getFieldWithDefault(msg, 2, 0), + rateFlick: jspb.Message.getFieldWithDefault(msg, 3, 0), + rateSideTap: jspb.Message.getFieldWithDefault(msg, 4, 0), + rateSideHold: jspb.Message.getFieldWithDefault(msg, 5, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.mythos.ongeki.v0.PlaylogJudgeRate} + */ +proto.mythos.ongeki.v0.PlaylogJudgeRate.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.mythos.ongeki.v0.PlaylogJudgeRate; + return proto.mythos.ongeki.v0.PlaylogJudgeRate.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.mythos.ongeki.v0.PlaylogJudgeRate} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.mythos.ongeki.v0.PlaylogJudgeRate} + */ +proto.mythos.ongeki.v0.PlaylogJudgeRate.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setRateTap(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setRateHold(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setRateFlick(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setRateSideTap(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt32()); + msg.setRateSideHold(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.mythos.ongeki.v0.PlaylogJudgeRate.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.mythos.ongeki.v0.PlaylogJudgeRate.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.mythos.ongeki.v0.PlaylogJudgeRate} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.mythos.ongeki.v0.PlaylogJudgeRate.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRateTap(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } + f = message.getRateHold(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = message.getRateFlick(); + if (f !== 0) { + writer.writeInt32( + 3, + f + ); + } + f = message.getRateSideTap(); + if (f !== 0) { + writer.writeInt32( + 4, + f + ); + } + f = message.getRateSideHold(); + if (f !== 0) { + writer.writeInt32( + 5, + f + ); + } +}; + + +/** + * optional int32 rate_tap = 1; + * @return {number} + */ +proto.mythos.ongeki.v0.PlaylogJudgeRate.prototype.getRateTap = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.mythos.ongeki.v0.PlaylogJudgeRate} returns this + */ +proto.mythos.ongeki.v0.PlaylogJudgeRate.prototype.setRateTap = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int32 rate_hold = 2; + * @return {number} + */ +proto.mythos.ongeki.v0.PlaylogJudgeRate.prototype.getRateHold = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.mythos.ongeki.v0.PlaylogJudgeRate} returns this + */ +proto.mythos.ongeki.v0.PlaylogJudgeRate.prototype.setRateHold = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional int32 rate_flick = 3; + * @return {number} + */ +proto.mythos.ongeki.v0.PlaylogJudgeRate.prototype.getRateFlick = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.mythos.ongeki.v0.PlaylogJudgeRate} returns this + */ +proto.mythos.ongeki.v0.PlaylogJudgeRate.prototype.setRateFlick = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int32 rate_side_tap = 4; + * @return {number} + */ +proto.mythos.ongeki.v0.PlaylogJudgeRate.prototype.getRateSideTap = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.mythos.ongeki.v0.PlaylogJudgeRate} returns this + */ +proto.mythos.ongeki.v0.PlaylogJudgeRate.prototype.setRateSideTap = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional int32 rate_side_hold = 5; + * @return {number} + */ +proto.mythos.ongeki.v0.PlaylogJudgeRate.prototype.getRateSideHold = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.mythos.ongeki.v0.PlaylogJudgeRate} returns this + */ +proto.mythos.ongeki.v0.PlaylogJudgeRate.prototype.setRateSideHold = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.mythos.ongeki.v0.PlaylogMatchingUser.prototype.toObject = function(opt_includeInstance) { + return proto.mythos.ongeki.v0.PlaylogMatchingUser.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.mythos.ongeki.v0.PlaylogMatchingUser} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.mythos.ongeki.v0.PlaylogMatchingUser.toObject = function(includeInstance, msg) { + var f, obj = { + userName: jspb.Message.getFieldWithDefault(msg, 1, ""), + musicLevel: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.mythos.ongeki.v0.PlaylogMatchingUser} + */ +proto.mythos.ongeki.v0.PlaylogMatchingUser.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.mythos.ongeki.v0.PlaylogMatchingUser; + return proto.mythos.ongeki.v0.PlaylogMatchingUser.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.mythos.ongeki.v0.PlaylogMatchingUser} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.mythos.ongeki.v0.PlaylogMatchingUser} + */ +proto.mythos.ongeki.v0.PlaylogMatchingUser.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setUserName(value); + break; + case 2: + var value = /** @type {!proto.mythos.ongeki.v0.OngekiLevel} */ (reader.readEnum()); + msg.setMusicLevel(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.mythos.ongeki.v0.PlaylogMatchingUser.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.mythos.ongeki.v0.PlaylogMatchingUser.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.mythos.ongeki.v0.PlaylogMatchingUser} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.mythos.ongeki.v0.PlaylogMatchingUser.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUserName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getMusicLevel(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } +}; + + +/** + * optional string user_name = 1; + * @return {string} + */ +proto.mythos.ongeki.v0.PlaylogMatchingUser.prototype.getUserName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.mythos.ongeki.v0.PlaylogMatchingUser} returns this + */ +proto.mythos.ongeki.v0.PlaylogMatchingUser.prototype.setUserName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional OngekiLevel music_level = 2; + * @return {!proto.mythos.ongeki.v0.OngekiLevel} + */ +proto.mythos.ongeki.v0.PlaylogMatchingUser.prototype.getMusicLevel = function() { + return /** @type {!proto.mythos.ongeki.v0.OngekiLevel} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.mythos.ongeki.v0.OngekiLevel} value + * @return {!proto.mythos.ongeki.v0.PlaylogMatchingUser} returns this + */ +proto.mythos.ongeki.v0.PlaylogMatchingUser.prototype.setMusicLevel = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.mythos.ongeki.v0.PlaylogCard.prototype.toObject = function(opt_includeInstance) { + return proto.mythos.ongeki.v0.PlaylogCard.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.mythos.ongeki.v0.PlaylogCard} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.mythos.ongeki.v0.PlaylogCard.toObject = function(includeInstance, msg) { + var f, obj = { + cardId: jspb.Message.getFieldWithDefault(msg, 1, 0), + cardLevel: jspb.Message.getFieldWithDefault(msg, 2, 0), + cardAttack: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.mythos.ongeki.v0.PlaylogCard} + */ +proto.mythos.ongeki.v0.PlaylogCard.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.mythos.ongeki.v0.PlaylogCard; + return proto.mythos.ongeki.v0.PlaylogCard.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.mythos.ongeki.v0.PlaylogCard} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.mythos.ongeki.v0.PlaylogCard} + */ +proto.mythos.ongeki.v0.PlaylogCard.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setCardId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setCardLevel(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setCardAttack(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.mythos.ongeki.v0.PlaylogCard.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.mythos.ongeki.v0.PlaylogCard.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.mythos.ongeki.v0.PlaylogCard} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.mythos.ongeki.v0.PlaylogCard.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCardId(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } + f = message.getCardLevel(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = message.getCardAttack(); + if (f !== 0) { + writer.writeInt32( + 3, + f + ); + } +}; + + +/** + * optional int32 card_id = 1; + * @return {number} + */ +proto.mythos.ongeki.v0.PlaylogCard.prototype.getCardId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.mythos.ongeki.v0.PlaylogCard} returns this + */ +proto.mythos.ongeki.v0.PlaylogCard.prototype.setCardId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int32 card_level = 2; + * @return {number} + */ +proto.mythos.ongeki.v0.PlaylogCard.prototype.getCardLevel = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.mythos.ongeki.v0.PlaylogCard} returns this + */ +proto.mythos.ongeki.v0.PlaylogCard.prototype.setCardLevel = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional int32 card_attack = 3; + * @return {number} + */ +proto.mythos.ongeki.v0.PlaylogCard.prototype.getCardAttack = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.mythos.ongeki.v0.PlaylogCard} returns this + */ +proto.mythos.ongeki.v0.PlaylogCard.prototype.setCardAttack = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.mythos.ongeki.v0.PlaylogBoss.prototype.toObject = function(opt_includeInstance) { + return proto.mythos.ongeki.v0.PlaylogBoss.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.mythos.ongeki.v0.PlaylogBoss} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.mythos.ongeki.v0.PlaylogBoss.toObject = function(includeInstance, msg) { + var f, obj = { + bossId: jspb.Message.getFieldWithDefault(msg, 1, 0), + bossLevel: jspb.Message.getFieldWithDefault(msg, 2, 0), + bossAttribute: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.mythos.ongeki.v0.PlaylogBoss} + */ +proto.mythos.ongeki.v0.PlaylogBoss.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.mythos.ongeki.v0.PlaylogBoss; + return proto.mythos.ongeki.v0.PlaylogBoss.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.mythos.ongeki.v0.PlaylogBoss} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.mythos.ongeki.v0.PlaylogBoss} + */ +proto.mythos.ongeki.v0.PlaylogBoss.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setBossId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setBossLevel(value); + break; + case 3: + var value = /** @type {!proto.mythos.ongeki.v0.OngekiBossAttribute} */ (reader.readEnum()); + msg.setBossAttribute(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.mythos.ongeki.v0.PlaylogBoss.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.mythos.ongeki.v0.PlaylogBoss.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.mythos.ongeki.v0.PlaylogBoss} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.mythos.ongeki.v0.PlaylogBoss.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBossId(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } + f = message.getBossLevel(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = message.getBossAttribute(); + if (f !== 0.0) { + writer.writeEnum( + 3, + f + ); + } +}; + + +/** + * optional int32 boss_id = 1; + * @return {number} + */ +proto.mythos.ongeki.v0.PlaylogBoss.prototype.getBossId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.mythos.ongeki.v0.PlaylogBoss} returns this + */ +proto.mythos.ongeki.v0.PlaylogBoss.prototype.setBossId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int32 boss_level = 2; + * @return {number} + */ +proto.mythos.ongeki.v0.PlaylogBoss.prototype.getBossLevel = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.mythos.ongeki.v0.PlaylogBoss} returns this + */ +proto.mythos.ongeki.v0.PlaylogBoss.prototype.setBossLevel = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional OngekiBossAttribute boss_attribute = 3; + * @return {!proto.mythos.ongeki.v0.OngekiBossAttribute} + */ +proto.mythos.ongeki.v0.PlaylogBoss.prototype.getBossAttribute = function() { + return /** @type {!proto.mythos.ongeki.v0.OngekiBossAttribute} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {!proto.mythos.ongeki.v0.OngekiBossAttribute} value + * @return {!proto.mythos.ongeki.v0.PlaylogBoss} returns this + */ +proto.mythos.ongeki.v0.PlaylogBoss.prototype.setBossAttribute = function(value) { + return jspb.Message.setProto3EnumField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.mythos.ongeki.v0.PlaylogEvent.prototype.toObject = function(opt_includeInstance) { + return proto.mythos.ongeki.v0.PlaylogEvent.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.mythos.ongeki.v0.PlaylogEvent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.mythos.ongeki.v0.PlaylogEvent.toObject = function(includeInstance, msg) { + var f, obj = { + eventId: jspb.Message.getFieldWithDefault(msg, 1, 0), + eventName: jspb.Message.getFieldWithDefault(msg, 2, ""), + eventPoint: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.mythos.ongeki.v0.PlaylogEvent} + */ +proto.mythos.ongeki.v0.PlaylogEvent.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.mythos.ongeki.v0.PlaylogEvent; + return proto.mythos.ongeki.v0.PlaylogEvent.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.mythos.ongeki.v0.PlaylogEvent} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.mythos.ongeki.v0.PlaylogEvent} + */ +proto.mythos.ongeki.v0.PlaylogEvent.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setEventId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setEventName(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setEventPoint(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.mythos.ongeki.v0.PlaylogEvent.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.mythos.ongeki.v0.PlaylogEvent.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.mythos.ongeki.v0.PlaylogEvent} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.mythos.ongeki.v0.PlaylogEvent.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEventId(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } + f = message.getEventName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getEventPoint(); + if (f !== 0) { + writer.writeInt32( + 3, + f + ); + } +}; + + +/** + * optional int32 event_id = 1; + * @return {number} + */ +proto.mythos.ongeki.v0.PlaylogEvent.prototype.getEventId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.mythos.ongeki.v0.PlaylogEvent} returns this + */ +proto.mythos.ongeki.v0.PlaylogEvent.prototype.setEventId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string event_name = 2; + * @return {string} + */ +proto.mythos.ongeki.v0.PlaylogEvent.prototype.getEventName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.mythos.ongeki.v0.PlaylogEvent} returns this + */ +proto.mythos.ongeki.v0.PlaylogEvent.prototype.setEventName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional int32 event_point = 3; + * @return {number} + */ +proto.mythos.ongeki.v0.PlaylogEvent.prototype.getEventPoint = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.mythos.ongeki.v0.PlaylogEvent} returns this + */ +proto.mythos.ongeki.v0.PlaylogEvent.prototype.setEventPoint = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +goog.object.extend(exports, proto.mythos.ongeki.v0); diff --git a/server/src/proto/generated/ongeki/user_grpc_pb.d.ts b/server/src/proto/generated/ongeki/user_grpc_pb.d.ts new file mode 100644 index 000000000..a1ebe2bee --- /dev/null +++ b/server/src/proto/generated/ongeki/user_grpc_pb.d.ts @@ -0,0 +1,23 @@ +// GENERATED CODE -- DO NOT EDIT! + +// package: mythos.ongeki.v0 +// file: ongeki/user.proto + +import * as ongeki_user_pb from "../ongeki/user_pb"; +import * as grpc from "@grpc/grpc-js"; + +interface IOngekiUserService extends grpc.ServiceDefinition { + getPlaylog: grpc.MethodDefinition; +} + +export const OngekiUserService: IOngekiUserService; + +export interface IOngekiUserServer extends grpc.UntypedServiceImplementation { + getPlaylog: grpc.handleServerStreamingCall; +} + +export class OngekiUserClient extends grpc.Client { + constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); + getPlaylog(argument: ongeki_user_pb.GetPlaylogRequest, metadataOrOptions?: grpc.Metadata | grpc.CallOptions | null): grpc.ClientReadableStream; + getPlaylog(argument: ongeki_user_pb.GetPlaylogRequest, metadata?: grpc.Metadata | null, options?: grpc.CallOptions | null): grpc.ClientReadableStream; +} diff --git a/server/src/proto/generated/ongeki/user_grpc_pb.js b/server/src/proto/generated/ongeki/user_grpc_pb.js new file mode 100644 index 000000000..9b0049425 --- /dev/null +++ b/server/src/proto/generated/ongeki/user_grpc_pb.js @@ -0,0 +1,45 @@ +// GENERATED CODE -- DO NOT EDIT! + +'use strict'; +var grpc = require('@grpc/grpc-js'); +var ongeki_user_pb = require('../ongeki/user_pb.js'); +var ongeki_playlog_pb = require('../ongeki/playlog_pb.js'); + +function serialize_mythos_ongeki_v0_GetPlaylogRequest(arg) { + if (!(arg instanceof ongeki_user_pb.GetPlaylogRequest)) { + throw new Error('Expected argument of type mythos.ongeki.v0.GetPlaylogRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_mythos_ongeki_v0_GetPlaylogRequest(buffer_arg) { + return ongeki_user_pb.GetPlaylogRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_mythos_ongeki_v0_GetPlaylogStreamItem(arg) { + if (!(arg instanceof ongeki_user_pb.GetPlaylogStreamItem)) { + throw new Error('Expected argument of type mythos.ongeki.v0.GetPlaylogStreamItem'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_mythos_ongeki_v0_GetPlaylogStreamItem(buffer_arg) { + return ongeki_user_pb.GetPlaylogStreamItem.deserializeBinary(new Uint8Array(buffer_arg)); +} + + +var OngekiUserService = exports.OngekiUserService = { + getPlaylog: { + path: '/mythos.ongeki.v0.OngekiUser/GetPlaylog', + requestStream: false, + responseStream: true, + requestType: ongeki_user_pb.GetPlaylogRequest, + responseType: ongeki_user_pb.GetPlaylogStreamItem, + requestSerialize: serialize_mythos_ongeki_v0_GetPlaylogRequest, + requestDeserialize: deserialize_mythos_ongeki_v0_GetPlaylogRequest, + responseSerialize: serialize_mythos_ongeki_v0_GetPlaylogStreamItem, + responseDeserialize: deserialize_mythos_ongeki_v0_GetPlaylogStreamItem, + }, +}; + +exports.OngekiUserClient = grpc.makeGenericClientConstructor(OngekiUserService); diff --git a/server/src/proto/generated/ongeki/user_pb.d.ts b/server/src/proto/generated/ongeki/user_pb.d.ts new file mode 100644 index 000000000..4008d60b8 --- /dev/null +++ b/server/src/proto/generated/ongeki/user_pb.d.ts @@ -0,0 +1,70 @@ +// package: mythos.ongeki.v0 +// file: ongeki/user.proto + +import * as jspb from "google-protobuf"; +import * as ongeki_playlog_pb from "../ongeki/playlog_pb"; + +export class GetPlaylogRequest extends jspb.Message { + getProfileApiId(): string; + setProfileApiId(value: string): void; + + hasLastUserPlayDate(): boolean; + clearLastUserPlayDate(): void; + getLastUserPlayDate(): string; + setLastUserPlayDate(value: string): void; + + hasLimit(): boolean; + clearLimit(): void; + getLimit(): number; + setLimit(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetPlaylogRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetPlaylogRequest): GetPlaylogRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetPlaylogRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetPlaylogRequest; + static deserializeBinaryFromReader(message: GetPlaylogRequest, reader: jspb.BinaryReader): GetPlaylogRequest; +} + +export namespace GetPlaylogRequest { + export type AsObject = { + profileApiId: string, + lastUserPlayDate: string, + limit: number, + } +} + +export class GetPlaylogStreamItem extends jspb.Message { + getPlaylogApiId(): string; + setPlaylogApiId(value: string): void; + + hasInfo(): boolean; + clearInfo(): void; + getInfo(): ongeki_playlog_pb.PlaylogInfo | undefined; + setInfo(value?: ongeki_playlog_pb.PlaylogInfo): void; + + hasJudge(): boolean; + clearJudge(): void; + getJudge(): ongeki_playlog_pb.PlaylogJudge | undefined; + setJudge(value?: ongeki_playlog_pb.PlaylogJudge): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetPlaylogStreamItem.AsObject; + static toObject(includeInstance: boolean, msg: GetPlaylogStreamItem): GetPlaylogStreamItem.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetPlaylogStreamItem, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetPlaylogStreamItem; + static deserializeBinaryFromReader(message: GetPlaylogStreamItem, reader: jspb.BinaryReader): GetPlaylogStreamItem; +} + +export namespace GetPlaylogStreamItem { + export type AsObject = { + playlogApiId: string, + info?: ongeki_playlog_pb.PlaylogInfo.AsObject, + judge?: ongeki_playlog_pb.PlaylogJudge.AsObject, + } +} + diff --git a/server/src/proto/generated/ongeki/user_pb.js b/server/src/proto/generated/ongeki/user_pb.js new file mode 100644 index 000000000..e121e4966 --- /dev/null +++ b/server/src/proto/generated/ongeki/user_pb.js @@ -0,0 +1,528 @@ +// source: ongeki/user.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { + if (this) { return this; } + if (typeof window !== 'undefined') { return window; } + if (typeof global !== 'undefined') { return global; } + if (typeof self !== 'undefined') { return self; } + return Function('return this')(); +}.call(null)); + +var ongeki_playlog_pb = require('../ongeki/playlog_pb.js'); +goog.object.extend(proto, ongeki_playlog_pb); +goog.exportSymbol('proto.mythos.ongeki.v0.GetPlaylogRequest', null, global); +goog.exportSymbol('proto.mythos.ongeki.v0.GetPlaylogStreamItem', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.mythos.ongeki.v0.GetPlaylogRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.mythos.ongeki.v0.GetPlaylogRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.mythos.ongeki.v0.GetPlaylogRequest.displayName = 'proto.mythos.ongeki.v0.GetPlaylogRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.mythos.ongeki.v0.GetPlaylogStreamItem = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.mythos.ongeki.v0.GetPlaylogStreamItem, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.mythos.ongeki.v0.GetPlaylogStreamItem.displayName = 'proto.mythos.ongeki.v0.GetPlaylogStreamItem'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.mythos.ongeki.v0.GetPlaylogRequest.prototype.toObject = function(opt_includeInstance) { + return proto.mythos.ongeki.v0.GetPlaylogRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.mythos.ongeki.v0.GetPlaylogRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.mythos.ongeki.v0.GetPlaylogRequest.toObject = function(includeInstance, msg) { + var f, obj = { + profileApiId: jspb.Message.getFieldWithDefault(msg, 1, ""), + lastUserPlayDate: jspb.Message.getFieldWithDefault(msg, 2, ""), + limit: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.mythos.ongeki.v0.GetPlaylogRequest} + */ +proto.mythos.ongeki.v0.GetPlaylogRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.mythos.ongeki.v0.GetPlaylogRequest; + return proto.mythos.ongeki.v0.GetPlaylogRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.mythos.ongeki.v0.GetPlaylogRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.mythos.ongeki.v0.GetPlaylogRequest} + */ +proto.mythos.ongeki.v0.GetPlaylogRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setProfileApiId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setLastUserPlayDate(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setLimit(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.mythos.ongeki.v0.GetPlaylogRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.mythos.ongeki.v0.GetPlaylogRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.mythos.ongeki.v0.GetPlaylogRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.mythos.ongeki.v0.GetPlaylogRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProfileApiId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeUint64( + 3, + f + ); + } +}; + + +/** + * optional string profile_api_id = 1; + * @return {string} + */ +proto.mythos.ongeki.v0.GetPlaylogRequest.prototype.getProfileApiId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.mythos.ongeki.v0.GetPlaylogRequest} returns this + */ +proto.mythos.ongeki.v0.GetPlaylogRequest.prototype.setProfileApiId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string last_user_play_date = 2; + * @return {string} + */ +proto.mythos.ongeki.v0.GetPlaylogRequest.prototype.getLastUserPlayDate = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.mythos.ongeki.v0.GetPlaylogRequest} returns this + */ +proto.mythos.ongeki.v0.GetPlaylogRequest.prototype.setLastUserPlayDate = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.mythos.ongeki.v0.GetPlaylogRequest} returns this + */ +proto.mythos.ongeki.v0.GetPlaylogRequest.prototype.clearLastUserPlayDate = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.mythos.ongeki.v0.GetPlaylogRequest.prototype.hasLastUserPlayDate = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional uint64 limit = 3; + * @return {number} + */ +proto.mythos.ongeki.v0.GetPlaylogRequest.prototype.getLimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.mythos.ongeki.v0.GetPlaylogRequest} returns this + */ +proto.mythos.ongeki.v0.GetPlaylogRequest.prototype.setLimit = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.mythos.ongeki.v0.GetPlaylogRequest} returns this + */ +proto.mythos.ongeki.v0.GetPlaylogRequest.prototype.clearLimit = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.mythos.ongeki.v0.GetPlaylogRequest.prototype.hasLimit = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.mythos.ongeki.v0.GetPlaylogStreamItem.prototype.toObject = function(opt_includeInstance) { + return proto.mythos.ongeki.v0.GetPlaylogStreamItem.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.mythos.ongeki.v0.GetPlaylogStreamItem} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.mythos.ongeki.v0.GetPlaylogStreamItem.toObject = function(includeInstance, msg) { + var f, obj = { + playlogApiId: jspb.Message.getFieldWithDefault(msg, 1, ""), + info: (f = msg.getInfo()) && ongeki_playlog_pb.PlaylogInfo.toObject(includeInstance, f), + judge: (f = msg.getJudge()) && ongeki_playlog_pb.PlaylogJudge.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.mythos.ongeki.v0.GetPlaylogStreamItem} + */ +proto.mythos.ongeki.v0.GetPlaylogStreamItem.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.mythos.ongeki.v0.GetPlaylogStreamItem; + return proto.mythos.ongeki.v0.GetPlaylogStreamItem.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.mythos.ongeki.v0.GetPlaylogStreamItem} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.mythos.ongeki.v0.GetPlaylogStreamItem} + */ +proto.mythos.ongeki.v0.GetPlaylogStreamItem.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPlaylogApiId(value); + break; + case 2: + var value = new ongeki_playlog_pb.PlaylogInfo; + reader.readMessage(value,ongeki_playlog_pb.PlaylogInfo.deserializeBinaryFromReader); + msg.setInfo(value); + break; + case 3: + var value = new ongeki_playlog_pb.PlaylogJudge; + reader.readMessage(value,ongeki_playlog_pb.PlaylogJudge.deserializeBinaryFromReader); + msg.setJudge(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.mythos.ongeki.v0.GetPlaylogStreamItem.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.mythos.ongeki.v0.GetPlaylogStreamItem.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.mythos.ongeki.v0.GetPlaylogStreamItem} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.mythos.ongeki.v0.GetPlaylogStreamItem.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPlaylogApiId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getInfo(); + if (f != null) { + writer.writeMessage( + 2, + f, + ongeki_playlog_pb.PlaylogInfo.serializeBinaryToWriter + ); + } + f = message.getJudge(); + if (f != null) { + writer.writeMessage( + 3, + f, + ongeki_playlog_pb.PlaylogJudge.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string playlog_api_id = 1; + * @return {string} + */ +proto.mythos.ongeki.v0.GetPlaylogStreamItem.prototype.getPlaylogApiId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.mythos.ongeki.v0.GetPlaylogStreamItem} returns this + */ +proto.mythos.ongeki.v0.GetPlaylogStreamItem.prototype.setPlaylogApiId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional PlaylogInfo info = 2; + * @return {?proto.mythos.ongeki.v0.PlaylogInfo} + */ +proto.mythos.ongeki.v0.GetPlaylogStreamItem.prototype.getInfo = function() { + return /** @type{?proto.mythos.ongeki.v0.PlaylogInfo} */ ( + jspb.Message.getWrapperField(this, ongeki_playlog_pb.PlaylogInfo, 2)); +}; + + +/** + * @param {?proto.mythos.ongeki.v0.PlaylogInfo|undefined} value + * @return {!proto.mythos.ongeki.v0.GetPlaylogStreamItem} returns this +*/ +proto.mythos.ongeki.v0.GetPlaylogStreamItem.prototype.setInfo = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.mythos.ongeki.v0.GetPlaylogStreamItem} returns this + */ +proto.mythos.ongeki.v0.GetPlaylogStreamItem.prototype.clearInfo = function() { + return this.setInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.mythos.ongeki.v0.GetPlaylogStreamItem.prototype.hasInfo = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional PlaylogJudge judge = 3; + * @return {?proto.mythos.ongeki.v0.PlaylogJudge} + */ +proto.mythos.ongeki.v0.GetPlaylogStreamItem.prototype.getJudge = function() { + return /** @type{?proto.mythos.ongeki.v0.PlaylogJudge} */ ( + jspb.Message.getWrapperField(this, ongeki_playlog_pb.PlaylogJudge, 3)); +}; + + +/** + * @param {?proto.mythos.ongeki.v0.PlaylogJudge|undefined} value + * @return {!proto.mythos.ongeki.v0.GetPlaylogStreamItem} returns this +*/ +proto.mythos.ongeki.v0.GetPlaylogStreamItem.prototype.setJudge = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.mythos.ongeki.v0.GetPlaylogStreamItem} returns this + */ +proto.mythos.ongeki.v0.GetPlaylogStreamItem.prototype.clearJudge = function() { + return this.setJudge(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.mythos.ongeki.v0.GetPlaylogStreamItem.prototype.hasJudge = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +goog.object.extend(exports, proto.mythos.ongeki.v0); diff --git a/server/src/proto/myt/ongeki/common.proto b/server/src/proto/myt/ongeki/common.proto new file mode 100644 index 000000000..96ad3e4f2 --- /dev/null +++ b/server/src/proto/myt/ongeki/common.proto @@ -0,0 +1,70 @@ +syntax = "proto3"; + +package mythos.ongeki.v0; + +enum OngekiLevel { + ONGEKI_LEVEL_UNSPECIFIED = 0; + ONGEKI_LEVEL_BASIC = 1; + ONGEKI_LEVEL_ADVANCED = 2; + ONGEKI_LEVEL_EXPERT = 3; + ONGEKI_LEVEL_MASTER = 4; + ONGEKI_LEVEL_LUNATIC = 5; +} + +enum OngekiRankingType { + ONGEKI_RANKING_TYPE_UNSPECIFIED = 0; + ONGEKI_RANKING_TYPE_TECH_SCORE = 1; + ONGEKI_RANKING_TYPE_BATTLE_SCORE = 2; + ONGEKI_RANKING_TYPE_OVER_DAMAGE = 3; + ONGEKI_RANKING_TYPE_PLATINUM_SCORE = 4; +} + +enum OngekiTechScoreRank { + ONGEKI_TECH_SCORE_RANK_UNSPECIFIED = 0; + ONGEKI_TECH_SCORE_RANK_D = 1; + ONGEKI_TECH_SCORE_RANK_C = 2; + ONGEKI_TECH_SCORE_RANK_B = 3; + ONGEKI_TECH_SCORE_RANK_BB = 4; + ONGEKI_TECH_SCORE_RANK_BBB = 5; + ONGEKI_TECH_SCORE_RANK_A = 6; + ONGEKI_TECH_SCORE_RANK_AA = 7; + ONGEKI_TECH_SCORE_RANK_AAA = 8; + ONGEKI_TECH_SCORE_RANK_S = 9; + ONGEKI_TECH_SCORE_RANK_S_PLUS = 10; + ONGEKI_TECH_SCORE_RANK_SS = 11; + ONGEKI_TECH_SCORE_RANK_SS_PLUS = 12; + ONGEKI_TECH_SCORE_RANK_SSS = 13; + ONGEKI_TECH_SCORE_RANK_SSS_PLUS = 14; +} + +enum OngekiBattleScoreRank { + ONGEKI_BATTLE_SCORE_RANK_UNSPECIFIED = 0; + ONGEKI_BATTLE_SCORE_RANK_NO_GOOD = 1; + ONGEKI_BATTLE_SCORE_RANK_USUALLY = 2; + ONGEKI_BATTLE_SCORE_RANK_GOOD = 3; + ONGEKI_BATTLE_SCORE_RANK_GREAT = 4; + ONGEKI_BATTLE_SCORE_RANK_EXCELLENT = 5; + ONGEKI_BATTLE_SCORE_RANK_UNBELIEVABLE = 6; +} + +enum OngekiClearStatus { + ONGEKI_CLEAR_STATUS_UNSPECIFIED = 0; + ONGEKI_CLEAR_STATUS_FAILED = 1; + ONGEKI_CLEAR_STATUS_CLEARED = 2; + ONGEKI_CLEAR_STATUS_OVER_DAMAGE = 3; +} + +enum OngekiComboStatus { + ONGEKI_COMBO_STATUS_UNSPECIFIED = 0; + ONGEKI_COMBO_STATUS_NONE = 1; + ONGEKI_COMBO_STATUS_FULL_COMBO = 2; + ONGEKI_COMBO_STATUS_ALL_BREAK = 3; +} + +// This starts at 1 for some reason +enum OngekiBossAttribute { + ONGEKI_BOSS_ATTRIBUTE_UNSPECIFIED = 0; + ONGEKI_BOSS_ATTRIBUTE_FIRE = 1; + ONGEKI_BOSS_ATTRIBUTE_AQUA = 2; + ONGEKI_BOSS_ATTRIBUTE_LEAF = 3; +} \ No newline at end of file diff --git a/server/src/proto/myt/ongeki/playlog.proto b/server/src/proto/myt/ongeki/playlog.proto new file mode 100644 index 000000000..ca0f5abfe --- /dev/null +++ b/server/src/proto/myt/ongeki/playlog.proto @@ -0,0 +1,66 @@ +syntax = "proto3"; + +package mythos.ongeki.v0; + +import "ongeki/common.proto"; + +message PlaylogInfo { + int32 music_id = 1; + OngekiLevel level = 2; + int32 tech_score = 3; + int32 battle_score = 4; + int32 over_damage = 5; + int32 platinum_score = 6; + OngekiTechScoreRank tech_score_rank = 7; + OngekiBattleScoreRank battle_score_rank = 8; + OngekiComboStatus combo_status = 9; + OngekiClearStatus clear_status = 10; + bool is_full_bell = 11; + bool is_tech_new_record = 12; + bool is_battle_new_record = 13; + bool is_over_damage_new_record = 14; + string user_play_date = 15; +} + +message PlaylogJudge { + int32 judge_critical_break = 17; + int32 judge_break = 18; + int32 judge_hit = 19; + int32 judge_miss = 20; + int32 max_combo = 21; + int32 bell_count = 22; + int32 total_bell_count = 23; + int32 damage_count = 24; +} + +message PlaylogJudgeRate { + int32 rate_tap = 1; + int32 rate_hold = 2; + int32 rate_flick = 3; + int32 rate_side_tap = 4; + int32 rate_side_hold = 5; +} + +message PlaylogMatchingUser { + string user_name = 1; + OngekiLevel music_level = 2; +} + +message PlaylogCard { + int32 card_id = 1; + int32 card_level = 2; + int32 card_attack = 3; +} + +message PlaylogBoss { + int32 boss_id = 1; + int32 boss_level = 2; + OngekiBossAttribute boss_attribute = 3; +} + +message PlaylogEvent { + int32 event_id = 1; + string event_name = 2; + int32 event_point = 3; +} + diff --git a/server/src/proto/myt/ongeki/user.proto b/server/src/proto/myt/ongeki/user.proto new file mode 100644 index 000000000..7ac8f124a --- /dev/null +++ b/server/src/proto/myt/ongeki/user.proto @@ -0,0 +1,23 @@ +syntax = "proto3"; + +package mythos.ongeki.v0; + +import "ongeki/playlog.proto"; + +service OngekiUser { + rpc GetPlaylog(GetPlaylogRequest) returns (stream GetPlaylogStreamItem); +} + +// PLAYLOG + +message GetPlaylogRequest { + string profile_api_id = 1; + optional string last_user_play_date = 2; + optional uint64 limit = 3; +} + +message GetPlaylogStreamItem { + string playlog_api_id = 1; + PlaylogInfo info = 2; + PlaylogJudge judge = 3; +} diff --git a/server/src/test-utils/mock-db/charts-ongeki.json b/server/src/test-utils/mock-db/charts-ongeki.json new file mode 100644 index 000000000..60054c84c --- /dev/null +++ b/server/src/test-utils/mock-db/charts-ongeki.json @@ -0,0 +1,17 @@ +[ + { + "chartID": "e5e4ee3d4feb233c399751b3ba3daf8ba149c9e6", + "data": { + "displayVersion": "bright", + "inGameID": 678, + "maxPlatScore": 2768 + }, + "difficulty": "MASTER", + "isPrimary": true, + "level": "13+", + "levelNum": 13.7, + "playtype": "Single", + "songID": 683, + "versions": ["brightMemory3Omni", "brightMemory3"] + } +] diff --git a/server/src/test-utils/mock-db/songs-ongeki.json b/server/src/test-utils/mock-db/songs-ongeki.json new file mode 100644 index 000000000..abf284bbd --- /dev/null +++ b/server/src/test-utils/mock-db/songs-ongeki.json @@ -0,0 +1,12 @@ +[ + { + "altTitles": ["SENOTETOHETSUTEITSUTENNO"], + "artist": "本城香澄(CV:岩橋由佳)「Re:ステージ!プリズムステップ」", + "data": { + "genre": "POPS&ANIME" + }, + "id": 683, + "searchTerms": [], + "title": "せーので跳べって言ってんの!" + } +] diff --git a/server/src/test-utils/test-data.ts b/server/src/test-utils/test-data.ts index e8e269de6..67e06958e 100644 --- a/server/src/test-utils/test-data.ts +++ b/server/src/test-utils/test-data.ts @@ -1280,3 +1280,30 @@ export const TestingOngekiChart: ChartDocument<"ongeki:Single"> = { songID: 19, versions: ["brightMemory3", "brightMemory3Omni"], }; + +export const TestingOngekiChartConverter: ChartDocument<"ongeki:Single"> = { + chartID: "e5e4ee3d4feb233c399751b3ba3daf8ba149c9e6", + data: { + displayVersion: "bright", + inGameID: 678, + maxPlatScore: 2768, + }, + difficulty: "MASTER", + isPrimary: true, + level: "13+", + levelNum: 13.7, + playtype: "Single", + songID: 683, + versions: ["brightMemory3Omni", "brightMemory3"], +}; + +export const TestingOngekiSongConverter: SongDocument<"ongeki"> = { + altTitles: ["SENOTETOHETSUTEITSUTENNO"], + artist: "本城香澄(CV:岩橋由佳)「Re:ステージ!プリズムステップ」", + data: { + genre: "POPS&ANIME", + }, + id: 683, + searchTerms: [], + title: "せーので跳べって言ってんの!", +};