protobuf-platform 1.0.299 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,12 +21,15 @@ var global = (function() {
21
21
  return Function('return this')();
22
22
  }.call(null));
23
23
 
24
+ goog.exportSymbol('proto.tournament.ActivationRuleItem', null, global);
24
25
  goog.exportSymbol('proto.tournament.File', null, global);
25
26
  goog.exportSymbol('proto.tournament.GetFileRequest', null, global);
26
27
  goog.exportSymbol('proto.tournament.GetTournamentRequest', null, global);
27
28
  goog.exportSymbol('proto.tournament.PaginationRequest', null, global);
28
29
  goog.exportSymbol('proto.tournament.PingRequest', null, global);
29
30
  goog.exportSymbol('proto.tournament.PongResponse', null, global);
31
+ goog.exportSymbol('proto.tournament.RewardItem', null, global);
32
+ goog.exportSymbol('proto.tournament.ScoringRule', null, global);
30
33
  goog.exportSymbol('proto.tournament.TournamentActivationRuleRequest', null, global);
31
34
  goog.exportSymbol('proto.tournament.TournamentItem', null, global);
32
35
  goog.exportSymbol('proto.tournament.TournamentItemRequest', null, global);
@@ -365,9 +368,30 @@ if (goog.DEBUG && !COMPILED) {
365
368
  * @extends {jspb.Message}
366
369
  * @constructor
367
370
  */
368
- proto.tournament.TournamentActivationRuleRequest = function(opt_data) {
371
+ proto.tournament.ActivationRuleItem = function(opt_data) {
369
372
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
370
373
  };
374
+ goog.inherits(proto.tournament.ActivationRuleItem, jspb.Message);
375
+ if (goog.DEBUG && !COMPILED) {
376
+ /**
377
+ * @public
378
+ * @override
379
+ */
380
+ proto.tournament.ActivationRuleItem.displayName = 'proto.tournament.ActivationRuleItem';
381
+ }
382
+ /**
383
+ * Generated by JsPbCodeGenerator.
384
+ * @param {Array=} opt_data Optional initial data array, typically from a
385
+ * server response, or constructed directly in Javascript. The array is used
386
+ * in place and becomes part of the constructed object. It is not cloned.
387
+ * If no data is provided, the constructed object will be empty, but still
388
+ * valid.
389
+ * @extends {jspb.Message}
390
+ * @constructor
391
+ */
392
+ proto.tournament.TournamentActivationRuleRequest = function(opt_data) {
393
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.tournament.TournamentActivationRuleRequest.repeatedFields_, null);
394
+ };
371
395
  goog.inherits(proto.tournament.TournamentActivationRuleRequest, jspb.Message);
372
396
  if (goog.DEBUG && !COMPILED) {
373
397
  /**
@@ -386,9 +410,30 @@ if (goog.DEBUG && !COMPILED) {
386
410
  * @extends {jspb.Message}
387
411
  * @constructor
388
412
  */
389
- proto.tournament.TournamentScoringRuleRequest = function(opt_data) {
413
+ proto.tournament.ScoringRule = function(opt_data) {
390
414
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
391
415
  };
416
+ goog.inherits(proto.tournament.ScoringRule, jspb.Message);
417
+ if (goog.DEBUG && !COMPILED) {
418
+ /**
419
+ * @public
420
+ * @override
421
+ */
422
+ proto.tournament.ScoringRule.displayName = 'proto.tournament.ScoringRule';
423
+ }
424
+ /**
425
+ * Generated by JsPbCodeGenerator.
426
+ * @param {Array=} opt_data Optional initial data array, typically from a
427
+ * server response, or constructed directly in Javascript. The array is used
428
+ * in place and becomes part of the constructed object. It is not cloned.
429
+ * If no data is provided, the constructed object will be empty, but still
430
+ * valid.
431
+ * @extends {jspb.Message}
432
+ * @constructor
433
+ */
434
+ proto.tournament.TournamentScoringRuleRequest = function(opt_data) {
435
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.tournament.TournamentScoringRuleRequest.repeatedFields_, null);
436
+ };
392
437
  goog.inherits(proto.tournament.TournamentScoringRuleRequest, jspb.Message);
393
438
  if (goog.DEBUG && !COMPILED) {
394
439
  /**
@@ -407,9 +452,30 @@ if (goog.DEBUG && !COMPILED) {
407
452
  * @extends {jspb.Message}
408
453
  * @constructor
409
454
  */
410
- proto.tournament.TournamentRewardsRequest = function(opt_data) {
455
+ proto.tournament.RewardItem = function(opt_data) {
411
456
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
412
457
  };
458
+ goog.inherits(proto.tournament.RewardItem, jspb.Message);
459
+ if (goog.DEBUG && !COMPILED) {
460
+ /**
461
+ * @public
462
+ * @override
463
+ */
464
+ proto.tournament.RewardItem.displayName = 'proto.tournament.RewardItem';
465
+ }
466
+ /**
467
+ * Generated by JsPbCodeGenerator.
468
+ * @param {Array=} opt_data Optional initial data array, typically from a
469
+ * server response, or constructed directly in Javascript. The array is used
470
+ * in place and becomes part of the constructed object. It is not cloned.
471
+ * If no data is provided, the constructed object will be empty, but still
472
+ * valid.
473
+ * @extends {jspb.Message}
474
+ * @constructor
475
+ */
476
+ proto.tournament.TournamentRewardsRequest = function(opt_data) {
477
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.tournament.TournamentRewardsRequest.repeatedFields_, null);
478
+ };
413
479
  goog.inherits(proto.tournament.TournamentRewardsRequest, jspb.Message);
414
480
  if (goog.DEBUG && !COMPILED) {
415
481
  /**
@@ -4030,8 +4096,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
4030
4096
  * http://goto/soy-param-migration
4031
4097
  * @return {!Object}
4032
4098
  */
4033
- proto.tournament.TournamentActivationRuleRequest.prototype.toObject = function(opt_includeInstance) {
4034
- return proto.tournament.TournamentActivationRuleRequest.toObject(opt_includeInstance, this);
4099
+ proto.tournament.ActivationRuleItem.prototype.toObject = function(opt_includeInstance) {
4100
+ return proto.tournament.ActivationRuleItem.toObject(opt_includeInstance, this);
4035
4101
  };
4036
4102
 
4037
4103
 
@@ -4040,13 +4106,24 @@ proto.tournament.TournamentActivationRuleRequest.prototype.toObject = function(o
4040
4106
  * @param {boolean|undefined} includeInstance Deprecated. Whether to include
4041
4107
  * the JSPB instance for transitional soy proto support:
4042
4108
  * http://goto/soy-param-migration
4043
- * @param {!proto.tournament.TournamentActivationRuleRequest} msg The msg instance to transform.
4109
+ * @param {!proto.tournament.ActivationRuleItem} msg The msg instance to transform.
4044
4110
  * @return {!Object}
4045
4111
  * @suppress {unusedLocalVariables} f is only used for nested messages
4046
4112
  */
4047
- proto.tournament.TournamentActivationRuleRequest.toObject = function(includeInstance, msg) {
4113
+ proto.tournament.ActivationRuleItem.toObject = function(includeInstance, msg) {
4048
4114
  var f, obj = {
4049
-
4115
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0),
4116
+ tournamentId: jspb.Message.getFieldWithDefault(msg, 2, 0),
4117
+ currency: jspb.Message.getFieldWithDefault(msg, 3, ""),
4118
+ depositMinSum: jspb.Message.getFieldWithDefault(msg, 4, 0),
4119
+ betsMinCount: jspb.Message.getFieldWithDefault(msg, 5, 0),
4120
+ userCategoryId: jspb.Message.getFieldWithDefault(msg, 6, 0),
4121
+ emailConfirmed: jspb.Message.getFieldWithDefault(msg, 7, 0),
4122
+ phoneConfirmed: jspb.Message.getFieldWithDefault(msg, 8, 0),
4123
+ kycConfirmed: jspb.Message.getFieldWithDefault(msg, 9, 0),
4124
+ rankingPoints: jspb.Message.getFieldWithDefault(msg, 10, 0),
4125
+ loyaltyPoints: jspb.Message.getFieldWithDefault(msg, 11, 0),
4126
+ coins: jspb.Message.getFieldWithDefault(msg, 12, 0)
4050
4127
  };
4051
4128
 
4052
4129
  if (includeInstance) {
@@ -4060,29 +4137,77 @@ proto.tournament.TournamentActivationRuleRequest.toObject = function(includeInst
4060
4137
  /**
4061
4138
  * Deserializes binary data (in protobuf wire format).
4062
4139
  * @param {jspb.ByteSource} bytes The bytes to deserialize.
4063
- * @return {!proto.tournament.TournamentActivationRuleRequest}
4140
+ * @return {!proto.tournament.ActivationRuleItem}
4064
4141
  */
4065
- proto.tournament.TournamentActivationRuleRequest.deserializeBinary = function(bytes) {
4142
+ proto.tournament.ActivationRuleItem.deserializeBinary = function(bytes) {
4066
4143
  var reader = new jspb.BinaryReader(bytes);
4067
- var msg = new proto.tournament.TournamentActivationRuleRequest;
4068
- return proto.tournament.TournamentActivationRuleRequest.deserializeBinaryFromReader(msg, reader);
4144
+ var msg = new proto.tournament.ActivationRuleItem;
4145
+ return proto.tournament.ActivationRuleItem.deserializeBinaryFromReader(msg, reader);
4069
4146
  };
4070
4147
 
4071
4148
 
4072
4149
  /**
4073
4150
  * Deserializes binary data (in protobuf wire format) from the
4074
4151
  * given reader into the given message object.
4075
- * @param {!proto.tournament.TournamentActivationRuleRequest} msg The message object to deserialize into.
4152
+ * @param {!proto.tournament.ActivationRuleItem} msg The message object to deserialize into.
4076
4153
  * @param {!jspb.BinaryReader} reader The BinaryReader to use.
4077
- * @return {!proto.tournament.TournamentActivationRuleRequest}
4154
+ * @return {!proto.tournament.ActivationRuleItem}
4078
4155
  */
4079
- proto.tournament.TournamentActivationRuleRequest.deserializeBinaryFromReader = function(msg, reader) {
4156
+ proto.tournament.ActivationRuleItem.deserializeBinaryFromReader = function(msg, reader) {
4080
4157
  while (reader.nextField()) {
4081
4158
  if (reader.isEndGroup()) {
4082
4159
  break;
4083
4160
  }
4084
4161
  var field = reader.getFieldNumber();
4085
4162
  switch (field) {
4163
+ case 1:
4164
+ var value = /** @type {number} */ (reader.readInt32());
4165
+ msg.setId(value);
4166
+ break;
4167
+ case 2:
4168
+ var value = /** @type {number} */ (reader.readInt32());
4169
+ msg.setTournamentId(value);
4170
+ break;
4171
+ case 3:
4172
+ var value = /** @type {string} */ (reader.readString());
4173
+ msg.setCurrency(value);
4174
+ break;
4175
+ case 4:
4176
+ var value = /** @type {number} */ (reader.readInt32());
4177
+ msg.setDepositMinSum(value);
4178
+ break;
4179
+ case 5:
4180
+ var value = /** @type {number} */ (reader.readInt32());
4181
+ msg.setBetsMinCount(value);
4182
+ break;
4183
+ case 6:
4184
+ var value = /** @type {number} */ (reader.readInt32());
4185
+ msg.setUserCategoryId(value);
4186
+ break;
4187
+ case 7:
4188
+ var value = /** @type {number} */ (reader.readInt32());
4189
+ msg.setEmailConfirmed(value);
4190
+ break;
4191
+ case 8:
4192
+ var value = /** @type {number} */ (reader.readInt32());
4193
+ msg.setPhoneConfirmed(value);
4194
+ break;
4195
+ case 9:
4196
+ var value = /** @type {number} */ (reader.readInt32());
4197
+ msg.setKycConfirmed(value);
4198
+ break;
4199
+ case 10:
4200
+ var value = /** @type {number} */ (reader.readInt32());
4201
+ msg.setRankingPoints(value);
4202
+ break;
4203
+ case 11:
4204
+ var value = /** @type {number} */ (reader.readInt32());
4205
+ msg.setLoyaltyPoints(value);
4206
+ break;
4207
+ case 12:
4208
+ var value = /** @type {number} */ (reader.readInt32());
4209
+ msg.setCoins(value);
4210
+ break;
4086
4211
  default:
4087
4212
  reader.skipField();
4088
4213
  break;
@@ -4096,9 +4221,9 @@ proto.tournament.TournamentActivationRuleRequest.deserializeBinaryFromReader = f
4096
4221
  * Serializes the message to binary data (in protobuf wire format).
4097
4222
  * @return {!Uint8Array}
4098
4223
  */
4099
- proto.tournament.TournamentActivationRuleRequest.prototype.serializeBinary = function() {
4224
+ proto.tournament.ActivationRuleItem.prototype.serializeBinary = function() {
4100
4225
  var writer = new jspb.BinaryWriter();
4101
- proto.tournament.TournamentActivationRuleRequest.serializeBinaryToWriter(this, writer);
4226
+ proto.tournament.ActivationRuleItem.serializeBinaryToWriter(this, writer);
4102
4227
  return writer.getResultBuffer();
4103
4228
  };
4104
4229
 
@@ -4106,84 +4231,1498 @@ proto.tournament.TournamentActivationRuleRequest.prototype.serializeBinary = fun
4106
4231
  /**
4107
4232
  * Serializes the given message to binary data (in protobuf wire
4108
4233
  * format), writing to the given BinaryWriter.
4109
- * @param {!proto.tournament.TournamentActivationRuleRequest} message
4234
+ * @param {!proto.tournament.ActivationRuleItem} message
4110
4235
  * @param {!jspb.BinaryWriter} writer
4111
4236
  * @suppress {unusedLocalVariables} f is only used for nested messages
4112
4237
  */
4113
- proto.tournament.TournamentActivationRuleRequest.serializeBinaryToWriter = function(message, writer) {
4238
+ proto.tournament.ActivationRuleItem.serializeBinaryToWriter = function(message, writer) {
4114
4239
  var f = undefined;
4240
+ f = /** @type {number} */ (jspb.Message.getField(message, 1));
4241
+ if (f != null) {
4242
+ writer.writeInt32(
4243
+ 1,
4244
+ f
4245
+ );
4246
+ }
4247
+ f = /** @type {number} */ (jspb.Message.getField(message, 2));
4248
+ if (f != null) {
4249
+ writer.writeInt32(
4250
+ 2,
4251
+ f
4252
+ );
4253
+ }
4254
+ f = /** @type {string} */ (jspb.Message.getField(message, 3));
4255
+ if (f != null) {
4256
+ writer.writeString(
4257
+ 3,
4258
+ f
4259
+ );
4260
+ }
4261
+ f = /** @type {number} */ (jspb.Message.getField(message, 4));
4262
+ if (f != null) {
4263
+ writer.writeInt32(
4264
+ 4,
4265
+ f
4266
+ );
4267
+ }
4268
+ f = /** @type {number} */ (jspb.Message.getField(message, 5));
4269
+ if (f != null) {
4270
+ writer.writeInt32(
4271
+ 5,
4272
+ f
4273
+ );
4274
+ }
4275
+ f = /** @type {number} */ (jspb.Message.getField(message, 6));
4276
+ if (f != null) {
4277
+ writer.writeInt32(
4278
+ 6,
4279
+ f
4280
+ );
4281
+ }
4282
+ f = /** @type {number} */ (jspb.Message.getField(message, 7));
4283
+ if (f != null) {
4284
+ writer.writeInt32(
4285
+ 7,
4286
+ f
4287
+ );
4288
+ }
4289
+ f = /** @type {number} */ (jspb.Message.getField(message, 8));
4290
+ if (f != null) {
4291
+ writer.writeInt32(
4292
+ 8,
4293
+ f
4294
+ );
4295
+ }
4296
+ f = /** @type {number} */ (jspb.Message.getField(message, 9));
4297
+ if (f != null) {
4298
+ writer.writeInt32(
4299
+ 9,
4300
+ f
4301
+ );
4302
+ }
4303
+ f = /** @type {number} */ (jspb.Message.getField(message, 10));
4304
+ if (f != null) {
4305
+ writer.writeInt32(
4306
+ 10,
4307
+ f
4308
+ );
4309
+ }
4310
+ f = /** @type {number} */ (jspb.Message.getField(message, 11));
4311
+ if (f != null) {
4312
+ writer.writeInt32(
4313
+ 11,
4314
+ f
4315
+ );
4316
+ }
4317
+ f = /** @type {number} */ (jspb.Message.getField(message, 12));
4318
+ if (f != null) {
4319
+ writer.writeInt32(
4320
+ 12,
4321
+ f
4322
+ );
4323
+ }
4115
4324
  };
4116
4325
 
4117
4326
 
4327
+ /**
4328
+ * optional int32 id = 1;
4329
+ * @return {number}
4330
+ */
4331
+ proto.tournament.ActivationRuleItem.prototype.getId = function() {
4332
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
4333
+ };
4334
+
4118
4335
 
4336
+ /**
4337
+ * @param {number} value
4338
+ * @return {!proto.tournament.ActivationRuleItem} returns this
4339
+ */
4340
+ proto.tournament.ActivationRuleItem.prototype.setId = function(value) {
4341
+ return jspb.Message.setField(this, 1, value);
4342
+ };
4119
4343
 
4120
4344
 
4121
- if (jspb.Message.GENERATE_TO_OBJECT) {
4122
4345
  /**
4123
- * Creates an object representation of this proto.
4124
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
4125
- * Optional fields that are not set will be set to undefined.
4126
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
4127
- * For the list of reserved names please see:
4128
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
4129
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
4130
- * JSPB instance for transitional soy proto support:
4131
- * http://goto/soy-param-migration
4132
- * @return {!Object}
4346
+ * Clears the field making it undefined.
4347
+ * @return {!proto.tournament.ActivationRuleItem} returns this
4133
4348
  */
4134
- proto.tournament.TournamentScoringRuleRequest.prototype.toObject = function(opt_includeInstance) {
4135
- return proto.tournament.TournamentScoringRuleRequest.toObject(opt_includeInstance, this);
4349
+ proto.tournament.ActivationRuleItem.prototype.clearId = function() {
4350
+ return jspb.Message.setField(this, 1, undefined);
4136
4351
  };
4137
4352
 
4138
4353
 
4139
4354
  /**
4140
- * Static version of the {@see toObject} method.
4141
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
4142
- * the JSPB instance for transitional soy proto support:
4143
- * http://goto/soy-param-migration
4144
- * @param {!proto.tournament.TournamentScoringRuleRequest} msg The msg instance to transform.
4145
- * @return {!Object}
4146
- * @suppress {unusedLocalVariables} f is only used for nested messages
4355
+ * Returns whether this field is set.
4356
+ * @return {boolean}
4147
4357
  */
4148
- proto.tournament.TournamentScoringRuleRequest.toObject = function(includeInstance, msg) {
4149
- var f, obj = {
4358
+ proto.tournament.ActivationRuleItem.prototype.hasId = function() {
4359
+ return jspb.Message.getField(this, 1) != null;
4360
+ };
4150
4361
 
4151
- };
4152
4362
 
4153
- if (includeInstance) {
4154
- obj.$jspbMessageInstance = msg;
4155
- }
4156
- return obj;
4363
+ /**
4364
+ * optional int32 tournament_id = 2;
4365
+ * @return {number}
4366
+ */
4367
+ proto.tournament.ActivationRuleItem.prototype.getTournamentId = function() {
4368
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
4157
4369
  };
4158
- }
4159
4370
 
4160
4371
 
4161
4372
  /**
4162
- * Deserializes binary data (in protobuf wire format).
4163
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
4164
- * @return {!proto.tournament.TournamentScoringRuleRequest}
4373
+ * @param {number} value
4374
+ * @return {!proto.tournament.ActivationRuleItem} returns this
4165
4375
  */
4166
- proto.tournament.TournamentScoringRuleRequest.deserializeBinary = function(bytes) {
4167
- var reader = new jspb.BinaryReader(bytes);
4168
- var msg = new proto.tournament.TournamentScoringRuleRequest;
4169
- return proto.tournament.TournamentScoringRuleRequest.deserializeBinaryFromReader(msg, reader);
4376
+ proto.tournament.ActivationRuleItem.prototype.setTournamentId = function(value) {
4377
+ return jspb.Message.setField(this, 2, value);
4170
4378
  };
4171
4379
 
4172
4380
 
4173
4381
  /**
4174
- * Deserializes binary data (in protobuf wire format) from the
4175
- * given reader into the given message object.
4176
- * @param {!proto.tournament.TournamentScoringRuleRequest} msg The message object to deserialize into.
4177
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
4178
- * @return {!proto.tournament.TournamentScoringRuleRequest}
4382
+ * Clears the field making it undefined.
4383
+ * @return {!proto.tournament.ActivationRuleItem} returns this
4179
4384
  */
4180
- proto.tournament.TournamentScoringRuleRequest.deserializeBinaryFromReader = function(msg, reader) {
4181
- while (reader.nextField()) {
4182
- if (reader.isEndGroup()) {
4183
- break;
4385
+ proto.tournament.ActivationRuleItem.prototype.clearTournamentId = function() {
4386
+ return jspb.Message.setField(this, 2, undefined);
4387
+ };
4388
+
4389
+
4390
+ /**
4391
+ * Returns whether this field is set.
4392
+ * @return {boolean}
4393
+ */
4394
+ proto.tournament.ActivationRuleItem.prototype.hasTournamentId = function() {
4395
+ return jspb.Message.getField(this, 2) != null;
4396
+ };
4397
+
4398
+
4399
+ /**
4400
+ * optional string currency = 3;
4401
+ * @return {string}
4402
+ */
4403
+ proto.tournament.ActivationRuleItem.prototype.getCurrency = function() {
4404
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
4405
+ };
4406
+
4407
+
4408
+ /**
4409
+ * @param {string} value
4410
+ * @return {!proto.tournament.ActivationRuleItem} returns this
4411
+ */
4412
+ proto.tournament.ActivationRuleItem.prototype.setCurrency = function(value) {
4413
+ return jspb.Message.setField(this, 3, value);
4414
+ };
4415
+
4416
+
4417
+ /**
4418
+ * Clears the field making it undefined.
4419
+ * @return {!proto.tournament.ActivationRuleItem} returns this
4420
+ */
4421
+ proto.tournament.ActivationRuleItem.prototype.clearCurrency = function() {
4422
+ return jspb.Message.setField(this, 3, undefined);
4423
+ };
4424
+
4425
+
4426
+ /**
4427
+ * Returns whether this field is set.
4428
+ * @return {boolean}
4429
+ */
4430
+ proto.tournament.ActivationRuleItem.prototype.hasCurrency = function() {
4431
+ return jspb.Message.getField(this, 3) != null;
4432
+ };
4433
+
4434
+
4435
+ /**
4436
+ * optional int32 deposit_min_sum = 4;
4437
+ * @return {number}
4438
+ */
4439
+ proto.tournament.ActivationRuleItem.prototype.getDepositMinSum = function() {
4440
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
4441
+ };
4442
+
4443
+
4444
+ /**
4445
+ * @param {number} value
4446
+ * @return {!proto.tournament.ActivationRuleItem} returns this
4447
+ */
4448
+ proto.tournament.ActivationRuleItem.prototype.setDepositMinSum = function(value) {
4449
+ return jspb.Message.setField(this, 4, value);
4450
+ };
4451
+
4452
+
4453
+ /**
4454
+ * Clears the field making it undefined.
4455
+ * @return {!proto.tournament.ActivationRuleItem} returns this
4456
+ */
4457
+ proto.tournament.ActivationRuleItem.prototype.clearDepositMinSum = function() {
4458
+ return jspb.Message.setField(this, 4, undefined);
4459
+ };
4460
+
4461
+
4462
+ /**
4463
+ * Returns whether this field is set.
4464
+ * @return {boolean}
4465
+ */
4466
+ proto.tournament.ActivationRuleItem.prototype.hasDepositMinSum = function() {
4467
+ return jspb.Message.getField(this, 4) != null;
4468
+ };
4469
+
4470
+
4471
+ /**
4472
+ * optional int32 bets_min_count = 5;
4473
+ * @return {number}
4474
+ */
4475
+ proto.tournament.ActivationRuleItem.prototype.getBetsMinCount = function() {
4476
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
4477
+ };
4478
+
4479
+
4480
+ /**
4481
+ * @param {number} value
4482
+ * @return {!proto.tournament.ActivationRuleItem} returns this
4483
+ */
4484
+ proto.tournament.ActivationRuleItem.prototype.setBetsMinCount = function(value) {
4485
+ return jspb.Message.setField(this, 5, value);
4486
+ };
4487
+
4488
+
4489
+ /**
4490
+ * Clears the field making it undefined.
4491
+ * @return {!proto.tournament.ActivationRuleItem} returns this
4492
+ */
4493
+ proto.tournament.ActivationRuleItem.prototype.clearBetsMinCount = function() {
4494
+ return jspb.Message.setField(this, 5, undefined);
4495
+ };
4496
+
4497
+
4498
+ /**
4499
+ * Returns whether this field is set.
4500
+ * @return {boolean}
4501
+ */
4502
+ proto.tournament.ActivationRuleItem.prototype.hasBetsMinCount = function() {
4503
+ return jspb.Message.getField(this, 5) != null;
4504
+ };
4505
+
4506
+
4507
+ /**
4508
+ * optional int32 user_category_id = 6;
4509
+ * @return {number}
4510
+ */
4511
+ proto.tournament.ActivationRuleItem.prototype.getUserCategoryId = function() {
4512
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
4513
+ };
4514
+
4515
+
4516
+ /**
4517
+ * @param {number} value
4518
+ * @return {!proto.tournament.ActivationRuleItem} returns this
4519
+ */
4520
+ proto.tournament.ActivationRuleItem.prototype.setUserCategoryId = function(value) {
4521
+ return jspb.Message.setField(this, 6, value);
4522
+ };
4523
+
4524
+
4525
+ /**
4526
+ * Clears the field making it undefined.
4527
+ * @return {!proto.tournament.ActivationRuleItem} returns this
4528
+ */
4529
+ proto.tournament.ActivationRuleItem.prototype.clearUserCategoryId = function() {
4530
+ return jspb.Message.setField(this, 6, undefined);
4531
+ };
4532
+
4533
+
4534
+ /**
4535
+ * Returns whether this field is set.
4536
+ * @return {boolean}
4537
+ */
4538
+ proto.tournament.ActivationRuleItem.prototype.hasUserCategoryId = function() {
4539
+ return jspb.Message.getField(this, 6) != null;
4540
+ };
4541
+
4542
+
4543
+ /**
4544
+ * optional int32 email_confirmed = 7;
4545
+ * @return {number}
4546
+ */
4547
+ proto.tournament.ActivationRuleItem.prototype.getEmailConfirmed = function() {
4548
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
4549
+ };
4550
+
4551
+
4552
+ /**
4553
+ * @param {number} value
4554
+ * @return {!proto.tournament.ActivationRuleItem} returns this
4555
+ */
4556
+ proto.tournament.ActivationRuleItem.prototype.setEmailConfirmed = function(value) {
4557
+ return jspb.Message.setField(this, 7, value);
4558
+ };
4559
+
4560
+
4561
+ /**
4562
+ * Clears the field making it undefined.
4563
+ * @return {!proto.tournament.ActivationRuleItem} returns this
4564
+ */
4565
+ proto.tournament.ActivationRuleItem.prototype.clearEmailConfirmed = function() {
4566
+ return jspb.Message.setField(this, 7, undefined);
4567
+ };
4568
+
4569
+
4570
+ /**
4571
+ * Returns whether this field is set.
4572
+ * @return {boolean}
4573
+ */
4574
+ proto.tournament.ActivationRuleItem.prototype.hasEmailConfirmed = function() {
4575
+ return jspb.Message.getField(this, 7) != null;
4576
+ };
4577
+
4578
+
4579
+ /**
4580
+ * optional int32 phone_confirmed = 8;
4581
+ * @return {number}
4582
+ */
4583
+ proto.tournament.ActivationRuleItem.prototype.getPhoneConfirmed = function() {
4584
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0));
4585
+ };
4586
+
4587
+
4588
+ /**
4589
+ * @param {number} value
4590
+ * @return {!proto.tournament.ActivationRuleItem} returns this
4591
+ */
4592
+ proto.tournament.ActivationRuleItem.prototype.setPhoneConfirmed = function(value) {
4593
+ return jspb.Message.setField(this, 8, value);
4594
+ };
4595
+
4596
+
4597
+ /**
4598
+ * Clears the field making it undefined.
4599
+ * @return {!proto.tournament.ActivationRuleItem} returns this
4600
+ */
4601
+ proto.tournament.ActivationRuleItem.prototype.clearPhoneConfirmed = function() {
4602
+ return jspb.Message.setField(this, 8, undefined);
4603
+ };
4604
+
4605
+
4606
+ /**
4607
+ * Returns whether this field is set.
4608
+ * @return {boolean}
4609
+ */
4610
+ proto.tournament.ActivationRuleItem.prototype.hasPhoneConfirmed = function() {
4611
+ return jspb.Message.getField(this, 8) != null;
4612
+ };
4613
+
4614
+
4615
+ /**
4616
+ * optional int32 kyc_confirmed = 9;
4617
+ * @return {number}
4618
+ */
4619
+ proto.tournament.ActivationRuleItem.prototype.getKycConfirmed = function() {
4620
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0));
4621
+ };
4622
+
4623
+
4624
+ /**
4625
+ * @param {number} value
4626
+ * @return {!proto.tournament.ActivationRuleItem} returns this
4627
+ */
4628
+ proto.tournament.ActivationRuleItem.prototype.setKycConfirmed = function(value) {
4629
+ return jspb.Message.setField(this, 9, value);
4630
+ };
4631
+
4632
+
4633
+ /**
4634
+ * Clears the field making it undefined.
4635
+ * @return {!proto.tournament.ActivationRuleItem} returns this
4636
+ */
4637
+ proto.tournament.ActivationRuleItem.prototype.clearKycConfirmed = function() {
4638
+ return jspb.Message.setField(this, 9, undefined);
4639
+ };
4640
+
4641
+
4642
+ /**
4643
+ * Returns whether this field is set.
4644
+ * @return {boolean}
4645
+ */
4646
+ proto.tournament.ActivationRuleItem.prototype.hasKycConfirmed = function() {
4647
+ return jspb.Message.getField(this, 9) != null;
4648
+ };
4649
+
4650
+
4651
+ /**
4652
+ * optional int32 ranking_points = 10;
4653
+ * @return {number}
4654
+ */
4655
+ proto.tournament.ActivationRuleItem.prototype.getRankingPoints = function() {
4656
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0));
4657
+ };
4658
+
4659
+
4660
+ /**
4661
+ * @param {number} value
4662
+ * @return {!proto.tournament.ActivationRuleItem} returns this
4663
+ */
4664
+ proto.tournament.ActivationRuleItem.prototype.setRankingPoints = function(value) {
4665
+ return jspb.Message.setField(this, 10, value);
4666
+ };
4667
+
4668
+
4669
+ /**
4670
+ * Clears the field making it undefined.
4671
+ * @return {!proto.tournament.ActivationRuleItem} returns this
4672
+ */
4673
+ proto.tournament.ActivationRuleItem.prototype.clearRankingPoints = function() {
4674
+ return jspb.Message.setField(this, 10, undefined);
4675
+ };
4676
+
4677
+
4678
+ /**
4679
+ * Returns whether this field is set.
4680
+ * @return {boolean}
4681
+ */
4682
+ proto.tournament.ActivationRuleItem.prototype.hasRankingPoints = function() {
4683
+ return jspb.Message.getField(this, 10) != null;
4684
+ };
4685
+
4686
+
4687
+ /**
4688
+ * optional int32 loyalty_points = 11;
4689
+ * @return {number}
4690
+ */
4691
+ proto.tournament.ActivationRuleItem.prototype.getLoyaltyPoints = function() {
4692
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0));
4693
+ };
4694
+
4695
+
4696
+ /**
4697
+ * @param {number} value
4698
+ * @return {!proto.tournament.ActivationRuleItem} returns this
4699
+ */
4700
+ proto.tournament.ActivationRuleItem.prototype.setLoyaltyPoints = function(value) {
4701
+ return jspb.Message.setField(this, 11, value);
4702
+ };
4703
+
4704
+
4705
+ /**
4706
+ * Clears the field making it undefined.
4707
+ * @return {!proto.tournament.ActivationRuleItem} returns this
4708
+ */
4709
+ proto.tournament.ActivationRuleItem.prototype.clearLoyaltyPoints = function() {
4710
+ return jspb.Message.setField(this, 11, undefined);
4711
+ };
4712
+
4713
+
4714
+ /**
4715
+ * Returns whether this field is set.
4716
+ * @return {boolean}
4717
+ */
4718
+ proto.tournament.ActivationRuleItem.prototype.hasLoyaltyPoints = function() {
4719
+ return jspb.Message.getField(this, 11) != null;
4720
+ };
4721
+
4722
+
4723
+ /**
4724
+ * optional int32 coins = 12;
4725
+ * @return {number}
4726
+ */
4727
+ proto.tournament.ActivationRuleItem.prototype.getCoins = function() {
4728
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0));
4729
+ };
4730
+
4731
+
4732
+ /**
4733
+ * @param {number} value
4734
+ * @return {!proto.tournament.ActivationRuleItem} returns this
4735
+ */
4736
+ proto.tournament.ActivationRuleItem.prototype.setCoins = function(value) {
4737
+ return jspb.Message.setField(this, 12, value);
4738
+ };
4739
+
4740
+
4741
+ /**
4742
+ * Clears the field making it undefined.
4743
+ * @return {!proto.tournament.ActivationRuleItem} returns this
4744
+ */
4745
+ proto.tournament.ActivationRuleItem.prototype.clearCoins = function() {
4746
+ return jspb.Message.setField(this, 12, undefined);
4747
+ };
4748
+
4749
+
4750
+ /**
4751
+ * Returns whether this field is set.
4752
+ * @return {boolean}
4753
+ */
4754
+ proto.tournament.ActivationRuleItem.prototype.hasCoins = function() {
4755
+ return jspb.Message.getField(this, 12) != null;
4756
+ };
4757
+
4758
+
4759
+
4760
+ /**
4761
+ * List of repeated fields within this message type.
4762
+ * @private {!Array<number>}
4763
+ * @const
4764
+ */
4765
+ proto.tournament.TournamentActivationRuleRequest.repeatedFields_ = [2];
4766
+
4767
+
4768
+
4769
+ if (jspb.Message.GENERATE_TO_OBJECT) {
4770
+ /**
4771
+ * Creates an object representation of this proto.
4772
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
4773
+ * Optional fields that are not set will be set to undefined.
4774
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
4775
+ * For the list of reserved names please see:
4776
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
4777
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
4778
+ * JSPB instance for transitional soy proto support:
4779
+ * http://goto/soy-param-migration
4780
+ * @return {!Object}
4781
+ */
4782
+ proto.tournament.TournamentActivationRuleRequest.prototype.toObject = function(opt_includeInstance) {
4783
+ return proto.tournament.TournamentActivationRuleRequest.toObject(opt_includeInstance, this);
4784
+ };
4785
+
4786
+
4787
+ /**
4788
+ * Static version of the {@see toObject} method.
4789
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
4790
+ * the JSPB instance for transitional soy proto support:
4791
+ * http://goto/soy-param-migration
4792
+ * @param {!proto.tournament.TournamentActivationRuleRequest} msg The msg instance to transform.
4793
+ * @return {!Object}
4794
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4795
+ */
4796
+ proto.tournament.TournamentActivationRuleRequest.toObject = function(includeInstance, msg) {
4797
+ var f, obj = {
4798
+ tournamentId: jspb.Message.getFieldWithDefault(msg, 1, 0),
4799
+ itemsList: jspb.Message.toObjectList(msg.getItemsList(),
4800
+ proto.tournament.ActivationRuleItem.toObject, includeInstance)
4801
+ };
4802
+
4803
+ if (includeInstance) {
4804
+ obj.$jspbMessageInstance = msg;
4805
+ }
4806
+ return obj;
4807
+ };
4808
+ }
4809
+
4810
+
4811
+ /**
4812
+ * Deserializes binary data (in protobuf wire format).
4813
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
4814
+ * @return {!proto.tournament.TournamentActivationRuleRequest}
4815
+ */
4816
+ proto.tournament.TournamentActivationRuleRequest.deserializeBinary = function(bytes) {
4817
+ var reader = new jspb.BinaryReader(bytes);
4818
+ var msg = new proto.tournament.TournamentActivationRuleRequest;
4819
+ return proto.tournament.TournamentActivationRuleRequest.deserializeBinaryFromReader(msg, reader);
4820
+ };
4821
+
4822
+
4823
+ /**
4824
+ * Deserializes binary data (in protobuf wire format) from the
4825
+ * given reader into the given message object.
4826
+ * @param {!proto.tournament.TournamentActivationRuleRequest} msg The message object to deserialize into.
4827
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
4828
+ * @return {!proto.tournament.TournamentActivationRuleRequest}
4829
+ */
4830
+ proto.tournament.TournamentActivationRuleRequest.deserializeBinaryFromReader = function(msg, reader) {
4831
+ while (reader.nextField()) {
4832
+ if (reader.isEndGroup()) {
4833
+ break;
4834
+ }
4835
+ var field = reader.getFieldNumber();
4836
+ switch (field) {
4837
+ case 1:
4838
+ var value = /** @type {number} */ (reader.readInt32());
4839
+ msg.setTournamentId(value);
4840
+ break;
4841
+ case 2:
4842
+ var value = new proto.tournament.ActivationRuleItem;
4843
+ reader.readMessage(value,proto.tournament.ActivationRuleItem.deserializeBinaryFromReader);
4844
+ msg.addItems(value);
4845
+ break;
4846
+ default:
4847
+ reader.skipField();
4848
+ break;
4849
+ }
4850
+ }
4851
+ return msg;
4852
+ };
4853
+
4854
+
4855
+ /**
4856
+ * Serializes the message to binary data (in protobuf wire format).
4857
+ * @return {!Uint8Array}
4858
+ */
4859
+ proto.tournament.TournamentActivationRuleRequest.prototype.serializeBinary = function() {
4860
+ var writer = new jspb.BinaryWriter();
4861
+ proto.tournament.TournamentActivationRuleRequest.serializeBinaryToWriter(this, writer);
4862
+ return writer.getResultBuffer();
4863
+ };
4864
+
4865
+
4866
+ /**
4867
+ * Serializes the given message to binary data (in protobuf wire
4868
+ * format), writing to the given BinaryWriter.
4869
+ * @param {!proto.tournament.TournamentActivationRuleRequest} message
4870
+ * @param {!jspb.BinaryWriter} writer
4871
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4872
+ */
4873
+ proto.tournament.TournamentActivationRuleRequest.serializeBinaryToWriter = function(message, writer) {
4874
+ var f = undefined;
4875
+ f = message.getTournamentId();
4876
+ if (f !== 0) {
4877
+ writer.writeInt32(
4878
+ 1,
4879
+ f
4880
+ );
4881
+ }
4882
+ f = message.getItemsList();
4883
+ if (f.length > 0) {
4884
+ writer.writeRepeatedMessage(
4885
+ 2,
4886
+ f,
4887
+ proto.tournament.ActivationRuleItem.serializeBinaryToWriter
4888
+ );
4889
+ }
4890
+ };
4891
+
4892
+
4893
+ /**
4894
+ * optional int32 tournament_id = 1;
4895
+ * @return {number}
4896
+ */
4897
+ proto.tournament.TournamentActivationRuleRequest.prototype.getTournamentId = function() {
4898
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
4899
+ };
4900
+
4901
+
4902
+ /**
4903
+ * @param {number} value
4904
+ * @return {!proto.tournament.TournamentActivationRuleRequest} returns this
4905
+ */
4906
+ proto.tournament.TournamentActivationRuleRequest.prototype.setTournamentId = function(value) {
4907
+ return jspb.Message.setProto3IntField(this, 1, value);
4908
+ };
4909
+
4910
+
4911
+ /**
4912
+ * repeated ActivationRuleItem items = 2;
4913
+ * @return {!Array<!proto.tournament.ActivationRuleItem>}
4914
+ */
4915
+ proto.tournament.TournamentActivationRuleRequest.prototype.getItemsList = function() {
4916
+ return /** @type{!Array<!proto.tournament.ActivationRuleItem>} */ (
4917
+ jspb.Message.getRepeatedWrapperField(this, proto.tournament.ActivationRuleItem, 2));
4918
+ };
4919
+
4920
+
4921
+ /**
4922
+ * @param {!Array<!proto.tournament.ActivationRuleItem>} value
4923
+ * @return {!proto.tournament.TournamentActivationRuleRequest} returns this
4924
+ */
4925
+ proto.tournament.TournamentActivationRuleRequest.prototype.setItemsList = function(value) {
4926
+ return jspb.Message.setRepeatedWrapperField(this, 2, value);
4927
+ };
4928
+
4929
+
4930
+ /**
4931
+ * @param {!proto.tournament.ActivationRuleItem=} opt_value
4932
+ * @param {number=} opt_index
4933
+ * @return {!proto.tournament.ActivationRuleItem}
4934
+ */
4935
+ proto.tournament.TournamentActivationRuleRequest.prototype.addItems = function(opt_value, opt_index) {
4936
+ return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.tournament.ActivationRuleItem, opt_index);
4937
+ };
4938
+
4939
+
4940
+ /**
4941
+ * Clears the list making it empty but non-null.
4942
+ * @return {!proto.tournament.TournamentActivationRuleRequest} returns this
4943
+ */
4944
+ proto.tournament.TournamentActivationRuleRequest.prototype.clearItemsList = function() {
4945
+ return this.setItemsList([]);
4946
+ };
4947
+
4948
+
4949
+
4950
+
4951
+
4952
+ if (jspb.Message.GENERATE_TO_OBJECT) {
4953
+ /**
4954
+ * Creates an object representation of this proto.
4955
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
4956
+ * Optional fields that are not set will be set to undefined.
4957
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
4958
+ * For the list of reserved names please see:
4959
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
4960
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
4961
+ * JSPB instance for transitional soy proto support:
4962
+ * http://goto/soy-param-migration
4963
+ * @return {!Object}
4964
+ */
4965
+ proto.tournament.ScoringRule.prototype.toObject = function(opt_includeInstance) {
4966
+ return proto.tournament.ScoringRule.toObject(opt_includeInstance, this);
4967
+ };
4968
+
4969
+
4970
+ /**
4971
+ * Static version of the {@see toObject} method.
4972
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
4973
+ * the JSPB instance for transitional soy proto support:
4974
+ * http://goto/soy-param-migration
4975
+ * @param {!proto.tournament.ScoringRule} msg The msg instance to transform.
4976
+ * @return {!Object}
4977
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4978
+ */
4979
+ proto.tournament.ScoringRule.toObject = function(includeInstance, msg) {
4980
+ var f, obj = {
4981
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0),
4982
+ tournamentId: jspb.Message.getFieldWithDefault(msg, 2, 0),
4983
+ metric: jspb.Message.getFieldWithDefault(msg, 3, ""),
4984
+ multiplier: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0),
4985
+ minValue: jspb.Message.getFloatingPointFieldWithDefault(msg, 5, 0.0),
4986
+ maxValue: jspb.Message.getFloatingPointFieldWithDefault(msg, 6, 0.0),
4987
+ weight: jspb.Message.getFloatingPointFieldWithDefault(msg, 7, 0.0),
4988
+ isActive: jspb.Message.getFieldWithDefault(msg, 8, 0)
4989
+ };
4990
+
4991
+ if (includeInstance) {
4992
+ obj.$jspbMessageInstance = msg;
4993
+ }
4994
+ return obj;
4995
+ };
4996
+ }
4997
+
4998
+
4999
+ /**
5000
+ * Deserializes binary data (in protobuf wire format).
5001
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
5002
+ * @return {!proto.tournament.ScoringRule}
5003
+ */
5004
+ proto.tournament.ScoringRule.deserializeBinary = function(bytes) {
5005
+ var reader = new jspb.BinaryReader(bytes);
5006
+ var msg = new proto.tournament.ScoringRule;
5007
+ return proto.tournament.ScoringRule.deserializeBinaryFromReader(msg, reader);
5008
+ };
5009
+
5010
+
5011
+ /**
5012
+ * Deserializes binary data (in protobuf wire format) from the
5013
+ * given reader into the given message object.
5014
+ * @param {!proto.tournament.ScoringRule} msg The message object to deserialize into.
5015
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
5016
+ * @return {!proto.tournament.ScoringRule}
5017
+ */
5018
+ proto.tournament.ScoringRule.deserializeBinaryFromReader = function(msg, reader) {
5019
+ while (reader.nextField()) {
5020
+ if (reader.isEndGroup()) {
5021
+ break;
5022
+ }
5023
+ var field = reader.getFieldNumber();
5024
+ switch (field) {
5025
+ case 1:
5026
+ var value = /** @type {number} */ (reader.readInt32());
5027
+ msg.setId(value);
5028
+ break;
5029
+ case 2:
5030
+ var value = /** @type {number} */ (reader.readInt32());
5031
+ msg.setTournamentId(value);
5032
+ break;
5033
+ case 3:
5034
+ var value = /** @type {string} */ (reader.readString());
5035
+ msg.setMetric(value);
5036
+ break;
5037
+ case 4:
5038
+ var value = /** @type {number} */ (reader.readFloat());
5039
+ msg.setMultiplier(value);
5040
+ break;
5041
+ case 5:
5042
+ var value = /** @type {number} */ (reader.readFloat());
5043
+ msg.setMinValue(value);
5044
+ break;
5045
+ case 6:
5046
+ var value = /** @type {number} */ (reader.readFloat());
5047
+ msg.setMaxValue(value);
5048
+ break;
5049
+ case 7:
5050
+ var value = /** @type {number} */ (reader.readFloat());
5051
+ msg.setWeight(value);
5052
+ break;
5053
+ case 8:
5054
+ var value = /** @type {number} */ (reader.readInt32());
5055
+ msg.setIsActive(value);
5056
+ break;
5057
+ default:
5058
+ reader.skipField();
5059
+ break;
5060
+ }
5061
+ }
5062
+ return msg;
5063
+ };
5064
+
5065
+
5066
+ /**
5067
+ * Serializes the message to binary data (in protobuf wire format).
5068
+ * @return {!Uint8Array}
5069
+ */
5070
+ proto.tournament.ScoringRule.prototype.serializeBinary = function() {
5071
+ var writer = new jspb.BinaryWriter();
5072
+ proto.tournament.ScoringRule.serializeBinaryToWriter(this, writer);
5073
+ return writer.getResultBuffer();
5074
+ };
5075
+
5076
+
5077
+ /**
5078
+ * Serializes the given message to binary data (in protobuf wire
5079
+ * format), writing to the given BinaryWriter.
5080
+ * @param {!proto.tournament.ScoringRule} message
5081
+ * @param {!jspb.BinaryWriter} writer
5082
+ * @suppress {unusedLocalVariables} f is only used for nested messages
5083
+ */
5084
+ proto.tournament.ScoringRule.serializeBinaryToWriter = function(message, writer) {
5085
+ var f = undefined;
5086
+ f = /** @type {number} */ (jspb.Message.getField(message, 1));
5087
+ if (f != null) {
5088
+ writer.writeInt32(
5089
+ 1,
5090
+ f
5091
+ );
5092
+ }
5093
+ f = /** @type {number} */ (jspb.Message.getField(message, 2));
5094
+ if (f != null) {
5095
+ writer.writeInt32(
5096
+ 2,
5097
+ f
5098
+ );
5099
+ }
5100
+ f = /** @type {string} */ (jspb.Message.getField(message, 3));
5101
+ if (f != null) {
5102
+ writer.writeString(
5103
+ 3,
5104
+ f
5105
+ );
5106
+ }
5107
+ f = /** @type {number} */ (jspb.Message.getField(message, 4));
5108
+ if (f != null) {
5109
+ writer.writeFloat(
5110
+ 4,
5111
+ f
5112
+ );
5113
+ }
5114
+ f = /** @type {number} */ (jspb.Message.getField(message, 5));
5115
+ if (f != null) {
5116
+ writer.writeFloat(
5117
+ 5,
5118
+ f
5119
+ );
5120
+ }
5121
+ f = /** @type {number} */ (jspb.Message.getField(message, 6));
5122
+ if (f != null) {
5123
+ writer.writeFloat(
5124
+ 6,
5125
+ f
5126
+ );
5127
+ }
5128
+ f = /** @type {number} */ (jspb.Message.getField(message, 7));
5129
+ if (f != null) {
5130
+ writer.writeFloat(
5131
+ 7,
5132
+ f
5133
+ );
5134
+ }
5135
+ f = /** @type {number} */ (jspb.Message.getField(message, 8));
5136
+ if (f != null) {
5137
+ writer.writeInt32(
5138
+ 8,
5139
+ f
5140
+ );
5141
+ }
5142
+ };
5143
+
5144
+
5145
+ /**
5146
+ * optional int32 id = 1;
5147
+ * @return {number}
5148
+ */
5149
+ proto.tournament.ScoringRule.prototype.getId = function() {
5150
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
5151
+ };
5152
+
5153
+
5154
+ /**
5155
+ * @param {number} value
5156
+ * @return {!proto.tournament.ScoringRule} returns this
5157
+ */
5158
+ proto.tournament.ScoringRule.prototype.setId = function(value) {
5159
+ return jspb.Message.setField(this, 1, value);
5160
+ };
5161
+
5162
+
5163
+ /**
5164
+ * Clears the field making it undefined.
5165
+ * @return {!proto.tournament.ScoringRule} returns this
5166
+ */
5167
+ proto.tournament.ScoringRule.prototype.clearId = function() {
5168
+ return jspb.Message.setField(this, 1, undefined);
5169
+ };
5170
+
5171
+
5172
+ /**
5173
+ * Returns whether this field is set.
5174
+ * @return {boolean}
5175
+ */
5176
+ proto.tournament.ScoringRule.prototype.hasId = function() {
5177
+ return jspb.Message.getField(this, 1) != null;
5178
+ };
5179
+
5180
+
5181
+ /**
5182
+ * optional int32 tournament_id = 2;
5183
+ * @return {number}
5184
+ */
5185
+ proto.tournament.ScoringRule.prototype.getTournamentId = function() {
5186
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
5187
+ };
5188
+
5189
+
5190
+ /**
5191
+ * @param {number} value
5192
+ * @return {!proto.tournament.ScoringRule} returns this
5193
+ */
5194
+ proto.tournament.ScoringRule.prototype.setTournamentId = function(value) {
5195
+ return jspb.Message.setField(this, 2, value);
5196
+ };
5197
+
5198
+
5199
+ /**
5200
+ * Clears the field making it undefined.
5201
+ * @return {!proto.tournament.ScoringRule} returns this
5202
+ */
5203
+ proto.tournament.ScoringRule.prototype.clearTournamentId = function() {
5204
+ return jspb.Message.setField(this, 2, undefined);
5205
+ };
5206
+
5207
+
5208
+ /**
5209
+ * Returns whether this field is set.
5210
+ * @return {boolean}
5211
+ */
5212
+ proto.tournament.ScoringRule.prototype.hasTournamentId = function() {
5213
+ return jspb.Message.getField(this, 2) != null;
5214
+ };
5215
+
5216
+
5217
+ /**
5218
+ * optional string metric = 3;
5219
+ * @return {string}
5220
+ */
5221
+ proto.tournament.ScoringRule.prototype.getMetric = function() {
5222
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
5223
+ };
5224
+
5225
+
5226
+ /**
5227
+ * @param {string} value
5228
+ * @return {!proto.tournament.ScoringRule} returns this
5229
+ */
5230
+ proto.tournament.ScoringRule.prototype.setMetric = function(value) {
5231
+ return jspb.Message.setField(this, 3, value);
5232
+ };
5233
+
5234
+
5235
+ /**
5236
+ * Clears the field making it undefined.
5237
+ * @return {!proto.tournament.ScoringRule} returns this
5238
+ */
5239
+ proto.tournament.ScoringRule.prototype.clearMetric = function() {
5240
+ return jspb.Message.setField(this, 3, undefined);
5241
+ };
5242
+
5243
+
5244
+ /**
5245
+ * Returns whether this field is set.
5246
+ * @return {boolean}
5247
+ */
5248
+ proto.tournament.ScoringRule.prototype.hasMetric = function() {
5249
+ return jspb.Message.getField(this, 3) != null;
5250
+ };
5251
+
5252
+
5253
+ /**
5254
+ * optional float multiplier = 4;
5255
+ * @return {number}
5256
+ */
5257
+ proto.tournament.ScoringRule.prototype.getMultiplier = function() {
5258
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0));
5259
+ };
5260
+
5261
+
5262
+ /**
5263
+ * @param {number} value
5264
+ * @return {!proto.tournament.ScoringRule} returns this
5265
+ */
5266
+ proto.tournament.ScoringRule.prototype.setMultiplier = function(value) {
5267
+ return jspb.Message.setField(this, 4, value);
5268
+ };
5269
+
5270
+
5271
+ /**
5272
+ * Clears the field making it undefined.
5273
+ * @return {!proto.tournament.ScoringRule} returns this
5274
+ */
5275
+ proto.tournament.ScoringRule.prototype.clearMultiplier = function() {
5276
+ return jspb.Message.setField(this, 4, undefined);
5277
+ };
5278
+
5279
+
5280
+ /**
5281
+ * Returns whether this field is set.
5282
+ * @return {boolean}
5283
+ */
5284
+ proto.tournament.ScoringRule.prototype.hasMultiplier = function() {
5285
+ return jspb.Message.getField(this, 4) != null;
5286
+ };
5287
+
5288
+
5289
+ /**
5290
+ * optional float min_value = 5;
5291
+ * @return {number}
5292
+ */
5293
+ proto.tournament.ScoringRule.prototype.getMinValue = function() {
5294
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 5, 0.0));
5295
+ };
5296
+
5297
+
5298
+ /**
5299
+ * @param {number} value
5300
+ * @return {!proto.tournament.ScoringRule} returns this
5301
+ */
5302
+ proto.tournament.ScoringRule.prototype.setMinValue = function(value) {
5303
+ return jspb.Message.setField(this, 5, value);
5304
+ };
5305
+
5306
+
5307
+ /**
5308
+ * Clears the field making it undefined.
5309
+ * @return {!proto.tournament.ScoringRule} returns this
5310
+ */
5311
+ proto.tournament.ScoringRule.prototype.clearMinValue = function() {
5312
+ return jspb.Message.setField(this, 5, undefined);
5313
+ };
5314
+
5315
+
5316
+ /**
5317
+ * Returns whether this field is set.
5318
+ * @return {boolean}
5319
+ */
5320
+ proto.tournament.ScoringRule.prototype.hasMinValue = function() {
5321
+ return jspb.Message.getField(this, 5) != null;
5322
+ };
5323
+
5324
+
5325
+ /**
5326
+ * optional float max_value = 6;
5327
+ * @return {number}
5328
+ */
5329
+ proto.tournament.ScoringRule.prototype.getMaxValue = function() {
5330
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 6, 0.0));
5331
+ };
5332
+
5333
+
5334
+ /**
5335
+ * @param {number} value
5336
+ * @return {!proto.tournament.ScoringRule} returns this
5337
+ */
5338
+ proto.tournament.ScoringRule.prototype.setMaxValue = function(value) {
5339
+ return jspb.Message.setField(this, 6, value);
5340
+ };
5341
+
5342
+
5343
+ /**
5344
+ * Clears the field making it undefined.
5345
+ * @return {!proto.tournament.ScoringRule} returns this
5346
+ */
5347
+ proto.tournament.ScoringRule.prototype.clearMaxValue = function() {
5348
+ return jspb.Message.setField(this, 6, undefined);
5349
+ };
5350
+
5351
+
5352
+ /**
5353
+ * Returns whether this field is set.
5354
+ * @return {boolean}
5355
+ */
5356
+ proto.tournament.ScoringRule.prototype.hasMaxValue = function() {
5357
+ return jspb.Message.getField(this, 6) != null;
5358
+ };
5359
+
5360
+
5361
+ /**
5362
+ * optional float weight = 7;
5363
+ * @return {number}
5364
+ */
5365
+ proto.tournament.ScoringRule.prototype.getWeight = function() {
5366
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 7, 0.0));
5367
+ };
5368
+
5369
+
5370
+ /**
5371
+ * @param {number} value
5372
+ * @return {!proto.tournament.ScoringRule} returns this
5373
+ */
5374
+ proto.tournament.ScoringRule.prototype.setWeight = function(value) {
5375
+ return jspb.Message.setField(this, 7, value);
5376
+ };
5377
+
5378
+
5379
+ /**
5380
+ * Clears the field making it undefined.
5381
+ * @return {!proto.tournament.ScoringRule} returns this
5382
+ */
5383
+ proto.tournament.ScoringRule.prototype.clearWeight = function() {
5384
+ return jspb.Message.setField(this, 7, undefined);
5385
+ };
5386
+
5387
+
5388
+ /**
5389
+ * Returns whether this field is set.
5390
+ * @return {boolean}
5391
+ */
5392
+ proto.tournament.ScoringRule.prototype.hasWeight = function() {
5393
+ return jspb.Message.getField(this, 7) != null;
5394
+ };
5395
+
5396
+
5397
+ /**
5398
+ * optional int32 is_active = 8;
5399
+ * @return {number}
5400
+ */
5401
+ proto.tournament.ScoringRule.prototype.getIsActive = function() {
5402
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0));
5403
+ };
5404
+
5405
+
5406
+ /**
5407
+ * @param {number} value
5408
+ * @return {!proto.tournament.ScoringRule} returns this
5409
+ */
5410
+ proto.tournament.ScoringRule.prototype.setIsActive = function(value) {
5411
+ return jspb.Message.setField(this, 8, value);
5412
+ };
5413
+
5414
+
5415
+ /**
5416
+ * Clears the field making it undefined.
5417
+ * @return {!proto.tournament.ScoringRule} returns this
5418
+ */
5419
+ proto.tournament.ScoringRule.prototype.clearIsActive = function() {
5420
+ return jspb.Message.setField(this, 8, undefined);
5421
+ };
5422
+
5423
+
5424
+ /**
5425
+ * Returns whether this field is set.
5426
+ * @return {boolean}
5427
+ */
5428
+ proto.tournament.ScoringRule.prototype.hasIsActive = function() {
5429
+ return jspb.Message.getField(this, 8) != null;
5430
+ };
5431
+
5432
+
5433
+
5434
+ /**
5435
+ * List of repeated fields within this message type.
5436
+ * @private {!Array<number>}
5437
+ * @const
5438
+ */
5439
+ proto.tournament.TournamentScoringRuleRequest.repeatedFields_ = [2];
5440
+
5441
+
5442
+
5443
+ if (jspb.Message.GENERATE_TO_OBJECT) {
5444
+ /**
5445
+ * Creates an object representation of this proto.
5446
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
5447
+ * Optional fields that are not set will be set to undefined.
5448
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
5449
+ * For the list of reserved names please see:
5450
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
5451
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
5452
+ * JSPB instance for transitional soy proto support:
5453
+ * http://goto/soy-param-migration
5454
+ * @return {!Object}
5455
+ */
5456
+ proto.tournament.TournamentScoringRuleRequest.prototype.toObject = function(opt_includeInstance) {
5457
+ return proto.tournament.TournamentScoringRuleRequest.toObject(opt_includeInstance, this);
5458
+ };
5459
+
5460
+
5461
+ /**
5462
+ * Static version of the {@see toObject} method.
5463
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
5464
+ * the JSPB instance for transitional soy proto support:
5465
+ * http://goto/soy-param-migration
5466
+ * @param {!proto.tournament.TournamentScoringRuleRequest} msg The msg instance to transform.
5467
+ * @return {!Object}
5468
+ * @suppress {unusedLocalVariables} f is only used for nested messages
5469
+ */
5470
+ proto.tournament.TournamentScoringRuleRequest.toObject = function(includeInstance, msg) {
5471
+ var f, obj = {
5472
+ tournamentId: jspb.Message.getFieldWithDefault(msg, 1, 0),
5473
+ itemsList: jspb.Message.toObjectList(msg.getItemsList(),
5474
+ proto.tournament.ScoringRule.toObject, includeInstance)
5475
+ };
5476
+
5477
+ if (includeInstance) {
5478
+ obj.$jspbMessageInstance = msg;
5479
+ }
5480
+ return obj;
5481
+ };
5482
+ }
5483
+
5484
+
5485
+ /**
5486
+ * Deserializes binary data (in protobuf wire format).
5487
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
5488
+ * @return {!proto.tournament.TournamentScoringRuleRequest}
5489
+ */
5490
+ proto.tournament.TournamentScoringRuleRequest.deserializeBinary = function(bytes) {
5491
+ var reader = new jspb.BinaryReader(bytes);
5492
+ var msg = new proto.tournament.TournamentScoringRuleRequest;
5493
+ return proto.tournament.TournamentScoringRuleRequest.deserializeBinaryFromReader(msg, reader);
5494
+ };
5495
+
5496
+
5497
+ /**
5498
+ * Deserializes binary data (in protobuf wire format) from the
5499
+ * given reader into the given message object.
5500
+ * @param {!proto.tournament.TournamentScoringRuleRequest} msg The message object to deserialize into.
5501
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
5502
+ * @return {!proto.tournament.TournamentScoringRuleRequest}
5503
+ */
5504
+ proto.tournament.TournamentScoringRuleRequest.deserializeBinaryFromReader = function(msg, reader) {
5505
+ while (reader.nextField()) {
5506
+ if (reader.isEndGroup()) {
5507
+ break;
5508
+ }
5509
+ var field = reader.getFieldNumber();
5510
+ switch (field) {
5511
+ case 1:
5512
+ var value = /** @type {number} */ (reader.readInt32());
5513
+ msg.setTournamentId(value);
5514
+ break;
5515
+ case 2:
5516
+ var value = new proto.tournament.ScoringRule;
5517
+ reader.readMessage(value,proto.tournament.ScoringRule.deserializeBinaryFromReader);
5518
+ msg.addItems(value);
5519
+ break;
5520
+ default:
5521
+ reader.skipField();
5522
+ break;
5523
+ }
5524
+ }
5525
+ return msg;
5526
+ };
5527
+
5528
+
5529
+ /**
5530
+ * Serializes the message to binary data (in protobuf wire format).
5531
+ * @return {!Uint8Array}
5532
+ */
5533
+ proto.tournament.TournamentScoringRuleRequest.prototype.serializeBinary = function() {
5534
+ var writer = new jspb.BinaryWriter();
5535
+ proto.tournament.TournamentScoringRuleRequest.serializeBinaryToWriter(this, writer);
5536
+ return writer.getResultBuffer();
5537
+ };
5538
+
5539
+
5540
+ /**
5541
+ * Serializes the given message to binary data (in protobuf wire
5542
+ * format), writing to the given BinaryWriter.
5543
+ * @param {!proto.tournament.TournamentScoringRuleRequest} message
5544
+ * @param {!jspb.BinaryWriter} writer
5545
+ * @suppress {unusedLocalVariables} f is only used for nested messages
5546
+ */
5547
+ proto.tournament.TournamentScoringRuleRequest.serializeBinaryToWriter = function(message, writer) {
5548
+ var f = undefined;
5549
+ f = message.getTournamentId();
5550
+ if (f !== 0) {
5551
+ writer.writeInt32(
5552
+ 1,
5553
+ f
5554
+ );
5555
+ }
5556
+ f = message.getItemsList();
5557
+ if (f.length > 0) {
5558
+ writer.writeRepeatedMessage(
5559
+ 2,
5560
+ f,
5561
+ proto.tournament.ScoringRule.serializeBinaryToWriter
5562
+ );
5563
+ }
5564
+ };
5565
+
5566
+
5567
+ /**
5568
+ * optional int32 tournament_id = 1;
5569
+ * @return {number}
5570
+ */
5571
+ proto.tournament.TournamentScoringRuleRequest.prototype.getTournamentId = function() {
5572
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
5573
+ };
5574
+
5575
+
5576
+ /**
5577
+ * @param {number} value
5578
+ * @return {!proto.tournament.TournamentScoringRuleRequest} returns this
5579
+ */
5580
+ proto.tournament.TournamentScoringRuleRequest.prototype.setTournamentId = function(value) {
5581
+ return jspb.Message.setProto3IntField(this, 1, value);
5582
+ };
5583
+
5584
+
5585
+ /**
5586
+ * repeated ScoringRule items = 2;
5587
+ * @return {!Array<!proto.tournament.ScoringRule>}
5588
+ */
5589
+ proto.tournament.TournamentScoringRuleRequest.prototype.getItemsList = function() {
5590
+ return /** @type{!Array<!proto.tournament.ScoringRule>} */ (
5591
+ jspb.Message.getRepeatedWrapperField(this, proto.tournament.ScoringRule, 2));
5592
+ };
5593
+
5594
+
5595
+ /**
5596
+ * @param {!Array<!proto.tournament.ScoringRule>} value
5597
+ * @return {!proto.tournament.TournamentScoringRuleRequest} returns this
5598
+ */
5599
+ proto.tournament.TournamentScoringRuleRequest.prototype.setItemsList = function(value) {
5600
+ return jspb.Message.setRepeatedWrapperField(this, 2, value);
5601
+ };
5602
+
5603
+
5604
+ /**
5605
+ * @param {!proto.tournament.ScoringRule=} opt_value
5606
+ * @param {number=} opt_index
5607
+ * @return {!proto.tournament.ScoringRule}
5608
+ */
5609
+ proto.tournament.TournamentScoringRuleRequest.prototype.addItems = function(opt_value, opt_index) {
5610
+ return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.tournament.ScoringRule, opt_index);
5611
+ };
5612
+
5613
+
5614
+ /**
5615
+ * Clears the list making it empty but non-null.
5616
+ * @return {!proto.tournament.TournamentScoringRuleRequest} returns this
5617
+ */
5618
+ proto.tournament.TournamentScoringRuleRequest.prototype.clearItemsList = function() {
5619
+ return this.setItemsList([]);
5620
+ };
5621
+
5622
+
5623
+
5624
+
5625
+
5626
+ if (jspb.Message.GENERATE_TO_OBJECT) {
5627
+ /**
5628
+ * Creates an object representation of this proto.
5629
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
5630
+ * Optional fields that are not set will be set to undefined.
5631
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
5632
+ * For the list of reserved names please see:
5633
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
5634
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
5635
+ * JSPB instance for transitional soy proto support:
5636
+ * http://goto/soy-param-migration
5637
+ * @return {!Object}
5638
+ */
5639
+ proto.tournament.RewardItem.prototype.toObject = function(opt_includeInstance) {
5640
+ return proto.tournament.RewardItem.toObject(opt_includeInstance, this);
5641
+ };
5642
+
5643
+
5644
+ /**
5645
+ * Static version of the {@see toObject} method.
5646
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
5647
+ * the JSPB instance for transitional soy proto support:
5648
+ * http://goto/soy-param-migration
5649
+ * @param {!proto.tournament.RewardItem} msg The msg instance to transform.
5650
+ * @return {!Object}
5651
+ * @suppress {unusedLocalVariables} f is only used for nested messages
5652
+ */
5653
+ proto.tournament.RewardItem.toObject = function(includeInstance, msg) {
5654
+ var f, obj = {
5655
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0),
5656
+ tournamentId: jspb.Message.getFieldWithDefault(msg, 2, 0),
5657
+ place: jspb.Message.getFieldWithDefault(msg, 3, 0),
5658
+ loyaltyPoints: jspb.Message.getFieldWithDefault(msg, 4, 0),
5659
+ rankingPoints: jspb.Message.getFieldWithDefault(msg, 5, 0),
5660
+ coins: jspb.Message.getFieldWithDefault(msg, 6, 0),
5661
+ bonusId: jspb.Message.getFieldWithDefault(msg, 7, 0)
5662
+ };
5663
+
5664
+ if (includeInstance) {
5665
+ obj.$jspbMessageInstance = msg;
5666
+ }
5667
+ return obj;
5668
+ };
5669
+ }
5670
+
5671
+
5672
+ /**
5673
+ * Deserializes binary data (in protobuf wire format).
5674
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
5675
+ * @return {!proto.tournament.RewardItem}
5676
+ */
5677
+ proto.tournament.RewardItem.deserializeBinary = function(bytes) {
5678
+ var reader = new jspb.BinaryReader(bytes);
5679
+ var msg = new proto.tournament.RewardItem;
5680
+ return proto.tournament.RewardItem.deserializeBinaryFromReader(msg, reader);
5681
+ };
5682
+
5683
+
5684
+ /**
5685
+ * Deserializes binary data (in protobuf wire format) from the
5686
+ * given reader into the given message object.
5687
+ * @param {!proto.tournament.RewardItem} msg The message object to deserialize into.
5688
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
5689
+ * @return {!proto.tournament.RewardItem}
5690
+ */
5691
+ proto.tournament.RewardItem.deserializeBinaryFromReader = function(msg, reader) {
5692
+ while (reader.nextField()) {
5693
+ if (reader.isEndGroup()) {
5694
+ break;
4184
5695
  }
4185
5696
  var field = reader.getFieldNumber();
4186
5697
  switch (field) {
5698
+ case 1:
5699
+ var value = /** @type {number} */ (reader.readInt32());
5700
+ msg.setId(value);
5701
+ break;
5702
+ case 2:
5703
+ var value = /** @type {number} */ (reader.readInt32());
5704
+ msg.setTournamentId(value);
5705
+ break;
5706
+ case 3:
5707
+ var value = /** @type {number} */ (reader.readInt32());
5708
+ msg.setPlace(value);
5709
+ break;
5710
+ case 4:
5711
+ var value = /** @type {number} */ (reader.readInt32());
5712
+ msg.setLoyaltyPoints(value);
5713
+ break;
5714
+ case 5:
5715
+ var value = /** @type {number} */ (reader.readInt32());
5716
+ msg.setRankingPoints(value);
5717
+ break;
5718
+ case 6:
5719
+ var value = /** @type {number} */ (reader.readInt32());
5720
+ msg.setCoins(value);
5721
+ break;
5722
+ case 7:
5723
+ var value = /** @type {number} */ (reader.readInt32());
5724
+ msg.setBonusId(value);
5725
+ break;
4187
5726
  default:
4188
5727
  reader.skipField();
4189
5728
  break;
@@ -4194,29 +5733,337 @@ proto.tournament.TournamentScoringRuleRequest.deserializeBinaryFromReader = func
4194
5733
 
4195
5734
 
4196
5735
  /**
4197
- * Serializes the message to binary data (in protobuf wire format).
4198
- * @return {!Uint8Array}
5736
+ * Serializes the message to binary data (in protobuf wire format).
5737
+ * @return {!Uint8Array}
5738
+ */
5739
+ proto.tournament.RewardItem.prototype.serializeBinary = function() {
5740
+ var writer = new jspb.BinaryWriter();
5741
+ proto.tournament.RewardItem.serializeBinaryToWriter(this, writer);
5742
+ return writer.getResultBuffer();
5743
+ };
5744
+
5745
+
5746
+ /**
5747
+ * Serializes the given message to binary data (in protobuf wire
5748
+ * format), writing to the given BinaryWriter.
5749
+ * @param {!proto.tournament.RewardItem} message
5750
+ * @param {!jspb.BinaryWriter} writer
5751
+ * @suppress {unusedLocalVariables} f is only used for nested messages
5752
+ */
5753
+ proto.tournament.RewardItem.serializeBinaryToWriter = function(message, writer) {
5754
+ var f = undefined;
5755
+ f = /** @type {number} */ (jspb.Message.getField(message, 1));
5756
+ if (f != null) {
5757
+ writer.writeInt32(
5758
+ 1,
5759
+ f
5760
+ );
5761
+ }
5762
+ f = /** @type {number} */ (jspb.Message.getField(message, 2));
5763
+ if (f != null) {
5764
+ writer.writeInt32(
5765
+ 2,
5766
+ f
5767
+ );
5768
+ }
5769
+ f = /** @type {number} */ (jspb.Message.getField(message, 3));
5770
+ if (f != null) {
5771
+ writer.writeInt32(
5772
+ 3,
5773
+ f
5774
+ );
5775
+ }
5776
+ f = /** @type {number} */ (jspb.Message.getField(message, 4));
5777
+ if (f != null) {
5778
+ writer.writeInt32(
5779
+ 4,
5780
+ f
5781
+ );
5782
+ }
5783
+ f = /** @type {number} */ (jspb.Message.getField(message, 5));
5784
+ if (f != null) {
5785
+ writer.writeInt32(
5786
+ 5,
5787
+ f
5788
+ );
5789
+ }
5790
+ f = /** @type {number} */ (jspb.Message.getField(message, 6));
5791
+ if (f != null) {
5792
+ writer.writeInt32(
5793
+ 6,
5794
+ f
5795
+ );
5796
+ }
5797
+ f = /** @type {number} */ (jspb.Message.getField(message, 7));
5798
+ if (f != null) {
5799
+ writer.writeInt32(
5800
+ 7,
5801
+ f
5802
+ );
5803
+ }
5804
+ };
5805
+
5806
+
5807
+ /**
5808
+ * optional int32 id = 1;
5809
+ * @return {number}
5810
+ */
5811
+ proto.tournament.RewardItem.prototype.getId = function() {
5812
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
5813
+ };
5814
+
5815
+
5816
+ /**
5817
+ * @param {number} value
5818
+ * @return {!proto.tournament.RewardItem} returns this
5819
+ */
5820
+ proto.tournament.RewardItem.prototype.setId = function(value) {
5821
+ return jspb.Message.setField(this, 1, value);
5822
+ };
5823
+
5824
+
5825
+ /**
5826
+ * Clears the field making it undefined.
5827
+ * @return {!proto.tournament.RewardItem} returns this
4199
5828
  */
4200
- proto.tournament.TournamentScoringRuleRequest.prototype.serializeBinary = function() {
4201
- var writer = new jspb.BinaryWriter();
4202
- proto.tournament.TournamentScoringRuleRequest.serializeBinaryToWriter(this, writer);
4203
- return writer.getResultBuffer();
5829
+ proto.tournament.RewardItem.prototype.clearId = function() {
5830
+ return jspb.Message.setField(this, 1, undefined);
4204
5831
  };
4205
5832
 
4206
5833
 
4207
5834
  /**
4208
- * Serializes the given message to binary data (in protobuf wire
4209
- * format), writing to the given BinaryWriter.
4210
- * @param {!proto.tournament.TournamentScoringRuleRequest} message
4211
- * @param {!jspb.BinaryWriter} writer
4212
- * @suppress {unusedLocalVariables} f is only used for nested messages
5835
+ * Returns whether this field is set.
5836
+ * @return {boolean}
4213
5837
  */
4214
- proto.tournament.TournamentScoringRuleRequest.serializeBinaryToWriter = function(message, writer) {
4215
- var f = undefined;
5838
+ proto.tournament.RewardItem.prototype.hasId = function() {
5839
+ return jspb.Message.getField(this, 1) != null;
5840
+ };
5841
+
5842
+
5843
+ /**
5844
+ * optional int32 tournament_id = 2;
5845
+ * @return {number}
5846
+ */
5847
+ proto.tournament.RewardItem.prototype.getTournamentId = function() {
5848
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
5849
+ };
5850
+
5851
+
5852
+ /**
5853
+ * @param {number} value
5854
+ * @return {!proto.tournament.RewardItem} returns this
5855
+ */
5856
+ proto.tournament.RewardItem.prototype.setTournamentId = function(value) {
5857
+ return jspb.Message.setField(this, 2, value);
5858
+ };
5859
+
5860
+
5861
+ /**
5862
+ * Clears the field making it undefined.
5863
+ * @return {!proto.tournament.RewardItem} returns this
5864
+ */
5865
+ proto.tournament.RewardItem.prototype.clearTournamentId = function() {
5866
+ return jspb.Message.setField(this, 2, undefined);
5867
+ };
5868
+
5869
+
5870
+ /**
5871
+ * Returns whether this field is set.
5872
+ * @return {boolean}
5873
+ */
5874
+ proto.tournament.RewardItem.prototype.hasTournamentId = function() {
5875
+ return jspb.Message.getField(this, 2) != null;
5876
+ };
5877
+
5878
+
5879
+ /**
5880
+ * optional int32 place = 3;
5881
+ * @return {number}
5882
+ */
5883
+ proto.tournament.RewardItem.prototype.getPlace = function() {
5884
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
5885
+ };
5886
+
5887
+
5888
+ /**
5889
+ * @param {number} value
5890
+ * @return {!proto.tournament.RewardItem} returns this
5891
+ */
5892
+ proto.tournament.RewardItem.prototype.setPlace = function(value) {
5893
+ return jspb.Message.setField(this, 3, value);
5894
+ };
5895
+
5896
+
5897
+ /**
5898
+ * Clears the field making it undefined.
5899
+ * @return {!proto.tournament.RewardItem} returns this
5900
+ */
5901
+ proto.tournament.RewardItem.prototype.clearPlace = function() {
5902
+ return jspb.Message.setField(this, 3, undefined);
5903
+ };
5904
+
5905
+
5906
+ /**
5907
+ * Returns whether this field is set.
5908
+ * @return {boolean}
5909
+ */
5910
+ proto.tournament.RewardItem.prototype.hasPlace = function() {
5911
+ return jspb.Message.getField(this, 3) != null;
5912
+ };
5913
+
5914
+
5915
+ /**
5916
+ * optional int32 loyalty_points = 4;
5917
+ * @return {number}
5918
+ */
5919
+ proto.tournament.RewardItem.prototype.getLoyaltyPoints = function() {
5920
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
5921
+ };
5922
+
5923
+
5924
+ /**
5925
+ * @param {number} value
5926
+ * @return {!proto.tournament.RewardItem} returns this
5927
+ */
5928
+ proto.tournament.RewardItem.prototype.setLoyaltyPoints = function(value) {
5929
+ return jspb.Message.setField(this, 4, value);
5930
+ };
5931
+
5932
+
5933
+ /**
5934
+ * Clears the field making it undefined.
5935
+ * @return {!proto.tournament.RewardItem} returns this
5936
+ */
5937
+ proto.tournament.RewardItem.prototype.clearLoyaltyPoints = function() {
5938
+ return jspb.Message.setField(this, 4, undefined);
5939
+ };
5940
+
5941
+
5942
+ /**
5943
+ * Returns whether this field is set.
5944
+ * @return {boolean}
5945
+ */
5946
+ proto.tournament.RewardItem.prototype.hasLoyaltyPoints = function() {
5947
+ return jspb.Message.getField(this, 4) != null;
5948
+ };
5949
+
5950
+
5951
+ /**
5952
+ * optional int32 ranking_points = 5;
5953
+ * @return {number}
5954
+ */
5955
+ proto.tournament.RewardItem.prototype.getRankingPoints = function() {
5956
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
5957
+ };
5958
+
5959
+
5960
+ /**
5961
+ * @param {number} value
5962
+ * @return {!proto.tournament.RewardItem} returns this
5963
+ */
5964
+ proto.tournament.RewardItem.prototype.setRankingPoints = function(value) {
5965
+ return jspb.Message.setField(this, 5, value);
5966
+ };
5967
+
5968
+
5969
+ /**
5970
+ * Clears the field making it undefined.
5971
+ * @return {!proto.tournament.RewardItem} returns this
5972
+ */
5973
+ proto.tournament.RewardItem.prototype.clearRankingPoints = function() {
5974
+ return jspb.Message.setField(this, 5, undefined);
5975
+ };
5976
+
5977
+
5978
+ /**
5979
+ * Returns whether this field is set.
5980
+ * @return {boolean}
5981
+ */
5982
+ proto.tournament.RewardItem.prototype.hasRankingPoints = function() {
5983
+ return jspb.Message.getField(this, 5) != null;
5984
+ };
5985
+
5986
+
5987
+ /**
5988
+ * optional int32 coins = 6;
5989
+ * @return {number}
5990
+ */
5991
+ proto.tournament.RewardItem.prototype.getCoins = function() {
5992
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
5993
+ };
5994
+
5995
+
5996
+ /**
5997
+ * @param {number} value
5998
+ * @return {!proto.tournament.RewardItem} returns this
5999
+ */
6000
+ proto.tournament.RewardItem.prototype.setCoins = function(value) {
6001
+ return jspb.Message.setField(this, 6, value);
6002
+ };
6003
+
6004
+
6005
+ /**
6006
+ * Clears the field making it undefined.
6007
+ * @return {!proto.tournament.RewardItem} returns this
6008
+ */
6009
+ proto.tournament.RewardItem.prototype.clearCoins = function() {
6010
+ return jspb.Message.setField(this, 6, undefined);
6011
+ };
6012
+
6013
+
6014
+ /**
6015
+ * Returns whether this field is set.
6016
+ * @return {boolean}
6017
+ */
6018
+ proto.tournament.RewardItem.prototype.hasCoins = function() {
6019
+ return jspb.Message.getField(this, 6) != null;
6020
+ };
6021
+
6022
+
6023
+ /**
6024
+ * optional int32 bonus_id = 7;
6025
+ * @return {number}
6026
+ */
6027
+ proto.tournament.RewardItem.prototype.getBonusId = function() {
6028
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
6029
+ };
6030
+
6031
+
6032
+ /**
6033
+ * @param {number} value
6034
+ * @return {!proto.tournament.RewardItem} returns this
6035
+ */
6036
+ proto.tournament.RewardItem.prototype.setBonusId = function(value) {
6037
+ return jspb.Message.setField(this, 7, value);
6038
+ };
6039
+
6040
+
6041
+ /**
6042
+ * Clears the field making it undefined.
6043
+ * @return {!proto.tournament.RewardItem} returns this
6044
+ */
6045
+ proto.tournament.RewardItem.prototype.clearBonusId = function() {
6046
+ return jspb.Message.setField(this, 7, undefined);
6047
+ };
6048
+
6049
+
6050
+ /**
6051
+ * Returns whether this field is set.
6052
+ * @return {boolean}
6053
+ */
6054
+ proto.tournament.RewardItem.prototype.hasBonusId = function() {
6055
+ return jspb.Message.getField(this, 7) != null;
4216
6056
  };
4217
6057
 
4218
6058
 
4219
6059
 
6060
+ /**
6061
+ * List of repeated fields within this message type.
6062
+ * @private {!Array<number>}
6063
+ * @const
6064
+ */
6065
+ proto.tournament.TournamentRewardsRequest.repeatedFields_ = [2];
6066
+
4220
6067
 
4221
6068
 
4222
6069
  if (jspb.Message.GENERATE_TO_OBJECT) {
@@ -4248,7 +6095,9 @@ proto.tournament.TournamentRewardsRequest.prototype.toObject = function(opt_incl
4248
6095
  */
4249
6096
  proto.tournament.TournamentRewardsRequest.toObject = function(includeInstance, msg) {
4250
6097
  var f, obj = {
4251
-
6098
+ tournamentId: jspb.Message.getFieldWithDefault(msg, 1, 0),
6099
+ itemsList: jspb.Message.toObjectList(msg.getItemsList(),
6100
+ proto.tournament.RewardItem.toObject, includeInstance)
4252
6101
  };
4253
6102
 
4254
6103
  if (includeInstance) {
@@ -4285,6 +6134,15 @@ proto.tournament.TournamentRewardsRequest.deserializeBinaryFromReader = function
4285
6134
  }
4286
6135
  var field = reader.getFieldNumber();
4287
6136
  switch (field) {
6137
+ case 1:
6138
+ var value = /** @type {number} */ (reader.readInt32());
6139
+ msg.setTournamentId(value);
6140
+ break;
6141
+ case 2:
6142
+ var value = new proto.tournament.RewardItem;
6143
+ reader.readMessage(value,proto.tournament.RewardItem.deserializeBinaryFromReader);
6144
+ msg.addItems(value);
6145
+ break;
4288
6146
  default:
4289
6147
  reader.skipField();
4290
6148
  break;
@@ -4314,6 +6172,77 @@ proto.tournament.TournamentRewardsRequest.prototype.serializeBinary = function()
4314
6172
  */
4315
6173
  proto.tournament.TournamentRewardsRequest.serializeBinaryToWriter = function(message, writer) {
4316
6174
  var f = undefined;
6175
+ f = message.getTournamentId();
6176
+ if (f !== 0) {
6177
+ writer.writeInt32(
6178
+ 1,
6179
+ f
6180
+ );
6181
+ }
6182
+ f = message.getItemsList();
6183
+ if (f.length > 0) {
6184
+ writer.writeRepeatedMessage(
6185
+ 2,
6186
+ f,
6187
+ proto.tournament.RewardItem.serializeBinaryToWriter
6188
+ );
6189
+ }
6190
+ };
6191
+
6192
+
6193
+ /**
6194
+ * optional int32 tournament_id = 1;
6195
+ * @return {number}
6196
+ */
6197
+ proto.tournament.TournamentRewardsRequest.prototype.getTournamentId = function() {
6198
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
6199
+ };
6200
+
6201
+
6202
+ /**
6203
+ * @param {number} value
6204
+ * @return {!proto.tournament.TournamentRewardsRequest} returns this
6205
+ */
6206
+ proto.tournament.TournamentRewardsRequest.prototype.setTournamentId = function(value) {
6207
+ return jspb.Message.setProto3IntField(this, 1, value);
6208
+ };
6209
+
6210
+
6211
+ /**
6212
+ * repeated RewardItem items = 2;
6213
+ * @return {!Array<!proto.tournament.RewardItem>}
6214
+ */
6215
+ proto.tournament.TournamentRewardsRequest.prototype.getItemsList = function() {
6216
+ return /** @type{!Array<!proto.tournament.RewardItem>} */ (
6217
+ jspb.Message.getRepeatedWrapperField(this, proto.tournament.RewardItem, 2));
6218
+ };
6219
+
6220
+
6221
+ /**
6222
+ * @param {!Array<!proto.tournament.RewardItem>} value
6223
+ * @return {!proto.tournament.TournamentRewardsRequest} returns this
6224
+ */
6225
+ proto.tournament.TournamentRewardsRequest.prototype.setItemsList = function(value) {
6226
+ return jspb.Message.setRepeatedWrapperField(this, 2, value);
6227
+ };
6228
+
6229
+
6230
+ /**
6231
+ * @param {!proto.tournament.RewardItem=} opt_value
6232
+ * @param {number=} opt_index
6233
+ * @return {!proto.tournament.RewardItem}
6234
+ */
6235
+ proto.tournament.TournamentRewardsRequest.prototype.addItems = function(opt_value, opt_index) {
6236
+ return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.tournament.RewardItem, opt_index);
6237
+ };
6238
+
6239
+
6240
+ /**
6241
+ * Clears the list making it empty but non-null.
6242
+ * @return {!proto.tournament.TournamentRewardsRequest} returns this
6243
+ */
6244
+ proto.tournament.TournamentRewardsRequest.prototype.clearItemsList = function() {
6245
+ return this.setItemsList([]);
4317
6246
  };
4318
6247
 
4319
6248