protobuf-platform 1.2.315 → 1.2.319

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protobuf-platform",
3
- "version": "1.2.315",
3
+ "version": "1.2.319",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -153,6 +153,9 @@ message ScoringRule {
153
153
  optional float weight = 7;
154
154
  optional int32 is_active = 8;
155
155
  }
156
+ message TournamentScoreItem {
157
+ repeated ScoringRule rules = 1;
158
+ }
156
159
  message TournamentScoringRuleRequest {
157
160
  int32 tournament_id = 1;
158
161
  repeated ScoringRule items = 2;
@@ -214,6 +217,7 @@ message UserTournamentItem {
214
217
  optional string user_status = 16;
215
218
  optional uint64 finished_in_milliseconds = 17;
216
219
  repeated GamePoorItem eligible_games = 18;
220
+ optional TournamentScoreItem score = 19;
217
221
  }
218
222
  message UserTournamentItemsResponse {
219
223
  repeated UserTournamentItem items = 1;
@@ -52,6 +52,7 @@ goog.exportSymbol('proto.tournament.TournamentRequest', null, global);
52
52
  goog.exportSymbol('proto.tournament.TournamentRequest.RequestCase', null, global);
53
53
  goog.exportSymbol('proto.tournament.TournamentResponse', null, global);
54
54
  goog.exportSymbol('proto.tournament.TournamentRewardsRequest', null, global);
55
+ goog.exportSymbol('proto.tournament.TournamentScoreItem', null, global);
55
56
  goog.exportSymbol('proto.tournament.TournamentScoringRuleRequest', null, global);
56
57
  goog.exportSymbol('proto.tournament.TournamentStatusItem', null, global);
57
58
  goog.exportSymbol('proto.tournament.TournamentStatusItemsResponse', null, global);
@@ -480,6 +481,27 @@ if (goog.DEBUG && !COMPILED) {
480
481
  */
481
482
  proto.tournament.ScoringRule.displayName = 'proto.tournament.ScoringRule';
482
483
  }
484
+ /**
485
+ * Generated by JsPbCodeGenerator.
486
+ * @param {Array=} opt_data Optional initial data array, typically from a
487
+ * server response, or constructed directly in Javascript. The array is used
488
+ * in place and becomes part of the constructed object. It is not cloned.
489
+ * If no data is provided, the constructed object will be empty, but still
490
+ * valid.
491
+ * @extends {jspb.Message}
492
+ * @constructor
493
+ */
494
+ proto.tournament.TournamentScoreItem = function(opt_data) {
495
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.tournament.TournamentScoreItem.repeatedFields_, null);
496
+ };
497
+ goog.inherits(proto.tournament.TournamentScoreItem, jspb.Message);
498
+ if (goog.DEBUG && !COMPILED) {
499
+ /**
500
+ * @public
501
+ * @override
502
+ */
503
+ proto.tournament.TournamentScoreItem.displayName = 'proto.tournament.TournamentScoreItem';
504
+ }
483
505
  /**
484
506
  * Generated by JsPbCodeGenerator.
485
507
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -7112,6 +7134,166 @@ proto.tournament.ScoringRule.prototype.hasIsActive = function() {
7112
7134
 
7113
7135
 
7114
7136
 
7137
+ /**
7138
+ * List of repeated fields within this message type.
7139
+ * @private {!Array<number>}
7140
+ * @const
7141
+ */
7142
+ proto.tournament.TournamentScoreItem.repeatedFields_ = [1];
7143
+
7144
+
7145
+
7146
+ if (jspb.Message.GENERATE_TO_OBJECT) {
7147
+ /**
7148
+ * Creates an object representation of this proto.
7149
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
7150
+ * Optional fields that are not set will be set to undefined.
7151
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
7152
+ * For the list of reserved names please see:
7153
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
7154
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
7155
+ * JSPB instance for transitional soy proto support:
7156
+ * http://goto/soy-param-migration
7157
+ * @return {!Object}
7158
+ */
7159
+ proto.tournament.TournamentScoreItem.prototype.toObject = function(opt_includeInstance) {
7160
+ return proto.tournament.TournamentScoreItem.toObject(opt_includeInstance, this);
7161
+ };
7162
+
7163
+
7164
+ /**
7165
+ * Static version of the {@see toObject} method.
7166
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
7167
+ * the JSPB instance for transitional soy proto support:
7168
+ * http://goto/soy-param-migration
7169
+ * @param {!proto.tournament.TournamentScoreItem} msg The msg instance to transform.
7170
+ * @return {!Object}
7171
+ * @suppress {unusedLocalVariables} f is only used for nested messages
7172
+ */
7173
+ proto.tournament.TournamentScoreItem.toObject = function(includeInstance, msg) {
7174
+ var f, obj = {
7175
+ rulesList: jspb.Message.toObjectList(msg.getRulesList(),
7176
+ proto.tournament.ScoringRule.toObject, includeInstance)
7177
+ };
7178
+
7179
+ if (includeInstance) {
7180
+ obj.$jspbMessageInstance = msg;
7181
+ }
7182
+ return obj;
7183
+ };
7184
+ }
7185
+
7186
+
7187
+ /**
7188
+ * Deserializes binary data (in protobuf wire format).
7189
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
7190
+ * @return {!proto.tournament.TournamentScoreItem}
7191
+ */
7192
+ proto.tournament.TournamentScoreItem.deserializeBinary = function(bytes) {
7193
+ var reader = new jspb.BinaryReader(bytes);
7194
+ var msg = new proto.tournament.TournamentScoreItem;
7195
+ return proto.tournament.TournamentScoreItem.deserializeBinaryFromReader(msg, reader);
7196
+ };
7197
+
7198
+
7199
+ /**
7200
+ * Deserializes binary data (in protobuf wire format) from the
7201
+ * given reader into the given message object.
7202
+ * @param {!proto.tournament.TournamentScoreItem} msg The message object to deserialize into.
7203
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
7204
+ * @return {!proto.tournament.TournamentScoreItem}
7205
+ */
7206
+ proto.tournament.TournamentScoreItem.deserializeBinaryFromReader = function(msg, reader) {
7207
+ while (reader.nextField()) {
7208
+ if (reader.isEndGroup()) {
7209
+ break;
7210
+ }
7211
+ var field = reader.getFieldNumber();
7212
+ switch (field) {
7213
+ case 1:
7214
+ var value = new proto.tournament.ScoringRule;
7215
+ reader.readMessage(value,proto.tournament.ScoringRule.deserializeBinaryFromReader);
7216
+ msg.addRules(value);
7217
+ break;
7218
+ default:
7219
+ reader.skipField();
7220
+ break;
7221
+ }
7222
+ }
7223
+ return msg;
7224
+ };
7225
+
7226
+
7227
+ /**
7228
+ * Serializes the message to binary data (in protobuf wire format).
7229
+ * @return {!Uint8Array}
7230
+ */
7231
+ proto.tournament.TournamentScoreItem.prototype.serializeBinary = function() {
7232
+ var writer = new jspb.BinaryWriter();
7233
+ proto.tournament.TournamentScoreItem.serializeBinaryToWriter(this, writer);
7234
+ return writer.getResultBuffer();
7235
+ };
7236
+
7237
+
7238
+ /**
7239
+ * Serializes the given message to binary data (in protobuf wire
7240
+ * format), writing to the given BinaryWriter.
7241
+ * @param {!proto.tournament.TournamentScoreItem} message
7242
+ * @param {!jspb.BinaryWriter} writer
7243
+ * @suppress {unusedLocalVariables} f is only used for nested messages
7244
+ */
7245
+ proto.tournament.TournamentScoreItem.serializeBinaryToWriter = function(message, writer) {
7246
+ var f = undefined;
7247
+ f = message.getRulesList();
7248
+ if (f.length > 0) {
7249
+ writer.writeRepeatedMessage(
7250
+ 1,
7251
+ f,
7252
+ proto.tournament.ScoringRule.serializeBinaryToWriter
7253
+ );
7254
+ }
7255
+ };
7256
+
7257
+
7258
+ /**
7259
+ * repeated ScoringRule rules = 1;
7260
+ * @return {!Array<!proto.tournament.ScoringRule>}
7261
+ */
7262
+ proto.tournament.TournamentScoreItem.prototype.getRulesList = function() {
7263
+ return /** @type{!Array<!proto.tournament.ScoringRule>} */ (
7264
+ jspb.Message.getRepeatedWrapperField(this, proto.tournament.ScoringRule, 1));
7265
+ };
7266
+
7267
+
7268
+ /**
7269
+ * @param {!Array<!proto.tournament.ScoringRule>} value
7270
+ * @return {!proto.tournament.TournamentScoreItem} returns this
7271
+ */
7272
+ proto.tournament.TournamentScoreItem.prototype.setRulesList = function(value) {
7273
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
7274
+ };
7275
+
7276
+
7277
+ /**
7278
+ * @param {!proto.tournament.ScoringRule=} opt_value
7279
+ * @param {number=} opt_index
7280
+ * @return {!proto.tournament.ScoringRule}
7281
+ */
7282
+ proto.tournament.TournamentScoreItem.prototype.addRules = function(opt_value, opt_index) {
7283
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.tournament.ScoringRule, opt_index);
7284
+ };
7285
+
7286
+
7287
+ /**
7288
+ * Clears the list making it empty but non-null.
7289
+ * @return {!proto.tournament.TournamentScoreItem} returns this
7290
+ */
7291
+ proto.tournament.TournamentScoreItem.prototype.clearRulesList = function() {
7292
+ return this.setRulesList([]);
7293
+ };
7294
+
7295
+
7296
+
7115
7297
  /**
7116
7298
  * List of repeated fields within this message type.
7117
7299
  * @private {!Array<number>}
@@ -9092,7 +9274,8 @@ proto.tournament.UserTournamentItem.toObject = function(includeInstance, msg) {
9092
9274
  userStatus: jspb.Message.getFieldWithDefault(msg, 16, ""),
9093
9275
  finishedInMilliseconds: jspb.Message.getFieldWithDefault(msg, 17, 0),
9094
9276
  eligibleGamesList: jspb.Message.toObjectList(msg.getEligibleGamesList(),
9095
- proto.tournament.GamePoorItem.toObject, includeInstance)
9277
+ proto.tournament.GamePoorItem.toObject, includeInstance),
9278
+ score: (f = msg.getScore()) && proto.tournament.TournamentScoreItem.toObject(includeInstance, f)
9096
9279
  };
9097
9280
 
9098
9281
  if (includeInstance) {
@@ -9204,6 +9387,11 @@ proto.tournament.UserTournamentItem.deserializeBinaryFromReader = function(msg,
9204
9387
  reader.readMessage(value,proto.tournament.GamePoorItem.deserializeBinaryFromReader);
9205
9388
  msg.addEligibleGames(value);
9206
9389
  break;
9390
+ case 19:
9391
+ var value = new proto.tournament.TournamentScoreItem;
9392
+ reader.readMessage(value,proto.tournament.TournamentScoreItem.deserializeBinaryFromReader);
9393
+ msg.setScore(value);
9394
+ break;
9207
9395
  default:
9208
9396
  reader.skipField();
9209
9397
  break;
@@ -9362,6 +9550,14 @@ proto.tournament.UserTournamentItem.serializeBinaryToWriter = function(message,
9362
9550
  proto.tournament.GamePoorItem.serializeBinaryToWriter
9363
9551
  );
9364
9552
  }
9553
+ f = message.getScore();
9554
+ if (f != null) {
9555
+ writer.writeMessage(
9556
+ 19,
9557
+ f,
9558
+ proto.tournament.TournamentScoreItem.serializeBinaryToWriter
9559
+ );
9560
+ }
9365
9561
  };
9366
9562
 
9367
9563
 
@@ -10019,6 +10215,43 @@ proto.tournament.UserTournamentItem.prototype.clearEligibleGamesList = function(
10019
10215
  };
10020
10216
 
10021
10217
 
10218
+ /**
10219
+ * optional TournamentScoreItem score = 19;
10220
+ * @return {?proto.tournament.TournamentScoreItem}
10221
+ */
10222
+ proto.tournament.UserTournamentItem.prototype.getScore = function() {
10223
+ return /** @type{?proto.tournament.TournamentScoreItem} */ (
10224
+ jspb.Message.getWrapperField(this, proto.tournament.TournamentScoreItem, 19));
10225
+ };
10226
+
10227
+
10228
+ /**
10229
+ * @param {?proto.tournament.TournamentScoreItem|undefined} value
10230
+ * @return {!proto.tournament.UserTournamentItem} returns this
10231
+ */
10232
+ proto.tournament.UserTournamentItem.prototype.setScore = function(value) {
10233
+ return jspb.Message.setWrapperField(this, 19, value);
10234
+ };
10235
+
10236
+
10237
+ /**
10238
+ * Clears the message field making it undefined.
10239
+ * @return {!proto.tournament.UserTournamentItem} returns this
10240
+ */
10241
+ proto.tournament.UserTournamentItem.prototype.clearScore = function() {
10242
+ return this.setScore(undefined);
10243
+ };
10244
+
10245
+
10246
+ /**
10247
+ * Returns whether this field is set.
10248
+ * @return {boolean}
10249
+ */
10250
+ proto.tournament.UserTournamentItem.prototype.hasScore = function() {
10251
+ return jspb.Message.getField(this, 19) != null;
10252
+ };
10253
+
10254
+
10022
10255
 
10023
10256
  /**
10024
10257
  * List of repeated fields within this message type.