protobuf-platform 1.2.241 → 1.2.242

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protobuf-platform",
3
- "version": "1.2.241",
3
+ "version": "1.2.242",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -23,7 +23,9 @@ service Tournament {
23
23
  rpc getTournamentsForUser(PaginationRequest) returns (UserTournamentItemsResponse);
24
24
  rpc getSingleTournamentForUser(UserTournamentRequest) returns (UserTournamentItem);
25
25
  rpc getActiveUserTournaments(ActiveUserTournamentsRequest) returns (UserTournamentItemsResponse);
26
+ rpc getTournamentLeaderboard(GetTournamentLeaderboardRequest) returns (TournamentLeaderboardResponse);
26
27
  rpc attachUserToTournament(UserTournamentRequest) returns (TournamentStatusResponse);
28
+ rpc resolveAutoTournamentForGameSession(ResolveAutoTournamentForGameSessionRequest) returns (ResolveAutoTournamentForGameSessionResponse);
27
29
  }
28
30
  //Technical
29
31
  message PingRequest { string ping = 1; }
@@ -219,3 +221,30 @@ message ActiveUserTournamentsRequest {
219
221
  optional string currency = 3;
220
222
  optional string locale = 4;
221
223
  }
224
+
225
+ //Leaderboard
226
+ message GetTournamentLeaderboardRequest {
227
+ int32 tournament_id = 1;
228
+ optional int32 user_id = 2;
229
+ }
230
+
231
+ message TournamentLeaderboardUserItem {
232
+ int32 user_id = 1;
233
+ int32 rank = 2;
234
+ double score = 3;
235
+ }
236
+
237
+ message TournamentLeaderboardResponse {
238
+ repeated TournamentLeaderboardUserItem top20 = 1;
239
+ optional TournamentLeaderboardUserItem my_position = 2;
240
+ }
241
+
242
+ message ResolveAutoTournamentForGameSessionRequest {
243
+ uint64 user_id = 1;
244
+ repeated uint64 tournament_ids = 2; // candidate tournaments for the game
245
+ }
246
+
247
+ message ResolveAutoTournamentForGameSessionResponse {
248
+ uint64 tournament_id = 1; // resolved tournamentId, or 0 when not eligible / ambiguous
249
+ bool is_eligible = 2; // true iff tournament_id > 0
250
+ }
@@ -37,6 +37,17 @@ function deserialize_tournament_GetFileRequest(buffer_arg) {
37
37
  return tournament_pb.GetFileRequest.deserializeBinary(new Uint8Array(buffer_arg));
38
38
  }
39
39
 
40
+ function serialize_tournament_GetTournamentLeaderboardRequest(arg) {
41
+ if (!(arg instanceof tournament_pb.GetTournamentLeaderboardRequest)) {
42
+ throw new Error('Expected argument of type tournament.GetTournamentLeaderboardRequest');
43
+ }
44
+ return Buffer.from(arg.serializeBinary());
45
+ }
46
+
47
+ function deserialize_tournament_GetTournamentLeaderboardRequest(buffer_arg) {
48
+ return tournament_pb.GetTournamentLeaderboardRequest.deserializeBinary(new Uint8Array(buffer_arg));
49
+ }
50
+
40
51
  function serialize_tournament_GetTournamentRequest(arg) {
41
52
  if (!(arg instanceof tournament_pb.GetTournamentRequest)) {
42
53
  throw new Error('Expected argument of type tournament.GetTournamentRequest');
@@ -92,6 +103,28 @@ function deserialize_tournament_PongResponse(buffer_arg) {
92
103
  return tournament_pb.PongResponse.deserializeBinary(new Uint8Array(buffer_arg));
93
104
  }
94
105
 
106
+ function serialize_tournament_ResolveAutoTournamentForGameSessionRequest(arg) {
107
+ if (!(arg instanceof tournament_pb.ResolveAutoTournamentForGameSessionRequest)) {
108
+ throw new Error('Expected argument of type tournament.ResolveAutoTournamentForGameSessionRequest');
109
+ }
110
+ return Buffer.from(arg.serializeBinary());
111
+ }
112
+
113
+ function deserialize_tournament_ResolveAutoTournamentForGameSessionRequest(buffer_arg) {
114
+ return tournament_pb.ResolveAutoTournamentForGameSessionRequest.deserializeBinary(new Uint8Array(buffer_arg));
115
+ }
116
+
117
+ function serialize_tournament_ResolveAutoTournamentForGameSessionResponse(arg) {
118
+ if (!(arg instanceof tournament_pb.ResolveAutoTournamentForGameSessionResponse)) {
119
+ throw new Error('Expected argument of type tournament.ResolveAutoTournamentForGameSessionResponse');
120
+ }
121
+ return Buffer.from(arg.serializeBinary());
122
+ }
123
+
124
+ function deserialize_tournament_ResolveAutoTournamentForGameSessionResponse(buffer_arg) {
125
+ return tournament_pb.ResolveAutoTournamentForGameSessionResponse.deserializeBinary(new Uint8Array(buffer_arg));
126
+ }
127
+
95
128
  function serialize_tournament_TournamentActivationRuleRequest(arg) {
96
129
  if (!(arg instanceof tournament_pb.TournamentActivationRuleRequest)) {
97
130
  throw new Error('Expected argument of type tournament.TournamentActivationRuleRequest');
@@ -136,6 +169,17 @@ function deserialize_tournament_TournamentItemsResponse(buffer_arg) {
136
169
  return tournament_pb.TournamentItemsResponse.deserializeBinary(new Uint8Array(buffer_arg));
137
170
  }
138
171
 
172
+ function serialize_tournament_TournamentLeaderboardResponse(arg) {
173
+ if (!(arg instanceof tournament_pb.TournamentLeaderboardResponse)) {
174
+ throw new Error('Expected argument of type tournament.TournamentLeaderboardResponse');
175
+ }
176
+ return Buffer.from(arg.serializeBinary());
177
+ }
178
+
179
+ function deserialize_tournament_TournamentLeaderboardResponse(buffer_arg) {
180
+ return tournament_pb.TournamentLeaderboardResponse.deserializeBinary(new Uint8Array(buffer_arg));
181
+ }
182
+
139
183
  function serialize_tournament_TournamentRequest(arg) {
140
184
  if (!(arg instanceof tournament_pb.TournamentRequest)) {
141
185
  throw new Error('Expected argument of type tournament.TournamentRequest');
@@ -437,6 +481,17 @@ readListTournamentStatuses: {
437
481
  responseSerialize: serialize_tournament_UserTournamentItemsResponse,
438
482
  responseDeserialize: deserialize_tournament_UserTournamentItemsResponse,
439
483
  },
484
+ getTournamentLeaderboard: {
485
+ path: '/tournament.Tournament/getTournamentLeaderboard',
486
+ requestStream: false,
487
+ responseStream: false,
488
+ requestType: tournament_pb.GetTournamentLeaderboardRequest,
489
+ responseType: tournament_pb.TournamentLeaderboardResponse,
490
+ requestSerialize: serialize_tournament_GetTournamentLeaderboardRequest,
491
+ requestDeserialize: deserialize_tournament_GetTournamentLeaderboardRequest,
492
+ responseSerialize: serialize_tournament_TournamentLeaderboardResponse,
493
+ responseDeserialize: deserialize_tournament_TournamentLeaderboardResponse,
494
+ },
440
495
  attachUserToTournament: {
441
496
  path: '/tournament.Tournament/attachUserToTournament',
442
497
  requestStream: false,
@@ -448,6 +503,17 @@ readListTournamentStatuses: {
448
503
  responseSerialize: serialize_tournament_TournamentStatusResponse,
449
504
  responseDeserialize: deserialize_tournament_TournamentStatusResponse,
450
505
  },
506
+ resolveAutoTournamentForGameSession: {
507
+ path: '/tournament.Tournament/resolveAutoTournamentForGameSession',
508
+ requestStream: false,
509
+ responseStream: false,
510
+ requestType: tournament_pb.ResolveAutoTournamentForGameSessionRequest,
511
+ responseType: tournament_pb.ResolveAutoTournamentForGameSessionResponse,
512
+ requestSerialize: serialize_tournament_ResolveAutoTournamentForGameSessionRequest,
513
+ requestDeserialize: deserialize_tournament_ResolveAutoTournamentForGameSessionRequest,
514
+ responseSerialize: serialize_tournament_ResolveAutoTournamentForGameSessionResponse,
515
+ responseDeserialize: deserialize_tournament_ResolveAutoTournamentForGameSessionResponse,
516
+ },
451
517
  };
452
518
 
453
519
  exports.TournamentClient = grpc.makeGenericClientConstructor(TournamentService, 'Tournament');
@@ -26,11 +26,14 @@ goog.exportSymbol('proto.tournament.ActiveUserTournamentsRequest', null, global)
26
26
  goog.exportSymbol('proto.tournament.ContentItem', null, global);
27
27
  goog.exportSymbol('proto.tournament.File', null, global);
28
28
  goog.exportSymbol('proto.tournament.GetFileRequest', null, global);
29
+ goog.exportSymbol('proto.tournament.GetTournamentLeaderboardRequest', null, global);
29
30
  goog.exportSymbol('proto.tournament.GetTournamentRequest', null, global);
30
31
  goog.exportSymbol('proto.tournament.ItemsBunchRequest', null, global);
31
32
  goog.exportSymbol('proto.tournament.PaginationRequest', null, global);
32
33
  goog.exportSymbol('proto.tournament.PingRequest', null, global);
33
34
  goog.exportSymbol('proto.tournament.PongResponse', null, global);
35
+ goog.exportSymbol('proto.tournament.ResolveAutoTournamentForGameSessionRequest', null, global);
36
+ goog.exportSymbol('proto.tournament.ResolveAutoTournamentForGameSessionResponse', null, global);
34
37
  goog.exportSymbol('proto.tournament.RewardItem', null, global);
35
38
  goog.exportSymbol('proto.tournament.ScoringRule', null, global);
36
39
  goog.exportSymbol('proto.tournament.SearchRequest', null, global);
@@ -40,6 +43,8 @@ goog.exportSymbol('proto.tournament.TournamentGamesRequest', null, global);
40
43
  goog.exportSymbol('proto.tournament.TournamentItem', null, global);
41
44
  goog.exportSymbol('proto.tournament.TournamentItemRequest', null, global);
42
45
  goog.exportSymbol('proto.tournament.TournamentItemsResponse', null, global);
46
+ goog.exportSymbol('proto.tournament.TournamentLeaderboardResponse', null, global);
47
+ goog.exportSymbol('proto.tournament.TournamentLeaderboardUserItem', null, global);
43
48
  goog.exportSymbol('proto.tournament.TournamentRequest', null, global);
44
49
  goog.exportSymbol('proto.tournament.TournamentRequest.RequestCase', null, global);
45
50
  goog.exportSymbol('proto.tournament.TournamentResponse', null, global);
@@ -682,6 +687,111 @@ if (goog.DEBUG && !COMPILED) {
682
687
  */
683
688
  proto.tournament.ActiveUserTournamentsRequest.displayName = 'proto.tournament.ActiveUserTournamentsRequest';
684
689
  }
690
+ /**
691
+ * Generated by JsPbCodeGenerator.
692
+ * @param {Array=} opt_data Optional initial data array, typically from a
693
+ * server response, or constructed directly in Javascript. The array is used
694
+ * in place and becomes part of the constructed object. It is not cloned.
695
+ * If no data is provided, the constructed object will be empty, but still
696
+ * valid.
697
+ * @extends {jspb.Message}
698
+ * @constructor
699
+ */
700
+ proto.tournament.GetTournamentLeaderboardRequest = function(opt_data) {
701
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
702
+ };
703
+ goog.inherits(proto.tournament.GetTournamentLeaderboardRequest, jspb.Message);
704
+ if (goog.DEBUG && !COMPILED) {
705
+ /**
706
+ * @public
707
+ * @override
708
+ */
709
+ proto.tournament.GetTournamentLeaderboardRequest.displayName = 'proto.tournament.GetTournamentLeaderboardRequest';
710
+ }
711
+ /**
712
+ * Generated by JsPbCodeGenerator.
713
+ * @param {Array=} opt_data Optional initial data array, typically from a
714
+ * server response, or constructed directly in Javascript. The array is used
715
+ * in place and becomes part of the constructed object. It is not cloned.
716
+ * If no data is provided, the constructed object will be empty, but still
717
+ * valid.
718
+ * @extends {jspb.Message}
719
+ * @constructor
720
+ */
721
+ proto.tournament.TournamentLeaderboardUserItem = function(opt_data) {
722
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
723
+ };
724
+ goog.inherits(proto.tournament.TournamentLeaderboardUserItem, jspb.Message);
725
+ if (goog.DEBUG && !COMPILED) {
726
+ /**
727
+ * @public
728
+ * @override
729
+ */
730
+ proto.tournament.TournamentLeaderboardUserItem.displayName = 'proto.tournament.TournamentLeaderboardUserItem';
731
+ }
732
+ /**
733
+ * Generated by JsPbCodeGenerator.
734
+ * @param {Array=} opt_data Optional initial data array, typically from a
735
+ * server response, or constructed directly in Javascript. The array is used
736
+ * in place and becomes part of the constructed object. It is not cloned.
737
+ * If no data is provided, the constructed object will be empty, but still
738
+ * valid.
739
+ * @extends {jspb.Message}
740
+ * @constructor
741
+ */
742
+ proto.tournament.TournamentLeaderboardResponse = function(opt_data) {
743
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.tournament.TournamentLeaderboardResponse.repeatedFields_, null);
744
+ };
745
+ goog.inherits(proto.tournament.TournamentLeaderboardResponse, jspb.Message);
746
+ if (goog.DEBUG && !COMPILED) {
747
+ /**
748
+ * @public
749
+ * @override
750
+ */
751
+ proto.tournament.TournamentLeaderboardResponse.displayName = 'proto.tournament.TournamentLeaderboardResponse';
752
+ }
753
+ /**
754
+ * Generated by JsPbCodeGenerator.
755
+ * @param {Array=} opt_data Optional initial data array, typically from a
756
+ * server response, or constructed directly in Javascript. The array is used
757
+ * in place and becomes part of the constructed object. It is not cloned.
758
+ * If no data is provided, the constructed object will be empty, but still
759
+ * valid.
760
+ * @extends {jspb.Message}
761
+ * @constructor
762
+ */
763
+ proto.tournament.ResolveAutoTournamentForGameSessionRequest = function(opt_data) {
764
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.tournament.ResolveAutoTournamentForGameSessionRequest.repeatedFields_, null);
765
+ };
766
+ goog.inherits(proto.tournament.ResolveAutoTournamentForGameSessionRequest, jspb.Message);
767
+ if (goog.DEBUG && !COMPILED) {
768
+ /**
769
+ * @public
770
+ * @override
771
+ */
772
+ proto.tournament.ResolveAutoTournamentForGameSessionRequest.displayName = 'proto.tournament.ResolveAutoTournamentForGameSessionRequest';
773
+ }
774
+ /**
775
+ * Generated by JsPbCodeGenerator.
776
+ * @param {Array=} opt_data Optional initial data array, typically from a
777
+ * server response, or constructed directly in Javascript. The array is used
778
+ * in place and becomes part of the constructed object. It is not cloned.
779
+ * If no data is provided, the constructed object will be empty, but still
780
+ * valid.
781
+ * @extends {jspb.Message}
782
+ * @constructor
783
+ */
784
+ proto.tournament.ResolveAutoTournamentForGameSessionResponse = function(opt_data) {
785
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
786
+ };
787
+ goog.inherits(proto.tournament.ResolveAutoTournamentForGameSessionResponse, jspb.Message);
788
+ if (goog.DEBUG && !COMPILED) {
789
+ /**
790
+ * @public
791
+ * @override
792
+ */
793
+ proto.tournament.ResolveAutoTournamentForGameSessionResponse.displayName = 'proto.tournament.ResolveAutoTournamentForGameSessionResponse';
794
+ }
685
795
 
686
796
 
687
797
 
@@ -10168,4 +10278,931 @@ proto.tournament.ActiveUserTournamentsRequest.prototype.hasLocale = function() {
10168
10278
  };
10169
10279
 
10170
10280
 
10281
+
10282
+
10283
+
10284
+ if (jspb.Message.GENERATE_TO_OBJECT) {
10285
+ /**
10286
+ * Creates an object representation of this proto.
10287
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
10288
+ * Optional fields that are not set will be set to undefined.
10289
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
10290
+ * For the list of reserved names please see:
10291
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
10292
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
10293
+ * JSPB instance for transitional soy proto support:
10294
+ * http://goto/soy-param-migration
10295
+ * @return {!Object}
10296
+ */
10297
+ proto.tournament.GetTournamentLeaderboardRequest.prototype.toObject = function(opt_includeInstance) {
10298
+ return proto.tournament.GetTournamentLeaderboardRequest.toObject(opt_includeInstance, this);
10299
+ };
10300
+
10301
+
10302
+ /**
10303
+ * Static version of the {@see toObject} method.
10304
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
10305
+ * the JSPB instance for transitional soy proto support:
10306
+ * http://goto/soy-param-migration
10307
+ * @param {!proto.tournament.GetTournamentLeaderboardRequest} msg The msg instance to transform.
10308
+ * @return {!Object}
10309
+ * @suppress {unusedLocalVariables} f is only used for nested messages
10310
+ */
10311
+ proto.tournament.GetTournamentLeaderboardRequest.toObject = function(includeInstance, msg) {
10312
+ var f, obj = {
10313
+ tournamentId: jspb.Message.getFieldWithDefault(msg, 1, 0),
10314
+ userId: jspb.Message.getFieldWithDefault(msg, 2, 0)
10315
+ };
10316
+
10317
+ if (includeInstance) {
10318
+ obj.$jspbMessageInstance = msg;
10319
+ }
10320
+ return obj;
10321
+ };
10322
+ }
10323
+
10324
+
10325
+ /**
10326
+ * Deserializes binary data (in protobuf wire format).
10327
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
10328
+ * @return {!proto.tournament.GetTournamentLeaderboardRequest}
10329
+ */
10330
+ proto.tournament.GetTournamentLeaderboardRequest.deserializeBinary = function(bytes) {
10331
+ var reader = new jspb.BinaryReader(bytes);
10332
+ var msg = new proto.tournament.GetTournamentLeaderboardRequest;
10333
+ return proto.tournament.GetTournamentLeaderboardRequest.deserializeBinaryFromReader(msg, reader);
10334
+ };
10335
+
10336
+
10337
+ /**
10338
+ * Deserializes binary data (in protobuf wire format) from the
10339
+ * given reader into the given message object.
10340
+ * @param {!proto.tournament.GetTournamentLeaderboardRequest} msg The message object to deserialize into.
10341
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
10342
+ * @return {!proto.tournament.GetTournamentLeaderboardRequest}
10343
+ */
10344
+ proto.tournament.GetTournamentLeaderboardRequest.deserializeBinaryFromReader = function(msg, reader) {
10345
+ while (reader.nextField()) {
10346
+ if (reader.isEndGroup()) {
10347
+ break;
10348
+ }
10349
+ var field = reader.getFieldNumber();
10350
+ switch (field) {
10351
+ case 1:
10352
+ var value = /** @type {number} */ (reader.readInt32());
10353
+ msg.setTournamentId(value);
10354
+ break;
10355
+ case 2:
10356
+ var value = /** @type {number} */ (reader.readInt32());
10357
+ msg.setUserId(value);
10358
+ break;
10359
+ default:
10360
+ reader.skipField();
10361
+ break;
10362
+ }
10363
+ }
10364
+ return msg;
10365
+ };
10366
+
10367
+
10368
+ /**
10369
+ * Serializes the message to binary data (in protobuf wire format).
10370
+ * @return {!Uint8Array}
10371
+ */
10372
+ proto.tournament.GetTournamentLeaderboardRequest.prototype.serializeBinary = function() {
10373
+ var writer = new jspb.BinaryWriter();
10374
+ proto.tournament.GetTournamentLeaderboardRequest.serializeBinaryToWriter(this, writer);
10375
+ return writer.getResultBuffer();
10376
+ };
10377
+
10378
+
10379
+ /**
10380
+ * Serializes the given message to binary data (in protobuf wire
10381
+ * format), writing to the given BinaryWriter.
10382
+ * @param {!proto.tournament.GetTournamentLeaderboardRequest} message
10383
+ * @param {!jspb.BinaryWriter} writer
10384
+ * @suppress {unusedLocalVariables} f is only used for nested messages
10385
+ */
10386
+ proto.tournament.GetTournamentLeaderboardRequest.serializeBinaryToWriter = function(message, writer) {
10387
+ var f = undefined;
10388
+ f = message.getTournamentId();
10389
+ if (f !== 0) {
10390
+ writer.writeInt32(
10391
+ 1,
10392
+ f
10393
+ );
10394
+ }
10395
+ f = /** @type {number} */ (jspb.Message.getField(message, 2));
10396
+ if (f != null) {
10397
+ writer.writeInt32(
10398
+ 2,
10399
+ f
10400
+ );
10401
+ }
10402
+ };
10403
+
10404
+
10405
+ /**
10406
+ * optional int32 tournament_id = 1;
10407
+ * @return {number}
10408
+ */
10409
+ proto.tournament.GetTournamentLeaderboardRequest.prototype.getTournamentId = function() {
10410
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
10411
+ };
10412
+
10413
+
10414
+ /**
10415
+ * @param {number} value
10416
+ * @return {!proto.tournament.GetTournamentLeaderboardRequest} returns this
10417
+ */
10418
+ proto.tournament.GetTournamentLeaderboardRequest.prototype.setTournamentId = function(value) {
10419
+ return jspb.Message.setProto3IntField(this, 1, value);
10420
+ };
10421
+
10422
+
10423
+ /**
10424
+ * optional int32 user_id = 2;
10425
+ * @return {number}
10426
+ */
10427
+ proto.tournament.GetTournamentLeaderboardRequest.prototype.getUserId = function() {
10428
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
10429
+ };
10430
+
10431
+
10432
+ /**
10433
+ * @param {number} value
10434
+ * @return {!proto.tournament.GetTournamentLeaderboardRequest} returns this
10435
+ */
10436
+ proto.tournament.GetTournamentLeaderboardRequest.prototype.setUserId = function(value) {
10437
+ return jspb.Message.setField(this, 2, value);
10438
+ };
10439
+
10440
+
10441
+ /**
10442
+ * Clears the field making it undefined.
10443
+ * @return {!proto.tournament.GetTournamentLeaderboardRequest} returns this
10444
+ */
10445
+ proto.tournament.GetTournamentLeaderboardRequest.prototype.clearUserId = function() {
10446
+ return jspb.Message.setField(this, 2, undefined);
10447
+ };
10448
+
10449
+
10450
+ /**
10451
+ * Returns whether this field is set.
10452
+ * @return {boolean}
10453
+ */
10454
+ proto.tournament.GetTournamentLeaderboardRequest.prototype.hasUserId = function() {
10455
+ return jspb.Message.getField(this, 2) != null;
10456
+ };
10457
+
10458
+
10459
+
10460
+
10461
+
10462
+ if (jspb.Message.GENERATE_TO_OBJECT) {
10463
+ /**
10464
+ * Creates an object representation of this proto.
10465
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
10466
+ * Optional fields that are not set will be set to undefined.
10467
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
10468
+ * For the list of reserved names please see:
10469
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
10470
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
10471
+ * JSPB instance for transitional soy proto support:
10472
+ * http://goto/soy-param-migration
10473
+ * @return {!Object}
10474
+ */
10475
+ proto.tournament.TournamentLeaderboardUserItem.prototype.toObject = function(opt_includeInstance) {
10476
+ return proto.tournament.TournamentLeaderboardUserItem.toObject(opt_includeInstance, this);
10477
+ };
10478
+
10479
+
10480
+ /**
10481
+ * Static version of the {@see toObject} method.
10482
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
10483
+ * the JSPB instance for transitional soy proto support:
10484
+ * http://goto/soy-param-migration
10485
+ * @param {!proto.tournament.TournamentLeaderboardUserItem} msg The msg instance to transform.
10486
+ * @return {!Object}
10487
+ * @suppress {unusedLocalVariables} f is only used for nested messages
10488
+ */
10489
+ proto.tournament.TournamentLeaderboardUserItem.toObject = function(includeInstance, msg) {
10490
+ var f, obj = {
10491
+ userId: jspb.Message.getFieldWithDefault(msg, 1, 0),
10492
+ rank: jspb.Message.getFieldWithDefault(msg, 2, 0),
10493
+ score: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0)
10494
+ };
10495
+
10496
+ if (includeInstance) {
10497
+ obj.$jspbMessageInstance = msg;
10498
+ }
10499
+ return obj;
10500
+ };
10501
+ }
10502
+
10503
+
10504
+ /**
10505
+ * Deserializes binary data (in protobuf wire format).
10506
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
10507
+ * @return {!proto.tournament.TournamentLeaderboardUserItem}
10508
+ */
10509
+ proto.tournament.TournamentLeaderboardUserItem.deserializeBinary = function(bytes) {
10510
+ var reader = new jspb.BinaryReader(bytes);
10511
+ var msg = new proto.tournament.TournamentLeaderboardUserItem;
10512
+ return proto.tournament.TournamentLeaderboardUserItem.deserializeBinaryFromReader(msg, reader);
10513
+ };
10514
+
10515
+
10516
+ /**
10517
+ * Deserializes binary data (in protobuf wire format) from the
10518
+ * given reader into the given message object.
10519
+ * @param {!proto.tournament.TournamentLeaderboardUserItem} msg The message object to deserialize into.
10520
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
10521
+ * @return {!proto.tournament.TournamentLeaderboardUserItem}
10522
+ */
10523
+ proto.tournament.TournamentLeaderboardUserItem.deserializeBinaryFromReader = function(msg, reader) {
10524
+ while (reader.nextField()) {
10525
+ if (reader.isEndGroup()) {
10526
+ break;
10527
+ }
10528
+ var field = reader.getFieldNumber();
10529
+ switch (field) {
10530
+ case 1:
10531
+ var value = /** @type {number} */ (reader.readInt32());
10532
+ msg.setUserId(value);
10533
+ break;
10534
+ case 2:
10535
+ var value = /** @type {number} */ (reader.readInt32());
10536
+ msg.setRank(value);
10537
+ break;
10538
+ case 3:
10539
+ var value = /** @type {number} */ (reader.readDouble());
10540
+ msg.setScore(value);
10541
+ break;
10542
+ default:
10543
+ reader.skipField();
10544
+ break;
10545
+ }
10546
+ }
10547
+ return msg;
10548
+ };
10549
+
10550
+
10551
+ /**
10552
+ * Serializes the message to binary data (in protobuf wire format).
10553
+ * @return {!Uint8Array}
10554
+ */
10555
+ proto.tournament.TournamentLeaderboardUserItem.prototype.serializeBinary = function() {
10556
+ var writer = new jspb.BinaryWriter();
10557
+ proto.tournament.TournamentLeaderboardUserItem.serializeBinaryToWriter(this, writer);
10558
+ return writer.getResultBuffer();
10559
+ };
10560
+
10561
+
10562
+ /**
10563
+ * Serializes the given message to binary data (in protobuf wire
10564
+ * format), writing to the given BinaryWriter.
10565
+ * @param {!proto.tournament.TournamentLeaderboardUserItem} message
10566
+ * @param {!jspb.BinaryWriter} writer
10567
+ * @suppress {unusedLocalVariables} f is only used for nested messages
10568
+ */
10569
+ proto.tournament.TournamentLeaderboardUserItem.serializeBinaryToWriter = function(message, writer) {
10570
+ var f = undefined;
10571
+ f = message.getUserId();
10572
+ if (f !== 0) {
10573
+ writer.writeInt32(
10574
+ 1,
10575
+ f
10576
+ );
10577
+ }
10578
+ f = message.getRank();
10579
+ if (f !== 0) {
10580
+ writer.writeInt32(
10581
+ 2,
10582
+ f
10583
+ );
10584
+ }
10585
+ f = message.getScore();
10586
+ if (f !== 0.0) {
10587
+ writer.writeDouble(
10588
+ 3,
10589
+ f
10590
+ );
10591
+ }
10592
+ };
10593
+
10594
+
10595
+ /**
10596
+ * optional int32 user_id = 1;
10597
+ * @return {number}
10598
+ */
10599
+ proto.tournament.TournamentLeaderboardUserItem.prototype.getUserId = function() {
10600
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
10601
+ };
10602
+
10603
+
10604
+ /**
10605
+ * @param {number} value
10606
+ * @return {!proto.tournament.TournamentLeaderboardUserItem} returns this
10607
+ */
10608
+ proto.tournament.TournamentLeaderboardUserItem.prototype.setUserId = function(value) {
10609
+ return jspb.Message.setProto3IntField(this, 1, value);
10610
+ };
10611
+
10612
+
10613
+ /**
10614
+ * optional int32 rank = 2;
10615
+ * @return {number}
10616
+ */
10617
+ proto.tournament.TournamentLeaderboardUserItem.prototype.getRank = function() {
10618
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
10619
+ };
10620
+
10621
+
10622
+ /**
10623
+ * @param {number} value
10624
+ * @return {!proto.tournament.TournamentLeaderboardUserItem} returns this
10625
+ */
10626
+ proto.tournament.TournamentLeaderboardUserItem.prototype.setRank = function(value) {
10627
+ return jspb.Message.setProto3IntField(this, 2, value);
10628
+ };
10629
+
10630
+
10631
+ /**
10632
+ * optional double score = 3;
10633
+ * @return {number}
10634
+ */
10635
+ proto.tournament.TournamentLeaderboardUserItem.prototype.getScore = function() {
10636
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0));
10637
+ };
10638
+
10639
+
10640
+ /**
10641
+ * @param {number} value
10642
+ * @return {!proto.tournament.TournamentLeaderboardUserItem} returns this
10643
+ */
10644
+ proto.tournament.TournamentLeaderboardUserItem.prototype.setScore = function(value) {
10645
+ return jspb.Message.setProto3FloatField(this, 3, value);
10646
+ };
10647
+
10648
+
10649
+
10650
+ /**
10651
+ * List of repeated fields within this message type.
10652
+ * @private {!Array<number>}
10653
+ * @const
10654
+ */
10655
+ proto.tournament.TournamentLeaderboardResponse.repeatedFields_ = [1];
10656
+
10657
+
10658
+
10659
+ if (jspb.Message.GENERATE_TO_OBJECT) {
10660
+ /**
10661
+ * Creates an object representation of this proto.
10662
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
10663
+ * Optional fields that are not set will be set to undefined.
10664
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
10665
+ * For the list of reserved names please see:
10666
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
10667
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
10668
+ * JSPB instance for transitional soy proto support:
10669
+ * http://goto/soy-param-migration
10670
+ * @return {!Object}
10671
+ */
10672
+ proto.tournament.TournamentLeaderboardResponse.prototype.toObject = function(opt_includeInstance) {
10673
+ return proto.tournament.TournamentLeaderboardResponse.toObject(opt_includeInstance, this);
10674
+ };
10675
+
10676
+
10677
+ /**
10678
+ * Static version of the {@see toObject} method.
10679
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
10680
+ * the JSPB instance for transitional soy proto support:
10681
+ * http://goto/soy-param-migration
10682
+ * @param {!proto.tournament.TournamentLeaderboardResponse} msg The msg instance to transform.
10683
+ * @return {!Object}
10684
+ * @suppress {unusedLocalVariables} f is only used for nested messages
10685
+ */
10686
+ proto.tournament.TournamentLeaderboardResponse.toObject = function(includeInstance, msg) {
10687
+ var f, obj = {
10688
+ top20List: jspb.Message.toObjectList(msg.getTop20List(),
10689
+ proto.tournament.TournamentLeaderboardUserItem.toObject, includeInstance),
10690
+ myPosition: (f = msg.getMyPosition()) && proto.tournament.TournamentLeaderboardUserItem.toObject(includeInstance, f)
10691
+ };
10692
+
10693
+ if (includeInstance) {
10694
+ obj.$jspbMessageInstance = msg;
10695
+ }
10696
+ return obj;
10697
+ };
10698
+ }
10699
+
10700
+
10701
+ /**
10702
+ * Deserializes binary data (in protobuf wire format).
10703
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
10704
+ * @return {!proto.tournament.TournamentLeaderboardResponse}
10705
+ */
10706
+ proto.tournament.TournamentLeaderboardResponse.deserializeBinary = function(bytes) {
10707
+ var reader = new jspb.BinaryReader(bytes);
10708
+ var msg = new proto.tournament.TournamentLeaderboardResponse;
10709
+ return proto.tournament.TournamentLeaderboardResponse.deserializeBinaryFromReader(msg, reader);
10710
+ };
10711
+
10712
+
10713
+ /**
10714
+ * Deserializes binary data (in protobuf wire format) from the
10715
+ * given reader into the given message object.
10716
+ * @param {!proto.tournament.TournamentLeaderboardResponse} msg The message object to deserialize into.
10717
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
10718
+ * @return {!proto.tournament.TournamentLeaderboardResponse}
10719
+ */
10720
+ proto.tournament.TournamentLeaderboardResponse.deserializeBinaryFromReader = function(msg, reader) {
10721
+ while (reader.nextField()) {
10722
+ if (reader.isEndGroup()) {
10723
+ break;
10724
+ }
10725
+ var field = reader.getFieldNumber();
10726
+ switch (field) {
10727
+ case 1:
10728
+ var value = new proto.tournament.TournamentLeaderboardUserItem;
10729
+ reader.readMessage(value,proto.tournament.TournamentLeaderboardUserItem.deserializeBinaryFromReader);
10730
+ msg.addTop20(value);
10731
+ break;
10732
+ case 2:
10733
+ var value = new proto.tournament.TournamentLeaderboardUserItem;
10734
+ reader.readMessage(value,proto.tournament.TournamentLeaderboardUserItem.deserializeBinaryFromReader);
10735
+ msg.setMyPosition(value);
10736
+ break;
10737
+ default:
10738
+ reader.skipField();
10739
+ break;
10740
+ }
10741
+ }
10742
+ return msg;
10743
+ };
10744
+
10745
+
10746
+ /**
10747
+ * Serializes the message to binary data (in protobuf wire format).
10748
+ * @return {!Uint8Array}
10749
+ */
10750
+ proto.tournament.TournamentLeaderboardResponse.prototype.serializeBinary = function() {
10751
+ var writer = new jspb.BinaryWriter();
10752
+ proto.tournament.TournamentLeaderboardResponse.serializeBinaryToWriter(this, writer);
10753
+ return writer.getResultBuffer();
10754
+ };
10755
+
10756
+
10757
+ /**
10758
+ * Serializes the given message to binary data (in protobuf wire
10759
+ * format), writing to the given BinaryWriter.
10760
+ * @param {!proto.tournament.TournamentLeaderboardResponse} message
10761
+ * @param {!jspb.BinaryWriter} writer
10762
+ * @suppress {unusedLocalVariables} f is only used for nested messages
10763
+ */
10764
+ proto.tournament.TournamentLeaderboardResponse.serializeBinaryToWriter = function(message, writer) {
10765
+ var f = undefined;
10766
+ f = message.getTop20List();
10767
+ if (f.length > 0) {
10768
+ writer.writeRepeatedMessage(
10769
+ 1,
10770
+ f,
10771
+ proto.tournament.TournamentLeaderboardUserItem.serializeBinaryToWriter
10772
+ );
10773
+ }
10774
+ f = message.getMyPosition();
10775
+ if (f != null) {
10776
+ writer.writeMessage(
10777
+ 2,
10778
+ f,
10779
+ proto.tournament.TournamentLeaderboardUserItem.serializeBinaryToWriter
10780
+ );
10781
+ }
10782
+ };
10783
+
10784
+
10785
+ /**
10786
+ * repeated TournamentLeaderboardUserItem top20 = 1;
10787
+ * @return {!Array<!proto.tournament.TournamentLeaderboardUserItem>}
10788
+ */
10789
+ proto.tournament.TournamentLeaderboardResponse.prototype.getTop20List = function() {
10790
+ return /** @type{!Array<!proto.tournament.TournamentLeaderboardUserItem>} */ (
10791
+ jspb.Message.getRepeatedWrapperField(this, proto.tournament.TournamentLeaderboardUserItem, 1));
10792
+ };
10793
+
10794
+
10795
+ /**
10796
+ * @param {!Array<!proto.tournament.TournamentLeaderboardUserItem>} value
10797
+ * @return {!proto.tournament.TournamentLeaderboardResponse} returns this
10798
+ */
10799
+ proto.tournament.TournamentLeaderboardResponse.prototype.setTop20List = function(value) {
10800
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
10801
+ };
10802
+
10803
+
10804
+ /**
10805
+ * @param {!proto.tournament.TournamentLeaderboardUserItem=} opt_value
10806
+ * @param {number=} opt_index
10807
+ * @return {!proto.tournament.TournamentLeaderboardUserItem}
10808
+ */
10809
+ proto.tournament.TournamentLeaderboardResponse.prototype.addTop20 = function(opt_value, opt_index) {
10810
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.tournament.TournamentLeaderboardUserItem, opt_index);
10811
+ };
10812
+
10813
+
10814
+ /**
10815
+ * Clears the list making it empty but non-null.
10816
+ * @return {!proto.tournament.TournamentLeaderboardResponse} returns this
10817
+ */
10818
+ proto.tournament.TournamentLeaderboardResponse.prototype.clearTop20List = function() {
10819
+ return this.setTop20List([]);
10820
+ };
10821
+
10822
+
10823
+ /**
10824
+ * optional TournamentLeaderboardUserItem my_position = 2;
10825
+ * @return {?proto.tournament.TournamentLeaderboardUserItem}
10826
+ */
10827
+ proto.tournament.TournamentLeaderboardResponse.prototype.getMyPosition = function() {
10828
+ return /** @type{?proto.tournament.TournamentLeaderboardUserItem} */ (
10829
+ jspb.Message.getWrapperField(this, proto.tournament.TournamentLeaderboardUserItem, 2));
10830
+ };
10831
+
10832
+
10833
+ /**
10834
+ * @param {?proto.tournament.TournamentLeaderboardUserItem|undefined} value
10835
+ * @return {!proto.tournament.TournamentLeaderboardResponse} returns this
10836
+ */
10837
+ proto.tournament.TournamentLeaderboardResponse.prototype.setMyPosition = function(value) {
10838
+ return jspb.Message.setWrapperField(this, 2, value);
10839
+ };
10840
+
10841
+
10842
+ /**
10843
+ * Clears the message field making it undefined.
10844
+ * @return {!proto.tournament.TournamentLeaderboardResponse} returns this
10845
+ */
10846
+ proto.tournament.TournamentLeaderboardResponse.prototype.clearMyPosition = function() {
10847
+ return this.setMyPosition(undefined);
10848
+ };
10849
+
10850
+
10851
+ /**
10852
+ * Returns whether this field is set.
10853
+ * @return {boolean}
10854
+ */
10855
+ proto.tournament.TournamentLeaderboardResponse.prototype.hasMyPosition = function() {
10856
+ return jspb.Message.getField(this, 2) != null;
10857
+ };
10858
+
10859
+
10860
+
10861
+ /**
10862
+ * List of repeated fields within this message type.
10863
+ * @private {!Array<number>}
10864
+ * @const
10865
+ */
10866
+ proto.tournament.ResolveAutoTournamentForGameSessionRequest.repeatedFields_ = [2];
10867
+
10868
+
10869
+
10870
+ if (jspb.Message.GENERATE_TO_OBJECT) {
10871
+ /**
10872
+ * Creates an object representation of this proto.
10873
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
10874
+ * Optional fields that are not set will be set to undefined.
10875
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
10876
+ * For the list of reserved names please see:
10877
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
10878
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
10879
+ * JSPB instance for transitional soy proto support:
10880
+ * http://goto/soy-param-migration
10881
+ * @return {!Object}
10882
+ */
10883
+ proto.tournament.ResolveAutoTournamentForGameSessionRequest.prototype.toObject = function(opt_includeInstance) {
10884
+ return proto.tournament.ResolveAutoTournamentForGameSessionRequest.toObject(opt_includeInstance, this);
10885
+ };
10886
+
10887
+
10888
+ /**
10889
+ * Static version of the {@see toObject} method.
10890
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
10891
+ * the JSPB instance for transitional soy proto support:
10892
+ * http://goto/soy-param-migration
10893
+ * @param {!proto.tournament.ResolveAutoTournamentForGameSessionRequest} msg The msg instance to transform.
10894
+ * @return {!Object}
10895
+ * @suppress {unusedLocalVariables} f is only used for nested messages
10896
+ */
10897
+ proto.tournament.ResolveAutoTournamentForGameSessionRequest.toObject = function(includeInstance, msg) {
10898
+ var f, obj = {
10899
+ userId: jspb.Message.getFieldWithDefault(msg, 1, 0),
10900
+ tournamentIdsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f
10901
+ };
10902
+
10903
+ if (includeInstance) {
10904
+ obj.$jspbMessageInstance = msg;
10905
+ }
10906
+ return obj;
10907
+ };
10908
+ }
10909
+
10910
+
10911
+ /**
10912
+ * Deserializes binary data (in protobuf wire format).
10913
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
10914
+ * @return {!proto.tournament.ResolveAutoTournamentForGameSessionRequest}
10915
+ */
10916
+ proto.tournament.ResolveAutoTournamentForGameSessionRequest.deserializeBinary = function(bytes) {
10917
+ var reader = new jspb.BinaryReader(bytes);
10918
+ var msg = new proto.tournament.ResolveAutoTournamentForGameSessionRequest;
10919
+ return proto.tournament.ResolveAutoTournamentForGameSessionRequest.deserializeBinaryFromReader(msg, reader);
10920
+ };
10921
+
10922
+
10923
+ /**
10924
+ * Deserializes binary data (in protobuf wire format) from the
10925
+ * given reader into the given message object.
10926
+ * @param {!proto.tournament.ResolveAutoTournamentForGameSessionRequest} msg The message object to deserialize into.
10927
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
10928
+ * @return {!proto.tournament.ResolveAutoTournamentForGameSessionRequest}
10929
+ */
10930
+ proto.tournament.ResolveAutoTournamentForGameSessionRequest.deserializeBinaryFromReader = function(msg, reader) {
10931
+ while (reader.nextField()) {
10932
+ if (reader.isEndGroup()) {
10933
+ break;
10934
+ }
10935
+ var field = reader.getFieldNumber();
10936
+ switch (field) {
10937
+ case 1:
10938
+ var value = /** @type {number} */ (reader.readUint64());
10939
+ msg.setUserId(value);
10940
+ break;
10941
+ case 2:
10942
+ var values = /** @type {!Array<number>} */ (reader.isDelimited() ? reader.readPackedUint64() : [reader.readUint64()]);
10943
+ for (var i = 0; i < values.length; i++) {
10944
+ msg.addTournamentIds(values[i]);
10945
+ }
10946
+ break;
10947
+ default:
10948
+ reader.skipField();
10949
+ break;
10950
+ }
10951
+ }
10952
+ return msg;
10953
+ };
10954
+
10955
+
10956
+ /**
10957
+ * Serializes the message to binary data (in protobuf wire format).
10958
+ * @return {!Uint8Array}
10959
+ */
10960
+ proto.tournament.ResolveAutoTournamentForGameSessionRequest.prototype.serializeBinary = function() {
10961
+ var writer = new jspb.BinaryWriter();
10962
+ proto.tournament.ResolveAutoTournamentForGameSessionRequest.serializeBinaryToWriter(this, writer);
10963
+ return writer.getResultBuffer();
10964
+ };
10965
+
10966
+
10967
+ /**
10968
+ * Serializes the given message to binary data (in protobuf wire
10969
+ * format), writing to the given BinaryWriter.
10970
+ * @param {!proto.tournament.ResolveAutoTournamentForGameSessionRequest} message
10971
+ * @param {!jspb.BinaryWriter} writer
10972
+ * @suppress {unusedLocalVariables} f is only used for nested messages
10973
+ */
10974
+ proto.tournament.ResolveAutoTournamentForGameSessionRequest.serializeBinaryToWriter = function(message, writer) {
10975
+ var f = undefined;
10976
+ f = message.getUserId();
10977
+ if (f !== 0) {
10978
+ writer.writeUint64(
10979
+ 1,
10980
+ f
10981
+ );
10982
+ }
10983
+ f = message.getTournamentIdsList();
10984
+ if (f.length > 0) {
10985
+ writer.writePackedUint64(
10986
+ 2,
10987
+ f
10988
+ );
10989
+ }
10990
+ };
10991
+
10992
+
10993
+ /**
10994
+ * optional uint64 user_id = 1;
10995
+ * @return {number}
10996
+ */
10997
+ proto.tournament.ResolveAutoTournamentForGameSessionRequest.prototype.getUserId = function() {
10998
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
10999
+ };
11000
+
11001
+
11002
+ /**
11003
+ * @param {number} value
11004
+ * @return {!proto.tournament.ResolveAutoTournamentForGameSessionRequest} returns this
11005
+ */
11006
+ proto.tournament.ResolveAutoTournamentForGameSessionRequest.prototype.setUserId = function(value) {
11007
+ return jspb.Message.setProto3IntField(this, 1, value);
11008
+ };
11009
+
11010
+
11011
+ /**
11012
+ * repeated uint64 tournament_ids = 2;
11013
+ * @return {!Array<number>}
11014
+ */
11015
+ proto.tournament.ResolveAutoTournamentForGameSessionRequest.prototype.getTournamentIdsList = function() {
11016
+ return /** @type {!Array<number>} */ (jspb.Message.getRepeatedField(this, 2));
11017
+ };
11018
+
11019
+
11020
+ /**
11021
+ * @param {!Array<number>} value
11022
+ * @return {!proto.tournament.ResolveAutoTournamentForGameSessionRequest} returns this
11023
+ */
11024
+ proto.tournament.ResolveAutoTournamentForGameSessionRequest.prototype.setTournamentIdsList = function(value) {
11025
+ return jspb.Message.setField(this, 2, value || []);
11026
+ };
11027
+
11028
+
11029
+ /**
11030
+ * @param {number} value
11031
+ * @param {number=} opt_index
11032
+ * @return {!proto.tournament.ResolveAutoTournamentForGameSessionRequest} returns this
11033
+ */
11034
+ proto.tournament.ResolveAutoTournamentForGameSessionRequest.prototype.addTournamentIds = function(value, opt_index) {
11035
+ return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
11036
+ };
11037
+
11038
+
11039
+ /**
11040
+ * Clears the list making it empty but non-null.
11041
+ * @return {!proto.tournament.ResolveAutoTournamentForGameSessionRequest} returns this
11042
+ */
11043
+ proto.tournament.ResolveAutoTournamentForGameSessionRequest.prototype.clearTournamentIdsList = function() {
11044
+ return this.setTournamentIdsList([]);
11045
+ };
11046
+
11047
+
11048
+
11049
+
11050
+
11051
+ if (jspb.Message.GENERATE_TO_OBJECT) {
11052
+ /**
11053
+ * Creates an object representation of this proto.
11054
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
11055
+ * Optional fields that are not set will be set to undefined.
11056
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
11057
+ * For the list of reserved names please see:
11058
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
11059
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
11060
+ * JSPB instance for transitional soy proto support:
11061
+ * http://goto/soy-param-migration
11062
+ * @return {!Object}
11063
+ */
11064
+ proto.tournament.ResolveAutoTournamentForGameSessionResponse.prototype.toObject = function(opt_includeInstance) {
11065
+ return proto.tournament.ResolveAutoTournamentForGameSessionResponse.toObject(opt_includeInstance, this);
11066
+ };
11067
+
11068
+
11069
+ /**
11070
+ * Static version of the {@see toObject} method.
11071
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
11072
+ * the JSPB instance for transitional soy proto support:
11073
+ * http://goto/soy-param-migration
11074
+ * @param {!proto.tournament.ResolveAutoTournamentForGameSessionResponse} msg The msg instance to transform.
11075
+ * @return {!Object}
11076
+ * @suppress {unusedLocalVariables} f is only used for nested messages
11077
+ */
11078
+ proto.tournament.ResolveAutoTournamentForGameSessionResponse.toObject = function(includeInstance, msg) {
11079
+ var f, obj = {
11080
+ tournamentId: jspb.Message.getFieldWithDefault(msg, 1, 0),
11081
+ isEligible: jspb.Message.getBooleanFieldWithDefault(msg, 2, false)
11082
+ };
11083
+
11084
+ if (includeInstance) {
11085
+ obj.$jspbMessageInstance = msg;
11086
+ }
11087
+ return obj;
11088
+ };
11089
+ }
11090
+
11091
+
11092
+ /**
11093
+ * Deserializes binary data (in protobuf wire format).
11094
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
11095
+ * @return {!proto.tournament.ResolveAutoTournamentForGameSessionResponse}
11096
+ */
11097
+ proto.tournament.ResolveAutoTournamentForGameSessionResponse.deserializeBinary = function(bytes) {
11098
+ var reader = new jspb.BinaryReader(bytes);
11099
+ var msg = new proto.tournament.ResolveAutoTournamentForGameSessionResponse;
11100
+ return proto.tournament.ResolveAutoTournamentForGameSessionResponse.deserializeBinaryFromReader(msg, reader);
11101
+ };
11102
+
11103
+
11104
+ /**
11105
+ * Deserializes binary data (in protobuf wire format) from the
11106
+ * given reader into the given message object.
11107
+ * @param {!proto.tournament.ResolveAutoTournamentForGameSessionResponse} msg The message object to deserialize into.
11108
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
11109
+ * @return {!proto.tournament.ResolveAutoTournamentForGameSessionResponse}
11110
+ */
11111
+ proto.tournament.ResolveAutoTournamentForGameSessionResponse.deserializeBinaryFromReader = function(msg, reader) {
11112
+ while (reader.nextField()) {
11113
+ if (reader.isEndGroup()) {
11114
+ break;
11115
+ }
11116
+ var field = reader.getFieldNumber();
11117
+ switch (field) {
11118
+ case 1:
11119
+ var value = /** @type {number} */ (reader.readUint64());
11120
+ msg.setTournamentId(value);
11121
+ break;
11122
+ case 2:
11123
+ var value = /** @type {boolean} */ (reader.readBool());
11124
+ msg.setIsEligible(value);
11125
+ break;
11126
+ default:
11127
+ reader.skipField();
11128
+ break;
11129
+ }
11130
+ }
11131
+ return msg;
11132
+ };
11133
+
11134
+
11135
+ /**
11136
+ * Serializes the message to binary data (in protobuf wire format).
11137
+ * @return {!Uint8Array}
11138
+ */
11139
+ proto.tournament.ResolveAutoTournamentForGameSessionResponse.prototype.serializeBinary = function() {
11140
+ var writer = new jspb.BinaryWriter();
11141
+ proto.tournament.ResolveAutoTournamentForGameSessionResponse.serializeBinaryToWriter(this, writer);
11142
+ return writer.getResultBuffer();
11143
+ };
11144
+
11145
+
11146
+ /**
11147
+ * Serializes the given message to binary data (in protobuf wire
11148
+ * format), writing to the given BinaryWriter.
11149
+ * @param {!proto.tournament.ResolveAutoTournamentForGameSessionResponse} message
11150
+ * @param {!jspb.BinaryWriter} writer
11151
+ * @suppress {unusedLocalVariables} f is only used for nested messages
11152
+ */
11153
+ proto.tournament.ResolveAutoTournamentForGameSessionResponse.serializeBinaryToWriter = function(message, writer) {
11154
+ var f = undefined;
11155
+ f = message.getTournamentId();
11156
+ if (f !== 0) {
11157
+ writer.writeUint64(
11158
+ 1,
11159
+ f
11160
+ );
11161
+ }
11162
+ f = message.getIsEligible();
11163
+ if (f) {
11164
+ writer.writeBool(
11165
+ 2,
11166
+ f
11167
+ );
11168
+ }
11169
+ };
11170
+
11171
+
11172
+ /**
11173
+ * optional uint64 tournament_id = 1;
11174
+ * @return {number}
11175
+ */
11176
+ proto.tournament.ResolveAutoTournamentForGameSessionResponse.prototype.getTournamentId = function() {
11177
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
11178
+ };
11179
+
11180
+
11181
+ /**
11182
+ * @param {number} value
11183
+ * @return {!proto.tournament.ResolveAutoTournamentForGameSessionResponse} returns this
11184
+ */
11185
+ proto.tournament.ResolveAutoTournamentForGameSessionResponse.prototype.setTournamentId = function(value) {
11186
+ return jspb.Message.setProto3IntField(this, 1, value);
11187
+ };
11188
+
11189
+
11190
+ /**
11191
+ * optional bool is_eligible = 2;
11192
+ * @return {boolean}
11193
+ */
11194
+ proto.tournament.ResolveAutoTournamentForGameSessionResponse.prototype.getIsEligible = function() {
11195
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));
11196
+ };
11197
+
11198
+
11199
+ /**
11200
+ * @param {boolean} value
11201
+ * @return {!proto.tournament.ResolveAutoTournamentForGameSessionResponse} returns this
11202
+ */
11203
+ proto.tournament.ResolveAutoTournamentForGameSessionResponse.prototype.setIsEligible = function(value) {
11204
+ return jspb.Message.setProto3BooleanField(this, 2, value);
11205
+ };
11206
+
11207
+
10171
11208
  goog.object.extend(exports, proto.tournament);