protobuf-platform 1.1.9 → 1.1.11

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.1.9",
3
+ "version": "1.1.11",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -15,9 +15,11 @@ service Tournament {
15
15
  rpc setTournamentScoringRule(TournamentScoringRuleRequest) returns (TournamentStatusResponse);
16
16
  rpc setTournamentRewards(TournamentRewardsRequest) returns (TournamentStatusResponse);
17
17
  rpc setTournamentContent(TournamentContentRequest) returns (TournamentStatusResponse);
18
+ rpc addGamesIntoTournament(TournamentGamesRequest) returns (TournamentStatusResponse);
19
+ rpc removeGamesFromTournament(TournamentGamesRequest) returns (TournamentStatusResponse);
18
20
  //Tournament Statuses
19
21
  rpc readListTournamentStatuses(PaginationRequest) returns (TournamentStatusItemsResponse);
20
- rpc getTournamentsForUser(PaginationRequest) returns (TournamentStatusItemsResponse);
22
+ rpc getTournamentsForUser(PaginationRequest) returns (UserTournamentItemsResponse);
21
23
  }
22
24
  //Technical
23
25
  message PingRequest { string ping = 1; }
@@ -150,3 +152,27 @@ message TournamentContentRequest {
150
152
  string locale = 2;
151
153
  string content = 3;
152
154
  }
155
+ message TournamentGamesRequest {
156
+ int32 tournament_id = 1;
157
+ repeated int32 game_ids = 2;
158
+ }
159
+ //User
160
+ message UserTournamentItem {
161
+ optional int32 id = 1;
162
+ optional string title = 2;
163
+ optional string description = 3;
164
+ optional int32 current_members_count = 4;
165
+ optional int32 max_members_count = 5;
166
+ optional string started_at = 6;
167
+ optional string finished_at = 7;
168
+ optional string status = 8;
169
+ optional string image = 9;
170
+ repeated ActivationRuleItem rules = 10;
171
+ repeated RewardItem rewards = 11;
172
+ optional string content = 12;
173
+ }
174
+ message UserTournamentItemsResponse {
175
+ repeated UserTournamentItem items = 1;
176
+ optional int32 total_pages = 2;
177
+ optional int32 total_items = 3;
178
+ }
@@ -92,6 +92,17 @@ function deserialize_tournament_TournamentContentRequest(buffer_arg) {
92
92
  return tournament_pb.TournamentContentRequest.deserializeBinary(new Uint8Array(buffer_arg));
93
93
  }
94
94
 
95
+ function serialize_tournament_TournamentGamesRequest(arg) {
96
+ if (!(arg instanceof tournament_pb.TournamentGamesRequest)) {
97
+ throw new Error('Expected argument of type tournament.TournamentGamesRequest');
98
+ }
99
+ return Buffer.from(arg.serializeBinary());
100
+ }
101
+
102
+ function deserialize_tournament_TournamentGamesRequest(buffer_arg) {
103
+ return tournament_pb.TournamentGamesRequest.deserializeBinary(new Uint8Array(buffer_arg));
104
+ }
105
+
95
106
  function serialize_tournament_TournamentItemsResponse(arg) {
96
107
  if (!(arg instanceof tournament_pb.TournamentItemsResponse)) {
97
108
  throw new Error('Expected argument of type tournament.TournamentItemsResponse');
@@ -169,6 +180,17 @@ function deserialize_tournament_TournamentStatusResponse(buffer_arg) {
169
180
  return tournament_pb.TournamentStatusResponse.deserializeBinary(new Uint8Array(buffer_arg));
170
181
  }
171
182
 
183
+ function serialize_tournament_UserTournamentItemsResponse(arg) {
184
+ if (!(arg instanceof tournament_pb.UserTournamentItemsResponse)) {
185
+ throw new Error('Expected argument of type tournament.UserTournamentItemsResponse');
186
+ }
187
+ return Buffer.from(arg.serializeBinary());
188
+ }
189
+
190
+ function deserialize_tournament_UserTournamentItemsResponse(buffer_arg) {
191
+ return tournament_pb.UserTournamentItemsResponse.deserializeBinary(new Uint8Array(buffer_arg));
192
+ }
193
+
172
194
 
173
195
  var TournamentService = exports.TournamentService = {
174
196
  checkConnection: {
@@ -293,6 +315,28 @@ createSingleTournament: {
293
315
  responseSerialize: serialize_tournament_TournamentStatusResponse,
294
316
  responseDeserialize: deserialize_tournament_TournamentStatusResponse,
295
317
  },
318
+ addGamesIntoTournament: {
319
+ path: '/tournament.Tournament/addGamesIntoTournament',
320
+ requestStream: false,
321
+ responseStream: false,
322
+ requestType: tournament_pb.TournamentGamesRequest,
323
+ responseType: tournament_pb.TournamentStatusResponse,
324
+ requestSerialize: serialize_tournament_TournamentGamesRequest,
325
+ requestDeserialize: deserialize_tournament_TournamentGamesRequest,
326
+ responseSerialize: serialize_tournament_TournamentStatusResponse,
327
+ responseDeserialize: deserialize_tournament_TournamentStatusResponse,
328
+ },
329
+ removeGamesFromTournament: {
330
+ path: '/tournament.Tournament/removeGamesFromTournament',
331
+ requestStream: false,
332
+ responseStream: false,
333
+ requestType: tournament_pb.TournamentGamesRequest,
334
+ responseType: tournament_pb.TournamentStatusResponse,
335
+ requestSerialize: serialize_tournament_TournamentGamesRequest,
336
+ requestDeserialize: deserialize_tournament_TournamentGamesRequest,
337
+ responseSerialize: serialize_tournament_TournamentStatusResponse,
338
+ responseDeserialize: deserialize_tournament_TournamentStatusResponse,
339
+ },
296
340
  // Tournament Statuses
297
341
  readListTournamentStatuses: {
298
342
  path: '/tournament.Tournament/readListTournamentStatuses',
@@ -310,11 +354,11 @@ readListTournamentStatuses: {
310
354
  requestStream: false,
311
355
  responseStream: false,
312
356
  requestType: tournament_pb.PaginationRequest,
313
- responseType: tournament_pb.TournamentStatusItemsResponse,
357
+ responseType: tournament_pb.UserTournamentItemsResponse,
314
358
  requestSerialize: serialize_tournament_PaginationRequest,
315
359
  requestDeserialize: deserialize_tournament_PaginationRequest,
316
- responseSerialize: serialize_tournament_TournamentStatusItemsResponse,
317
- responseDeserialize: deserialize_tournament_TournamentStatusItemsResponse,
360
+ responseSerialize: serialize_tournament_UserTournamentItemsResponse,
361
+ responseDeserialize: deserialize_tournament_UserTournamentItemsResponse,
318
362
  },
319
363
  };
320
364
 
@@ -33,6 +33,7 @@ goog.exportSymbol('proto.tournament.RewardItem', null, global);
33
33
  goog.exportSymbol('proto.tournament.ScoringRule', null, global);
34
34
  goog.exportSymbol('proto.tournament.TournamentActivationRuleRequest', null, global);
35
35
  goog.exportSymbol('proto.tournament.TournamentContentRequest', null, global);
36
+ goog.exportSymbol('proto.tournament.TournamentGamesRequest', null, global);
36
37
  goog.exportSymbol('proto.tournament.TournamentItem', null, global);
37
38
  goog.exportSymbol('proto.tournament.TournamentItemRequest', null, global);
38
39
  goog.exportSymbol('proto.tournament.TournamentItemsResponse', null, global);
@@ -45,6 +46,8 @@ goog.exportSymbol('proto.tournament.TournamentStatusItem', null, global);
45
46
  goog.exportSymbol('proto.tournament.TournamentStatusItemsResponse', null, global);
46
47
  goog.exportSymbol('proto.tournament.TournamentStatusResponse', null, global);
47
48
  goog.exportSymbol('proto.tournament.UserSearchRequest', null, global);
49
+ goog.exportSymbol('proto.tournament.UserTournamentItem', null, global);
50
+ goog.exportSymbol('proto.tournament.UserTournamentItemsResponse', null, global);
48
51
  /**
49
52
  * Generated by JsPbCodeGenerator.
50
53
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -528,6 +531,69 @@ if (goog.DEBUG && !COMPILED) {
528
531
  */
529
532
  proto.tournament.TournamentContentRequest.displayName = 'proto.tournament.TournamentContentRequest';
530
533
  }
534
+ /**
535
+ * Generated by JsPbCodeGenerator.
536
+ * @param {Array=} opt_data Optional initial data array, typically from a
537
+ * server response, or constructed directly in Javascript. The array is used
538
+ * in place and becomes part of the constructed object. It is not cloned.
539
+ * If no data is provided, the constructed object will be empty, but still
540
+ * valid.
541
+ * @extends {jspb.Message}
542
+ * @constructor
543
+ */
544
+ proto.tournament.TournamentGamesRequest = function(opt_data) {
545
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.tournament.TournamentGamesRequest.repeatedFields_, null);
546
+ };
547
+ goog.inherits(proto.tournament.TournamentGamesRequest, jspb.Message);
548
+ if (goog.DEBUG && !COMPILED) {
549
+ /**
550
+ * @public
551
+ * @override
552
+ */
553
+ proto.tournament.TournamentGamesRequest.displayName = 'proto.tournament.TournamentGamesRequest';
554
+ }
555
+ /**
556
+ * Generated by JsPbCodeGenerator.
557
+ * @param {Array=} opt_data Optional initial data array, typically from a
558
+ * server response, or constructed directly in Javascript. The array is used
559
+ * in place and becomes part of the constructed object. It is not cloned.
560
+ * If no data is provided, the constructed object will be empty, but still
561
+ * valid.
562
+ * @extends {jspb.Message}
563
+ * @constructor
564
+ */
565
+ proto.tournament.UserTournamentItem = function(opt_data) {
566
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.tournament.UserTournamentItem.repeatedFields_, null);
567
+ };
568
+ goog.inherits(proto.tournament.UserTournamentItem, jspb.Message);
569
+ if (goog.DEBUG && !COMPILED) {
570
+ /**
571
+ * @public
572
+ * @override
573
+ */
574
+ proto.tournament.UserTournamentItem.displayName = 'proto.tournament.UserTournamentItem';
575
+ }
576
+ /**
577
+ * Generated by JsPbCodeGenerator.
578
+ * @param {Array=} opt_data Optional initial data array, typically from a
579
+ * server response, or constructed directly in Javascript. The array is used
580
+ * in place and becomes part of the constructed object. It is not cloned.
581
+ * If no data is provided, the constructed object will be empty, but still
582
+ * valid.
583
+ * @extends {jspb.Message}
584
+ * @constructor
585
+ */
586
+ proto.tournament.UserTournamentItemsResponse = function(opt_data) {
587
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.tournament.UserTournamentItemsResponse.repeatedFields_, null);
588
+ };
589
+ goog.inherits(proto.tournament.UserTournamentItemsResponse, jspb.Message);
590
+ if (goog.DEBUG && !COMPILED) {
591
+ /**
592
+ * @public
593
+ * @override
594
+ */
595
+ proto.tournament.UserTournamentItemsResponse.displayName = 'proto.tournament.UserTournamentItemsResponse';
596
+ }
531
597
 
532
598
 
533
599
 
@@ -7183,4 +7249,1141 @@ proto.tournament.TournamentContentRequest.prototype.setContent = function(value)
7183
7249
  };
7184
7250
 
7185
7251
 
7252
+
7253
+ /**
7254
+ * List of repeated fields within this message type.
7255
+ * @private {!Array<number>}
7256
+ * @const
7257
+ */
7258
+ proto.tournament.TournamentGamesRequest.repeatedFields_ = [2];
7259
+
7260
+
7261
+
7262
+ if (jspb.Message.GENERATE_TO_OBJECT) {
7263
+ /**
7264
+ * Creates an object representation of this proto.
7265
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
7266
+ * Optional fields that are not set will be set to undefined.
7267
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
7268
+ * For the list of reserved names please see:
7269
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
7270
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
7271
+ * JSPB instance for transitional soy proto support:
7272
+ * http://goto/soy-param-migration
7273
+ * @return {!Object}
7274
+ */
7275
+ proto.tournament.TournamentGamesRequest.prototype.toObject = function(opt_includeInstance) {
7276
+ return proto.tournament.TournamentGamesRequest.toObject(opt_includeInstance, this);
7277
+ };
7278
+
7279
+
7280
+ /**
7281
+ * Static version of the {@see toObject} method.
7282
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
7283
+ * the JSPB instance for transitional soy proto support:
7284
+ * http://goto/soy-param-migration
7285
+ * @param {!proto.tournament.TournamentGamesRequest} msg The msg instance to transform.
7286
+ * @return {!Object}
7287
+ * @suppress {unusedLocalVariables} f is only used for nested messages
7288
+ */
7289
+ proto.tournament.TournamentGamesRequest.toObject = function(includeInstance, msg) {
7290
+ var f, obj = {
7291
+ tournamentId: jspb.Message.getFieldWithDefault(msg, 1, 0),
7292
+ gameIdsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f
7293
+ };
7294
+
7295
+ if (includeInstance) {
7296
+ obj.$jspbMessageInstance = msg;
7297
+ }
7298
+ return obj;
7299
+ };
7300
+ }
7301
+
7302
+
7303
+ /**
7304
+ * Deserializes binary data (in protobuf wire format).
7305
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
7306
+ * @return {!proto.tournament.TournamentGamesRequest}
7307
+ */
7308
+ proto.tournament.TournamentGamesRequest.deserializeBinary = function(bytes) {
7309
+ var reader = new jspb.BinaryReader(bytes);
7310
+ var msg = new proto.tournament.TournamentGamesRequest;
7311
+ return proto.tournament.TournamentGamesRequest.deserializeBinaryFromReader(msg, reader);
7312
+ };
7313
+
7314
+
7315
+ /**
7316
+ * Deserializes binary data (in protobuf wire format) from the
7317
+ * given reader into the given message object.
7318
+ * @param {!proto.tournament.TournamentGamesRequest} msg The message object to deserialize into.
7319
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
7320
+ * @return {!proto.tournament.TournamentGamesRequest}
7321
+ */
7322
+ proto.tournament.TournamentGamesRequest.deserializeBinaryFromReader = function(msg, reader) {
7323
+ while (reader.nextField()) {
7324
+ if (reader.isEndGroup()) {
7325
+ break;
7326
+ }
7327
+ var field = reader.getFieldNumber();
7328
+ switch (field) {
7329
+ case 1:
7330
+ var value = /** @type {number} */ (reader.readInt32());
7331
+ msg.setTournamentId(value);
7332
+ break;
7333
+ case 2:
7334
+ var values = /** @type {!Array<number>} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]);
7335
+ for (var i = 0; i < values.length; i++) {
7336
+ msg.addGameIds(values[i]);
7337
+ }
7338
+ break;
7339
+ default:
7340
+ reader.skipField();
7341
+ break;
7342
+ }
7343
+ }
7344
+ return msg;
7345
+ };
7346
+
7347
+
7348
+ /**
7349
+ * Serializes the message to binary data (in protobuf wire format).
7350
+ * @return {!Uint8Array}
7351
+ */
7352
+ proto.tournament.TournamentGamesRequest.prototype.serializeBinary = function() {
7353
+ var writer = new jspb.BinaryWriter();
7354
+ proto.tournament.TournamentGamesRequest.serializeBinaryToWriter(this, writer);
7355
+ return writer.getResultBuffer();
7356
+ };
7357
+
7358
+
7359
+ /**
7360
+ * Serializes the given message to binary data (in protobuf wire
7361
+ * format), writing to the given BinaryWriter.
7362
+ * @param {!proto.tournament.TournamentGamesRequest} message
7363
+ * @param {!jspb.BinaryWriter} writer
7364
+ * @suppress {unusedLocalVariables} f is only used for nested messages
7365
+ */
7366
+ proto.tournament.TournamentGamesRequest.serializeBinaryToWriter = function(message, writer) {
7367
+ var f = undefined;
7368
+ f = message.getTournamentId();
7369
+ if (f !== 0) {
7370
+ writer.writeInt32(
7371
+ 1,
7372
+ f
7373
+ );
7374
+ }
7375
+ f = message.getGameIdsList();
7376
+ if (f.length > 0) {
7377
+ writer.writePackedInt32(
7378
+ 2,
7379
+ f
7380
+ );
7381
+ }
7382
+ };
7383
+
7384
+
7385
+ /**
7386
+ * optional int32 tournament_id = 1;
7387
+ * @return {number}
7388
+ */
7389
+ proto.tournament.TournamentGamesRequest.prototype.getTournamentId = function() {
7390
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
7391
+ };
7392
+
7393
+
7394
+ /**
7395
+ * @param {number} value
7396
+ * @return {!proto.tournament.TournamentGamesRequest} returns this
7397
+ */
7398
+ proto.tournament.TournamentGamesRequest.prototype.setTournamentId = function(value) {
7399
+ return jspb.Message.setProto3IntField(this, 1, value);
7400
+ };
7401
+
7402
+
7403
+ /**
7404
+ * repeated int32 game_ids = 2;
7405
+ * @return {!Array<number>}
7406
+ */
7407
+ proto.tournament.TournamentGamesRequest.prototype.getGameIdsList = function() {
7408
+ return /** @type {!Array<number>} */ (jspb.Message.getRepeatedField(this, 2));
7409
+ };
7410
+
7411
+
7412
+ /**
7413
+ * @param {!Array<number>} value
7414
+ * @return {!proto.tournament.TournamentGamesRequest} returns this
7415
+ */
7416
+ proto.tournament.TournamentGamesRequest.prototype.setGameIdsList = function(value) {
7417
+ return jspb.Message.setField(this, 2, value || []);
7418
+ };
7419
+
7420
+
7421
+ /**
7422
+ * @param {number} value
7423
+ * @param {number=} opt_index
7424
+ * @return {!proto.tournament.TournamentGamesRequest} returns this
7425
+ */
7426
+ proto.tournament.TournamentGamesRequest.prototype.addGameIds = function(value, opt_index) {
7427
+ return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
7428
+ };
7429
+
7430
+
7431
+ /**
7432
+ * Clears the list making it empty but non-null.
7433
+ * @return {!proto.tournament.TournamentGamesRequest} returns this
7434
+ */
7435
+ proto.tournament.TournamentGamesRequest.prototype.clearGameIdsList = function() {
7436
+ return this.setGameIdsList([]);
7437
+ };
7438
+
7439
+
7440
+
7441
+ /**
7442
+ * List of repeated fields within this message type.
7443
+ * @private {!Array<number>}
7444
+ * @const
7445
+ */
7446
+ proto.tournament.UserTournamentItem.repeatedFields_ = [10,11];
7447
+
7448
+
7449
+
7450
+ if (jspb.Message.GENERATE_TO_OBJECT) {
7451
+ /**
7452
+ * Creates an object representation of this proto.
7453
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
7454
+ * Optional fields that are not set will be set to undefined.
7455
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
7456
+ * For the list of reserved names please see:
7457
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
7458
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
7459
+ * JSPB instance for transitional soy proto support:
7460
+ * http://goto/soy-param-migration
7461
+ * @return {!Object}
7462
+ */
7463
+ proto.tournament.UserTournamentItem.prototype.toObject = function(opt_includeInstance) {
7464
+ return proto.tournament.UserTournamentItem.toObject(opt_includeInstance, this);
7465
+ };
7466
+
7467
+
7468
+ /**
7469
+ * Static version of the {@see toObject} method.
7470
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
7471
+ * the JSPB instance for transitional soy proto support:
7472
+ * http://goto/soy-param-migration
7473
+ * @param {!proto.tournament.UserTournamentItem} msg The msg instance to transform.
7474
+ * @return {!Object}
7475
+ * @suppress {unusedLocalVariables} f is only used for nested messages
7476
+ */
7477
+ proto.tournament.UserTournamentItem.toObject = function(includeInstance, msg) {
7478
+ var f, obj = {
7479
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0),
7480
+ title: jspb.Message.getFieldWithDefault(msg, 2, ""),
7481
+ description: jspb.Message.getFieldWithDefault(msg, 3, ""),
7482
+ currentMembersCount: jspb.Message.getFieldWithDefault(msg, 4, 0),
7483
+ maxMembersCount: jspb.Message.getFieldWithDefault(msg, 5, 0),
7484
+ startedAt: jspb.Message.getFieldWithDefault(msg, 6, ""),
7485
+ finishedAt: jspb.Message.getFieldWithDefault(msg, 7, ""),
7486
+ status: jspb.Message.getFieldWithDefault(msg, 8, ""),
7487
+ image: jspb.Message.getFieldWithDefault(msg, 9, ""),
7488
+ rulesList: jspb.Message.toObjectList(msg.getRulesList(),
7489
+ proto.tournament.ActivationRuleItem.toObject, includeInstance),
7490
+ rewardsList: jspb.Message.toObjectList(msg.getRewardsList(),
7491
+ proto.tournament.RewardItem.toObject, includeInstance),
7492
+ content: jspb.Message.getFieldWithDefault(msg, 12, "")
7493
+ };
7494
+
7495
+ if (includeInstance) {
7496
+ obj.$jspbMessageInstance = msg;
7497
+ }
7498
+ return obj;
7499
+ };
7500
+ }
7501
+
7502
+
7503
+ /**
7504
+ * Deserializes binary data (in protobuf wire format).
7505
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
7506
+ * @return {!proto.tournament.UserTournamentItem}
7507
+ */
7508
+ proto.tournament.UserTournamentItem.deserializeBinary = function(bytes) {
7509
+ var reader = new jspb.BinaryReader(bytes);
7510
+ var msg = new proto.tournament.UserTournamentItem;
7511
+ return proto.tournament.UserTournamentItem.deserializeBinaryFromReader(msg, reader);
7512
+ };
7513
+
7514
+
7515
+ /**
7516
+ * Deserializes binary data (in protobuf wire format) from the
7517
+ * given reader into the given message object.
7518
+ * @param {!proto.tournament.UserTournamentItem} msg The message object to deserialize into.
7519
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
7520
+ * @return {!proto.tournament.UserTournamentItem}
7521
+ */
7522
+ proto.tournament.UserTournamentItem.deserializeBinaryFromReader = function(msg, reader) {
7523
+ while (reader.nextField()) {
7524
+ if (reader.isEndGroup()) {
7525
+ break;
7526
+ }
7527
+ var field = reader.getFieldNumber();
7528
+ switch (field) {
7529
+ case 1:
7530
+ var value = /** @type {number} */ (reader.readInt32());
7531
+ msg.setId(value);
7532
+ break;
7533
+ case 2:
7534
+ var value = /** @type {string} */ (reader.readString());
7535
+ msg.setTitle(value);
7536
+ break;
7537
+ case 3:
7538
+ var value = /** @type {string} */ (reader.readString());
7539
+ msg.setDescription(value);
7540
+ break;
7541
+ case 4:
7542
+ var value = /** @type {number} */ (reader.readInt32());
7543
+ msg.setCurrentMembersCount(value);
7544
+ break;
7545
+ case 5:
7546
+ var value = /** @type {number} */ (reader.readInt32());
7547
+ msg.setMaxMembersCount(value);
7548
+ break;
7549
+ case 6:
7550
+ var value = /** @type {string} */ (reader.readString());
7551
+ msg.setStartedAt(value);
7552
+ break;
7553
+ case 7:
7554
+ var value = /** @type {string} */ (reader.readString());
7555
+ msg.setFinishedAt(value);
7556
+ break;
7557
+ case 8:
7558
+ var value = /** @type {string} */ (reader.readString());
7559
+ msg.setStatus(value);
7560
+ break;
7561
+ case 9:
7562
+ var value = /** @type {string} */ (reader.readString());
7563
+ msg.setImage(value);
7564
+ break;
7565
+ case 10:
7566
+ var value = new proto.tournament.ActivationRuleItem;
7567
+ reader.readMessage(value,proto.tournament.ActivationRuleItem.deserializeBinaryFromReader);
7568
+ msg.addRules(value);
7569
+ break;
7570
+ case 11:
7571
+ var value = new proto.tournament.RewardItem;
7572
+ reader.readMessage(value,proto.tournament.RewardItem.deserializeBinaryFromReader);
7573
+ msg.addRewards(value);
7574
+ break;
7575
+ case 12:
7576
+ var value = /** @type {string} */ (reader.readString());
7577
+ msg.setContent(value);
7578
+ break;
7579
+ default:
7580
+ reader.skipField();
7581
+ break;
7582
+ }
7583
+ }
7584
+ return msg;
7585
+ };
7586
+
7587
+
7588
+ /**
7589
+ * Serializes the message to binary data (in protobuf wire format).
7590
+ * @return {!Uint8Array}
7591
+ */
7592
+ proto.tournament.UserTournamentItem.prototype.serializeBinary = function() {
7593
+ var writer = new jspb.BinaryWriter();
7594
+ proto.tournament.UserTournamentItem.serializeBinaryToWriter(this, writer);
7595
+ return writer.getResultBuffer();
7596
+ };
7597
+
7598
+
7599
+ /**
7600
+ * Serializes the given message to binary data (in protobuf wire
7601
+ * format), writing to the given BinaryWriter.
7602
+ * @param {!proto.tournament.UserTournamentItem} message
7603
+ * @param {!jspb.BinaryWriter} writer
7604
+ * @suppress {unusedLocalVariables} f is only used for nested messages
7605
+ */
7606
+ proto.tournament.UserTournamentItem.serializeBinaryToWriter = function(message, writer) {
7607
+ var f = undefined;
7608
+ f = /** @type {number} */ (jspb.Message.getField(message, 1));
7609
+ if (f != null) {
7610
+ writer.writeInt32(
7611
+ 1,
7612
+ f
7613
+ );
7614
+ }
7615
+ f = /** @type {string} */ (jspb.Message.getField(message, 2));
7616
+ if (f != null) {
7617
+ writer.writeString(
7618
+ 2,
7619
+ f
7620
+ );
7621
+ }
7622
+ f = /** @type {string} */ (jspb.Message.getField(message, 3));
7623
+ if (f != null) {
7624
+ writer.writeString(
7625
+ 3,
7626
+ f
7627
+ );
7628
+ }
7629
+ f = /** @type {number} */ (jspb.Message.getField(message, 4));
7630
+ if (f != null) {
7631
+ writer.writeInt32(
7632
+ 4,
7633
+ f
7634
+ );
7635
+ }
7636
+ f = /** @type {number} */ (jspb.Message.getField(message, 5));
7637
+ if (f != null) {
7638
+ writer.writeInt32(
7639
+ 5,
7640
+ f
7641
+ );
7642
+ }
7643
+ f = /** @type {string} */ (jspb.Message.getField(message, 6));
7644
+ if (f != null) {
7645
+ writer.writeString(
7646
+ 6,
7647
+ f
7648
+ );
7649
+ }
7650
+ f = /** @type {string} */ (jspb.Message.getField(message, 7));
7651
+ if (f != null) {
7652
+ writer.writeString(
7653
+ 7,
7654
+ f
7655
+ );
7656
+ }
7657
+ f = /** @type {string} */ (jspb.Message.getField(message, 8));
7658
+ if (f != null) {
7659
+ writer.writeString(
7660
+ 8,
7661
+ f
7662
+ );
7663
+ }
7664
+ f = /** @type {string} */ (jspb.Message.getField(message, 9));
7665
+ if (f != null) {
7666
+ writer.writeString(
7667
+ 9,
7668
+ f
7669
+ );
7670
+ }
7671
+ f = message.getRulesList();
7672
+ if (f.length > 0) {
7673
+ writer.writeRepeatedMessage(
7674
+ 10,
7675
+ f,
7676
+ proto.tournament.ActivationRuleItem.serializeBinaryToWriter
7677
+ );
7678
+ }
7679
+ f = message.getRewardsList();
7680
+ if (f.length > 0) {
7681
+ writer.writeRepeatedMessage(
7682
+ 11,
7683
+ f,
7684
+ proto.tournament.RewardItem.serializeBinaryToWriter
7685
+ );
7686
+ }
7687
+ f = /** @type {string} */ (jspb.Message.getField(message, 12));
7688
+ if (f != null) {
7689
+ writer.writeString(
7690
+ 12,
7691
+ f
7692
+ );
7693
+ }
7694
+ };
7695
+
7696
+
7697
+ /**
7698
+ * optional int32 id = 1;
7699
+ * @return {number}
7700
+ */
7701
+ proto.tournament.UserTournamentItem.prototype.getId = function() {
7702
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
7703
+ };
7704
+
7705
+
7706
+ /**
7707
+ * @param {number} value
7708
+ * @return {!proto.tournament.UserTournamentItem} returns this
7709
+ */
7710
+ proto.tournament.UserTournamentItem.prototype.setId = function(value) {
7711
+ return jspb.Message.setField(this, 1, value);
7712
+ };
7713
+
7714
+
7715
+ /**
7716
+ * Clears the field making it undefined.
7717
+ * @return {!proto.tournament.UserTournamentItem} returns this
7718
+ */
7719
+ proto.tournament.UserTournamentItem.prototype.clearId = function() {
7720
+ return jspb.Message.setField(this, 1, undefined);
7721
+ };
7722
+
7723
+
7724
+ /**
7725
+ * Returns whether this field is set.
7726
+ * @return {boolean}
7727
+ */
7728
+ proto.tournament.UserTournamentItem.prototype.hasId = function() {
7729
+ return jspb.Message.getField(this, 1) != null;
7730
+ };
7731
+
7732
+
7733
+ /**
7734
+ * optional string title = 2;
7735
+ * @return {string}
7736
+ */
7737
+ proto.tournament.UserTournamentItem.prototype.getTitle = function() {
7738
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
7739
+ };
7740
+
7741
+
7742
+ /**
7743
+ * @param {string} value
7744
+ * @return {!proto.tournament.UserTournamentItem} returns this
7745
+ */
7746
+ proto.tournament.UserTournamentItem.prototype.setTitle = function(value) {
7747
+ return jspb.Message.setField(this, 2, value);
7748
+ };
7749
+
7750
+
7751
+ /**
7752
+ * Clears the field making it undefined.
7753
+ * @return {!proto.tournament.UserTournamentItem} returns this
7754
+ */
7755
+ proto.tournament.UserTournamentItem.prototype.clearTitle = function() {
7756
+ return jspb.Message.setField(this, 2, undefined);
7757
+ };
7758
+
7759
+
7760
+ /**
7761
+ * Returns whether this field is set.
7762
+ * @return {boolean}
7763
+ */
7764
+ proto.tournament.UserTournamentItem.prototype.hasTitle = function() {
7765
+ return jspb.Message.getField(this, 2) != null;
7766
+ };
7767
+
7768
+
7769
+ /**
7770
+ * optional string description = 3;
7771
+ * @return {string}
7772
+ */
7773
+ proto.tournament.UserTournamentItem.prototype.getDescription = function() {
7774
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
7775
+ };
7776
+
7777
+
7778
+ /**
7779
+ * @param {string} value
7780
+ * @return {!proto.tournament.UserTournamentItem} returns this
7781
+ */
7782
+ proto.tournament.UserTournamentItem.prototype.setDescription = function(value) {
7783
+ return jspb.Message.setField(this, 3, value);
7784
+ };
7785
+
7786
+
7787
+ /**
7788
+ * Clears the field making it undefined.
7789
+ * @return {!proto.tournament.UserTournamentItem} returns this
7790
+ */
7791
+ proto.tournament.UserTournamentItem.prototype.clearDescription = function() {
7792
+ return jspb.Message.setField(this, 3, undefined);
7793
+ };
7794
+
7795
+
7796
+ /**
7797
+ * Returns whether this field is set.
7798
+ * @return {boolean}
7799
+ */
7800
+ proto.tournament.UserTournamentItem.prototype.hasDescription = function() {
7801
+ return jspb.Message.getField(this, 3) != null;
7802
+ };
7803
+
7804
+
7805
+ /**
7806
+ * optional int32 current_members_count = 4;
7807
+ * @return {number}
7808
+ */
7809
+ proto.tournament.UserTournamentItem.prototype.getCurrentMembersCount = function() {
7810
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
7811
+ };
7812
+
7813
+
7814
+ /**
7815
+ * @param {number} value
7816
+ * @return {!proto.tournament.UserTournamentItem} returns this
7817
+ */
7818
+ proto.tournament.UserTournamentItem.prototype.setCurrentMembersCount = function(value) {
7819
+ return jspb.Message.setField(this, 4, value);
7820
+ };
7821
+
7822
+
7823
+ /**
7824
+ * Clears the field making it undefined.
7825
+ * @return {!proto.tournament.UserTournamentItem} returns this
7826
+ */
7827
+ proto.tournament.UserTournamentItem.prototype.clearCurrentMembersCount = function() {
7828
+ return jspb.Message.setField(this, 4, undefined);
7829
+ };
7830
+
7831
+
7832
+ /**
7833
+ * Returns whether this field is set.
7834
+ * @return {boolean}
7835
+ */
7836
+ proto.tournament.UserTournamentItem.prototype.hasCurrentMembersCount = function() {
7837
+ return jspb.Message.getField(this, 4) != null;
7838
+ };
7839
+
7840
+
7841
+ /**
7842
+ * optional int32 max_members_count = 5;
7843
+ * @return {number}
7844
+ */
7845
+ proto.tournament.UserTournamentItem.prototype.getMaxMembersCount = function() {
7846
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
7847
+ };
7848
+
7849
+
7850
+ /**
7851
+ * @param {number} value
7852
+ * @return {!proto.tournament.UserTournamentItem} returns this
7853
+ */
7854
+ proto.tournament.UserTournamentItem.prototype.setMaxMembersCount = function(value) {
7855
+ return jspb.Message.setField(this, 5, value);
7856
+ };
7857
+
7858
+
7859
+ /**
7860
+ * Clears the field making it undefined.
7861
+ * @return {!proto.tournament.UserTournamentItem} returns this
7862
+ */
7863
+ proto.tournament.UserTournamentItem.prototype.clearMaxMembersCount = function() {
7864
+ return jspb.Message.setField(this, 5, undefined);
7865
+ };
7866
+
7867
+
7868
+ /**
7869
+ * Returns whether this field is set.
7870
+ * @return {boolean}
7871
+ */
7872
+ proto.tournament.UserTournamentItem.prototype.hasMaxMembersCount = function() {
7873
+ return jspb.Message.getField(this, 5) != null;
7874
+ };
7875
+
7876
+
7877
+ /**
7878
+ * optional string started_at = 6;
7879
+ * @return {string}
7880
+ */
7881
+ proto.tournament.UserTournamentItem.prototype.getStartedAt = function() {
7882
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
7883
+ };
7884
+
7885
+
7886
+ /**
7887
+ * @param {string} value
7888
+ * @return {!proto.tournament.UserTournamentItem} returns this
7889
+ */
7890
+ proto.tournament.UserTournamentItem.prototype.setStartedAt = function(value) {
7891
+ return jspb.Message.setField(this, 6, value);
7892
+ };
7893
+
7894
+
7895
+ /**
7896
+ * Clears the field making it undefined.
7897
+ * @return {!proto.tournament.UserTournamentItem} returns this
7898
+ */
7899
+ proto.tournament.UserTournamentItem.prototype.clearStartedAt = function() {
7900
+ return jspb.Message.setField(this, 6, undefined);
7901
+ };
7902
+
7903
+
7904
+ /**
7905
+ * Returns whether this field is set.
7906
+ * @return {boolean}
7907
+ */
7908
+ proto.tournament.UserTournamentItem.prototype.hasStartedAt = function() {
7909
+ return jspb.Message.getField(this, 6) != null;
7910
+ };
7911
+
7912
+
7913
+ /**
7914
+ * optional string finished_at = 7;
7915
+ * @return {string}
7916
+ */
7917
+ proto.tournament.UserTournamentItem.prototype.getFinishedAt = function() {
7918
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
7919
+ };
7920
+
7921
+
7922
+ /**
7923
+ * @param {string} value
7924
+ * @return {!proto.tournament.UserTournamentItem} returns this
7925
+ */
7926
+ proto.tournament.UserTournamentItem.prototype.setFinishedAt = function(value) {
7927
+ return jspb.Message.setField(this, 7, value);
7928
+ };
7929
+
7930
+
7931
+ /**
7932
+ * Clears the field making it undefined.
7933
+ * @return {!proto.tournament.UserTournamentItem} returns this
7934
+ */
7935
+ proto.tournament.UserTournamentItem.prototype.clearFinishedAt = function() {
7936
+ return jspb.Message.setField(this, 7, undefined);
7937
+ };
7938
+
7939
+
7940
+ /**
7941
+ * Returns whether this field is set.
7942
+ * @return {boolean}
7943
+ */
7944
+ proto.tournament.UserTournamentItem.prototype.hasFinishedAt = function() {
7945
+ return jspb.Message.getField(this, 7) != null;
7946
+ };
7947
+
7948
+
7949
+ /**
7950
+ * optional string status = 8;
7951
+ * @return {string}
7952
+ */
7953
+ proto.tournament.UserTournamentItem.prototype.getStatus = function() {
7954
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
7955
+ };
7956
+
7957
+
7958
+ /**
7959
+ * @param {string} value
7960
+ * @return {!proto.tournament.UserTournamentItem} returns this
7961
+ */
7962
+ proto.tournament.UserTournamentItem.prototype.setStatus = function(value) {
7963
+ return jspb.Message.setField(this, 8, value);
7964
+ };
7965
+
7966
+
7967
+ /**
7968
+ * Clears the field making it undefined.
7969
+ * @return {!proto.tournament.UserTournamentItem} returns this
7970
+ */
7971
+ proto.tournament.UserTournamentItem.prototype.clearStatus = function() {
7972
+ return jspb.Message.setField(this, 8, undefined);
7973
+ };
7974
+
7975
+
7976
+ /**
7977
+ * Returns whether this field is set.
7978
+ * @return {boolean}
7979
+ */
7980
+ proto.tournament.UserTournamentItem.prototype.hasStatus = function() {
7981
+ return jspb.Message.getField(this, 8) != null;
7982
+ };
7983
+
7984
+
7985
+ /**
7986
+ * optional string image = 9;
7987
+ * @return {string}
7988
+ */
7989
+ proto.tournament.UserTournamentItem.prototype.getImage = function() {
7990
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, ""));
7991
+ };
7992
+
7993
+
7994
+ /**
7995
+ * @param {string} value
7996
+ * @return {!proto.tournament.UserTournamentItem} returns this
7997
+ */
7998
+ proto.tournament.UserTournamentItem.prototype.setImage = function(value) {
7999
+ return jspb.Message.setField(this, 9, value);
8000
+ };
8001
+
8002
+
8003
+ /**
8004
+ * Clears the field making it undefined.
8005
+ * @return {!proto.tournament.UserTournamentItem} returns this
8006
+ */
8007
+ proto.tournament.UserTournamentItem.prototype.clearImage = function() {
8008
+ return jspb.Message.setField(this, 9, undefined);
8009
+ };
8010
+
8011
+
8012
+ /**
8013
+ * Returns whether this field is set.
8014
+ * @return {boolean}
8015
+ */
8016
+ proto.tournament.UserTournamentItem.prototype.hasImage = function() {
8017
+ return jspb.Message.getField(this, 9) != null;
8018
+ };
8019
+
8020
+
8021
+ /**
8022
+ * repeated ActivationRuleItem rules = 10;
8023
+ * @return {!Array<!proto.tournament.ActivationRuleItem>}
8024
+ */
8025
+ proto.tournament.UserTournamentItem.prototype.getRulesList = function() {
8026
+ return /** @type{!Array<!proto.tournament.ActivationRuleItem>} */ (
8027
+ jspb.Message.getRepeatedWrapperField(this, proto.tournament.ActivationRuleItem, 10));
8028
+ };
8029
+
8030
+
8031
+ /**
8032
+ * @param {!Array<!proto.tournament.ActivationRuleItem>} value
8033
+ * @return {!proto.tournament.UserTournamentItem} returns this
8034
+ */
8035
+ proto.tournament.UserTournamentItem.prototype.setRulesList = function(value) {
8036
+ return jspb.Message.setRepeatedWrapperField(this, 10, value);
8037
+ };
8038
+
8039
+
8040
+ /**
8041
+ * @param {!proto.tournament.ActivationRuleItem=} opt_value
8042
+ * @param {number=} opt_index
8043
+ * @return {!proto.tournament.ActivationRuleItem}
8044
+ */
8045
+ proto.tournament.UserTournamentItem.prototype.addRules = function(opt_value, opt_index) {
8046
+ return jspb.Message.addToRepeatedWrapperField(this, 10, opt_value, proto.tournament.ActivationRuleItem, opt_index);
8047
+ };
8048
+
8049
+
8050
+ /**
8051
+ * Clears the list making it empty but non-null.
8052
+ * @return {!proto.tournament.UserTournamentItem} returns this
8053
+ */
8054
+ proto.tournament.UserTournamentItem.prototype.clearRulesList = function() {
8055
+ return this.setRulesList([]);
8056
+ };
8057
+
8058
+
8059
+ /**
8060
+ * repeated RewardItem rewards = 11;
8061
+ * @return {!Array<!proto.tournament.RewardItem>}
8062
+ */
8063
+ proto.tournament.UserTournamentItem.prototype.getRewardsList = function() {
8064
+ return /** @type{!Array<!proto.tournament.RewardItem>} */ (
8065
+ jspb.Message.getRepeatedWrapperField(this, proto.tournament.RewardItem, 11));
8066
+ };
8067
+
8068
+
8069
+ /**
8070
+ * @param {!Array<!proto.tournament.RewardItem>} value
8071
+ * @return {!proto.tournament.UserTournamentItem} returns this
8072
+ */
8073
+ proto.tournament.UserTournamentItem.prototype.setRewardsList = function(value) {
8074
+ return jspb.Message.setRepeatedWrapperField(this, 11, value);
8075
+ };
8076
+
8077
+
8078
+ /**
8079
+ * @param {!proto.tournament.RewardItem=} opt_value
8080
+ * @param {number=} opt_index
8081
+ * @return {!proto.tournament.RewardItem}
8082
+ */
8083
+ proto.tournament.UserTournamentItem.prototype.addRewards = function(opt_value, opt_index) {
8084
+ return jspb.Message.addToRepeatedWrapperField(this, 11, opt_value, proto.tournament.RewardItem, opt_index);
8085
+ };
8086
+
8087
+
8088
+ /**
8089
+ * Clears the list making it empty but non-null.
8090
+ * @return {!proto.tournament.UserTournamentItem} returns this
8091
+ */
8092
+ proto.tournament.UserTournamentItem.prototype.clearRewardsList = function() {
8093
+ return this.setRewardsList([]);
8094
+ };
8095
+
8096
+
8097
+ /**
8098
+ * optional string content = 12;
8099
+ * @return {string}
8100
+ */
8101
+ proto.tournament.UserTournamentItem.prototype.getContent = function() {
8102
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, ""));
8103
+ };
8104
+
8105
+
8106
+ /**
8107
+ * @param {string} value
8108
+ * @return {!proto.tournament.UserTournamentItem} returns this
8109
+ */
8110
+ proto.tournament.UserTournamentItem.prototype.setContent = function(value) {
8111
+ return jspb.Message.setField(this, 12, value);
8112
+ };
8113
+
8114
+
8115
+ /**
8116
+ * Clears the field making it undefined.
8117
+ * @return {!proto.tournament.UserTournamentItem} returns this
8118
+ */
8119
+ proto.tournament.UserTournamentItem.prototype.clearContent = function() {
8120
+ return jspb.Message.setField(this, 12, undefined);
8121
+ };
8122
+
8123
+
8124
+ /**
8125
+ * Returns whether this field is set.
8126
+ * @return {boolean}
8127
+ */
8128
+ proto.tournament.UserTournamentItem.prototype.hasContent = function() {
8129
+ return jspb.Message.getField(this, 12) != null;
8130
+ };
8131
+
8132
+
8133
+
8134
+ /**
8135
+ * List of repeated fields within this message type.
8136
+ * @private {!Array<number>}
8137
+ * @const
8138
+ */
8139
+ proto.tournament.UserTournamentItemsResponse.repeatedFields_ = [1];
8140
+
8141
+
8142
+
8143
+ if (jspb.Message.GENERATE_TO_OBJECT) {
8144
+ /**
8145
+ * Creates an object representation of this proto.
8146
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
8147
+ * Optional fields that are not set will be set to undefined.
8148
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
8149
+ * For the list of reserved names please see:
8150
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
8151
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
8152
+ * JSPB instance for transitional soy proto support:
8153
+ * http://goto/soy-param-migration
8154
+ * @return {!Object}
8155
+ */
8156
+ proto.tournament.UserTournamentItemsResponse.prototype.toObject = function(opt_includeInstance) {
8157
+ return proto.tournament.UserTournamentItemsResponse.toObject(opt_includeInstance, this);
8158
+ };
8159
+
8160
+
8161
+ /**
8162
+ * Static version of the {@see toObject} method.
8163
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
8164
+ * the JSPB instance for transitional soy proto support:
8165
+ * http://goto/soy-param-migration
8166
+ * @param {!proto.tournament.UserTournamentItemsResponse} msg The msg instance to transform.
8167
+ * @return {!Object}
8168
+ * @suppress {unusedLocalVariables} f is only used for nested messages
8169
+ */
8170
+ proto.tournament.UserTournamentItemsResponse.toObject = function(includeInstance, msg) {
8171
+ var f, obj = {
8172
+ itemsList: jspb.Message.toObjectList(msg.getItemsList(),
8173
+ proto.tournament.UserTournamentItem.toObject, includeInstance),
8174
+ totalPages: jspb.Message.getFieldWithDefault(msg, 2, 0),
8175
+ totalItems: jspb.Message.getFieldWithDefault(msg, 3, 0)
8176
+ };
8177
+
8178
+ if (includeInstance) {
8179
+ obj.$jspbMessageInstance = msg;
8180
+ }
8181
+ return obj;
8182
+ };
8183
+ }
8184
+
8185
+
8186
+ /**
8187
+ * Deserializes binary data (in protobuf wire format).
8188
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
8189
+ * @return {!proto.tournament.UserTournamentItemsResponse}
8190
+ */
8191
+ proto.tournament.UserTournamentItemsResponse.deserializeBinary = function(bytes) {
8192
+ var reader = new jspb.BinaryReader(bytes);
8193
+ var msg = new proto.tournament.UserTournamentItemsResponse;
8194
+ return proto.tournament.UserTournamentItemsResponse.deserializeBinaryFromReader(msg, reader);
8195
+ };
8196
+
8197
+
8198
+ /**
8199
+ * Deserializes binary data (in protobuf wire format) from the
8200
+ * given reader into the given message object.
8201
+ * @param {!proto.tournament.UserTournamentItemsResponse} msg The message object to deserialize into.
8202
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
8203
+ * @return {!proto.tournament.UserTournamentItemsResponse}
8204
+ */
8205
+ proto.tournament.UserTournamentItemsResponse.deserializeBinaryFromReader = function(msg, reader) {
8206
+ while (reader.nextField()) {
8207
+ if (reader.isEndGroup()) {
8208
+ break;
8209
+ }
8210
+ var field = reader.getFieldNumber();
8211
+ switch (field) {
8212
+ case 1:
8213
+ var value = new proto.tournament.UserTournamentItem;
8214
+ reader.readMessage(value,proto.tournament.UserTournamentItem.deserializeBinaryFromReader);
8215
+ msg.addItems(value);
8216
+ break;
8217
+ case 2:
8218
+ var value = /** @type {number} */ (reader.readInt32());
8219
+ msg.setTotalPages(value);
8220
+ break;
8221
+ case 3:
8222
+ var value = /** @type {number} */ (reader.readInt32());
8223
+ msg.setTotalItems(value);
8224
+ break;
8225
+ default:
8226
+ reader.skipField();
8227
+ break;
8228
+ }
8229
+ }
8230
+ return msg;
8231
+ };
8232
+
8233
+
8234
+ /**
8235
+ * Serializes the message to binary data (in protobuf wire format).
8236
+ * @return {!Uint8Array}
8237
+ */
8238
+ proto.tournament.UserTournamentItemsResponse.prototype.serializeBinary = function() {
8239
+ var writer = new jspb.BinaryWriter();
8240
+ proto.tournament.UserTournamentItemsResponse.serializeBinaryToWriter(this, writer);
8241
+ return writer.getResultBuffer();
8242
+ };
8243
+
8244
+
8245
+ /**
8246
+ * Serializes the given message to binary data (in protobuf wire
8247
+ * format), writing to the given BinaryWriter.
8248
+ * @param {!proto.tournament.UserTournamentItemsResponse} message
8249
+ * @param {!jspb.BinaryWriter} writer
8250
+ * @suppress {unusedLocalVariables} f is only used for nested messages
8251
+ */
8252
+ proto.tournament.UserTournamentItemsResponse.serializeBinaryToWriter = function(message, writer) {
8253
+ var f = undefined;
8254
+ f = message.getItemsList();
8255
+ if (f.length > 0) {
8256
+ writer.writeRepeatedMessage(
8257
+ 1,
8258
+ f,
8259
+ proto.tournament.UserTournamentItem.serializeBinaryToWriter
8260
+ );
8261
+ }
8262
+ f = /** @type {number} */ (jspb.Message.getField(message, 2));
8263
+ if (f != null) {
8264
+ writer.writeInt32(
8265
+ 2,
8266
+ f
8267
+ );
8268
+ }
8269
+ f = /** @type {number} */ (jspb.Message.getField(message, 3));
8270
+ if (f != null) {
8271
+ writer.writeInt32(
8272
+ 3,
8273
+ f
8274
+ );
8275
+ }
8276
+ };
8277
+
8278
+
8279
+ /**
8280
+ * repeated UserTournamentItem items = 1;
8281
+ * @return {!Array<!proto.tournament.UserTournamentItem>}
8282
+ */
8283
+ proto.tournament.UserTournamentItemsResponse.prototype.getItemsList = function() {
8284
+ return /** @type{!Array<!proto.tournament.UserTournamentItem>} */ (
8285
+ jspb.Message.getRepeatedWrapperField(this, proto.tournament.UserTournamentItem, 1));
8286
+ };
8287
+
8288
+
8289
+ /**
8290
+ * @param {!Array<!proto.tournament.UserTournamentItem>} value
8291
+ * @return {!proto.tournament.UserTournamentItemsResponse} returns this
8292
+ */
8293
+ proto.tournament.UserTournamentItemsResponse.prototype.setItemsList = function(value) {
8294
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
8295
+ };
8296
+
8297
+
8298
+ /**
8299
+ * @param {!proto.tournament.UserTournamentItem=} opt_value
8300
+ * @param {number=} opt_index
8301
+ * @return {!proto.tournament.UserTournamentItem}
8302
+ */
8303
+ proto.tournament.UserTournamentItemsResponse.prototype.addItems = function(opt_value, opt_index) {
8304
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.tournament.UserTournamentItem, opt_index);
8305
+ };
8306
+
8307
+
8308
+ /**
8309
+ * Clears the list making it empty but non-null.
8310
+ * @return {!proto.tournament.UserTournamentItemsResponse} returns this
8311
+ */
8312
+ proto.tournament.UserTournamentItemsResponse.prototype.clearItemsList = function() {
8313
+ return this.setItemsList([]);
8314
+ };
8315
+
8316
+
8317
+ /**
8318
+ * optional int32 total_pages = 2;
8319
+ * @return {number}
8320
+ */
8321
+ proto.tournament.UserTournamentItemsResponse.prototype.getTotalPages = function() {
8322
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
8323
+ };
8324
+
8325
+
8326
+ /**
8327
+ * @param {number} value
8328
+ * @return {!proto.tournament.UserTournamentItemsResponse} returns this
8329
+ */
8330
+ proto.tournament.UserTournamentItemsResponse.prototype.setTotalPages = function(value) {
8331
+ return jspb.Message.setField(this, 2, value);
8332
+ };
8333
+
8334
+
8335
+ /**
8336
+ * Clears the field making it undefined.
8337
+ * @return {!proto.tournament.UserTournamentItemsResponse} returns this
8338
+ */
8339
+ proto.tournament.UserTournamentItemsResponse.prototype.clearTotalPages = function() {
8340
+ return jspb.Message.setField(this, 2, undefined);
8341
+ };
8342
+
8343
+
8344
+ /**
8345
+ * Returns whether this field is set.
8346
+ * @return {boolean}
8347
+ */
8348
+ proto.tournament.UserTournamentItemsResponse.prototype.hasTotalPages = function() {
8349
+ return jspb.Message.getField(this, 2) != null;
8350
+ };
8351
+
8352
+
8353
+ /**
8354
+ * optional int32 total_items = 3;
8355
+ * @return {number}
8356
+ */
8357
+ proto.tournament.UserTournamentItemsResponse.prototype.getTotalItems = function() {
8358
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
8359
+ };
8360
+
8361
+
8362
+ /**
8363
+ * @param {number} value
8364
+ * @return {!proto.tournament.UserTournamentItemsResponse} returns this
8365
+ */
8366
+ proto.tournament.UserTournamentItemsResponse.prototype.setTotalItems = function(value) {
8367
+ return jspb.Message.setField(this, 3, value);
8368
+ };
8369
+
8370
+
8371
+ /**
8372
+ * Clears the field making it undefined.
8373
+ * @return {!proto.tournament.UserTournamentItemsResponse} returns this
8374
+ */
8375
+ proto.tournament.UserTournamentItemsResponse.prototype.clearTotalItems = function() {
8376
+ return jspb.Message.setField(this, 3, undefined);
8377
+ };
8378
+
8379
+
8380
+ /**
8381
+ * Returns whether this field is set.
8382
+ * @return {boolean}
8383
+ */
8384
+ proto.tournament.UserTournamentItemsResponse.prototype.hasTotalItems = function() {
8385
+ return jspb.Message.getField(this, 3) != null;
8386
+ };
8387
+
8388
+
7186
8389
  goog.object.extend(exports, proto.tournament);