moons-ta-client 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2184 @@
1
+ // @generated by protobuf-ts 2.8.2
2
+ // @generated from protobuf file "responses.proto" (package "proto.packets", syntax proto3)
3
+ // tslint:disable
4
+ import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
5
+ import type { IBinaryWriter } from "@protobuf-ts/runtime";
6
+ import { WireType } from "@protobuf-ts/runtime";
7
+ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
8
+ import type { IBinaryReader } from "@protobuf-ts/runtime";
9
+ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
10
+ import type { PartialMessage } from "@protobuf-ts/runtime";
11
+ import { reflectionMergePartial } from "@protobuf-ts/runtime";
12
+ import { MESSAGE_TYPE } from "@protobuf-ts/runtime";
13
+ import { MessageType } from "@protobuf-ts/runtime";
14
+ import { LeaderboardEntry } from './models.js';
15
+ import { State } from './models.js';
16
+ import { CoreServer } from './models.js';
17
+ import { Tournament } from './models.js';
18
+ import { Permissions } from './models.js';
19
+ import { QualifierEvent } from './models.js';
20
+ import { Match } from './models.js';
21
+ import { User } from './models.js';
22
+ /**
23
+ * ---- Responses ---- //
24
+ *
25
+ * @generated from protobuf message proto.packets.Response
26
+ */
27
+ export interface Response {
28
+ /**
29
+ * @generated from protobuf field: proto.packets.Response.ResponseType type = 1;
30
+ */
31
+ type: Response_ResponseType;
32
+ /**
33
+ * @generated from protobuf field: string responding_to_packet_id = 2;
34
+ */
35
+ respondingToPacketId: string;
36
+ /**
37
+ * @generated from protobuf oneof: details
38
+ */
39
+ details: {
40
+ oneofKind: "updateUser";
41
+ /**
42
+ * @generated from protobuf field: proto.packets.Response.UpdateUser update_user = 3;
43
+ */
44
+ updateUser: Response_UpdateUser;
45
+ } | {
46
+ oneofKind: "createMatch";
47
+ /**
48
+ * @generated from protobuf field: proto.packets.Response.CreateMatch create_match = 4;
49
+ */
50
+ createMatch: Response_CreateMatch;
51
+ } | {
52
+ oneofKind: "updateMatch";
53
+ /**
54
+ * @generated from protobuf field: proto.packets.Response.UpdateMatch update_match = 5;
55
+ */
56
+ updateMatch: Response_UpdateMatch;
57
+ } | {
58
+ oneofKind: "deleteMatch";
59
+ /**
60
+ * @generated from protobuf field: proto.packets.Response.DeleteMatch delete_match = 6;
61
+ */
62
+ deleteMatch: Response_DeleteMatch;
63
+ } | {
64
+ oneofKind: "createQualifierEvent";
65
+ /**
66
+ * @generated from protobuf field: proto.packets.Response.CreateQualifierEvent create_qualifier_event = 7;
67
+ */
68
+ createQualifierEvent: Response_CreateQualifierEvent;
69
+ } | {
70
+ oneofKind: "updateQualifierEvent";
71
+ /**
72
+ * @generated from protobuf field: proto.packets.Response.UpdateQualifierEvent update_qualifier_event = 8;
73
+ */
74
+ updateQualifierEvent: Response_UpdateQualifierEvent;
75
+ } | {
76
+ oneofKind: "deleteQualifierEvent";
77
+ /**
78
+ * @generated from protobuf field: proto.packets.Response.DeleteQualifierEvent delete_qualifier_event = 9;
79
+ */
80
+ deleteQualifierEvent: Response_DeleteQualifierEvent;
81
+ } | {
82
+ oneofKind: "addAuthorizedUser";
83
+ /**
84
+ * @generated from protobuf field: proto.packets.Response.AddAuthorizedUser add_authorized_user = 21;
85
+ */
86
+ addAuthorizedUser: Response_AddAuthorizedUser;
87
+ } | {
88
+ oneofKind: "updateAuthorizedUser";
89
+ /**
90
+ * @generated from protobuf field: proto.packets.Response.UpdateAuthorizedUser update_authorized_user = 22;
91
+ */
92
+ updateAuthorizedUser: Response_UpdateAuthorizedUser;
93
+ } | {
94
+ oneofKind: "removeAuthorizedUser";
95
+ /**
96
+ * @generated from protobuf field: proto.packets.Response.RemoveAuthorizedUser remove_authorized_user = 23;
97
+ */
98
+ removeAuthorizedUser: Response_RemoveAuthorizedUser;
99
+ } | {
100
+ oneofKind: "getAuthorizedUsers";
101
+ /**
102
+ * @generated from protobuf field: proto.packets.Response.GetAuthorizedUsers get_authorized_users = 24;
103
+ */
104
+ getAuthorizedUsers: Response_GetAuthorizedUsers;
105
+ } | {
106
+ oneofKind: "getDiscordInfo";
107
+ /**
108
+ * @generated from protobuf field: proto.packets.Response.GetDiscordInfo get_discord_info = 25;
109
+ */
110
+ getDiscordInfo: Response_GetDiscordInfo;
111
+ } | {
112
+ oneofKind: "createTournament";
113
+ /**
114
+ * @generated from protobuf field: proto.packets.Response.CreateTournament create_tournament = 10;
115
+ */
116
+ createTournament: Response_CreateTournament;
117
+ } | {
118
+ oneofKind: "updateTournament";
119
+ /**
120
+ * @generated from protobuf field: proto.packets.Response.UpdateTournament update_tournament = 11;
121
+ */
122
+ updateTournament: Response_UpdateTournament;
123
+ } | {
124
+ oneofKind: "deleteTournament";
125
+ /**
126
+ * @generated from protobuf field: proto.packets.Response.DeleteTournament delete_tournament = 12;
127
+ */
128
+ deleteTournament: Response_DeleteTournament;
129
+ } | {
130
+ oneofKind: "addServer";
131
+ /**
132
+ * @generated from protobuf field: proto.packets.Response.AddServer add_server = 13;
133
+ */
134
+ addServer: Response_AddServer;
135
+ } | {
136
+ oneofKind: "connect";
137
+ /**
138
+ * @generated from protobuf field: proto.packets.Response.Connect connect = 14;
139
+ */
140
+ connect: Response_Connect;
141
+ } | {
142
+ oneofKind: "join";
143
+ /**
144
+ * @generated from protobuf field: proto.packets.Response.Join join = 15;
145
+ */
146
+ join: Response_Join;
147
+ } | {
148
+ oneofKind: "leaderboardEntries";
149
+ /**
150
+ * @generated from protobuf field: proto.packets.Response.LeaderboardEntries leaderboard_entries = 16;
151
+ */
152
+ leaderboardEntries: Response_LeaderboardEntries;
153
+ } | {
154
+ oneofKind: "loadSong";
155
+ /**
156
+ * @generated from protobuf field: proto.packets.Response.LoadSong load_song = 17;
157
+ */
158
+ loadSong: Response_LoadSong;
159
+ } | {
160
+ oneofKind: "preloadImageForStreamSync";
161
+ /**
162
+ * @generated from protobuf field: proto.packets.Response.PreloadImageForStreamSync preload_image_for_stream_sync = 18;
163
+ */
164
+ preloadImageForStreamSync: Response_PreloadImageForStreamSync;
165
+ } | {
166
+ oneofKind: "showModal";
167
+ /**
168
+ * @generated from protobuf field: proto.packets.Response.ShowModal show_modal = 19;
169
+ */
170
+ showModal: Response_ShowModal;
171
+ } | {
172
+ oneofKind: "remainingAttempts";
173
+ /**
174
+ * @generated from protobuf field: proto.packets.Response.RemainingAttempts remaining_attempts = 20;
175
+ */
176
+ remainingAttempts: Response_RemainingAttempts;
177
+ } | {
178
+ oneofKind: undefined;
179
+ };
180
+ }
181
+ /**
182
+ * --- State Update Responses ---//
183
+ *
184
+ * @generated from protobuf message proto.packets.Response.UpdateUser
185
+ */
186
+ export interface Response_UpdateUser {
187
+ /**
188
+ * @generated from protobuf field: string message = 1;
189
+ */
190
+ message: string;
191
+ /**
192
+ * @generated from protobuf field: proto.models.User user = 2;
193
+ */
194
+ user?: User;
195
+ }
196
+ /**
197
+ * @generated from protobuf message proto.packets.Response.CreateMatch
198
+ */
199
+ export interface Response_CreateMatch {
200
+ /**
201
+ * @generated from protobuf field: string message = 1;
202
+ */
203
+ message: string;
204
+ /**
205
+ * @generated from protobuf field: proto.models.Match match = 2;
206
+ */
207
+ match?: Match;
208
+ }
209
+ /**
210
+ * @generated from protobuf message proto.packets.Response.UpdateMatch
211
+ */
212
+ export interface Response_UpdateMatch {
213
+ /**
214
+ * @generated from protobuf field: string message = 1;
215
+ */
216
+ message: string;
217
+ /**
218
+ * @generated from protobuf field: proto.models.Match match = 2;
219
+ */
220
+ match?: Match;
221
+ }
222
+ /**
223
+ * @generated from protobuf message proto.packets.Response.DeleteMatch
224
+ */
225
+ export interface Response_DeleteMatch {
226
+ /**
227
+ * @generated from protobuf field: string message = 1;
228
+ */
229
+ message: string;
230
+ /**
231
+ * @generated from protobuf field: proto.models.Match match = 2;
232
+ */
233
+ match?: Match;
234
+ }
235
+ /**
236
+ * @generated from protobuf message proto.packets.Response.CreateQualifierEvent
237
+ */
238
+ export interface Response_CreateQualifierEvent {
239
+ /**
240
+ * @generated from protobuf field: string message = 1;
241
+ */
242
+ message: string;
243
+ /**
244
+ * @generated from protobuf field: proto.models.QualifierEvent qualifier = 2;
245
+ */
246
+ qualifier?: QualifierEvent;
247
+ }
248
+ /**
249
+ * @generated from protobuf message proto.packets.Response.UpdateQualifierEvent
250
+ */
251
+ export interface Response_UpdateQualifierEvent {
252
+ /**
253
+ * @generated from protobuf field: string message = 1;
254
+ */
255
+ message: string;
256
+ /**
257
+ * @generated from protobuf field: proto.models.QualifierEvent qualifier = 2;
258
+ */
259
+ qualifier?: QualifierEvent;
260
+ }
261
+ /**
262
+ * @generated from protobuf message proto.packets.Response.DeleteQualifierEvent
263
+ */
264
+ export interface Response_DeleteQualifierEvent {
265
+ /**
266
+ * @generated from protobuf field: string message = 1;
267
+ */
268
+ message: string;
269
+ /**
270
+ * @generated from protobuf field: proto.models.QualifierEvent qualifier = 2;
271
+ */
272
+ qualifier?: QualifierEvent;
273
+ }
274
+ /**
275
+ * @generated from protobuf message proto.packets.Response.AddAuthorizedUser
276
+ */
277
+ export interface Response_AddAuthorizedUser {
278
+ /**
279
+ * @generated from protobuf field: string tournament_id = 1;
280
+ */
281
+ tournamentId: string;
282
+ /**
283
+ * @generated from protobuf field: string discord_id = 2;
284
+ */
285
+ discordId: string;
286
+ /**
287
+ * @generated from protobuf field: proto.models.Permissions permission_flags = 3;
288
+ */
289
+ permissionFlags: Permissions;
290
+ }
291
+ /**
292
+ * @generated from protobuf message proto.packets.Response.UpdateAuthorizedUser
293
+ */
294
+ export interface Response_UpdateAuthorizedUser {
295
+ /**
296
+ * @generated from protobuf field: string tournament_id = 1;
297
+ */
298
+ tournamentId: string;
299
+ /**
300
+ * @generated from protobuf field: string discord_id = 2;
301
+ */
302
+ discordId: string;
303
+ /**
304
+ * @generated from protobuf field: proto.models.Permissions permission_flags = 3;
305
+ */
306
+ permissionFlags: Permissions;
307
+ }
308
+ /**
309
+ * @generated from protobuf message proto.packets.Response.RemoveAuthorizedUser
310
+ */
311
+ export interface Response_RemoveAuthorizedUser {
312
+ /**
313
+ * @generated from protobuf field: string tournament_id = 1;
314
+ */
315
+ tournamentId: string;
316
+ /**
317
+ * @generated from protobuf field: string discord_id = 2;
318
+ */
319
+ discordId: string;
320
+ /**
321
+ * @generated from protobuf field: proto.models.Permissions permission_flags = 3;
322
+ */
323
+ permissionFlags: Permissions;
324
+ }
325
+ /**
326
+ * @generated from protobuf message proto.packets.Response.GetAuthorizedUsers
327
+ */
328
+ export interface Response_GetAuthorizedUsers {
329
+ /**
330
+ * @generated from protobuf field: string tournament_id = 1;
331
+ */
332
+ tournamentId: string;
333
+ /**
334
+ * @generated from protobuf field: repeated proto.packets.Response.GetAuthorizedUsers.AuthroizedUser authorized_users = 2;
335
+ */
336
+ authorizedUsers: Response_GetAuthorizedUsers_AuthroizedUser[];
337
+ }
338
+ /**
339
+ * @generated from protobuf message proto.packets.Response.GetAuthorizedUsers.AuthroizedUser
340
+ */
341
+ export interface Response_GetAuthorizedUsers_AuthroizedUser {
342
+ /**
343
+ * @generated from protobuf field: string discord_id = 1;
344
+ */
345
+ discordId: string;
346
+ /**
347
+ * @generated from protobuf field: string discord_username = 2;
348
+ */
349
+ discordUsername: string;
350
+ /**
351
+ * @generated from protobuf field: string discord_avatar_url = 3;
352
+ */
353
+ discordAvatarUrl: string;
354
+ /**
355
+ * @generated from protobuf field: proto.models.Permissions permission = 4;
356
+ */
357
+ permission: Permissions;
358
+ }
359
+ /**
360
+ * @generated from protobuf message proto.packets.Response.GetDiscordInfo
361
+ */
362
+ export interface Response_GetDiscordInfo {
363
+ /**
364
+ * @generated from protobuf field: string discord_id = 1;
365
+ */
366
+ discordId: string;
367
+ /**
368
+ * @generated from protobuf field: string discord_username = 2;
369
+ */
370
+ discordUsername: string;
371
+ /**
372
+ * @generated from protobuf field: string discord_avatar_url = 3;
373
+ */
374
+ discordAvatarUrl: string;
375
+ }
376
+ /**
377
+ * @generated from protobuf message proto.packets.Response.CreateTournament
378
+ */
379
+ export interface Response_CreateTournament {
380
+ /**
381
+ * @generated from protobuf field: string message = 1;
382
+ */
383
+ message: string;
384
+ /**
385
+ * @generated from protobuf field: proto.models.Tournament tournament = 2;
386
+ */
387
+ tournament?: Tournament;
388
+ }
389
+ /**
390
+ * @generated from protobuf message proto.packets.Response.UpdateTournament
391
+ */
392
+ export interface Response_UpdateTournament {
393
+ /**
394
+ * @generated from protobuf field: string message = 1;
395
+ */
396
+ message: string;
397
+ /**
398
+ * @generated from protobuf field: proto.models.Tournament tournament = 2;
399
+ */
400
+ tournament?: Tournament;
401
+ }
402
+ /**
403
+ * @generated from protobuf message proto.packets.Response.DeleteTournament
404
+ */
405
+ export interface Response_DeleteTournament {
406
+ /**
407
+ * @generated from protobuf field: string message = 1;
408
+ */
409
+ message: string;
410
+ /**
411
+ * @generated from protobuf field: proto.models.Tournament tournament = 2;
412
+ */
413
+ tournament?: Tournament;
414
+ }
415
+ /**
416
+ * @generated from protobuf message proto.packets.Response.AddServer
417
+ */
418
+ export interface Response_AddServer {
419
+ /**
420
+ * @generated from protobuf field: string message = 1;
421
+ */
422
+ message: string;
423
+ /**
424
+ * @generated from protobuf field: proto.models.CoreServer server = 2;
425
+ */
426
+ server?: CoreServer;
427
+ }
428
+ /**
429
+ * -- Other Responses --/
430
+ *
431
+ * @generated from protobuf message proto.packets.Response.Connect
432
+ */
433
+ export interface Response_Connect {
434
+ /**
435
+ * @generated from protobuf field: proto.models.State state = 1;
436
+ */
437
+ state?: State;
438
+ /**
439
+ * @generated from protobuf field: int32 server_version = 2;
440
+ */
441
+ serverVersion: number;
442
+ /**
443
+ * @generated from protobuf field: string message = 3;
444
+ */
445
+ message: string;
446
+ /**
447
+ * @generated from protobuf field: proto.packets.Response.Connect.ConnectFailReason reason = 4;
448
+ */
449
+ reason: Response_Connect_ConnectFailReason;
450
+ }
451
+ /**
452
+ * @generated from protobuf enum proto.packets.Response.Connect.ConnectFailReason
453
+ */
454
+ export enum Response_Connect_ConnectFailReason {
455
+ /**
456
+ * @generated from protobuf enum value: IncorrectVersion = 0;
457
+ */
458
+ IncorrectVersion = 0
459
+ }
460
+ /**
461
+ * @generated from protobuf message proto.packets.Response.Join
462
+ */
463
+ export interface Response_Join {
464
+ /**
465
+ * @generated from protobuf field: proto.models.State state = 1;
466
+ */
467
+ state?: State;
468
+ /**
469
+ * @generated from protobuf field: string self_guid = 2;
470
+ */
471
+ selfGuid: string;
472
+ /**
473
+ * @generated from protobuf field: string tournament_id = 3;
474
+ */
475
+ tournamentId: string;
476
+ /**
477
+ * @generated from protobuf field: string message = 4;
478
+ */
479
+ message: string;
480
+ /**
481
+ * @generated from protobuf field: proto.packets.Response.Join.JoinFailReason reason = 5;
482
+ */
483
+ reason: Response_Join_JoinFailReason;
484
+ }
485
+ /**
486
+ * @generated from protobuf enum proto.packets.Response.Join.JoinFailReason
487
+ */
488
+ export enum Response_Join_JoinFailReason {
489
+ /**
490
+ * @generated from protobuf enum value: IncorrectPassword = 0;
491
+ */
492
+ IncorrectPassword = 0
493
+ }
494
+ /**
495
+ * @generated from protobuf message proto.packets.Response.LeaderboardEntries
496
+ */
497
+ export interface Response_LeaderboardEntries {
498
+ /**
499
+ * @generated from protobuf field: repeated proto.models.LeaderboardEntry scores = 1;
500
+ */
501
+ scores: LeaderboardEntry[];
502
+ }
503
+ /**
504
+ * @generated from protobuf message proto.packets.Response.LoadSong
505
+ */
506
+ export interface Response_LoadSong {
507
+ /**
508
+ * @generated from protobuf field: string level_id = 1;
509
+ */
510
+ levelId: string;
511
+ }
512
+ /**
513
+ * @generated from protobuf message proto.packets.Response.PreloadImageForStreamSync
514
+ */
515
+ export interface Response_PreloadImageForStreamSync {
516
+ /**
517
+ * @generated from protobuf field: string file_id = 1;
518
+ */
519
+ fileId: string;
520
+ }
521
+ /**
522
+ * @generated from protobuf message proto.packets.Response.ShowModal
523
+ */
524
+ export interface Response_ShowModal {
525
+ /**
526
+ * @generated from protobuf field: string modal_id = 1;
527
+ */
528
+ modalId: string;
529
+ /**
530
+ * @generated from protobuf field: string value = 2;
531
+ */
532
+ value: string;
533
+ }
534
+ /**
535
+ * @generated from protobuf message proto.packets.Response.RemainingAttempts
536
+ */
537
+ export interface Response_RemainingAttempts {
538
+ /**
539
+ * @generated from protobuf field: int32 remaining_attempts = 1;
540
+ */
541
+ remainingAttempts: number;
542
+ }
543
+ /**
544
+ * @generated from protobuf enum proto.packets.Response.ResponseType
545
+ */
546
+ export enum Response_ResponseType {
547
+ /**
548
+ * @generated from protobuf enum value: Fail = 0;
549
+ */
550
+ Fail = 0,
551
+ /**
552
+ * @generated from protobuf enum value: Success = 1;
553
+ */
554
+ Success = 1
555
+ }
556
+ // @generated message type with reflection information, may provide speed optimized methods
557
+ class Response$Type extends MessageType<Response> {
558
+ constructor() {
559
+ super("proto.packets.Response", [
560
+ { no: 1, name: "type", kind: "enum", T: () => ["proto.packets.Response.ResponseType", Response_ResponseType] },
561
+ { no: 2, name: "responding_to_packet_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
562
+ { no: 3, name: "update_user", kind: "message", oneof: "details", T: () => Response_UpdateUser },
563
+ { no: 4, name: "create_match", kind: "message", oneof: "details", T: () => Response_CreateMatch },
564
+ { no: 5, name: "update_match", kind: "message", oneof: "details", T: () => Response_UpdateMatch },
565
+ { no: 6, name: "delete_match", kind: "message", oneof: "details", T: () => Response_DeleteMatch },
566
+ { no: 7, name: "create_qualifier_event", kind: "message", oneof: "details", T: () => Response_CreateQualifierEvent },
567
+ { no: 8, name: "update_qualifier_event", kind: "message", oneof: "details", T: () => Response_UpdateQualifierEvent },
568
+ { no: 9, name: "delete_qualifier_event", kind: "message", oneof: "details", T: () => Response_DeleteQualifierEvent },
569
+ { no: 21, name: "add_authorized_user", kind: "message", oneof: "details", T: () => Response_AddAuthorizedUser },
570
+ { no: 22, name: "update_authorized_user", kind: "message", oneof: "details", T: () => Response_UpdateAuthorizedUser },
571
+ { no: 23, name: "remove_authorized_user", kind: "message", oneof: "details", T: () => Response_RemoveAuthorizedUser },
572
+ { no: 24, name: "get_authorized_users", kind: "message", oneof: "details", T: () => Response_GetAuthorizedUsers },
573
+ { no: 25, name: "get_discord_info", kind: "message", oneof: "details", T: () => Response_GetDiscordInfo },
574
+ { no: 10, name: "create_tournament", kind: "message", oneof: "details", T: () => Response_CreateTournament },
575
+ { no: 11, name: "update_tournament", kind: "message", oneof: "details", T: () => Response_UpdateTournament },
576
+ { no: 12, name: "delete_tournament", kind: "message", oneof: "details", T: () => Response_DeleteTournament },
577
+ { no: 13, name: "add_server", kind: "message", oneof: "details", T: () => Response_AddServer },
578
+ { no: 14, name: "connect", kind: "message", oneof: "details", T: () => Response_Connect },
579
+ { no: 15, name: "join", kind: "message", oneof: "details", T: () => Response_Join },
580
+ { no: 16, name: "leaderboard_entries", kind: "message", oneof: "details", T: () => Response_LeaderboardEntries },
581
+ { no: 17, name: "load_song", kind: "message", oneof: "details", T: () => Response_LoadSong },
582
+ { no: 18, name: "preload_image_for_stream_sync", kind: "message", oneof: "details", T: () => Response_PreloadImageForStreamSync },
583
+ { no: 19, name: "show_modal", kind: "message", oneof: "details", T: () => Response_ShowModal },
584
+ { no: 20, name: "remaining_attempts", kind: "message", oneof: "details", T: () => Response_RemainingAttempts }
585
+ ]);
586
+ }
587
+ create(value?: PartialMessage<Response>): Response {
588
+ const message = { type: 0, respondingToPacketId: "", details: { oneofKind: undefined } };
589
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
590
+ if (value !== undefined)
591
+ reflectionMergePartial<Response>(this, message, value);
592
+ return message;
593
+ }
594
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Response): Response {
595
+ let message = target ?? this.create(), end = reader.pos + length;
596
+ while (reader.pos < end) {
597
+ let [fieldNo, wireType] = reader.tag();
598
+ switch (fieldNo) {
599
+ case /* proto.packets.Response.ResponseType type */ 1:
600
+ message.type = reader.int32();
601
+ break;
602
+ case /* string responding_to_packet_id */ 2:
603
+ message.respondingToPacketId = reader.string();
604
+ break;
605
+ case /* proto.packets.Response.UpdateUser update_user */ 3:
606
+ message.details = {
607
+ oneofKind: "updateUser",
608
+ updateUser: Response_UpdateUser.internalBinaryRead(reader, reader.uint32(), options, (message.details as any).updateUser)
609
+ };
610
+ break;
611
+ case /* proto.packets.Response.CreateMatch create_match */ 4:
612
+ message.details = {
613
+ oneofKind: "createMatch",
614
+ createMatch: Response_CreateMatch.internalBinaryRead(reader, reader.uint32(), options, (message.details as any).createMatch)
615
+ };
616
+ break;
617
+ case /* proto.packets.Response.UpdateMatch update_match */ 5:
618
+ message.details = {
619
+ oneofKind: "updateMatch",
620
+ updateMatch: Response_UpdateMatch.internalBinaryRead(reader, reader.uint32(), options, (message.details as any).updateMatch)
621
+ };
622
+ break;
623
+ case /* proto.packets.Response.DeleteMatch delete_match */ 6:
624
+ message.details = {
625
+ oneofKind: "deleteMatch",
626
+ deleteMatch: Response_DeleteMatch.internalBinaryRead(reader, reader.uint32(), options, (message.details as any).deleteMatch)
627
+ };
628
+ break;
629
+ case /* proto.packets.Response.CreateQualifierEvent create_qualifier_event */ 7:
630
+ message.details = {
631
+ oneofKind: "createQualifierEvent",
632
+ createQualifierEvent: Response_CreateQualifierEvent.internalBinaryRead(reader, reader.uint32(), options, (message.details as any).createQualifierEvent)
633
+ };
634
+ break;
635
+ case /* proto.packets.Response.UpdateQualifierEvent update_qualifier_event */ 8:
636
+ message.details = {
637
+ oneofKind: "updateQualifierEvent",
638
+ updateQualifierEvent: Response_UpdateQualifierEvent.internalBinaryRead(reader, reader.uint32(), options, (message.details as any).updateQualifierEvent)
639
+ };
640
+ break;
641
+ case /* proto.packets.Response.DeleteQualifierEvent delete_qualifier_event */ 9:
642
+ message.details = {
643
+ oneofKind: "deleteQualifierEvent",
644
+ deleteQualifierEvent: Response_DeleteQualifierEvent.internalBinaryRead(reader, reader.uint32(), options, (message.details as any).deleteQualifierEvent)
645
+ };
646
+ break;
647
+ case /* proto.packets.Response.AddAuthorizedUser add_authorized_user */ 21:
648
+ message.details = {
649
+ oneofKind: "addAuthorizedUser",
650
+ addAuthorizedUser: Response_AddAuthorizedUser.internalBinaryRead(reader, reader.uint32(), options, (message.details as any).addAuthorizedUser)
651
+ };
652
+ break;
653
+ case /* proto.packets.Response.UpdateAuthorizedUser update_authorized_user */ 22:
654
+ message.details = {
655
+ oneofKind: "updateAuthorizedUser",
656
+ updateAuthorizedUser: Response_UpdateAuthorizedUser.internalBinaryRead(reader, reader.uint32(), options, (message.details as any).updateAuthorizedUser)
657
+ };
658
+ break;
659
+ case /* proto.packets.Response.RemoveAuthorizedUser remove_authorized_user */ 23:
660
+ message.details = {
661
+ oneofKind: "removeAuthorizedUser",
662
+ removeAuthorizedUser: Response_RemoveAuthorizedUser.internalBinaryRead(reader, reader.uint32(), options, (message.details as any).removeAuthorizedUser)
663
+ };
664
+ break;
665
+ case /* proto.packets.Response.GetAuthorizedUsers get_authorized_users */ 24:
666
+ message.details = {
667
+ oneofKind: "getAuthorizedUsers",
668
+ getAuthorizedUsers: Response_GetAuthorizedUsers.internalBinaryRead(reader, reader.uint32(), options, (message.details as any).getAuthorizedUsers)
669
+ };
670
+ break;
671
+ case /* proto.packets.Response.GetDiscordInfo get_discord_info */ 25:
672
+ message.details = {
673
+ oneofKind: "getDiscordInfo",
674
+ getDiscordInfo: Response_GetDiscordInfo.internalBinaryRead(reader, reader.uint32(), options, (message.details as any).getDiscordInfo)
675
+ };
676
+ break;
677
+ case /* proto.packets.Response.CreateTournament create_tournament */ 10:
678
+ message.details = {
679
+ oneofKind: "createTournament",
680
+ createTournament: Response_CreateTournament.internalBinaryRead(reader, reader.uint32(), options, (message.details as any).createTournament)
681
+ };
682
+ break;
683
+ case /* proto.packets.Response.UpdateTournament update_tournament */ 11:
684
+ message.details = {
685
+ oneofKind: "updateTournament",
686
+ updateTournament: Response_UpdateTournament.internalBinaryRead(reader, reader.uint32(), options, (message.details as any).updateTournament)
687
+ };
688
+ break;
689
+ case /* proto.packets.Response.DeleteTournament delete_tournament */ 12:
690
+ message.details = {
691
+ oneofKind: "deleteTournament",
692
+ deleteTournament: Response_DeleteTournament.internalBinaryRead(reader, reader.uint32(), options, (message.details as any).deleteTournament)
693
+ };
694
+ break;
695
+ case /* proto.packets.Response.AddServer add_server */ 13:
696
+ message.details = {
697
+ oneofKind: "addServer",
698
+ addServer: Response_AddServer.internalBinaryRead(reader, reader.uint32(), options, (message.details as any).addServer)
699
+ };
700
+ break;
701
+ case /* proto.packets.Response.Connect connect */ 14:
702
+ message.details = {
703
+ oneofKind: "connect",
704
+ connect: Response_Connect.internalBinaryRead(reader, reader.uint32(), options, (message.details as any).connect)
705
+ };
706
+ break;
707
+ case /* proto.packets.Response.Join join */ 15:
708
+ message.details = {
709
+ oneofKind: "join",
710
+ join: Response_Join.internalBinaryRead(reader, reader.uint32(), options, (message.details as any).join)
711
+ };
712
+ break;
713
+ case /* proto.packets.Response.LeaderboardEntries leaderboard_entries */ 16:
714
+ message.details = {
715
+ oneofKind: "leaderboardEntries",
716
+ leaderboardEntries: Response_LeaderboardEntries.internalBinaryRead(reader, reader.uint32(), options, (message.details as any).leaderboardEntries)
717
+ };
718
+ break;
719
+ case /* proto.packets.Response.LoadSong load_song */ 17:
720
+ message.details = {
721
+ oneofKind: "loadSong",
722
+ loadSong: Response_LoadSong.internalBinaryRead(reader, reader.uint32(), options, (message.details as any).loadSong)
723
+ };
724
+ break;
725
+ case /* proto.packets.Response.PreloadImageForStreamSync preload_image_for_stream_sync */ 18:
726
+ message.details = {
727
+ oneofKind: "preloadImageForStreamSync",
728
+ preloadImageForStreamSync: Response_PreloadImageForStreamSync.internalBinaryRead(reader, reader.uint32(), options, (message.details as any).preloadImageForStreamSync)
729
+ };
730
+ break;
731
+ case /* proto.packets.Response.ShowModal show_modal */ 19:
732
+ message.details = {
733
+ oneofKind: "showModal",
734
+ showModal: Response_ShowModal.internalBinaryRead(reader, reader.uint32(), options, (message.details as any).showModal)
735
+ };
736
+ break;
737
+ case /* proto.packets.Response.RemainingAttempts remaining_attempts */ 20:
738
+ message.details = {
739
+ oneofKind: "remainingAttempts",
740
+ remainingAttempts: Response_RemainingAttempts.internalBinaryRead(reader, reader.uint32(), options, (message.details as any).remainingAttempts)
741
+ };
742
+ break;
743
+ default:
744
+ let u = options.readUnknownField;
745
+ if (u === "throw")
746
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
747
+ let d = reader.skip(wireType);
748
+ if (u !== false)
749
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
750
+ }
751
+ }
752
+ return message;
753
+ }
754
+ internalBinaryWrite(message: Response, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
755
+ /* proto.packets.Response.ResponseType type = 1; */
756
+ if (message.type !== 0)
757
+ writer.tag(1, WireType.Varint).int32(message.type);
758
+ /* string responding_to_packet_id = 2; */
759
+ if (message.respondingToPacketId !== "")
760
+ writer.tag(2, WireType.LengthDelimited).string(message.respondingToPacketId);
761
+ /* proto.packets.Response.UpdateUser update_user = 3; */
762
+ if (message.details.oneofKind === "updateUser")
763
+ Response_UpdateUser.internalBinaryWrite(message.details.updateUser, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
764
+ /* proto.packets.Response.CreateMatch create_match = 4; */
765
+ if (message.details.oneofKind === "createMatch")
766
+ Response_CreateMatch.internalBinaryWrite(message.details.createMatch, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
767
+ /* proto.packets.Response.UpdateMatch update_match = 5; */
768
+ if (message.details.oneofKind === "updateMatch")
769
+ Response_UpdateMatch.internalBinaryWrite(message.details.updateMatch, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
770
+ /* proto.packets.Response.DeleteMatch delete_match = 6; */
771
+ if (message.details.oneofKind === "deleteMatch")
772
+ Response_DeleteMatch.internalBinaryWrite(message.details.deleteMatch, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
773
+ /* proto.packets.Response.CreateQualifierEvent create_qualifier_event = 7; */
774
+ if (message.details.oneofKind === "createQualifierEvent")
775
+ Response_CreateQualifierEvent.internalBinaryWrite(message.details.createQualifierEvent, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
776
+ /* proto.packets.Response.UpdateQualifierEvent update_qualifier_event = 8; */
777
+ if (message.details.oneofKind === "updateQualifierEvent")
778
+ Response_UpdateQualifierEvent.internalBinaryWrite(message.details.updateQualifierEvent, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
779
+ /* proto.packets.Response.DeleteQualifierEvent delete_qualifier_event = 9; */
780
+ if (message.details.oneofKind === "deleteQualifierEvent")
781
+ Response_DeleteQualifierEvent.internalBinaryWrite(message.details.deleteQualifierEvent, writer.tag(9, WireType.LengthDelimited).fork(), options).join();
782
+ /* proto.packets.Response.AddAuthorizedUser add_authorized_user = 21; */
783
+ if (message.details.oneofKind === "addAuthorizedUser")
784
+ Response_AddAuthorizedUser.internalBinaryWrite(message.details.addAuthorizedUser, writer.tag(21, WireType.LengthDelimited).fork(), options).join();
785
+ /* proto.packets.Response.UpdateAuthorizedUser update_authorized_user = 22; */
786
+ if (message.details.oneofKind === "updateAuthorizedUser")
787
+ Response_UpdateAuthorizedUser.internalBinaryWrite(message.details.updateAuthorizedUser, writer.tag(22, WireType.LengthDelimited).fork(), options).join();
788
+ /* proto.packets.Response.RemoveAuthorizedUser remove_authorized_user = 23; */
789
+ if (message.details.oneofKind === "removeAuthorizedUser")
790
+ Response_RemoveAuthorizedUser.internalBinaryWrite(message.details.removeAuthorizedUser, writer.tag(23, WireType.LengthDelimited).fork(), options).join();
791
+ /* proto.packets.Response.GetAuthorizedUsers get_authorized_users = 24; */
792
+ if (message.details.oneofKind === "getAuthorizedUsers")
793
+ Response_GetAuthorizedUsers.internalBinaryWrite(message.details.getAuthorizedUsers, writer.tag(24, WireType.LengthDelimited).fork(), options).join();
794
+ /* proto.packets.Response.GetDiscordInfo get_discord_info = 25; */
795
+ if (message.details.oneofKind === "getDiscordInfo")
796
+ Response_GetDiscordInfo.internalBinaryWrite(message.details.getDiscordInfo, writer.tag(25, WireType.LengthDelimited).fork(), options).join();
797
+ /* proto.packets.Response.CreateTournament create_tournament = 10; */
798
+ if (message.details.oneofKind === "createTournament")
799
+ Response_CreateTournament.internalBinaryWrite(message.details.createTournament, writer.tag(10, WireType.LengthDelimited).fork(), options).join();
800
+ /* proto.packets.Response.UpdateTournament update_tournament = 11; */
801
+ if (message.details.oneofKind === "updateTournament")
802
+ Response_UpdateTournament.internalBinaryWrite(message.details.updateTournament, writer.tag(11, WireType.LengthDelimited).fork(), options).join();
803
+ /* proto.packets.Response.DeleteTournament delete_tournament = 12; */
804
+ if (message.details.oneofKind === "deleteTournament")
805
+ Response_DeleteTournament.internalBinaryWrite(message.details.deleteTournament, writer.tag(12, WireType.LengthDelimited).fork(), options).join();
806
+ /* proto.packets.Response.AddServer add_server = 13; */
807
+ if (message.details.oneofKind === "addServer")
808
+ Response_AddServer.internalBinaryWrite(message.details.addServer, writer.tag(13, WireType.LengthDelimited).fork(), options).join();
809
+ /* proto.packets.Response.Connect connect = 14; */
810
+ if (message.details.oneofKind === "connect")
811
+ Response_Connect.internalBinaryWrite(message.details.connect, writer.tag(14, WireType.LengthDelimited).fork(), options).join();
812
+ /* proto.packets.Response.Join join = 15; */
813
+ if (message.details.oneofKind === "join")
814
+ Response_Join.internalBinaryWrite(message.details.join, writer.tag(15, WireType.LengthDelimited).fork(), options).join();
815
+ /* proto.packets.Response.LeaderboardEntries leaderboard_entries = 16; */
816
+ if (message.details.oneofKind === "leaderboardEntries")
817
+ Response_LeaderboardEntries.internalBinaryWrite(message.details.leaderboardEntries, writer.tag(16, WireType.LengthDelimited).fork(), options).join();
818
+ /* proto.packets.Response.LoadSong load_song = 17; */
819
+ if (message.details.oneofKind === "loadSong")
820
+ Response_LoadSong.internalBinaryWrite(message.details.loadSong, writer.tag(17, WireType.LengthDelimited).fork(), options).join();
821
+ /* proto.packets.Response.PreloadImageForStreamSync preload_image_for_stream_sync = 18; */
822
+ if (message.details.oneofKind === "preloadImageForStreamSync")
823
+ Response_PreloadImageForStreamSync.internalBinaryWrite(message.details.preloadImageForStreamSync, writer.tag(18, WireType.LengthDelimited).fork(), options).join();
824
+ /* proto.packets.Response.ShowModal show_modal = 19; */
825
+ if (message.details.oneofKind === "showModal")
826
+ Response_ShowModal.internalBinaryWrite(message.details.showModal, writer.tag(19, WireType.LengthDelimited).fork(), options).join();
827
+ /* proto.packets.Response.RemainingAttempts remaining_attempts = 20; */
828
+ if (message.details.oneofKind === "remainingAttempts")
829
+ Response_RemainingAttempts.internalBinaryWrite(message.details.remainingAttempts, writer.tag(20, WireType.LengthDelimited).fork(), options).join();
830
+ let u = options.writeUnknownFields;
831
+ if (u !== false)
832
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
833
+ return writer;
834
+ }
835
+ }
836
+ /**
837
+ * @generated MessageType for protobuf message proto.packets.Response
838
+ */
839
+ export const Response = new Response$Type();
840
+ // @generated message type with reflection information, may provide speed optimized methods
841
+ class Response_UpdateUser$Type extends MessageType<Response_UpdateUser> {
842
+ constructor() {
843
+ super("proto.packets.Response.UpdateUser", [
844
+ { no: 1, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
845
+ { no: 2, name: "user", kind: "message", T: () => User }
846
+ ]);
847
+ }
848
+ create(value?: PartialMessage<Response_UpdateUser>): Response_UpdateUser {
849
+ const message = { message: "" };
850
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
851
+ if (value !== undefined)
852
+ reflectionMergePartial<Response_UpdateUser>(this, message, value);
853
+ return message;
854
+ }
855
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Response_UpdateUser): Response_UpdateUser {
856
+ let message = target ?? this.create(), end = reader.pos + length;
857
+ while (reader.pos < end) {
858
+ let [fieldNo, wireType] = reader.tag();
859
+ switch (fieldNo) {
860
+ case /* string message */ 1:
861
+ message.message = reader.string();
862
+ break;
863
+ case /* proto.models.User user */ 2:
864
+ message.user = User.internalBinaryRead(reader, reader.uint32(), options, message.user);
865
+ break;
866
+ default:
867
+ let u = options.readUnknownField;
868
+ if (u === "throw")
869
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
870
+ let d = reader.skip(wireType);
871
+ if (u !== false)
872
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
873
+ }
874
+ }
875
+ return message;
876
+ }
877
+ internalBinaryWrite(message: Response_UpdateUser, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
878
+ /* string message = 1; */
879
+ if (message.message !== "")
880
+ writer.tag(1, WireType.LengthDelimited).string(message.message);
881
+ /* proto.models.User user = 2; */
882
+ if (message.user)
883
+ User.internalBinaryWrite(message.user, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
884
+ let u = options.writeUnknownFields;
885
+ if (u !== false)
886
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
887
+ return writer;
888
+ }
889
+ }
890
+ /**
891
+ * @generated MessageType for protobuf message proto.packets.Response.UpdateUser
892
+ */
893
+ export const Response_UpdateUser = new Response_UpdateUser$Type();
894
+ // @generated message type with reflection information, may provide speed optimized methods
895
+ class Response_CreateMatch$Type extends MessageType<Response_CreateMatch> {
896
+ constructor() {
897
+ super("proto.packets.Response.CreateMatch", [
898
+ { no: 1, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
899
+ { no: 2, name: "match", kind: "message", T: () => Match }
900
+ ]);
901
+ }
902
+ create(value?: PartialMessage<Response_CreateMatch>): Response_CreateMatch {
903
+ const message = { message: "" };
904
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
905
+ if (value !== undefined)
906
+ reflectionMergePartial<Response_CreateMatch>(this, message, value);
907
+ return message;
908
+ }
909
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Response_CreateMatch): Response_CreateMatch {
910
+ let message = target ?? this.create(), end = reader.pos + length;
911
+ while (reader.pos < end) {
912
+ let [fieldNo, wireType] = reader.tag();
913
+ switch (fieldNo) {
914
+ case /* string message */ 1:
915
+ message.message = reader.string();
916
+ break;
917
+ case /* proto.models.Match match */ 2:
918
+ message.match = Match.internalBinaryRead(reader, reader.uint32(), options, message.match);
919
+ break;
920
+ default:
921
+ let u = options.readUnknownField;
922
+ if (u === "throw")
923
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
924
+ let d = reader.skip(wireType);
925
+ if (u !== false)
926
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
927
+ }
928
+ }
929
+ return message;
930
+ }
931
+ internalBinaryWrite(message: Response_CreateMatch, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
932
+ /* string message = 1; */
933
+ if (message.message !== "")
934
+ writer.tag(1, WireType.LengthDelimited).string(message.message);
935
+ /* proto.models.Match match = 2; */
936
+ if (message.match)
937
+ Match.internalBinaryWrite(message.match, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
938
+ let u = options.writeUnknownFields;
939
+ if (u !== false)
940
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
941
+ return writer;
942
+ }
943
+ }
944
+ /**
945
+ * @generated MessageType for protobuf message proto.packets.Response.CreateMatch
946
+ */
947
+ export const Response_CreateMatch = new Response_CreateMatch$Type();
948
+ // @generated message type with reflection information, may provide speed optimized methods
949
+ class Response_UpdateMatch$Type extends MessageType<Response_UpdateMatch> {
950
+ constructor() {
951
+ super("proto.packets.Response.UpdateMatch", [
952
+ { no: 1, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
953
+ { no: 2, name: "match", kind: "message", T: () => Match }
954
+ ]);
955
+ }
956
+ create(value?: PartialMessage<Response_UpdateMatch>): Response_UpdateMatch {
957
+ const message = { message: "" };
958
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
959
+ if (value !== undefined)
960
+ reflectionMergePartial<Response_UpdateMatch>(this, message, value);
961
+ return message;
962
+ }
963
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Response_UpdateMatch): Response_UpdateMatch {
964
+ let message = target ?? this.create(), end = reader.pos + length;
965
+ while (reader.pos < end) {
966
+ let [fieldNo, wireType] = reader.tag();
967
+ switch (fieldNo) {
968
+ case /* string message */ 1:
969
+ message.message = reader.string();
970
+ break;
971
+ case /* proto.models.Match match */ 2:
972
+ message.match = Match.internalBinaryRead(reader, reader.uint32(), options, message.match);
973
+ break;
974
+ default:
975
+ let u = options.readUnknownField;
976
+ if (u === "throw")
977
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
978
+ let d = reader.skip(wireType);
979
+ if (u !== false)
980
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
981
+ }
982
+ }
983
+ return message;
984
+ }
985
+ internalBinaryWrite(message: Response_UpdateMatch, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
986
+ /* string message = 1; */
987
+ if (message.message !== "")
988
+ writer.tag(1, WireType.LengthDelimited).string(message.message);
989
+ /* proto.models.Match match = 2; */
990
+ if (message.match)
991
+ Match.internalBinaryWrite(message.match, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
992
+ let u = options.writeUnknownFields;
993
+ if (u !== false)
994
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
995
+ return writer;
996
+ }
997
+ }
998
+ /**
999
+ * @generated MessageType for protobuf message proto.packets.Response.UpdateMatch
1000
+ */
1001
+ export const Response_UpdateMatch = new Response_UpdateMatch$Type();
1002
+ // @generated message type with reflection information, may provide speed optimized methods
1003
+ class Response_DeleteMatch$Type extends MessageType<Response_DeleteMatch> {
1004
+ constructor() {
1005
+ super("proto.packets.Response.DeleteMatch", [
1006
+ { no: 1, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1007
+ { no: 2, name: "match", kind: "message", T: () => Match }
1008
+ ]);
1009
+ }
1010
+ create(value?: PartialMessage<Response_DeleteMatch>): Response_DeleteMatch {
1011
+ const message = { message: "" };
1012
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
1013
+ if (value !== undefined)
1014
+ reflectionMergePartial<Response_DeleteMatch>(this, message, value);
1015
+ return message;
1016
+ }
1017
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Response_DeleteMatch): Response_DeleteMatch {
1018
+ let message = target ?? this.create(), end = reader.pos + length;
1019
+ while (reader.pos < end) {
1020
+ let [fieldNo, wireType] = reader.tag();
1021
+ switch (fieldNo) {
1022
+ case /* string message */ 1:
1023
+ message.message = reader.string();
1024
+ break;
1025
+ case /* proto.models.Match match */ 2:
1026
+ message.match = Match.internalBinaryRead(reader, reader.uint32(), options, message.match);
1027
+ break;
1028
+ default:
1029
+ let u = options.readUnknownField;
1030
+ if (u === "throw")
1031
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1032
+ let d = reader.skip(wireType);
1033
+ if (u !== false)
1034
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1035
+ }
1036
+ }
1037
+ return message;
1038
+ }
1039
+ internalBinaryWrite(message: Response_DeleteMatch, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1040
+ /* string message = 1; */
1041
+ if (message.message !== "")
1042
+ writer.tag(1, WireType.LengthDelimited).string(message.message);
1043
+ /* proto.models.Match match = 2; */
1044
+ if (message.match)
1045
+ Match.internalBinaryWrite(message.match, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
1046
+ let u = options.writeUnknownFields;
1047
+ if (u !== false)
1048
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1049
+ return writer;
1050
+ }
1051
+ }
1052
+ /**
1053
+ * @generated MessageType for protobuf message proto.packets.Response.DeleteMatch
1054
+ */
1055
+ export const Response_DeleteMatch = new Response_DeleteMatch$Type();
1056
+ // @generated message type with reflection information, may provide speed optimized methods
1057
+ class Response_CreateQualifierEvent$Type extends MessageType<Response_CreateQualifierEvent> {
1058
+ constructor() {
1059
+ super("proto.packets.Response.CreateQualifierEvent", [
1060
+ { no: 1, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1061
+ { no: 2, name: "qualifier", kind: "message", T: () => QualifierEvent }
1062
+ ]);
1063
+ }
1064
+ create(value?: PartialMessage<Response_CreateQualifierEvent>): Response_CreateQualifierEvent {
1065
+ const message = { message: "" };
1066
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
1067
+ if (value !== undefined)
1068
+ reflectionMergePartial<Response_CreateQualifierEvent>(this, message, value);
1069
+ return message;
1070
+ }
1071
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Response_CreateQualifierEvent): Response_CreateQualifierEvent {
1072
+ let message = target ?? this.create(), end = reader.pos + length;
1073
+ while (reader.pos < end) {
1074
+ let [fieldNo, wireType] = reader.tag();
1075
+ switch (fieldNo) {
1076
+ case /* string message */ 1:
1077
+ message.message = reader.string();
1078
+ break;
1079
+ case /* proto.models.QualifierEvent qualifier */ 2:
1080
+ message.qualifier = QualifierEvent.internalBinaryRead(reader, reader.uint32(), options, message.qualifier);
1081
+ break;
1082
+ default:
1083
+ let u = options.readUnknownField;
1084
+ if (u === "throw")
1085
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1086
+ let d = reader.skip(wireType);
1087
+ if (u !== false)
1088
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1089
+ }
1090
+ }
1091
+ return message;
1092
+ }
1093
+ internalBinaryWrite(message: Response_CreateQualifierEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1094
+ /* string message = 1; */
1095
+ if (message.message !== "")
1096
+ writer.tag(1, WireType.LengthDelimited).string(message.message);
1097
+ /* proto.models.QualifierEvent qualifier = 2; */
1098
+ if (message.qualifier)
1099
+ QualifierEvent.internalBinaryWrite(message.qualifier, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
1100
+ let u = options.writeUnknownFields;
1101
+ if (u !== false)
1102
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1103
+ return writer;
1104
+ }
1105
+ }
1106
+ /**
1107
+ * @generated MessageType for protobuf message proto.packets.Response.CreateQualifierEvent
1108
+ */
1109
+ export const Response_CreateQualifierEvent = new Response_CreateQualifierEvent$Type();
1110
+ // @generated message type with reflection information, may provide speed optimized methods
1111
+ class Response_UpdateQualifierEvent$Type extends MessageType<Response_UpdateQualifierEvent> {
1112
+ constructor() {
1113
+ super("proto.packets.Response.UpdateQualifierEvent", [
1114
+ { no: 1, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1115
+ { no: 2, name: "qualifier", kind: "message", T: () => QualifierEvent }
1116
+ ]);
1117
+ }
1118
+ create(value?: PartialMessage<Response_UpdateQualifierEvent>): Response_UpdateQualifierEvent {
1119
+ const message = { message: "" };
1120
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
1121
+ if (value !== undefined)
1122
+ reflectionMergePartial<Response_UpdateQualifierEvent>(this, message, value);
1123
+ return message;
1124
+ }
1125
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Response_UpdateQualifierEvent): Response_UpdateQualifierEvent {
1126
+ let message = target ?? this.create(), end = reader.pos + length;
1127
+ while (reader.pos < end) {
1128
+ let [fieldNo, wireType] = reader.tag();
1129
+ switch (fieldNo) {
1130
+ case /* string message */ 1:
1131
+ message.message = reader.string();
1132
+ break;
1133
+ case /* proto.models.QualifierEvent qualifier */ 2:
1134
+ message.qualifier = QualifierEvent.internalBinaryRead(reader, reader.uint32(), options, message.qualifier);
1135
+ break;
1136
+ default:
1137
+ let u = options.readUnknownField;
1138
+ if (u === "throw")
1139
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1140
+ let d = reader.skip(wireType);
1141
+ if (u !== false)
1142
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1143
+ }
1144
+ }
1145
+ return message;
1146
+ }
1147
+ internalBinaryWrite(message: Response_UpdateQualifierEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1148
+ /* string message = 1; */
1149
+ if (message.message !== "")
1150
+ writer.tag(1, WireType.LengthDelimited).string(message.message);
1151
+ /* proto.models.QualifierEvent qualifier = 2; */
1152
+ if (message.qualifier)
1153
+ QualifierEvent.internalBinaryWrite(message.qualifier, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
1154
+ let u = options.writeUnknownFields;
1155
+ if (u !== false)
1156
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1157
+ return writer;
1158
+ }
1159
+ }
1160
+ /**
1161
+ * @generated MessageType for protobuf message proto.packets.Response.UpdateQualifierEvent
1162
+ */
1163
+ export const Response_UpdateQualifierEvent = new Response_UpdateQualifierEvent$Type();
1164
+ // @generated message type with reflection information, may provide speed optimized methods
1165
+ class Response_DeleteQualifierEvent$Type extends MessageType<Response_DeleteQualifierEvent> {
1166
+ constructor() {
1167
+ super("proto.packets.Response.DeleteQualifierEvent", [
1168
+ { no: 1, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1169
+ { no: 2, name: "qualifier", kind: "message", T: () => QualifierEvent }
1170
+ ]);
1171
+ }
1172
+ create(value?: PartialMessage<Response_DeleteQualifierEvent>): Response_DeleteQualifierEvent {
1173
+ const message = { message: "" };
1174
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
1175
+ if (value !== undefined)
1176
+ reflectionMergePartial<Response_DeleteQualifierEvent>(this, message, value);
1177
+ return message;
1178
+ }
1179
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Response_DeleteQualifierEvent): Response_DeleteQualifierEvent {
1180
+ let message = target ?? this.create(), end = reader.pos + length;
1181
+ while (reader.pos < end) {
1182
+ let [fieldNo, wireType] = reader.tag();
1183
+ switch (fieldNo) {
1184
+ case /* string message */ 1:
1185
+ message.message = reader.string();
1186
+ break;
1187
+ case /* proto.models.QualifierEvent qualifier */ 2:
1188
+ message.qualifier = QualifierEvent.internalBinaryRead(reader, reader.uint32(), options, message.qualifier);
1189
+ break;
1190
+ default:
1191
+ let u = options.readUnknownField;
1192
+ if (u === "throw")
1193
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1194
+ let d = reader.skip(wireType);
1195
+ if (u !== false)
1196
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1197
+ }
1198
+ }
1199
+ return message;
1200
+ }
1201
+ internalBinaryWrite(message: Response_DeleteQualifierEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1202
+ /* string message = 1; */
1203
+ if (message.message !== "")
1204
+ writer.tag(1, WireType.LengthDelimited).string(message.message);
1205
+ /* proto.models.QualifierEvent qualifier = 2; */
1206
+ if (message.qualifier)
1207
+ QualifierEvent.internalBinaryWrite(message.qualifier, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
1208
+ let u = options.writeUnknownFields;
1209
+ if (u !== false)
1210
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1211
+ return writer;
1212
+ }
1213
+ }
1214
+ /**
1215
+ * @generated MessageType for protobuf message proto.packets.Response.DeleteQualifierEvent
1216
+ */
1217
+ export const Response_DeleteQualifierEvent = new Response_DeleteQualifierEvent$Type();
1218
+ // @generated message type with reflection information, may provide speed optimized methods
1219
+ class Response_AddAuthorizedUser$Type extends MessageType<Response_AddAuthorizedUser> {
1220
+ constructor() {
1221
+ super("proto.packets.Response.AddAuthorizedUser", [
1222
+ { no: 1, name: "tournament_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1223
+ { no: 2, name: "discord_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1224
+ { no: 3, name: "permission_flags", kind: "enum", T: () => ["proto.models.Permissions", Permissions] }
1225
+ ]);
1226
+ }
1227
+ create(value?: PartialMessage<Response_AddAuthorizedUser>): Response_AddAuthorizedUser {
1228
+ const message = { tournamentId: "", discordId: "", permissionFlags: 0 };
1229
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
1230
+ if (value !== undefined)
1231
+ reflectionMergePartial<Response_AddAuthorizedUser>(this, message, value);
1232
+ return message;
1233
+ }
1234
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Response_AddAuthorizedUser): Response_AddAuthorizedUser {
1235
+ let message = target ?? this.create(), end = reader.pos + length;
1236
+ while (reader.pos < end) {
1237
+ let [fieldNo, wireType] = reader.tag();
1238
+ switch (fieldNo) {
1239
+ case /* string tournament_id */ 1:
1240
+ message.tournamentId = reader.string();
1241
+ break;
1242
+ case /* string discord_id */ 2:
1243
+ message.discordId = reader.string();
1244
+ break;
1245
+ case /* proto.models.Permissions permission_flags */ 3:
1246
+ message.permissionFlags = reader.int32();
1247
+ break;
1248
+ default:
1249
+ let u = options.readUnknownField;
1250
+ if (u === "throw")
1251
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1252
+ let d = reader.skip(wireType);
1253
+ if (u !== false)
1254
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1255
+ }
1256
+ }
1257
+ return message;
1258
+ }
1259
+ internalBinaryWrite(message: Response_AddAuthorizedUser, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1260
+ /* string tournament_id = 1; */
1261
+ if (message.tournamentId !== "")
1262
+ writer.tag(1, WireType.LengthDelimited).string(message.tournamentId);
1263
+ /* string discord_id = 2; */
1264
+ if (message.discordId !== "")
1265
+ writer.tag(2, WireType.LengthDelimited).string(message.discordId);
1266
+ /* proto.models.Permissions permission_flags = 3; */
1267
+ if (message.permissionFlags !== 0)
1268
+ writer.tag(3, WireType.Varint).int32(message.permissionFlags);
1269
+ let u = options.writeUnknownFields;
1270
+ if (u !== false)
1271
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1272
+ return writer;
1273
+ }
1274
+ }
1275
+ /**
1276
+ * @generated MessageType for protobuf message proto.packets.Response.AddAuthorizedUser
1277
+ */
1278
+ export const Response_AddAuthorizedUser = new Response_AddAuthorizedUser$Type();
1279
+ // @generated message type with reflection information, may provide speed optimized methods
1280
+ class Response_UpdateAuthorizedUser$Type extends MessageType<Response_UpdateAuthorizedUser> {
1281
+ constructor() {
1282
+ super("proto.packets.Response.UpdateAuthorizedUser", [
1283
+ { no: 1, name: "tournament_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1284
+ { no: 2, name: "discord_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1285
+ { no: 3, name: "permission_flags", kind: "enum", T: () => ["proto.models.Permissions", Permissions] }
1286
+ ]);
1287
+ }
1288
+ create(value?: PartialMessage<Response_UpdateAuthorizedUser>): Response_UpdateAuthorizedUser {
1289
+ const message = { tournamentId: "", discordId: "", permissionFlags: 0 };
1290
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
1291
+ if (value !== undefined)
1292
+ reflectionMergePartial<Response_UpdateAuthorizedUser>(this, message, value);
1293
+ return message;
1294
+ }
1295
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Response_UpdateAuthorizedUser): Response_UpdateAuthorizedUser {
1296
+ let message = target ?? this.create(), end = reader.pos + length;
1297
+ while (reader.pos < end) {
1298
+ let [fieldNo, wireType] = reader.tag();
1299
+ switch (fieldNo) {
1300
+ case /* string tournament_id */ 1:
1301
+ message.tournamentId = reader.string();
1302
+ break;
1303
+ case /* string discord_id */ 2:
1304
+ message.discordId = reader.string();
1305
+ break;
1306
+ case /* proto.models.Permissions permission_flags */ 3:
1307
+ message.permissionFlags = reader.int32();
1308
+ break;
1309
+ default:
1310
+ let u = options.readUnknownField;
1311
+ if (u === "throw")
1312
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1313
+ let d = reader.skip(wireType);
1314
+ if (u !== false)
1315
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1316
+ }
1317
+ }
1318
+ return message;
1319
+ }
1320
+ internalBinaryWrite(message: Response_UpdateAuthorizedUser, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1321
+ /* string tournament_id = 1; */
1322
+ if (message.tournamentId !== "")
1323
+ writer.tag(1, WireType.LengthDelimited).string(message.tournamentId);
1324
+ /* string discord_id = 2; */
1325
+ if (message.discordId !== "")
1326
+ writer.tag(2, WireType.LengthDelimited).string(message.discordId);
1327
+ /* proto.models.Permissions permission_flags = 3; */
1328
+ if (message.permissionFlags !== 0)
1329
+ writer.tag(3, WireType.Varint).int32(message.permissionFlags);
1330
+ let u = options.writeUnknownFields;
1331
+ if (u !== false)
1332
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1333
+ return writer;
1334
+ }
1335
+ }
1336
+ /**
1337
+ * @generated MessageType for protobuf message proto.packets.Response.UpdateAuthorizedUser
1338
+ */
1339
+ export const Response_UpdateAuthorizedUser = new Response_UpdateAuthorizedUser$Type();
1340
+ // @generated message type with reflection information, may provide speed optimized methods
1341
+ class Response_RemoveAuthorizedUser$Type extends MessageType<Response_RemoveAuthorizedUser> {
1342
+ constructor() {
1343
+ super("proto.packets.Response.RemoveAuthorizedUser", [
1344
+ { no: 1, name: "tournament_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1345
+ { no: 2, name: "discord_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1346
+ { no: 3, name: "permission_flags", kind: "enum", T: () => ["proto.models.Permissions", Permissions] }
1347
+ ]);
1348
+ }
1349
+ create(value?: PartialMessage<Response_RemoveAuthorizedUser>): Response_RemoveAuthorizedUser {
1350
+ const message = { tournamentId: "", discordId: "", permissionFlags: 0 };
1351
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
1352
+ if (value !== undefined)
1353
+ reflectionMergePartial<Response_RemoveAuthorizedUser>(this, message, value);
1354
+ return message;
1355
+ }
1356
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Response_RemoveAuthorizedUser): Response_RemoveAuthorizedUser {
1357
+ let message = target ?? this.create(), end = reader.pos + length;
1358
+ while (reader.pos < end) {
1359
+ let [fieldNo, wireType] = reader.tag();
1360
+ switch (fieldNo) {
1361
+ case /* string tournament_id */ 1:
1362
+ message.tournamentId = reader.string();
1363
+ break;
1364
+ case /* string discord_id */ 2:
1365
+ message.discordId = reader.string();
1366
+ break;
1367
+ case /* proto.models.Permissions permission_flags */ 3:
1368
+ message.permissionFlags = reader.int32();
1369
+ break;
1370
+ default:
1371
+ let u = options.readUnknownField;
1372
+ if (u === "throw")
1373
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1374
+ let d = reader.skip(wireType);
1375
+ if (u !== false)
1376
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1377
+ }
1378
+ }
1379
+ return message;
1380
+ }
1381
+ internalBinaryWrite(message: Response_RemoveAuthorizedUser, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1382
+ /* string tournament_id = 1; */
1383
+ if (message.tournamentId !== "")
1384
+ writer.tag(1, WireType.LengthDelimited).string(message.tournamentId);
1385
+ /* string discord_id = 2; */
1386
+ if (message.discordId !== "")
1387
+ writer.tag(2, WireType.LengthDelimited).string(message.discordId);
1388
+ /* proto.models.Permissions permission_flags = 3; */
1389
+ if (message.permissionFlags !== 0)
1390
+ writer.tag(3, WireType.Varint).int32(message.permissionFlags);
1391
+ let u = options.writeUnknownFields;
1392
+ if (u !== false)
1393
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1394
+ return writer;
1395
+ }
1396
+ }
1397
+ /**
1398
+ * @generated MessageType for protobuf message proto.packets.Response.RemoveAuthorizedUser
1399
+ */
1400
+ export const Response_RemoveAuthorizedUser = new Response_RemoveAuthorizedUser$Type();
1401
+ // @generated message type with reflection information, may provide speed optimized methods
1402
+ class Response_GetAuthorizedUsers$Type extends MessageType<Response_GetAuthorizedUsers> {
1403
+ constructor() {
1404
+ super("proto.packets.Response.GetAuthorizedUsers", [
1405
+ { no: 1, name: "tournament_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1406
+ { no: 2, name: "authorized_users", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Response_GetAuthorizedUsers_AuthroizedUser }
1407
+ ]);
1408
+ }
1409
+ create(value?: PartialMessage<Response_GetAuthorizedUsers>): Response_GetAuthorizedUsers {
1410
+ const message = { tournamentId: "", authorizedUsers: [] };
1411
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
1412
+ if (value !== undefined)
1413
+ reflectionMergePartial<Response_GetAuthorizedUsers>(this, message, value);
1414
+ return message;
1415
+ }
1416
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Response_GetAuthorizedUsers): Response_GetAuthorizedUsers {
1417
+ let message = target ?? this.create(), end = reader.pos + length;
1418
+ while (reader.pos < end) {
1419
+ let [fieldNo, wireType] = reader.tag();
1420
+ switch (fieldNo) {
1421
+ case /* string tournament_id */ 1:
1422
+ message.tournamentId = reader.string();
1423
+ break;
1424
+ case /* repeated proto.packets.Response.GetAuthorizedUsers.AuthroizedUser authorized_users */ 2:
1425
+ message.authorizedUsers.push(Response_GetAuthorizedUsers_AuthroizedUser.internalBinaryRead(reader, reader.uint32(), options));
1426
+ break;
1427
+ default:
1428
+ let u = options.readUnknownField;
1429
+ if (u === "throw")
1430
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1431
+ let d = reader.skip(wireType);
1432
+ if (u !== false)
1433
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1434
+ }
1435
+ }
1436
+ return message;
1437
+ }
1438
+ internalBinaryWrite(message: Response_GetAuthorizedUsers, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1439
+ /* string tournament_id = 1; */
1440
+ if (message.tournamentId !== "")
1441
+ writer.tag(1, WireType.LengthDelimited).string(message.tournamentId);
1442
+ /* repeated proto.packets.Response.GetAuthorizedUsers.AuthroizedUser authorized_users = 2; */
1443
+ for (let i = 0; i < message.authorizedUsers.length; i++)
1444
+ Response_GetAuthorizedUsers_AuthroizedUser.internalBinaryWrite(message.authorizedUsers[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
1445
+ let u = options.writeUnknownFields;
1446
+ if (u !== false)
1447
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1448
+ return writer;
1449
+ }
1450
+ }
1451
+ /**
1452
+ * @generated MessageType for protobuf message proto.packets.Response.GetAuthorizedUsers
1453
+ */
1454
+ export const Response_GetAuthorizedUsers = new Response_GetAuthorizedUsers$Type();
1455
+ // @generated message type with reflection information, may provide speed optimized methods
1456
+ class Response_GetAuthorizedUsers_AuthroizedUser$Type extends MessageType<Response_GetAuthorizedUsers_AuthroizedUser> {
1457
+ constructor() {
1458
+ super("proto.packets.Response.GetAuthorizedUsers.AuthroizedUser", [
1459
+ { no: 1, name: "discord_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1460
+ { no: 2, name: "discord_username", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1461
+ { no: 3, name: "discord_avatar_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1462
+ { no: 4, name: "permission", kind: "enum", T: () => ["proto.models.Permissions", Permissions] }
1463
+ ]);
1464
+ }
1465
+ create(value?: PartialMessage<Response_GetAuthorizedUsers_AuthroizedUser>): Response_GetAuthorizedUsers_AuthroizedUser {
1466
+ const message = { discordId: "", discordUsername: "", discordAvatarUrl: "", permission: 0 };
1467
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
1468
+ if (value !== undefined)
1469
+ reflectionMergePartial<Response_GetAuthorizedUsers_AuthroizedUser>(this, message, value);
1470
+ return message;
1471
+ }
1472
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Response_GetAuthorizedUsers_AuthroizedUser): Response_GetAuthorizedUsers_AuthroizedUser {
1473
+ let message = target ?? this.create(), end = reader.pos + length;
1474
+ while (reader.pos < end) {
1475
+ let [fieldNo, wireType] = reader.tag();
1476
+ switch (fieldNo) {
1477
+ case /* string discord_id */ 1:
1478
+ message.discordId = reader.string();
1479
+ break;
1480
+ case /* string discord_username */ 2:
1481
+ message.discordUsername = reader.string();
1482
+ break;
1483
+ case /* string discord_avatar_url */ 3:
1484
+ message.discordAvatarUrl = reader.string();
1485
+ break;
1486
+ case /* proto.models.Permissions permission */ 4:
1487
+ message.permission = reader.int32();
1488
+ break;
1489
+ default:
1490
+ let u = options.readUnknownField;
1491
+ if (u === "throw")
1492
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1493
+ let d = reader.skip(wireType);
1494
+ if (u !== false)
1495
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1496
+ }
1497
+ }
1498
+ return message;
1499
+ }
1500
+ internalBinaryWrite(message: Response_GetAuthorizedUsers_AuthroizedUser, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1501
+ /* string discord_id = 1; */
1502
+ if (message.discordId !== "")
1503
+ writer.tag(1, WireType.LengthDelimited).string(message.discordId);
1504
+ /* string discord_username = 2; */
1505
+ if (message.discordUsername !== "")
1506
+ writer.tag(2, WireType.LengthDelimited).string(message.discordUsername);
1507
+ /* string discord_avatar_url = 3; */
1508
+ if (message.discordAvatarUrl !== "")
1509
+ writer.tag(3, WireType.LengthDelimited).string(message.discordAvatarUrl);
1510
+ /* proto.models.Permissions permission = 4; */
1511
+ if (message.permission !== 0)
1512
+ writer.tag(4, WireType.Varint).int32(message.permission);
1513
+ let u = options.writeUnknownFields;
1514
+ if (u !== false)
1515
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1516
+ return writer;
1517
+ }
1518
+ }
1519
+ /**
1520
+ * @generated MessageType for protobuf message proto.packets.Response.GetAuthorizedUsers.AuthroizedUser
1521
+ */
1522
+ export const Response_GetAuthorizedUsers_AuthroizedUser = new Response_GetAuthorizedUsers_AuthroizedUser$Type();
1523
+ // @generated message type with reflection information, may provide speed optimized methods
1524
+ class Response_GetDiscordInfo$Type extends MessageType<Response_GetDiscordInfo> {
1525
+ constructor() {
1526
+ super("proto.packets.Response.GetDiscordInfo", [
1527
+ { no: 1, name: "discord_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1528
+ { no: 2, name: "discord_username", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1529
+ { no: 3, name: "discord_avatar_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
1530
+ ]);
1531
+ }
1532
+ create(value?: PartialMessage<Response_GetDiscordInfo>): Response_GetDiscordInfo {
1533
+ const message = { discordId: "", discordUsername: "", discordAvatarUrl: "" };
1534
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
1535
+ if (value !== undefined)
1536
+ reflectionMergePartial<Response_GetDiscordInfo>(this, message, value);
1537
+ return message;
1538
+ }
1539
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Response_GetDiscordInfo): Response_GetDiscordInfo {
1540
+ let message = target ?? this.create(), end = reader.pos + length;
1541
+ while (reader.pos < end) {
1542
+ let [fieldNo, wireType] = reader.tag();
1543
+ switch (fieldNo) {
1544
+ case /* string discord_id */ 1:
1545
+ message.discordId = reader.string();
1546
+ break;
1547
+ case /* string discord_username */ 2:
1548
+ message.discordUsername = reader.string();
1549
+ break;
1550
+ case /* string discord_avatar_url */ 3:
1551
+ message.discordAvatarUrl = reader.string();
1552
+ break;
1553
+ default:
1554
+ let u = options.readUnknownField;
1555
+ if (u === "throw")
1556
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1557
+ let d = reader.skip(wireType);
1558
+ if (u !== false)
1559
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1560
+ }
1561
+ }
1562
+ return message;
1563
+ }
1564
+ internalBinaryWrite(message: Response_GetDiscordInfo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1565
+ /* string discord_id = 1; */
1566
+ if (message.discordId !== "")
1567
+ writer.tag(1, WireType.LengthDelimited).string(message.discordId);
1568
+ /* string discord_username = 2; */
1569
+ if (message.discordUsername !== "")
1570
+ writer.tag(2, WireType.LengthDelimited).string(message.discordUsername);
1571
+ /* string discord_avatar_url = 3; */
1572
+ if (message.discordAvatarUrl !== "")
1573
+ writer.tag(3, WireType.LengthDelimited).string(message.discordAvatarUrl);
1574
+ let u = options.writeUnknownFields;
1575
+ if (u !== false)
1576
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1577
+ return writer;
1578
+ }
1579
+ }
1580
+ /**
1581
+ * @generated MessageType for protobuf message proto.packets.Response.GetDiscordInfo
1582
+ */
1583
+ export const Response_GetDiscordInfo = new Response_GetDiscordInfo$Type();
1584
+ // @generated message type with reflection information, may provide speed optimized methods
1585
+ class Response_CreateTournament$Type extends MessageType<Response_CreateTournament> {
1586
+ constructor() {
1587
+ super("proto.packets.Response.CreateTournament", [
1588
+ { no: 1, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1589
+ { no: 2, name: "tournament", kind: "message", T: () => Tournament }
1590
+ ]);
1591
+ }
1592
+ create(value?: PartialMessage<Response_CreateTournament>): Response_CreateTournament {
1593
+ const message = { message: "" };
1594
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
1595
+ if (value !== undefined)
1596
+ reflectionMergePartial<Response_CreateTournament>(this, message, value);
1597
+ return message;
1598
+ }
1599
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Response_CreateTournament): Response_CreateTournament {
1600
+ let message = target ?? this.create(), end = reader.pos + length;
1601
+ while (reader.pos < end) {
1602
+ let [fieldNo, wireType] = reader.tag();
1603
+ switch (fieldNo) {
1604
+ case /* string message */ 1:
1605
+ message.message = reader.string();
1606
+ break;
1607
+ case /* proto.models.Tournament tournament */ 2:
1608
+ message.tournament = Tournament.internalBinaryRead(reader, reader.uint32(), options, message.tournament);
1609
+ break;
1610
+ default:
1611
+ let u = options.readUnknownField;
1612
+ if (u === "throw")
1613
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1614
+ let d = reader.skip(wireType);
1615
+ if (u !== false)
1616
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1617
+ }
1618
+ }
1619
+ return message;
1620
+ }
1621
+ internalBinaryWrite(message: Response_CreateTournament, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1622
+ /* string message = 1; */
1623
+ if (message.message !== "")
1624
+ writer.tag(1, WireType.LengthDelimited).string(message.message);
1625
+ /* proto.models.Tournament tournament = 2; */
1626
+ if (message.tournament)
1627
+ Tournament.internalBinaryWrite(message.tournament, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
1628
+ let u = options.writeUnknownFields;
1629
+ if (u !== false)
1630
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1631
+ return writer;
1632
+ }
1633
+ }
1634
+ /**
1635
+ * @generated MessageType for protobuf message proto.packets.Response.CreateTournament
1636
+ */
1637
+ export const Response_CreateTournament = new Response_CreateTournament$Type();
1638
+ // @generated message type with reflection information, may provide speed optimized methods
1639
+ class Response_UpdateTournament$Type extends MessageType<Response_UpdateTournament> {
1640
+ constructor() {
1641
+ super("proto.packets.Response.UpdateTournament", [
1642
+ { no: 1, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1643
+ { no: 2, name: "tournament", kind: "message", T: () => Tournament }
1644
+ ]);
1645
+ }
1646
+ create(value?: PartialMessage<Response_UpdateTournament>): Response_UpdateTournament {
1647
+ const message = { message: "" };
1648
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
1649
+ if (value !== undefined)
1650
+ reflectionMergePartial<Response_UpdateTournament>(this, message, value);
1651
+ return message;
1652
+ }
1653
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Response_UpdateTournament): Response_UpdateTournament {
1654
+ let message = target ?? this.create(), end = reader.pos + length;
1655
+ while (reader.pos < end) {
1656
+ let [fieldNo, wireType] = reader.tag();
1657
+ switch (fieldNo) {
1658
+ case /* string message */ 1:
1659
+ message.message = reader.string();
1660
+ break;
1661
+ case /* proto.models.Tournament tournament */ 2:
1662
+ message.tournament = Tournament.internalBinaryRead(reader, reader.uint32(), options, message.tournament);
1663
+ break;
1664
+ default:
1665
+ let u = options.readUnknownField;
1666
+ if (u === "throw")
1667
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1668
+ let d = reader.skip(wireType);
1669
+ if (u !== false)
1670
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1671
+ }
1672
+ }
1673
+ return message;
1674
+ }
1675
+ internalBinaryWrite(message: Response_UpdateTournament, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1676
+ /* string message = 1; */
1677
+ if (message.message !== "")
1678
+ writer.tag(1, WireType.LengthDelimited).string(message.message);
1679
+ /* proto.models.Tournament tournament = 2; */
1680
+ if (message.tournament)
1681
+ Tournament.internalBinaryWrite(message.tournament, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
1682
+ let u = options.writeUnknownFields;
1683
+ if (u !== false)
1684
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1685
+ return writer;
1686
+ }
1687
+ }
1688
+ /**
1689
+ * @generated MessageType for protobuf message proto.packets.Response.UpdateTournament
1690
+ */
1691
+ export const Response_UpdateTournament = new Response_UpdateTournament$Type();
1692
+ // @generated message type with reflection information, may provide speed optimized methods
1693
+ class Response_DeleteTournament$Type extends MessageType<Response_DeleteTournament> {
1694
+ constructor() {
1695
+ super("proto.packets.Response.DeleteTournament", [
1696
+ { no: 1, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1697
+ { no: 2, name: "tournament", kind: "message", T: () => Tournament }
1698
+ ]);
1699
+ }
1700
+ create(value?: PartialMessage<Response_DeleteTournament>): Response_DeleteTournament {
1701
+ const message = { message: "" };
1702
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
1703
+ if (value !== undefined)
1704
+ reflectionMergePartial<Response_DeleteTournament>(this, message, value);
1705
+ return message;
1706
+ }
1707
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Response_DeleteTournament): Response_DeleteTournament {
1708
+ let message = target ?? this.create(), end = reader.pos + length;
1709
+ while (reader.pos < end) {
1710
+ let [fieldNo, wireType] = reader.tag();
1711
+ switch (fieldNo) {
1712
+ case /* string message */ 1:
1713
+ message.message = reader.string();
1714
+ break;
1715
+ case /* proto.models.Tournament tournament */ 2:
1716
+ message.tournament = Tournament.internalBinaryRead(reader, reader.uint32(), options, message.tournament);
1717
+ break;
1718
+ default:
1719
+ let u = options.readUnknownField;
1720
+ if (u === "throw")
1721
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1722
+ let d = reader.skip(wireType);
1723
+ if (u !== false)
1724
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1725
+ }
1726
+ }
1727
+ return message;
1728
+ }
1729
+ internalBinaryWrite(message: Response_DeleteTournament, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1730
+ /* string message = 1; */
1731
+ if (message.message !== "")
1732
+ writer.tag(1, WireType.LengthDelimited).string(message.message);
1733
+ /* proto.models.Tournament tournament = 2; */
1734
+ if (message.tournament)
1735
+ Tournament.internalBinaryWrite(message.tournament, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
1736
+ let u = options.writeUnknownFields;
1737
+ if (u !== false)
1738
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1739
+ return writer;
1740
+ }
1741
+ }
1742
+ /**
1743
+ * @generated MessageType for protobuf message proto.packets.Response.DeleteTournament
1744
+ */
1745
+ export const Response_DeleteTournament = new Response_DeleteTournament$Type();
1746
+ // @generated message type with reflection information, may provide speed optimized methods
1747
+ class Response_AddServer$Type extends MessageType<Response_AddServer> {
1748
+ constructor() {
1749
+ super("proto.packets.Response.AddServer", [
1750
+ { no: 1, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1751
+ { no: 2, name: "server", kind: "message", T: () => CoreServer }
1752
+ ]);
1753
+ }
1754
+ create(value?: PartialMessage<Response_AddServer>): Response_AddServer {
1755
+ const message = { message: "" };
1756
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
1757
+ if (value !== undefined)
1758
+ reflectionMergePartial<Response_AddServer>(this, message, value);
1759
+ return message;
1760
+ }
1761
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Response_AddServer): Response_AddServer {
1762
+ let message = target ?? this.create(), end = reader.pos + length;
1763
+ while (reader.pos < end) {
1764
+ let [fieldNo, wireType] = reader.tag();
1765
+ switch (fieldNo) {
1766
+ case /* string message */ 1:
1767
+ message.message = reader.string();
1768
+ break;
1769
+ case /* proto.models.CoreServer server */ 2:
1770
+ message.server = CoreServer.internalBinaryRead(reader, reader.uint32(), options, message.server);
1771
+ break;
1772
+ default:
1773
+ let u = options.readUnknownField;
1774
+ if (u === "throw")
1775
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1776
+ let d = reader.skip(wireType);
1777
+ if (u !== false)
1778
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1779
+ }
1780
+ }
1781
+ return message;
1782
+ }
1783
+ internalBinaryWrite(message: Response_AddServer, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1784
+ /* string message = 1; */
1785
+ if (message.message !== "")
1786
+ writer.tag(1, WireType.LengthDelimited).string(message.message);
1787
+ /* proto.models.CoreServer server = 2; */
1788
+ if (message.server)
1789
+ CoreServer.internalBinaryWrite(message.server, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
1790
+ let u = options.writeUnknownFields;
1791
+ if (u !== false)
1792
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1793
+ return writer;
1794
+ }
1795
+ }
1796
+ /**
1797
+ * @generated MessageType for protobuf message proto.packets.Response.AddServer
1798
+ */
1799
+ export const Response_AddServer = new Response_AddServer$Type();
1800
+ // @generated message type with reflection information, may provide speed optimized methods
1801
+ class Response_Connect$Type extends MessageType<Response_Connect> {
1802
+ constructor() {
1803
+ super("proto.packets.Response.Connect", [
1804
+ { no: 1, name: "state", kind: "message", T: () => State },
1805
+ { no: 2, name: "server_version", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
1806
+ { no: 3, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1807
+ { no: 4, name: "reason", kind: "enum", T: () => ["proto.packets.Response.Connect.ConnectFailReason", Response_Connect_ConnectFailReason] }
1808
+ ]);
1809
+ }
1810
+ create(value?: PartialMessage<Response_Connect>): Response_Connect {
1811
+ const message = { serverVersion: 0, message: "", reason: 0 };
1812
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
1813
+ if (value !== undefined)
1814
+ reflectionMergePartial<Response_Connect>(this, message, value);
1815
+ return message;
1816
+ }
1817
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Response_Connect): Response_Connect {
1818
+ let message = target ?? this.create(), end = reader.pos + length;
1819
+ while (reader.pos < end) {
1820
+ let [fieldNo, wireType] = reader.tag();
1821
+ switch (fieldNo) {
1822
+ case /* proto.models.State state */ 1:
1823
+ message.state = State.internalBinaryRead(reader, reader.uint32(), options, message.state);
1824
+ break;
1825
+ case /* int32 server_version */ 2:
1826
+ message.serverVersion = reader.int32();
1827
+ break;
1828
+ case /* string message */ 3:
1829
+ message.message = reader.string();
1830
+ break;
1831
+ case /* proto.packets.Response.Connect.ConnectFailReason reason */ 4:
1832
+ message.reason = reader.int32();
1833
+ break;
1834
+ default:
1835
+ let u = options.readUnknownField;
1836
+ if (u === "throw")
1837
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1838
+ let d = reader.skip(wireType);
1839
+ if (u !== false)
1840
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1841
+ }
1842
+ }
1843
+ return message;
1844
+ }
1845
+ internalBinaryWrite(message: Response_Connect, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1846
+ /* proto.models.State state = 1; */
1847
+ if (message.state)
1848
+ State.internalBinaryWrite(message.state, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1849
+ /* int32 server_version = 2; */
1850
+ if (message.serverVersion !== 0)
1851
+ writer.tag(2, WireType.Varint).int32(message.serverVersion);
1852
+ /* string message = 3; */
1853
+ if (message.message !== "")
1854
+ writer.tag(3, WireType.LengthDelimited).string(message.message);
1855
+ /* proto.packets.Response.Connect.ConnectFailReason reason = 4; */
1856
+ if (message.reason !== 0)
1857
+ writer.tag(4, WireType.Varint).int32(message.reason);
1858
+ let u = options.writeUnknownFields;
1859
+ if (u !== false)
1860
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1861
+ return writer;
1862
+ }
1863
+ }
1864
+ /**
1865
+ * @generated MessageType for protobuf message proto.packets.Response.Connect
1866
+ */
1867
+ export const Response_Connect = new Response_Connect$Type();
1868
+ // @generated message type with reflection information, may provide speed optimized methods
1869
+ class Response_Join$Type extends MessageType<Response_Join> {
1870
+ constructor() {
1871
+ super("proto.packets.Response.Join", [
1872
+ { no: 1, name: "state", kind: "message", T: () => State },
1873
+ { no: 2, name: "self_guid", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1874
+ { no: 3, name: "tournament_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1875
+ { no: 4, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1876
+ { no: 5, name: "reason", kind: "enum", T: () => ["proto.packets.Response.Join.JoinFailReason", Response_Join_JoinFailReason] }
1877
+ ]);
1878
+ }
1879
+ create(value?: PartialMessage<Response_Join>): Response_Join {
1880
+ const message = { selfGuid: "", tournamentId: "", message: "", reason: 0 };
1881
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
1882
+ if (value !== undefined)
1883
+ reflectionMergePartial<Response_Join>(this, message, value);
1884
+ return message;
1885
+ }
1886
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Response_Join): Response_Join {
1887
+ let message = target ?? this.create(), end = reader.pos + length;
1888
+ while (reader.pos < end) {
1889
+ let [fieldNo, wireType] = reader.tag();
1890
+ switch (fieldNo) {
1891
+ case /* proto.models.State state */ 1:
1892
+ message.state = State.internalBinaryRead(reader, reader.uint32(), options, message.state);
1893
+ break;
1894
+ case /* string self_guid */ 2:
1895
+ message.selfGuid = reader.string();
1896
+ break;
1897
+ case /* string tournament_id */ 3:
1898
+ message.tournamentId = reader.string();
1899
+ break;
1900
+ case /* string message */ 4:
1901
+ message.message = reader.string();
1902
+ break;
1903
+ case /* proto.packets.Response.Join.JoinFailReason reason */ 5:
1904
+ message.reason = reader.int32();
1905
+ break;
1906
+ default:
1907
+ let u = options.readUnknownField;
1908
+ if (u === "throw")
1909
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1910
+ let d = reader.skip(wireType);
1911
+ if (u !== false)
1912
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1913
+ }
1914
+ }
1915
+ return message;
1916
+ }
1917
+ internalBinaryWrite(message: Response_Join, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1918
+ /* proto.models.State state = 1; */
1919
+ if (message.state)
1920
+ State.internalBinaryWrite(message.state, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1921
+ /* string self_guid = 2; */
1922
+ if (message.selfGuid !== "")
1923
+ writer.tag(2, WireType.LengthDelimited).string(message.selfGuid);
1924
+ /* string tournament_id = 3; */
1925
+ if (message.tournamentId !== "")
1926
+ writer.tag(3, WireType.LengthDelimited).string(message.tournamentId);
1927
+ /* string message = 4; */
1928
+ if (message.message !== "")
1929
+ writer.tag(4, WireType.LengthDelimited).string(message.message);
1930
+ /* proto.packets.Response.Join.JoinFailReason reason = 5; */
1931
+ if (message.reason !== 0)
1932
+ writer.tag(5, WireType.Varint).int32(message.reason);
1933
+ let u = options.writeUnknownFields;
1934
+ if (u !== false)
1935
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1936
+ return writer;
1937
+ }
1938
+ }
1939
+ /**
1940
+ * @generated MessageType for protobuf message proto.packets.Response.Join
1941
+ */
1942
+ export const Response_Join = new Response_Join$Type();
1943
+ // @generated message type with reflection information, may provide speed optimized methods
1944
+ class Response_LeaderboardEntries$Type extends MessageType<Response_LeaderboardEntries> {
1945
+ constructor() {
1946
+ super("proto.packets.Response.LeaderboardEntries", [
1947
+ { no: 1, name: "scores", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => LeaderboardEntry }
1948
+ ]);
1949
+ }
1950
+ create(value?: PartialMessage<Response_LeaderboardEntries>): Response_LeaderboardEntries {
1951
+ const message = { scores: [] };
1952
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
1953
+ if (value !== undefined)
1954
+ reflectionMergePartial<Response_LeaderboardEntries>(this, message, value);
1955
+ return message;
1956
+ }
1957
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Response_LeaderboardEntries): Response_LeaderboardEntries {
1958
+ let message = target ?? this.create(), end = reader.pos + length;
1959
+ while (reader.pos < end) {
1960
+ let [fieldNo, wireType] = reader.tag();
1961
+ switch (fieldNo) {
1962
+ case /* repeated proto.models.LeaderboardEntry scores */ 1:
1963
+ message.scores.push(LeaderboardEntry.internalBinaryRead(reader, reader.uint32(), options));
1964
+ break;
1965
+ default:
1966
+ let u = options.readUnknownField;
1967
+ if (u === "throw")
1968
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1969
+ let d = reader.skip(wireType);
1970
+ if (u !== false)
1971
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1972
+ }
1973
+ }
1974
+ return message;
1975
+ }
1976
+ internalBinaryWrite(message: Response_LeaderboardEntries, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1977
+ /* repeated proto.models.LeaderboardEntry scores = 1; */
1978
+ for (let i = 0; i < message.scores.length; i++)
1979
+ LeaderboardEntry.internalBinaryWrite(message.scores[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1980
+ let u = options.writeUnknownFields;
1981
+ if (u !== false)
1982
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1983
+ return writer;
1984
+ }
1985
+ }
1986
+ /**
1987
+ * @generated MessageType for protobuf message proto.packets.Response.LeaderboardEntries
1988
+ */
1989
+ export const Response_LeaderboardEntries = new Response_LeaderboardEntries$Type();
1990
+ // @generated message type with reflection information, may provide speed optimized methods
1991
+ class Response_LoadSong$Type extends MessageType<Response_LoadSong> {
1992
+ constructor() {
1993
+ super("proto.packets.Response.LoadSong", [
1994
+ { no: 1, name: "level_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
1995
+ ]);
1996
+ }
1997
+ create(value?: PartialMessage<Response_LoadSong>): Response_LoadSong {
1998
+ const message = { levelId: "" };
1999
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
2000
+ if (value !== undefined)
2001
+ reflectionMergePartial<Response_LoadSong>(this, message, value);
2002
+ return message;
2003
+ }
2004
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Response_LoadSong): Response_LoadSong {
2005
+ let message = target ?? this.create(), end = reader.pos + length;
2006
+ while (reader.pos < end) {
2007
+ let [fieldNo, wireType] = reader.tag();
2008
+ switch (fieldNo) {
2009
+ case /* string level_id */ 1:
2010
+ message.levelId = reader.string();
2011
+ break;
2012
+ default:
2013
+ let u = options.readUnknownField;
2014
+ if (u === "throw")
2015
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2016
+ let d = reader.skip(wireType);
2017
+ if (u !== false)
2018
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2019
+ }
2020
+ }
2021
+ return message;
2022
+ }
2023
+ internalBinaryWrite(message: Response_LoadSong, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2024
+ /* string level_id = 1; */
2025
+ if (message.levelId !== "")
2026
+ writer.tag(1, WireType.LengthDelimited).string(message.levelId);
2027
+ let u = options.writeUnknownFields;
2028
+ if (u !== false)
2029
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2030
+ return writer;
2031
+ }
2032
+ }
2033
+ /**
2034
+ * @generated MessageType for protobuf message proto.packets.Response.LoadSong
2035
+ */
2036
+ export const Response_LoadSong = new Response_LoadSong$Type();
2037
+ // @generated message type with reflection information, may provide speed optimized methods
2038
+ class Response_PreloadImageForStreamSync$Type extends MessageType<Response_PreloadImageForStreamSync> {
2039
+ constructor() {
2040
+ super("proto.packets.Response.PreloadImageForStreamSync", [
2041
+ { no: 1, name: "file_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
2042
+ ]);
2043
+ }
2044
+ create(value?: PartialMessage<Response_PreloadImageForStreamSync>): Response_PreloadImageForStreamSync {
2045
+ const message = { fileId: "" };
2046
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
2047
+ if (value !== undefined)
2048
+ reflectionMergePartial<Response_PreloadImageForStreamSync>(this, message, value);
2049
+ return message;
2050
+ }
2051
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Response_PreloadImageForStreamSync): Response_PreloadImageForStreamSync {
2052
+ let message = target ?? this.create(), end = reader.pos + length;
2053
+ while (reader.pos < end) {
2054
+ let [fieldNo, wireType] = reader.tag();
2055
+ switch (fieldNo) {
2056
+ case /* string file_id */ 1:
2057
+ message.fileId = reader.string();
2058
+ break;
2059
+ default:
2060
+ let u = options.readUnknownField;
2061
+ if (u === "throw")
2062
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2063
+ let d = reader.skip(wireType);
2064
+ if (u !== false)
2065
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2066
+ }
2067
+ }
2068
+ return message;
2069
+ }
2070
+ internalBinaryWrite(message: Response_PreloadImageForStreamSync, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2071
+ /* string file_id = 1; */
2072
+ if (message.fileId !== "")
2073
+ writer.tag(1, WireType.LengthDelimited).string(message.fileId);
2074
+ let u = options.writeUnknownFields;
2075
+ if (u !== false)
2076
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2077
+ return writer;
2078
+ }
2079
+ }
2080
+ /**
2081
+ * @generated MessageType for protobuf message proto.packets.Response.PreloadImageForStreamSync
2082
+ */
2083
+ export const Response_PreloadImageForStreamSync = new Response_PreloadImageForStreamSync$Type();
2084
+ // @generated message type with reflection information, may provide speed optimized methods
2085
+ class Response_ShowModal$Type extends MessageType<Response_ShowModal> {
2086
+ constructor() {
2087
+ super("proto.packets.Response.ShowModal", [
2088
+ { no: 1, name: "modal_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
2089
+ { no: 2, name: "value", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
2090
+ ]);
2091
+ }
2092
+ create(value?: PartialMessage<Response_ShowModal>): Response_ShowModal {
2093
+ const message = { modalId: "", value: "" };
2094
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
2095
+ if (value !== undefined)
2096
+ reflectionMergePartial<Response_ShowModal>(this, message, value);
2097
+ return message;
2098
+ }
2099
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Response_ShowModal): Response_ShowModal {
2100
+ let message = target ?? this.create(), end = reader.pos + length;
2101
+ while (reader.pos < end) {
2102
+ let [fieldNo, wireType] = reader.tag();
2103
+ switch (fieldNo) {
2104
+ case /* string modal_id */ 1:
2105
+ message.modalId = reader.string();
2106
+ break;
2107
+ case /* string value */ 2:
2108
+ message.value = reader.string();
2109
+ break;
2110
+ default:
2111
+ let u = options.readUnknownField;
2112
+ if (u === "throw")
2113
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2114
+ let d = reader.skip(wireType);
2115
+ if (u !== false)
2116
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2117
+ }
2118
+ }
2119
+ return message;
2120
+ }
2121
+ internalBinaryWrite(message: Response_ShowModal, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2122
+ /* string modal_id = 1; */
2123
+ if (message.modalId !== "")
2124
+ writer.tag(1, WireType.LengthDelimited).string(message.modalId);
2125
+ /* string value = 2; */
2126
+ if (message.value !== "")
2127
+ writer.tag(2, WireType.LengthDelimited).string(message.value);
2128
+ let u = options.writeUnknownFields;
2129
+ if (u !== false)
2130
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2131
+ return writer;
2132
+ }
2133
+ }
2134
+ /**
2135
+ * @generated MessageType for protobuf message proto.packets.Response.ShowModal
2136
+ */
2137
+ export const Response_ShowModal = new Response_ShowModal$Type();
2138
+ // @generated message type with reflection information, may provide speed optimized methods
2139
+ class Response_RemainingAttempts$Type extends MessageType<Response_RemainingAttempts> {
2140
+ constructor() {
2141
+ super("proto.packets.Response.RemainingAttempts", [
2142
+ { no: 1, name: "remaining_attempts", kind: "scalar", T: 5 /*ScalarType.INT32*/ }
2143
+ ]);
2144
+ }
2145
+ create(value?: PartialMessage<Response_RemainingAttempts>): Response_RemainingAttempts {
2146
+ const message = { remainingAttempts: 0 };
2147
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
2148
+ if (value !== undefined)
2149
+ reflectionMergePartial<Response_RemainingAttempts>(this, message, value);
2150
+ return message;
2151
+ }
2152
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Response_RemainingAttempts): Response_RemainingAttempts {
2153
+ let message = target ?? this.create(), end = reader.pos + length;
2154
+ while (reader.pos < end) {
2155
+ let [fieldNo, wireType] = reader.tag();
2156
+ switch (fieldNo) {
2157
+ case /* int32 remaining_attempts */ 1:
2158
+ message.remainingAttempts = reader.int32();
2159
+ break;
2160
+ default:
2161
+ let u = options.readUnknownField;
2162
+ if (u === "throw")
2163
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2164
+ let d = reader.skip(wireType);
2165
+ if (u !== false)
2166
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2167
+ }
2168
+ }
2169
+ return message;
2170
+ }
2171
+ internalBinaryWrite(message: Response_RemainingAttempts, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2172
+ /* int32 remaining_attempts = 1; */
2173
+ if (message.remainingAttempts !== 0)
2174
+ writer.tag(1, WireType.Varint).int32(message.remainingAttempts);
2175
+ let u = options.writeUnknownFields;
2176
+ if (u !== false)
2177
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2178
+ return writer;
2179
+ }
2180
+ }
2181
+ /**
2182
+ * @generated MessageType for protobuf message proto.packets.Response.RemainingAttempts
2183
+ */
2184
+ export const Response_RemainingAttempts = new Response_RemainingAttempts$Type();