protobuf-platform 1.1.9 → 1.1.10

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.10",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -17,7 +17,7 @@ service Tournament {
17
17
  rpc setTournamentContent(TournamentContentRequest) returns (TournamentStatusResponse);
18
18
  //Tournament Statuses
19
19
  rpc readListTournamentStatuses(PaginationRequest) returns (TournamentStatusItemsResponse);
20
- rpc getTournamentsForUser(PaginationRequest) returns (TournamentStatusItemsResponse);
20
+ rpc getTournamentsForUser(PaginationRequest) returns (UserTournamentItemsResponse);
21
21
  }
22
22
  //Technical
23
23
  message PingRequest { string ping = 1; }
@@ -150,3 +150,23 @@ message TournamentContentRequest {
150
150
  string locale = 2;
151
151
  string content = 3;
152
152
  }
153
+ //User
154
+ message UserTournamentItem {
155
+ optional int32 id = 1;
156
+ optional string title = 2;
157
+ optional string description = 3;
158
+ optional int32 current_members_count = 4;
159
+ optional int32 max_members_count = 5;
160
+ optional string started_at = 6;
161
+ optional string finished_at = 7;
162
+ optional string status = 8;
163
+ optional string image = 9;
164
+ repeated ActivationRuleItem rules = 10;
165
+ repeated RewardItem rewards = 11;
166
+ optional string content = 12;
167
+ }
168
+ message UserTournamentItemsResponse {
169
+ repeated UserTournamentItem items = 1;
170
+ optional int32 total_pages = 2;
171
+ optional int32 total_items = 3;
172
+ }
@@ -169,6 +169,17 @@ function deserialize_tournament_TournamentStatusResponse(buffer_arg) {
169
169
  return tournament_pb.TournamentStatusResponse.deserializeBinary(new Uint8Array(buffer_arg));
170
170
  }
171
171
 
172
+ function serialize_tournament_UserTournamentItemsResponse(arg) {
173
+ if (!(arg instanceof tournament_pb.UserTournamentItemsResponse)) {
174
+ throw new Error('Expected argument of type tournament.UserTournamentItemsResponse');
175
+ }
176
+ return Buffer.from(arg.serializeBinary());
177
+ }
178
+
179
+ function deserialize_tournament_UserTournamentItemsResponse(buffer_arg) {
180
+ return tournament_pb.UserTournamentItemsResponse.deserializeBinary(new Uint8Array(buffer_arg));
181
+ }
182
+
172
183
 
173
184
  var TournamentService = exports.TournamentService = {
174
185
  checkConnection: {
@@ -310,11 +321,11 @@ readListTournamentStatuses: {
310
321
  requestStream: false,
311
322
  responseStream: false,
312
323
  requestType: tournament_pb.PaginationRequest,
313
- responseType: tournament_pb.TournamentStatusItemsResponse,
324
+ responseType: tournament_pb.UserTournamentItemsResponse,
314
325
  requestSerialize: serialize_tournament_PaginationRequest,
315
326
  requestDeserialize: deserialize_tournament_PaginationRequest,
316
- responseSerialize: serialize_tournament_TournamentStatusItemsResponse,
317
- responseDeserialize: deserialize_tournament_TournamentStatusItemsResponse,
327
+ responseSerialize: serialize_tournament_UserTournamentItemsResponse,
328
+ responseDeserialize: deserialize_tournament_UserTournamentItemsResponse,
318
329
  },
319
330
  };
320
331
 
@@ -45,6 +45,8 @@ goog.exportSymbol('proto.tournament.TournamentStatusItem', null, global);
45
45
  goog.exportSymbol('proto.tournament.TournamentStatusItemsResponse', null, global);
46
46
  goog.exportSymbol('proto.tournament.TournamentStatusResponse', null, global);
47
47
  goog.exportSymbol('proto.tournament.UserSearchRequest', null, global);
48
+ goog.exportSymbol('proto.tournament.UserTournamentItem', null, global);
49
+ goog.exportSymbol('proto.tournament.UserTournamentItemsResponse', null, global);
48
50
  /**
49
51
  * Generated by JsPbCodeGenerator.
50
52
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -528,6 +530,48 @@ if (goog.DEBUG && !COMPILED) {
528
530
  */
529
531
  proto.tournament.TournamentContentRequest.displayName = 'proto.tournament.TournamentContentRequest';
530
532
  }
533
+ /**
534
+ * Generated by JsPbCodeGenerator.
535
+ * @param {Array=} opt_data Optional initial data array, typically from a
536
+ * server response, or constructed directly in Javascript. The array is used
537
+ * in place and becomes part of the constructed object. It is not cloned.
538
+ * If no data is provided, the constructed object will be empty, but still
539
+ * valid.
540
+ * @extends {jspb.Message}
541
+ * @constructor
542
+ */
543
+ proto.tournament.UserTournamentItem = function(opt_data) {
544
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.tournament.UserTournamentItem.repeatedFields_, null);
545
+ };
546
+ goog.inherits(proto.tournament.UserTournamentItem, jspb.Message);
547
+ if (goog.DEBUG && !COMPILED) {
548
+ /**
549
+ * @public
550
+ * @override
551
+ */
552
+ proto.tournament.UserTournamentItem.displayName = 'proto.tournament.UserTournamentItem';
553
+ }
554
+ /**
555
+ * Generated by JsPbCodeGenerator.
556
+ * @param {Array=} opt_data Optional initial data array, typically from a
557
+ * server response, or constructed directly in Javascript. The array is used
558
+ * in place and becomes part of the constructed object. It is not cloned.
559
+ * If no data is provided, the constructed object will be empty, but still
560
+ * valid.
561
+ * @extends {jspb.Message}
562
+ * @constructor
563
+ */
564
+ proto.tournament.UserTournamentItemsResponse = function(opt_data) {
565
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.tournament.UserTournamentItemsResponse.repeatedFields_, null);
566
+ };
567
+ goog.inherits(proto.tournament.UserTournamentItemsResponse, jspb.Message);
568
+ if (goog.DEBUG && !COMPILED) {
569
+ /**
570
+ * @public
571
+ * @override
572
+ */
573
+ proto.tournament.UserTournamentItemsResponse.displayName = 'proto.tournament.UserTournamentItemsResponse';
574
+ }
531
575
 
532
576
 
533
577
 
@@ -7183,4 +7227,953 @@ proto.tournament.TournamentContentRequest.prototype.setContent = function(value)
7183
7227
  };
7184
7228
 
7185
7229
 
7230
+
7231
+ /**
7232
+ * List of repeated fields within this message type.
7233
+ * @private {!Array<number>}
7234
+ * @const
7235
+ */
7236
+ proto.tournament.UserTournamentItem.repeatedFields_ = [10,11];
7237
+
7238
+
7239
+
7240
+ if (jspb.Message.GENERATE_TO_OBJECT) {
7241
+ /**
7242
+ * Creates an object representation of this proto.
7243
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
7244
+ * Optional fields that are not set will be set to undefined.
7245
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
7246
+ * For the list of reserved names please see:
7247
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
7248
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
7249
+ * JSPB instance for transitional soy proto support:
7250
+ * http://goto/soy-param-migration
7251
+ * @return {!Object}
7252
+ */
7253
+ proto.tournament.UserTournamentItem.prototype.toObject = function(opt_includeInstance) {
7254
+ return proto.tournament.UserTournamentItem.toObject(opt_includeInstance, this);
7255
+ };
7256
+
7257
+
7258
+ /**
7259
+ * Static version of the {@see toObject} method.
7260
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
7261
+ * the JSPB instance for transitional soy proto support:
7262
+ * http://goto/soy-param-migration
7263
+ * @param {!proto.tournament.UserTournamentItem} msg The msg instance to transform.
7264
+ * @return {!Object}
7265
+ * @suppress {unusedLocalVariables} f is only used for nested messages
7266
+ */
7267
+ proto.tournament.UserTournamentItem.toObject = function(includeInstance, msg) {
7268
+ var f, obj = {
7269
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0),
7270
+ title: jspb.Message.getFieldWithDefault(msg, 2, ""),
7271
+ description: jspb.Message.getFieldWithDefault(msg, 3, ""),
7272
+ currentMembersCount: jspb.Message.getFieldWithDefault(msg, 4, 0),
7273
+ maxMembersCount: jspb.Message.getFieldWithDefault(msg, 5, 0),
7274
+ startedAt: jspb.Message.getFieldWithDefault(msg, 6, ""),
7275
+ finishedAt: jspb.Message.getFieldWithDefault(msg, 7, ""),
7276
+ status: jspb.Message.getFieldWithDefault(msg, 8, ""),
7277
+ image: jspb.Message.getFieldWithDefault(msg, 9, ""),
7278
+ rulesList: jspb.Message.toObjectList(msg.getRulesList(),
7279
+ proto.tournament.ActivationRuleItem.toObject, includeInstance),
7280
+ rewardsList: jspb.Message.toObjectList(msg.getRewardsList(),
7281
+ proto.tournament.RewardItem.toObject, includeInstance),
7282
+ content: jspb.Message.getFieldWithDefault(msg, 12, "")
7283
+ };
7284
+
7285
+ if (includeInstance) {
7286
+ obj.$jspbMessageInstance = msg;
7287
+ }
7288
+ return obj;
7289
+ };
7290
+ }
7291
+
7292
+
7293
+ /**
7294
+ * Deserializes binary data (in protobuf wire format).
7295
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
7296
+ * @return {!proto.tournament.UserTournamentItem}
7297
+ */
7298
+ proto.tournament.UserTournamentItem.deserializeBinary = function(bytes) {
7299
+ var reader = new jspb.BinaryReader(bytes);
7300
+ var msg = new proto.tournament.UserTournamentItem;
7301
+ return proto.tournament.UserTournamentItem.deserializeBinaryFromReader(msg, reader);
7302
+ };
7303
+
7304
+
7305
+ /**
7306
+ * Deserializes binary data (in protobuf wire format) from the
7307
+ * given reader into the given message object.
7308
+ * @param {!proto.tournament.UserTournamentItem} msg The message object to deserialize into.
7309
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
7310
+ * @return {!proto.tournament.UserTournamentItem}
7311
+ */
7312
+ proto.tournament.UserTournamentItem.deserializeBinaryFromReader = function(msg, reader) {
7313
+ while (reader.nextField()) {
7314
+ if (reader.isEndGroup()) {
7315
+ break;
7316
+ }
7317
+ var field = reader.getFieldNumber();
7318
+ switch (field) {
7319
+ case 1:
7320
+ var value = /** @type {number} */ (reader.readInt32());
7321
+ msg.setId(value);
7322
+ break;
7323
+ case 2:
7324
+ var value = /** @type {string} */ (reader.readString());
7325
+ msg.setTitle(value);
7326
+ break;
7327
+ case 3:
7328
+ var value = /** @type {string} */ (reader.readString());
7329
+ msg.setDescription(value);
7330
+ break;
7331
+ case 4:
7332
+ var value = /** @type {number} */ (reader.readInt32());
7333
+ msg.setCurrentMembersCount(value);
7334
+ break;
7335
+ case 5:
7336
+ var value = /** @type {number} */ (reader.readInt32());
7337
+ msg.setMaxMembersCount(value);
7338
+ break;
7339
+ case 6:
7340
+ var value = /** @type {string} */ (reader.readString());
7341
+ msg.setStartedAt(value);
7342
+ break;
7343
+ case 7:
7344
+ var value = /** @type {string} */ (reader.readString());
7345
+ msg.setFinishedAt(value);
7346
+ break;
7347
+ case 8:
7348
+ var value = /** @type {string} */ (reader.readString());
7349
+ msg.setStatus(value);
7350
+ break;
7351
+ case 9:
7352
+ var value = /** @type {string} */ (reader.readString());
7353
+ msg.setImage(value);
7354
+ break;
7355
+ case 10:
7356
+ var value = new proto.tournament.ActivationRuleItem;
7357
+ reader.readMessage(value,proto.tournament.ActivationRuleItem.deserializeBinaryFromReader);
7358
+ msg.addRules(value);
7359
+ break;
7360
+ case 11:
7361
+ var value = new proto.tournament.RewardItem;
7362
+ reader.readMessage(value,proto.tournament.RewardItem.deserializeBinaryFromReader);
7363
+ msg.addRewards(value);
7364
+ break;
7365
+ case 12:
7366
+ var value = /** @type {string} */ (reader.readString());
7367
+ msg.setContent(value);
7368
+ break;
7369
+ default:
7370
+ reader.skipField();
7371
+ break;
7372
+ }
7373
+ }
7374
+ return msg;
7375
+ };
7376
+
7377
+
7378
+ /**
7379
+ * Serializes the message to binary data (in protobuf wire format).
7380
+ * @return {!Uint8Array}
7381
+ */
7382
+ proto.tournament.UserTournamentItem.prototype.serializeBinary = function() {
7383
+ var writer = new jspb.BinaryWriter();
7384
+ proto.tournament.UserTournamentItem.serializeBinaryToWriter(this, writer);
7385
+ return writer.getResultBuffer();
7386
+ };
7387
+
7388
+
7389
+ /**
7390
+ * Serializes the given message to binary data (in protobuf wire
7391
+ * format), writing to the given BinaryWriter.
7392
+ * @param {!proto.tournament.UserTournamentItem} message
7393
+ * @param {!jspb.BinaryWriter} writer
7394
+ * @suppress {unusedLocalVariables} f is only used for nested messages
7395
+ */
7396
+ proto.tournament.UserTournamentItem.serializeBinaryToWriter = function(message, writer) {
7397
+ var f = undefined;
7398
+ f = /** @type {number} */ (jspb.Message.getField(message, 1));
7399
+ if (f != null) {
7400
+ writer.writeInt32(
7401
+ 1,
7402
+ f
7403
+ );
7404
+ }
7405
+ f = /** @type {string} */ (jspb.Message.getField(message, 2));
7406
+ if (f != null) {
7407
+ writer.writeString(
7408
+ 2,
7409
+ f
7410
+ );
7411
+ }
7412
+ f = /** @type {string} */ (jspb.Message.getField(message, 3));
7413
+ if (f != null) {
7414
+ writer.writeString(
7415
+ 3,
7416
+ f
7417
+ );
7418
+ }
7419
+ f = /** @type {number} */ (jspb.Message.getField(message, 4));
7420
+ if (f != null) {
7421
+ writer.writeInt32(
7422
+ 4,
7423
+ f
7424
+ );
7425
+ }
7426
+ f = /** @type {number} */ (jspb.Message.getField(message, 5));
7427
+ if (f != null) {
7428
+ writer.writeInt32(
7429
+ 5,
7430
+ f
7431
+ );
7432
+ }
7433
+ f = /** @type {string} */ (jspb.Message.getField(message, 6));
7434
+ if (f != null) {
7435
+ writer.writeString(
7436
+ 6,
7437
+ f
7438
+ );
7439
+ }
7440
+ f = /** @type {string} */ (jspb.Message.getField(message, 7));
7441
+ if (f != null) {
7442
+ writer.writeString(
7443
+ 7,
7444
+ f
7445
+ );
7446
+ }
7447
+ f = /** @type {string} */ (jspb.Message.getField(message, 8));
7448
+ if (f != null) {
7449
+ writer.writeString(
7450
+ 8,
7451
+ f
7452
+ );
7453
+ }
7454
+ f = /** @type {string} */ (jspb.Message.getField(message, 9));
7455
+ if (f != null) {
7456
+ writer.writeString(
7457
+ 9,
7458
+ f
7459
+ );
7460
+ }
7461
+ f = message.getRulesList();
7462
+ if (f.length > 0) {
7463
+ writer.writeRepeatedMessage(
7464
+ 10,
7465
+ f,
7466
+ proto.tournament.ActivationRuleItem.serializeBinaryToWriter
7467
+ );
7468
+ }
7469
+ f = message.getRewardsList();
7470
+ if (f.length > 0) {
7471
+ writer.writeRepeatedMessage(
7472
+ 11,
7473
+ f,
7474
+ proto.tournament.RewardItem.serializeBinaryToWriter
7475
+ );
7476
+ }
7477
+ f = /** @type {string} */ (jspb.Message.getField(message, 12));
7478
+ if (f != null) {
7479
+ writer.writeString(
7480
+ 12,
7481
+ f
7482
+ );
7483
+ }
7484
+ };
7485
+
7486
+
7487
+ /**
7488
+ * optional int32 id = 1;
7489
+ * @return {number}
7490
+ */
7491
+ proto.tournament.UserTournamentItem.prototype.getId = function() {
7492
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
7493
+ };
7494
+
7495
+
7496
+ /**
7497
+ * @param {number} value
7498
+ * @return {!proto.tournament.UserTournamentItem} returns this
7499
+ */
7500
+ proto.tournament.UserTournamentItem.prototype.setId = function(value) {
7501
+ return jspb.Message.setField(this, 1, value);
7502
+ };
7503
+
7504
+
7505
+ /**
7506
+ * Clears the field making it undefined.
7507
+ * @return {!proto.tournament.UserTournamentItem} returns this
7508
+ */
7509
+ proto.tournament.UserTournamentItem.prototype.clearId = function() {
7510
+ return jspb.Message.setField(this, 1, undefined);
7511
+ };
7512
+
7513
+
7514
+ /**
7515
+ * Returns whether this field is set.
7516
+ * @return {boolean}
7517
+ */
7518
+ proto.tournament.UserTournamentItem.prototype.hasId = function() {
7519
+ return jspb.Message.getField(this, 1) != null;
7520
+ };
7521
+
7522
+
7523
+ /**
7524
+ * optional string title = 2;
7525
+ * @return {string}
7526
+ */
7527
+ proto.tournament.UserTournamentItem.prototype.getTitle = function() {
7528
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
7529
+ };
7530
+
7531
+
7532
+ /**
7533
+ * @param {string} value
7534
+ * @return {!proto.tournament.UserTournamentItem} returns this
7535
+ */
7536
+ proto.tournament.UserTournamentItem.prototype.setTitle = function(value) {
7537
+ return jspb.Message.setField(this, 2, value);
7538
+ };
7539
+
7540
+
7541
+ /**
7542
+ * Clears the field making it undefined.
7543
+ * @return {!proto.tournament.UserTournamentItem} returns this
7544
+ */
7545
+ proto.tournament.UserTournamentItem.prototype.clearTitle = function() {
7546
+ return jspb.Message.setField(this, 2, undefined);
7547
+ };
7548
+
7549
+
7550
+ /**
7551
+ * Returns whether this field is set.
7552
+ * @return {boolean}
7553
+ */
7554
+ proto.tournament.UserTournamentItem.prototype.hasTitle = function() {
7555
+ return jspb.Message.getField(this, 2) != null;
7556
+ };
7557
+
7558
+
7559
+ /**
7560
+ * optional string description = 3;
7561
+ * @return {string}
7562
+ */
7563
+ proto.tournament.UserTournamentItem.prototype.getDescription = function() {
7564
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
7565
+ };
7566
+
7567
+
7568
+ /**
7569
+ * @param {string} value
7570
+ * @return {!proto.tournament.UserTournamentItem} returns this
7571
+ */
7572
+ proto.tournament.UserTournamentItem.prototype.setDescription = function(value) {
7573
+ return jspb.Message.setField(this, 3, value);
7574
+ };
7575
+
7576
+
7577
+ /**
7578
+ * Clears the field making it undefined.
7579
+ * @return {!proto.tournament.UserTournamentItem} returns this
7580
+ */
7581
+ proto.tournament.UserTournamentItem.prototype.clearDescription = function() {
7582
+ return jspb.Message.setField(this, 3, undefined);
7583
+ };
7584
+
7585
+
7586
+ /**
7587
+ * Returns whether this field is set.
7588
+ * @return {boolean}
7589
+ */
7590
+ proto.tournament.UserTournamentItem.prototype.hasDescription = function() {
7591
+ return jspb.Message.getField(this, 3) != null;
7592
+ };
7593
+
7594
+
7595
+ /**
7596
+ * optional int32 current_members_count = 4;
7597
+ * @return {number}
7598
+ */
7599
+ proto.tournament.UserTournamentItem.prototype.getCurrentMembersCount = function() {
7600
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
7601
+ };
7602
+
7603
+
7604
+ /**
7605
+ * @param {number} value
7606
+ * @return {!proto.tournament.UserTournamentItem} returns this
7607
+ */
7608
+ proto.tournament.UserTournamentItem.prototype.setCurrentMembersCount = function(value) {
7609
+ return jspb.Message.setField(this, 4, value);
7610
+ };
7611
+
7612
+
7613
+ /**
7614
+ * Clears the field making it undefined.
7615
+ * @return {!proto.tournament.UserTournamentItem} returns this
7616
+ */
7617
+ proto.tournament.UserTournamentItem.prototype.clearCurrentMembersCount = function() {
7618
+ return jspb.Message.setField(this, 4, undefined);
7619
+ };
7620
+
7621
+
7622
+ /**
7623
+ * Returns whether this field is set.
7624
+ * @return {boolean}
7625
+ */
7626
+ proto.tournament.UserTournamentItem.prototype.hasCurrentMembersCount = function() {
7627
+ return jspb.Message.getField(this, 4) != null;
7628
+ };
7629
+
7630
+
7631
+ /**
7632
+ * optional int32 max_members_count = 5;
7633
+ * @return {number}
7634
+ */
7635
+ proto.tournament.UserTournamentItem.prototype.getMaxMembersCount = function() {
7636
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
7637
+ };
7638
+
7639
+
7640
+ /**
7641
+ * @param {number} value
7642
+ * @return {!proto.tournament.UserTournamentItem} returns this
7643
+ */
7644
+ proto.tournament.UserTournamentItem.prototype.setMaxMembersCount = function(value) {
7645
+ return jspb.Message.setField(this, 5, value);
7646
+ };
7647
+
7648
+
7649
+ /**
7650
+ * Clears the field making it undefined.
7651
+ * @return {!proto.tournament.UserTournamentItem} returns this
7652
+ */
7653
+ proto.tournament.UserTournamentItem.prototype.clearMaxMembersCount = function() {
7654
+ return jspb.Message.setField(this, 5, undefined);
7655
+ };
7656
+
7657
+
7658
+ /**
7659
+ * Returns whether this field is set.
7660
+ * @return {boolean}
7661
+ */
7662
+ proto.tournament.UserTournamentItem.prototype.hasMaxMembersCount = function() {
7663
+ return jspb.Message.getField(this, 5) != null;
7664
+ };
7665
+
7666
+
7667
+ /**
7668
+ * optional string started_at = 6;
7669
+ * @return {string}
7670
+ */
7671
+ proto.tournament.UserTournamentItem.prototype.getStartedAt = function() {
7672
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
7673
+ };
7674
+
7675
+
7676
+ /**
7677
+ * @param {string} value
7678
+ * @return {!proto.tournament.UserTournamentItem} returns this
7679
+ */
7680
+ proto.tournament.UserTournamentItem.prototype.setStartedAt = function(value) {
7681
+ return jspb.Message.setField(this, 6, value);
7682
+ };
7683
+
7684
+
7685
+ /**
7686
+ * Clears the field making it undefined.
7687
+ * @return {!proto.tournament.UserTournamentItem} returns this
7688
+ */
7689
+ proto.tournament.UserTournamentItem.prototype.clearStartedAt = function() {
7690
+ return jspb.Message.setField(this, 6, undefined);
7691
+ };
7692
+
7693
+
7694
+ /**
7695
+ * Returns whether this field is set.
7696
+ * @return {boolean}
7697
+ */
7698
+ proto.tournament.UserTournamentItem.prototype.hasStartedAt = function() {
7699
+ return jspb.Message.getField(this, 6) != null;
7700
+ };
7701
+
7702
+
7703
+ /**
7704
+ * optional string finished_at = 7;
7705
+ * @return {string}
7706
+ */
7707
+ proto.tournament.UserTournamentItem.prototype.getFinishedAt = function() {
7708
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
7709
+ };
7710
+
7711
+
7712
+ /**
7713
+ * @param {string} value
7714
+ * @return {!proto.tournament.UserTournamentItem} returns this
7715
+ */
7716
+ proto.tournament.UserTournamentItem.prototype.setFinishedAt = function(value) {
7717
+ return jspb.Message.setField(this, 7, value);
7718
+ };
7719
+
7720
+
7721
+ /**
7722
+ * Clears the field making it undefined.
7723
+ * @return {!proto.tournament.UserTournamentItem} returns this
7724
+ */
7725
+ proto.tournament.UserTournamentItem.prototype.clearFinishedAt = function() {
7726
+ return jspb.Message.setField(this, 7, undefined);
7727
+ };
7728
+
7729
+
7730
+ /**
7731
+ * Returns whether this field is set.
7732
+ * @return {boolean}
7733
+ */
7734
+ proto.tournament.UserTournamentItem.prototype.hasFinishedAt = function() {
7735
+ return jspb.Message.getField(this, 7) != null;
7736
+ };
7737
+
7738
+
7739
+ /**
7740
+ * optional string status = 8;
7741
+ * @return {string}
7742
+ */
7743
+ proto.tournament.UserTournamentItem.prototype.getStatus = function() {
7744
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
7745
+ };
7746
+
7747
+
7748
+ /**
7749
+ * @param {string} value
7750
+ * @return {!proto.tournament.UserTournamentItem} returns this
7751
+ */
7752
+ proto.tournament.UserTournamentItem.prototype.setStatus = function(value) {
7753
+ return jspb.Message.setField(this, 8, value);
7754
+ };
7755
+
7756
+
7757
+ /**
7758
+ * Clears the field making it undefined.
7759
+ * @return {!proto.tournament.UserTournamentItem} returns this
7760
+ */
7761
+ proto.tournament.UserTournamentItem.prototype.clearStatus = function() {
7762
+ return jspb.Message.setField(this, 8, undefined);
7763
+ };
7764
+
7765
+
7766
+ /**
7767
+ * Returns whether this field is set.
7768
+ * @return {boolean}
7769
+ */
7770
+ proto.tournament.UserTournamentItem.prototype.hasStatus = function() {
7771
+ return jspb.Message.getField(this, 8) != null;
7772
+ };
7773
+
7774
+
7775
+ /**
7776
+ * optional string image = 9;
7777
+ * @return {string}
7778
+ */
7779
+ proto.tournament.UserTournamentItem.prototype.getImage = function() {
7780
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, ""));
7781
+ };
7782
+
7783
+
7784
+ /**
7785
+ * @param {string} value
7786
+ * @return {!proto.tournament.UserTournamentItem} returns this
7787
+ */
7788
+ proto.tournament.UserTournamentItem.prototype.setImage = function(value) {
7789
+ return jspb.Message.setField(this, 9, value);
7790
+ };
7791
+
7792
+
7793
+ /**
7794
+ * Clears the field making it undefined.
7795
+ * @return {!proto.tournament.UserTournamentItem} returns this
7796
+ */
7797
+ proto.tournament.UserTournamentItem.prototype.clearImage = function() {
7798
+ return jspb.Message.setField(this, 9, undefined);
7799
+ };
7800
+
7801
+
7802
+ /**
7803
+ * Returns whether this field is set.
7804
+ * @return {boolean}
7805
+ */
7806
+ proto.tournament.UserTournamentItem.prototype.hasImage = function() {
7807
+ return jspb.Message.getField(this, 9) != null;
7808
+ };
7809
+
7810
+
7811
+ /**
7812
+ * repeated ActivationRuleItem rules = 10;
7813
+ * @return {!Array<!proto.tournament.ActivationRuleItem>}
7814
+ */
7815
+ proto.tournament.UserTournamentItem.prototype.getRulesList = function() {
7816
+ return /** @type{!Array<!proto.tournament.ActivationRuleItem>} */ (
7817
+ jspb.Message.getRepeatedWrapperField(this, proto.tournament.ActivationRuleItem, 10));
7818
+ };
7819
+
7820
+
7821
+ /**
7822
+ * @param {!Array<!proto.tournament.ActivationRuleItem>} value
7823
+ * @return {!proto.tournament.UserTournamentItem} returns this
7824
+ */
7825
+ proto.tournament.UserTournamentItem.prototype.setRulesList = function(value) {
7826
+ return jspb.Message.setRepeatedWrapperField(this, 10, value);
7827
+ };
7828
+
7829
+
7830
+ /**
7831
+ * @param {!proto.tournament.ActivationRuleItem=} opt_value
7832
+ * @param {number=} opt_index
7833
+ * @return {!proto.tournament.ActivationRuleItem}
7834
+ */
7835
+ proto.tournament.UserTournamentItem.prototype.addRules = function(opt_value, opt_index) {
7836
+ return jspb.Message.addToRepeatedWrapperField(this, 10, opt_value, proto.tournament.ActivationRuleItem, opt_index);
7837
+ };
7838
+
7839
+
7840
+ /**
7841
+ * Clears the list making it empty but non-null.
7842
+ * @return {!proto.tournament.UserTournamentItem} returns this
7843
+ */
7844
+ proto.tournament.UserTournamentItem.prototype.clearRulesList = function() {
7845
+ return this.setRulesList([]);
7846
+ };
7847
+
7848
+
7849
+ /**
7850
+ * repeated RewardItem rewards = 11;
7851
+ * @return {!Array<!proto.tournament.RewardItem>}
7852
+ */
7853
+ proto.tournament.UserTournamentItem.prototype.getRewardsList = function() {
7854
+ return /** @type{!Array<!proto.tournament.RewardItem>} */ (
7855
+ jspb.Message.getRepeatedWrapperField(this, proto.tournament.RewardItem, 11));
7856
+ };
7857
+
7858
+
7859
+ /**
7860
+ * @param {!Array<!proto.tournament.RewardItem>} value
7861
+ * @return {!proto.tournament.UserTournamentItem} returns this
7862
+ */
7863
+ proto.tournament.UserTournamentItem.prototype.setRewardsList = function(value) {
7864
+ return jspb.Message.setRepeatedWrapperField(this, 11, value);
7865
+ };
7866
+
7867
+
7868
+ /**
7869
+ * @param {!proto.tournament.RewardItem=} opt_value
7870
+ * @param {number=} opt_index
7871
+ * @return {!proto.tournament.RewardItem}
7872
+ */
7873
+ proto.tournament.UserTournamentItem.prototype.addRewards = function(opt_value, opt_index) {
7874
+ return jspb.Message.addToRepeatedWrapperField(this, 11, opt_value, proto.tournament.RewardItem, opt_index);
7875
+ };
7876
+
7877
+
7878
+ /**
7879
+ * Clears the list making it empty but non-null.
7880
+ * @return {!proto.tournament.UserTournamentItem} returns this
7881
+ */
7882
+ proto.tournament.UserTournamentItem.prototype.clearRewardsList = function() {
7883
+ return this.setRewardsList([]);
7884
+ };
7885
+
7886
+
7887
+ /**
7888
+ * optional string content = 12;
7889
+ * @return {string}
7890
+ */
7891
+ proto.tournament.UserTournamentItem.prototype.getContent = function() {
7892
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, ""));
7893
+ };
7894
+
7895
+
7896
+ /**
7897
+ * @param {string} value
7898
+ * @return {!proto.tournament.UserTournamentItem} returns this
7899
+ */
7900
+ proto.tournament.UserTournamentItem.prototype.setContent = function(value) {
7901
+ return jspb.Message.setField(this, 12, value);
7902
+ };
7903
+
7904
+
7905
+ /**
7906
+ * Clears the field making it undefined.
7907
+ * @return {!proto.tournament.UserTournamentItem} returns this
7908
+ */
7909
+ proto.tournament.UserTournamentItem.prototype.clearContent = function() {
7910
+ return jspb.Message.setField(this, 12, undefined);
7911
+ };
7912
+
7913
+
7914
+ /**
7915
+ * Returns whether this field is set.
7916
+ * @return {boolean}
7917
+ */
7918
+ proto.tournament.UserTournamentItem.prototype.hasContent = function() {
7919
+ return jspb.Message.getField(this, 12) != null;
7920
+ };
7921
+
7922
+
7923
+
7924
+ /**
7925
+ * List of repeated fields within this message type.
7926
+ * @private {!Array<number>}
7927
+ * @const
7928
+ */
7929
+ proto.tournament.UserTournamentItemsResponse.repeatedFields_ = [1];
7930
+
7931
+
7932
+
7933
+ if (jspb.Message.GENERATE_TO_OBJECT) {
7934
+ /**
7935
+ * Creates an object representation of this proto.
7936
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
7937
+ * Optional fields that are not set will be set to undefined.
7938
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
7939
+ * For the list of reserved names please see:
7940
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
7941
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
7942
+ * JSPB instance for transitional soy proto support:
7943
+ * http://goto/soy-param-migration
7944
+ * @return {!Object}
7945
+ */
7946
+ proto.tournament.UserTournamentItemsResponse.prototype.toObject = function(opt_includeInstance) {
7947
+ return proto.tournament.UserTournamentItemsResponse.toObject(opt_includeInstance, this);
7948
+ };
7949
+
7950
+
7951
+ /**
7952
+ * Static version of the {@see toObject} method.
7953
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
7954
+ * the JSPB instance for transitional soy proto support:
7955
+ * http://goto/soy-param-migration
7956
+ * @param {!proto.tournament.UserTournamentItemsResponse} msg The msg instance to transform.
7957
+ * @return {!Object}
7958
+ * @suppress {unusedLocalVariables} f is only used for nested messages
7959
+ */
7960
+ proto.tournament.UserTournamentItemsResponse.toObject = function(includeInstance, msg) {
7961
+ var f, obj = {
7962
+ itemsList: jspb.Message.toObjectList(msg.getItemsList(),
7963
+ proto.tournament.UserTournamentItem.toObject, includeInstance),
7964
+ totalPages: jspb.Message.getFieldWithDefault(msg, 2, 0),
7965
+ totalItems: jspb.Message.getFieldWithDefault(msg, 3, 0)
7966
+ };
7967
+
7968
+ if (includeInstance) {
7969
+ obj.$jspbMessageInstance = msg;
7970
+ }
7971
+ return obj;
7972
+ };
7973
+ }
7974
+
7975
+
7976
+ /**
7977
+ * Deserializes binary data (in protobuf wire format).
7978
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
7979
+ * @return {!proto.tournament.UserTournamentItemsResponse}
7980
+ */
7981
+ proto.tournament.UserTournamentItemsResponse.deserializeBinary = function(bytes) {
7982
+ var reader = new jspb.BinaryReader(bytes);
7983
+ var msg = new proto.tournament.UserTournamentItemsResponse;
7984
+ return proto.tournament.UserTournamentItemsResponse.deserializeBinaryFromReader(msg, reader);
7985
+ };
7986
+
7987
+
7988
+ /**
7989
+ * Deserializes binary data (in protobuf wire format) from the
7990
+ * given reader into the given message object.
7991
+ * @param {!proto.tournament.UserTournamentItemsResponse} msg The message object to deserialize into.
7992
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
7993
+ * @return {!proto.tournament.UserTournamentItemsResponse}
7994
+ */
7995
+ proto.tournament.UserTournamentItemsResponse.deserializeBinaryFromReader = function(msg, reader) {
7996
+ while (reader.nextField()) {
7997
+ if (reader.isEndGroup()) {
7998
+ break;
7999
+ }
8000
+ var field = reader.getFieldNumber();
8001
+ switch (field) {
8002
+ case 1:
8003
+ var value = new proto.tournament.UserTournamentItem;
8004
+ reader.readMessage(value,proto.tournament.UserTournamentItem.deserializeBinaryFromReader);
8005
+ msg.addItems(value);
8006
+ break;
8007
+ case 2:
8008
+ var value = /** @type {number} */ (reader.readInt32());
8009
+ msg.setTotalPages(value);
8010
+ break;
8011
+ case 3:
8012
+ var value = /** @type {number} */ (reader.readInt32());
8013
+ msg.setTotalItems(value);
8014
+ break;
8015
+ default:
8016
+ reader.skipField();
8017
+ break;
8018
+ }
8019
+ }
8020
+ return msg;
8021
+ };
8022
+
8023
+
8024
+ /**
8025
+ * Serializes the message to binary data (in protobuf wire format).
8026
+ * @return {!Uint8Array}
8027
+ */
8028
+ proto.tournament.UserTournamentItemsResponse.prototype.serializeBinary = function() {
8029
+ var writer = new jspb.BinaryWriter();
8030
+ proto.tournament.UserTournamentItemsResponse.serializeBinaryToWriter(this, writer);
8031
+ return writer.getResultBuffer();
8032
+ };
8033
+
8034
+
8035
+ /**
8036
+ * Serializes the given message to binary data (in protobuf wire
8037
+ * format), writing to the given BinaryWriter.
8038
+ * @param {!proto.tournament.UserTournamentItemsResponse} message
8039
+ * @param {!jspb.BinaryWriter} writer
8040
+ * @suppress {unusedLocalVariables} f is only used for nested messages
8041
+ */
8042
+ proto.tournament.UserTournamentItemsResponse.serializeBinaryToWriter = function(message, writer) {
8043
+ var f = undefined;
8044
+ f = message.getItemsList();
8045
+ if (f.length > 0) {
8046
+ writer.writeRepeatedMessage(
8047
+ 1,
8048
+ f,
8049
+ proto.tournament.UserTournamentItem.serializeBinaryToWriter
8050
+ );
8051
+ }
8052
+ f = /** @type {number} */ (jspb.Message.getField(message, 2));
8053
+ if (f != null) {
8054
+ writer.writeInt32(
8055
+ 2,
8056
+ f
8057
+ );
8058
+ }
8059
+ f = /** @type {number} */ (jspb.Message.getField(message, 3));
8060
+ if (f != null) {
8061
+ writer.writeInt32(
8062
+ 3,
8063
+ f
8064
+ );
8065
+ }
8066
+ };
8067
+
8068
+
8069
+ /**
8070
+ * repeated UserTournamentItem items = 1;
8071
+ * @return {!Array<!proto.tournament.UserTournamentItem>}
8072
+ */
8073
+ proto.tournament.UserTournamentItemsResponse.prototype.getItemsList = function() {
8074
+ return /** @type{!Array<!proto.tournament.UserTournamentItem>} */ (
8075
+ jspb.Message.getRepeatedWrapperField(this, proto.tournament.UserTournamentItem, 1));
8076
+ };
8077
+
8078
+
8079
+ /**
8080
+ * @param {!Array<!proto.tournament.UserTournamentItem>} value
8081
+ * @return {!proto.tournament.UserTournamentItemsResponse} returns this
8082
+ */
8083
+ proto.tournament.UserTournamentItemsResponse.prototype.setItemsList = function(value) {
8084
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
8085
+ };
8086
+
8087
+
8088
+ /**
8089
+ * @param {!proto.tournament.UserTournamentItem=} opt_value
8090
+ * @param {number=} opt_index
8091
+ * @return {!proto.tournament.UserTournamentItem}
8092
+ */
8093
+ proto.tournament.UserTournamentItemsResponse.prototype.addItems = function(opt_value, opt_index) {
8094
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.tournament.UserTournamentItem, opt_index);
8095
+ };
8096
+
8097
+
8098
+ /**
8099
+ * Clears the list making it empty but non-null.
8100
+ * @return {!proto.tournament.UserTournamentItemsResponse} returns this
8101
+ */
8102
+ proto.tournament.UserTournamentItemsResponse.prototype.clearItemsList = function() {
8103
+ return this.setItemsList([]);
8104
+ };
8105
+
8106
+
8107
+ /**
8108
+ * optional int32 total_pages = 2;
8109
+ * @return {number}
8110
+ */
8111
+ proto.tournament.UserTournamentItemsResponse.prototype.getTotalPages = function() {
8112
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
8113
+ };
8114
+
8115
+
8116
+ /**
8117
+ * @param {number} value
8118
+ * @return {!proto.tournament.UserTournamentItemsResponse} returns this
8119
+ */
8120
+ proto.tournament.UserTournamentItemsResponse.prototype.setTotalPages = function(value) {
8121
+ return jspb.Message.setField(this, 2, value);
8122
+ };
8123
+
8124
+
8125
+ /**
8126
+ * Clears the field making it undefined.
8127
+ * @return {!proto.tournament.UserTournamentItemsResponse} returns this
8128
+ */
8129
+ proto.tournament.UserTournamentItemsResponse.prototype.clearTotalPages = function() {
8130
+ return jspb.Message.setField(this, 2, undefined);
8131
+ };
8132
+
8133
+
8134
+ /**
8135
+ * Returns whether this field is set.
8136
+ * @return {boolean}
8137
+ */
8138
+ proto.tournament.UserTournamentItemsResponse.prototype.hasTotalPages = function() {
8139
+ return jspb.Message.getField(this, 2) != null;
8140
+ };
8141
+
8142
+
8143
+ /**
8144
+ * optional int32 total_items = 3;
8145
+ * @return {number}
8146
+ */
8147
+ proto.tournament.UserTournamentItemsResponse.prototype.getTotalItems = function() {
8148
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
8149
+ };
8150
+
8151
+
8152
+ /**
8153
+ * @param {number} value
8154
+ * @return {!proto.tournament.UserTournamentItemsResponse} returns this
8155
+ */
8156
+ proto.tournament.UserTournamentItemsResponse.prototype.setTotalItems = function(value) {
8157
+ return jspb.Message.setField(this, 3, value);
8158
+ };
8159
+
8160
+
8161
+ /**
8162
+ * Clears the field making it undefined.
8163
+ * @return {!proto.tournament.UserTournamentItemsResponse} returns this
8164
+ */
8165
+ proto.tournament.UserTournamentItemsResponse.prototype.clearTotalItems = function() {
8166
+ return jspb.Message.setField(this, 3, undefined);
8167
+ };
8168
+
8169
+
8170
+ /**
8171
+ * Returns whether this field is set.
8172
+ * @return {boolean}
8173
+ */
8174
+ proto.tournament.UserTournamentItemsResponse.prototype.hasTotalItems = function() {
8175
+ return jspb.Message.getField(this, 3) != null;
8176
+ };
8177
+
8178
+
7186
8179
  goog.object.extend(exports, proto.tournament);