protobuf-platform 1.1.59 → 1.1.61

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protobuf-platform",
3
- "version": "1.1.59",
3
+ "version": "1.1.61",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -13,12 +13,22 @@ service Promocode {
13
13
  }
14
14
  message PingRequest { string ping = 1; }
15
15
  message PongResponse { string pong = 1; }
16
- message PaginationRequest { int32 limit = 1; int32 offset = 2; optional UserSearchRequest user_search_params = 3; }
16
+ message PaginationRequest {
17
+ int32 limit = 1;
18
+ int32 offset = 2;
19
+ optional UserSearchRequest user_search_params = 3;
20
+ optional SearchRequest additional_search_params = 4;
21
+ }
17
22
  message UserSearchRequest {
18
23
  optional int32 user_id = 1;
19
24
  optional string balance_type = 2;
20
25
  optional string currency = 3;
21
26
  }
27
+ message SearchRequest {
28
+ optional string title = 1;
29
+ optional string code = 2;
30
+ optional int32 is_active = 3;
31
+ }
22
32
  //Main CRUD
23
33
  message GetCodeRequest {
24
34
  int32 id = 1;
@@ -30,6 +30,7 @@ goog.exportSymbol('proto.promocode.GetCodeRequest', null, global);
30
30
  goog.exportSymbol('proto.promocode.PaginationRequest', null, global);
31
31
  goog.exportSymbol('proto.promocode.PingRequest', null, global);
32
32
  goog.exportSymbol('proto.promocode.PongResponse', null, global);
33
+ goog.exportSymbol('proto.promocode.SearchRequest', null, global);
33
34
  goog.exportSymbol('proto.promocode.UserSearchRequest', null, global);
34
35
  /**
35
36
  * Generated by JsPbCodeGenerator.
@@ -115,6 +116,27 @@ if (goog.DEBUG && !COMPILED) {
115
116
  */
116
117
  proto.promocode.UserSearchRequest.displayName = 'proto.promocode.UserSearchRequest';
117
118
  }
119
+ /**
120
+ * Generated by JsPbCodeGenerator.
121
+ * @param {Array=} opt_data Optional initial data array, typically from a
122
+ * server response, or constructed directly in Javascript. The array is used
123
+ * in place and becomes part of the constructed object. It is not cloned.
124
+ * If no data is provided, the constructed object will be empty, but still
125
+ * valid.
126
+ * @extends {jspb.Message}
127
+ * @constructor
128
+ */
129
+ proto.promocode.SearchRequest = function(opt_data) {
130
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
131
+ };
132
+ goog.inherits(proto.promocode.SearchRequest, jspb.Message);
133
+ if (goog.DEBUG && !COMPILED) {
134
+ /**
135
+ * @public
136
+ * @override
137
+ */
138
+ proto.promocode.SearchRequest.displayName = 'proto.promocode.SearchRequest';
139
+ }
118
140
  /**
119
141
  * Generated by JsPbCodeGenerator.
120
142
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -535,7 +557,8 @@ proto.promocode.PaginationRequest.toObject = function(includeInstance, msg) {
535
557
  var f, obj = {
536
558
  limit: jspb.Message.getFieldWithDefault(msg, 1, 0),
537
559
  offset: jspb.Message.getFieldWithDefault(msg, 2, 0),
538
- userSearchParams: (f = msg.getUserSearchParams()) && proto.promocode.UserSearchRequest.toObject(includeInstance, f)
560
+ userSearchParams: (f = msg.getUserSearchParams()) && proto.promocode.UserSearchRequest.toObject(includeInstance, f),
561
+ additionalSearchParams: (f = msg.getAdditionalSearchParams()) && proto.promocode.SearchRequest.toObject(includeInstance, f)
539
562
  };
540
563
 
541
564
  if (includeInstance) {
@@ -585,6 +608,11 @@ proto.promocode.PaginationRequest.deserializeBinaryFromReader = function(msg, re
585
608
  reader.readMessage(value,proto.promocode.UserSearchRequest.deserializeBinaryFromReader);
586
609
  msg.setUserSearchParams(value);
587
610
  break;
611
+ case 4:
612
+ var value = new proto.promocode.SearchRequest;
613
+ reader.readMessage(value,proto.promocode.SearchRequest.deserializeBinaryFromReader);
614
+ msg.setAdditionalSearchParams(value);
615
+ break;
588
616
  default:
589
617
  reader.skipField();
590
618
  break;
@@ -636,6 +664,14 @@ proto.promocode.PaginationRequest.serializeBinaryToWriter = function(message, wr
636
664
  proto.promocode.UserSearchRequest.serializeBinaryToWriter
637
665
  );
638
666
  }
667
+ f = message.getAdditionalSearchParams();
668
+ if (f != null) {
669
+ writer.writeMessage(
670
+ 4,
671
+ f,
672
+ proto.promocode.SearchRequest.serializeBinaryToWriter
673
+ );
674
+ }
639
675
  };
640
676
 
641
677
 
@@ -712,6 +748,43 @@ proto.promocode.PaginationRequest.prototype.hasUserSearchParams = function() {
712
748
  };
713
749
 
714
750
 
751
+ /**
752
+ * optional SearchRequest additional_search_params = 4;
753
+ * @return {?proto.promocode.SearchRequest}
754
+ */
755
+ proto.promocode.PaginationRequest.prototype.getAdditionalSearchParams = function() {
756
+ return /** @type{?proto.promocode.SearchRequest} */ (
757
+ jspb.Message.getWrapperField(this, proto.promocode.SearchRequest, 4));
758
+ };
759
+
760
+
761
+ /**
762
+ * @param {?proto.promocode.SearchRequest|undefined} value
763
+ * @return {!proto.promocode.PaginationRequest} returns this
764
+ */
765
+ proto.promocode.PaginationRequest.prototype.setAdditionalSearchParams = function(value) {
766
+ return jspb.Message.setWrapperField(this, 4, value);
767
+ };
768
+
769
+
770
+ /**
771
+ * Clears the message field making it undefined.
772
+ * @return {!proto.promocode.PaginationRequest} returns this
773
+ */
774
+ proto.promocode.PaginationRequest.prototype.clearAdditionalSearchParams = function() {
775
+ return this.setAdditionalSearchParams(undefined);
776
+ };
777
+
778
+
779
+ /**
780
+ * Returns whether this field is set.
781
+ * @return {boolean}
782
+ */
783
+ proto.promocode.PaginationRequest.prototype.hasAdditionalSearchParams = function() {
784
+ return jspb.Message.getField(this, 4) != null;
785
+ };
786
+
787
+
715
788
 
716
789
 
717
790
 
@@ -959,6 +1032,250 @@ proto.promocode.UserSearchRequest.prototype.hasCurrency = function() {
959
1032
 
960
1033
 
961
1034
 
1035
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1036
+ /**
1037
+ * Creates an object representation of this proto.
1038
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1039
+ * Optional fields that are not set will be set to undefined.
1040
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1041
+ * For the list of reserved names please see:
1042
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1043
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1044
+ * JSPB instance for transitional soy proto support:
1045
+ * http://goto/soy-param-migration
1046
+ * @return {!Object}
1047
+ */
1048
+ proto.promocode.SearchRequest.prototype.toObject = function(opt_includeInstance) {
1049
+ return proto.promocode.SearchRequest.toObject(opt_includeInstance, this);
1050
+ };
1051
+
1052
+
1053
+ /**
1054
+ * Static version of the {@see toObject} method.
1055
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1056
+ * the JSPB instance for transitional soy proto support:
1057
+ * http://goto/soy-param-migration
1058
+ * @param {!proto.promocode.SearchRequest} msg The msg instance to transform.
1059
+ * @return {!Object}
1060
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1061
+ */
1062
+ proto.promocode.SearchRequest.toObject = function(includeInstance, msg) {
1063
+ var f, obj = {
1064
+ title: jspb.Message.getFieldWithDefault(msg, 1, ""),
1065
+ code: jspb.Message.getFieldWithDefault(msg, 2, ""),
1066
+ isActive: jspb.Message.getFieldWithDefault(msg, 3, 0)
1067
+ };
1068
+
1069
+ if (includeInstance) {
1070
+ obj.$jspbMessageInstance = msg;
1071
+ }
1072
+ return obj;
1073
+ };
1074
+ }
1075
+
1076
+
1077
+ /**
1078
+ * Deserializes binary data (in protobuf wire format).
1079
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1080
+ * @return {!proto.promocode.SearchRequest}
1081
+ */
1082
+ proto.promocode.SearchRequest.deserializeBinary = function(bytes) {
1083
+ var reader = new jspb.BinaryReader(bytes);
1084
+ var msg = new proto.promocode.SearchRequest;
1085
+ return proto.promocode.SearchRequest.deserializeBinaryFromReader(msg, reader);
1086
+ };
1087
+
1088
+
1089
+ /**
1090
+ * Deserializes binary data (in protobuf wire format) from the
1091
+ * given reader into the given message object.
1092
+ * @param {!proto.promocode.SearchRequest} msg The message object to deserialize into.
1093
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1094
+ * @return {!proto.promocode.SearchRequest}
1095
+ */
1096
+ proto.promocode.SearchRequest.deserializeBinaryFromReader = function(msg, reader) {
1097
+ while (reader.nextField()) {
1098
+ if (reader.isEndGroup()) {
1099
+ break;
1100
+ }
1101
+ var field = reader.getFieldNumber();
1102
+ switch (field) {
1103
+ case 1:
1104
+ var value = /** @type {string} */ (reader.readString());
1105
+ msg.setTitle(value);
1106
+ break;
1107
+ case 2:
1108
+ var value = /** @type {string} */ (reader.readString());
1109
+ msg.setCode(value);
1110
+ break;
1111
+ case 3:
1112
+ var value = /** @type {number} */ (reader.readInt32());
1113
+ msg.setIsActive(value);
1114
+ break;
1115
+ default:
1116
+ reader.skipField();
1117
+ break;
1118
+ }
1119
+ }
1120
+ return msg;
1121
+ };
1122
+
1123
+
1124
+ /**
1125
+ * Serializes the message to binary data (in protobuf wire format).
1126
+ * @return {!Uint8Array}
1127
+ */
1128
+ proto.promocode.SearchRequest.prototype.serializeBinary = function() {
1129
+ var writer = new jspb.BinaryWriter();
1130
+ proto.promocode.SearchRequest.serializeBinaryToWriter(this, writer);
1131
+ return writer.getResultBuffer();
1132
+ };
1133
+
1134
+
1135
+ /**
1136
+ * Serializes the given message to binary data (in protobuf wire
1137
+ * format), writing to the given BinaryWriter.
1138
+ * @param {!proto.promocode.SearchRequest} message
1139
+ * @param {!jspb.BinaryWriter} writer
1140
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1141
+ */
1142
+ proto.promocode.SearchRequest.serializeBinaryToWriter = function(message, writer) {
1143
+ var f = undefined;
1144
+ f = /** @type {string} */ (jspb.Message.getField(message, 1));
1145
+ if (f != null) {
1146
+ writer.writeString(
1147
+ 1,
1148
+ f
1149
+ );
1150
+ }
1151
+ f = /** @type {string} */ (jspb.Message.getField(message, 2));
1152
+ if (f != null) {
1153
+ writer.writeString(
1154
+ 2,
1155
+ f
1156
+ );
1157
+ }
1158
+ f = /** @type {number} */ (jspb.Message.getField(message, 3));
1159
+ if (f != null) {
1160
+ writer.writeInt32(
1161
+ 3,
1162
+ f
1163
+ );
1164
+ }
1165
+ };
1166
+
1167
+
1168
+ /**
1169
+ * optional string title = 1;
1170
+ * @return {string}
1171
+ */
1172
+ proto.promocode.SearchRequest.prototype.getTitle = function() {
1173
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1174
+ };
1175
+
1176
+
1177
+ /**
1178
+ * @param {string} value
1179
+ * @return {!proto.promocode.SearchRequest} returns this
1180
+ */
1181
+ proto.promocode.SearchRequest.prototype.setTitle = function(value) {
1182
+ return jspb.Message.setField(this, 1, value);
1183
+ };
1184
+
1185
+
1186
+ /**
1187
+ * Clears the field making it undefined.
1188
+ * @return {!proto.promocode.SearchRequest} returns this
1189
+ */
1190
+ proto.promocode.SearchRequest.prototype.clearTitle = function() {
1191
+ return jspb.Message.setField(this, 1, undefined);
1192
+ };
1193
+
1194
+
1195
+ /**
1196
+ * Returns whether this field is set.
1197
+ * @return {boolean}
1198
+ */
1199
+ proto.promocode.SearchRequest.prototype.hasTitle = function() {
1200
+ return jspb.Message.getField(this, 1) != null;
1201
+ };
1202
+
1203
+
1204
+ /**
1205
+ * optional string code = 2;
1206
+ * @return {string}
1207
+ */
1208
+ proto.promocode.SearchRequest.prototype.getCode = function() {
1209
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1210
+ };
1211
+
1212
+
1213
+ /**
1214
+ * @param {string} value
1215
+ * @return {!proto.promocode.SearchRequest} returns this
1216
+ */
1217
+ proto.promocode.SearchRequest.prototype.setCode = function(value) {
1218
+ return jspb.Message.setField(this, 2, value);
1219
+ };
1220
+
1221
+
1222
+ /**
1223
+ * Clears the field making it undefined.
1224
+ * @return {!proto.promocode.SearchRequest} returns this
1225
+ */
1226
+ proto.promocode.SearchRequest.prototype.clearCode = function() {
1227
+ return jspb.Message.setField(this, 2, undefined);
1228
+ };
1229
+
1230
+
1231
+ /**
1232
+ * Returns whether this field is set.
1233
+ * @return {boolean}
1234
+ */
1235
+ proto.promocode.SearchRequest.prototype.hasCode = function() {
1236
+ return jspb.Message.getField(this, 2) != null;
1237
+ };
1238
+
1239
+
1240
+ /**
1241
+ * optional int32 is_active = 3;
1242
+ * @return {number}
1243
+ */
1244
+ proto.promocode.SearchRequest.prototype.getIsActive = function() {
1245
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
1246
+ };
1247
+
1248
+
1249
+ /**
1250
+ * @param {number} value
1251
+ * @return {!proto.promocode.SearchRequest} returns this
1252
+ */
1253
+ proto.promocode.SearchRequest.prototype.setIsActive = function(value) {
1254
+ return jspb.Message.setField(this, 3, value);
1255
+ };
1256
+
1257
+
1258
+ /**
1259
+ * Clears the field making it undefined.
1260
+ * @return {!proto.promocode.SearchRequest} returns this
1261
+ */
1262
+ proto.promocode.SearchRequest.prototype.clearIsActive = function() {
1263
+ return jspb.Message.setField(this, 3, undefined);
1264
+ };
1265
+
1266
+
1267
+ /**
1268
+ * Returns whether this field is set.
1269
+ * @return {boolean}
1270
+ */
1271
+ proto.promocode.SearchRequest.prototype.hasIsActive = function() {
1272
+ return jspb.Message.getField(this, 3) != null;
1273
+ };
1274
+
1275
+
1276
+
1277
+
1278
+
962
1279
  if (jspb.Message.GENERATE_TO_OBJECT) {
963
1280
  /**
964
1281
  * Creates an object representation of this proto.
@@ -33,6 +33,7 @@ message PaginationRequest {
33
33
  int32 limit = 1;
34
34
  int32 offset = 2;
35
35
  optional UserSearchRequest user_search_params = 3;
36
+ optional SearchRequest additional_search_params = 4;
36
37
  }
37
38
  message UserSearchRequest {
38
39
  optional int32 user_id = 1;
@@ -40,6 +41,12 @@ message UserSearchRequest {
40
41
  optional string currency = 3;
41
42
  optional string locale = 4;
42
43
  }
44
+ message SearchRequest {
45
+ optional string title = 1;
46
+ optional int32 status_id = 2;
47
+ optional int32 is_active = 3;
48
+ repeated string currencies = 4;
49
+ }
43
50
  //Tournament CRUD | Requests
44
51
  message TournamentItem {
45
52
  optional int32 id = 1;
@@ -31,6 +31,7 @@ goog.exportSymbol('proto.tournament.PingRequest', null, global);
31
31
  goog.exportSymbol('proto.tournament.PongResponse', null, global);
32
32
  goog.exportSymbol('proto.tournament.RewardItem', null, global);
33
33
  goog.exportSymbol('proto.tournament.ScoringRule', null, global);
34
+ goog.exportSymbol('proto.tournament.SearchRequest', null, global);
34
35
  goog.exportSymbol('proto.tournament.TournamentActivationRuleRequest', null, global);
35
36
  goog.exportSymbol('proto.tournament.TournamentContentRequest', null, global);
36
37
  goog.exportSymbol('proto.tournament.TournamentGamesRequest', null, global);
@@ -175,6 +176,27 @@ if (goog.DEBUG && !COMPILED) {
175
176
  */
176
177
  proto.tournament.UserSearchRequest.displayName = 'proto.tournament.UserSearchRequest';
177
178
  }
179
+ /**
180
+ * Generated by JsPbCodeGenerator.
181
+ * @param {Array=} opt_data Optional initial data array, typically from a
182
+ * server response, or constructed directly in Javascript. The array is used
183
+ * in place and becomes part of the constructed object. It is not cloned.
184
+ * If no data is provided, the constructed object will be empty, but still
185
+ * valid.
186
+ * @extends {jspb.Message}
187
+ * @constructor
188
+ */
189
+ proto.tournament.SearchRequest = function(opt_data) {
190
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.tournament.SearchRequest.repeatedFields_, null);
191
+ };
192
+ goog.inherits(proto.tournament.SearchRequest, jspb.Message);
193
+ if (goog.DEBUG && !COMPILED) {
194
+ /**
195
+ * @public
196
+ * @override
197
+ */
198
+ proto.tournament.SearchRequest.displayName = 'proto.tournament.SearchRequest';
199
+ }
178
200
  /**
179
201
  * Generated by JsPbCodeGenerator.
180
202
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -1320,7 +1342,8 @@ proto.tournament.PaginationRequest.toObject = function(includeInstance, msg) {
1320
1342
  var f, obj = {
1321
1343
  limit: jspb.Message.getFieldWithDefault(msg, 1, 0),
1322
1344
  offset: jspb.Message.getFieldWithDefault(msg, 2, 0),
1323
- userSearchParams: (f = msg.getUserSearchParams()) && proto.tournament.UserSearchRequest.toObject(includeInstance, f)
1345
+ userSearchParams: (f = msg.getUserSearchParams()) && proto.tournament.UserSearchRequest.toObject(includeInstance, f),
1346
+ additionalSearchParams: (f = msg.getAdditionalSearchParams()) && proto.tournament.SearchRequest.toObject(includeInstance, f)
1324
1347
  };
1325
1348
 
1326
1349
  if (includeInstance) {
@@ -1370,6 +1393,11 @@ proto.tournament.PaginationRequest.deserializeBinaryFromReader = function(msg, r
1370
1393
  reader.readMessage(value,proto.tournament.UserSearchRequest.deserializeBinaryFromReader);
1371
1394
  msg.setUserSearchParams(value);
1372
1395
  break;
1396
+ case 4:
1397
+ var value = new proto.tournament.SearchRequest;
1398
+ reader.readMessage(value,proto.tournament.SearchRequest.deserializeBinaryFromReader);
1399
+ msg.setAdditionalSearchParams(value);
1400
+ break;
1373
1401
  default:
1374
1402
  reader.skipField();
1375
1403
  break;
@@ -1421,6 +1449,14 @@ proto.tournament.PaginationRequest.serializeBinaryToWriter = function(message, w
1421
1449
  proto.tournament.UserSearchRequest.serializeBinaryToWriter
1422
1450
  );
1423
1451
  }
1452
+ f = message.getAdditionalSearchParams();
1453
+ if (f != null) {
1454
+ writer.writeMessage(
1455
+ 4,
1456
+ f,
1457
+ proto.tournament.SearchRequest.serializeBinaryToWriter
1458
+ );
1459
+ }
1424
1460
  };
1425
1461
 
1426
1462
 
@@ -1497,6 +1533,43 @@ proto.tournament.PaginationRequest.prototype.hasUserSearchParams = function() {
1497
1533
  };
1498
1534
 
1499
1535
 
1536
+ /**
1537
+ * optional SearchRequest additional_search_params = 4;
1538
+ * @return {?proto.tournament.SearchRequest}
1539
+ */
1540
+ proto.tournament.PaginationRequest.prototype.getAdditionalSearchParams = function() {
1541
+ return /** @type{?proto.tournament.SearchRequest} */ (
1542
+ jspb.Message.getWrapperField(this, proto.tournament.SearchRequest, 4));
1543
+ };
1544
+
1545
+
1546
+ /**
1547
+ * @param {?proto.tournament.SearchRequest|undefined} value
1548
+ * @return {!proto.tournament.PaginationRequest} returns this
1549
+ */
1550
+ proto.tournament.PaginationRequest.prototype.setAdditionalSearchParams = function(value) {
1551
+ return jspb.Message.setWrapperField(this, 4, value);
1552
+ };
1553
+
1554
+
1555
+ /**
1556
+ * Clears the message field making it undefined.
1557
+ * @return {!proto.tournament.PaginationRequest} returns this
1558
+ */
1559
+ proto.tournament.PaginationRequest.prototype.clearAdditionalSearchParams = function() {
1560
+ return this.setAdditionalSearchParams(undefined);
1561
+ };
1562
+
1563
+
1564
+ /**
1565
+ * Returns whether this field is set.
1566
+ * @return {boolean}
1567
+ */
1568
+ proto.tournament.PaginationRequest.prototype.hasAdditionalSearchParams = function() {
1569
+ return jspb.Message.getField(this, 4) != null;
1570
+ };
1571
+
1572
+
1500
1573
 
1501
1574
 
1502
1575
 
@@ -1790,6 +1863,306 @@ proto.tournament.UserSearchRequest.prototype.hasLocale = function() {
1790
1863
 
1791
1864
 
1792
1865
 
1866
+ /**
1867
+ * List of repeated fields within this message type.
1868
+ * @private {!Array<number>}
1869
+ * @const
1870
+ */
1871
+ proto.tournament.SearchRequest.repeatedFields_ = [4];
1872
+
1873
+
1874
+
1875
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1876
+ /**
1877
+ * Creates an object representation of this proto.
1878
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1879
+ * Optional fields that are not set will be set to undefined.
1880
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1881
+ * For the list of reserved names please see:
1882
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1883
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1884
+ * JSPB instance for transitional soy proto support:
1885
+ * http://goto/soy-param-migration
1886
+ * @return {!Object}
1887
+ */
1888
+ proto.tournament.SearchRequest.prototype.toObject = function(opt_includeInstance) {
1889
+ return proto.tournament.SearchRequest.toObject(opt_includeInstance, this);
1890
+ };
1891
+
1892
+
1893
+ /**
1894
+ * Static version of the {@see toObject} method.
1895
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1896
+ * the JSPB instance for transitional soy proto support:
1897
+ * http://goto/soy-param-migration
1898
+ * @param {!proto.tournament.SearchRequest} msg The msg instance to transform.
1899
+ * @return {!Object}
1900
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1901
+ */
1902
+ proto.tournament.SearchRequest.toObject = function(includeInstance, msg) {
1903
+ var f, obj = {
1904
+ title: jspb.Message.getFieldWithDefault(msg, 1, ""),
1905
+ statusId: jspb.Message.getFieldWithDefault(msg, 2, 0),
1906
+ isActive: jspb.Message.getFieldWithDefault(msg, 3, 0),
1907
+ currenciesList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f
1908
+ };
1909
+
1910
+ if (includeInstance) {
1911
+ obj.$jspbMessageInstance = msg;
1912
+ }
1913
+ return obj;
1914
+ };
1915
+ }
1916
+
1917
+
1918
+ /**
1919
+ * Deserializes binary data (in protobuf wire format).
1920
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1921
+ * @return {!proto.tournament.SearchRequest}
1922
+ */
1923
+ proto.tournament.SearchRequest.deserializeBinary = function(bytes) {
1924
+ var reader = new jspb.BinaryReader(bytes);
1925
+ var msg = new proto.tournament.SearchRequest;
1926
+ return proto.tournament.SearchRequest.deserializeBinaryFromReader(msg, reader);
1927
+ };
1928
+
1929
+
1930
+ /**
1931
+ * Deserializes binary data (in protobuf wire format) from the
1932
+ * given reader into the given message object.
1933
+ * @param {!proto.tournament.SearchRequest} msg The message object to deserialize into.
1934
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1935
+ * @return {!proto.tournament.SearchRequest}
1936
+ */
1937
+ proto.tournament.SearchRequest.deserializeBinaryFromReader = function(msg, reader) {
1938
+ while (reader.nextField()) {
1939
+ if (reader.isEndGroup()) {
1940
+ break;
1941
+ }
1942
+ var field = reader.getFieldNumber();
1943
+ switch (field) {
1944
+ case 1:
1945
+ var value = /** @type {string} */ (reader.readString());
1946
+ msg.setTitle(value);
1947
+ break;
1948
+ case 2:
1949
+ var value = /** @type {number} */ (reader.readInt32());
1950
+ msg.setStatusId(value);
1951
+ break;
1952
+ case 3:
1953
+ var value = /** @type {number} */ (reader.readInt32());
1954
+ msg.setIsActive(value);
1955
+ break;
1956
+ case 4:
1957
+ var value = /** @type {string} */ (reader.readString());
1958
+ msg.addCurrencies(value);
1959
+ break;
1960
+ default:
1961
+ reader.skipField();
1962
+ break;
1963
+ }
1964
+ }
1965
+ return msg;
1966
+ };
1967
+
1968
+
1969
+ /**
1970
+ * Serializes the message to binary data (in protobuf wire format).
1971
+ * @return {!Uint8Array}
1972
+ */
1973
+ proto.tournament.SearchRequest.prototype.serializeBinary = function() {
1974
+ var writer = new jspb.BinaryWriter();
1975
+ proto.tournament.SearchRequest.serializeBinaryToWriter(this, writer);
1976
+ return writer.getResultBuffer();
1977
+ };
1978
+
1979
+
1980
+ /**
1981
+ * Serializes the given message to binary data (in protobuf wire
1982
+ * format), writing to the given BinaryWriter.
1983
+ * @param {!proto.tournament.SearchRequest} message
1984
+ * @param {!jspb.BinaryWriter} writer
1985
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1986
+ */
1987
+ proto.tournament.SearchRequest.serializeBinaryToWriter = function(message, writer) {
1988
+ var f = undefined;
1989
+ f = /** @type {string} */ (jspb.Message.getField(message, 1));
1990
+ if (f != null) {
1991
+ writer.writeString(
1992
+ 1,
1993
+ f
1994
+ );
1995
+ }
1996
+ f = /** @type {number} */ (jspb.Message.getField(message, 2));
1997
+ if (f != null) {
1998
+ writer.writeInt32(
1999
+ 2,
2000
+ f
2001
+ );
2002
+ }
2003
+ f = /** @type {number} */ (jspb.Message.getField(message, 3));
2004
+ if (f != null) {
2005
+ writer.writeInt32(
2006
+ 3,
2007
+ f
2008
+ );
2009
+ }
2010
+ f = message.getCurrenciesList();
2011
+ if (f.length > 0) {
2012
+ writer.writeRepeatedString(
2013
+ 4,
2014
+ f
2015
+ );
2016
+ }
2017
+ };
2018
+
2019
+
2020
+ /**
2021
+ * optional string title = 1;
2022
+ * @return {string}
2023
+ */
2024
+ proto.tournament.SearchRequest.prototype.getTitle = function() {
2025
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2026
+ };
2027
+
2028
+
2029
+ /**
2030
+ * @param {string} value
2031
+ * @return {!proto.tournament.SearchRequest} returns this
2032
+ */
2033
+ proto.tournament.SearchRequest.prototype.setTitle = function(value) {
2034
+ return jspb.Message.setField(this, 1, value);
2035
+ };
2036
+
2037
+
2038
+ /**
2039
+ * Clears the field making it undefined.
2040
+ * @return {!proto.tournament.SearchRequest} returns this
2041
+ */
2042
+ proto.tournament.SearchRequest.prototype.clearTitle = function() {
2043
+ return jspb.Message.setField(this, 1, undefined);
2044
+ };
2045
+
2046
+
2047
+ /**
2048
+ * Returns whether this field is set.
2049
+ * @return {boolean}
2050
+ */
2051
+ proto.tournament.SearchRequest.prototype.hasTitle = function() {
2052
+ return jspb.Message.getField(this, 1) != null;
2053
+ };
2054
+
2055
+
2056
+ /**
2057
+ * optional int32 status_id = 2;
2058
+ * @return {number}
2059
+ */
2060
+ proto.tournament.SearchRequest.prototype.getStatusId = function() {
2061
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
2062
+ };
2063
+
2064
+
2065
+ /**
2066
+ * @param {number} value
2067
+ * @return {!proto.tournament.SearchRequest} returns this
2068
+ */
2069
+ proto.tournament.SearchRequest.prototype.setStatusId = function(value) {
2070
+ return jspb.Message.setField(this, 2, value);
2071
+ };
2072
+
2073
+
2074
+ /**
2075
+ * Clears the field making it undefined.
2076
+ * @return {!proto.tournament.SearchRequest} returns this
2077
+ */
2078
+ proto.tournament.SearchRequest.prototype.clearStatusId = function() {
2079
+ return jspb.Message.setField(this, 2, undefined);
2080
+ };
2081
+
2082
+
2083
+ /**
2084
+ * Returns whether this field is set.
2085
+ * @return {boolean}
2086
+ */
2087
+ proto.tournament.SearchRequest.prototype.hasStatusId = function() {
2088
+ return jspb.Message.getField(this, 2) != null;
2089
+ };
2090
+
2091
+
2092
+ /**
2093
+ * optional int32 is_active = 3;
2094
+ * @return {number}
2095
+ */
2096
+ proto.tournament.SearchRequest.prototype.getIsActive = function() {
2097
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
2098
+ };
2099
+
2100
+
2101
+ /**
2102
+ * @param {number} value
2103
+ * @return {!proto.tournament.SearchRequest} returns this
2104
+ */
2105
+ proto.tournament.SearchRequest.prototype.setIsActive = function(value) {
2106
+ return jspb.Message.setField(this, 3, value);
2107
+ };
2108
+
2109
+
2110
+ /**
2111
+ * Clears the field making it undefined.
2112
+ * @return {!proto.tournament.SearchRequest} returns this
2113
+ */
2114
+ proto.tournament.SearchRequest.prototype.clearIsActive = function() {
2115
+ return jspb.Message.setField(this, 3, undefined);
2116
+ };
2117
+
2118
+
2119
+ /**
2120
+ * Returns whether this field is set.
2121
+ * @return {boolean}
2122
+ */
2123
+ proto.tournament.SearchRequest.prototype.hasIsActive = function() {
2124
+ return jspb.Message.getField(this, 3) != null;
2125
+ };
2126
+
2127
+
2128
+ /**
2129
+ * repeated string currencies = 4;
2130
+ * @return {!Array<string>}
2131
+ */
2132
+ proto.tournament.SearchRequest.prototype.getCurrenciesList = function() {
2133
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 4));
2134
+ };
2135
+
2136
+
2137
+ /**
2138
+ * @param {!Array<string>} value
2139
+ * @return {!proto.tournament.SearchRequest} returns this
2140
+ */
2141
+ proto.tournament.SearchRequest.prototype.setCurrenciesList = function(value) {
2142
+ return jspb.Message.setField(this, 4, value || []);
2143
+ };
2144
+
2145
+
2146
+ /**
2147
+ * @param {string} value
2148
+ * @param {number=} opt_index
2149
+ * @return {!proto.tournament.SearchRequest} returns this
2150
+ */
2151
+ proto.tournament.SearchRequest.prototype.addCurrencies = function(value, opt_index) {
2152
+ return jspb.Message.addToRepeatedField(this, 4, value, opt_index);
2153
+ };
2154
+
2155
+
2156
+ /**
2157
+ * Clears the list making it empty but non-null.
2158
+ * @return {!proto.tournament.SearchRequest} returns this
2159
+ */
2160
+ proto.tournament.SearchRequest.prototype.clearCurrenciesList = function() {
2161
+ return this.setCurrenciesList([]);
2162
+ };
2163
+
2164
+
2165
+
1793
2166
  /**
1794
2167
  * List of repeated fields within this message type.
1795
2168
  * @private {!Array<number>}