protobuf-platform 1.2.243 → 1.2.245

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/game/game.proto CHANGED
@@ -585,6 +585,8 @@ message ActiveUserTournament {
585
585
  optional bool can_activated = 7;
586
586
  optional string user_status = 8;
587
587
  optional uint32 finished_in_milliseconds = 9;
588
+ optional uint32 max_members_count = 10;
589
+ optional uint32 current_members_count = 11;
588
590
  }
589
591
  message ActiveWageringUserBonus {
590
592
  int32 user_bonus_id = 1;
package/game/game_pb.js CHANGED
@@ -24139,7 +24139,9 @@ proto.game.ActiveUserTournament.toObject = function(includeInstance, msg) {
24139
24139
  status: jspb.Message.getFieldWithDefault(msg, 6, ""),
24140
24140
  canActivated: jspb.Message.getBooleanFieldWithDefault(msg, 7, false),
24141
24141
  userStatus: jspb.Message.getFieldWithDefault(msg, 8, ""),
24142
- finishedInMilliseconds: jspb.Message.getFieldWithDefault(msg, 9, 0)
24142
+ finishedInMilliseconds: jspb.Message.getFieldWithDefault(msg, 9, 0),
24143
+ maxMembersCount: jspb.Message.getFieldWithDefault(msg, 10, 0),
24144
+ currentMembersCount: jspb.Message.getFieldWithDefault(msg, 11, 0)
24143
24145
  };
24144
24146
 
24145
24147
  if (includeInstance) {
@@ -24212,6 +24214,14 @@ proto.game.ActiveUserTournament.deserializeBinaryFromReader = function(msg, read
24212
24214
  var value = /** @type {number} */ (reader.readUint32());
24213
24215
  msg.setFinishedInMilliseconds(value);
24214
24216
  break;
24217
+ case 10:
24218
+ var value = /** @type {number} */ (reader.readUint32());
24219
+ msg.setMaxMembersCount(value);
24220
+ break;
24221
+ case 11:
24222
+ var value = /** @type {number} */ (reader.readUint32());
24223
+ msg.setCurrentMembersCount(value);
24224
+ break;
24215
24225
  default:
24216
24226
  reader.skipField();
24217
24227
  break;
@@ -24304,6 +24314,20 @@ proto.game.ActiveUserTournament.serializeBinaryToWriter = function(message, writ
24304
24314
  f
24305
24315
  );
24306
24316
  }
24317
+ f = /** @type {number} */ (jspb.Message.getField(message, 10));
24318
+ if (f != null) {
24319
+ writer.writeUint32(
24320
+ 10,
24321
+ f
24322
+ );
24323
+ }
24324
+ f = /** @type {number} */ (jspb.Message.getField(message, 11));
24325
+ if (f != null) {
24326
+ writer.writeUint32(
24327
+ 11,
24328
+ f
24329
+ );
24330
+ }
24307
24331
  };
24308
24332
 
24309
24333
 
@@ -24595,6 +24619,78 @@ proto.game.ActiveUserTournament.prototype.hasFinishedInMilliseconds = function()
24595
24619
  };
24596
24620
 
24597
24621
 
24622
+ /**
24623
+ * optional uint32 max_members_count = 10;
24624
+ * @return {number}
24625
+ */
24626
+ proto.game.ActiveUserTournament.prototype.getMaxMembersCount = function() {
24627
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0));
24628
+ };
24629
+
24630
+
24631
+ /**
24632
+ * @param {number} value
24633
+ * @return {!proto.game.ActiveUserTournament} returns this
24634
+ */
24635
+ proto.game.ActiveUserTournament.prototype.setMaxMembersCount = function(value) {
24636
+ return jspb.Message.setField(this, 10, value);
24637
+ };
24638
+
24639
+
24640
+ /**
24641
+ * Clears the field making it undefined.
24642
+ * @return {!proto.game.ActiveUserTournament} returns this
24643
+ */
24644
+ proto.game.ActiveUserTournament.prototype.clearMaxMembersCount = function() {
24645
+ return jspb.Message.setField(this, 10, undefined);
24646
+ };
24647
+
24648
+
24649
+ /**
24650
+ * Returns whether this field is set.
24651
+ * @return {boolean}
24652
+ */
24653
+ proto.game.ActiveUserTournament.prototype.hasMaxMembersCount = function() {
24654
+ return jspb.Message.getField(this, 10) != null;
24655
+ };
24656
+
24657
+
24658
+ /**
24659
+ * optional uint32 current_members_count = 11;
24660
+ * @return {number}
24661
+ */
24662
+ proto.game.ActiveUserTournament.prototype.getCurrentMembersCount = function() {
24663
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0));
24664
+ };
24665
+
24666
+
24667
+ /**
24668
+ * @param {number} value
24669
+ * @return {!proto.game.ActiveUserTournament} returns this
24670
+ */
24671
+ proto.game.ActiveUserTournament.prototype.setCurrentMembersCount = function(value) {
24672
+ return jspb.Message.setField(this, 11, value);
24673
+ };
24674
+
24675
+
24676
+ /**
24677
+ * Clears the field making it undefined.
24678
+ * @return {!proto.game.ActiveUserTournament} returns this
24679
+ */
24680
+ proto.game.ActiveUserTournament.prototype.clearCurrentMembersCount = function() {
24681
+ return jspb.Message.setField(this, 11, undefined);
24682
+ };
24683
+
24684
+
24685
+ /**
24686
+ * Returns whether this field is set.
24687
+ * @return {boolean}
24688
+ */
24689
+ proto.game.ActiveUserTournament.prototype.hasCurrentMembersCount = function() {
24690
+ return jspb.Message.getField(this, 11) != null;
24691
+ };
24692
+
24693
+
24598
24694
 
24599
24695
  /**
24600
24696
  * List of repeated fields within this message type.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protobuf-platform",
3
- "version": "1.2.243",
3
+ "version": "1.2.245",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -24,6 +24,7 @@ service Tournament {
24
24
  rpc getSingleTournamentForUser(UserTournamentRequest) returns (UserTournamentItem);
25
25
  rpc getActiveUserTournaments(ActiveUserTournamentsRequest) returns (UserTournamentItemsResponse);
26
26
  rpc getTournamentLeaderboard(GetTournamentLeaderboardRequest) returns (TournamentLeaderboardResponse);
27
+ rpc getOnlineTournamentInfo(GetOnlineTournamentInfoRequest) returns (OnlineTournamentInfoResponse);
27
28
  rpc attachUserToTournament(UserTournamentRequest) returns (TournamentStatusResponse);
28
29
  rpc resolveAutoTournamentForGameSession(ResolveAutoTournamentForGameSessionRequest) returns (ResolveAutoTournamentForGameSessionResponse);
29
30
  }
@@ -240,6 +241,19 @@ message TournamentLeaderboardResponse {
240
241
  optional TournamentLeaderboardUserItem my_position = 2;
241
242
  }
242
243
 
244
+ message GetOnlineTournamentInfoRequest {
245
+ uint64 tournament_id = 1;
246
+ uint64 user_id = 2; // gateway will provide from JWT
247
+ }
248
+
249
+ message OnlineTournamentInfoResponse {
250
+ uint64 tournament_id = 1;
251
+ uint64 end_in_milliseconds = 2; // countdown timer value in ms, always >= 0
252
+ repeated RewardItem rewards_places = 3; // all reward places for podium rendering
253
+ repeated TournamentLeaderboardUserItem top20 = 4; // top 20 snapshot (rank is 1-based)
254
+ optional TournamentLeaderboardUserItem me = 5; // MUST be returned by backend even if not in top20
255
+ }
256
+
243
257
  message ResolveAutoTournamentForGameSessionRequest {
244
258
  uint64 user_id = 1;
245
259
  repeated uint64 tournament_ids = 2; // candidate tournaments for the game
@@ -37,6 +37,17 @@ function deserialize_tournament_GetFileRequest(buffer_arg) {
37
37
  return tournament_pb.GetFileRequest.deserializeBinary(new Uint8Array(buffer_arg));
38
38
  }
39
39
 
40
+ function serialize_tournament_GetOnlineTournamentInfoRequest(arg) {
41
+ if (!(arg instanceof tournament_pb.GetOnlineTournamentInfoRequest)) {
42
+ throw new Error('Expected argument of type tournament.GetOnlineTournamentInfoRequest');
43
+ }
44
+ return Buffer.from(arg.serializeBinary());
45
+ }
46
+
47
+ function deserialize_tournament_GetOnlineTournamentInfoRequest(buffer_arg) {
48
+ return tournament_pb.GetOnlineTournamentInfoRequest.deserializeBinary(new Uint8Array(buffer_arg));
49
+ }
50
+
40
51
  function serialize_tournament_GetTournamentLeaderboardRequest(arg) {
41
52
  if (!(arg instanceof tournament_pb.GetTournamentLeaderboardRequest)) {
42
53
  throw new Error('Expected argument of type tournament.GetTournamentLeaderboardRequest');
@@ -70,6 +81,17 @@ function deserialize_tournament_ItemsBunchRequest(buffer_arg) {
70
81
  return tournament_pb.ItemsBunchRequest.deserializeBinary(new Uint8Array(buffer_arg));
71
82
  }
72
83
 
84
+ function serialize_tournament_OnlineTournamentInfoResponse(arg) {
85
+ if (!(arg instanceof tournament_pb.OnlineTournamentInfoResponse)) {
86
+ throw new Error('Expected argument of type tournament.OnlineTournamentInfoResponse');
87
+ }
88
+ return Buffer.from(arg.serializeBinary());
89
+ }
90
+
91
+ function deserialize_tournament_OnlineTournamentInfoResponse(buffer_arg) {
92
+ return tournament_pb.OnlineTournamentInfoResponse.deserializeBinary(new Uint8Array(buffer_arg));
93
+ }
94
+
73
95
  function serialize_tournament_PaginationRequest(arg) {
74
96
  if (!(arg instanceof tournament_pb.PaginationRequest)) {
75
97
  throw new Error('Expected argument of type tournament.PaginationRequest');
@@ -492,6 +514,17 @@ readListTournamentStatuses: {
492
514
  responseSerialize: serialize_tournament_TournamentLeaderboardResponse,
493
515
  responseDeserialize: deserialize_tournament_TournamentLeaderboardResponse,
494
516
  },
517
+ getOnlineTournamentInfo: {
518
+ path: '/tournament.Tournament/getOnlineTournamentInfo',
519
+ requestStream: false,
520
+ responseStream: false,
521
+ requestType: tournament_pb.GetOnlineTournamentInfoRequest,
522
+ responseType: tournament_pb.OnlineTournamentInfoResponse,
523
+ requestSerialize: serialize_tournament_GetOnlineTournamentInfoRequest,
524
+ requestDeserialize: deserialize_tournament_GetOnlineTournamentInfoRequest,
525
+ responseSerialize: serialize_tournament_OnlineTournamentInfoResponse,
526
+ responseDeserialize: deserialize_tournament_OnlineTournamentInfoResponse,
527
+ },
495
528
  attachUserToTournament: {
496
529
  path: '/tournament.Tournament/attachUserToTournament',
497
530
  requestStream: false,
@@ -26,9 +26,11 @@ goog.exportSymbol('proto.tournament.ActiveUserTournamentsRequest', null, global)
26
26
  goog.exportSymbol('proto.tournament.ContentItem', null, global);
27
27
  goog.exportSymbol('proto.tournament.File', null, global);
28
28
  goog.exportSymbol('proto.tournament.GetFileRequest', null, global);
29
+ goog.exportSymbol('proto.tournament.GetOnlineTournamentInfoRequest', null, global);
29
30
  goog.exportSymbol('proto.tournament.GetTournamentLeaderboardRequest', null, global);
30
31
  goog.exportSymbol('proto.tournament.GetTournamentRequest', null, global);
31
32
  goog.exportSymbol('proto.tournament.ItemsBunchRequest', null, global);
33
+ goog.exportSymbol('proto.tournament.OnlineTournamentInfoResponse', null, global);
32
34
  goog.exportSymbol('proto.tournament.PaginationRequest', null, global);
33
35
  goog.exportSymbol('proto.tournament.PingRequest', null, global);
34
36
  goog.exportSymbol('proto.tournament.PongResponse', null, global);
@@ -750,6 +752,48 @@ if (goog.DEBUG && !COMPILED) {
750
752
  */
751
753
  proto.tournament.TournamentLeaderboardResponse.displayName = 'proto.tournament.TournamentLeaderboardResponse';
752
754
  }
755
+ /**
756
+ * Generated by JsPbCodeGenerator.
757
+ * @param {Array=} opt_data Optional initial data array, typically from a
758
+ * server response, or constructed directly in Javascript. The array is used
759
+ * in place and becomes part of the constructed object. It is not cloned.
760
+ * If no data is provided, the constructed object will be empty, but still
761
+ * valid.
762
+ * @extends {jspb.Message}
763
+ * @constructor
764
+ */
765
+ proto.tournament.GetOnlineTournamentInfoRequest = function(opt_data) {
766
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
767
+ };
768
+ goog.inherits(proto.tournament.GetOnlineTournamentInfoRequest, jspb.Message);
769
+ if (goog.DEBUG && !COMPILED) {
770
+ /**
771
+ * @public
772
+ * @override
773
+ */
774
+ proto.tournament.GetOnlineTournamentInfoRequest.displayName = 'proto.tournament.GetOnlineTournamentInfoRequest';
775
+ }
776
+ /**
777
+ * Generated by JsPbCodeGenerator.
778
+ * @param {Array=} opt_data Optional initial data array, typically from a
779
+ * server response, or constructed directly in Javascript. The array is used
780
+ * in place and becomes part of the constructed object. It is not cloned.
781
+ * If no data is provided, the constructed object will be empty, but still
782
+ * valid.
783
+ * @extends {jspb.Message}
784
+ * @constructor
785
+ */
786
+ proto.tournament.OnlineTournamentInfoResponse = function(opt_data) {
787
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.tournament.OnlineTournamentInfoResponse.repeatedFields_, null);
788
+ };
789
+ goog.inherits(proto.tournament.OnlineTournamentInfoResponse, jspb.Message);
790
+ if (goog.DEBUG && !COMPILED) {
791
+ /**
792
+ * @public
793
+ * @override
794
+ */
795
+ proto.tournament.OnlineTournamentInfoResponse.displayName = 'proto.tournament.OnlineTournamentInfoResponse';
796
+ }
753
797
  /**
754
798
  * Generated by JsPbCodeGenerator.
755
799
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -10906,6 +10950,490 @@ proto.tournament.TournamentLeaderboardResponse.prototype.hasMyPosition = functio
10906
10950
 
10907
10951
 
10908
10952
 
10953
+
10954
+
10955
+ if (jspb.Message.GENERATE_TO_OBJECT) {
10956
+ /**
10957
+ * Creates an object representation of this proto.
10958
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
10959
+ * Optional fields that are not set will be set to undefined.
10960
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
10961
+ * For the list of reserved names please see:
10962
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
10963
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
10964
+ * JSPB instance for transitional soy proto support:
10965
+ * http://goto/soy-param-migration
10966
+ * @return {!Object}
10967
+ */
10968
+ proto.tournament.GetOnlineTournamentInfoRequest.prototype.toObject = function(opt_includeInstance) {
10969
+ return proto.tournament.GetOnlineTournamentInfoRequest.toObject(opt_includeInstance, this);
10970
+ };
10971
+
10972
+
10973
+ /**
10974
+ * Static version of the {@see toObject} method.
10975
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
10976
+ * the JSPB instance for transitional soy proto support:
10977
+ * http://goto/soy-param-migration
10978
+ * @param {!proto.tournament.GetOnlineTournamentInfoRequest} msg The msg instance to transform.
10979
+ * @return {!Object}
10980
+ * @suppress {unusedLocalVariables} f is only used for nested messages
10981
+ */
10982
+ proto.tournament.GetOnlineTournamentInfoRequest.toObject = function(includeInstance, msg) {
10983
+ var f, obj = {
10984
+ tournamentId: jspb.Message.getFieldWithDefault(msg, 1, 0),
10985
+ userId: jspb.Message.getFieldWithDefault(msg, 2, 0)
10986
+ };
10987
+
10988
+ if (includeInstance) {
10989
+ obj.$jspbMessageInstance = msg;
10990
+ }
10991
+ return obj;
10992
+ };
10993
+ }
10994
+
10995
+
10996
+ /**
10997
+ * Deserializes binary data (in protobuf wire format).
10998
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
10999
+ * @return {!proto.tournament.GetOnlineTournamentInfoRequest}
11000
+ */
11001
+ proto.tournament.GetOnlineTournamentInfoRequest.deserializeBinary = function(bytes) {
11002
+ var reader = new jspb.BinaryReader(bytes);
11003
+ var msg = new proto.tournament.GetOnlineTournamentInfoRequest;
11004
+ return proto.tournament.GetOnlineTournamentInfoRequest.deserializeBinaryFromReader(msg, reader);
11005
+ };
11006
+
11007
+
11008
+ /**
11009
+ * Deserializes binary data (in protobuf wire format) from the
11010
+ * given reader into the given message object.
11011
+ * @param {!proto.tournament.GetOnlineTournamentInfoRequest} msg The message object to deserialize into.
11012
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
11013
+ * @return {!proto.tournament.GetOnlineTournamentInfoRequest}
11014
+ */
11015
+ proto.tournament.GetOnlineTournamentInfoRequest.deserializeBinaryFromReader = function(msg, reader) {
11016
+ while (reader.nextField()) {
11017
+ if (reader.isEndGroup()) {
11018
+ break;
11019
+ }
11020
+ var field = reader.getFieldNumber();
11021
+ switch (field) {
11022
+ case 1:
11023
+ var value = /** @type {number} */ (reader.readUint64());
11024
+ msg.setTournamentId(value);
11025
+ break;
11026
+ case 2:
11027
+ var value = /** @type {number} */ (reader.readUint64());
11028
+ msg.setUserId(value);
11029
+ break;
11030
+ default:
11031
+ reader.skipField();
11032
+ break;
11033
+ }
11034
+ }
11035
+ return msg;
11036
+ };
11037
+
11038
+
11039
+ /**
11040
+ * Serializes the message to binary data (in protobuf wire format).
11041
+ * @return {!Uint8Array}
11042
+ */
11043
+ proto.tournament.GetOnlineTournamentInfoRequest.prototype.serializeBinary = function() {
11044
+ var writer = new jspb.BinaryWriter();
11045
+ proto.tournament.GetOnlineTournamentInfoRequest.serializeBinaryToWriter(this, writer);
11046
+ return writer.getResultBuffer();
11047
+ };
11048
+
11049
+
11050
+ /**
11051
+ * Serializes the given message to binary data (in protobuf wire
11052
+ * format), writing to the given BinaryWriter.
11053
+ * @param {!proto.tournament.GetOnlineTournamentInfoRequest} message
11054
+ * @param {!jspb.BinaryWriter} writer
11055
+ * @suppress {unusedLocalVariables} f is only used for nested messages
11056
+ */
11057
+ proto.tournament.GetOnlineTournamentInfoRequest.serializeBinaryToWriter = function(message, writer) {
11058
+ var f = undefined;
11059
+ f = message.getTournamentId();
11060
+ if (f !== 0) {
11061
+ writer.writeUint64(
11062
+ 1,
11063
+ f
11064
+ );
11065
+ }
11066
+ f = message.getUserId();
11067
+ if (f !== 0) {
11068
+ writer.writeUint64(
11069
+ 2,
11070
+ f
11071
+ );
11072
+ }
11073
+ };
11074
+
11075
+
11076
+ /**
11077
+ * optional uint64 tournament_id = 1;
11078
+ * @return {number}
11079
+ */
11080
+ proto.tournament.GetOnlineTournamentInfoRequest.prototype.getTournamentId = function() {
11081
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
11082
+ };
11083
+
11084
+
11085
+ /**
11086
+ * @param {number} value
11087
+ * @return {!proto.tournament.GetOnlineTournamentInfoRequest} returns this
11088
+ */
11089
+ proto.tournament.GetOnlineTournamentInfoRequest.prototype.setTournamentId = function(value) {
11090
+ return jspb.Message.setProto3IntField(this, 1, value);
11091
+ };
11092
+
11093
+
11094
+ /**
11095
+ * optional uint64 user_id = 2;
11096
+ * @return {number}
11097
+ */
11098
+ proto.tournament.GetOnlineTournamentInfoRequest.prototype.getUserId = function() {
11099
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
11100
+ };
11101
+
11102
+
11103
+ /**
11104
+ * @param {number} value
11105
+ * @return {!proto.tournament.GetOnlineTournamentInfoRequest} returns this
11106
+ */
11107
+ proto.tournament.GetOnlineTournamentInfoRequest.prototype.setUserId = function(value) {
11108
+ return jspb.Message.setProto3IntField(this, 2, value);
11109
+ };
11110
+
11111
+
11112
+
11113
+ /**
11114
+ * List of repeated fields within this message type.
11115
+ * @private {!Array<number>}
11116
+ * @const
11117
+ */
11118
+ proto.tournament.OnlineTournamentInfoResponse.repeatedFields_ = [3,4];
11119
+
11120
+
11121
+
11122
+ if (jspb.Message.GENERATE_TO_OBJECT) {
11123
+ /**
11124
+ * Creates an object representation of this proto.
11125
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
11126
+ * Optional fields that are not set will be set to undefined.
11127
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
11128
+ * For the list of reserved names please see:
11129
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
11130
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
11131
+ * JSPB instance for transitional soy proto support:
11132
+ * http://goto/soy-param-migration
11133
+ * @return {!Object}
11134
+ */
11135
+ proto.tournament.OnlineTournamentInfoResponse.prototype.toObject = function(opt_includeInstance) {
11136
+ return proto.tournament.OnlineTournamentInfoResponse.toObject(opt_includeInstance, this);
11137
+ };
11138
+
11139
+
11140
+ /**
11141
+ * Static version of the {@see toObject} method.
11142
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
11143
+ * the JSPB instance for transitional soy proto support:
11144
+ * http://goto/soy-param-migration
11145
+ * @param {!proto.tournament.OnlineTournamentInfoResponse} msg The msg instance to transform.
11146
+ * @return {!Object}
11147
+ * @suppress {unusedLocalVariables} f is only used for nested messages
11148
+ */
11149
+ proto.tournament.OnlineTournamentInfoResponse.toObject = function(includeInstance, msg) {
11150
+ var f, obj = {
11151
+ tournamentId: jspb.Message.getFieldWithDefault(msg, 1, 0),
11152
+ endInMilliseconds: jspb.Message.getFieldWithDefault(msg, 2, 0),
11153
+ rewardsPlacesList: jspb.Message.toObjectList(msg.getRewardsPlacesList(),
11154
+ proto.tournament.RewardItem.toObject, includeInstance),
11155
+ top20List: jspb.Message.toObjectList(msg.getTop20List(),
11156
+ proto.tournament.TournamentLeaderboardUserItem.toObject, includeInstance),
11157
+ me: (f = msg.getMe()) && proto.tournament.TournamentLeaderboardUserItem.toObject(includeInstance, f)
11158
+ };
11159
+
11160
+ if (includeInstance) {
11161
+ obj.$jspbMessageInstance = msg;
11162
+ }
11163
+ return obj;
11164
+ };
11165
+ }
11166
+
11167
+
11168
+ /**
11169
+ * Deserializes binary data (in protobuf wire format).
11170
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
11171
+ * @return {!proto.tournament.OnlineTournamentInfoResponse}
11172
+ */
11173
+ proto.tournament.OnlineTournamentInfoResponse.deserializeBinary = function(bytes) {
11174
+ var reader = new jspb.BinaryReader(bytes);
11175
+ var msg = new proto.tournament.OnlineTournamentInfoResponse;
11176
+ return proto.tournament.OnlineTournamentInfoResponse.deserializeBinaryFromReader(msg, reader);
11177
+ };
11178
+
11179
+
11180
+ /**
11181
+ * Deserializes binary data (in protobuf wire format) from the
11182
+ * given reader into the given message object.
11183
+ * @param {!proto.tournament.OnlineTournamentInfoResponse} msg The message object to deserialize into.
11184
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
11185
+ * @return {!proto.tournament.OnlineTournamentInfoResponse}
11186
+ */
11187
+ proto.tournament.OnlineTournamentInfoResponse.deserializeBinaryFromReader = function(msg, reader) {
11188
+ while (reader.nextField()) {
11189
+ if (reader.isEndGroup()) {
11190
+ break;
11191
+ }
11192
+ var field = reader.getFieldNumber();
11193
+ switch (field) {
11194
+ case 1:
11195
+ var value = /** @type {number} */ (reader.readUint64());
11196
+ msg.setTournamentId(value);
11197
+ break;
11198
+ case 2:
11199
+ var value = /** @type {number} */ (reader.readUint64());
11200
+ msg.setEndInMilliseconds(value);
11201
+ break;
11202
+ case 3:
11203
+ var value = new proto.tournament.RewardItem;
11204
+ reader.readMessage(value,proto.tournament.RewardItem.deserializeBinaryFromReader);
11205
+ msg.addRewardsPlaces(value);
11206
+ break;
11207
+ case 4:
11208
+ var value = new proto.tournament.TournamentLeaderboardUserItem;
11209
+ reader.readMessage(value,proto.tournament.TournamentLeaderboardUserItem.deserializeBinaryFromReader);
11210
+ msg.addTop20(value);
11211
+ break;
11212
+ case 5:
11213
+ var value = new proto.tournament.TournamentLeaderboardUserItem;
11214
+ reader.readMessage(value,proto.tournament.TournamentLeaderboardUserItem.deserializeBinaryFromReader);
11215
+ msg.setMe(value);
11216
+ break;
11217
+ default:
11218
+ reader.skipField();
11219
+ break;
11220
+ }
11221
+ }
11222
+ return msg;
11223
+ };
11224
+
11225
+
11226
+ /**
11227
+ * Serializes the message to binary data (in protobuf wire format).
11228
+ * @return {!Uint8Array}
11229
+ */
11230
+ proto.tournament.OnlineTournamentInfoResponse.prototype.serializeBinary = function() {
11231
+ var writer = new jspb.BinaryWriter();
11232
+ proto.tournament.OnlineTournamentInfoResponse.serializeBinaryToWriter(this, writer);
11233
+ return writer.getResultBuffer();
11234
+ };
11235
+
11236
+
11237
+ /**
11238
+ * Serializes the given message to binary data (in protobuf wire
11239
+ * format), writing to the given BinaryWriter.
11240
+ * @param {!proto.tournament.OnlineTournamentInfoResponse} message
11241
+ * @param {!jspb.BinaryWriter} writer
11242
+ * @suppress {unusedLocalVariables} f is only used for nested messages
11243
+ */
11244
+ proto.tournament.OnlineTournamentInfoResponse.serializeBinaryToWriter = function(message, writer) {
11245
+ var f = undefined;
11246
+ f = message.getTournamentId();
11247
+ if (f !== 0) {
11248
+ writer.writeUint64(
11249
+ 1,
11250
+ f
11251
+ );
11252
+ }
11253
+ f = message.getEndInMilliseconds();
11254
+ if (f !== 0) {
11255
+ writer.writeUint64(
11256
+ 2,
11257
+ f
11258
+ );
11259
+ }
11260
+ f = message.getRewardsPlacesList();
11261
+ if (f.length > 0) {
11262
+ writer.writeRepeatedMessage(
11263
+ 3,
11264
+ f,
11265
+ proto.tournament.RewardItem.serializeBinaryToWriter
11266
+ );
11267
+ }
11268
+ f = message.getTop20List();
11269
+ if (f.length > 0) {
11270
+ writer.writeRepeatedMessage(
11271
+ 4,
11272
+ f,
11273
+ proto.tournament.TournamentLeaderboardUserItem.serializeBinaryToWriter
11274
+ );
11275
+ }
11276
+ f = message.getMe();
11277
+ if (f != null) {
11278
+ writer.writeMessage(
11279
+ 5,
11280
+ f,
11281
+ proto.tournament.TournamentLeaderboardUserItem.serializeBinaryToWriter
11282
+ );
11283
+ }
11284
+ };
11285
+
11286
+
11287
+ /**
11288
+ * optional uint64 tournament_id = 1;
11289
+ * @return {number}
11290
+ */
11291
+ proto.tournament.OnlineTournamentInfoResponse.prototype.getTournamentId = function() {
11292
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
11293
+ };
11294
+
11295
+
11296
+ /**
11297
+ * @param {number} value
11298
+ * @return {!proto.tournament.OnlineTournamentInfoResponse} returns this
11299
+ */
11300
+ proto.tournament.OnlineTournamentInfoResponse.prototype.setTournamentId = function(value) {
11301
+ return jspb.Message.setProto3IntField(this, 1, value);
11302
+ };
11303
+
11304
+
11305
+ /**
11306
+ * optional uint64 end_in_milliseconds = 2;
11307
+ * @return {number}
11308
+ */
11309
+ proto.tournament.OnlineTournamentInfoResponse.prototype.getEndInMilliseconds = function() {
11310
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
11311
+ };
11312
+
11313
+
11314
+ /**
11315
+ * @param {number} value
11316
+ * @return {!proto.tournament.OnlineTournamentInfoResponse} returns this
11317
+ */
11318
+ proto.tournament.OnlineTournamentInfoResponse.prototype.setEndInMilliseconds = function(value) {
11319
+ return jspb.Message.setProto3IntField(this, 2, value);
11320
+ };
11321
+
11322
+
11323
+ /**
11324
+ * repeated RewardItem rewards_places = 3;
11325
+ * @return {!Array<!proto.tournament.RewardItem>}
11326
+ */
11327
+ proto.tournament.OnlineTournamentInfoResponse.prototype.getRewardsPlacesList = function() {
11328
+ return /** @type{!Array<!proto.tournament.RewardItem>} */ (
11329
+ jspb.Message.getRepeatedWrapperField(this, proto.tournament.RewardItem, 3));
11330
+ };
11331
+
11332
+
11333
+ /**
11334
+ * @param {!Array<!proto.tournament.RewardItem>} value
11335
+ * @return {!proto.tournament.OnlineTournamentInfoResponse} returns this
11336
+ */
11337
+ proto.tournament.OnlineTournamentInfoResponse.prototype.setRewardsPlacesList = function(value) {
11338
+ return jspb.Message.setRepeatedWrapperField(this, 3, value);
11339
+ };
11340
+
11341
+
11342
+ /**
11343
+ * @param {!proto.tournament.RewardItem=} opt_value
11344
+ * @param {number=} opt_index
11345
+ * @return {!proto.tournament.RewardItem}
11346
+ */
11347
+ proto.tournament.OnlineTournamentInfoResponse.prototype.addRewardsPlaces = function(opt_value, opt_index) {
11348
+ return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.tournament.RewardItem, opt_index);
11349
+ };
11350
+
11351
+
11352
+ /**
11353
+ * Clears the list making it empty but non-null.
11354
+ * @return {!proto.tournament.OnlineTournamentInfoResponse} returns this
11355
+ */
11356
+ proto.tournament.OnlineTournamentInfoResponse.prototype.clearRewardsPlacesList = function() {
11357
+ return this.setRewardsPlacesList([]);
11358
+ };
11359
+
11360
+
11361
+ /**
11362
+ * repeated TournamentLeaderboardUserItem top20 = 4;
11363
+ * @return {!Array<!proto.tournament.TournamentLeaderboardUserItem>}
11364
+ */
11365
+ proto.tournament.OnlineTournamentInfoResponse.prototype.getTop20List = function() {
11366
+ return /** @type{!Array<!proto.tournament.TournamentLeaderboardUserItem>} */ (
11367
+ jspb.Message.getRepeatedWrapperField(this, proto.tournament.TournamentLeaderboardUserItem, 4));
11368
+ };
11369
+
11370
+
11371
+ /**
11372
+ * @param {!Array<!proto.tournament.TournamentLeaderboardUserItem>} value
11373
+ * @return {!proto.tournament.OnlineTournamentInfoResponse} returns this
11374
+ */
11375
+ proto.tournament.OnlineTournamentInfoResponse.prototype.setTop20List = function(value) {
11376
+ return jspb.Message.setRepeatedWrapperField(this, 4, value);
11377
+ };
11378
+
11379
+
11380
+ /**
11381
+ * @param {!proto.tournament.TournamentLeaderboardUserItem=} opt_value
11382
+ * @param {number=} opt_index
11383
+ * @return {!proto.tournament.TournamentLeaderboardUserItem}
11384
+ */
11385
+ proto.tournament.OnlineTournamentInfoResponse.prototype.addTop20 = function(opt_value, opt_index) {
11386
+ return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.tournament.TournamentLeaderboardUserItem, opt_index);
11387
+ };
11388
+
11389
+
11390
+ /**
11391
+ * Clears the list making it empty but non-null.
11392
+ * @return {!proto.tournament.OnlineTournamentInfoResponse} returns this
11393
+ */
11394
+ proto.tournament.OnlineTournamentInfoResponse.prototype.clearTop20List = function() {
11395
+ return this.setTop20List([]);
11396
+ };
11397
+
11398
+
11399
+ /**
11400
+ * optional TournamentLeaderboardUserItem me = 5;
11401
+ * @return {?proto.tournament.TournamentLeaderboardUserItem}
11402
+ */
11403
+ proto.tournament.OnlineTournamentInfoResponse.prototype.getMe = function() {
11404
+ return /** @type{?proto.tournament.TournamentLeaderboardUserItem} */ (
11405
+ jspb.Message.getWrapperField(this, proto.tournament.TournamentLeaderboardUserItem, 5));
11406
+ };
11407
+
11408
+
11409
+ /**
11410
+ * @param {?proto.tournament.TournamentLeaderboardUserItem|undefined} value
11411
+ * @return {!proto.tournament.OnlineTournamentInfoResponse} returns this
11412
+ */
11413
+ proto.tournament.OnlineTournamentInfoResponse.prototype.setMe = function(value) {
11414
+ return jspb.Message.setWrapperField(this, 5, value);
11415
+ };
11416
+
11417
+
11418
+ /**
11419
+ * Clears the message field making it undefined.
11420
+ * @return {!proto.tournament.OnlineTournamentInfoResponse} returns this
11421
+ */
11422
+ proto.tournament.OnlineTournamentInfoResponse.prototype.clearMe = function() {
11423
+ return this.setMe(undefined);
11424
+ };
11425
+
11426
+
11427
+ /**
11428
+ * Returns whether this field is set.
11429
+ * @return {boolean}
11430
+ */
11431
+ proto.tournament.OnlineTournamentInfoResponse.prototype.hasMe = function() {
11432
+ return jspb.Message.getField(this, 5) != null;
11433
+ };
11434
+
11435
+
11436
+
10909
11437
  /**
10910
11438
  * List of repeated fields within this message type.
10911
11439
  * @private {!Array<number>}