protobuf-platform 1.1.58 → 1.1.60

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.
@@ -23,12 +23,23 @@ message PongResponse { string pong = 1; }
23
23
  message File { bytes media = 1; optional string file_name = 2; optional string file_type = 3; }
24
24
  message GetFileRequest { string file_name = 1; string instance_type = 2; }
25
25
  //Common
26
- message PaginationRequest { int32 limit = 1; int32 offset = 2; optional UserSearchRequest user_search_params = 3; }
26
+ message PaginationRequest {
27
+ int32 limit = 1;
28
+ int32 offset = 2;
29
+ optional UserSearchRequest user_search_params = 3;
30
+ optional SearchRequest additional_search_params = 4;
31
+ }
27
32
  message UserSearchRequest {
28
33
  optional int32 user_id = 1;
29
34
  optional string balance_type = 2;
30
35
  optional string currency = 3;
31
36
  }
37
+ message SearchRequest {
38
+ optional string title = 1;
39
+ optional int32 level = 2;
40
+ repeated string type = 3;
41
+ optional int32 is_active = 4;
42
+ }
32
43
  //Cashback CRUD | Requests
33
44
  message CashbackItem {
34
45
  optional int32 id = 1;
@@ -37,6 +37,7 @@ goog.exportSymbol('proto.cashback.GetFileRequest', null, global);
37
37
  goog.exportSymbol('proto.cashback.PaginationRequest', null, global);
38
38
  goog.exportSymbol('proto.cashback.PingRequest', null, global);
39
39
  goog.exportSymbol('proto.cashback.PongResponse', null, global);
40
+ goog.exportSymbol('proto.cashback.SearchRequest', null, global);
40
41
  goog.exportSymbol('proto.cashback.UserCashbackItem', null, global);
41
42
  goog.exportSymbol('proto.cashback.UserCashbackItemsResponse', null, global);
42
43
  goog.exportSymbol('proto.cashback.UserSearchRequest', null, global);
@@ -166,6 +167,27 @@ if (goog.DEBUG && !COMPILED) {
166
167
  */
167
168
  proto.cashback.UserSearchRequest.displayName = 'proto.cashback.UserSearchRequest';
168
169
  }
170
+ /**
171
+ * Generated by JsPbCodeGenerator.
172
+ * @param {Array=} opt_data Optional initial data array, typically from a
173
+ * server response, or constructed directly in Javascript. The array is used
174
+ * in place and becomes part of the constructed object. It is not cloned.
175
+ * If no data is provided, the constructed object will be empty, but still
176
+ * valid.
177
+ * @extends {jspb.Message}
178
+ * @constructor
179
+ */
180
+ proto.cashback.SearchRequest = function(opt_data) {
181
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.cashback.SearchRequest.repeatedFields_, null);
182
+ };
183
+ goog.inherits(proto.cashback.SearchRequest, jspb.Message);
184
+ if (goog.DEBUG && !COMPILED) {
185
+ /**
186
+ * @public
187
+ * @override
188
+ */
189
+ proto.cashback.SearchRequest.displayName = 'proto.cashback.SearchRequest';
190
+ }
169
191
  /**
170
192
  * Generated by JsPbCodeGenerator.
171
193
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -1122,7 +1144,8 @@ proto.cashback.PaginationRequest.toObject = function(includeInstance, msg) {
1122
1144
  var f, obj = {
1123
1145
  limit: jspb.Message.getFieldWithDefault(msg, 1, 0),
1124
1146
  offset: jspb.Message.getFieldWithDefault(msg, 2, 0),
1125
- userSearchParams: (f = msg.getUserSearchParams()) && proto.cashback.UserSearchRequest.toObject(includeInstance, f)
1147
+ userSearchParams: (f = msg.getUserSearchParams()) && proto.cashback.UserSearchRequest.toObject(includeInstance, f),
1148
+ additionalSearchParams: (f = msg.getAdditionalSearchParams()) && proto.cashback.SearchRequest.toObject(includeInstance, f)
1126
1149
  };
1127
1150
 
1128
1151
  if (includeInstance) {
@@ -1172,6 +1195,11 @@ proto.cashback.PaginationRequest.deserializeBinaryFromReader = function(msg, rea
1172
1195
  reader.readMessage(value,proto.cashback.UserSearchRequest.deserializeBinaryFromReader);
1173
1196
  msg.setUserSearchParams(value);
1174
1197
  break;
1198
+ case 4:
1199
+ var value = new proto.cashback.SearchRequest;
1200
+ reader.readMessage(value,proto.cashback.SearchRequest.deserializeBinaryFromReader);
1201
+ msg.setAdditionalSearchParams(value);
1202
+ break;
1175
1203
  default:
1176
1204
  reader.skipField();
1177
1205
  break;
@@ -1223,6 +1251,14 @@ proto.cashback.PaginationRequest.serializeBinaryToWriter = function(message, wri
1223
1251
  proto.cashback.UserSearchRequest.serializeBinaryToWriter
1224
1252
  );
1225
1253
  }
1254
+ f = message.getAdditionalSearchParams();
1255
+ if (f != null) {
1256
+ writer.writeMessage(
1257
+ 4,
1258
+ f,
1259
+ proto.cashback.SearchRequest.serializeBinaryToWriter
1260
+ );
1261
+ }
1226
1262
  };
1227
1263
 
1228
1264
 
@@ -1299,6 +1335,43 @@ proto.cashback.PaginationRequest.prototype.hasUserSearchParams = function() {
1299
1335
  };
1300
1336
 
1301
1337
 
1338
+ /**
1339
+ * optional SearchRequest additional_search_params = 4;
1340
+ * @return {?proto.cashback.SearchRequest}
1341
+ */
1342
+ proto.cashback.PaginationRequest.prototype.getAdditionalSearchParams = function() {
1343
+ return /** @type{?proto.cashback.SearchRequest} */ (
1344
+ jspb.Message.getWrapperField(this, proto.cashback.SearchRequest, 4));
1345
+ };
1346
+
1347
+
1348
+ /**
1349
+ * @param {?proto.cashback.SearchRequest|undefined} value
1350
+ * @return {!proto.cashback.PaginationRequest} returns this
1351
+ */
1352
+ proto.cashback.PaginationRequest.prototype.setAdditionalSearchParams = function(value) {
1353
+ return jspb.Message.setWrapperField(this, 4, value);
1354
+ };
1355
+
1356
+
1357
+ /**
1358
+ * Clears the message field making it undefined.
1359
+ * @return {!proto.cashback.PaginationRequest} returns this
1360
+ */
1361
+ proto.cashback.PaginationRequest.prototype.clearAdditionalSearchParams = function() {
1362
+ return this.setAdditionalSearchParams(undefined);
1363
+ };
1364
+
1365
+
1366
+ /**
1367
+ * Returns whether this field is set.
1368
+ * @return {boolean}
1369
+ */
1370
+ proto.cashback.PaginationRequest.prototype.hasAdditionalSearchParams = function() {
1371
+ return jspb.Message.getField(this, 4) != null;
1372
+ };
1373
+
1374
+
1302
1375
 
1303
1376
 
1304
1377
 
@@ -1544,6 +1617,306 @@ proto.cashback.UserSearchRequest.prototype.hasCurrency = function() {
1544
1617
 
1545
1618
 
1546
1619
 
1620
+ /**
1621
+ * List of repeated fields within this message type.
1622
+ * @private {!Array<number>}
1623
+ * @const
1624
+ */
1625
+ proto.cashback.SearchRequest.repeatedFields_ = [3];
1626
+
1627
+
1628
+
1629
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1630
+ /**
1631
+ * Creates an object representation of this proto.
1632
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1633
+ * Optional fields that are not set will be set to undefined.
1634
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1635
+ * For the list of reserved names please see:
1636
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1637
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1638
+ * JSPB instance for transitional soy proto support:
1639
+ * http://goto/soy-param-migration
1640
+ * @return {!Object}
1641
+ */
1642
+ proto.cashback.SearchRequest.prototype.toObject = function(opt_includeInstance) {
1643
+ return proto.cashback.SearchRequest.toObject(opt_includeInstance, this);
1644
+ };
1645
+
1646
+
1647
+ /**
1648
+ * Static version of the {@see toObject} method.
1649
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1650
+ * the JSPB instance for transitional soy proto support:
1651
+ * http://goto/soy-param-migration
1652
+ * @param {!proto.cashback.SearchRequest} msg The msg instance to transform.
1653
+ * @return {!Object}
1654
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1655
+ */
1656
+ proto.cashback.SearchRequest.toObject = function(includeInstance, msg) {
1657
+ var f, obj = {
1658
+ title: jspb.Message.getFieldWithDefault(msg, 1, ""),
1659
+ level: jspb.Message.getFieldWithDefault(msg, 2, 0),
1660
+ typeList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f,
1661
+ isActive: jspb.Message.getFieldWithDefault(msg, 4, 0)
1662
+ };
1663
+
1664
+ if (includeInstance) {
1665
+ obj.$jspbMessageInstance = msg;
1666
+ }
1667
+ return obj;
1668
+ };
1669
+ }
1670
+
1671
+
1672
+ /**
1673
+ * Deserializes binary data (in protobuf wire format).
1674
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1675
+ * @return {!proto.cashback.SearchRequest}
1676
+ */
1677
+ proto.cashback.SearchRequest.deserializeBinary = function(bytes) {
1678
+ var reader = new jspb.BinaryReader(bytes);
1679
+ var msg = new proto.cashback.SearchRequest;
1680
+ return proto.cashback.SearchRequest.deserializeBinaryFromReader(msg, reader);
1681
+ };
1682
+
1683
+
1684
+ /**
1685
+ * Deserializes binary data (in protobuf wire format) from the
1686
+ * given reader into the given message object.
1687
+ * @param {!proto.cashback.SearchRequest} msg The message object to deserialize into.
1688
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1689
+ * @return {!proto.cashback.SearchRequest}
1690
+ */
1691
+ proto.cashback.SearchRequest.deserializeBinaryFromReader = function(msg, reader) {
1692
+ while (reader.nextField()) {
1693
+ if (reader.isEndGroup()) {
1694
+ break;
1695
+ }
1696
+ var field = reader.getFieldNumber();
1697
+ switch (field) {
1698
+ case 1:
1699
+ var value = /** @type {string} */ (reader.readString());
1700
+ msg.setTitle(value);
1701
+ break;
1702
+ case 2:
1703
+ var value = /** @type {number} */ (reader.readInt32());
1704
+ msg.setLevel(value);
1705
+ break;
1706
+ case 3:
1707
+ var value = /** @type {string} */ (reader.readString());
1708
+ msg.addType(value);
1709
+ break;
1710
+ case 4:
1711
+ var value = /** @type {number} */ (reader.readInt32());
1712
+ msg.setIsActive(value);
1713
+ break;
1714
+ default:
1715
+ reader.skipField();
1716
+ break;
1717
+ }
1718
+ }
1719
+ return msg;
1720
+ };
1721
+
1722
+
1723
+ /**
1724
+ * Serializes the message to binary data (in protobuf wire format).
1725
+ * @return {!Uint8Array}
1726
+ */
1727
+ proto.cashback.SearchRequest.prototype.serializeBinary = function() {
1728
+ var writer = new jspb.BinaryWriter();
1729
+ proto.cashback.SearchRequest.serializeBinaryToWriter(this, writer);
1730
+ return writer.getResultBuffer();
1731
+ };
1732
+
1733
+
1734
+ /**
1735
+ * Serializes the given message to binary data (in protobuf wire
1736
+ * format), writing to the given BinaryWriter.
1737
+ * @param {!proto.cashback.SearchRequest} message
1738
+ * @param {!jspb.BinaryWriter} writer
1739
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1740
+ */
1741
+ proto.cashback.SearchRequest.serializeBinaryToWriter = function(message, writer) {
1742
+ var f = undefined;
1743
+ f = /** @type {string} */ (jspb.Message.getField(message, 1));
1744
+ if (f != null) {
1745
+ writer.writeString(
1746
+ 1,
1747
+ f
1748
+ );
1749
+ }
1750
+ f = /** @type {number} */ (jspb.Message.getField(message, 2));
1751
+ if (f != null) {
1752
+ writer.writeInt32(
1753
+ 2,
1754
+ f
1755
+ );
1756
+ }
1757
+ f = message.getTypeList();
1758
+ if (f.length > 0) {
1759
+ writer.writeRepeatedString(
1760
+ 3,
1761
+ f
1762
+ );
1763
+ }
1764
+ f = /** @type {number} */ (jspb.Message.getField(message, 4));
1765
+ if (f != null) {
1766
+ writer.writeInt32(
1767
+ 4,
1768
+ f
1769
+ );
1770
+ }
1771
+ };
1772
+
1773
+
1774
+ /**
1775
+ * optional string title = 1;
1776
+ * @return {string}
1777
+ */
1778
+ proto.cashback.SearchRequest.prototype.getTitle = function() {
1779
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1780
+ };
1781
+
1782
+
1783
+ /**
1784
+ * @param {string} value
1785
+ * @return {!proto.cashback.SearchRequest} returns this
1786
+ */
1787
+ proto.cashback.SearchRequest.prototype.setTitle = function(value) {
1788
+ return jspb.Message.setField(this, 1, value);
1789
+ };
1790
+
1791
+
1792
+ /**
1793
+ * Clears the field making it undefined.
1794
+ * @return {!proto.cashback.SearchRequest} returns this
1795
+ */
1796
+ proto.cashback.SearchRequest.prototype.clearTitle = function() {
1797
+ return jspb.Message.setField(this, 1, undefined);
1798
+ };
1799
+
1800
+
1801
+ /**
1802
+ * Returns whether this field is set.
1803
+ * @return {boolean}
1804
+ */
1805
+ proto.cashback.SearchRequest.prototype.hasTitle = function() {
1806
+ return jspb.Message.getField(this, 1) != null;
1807
+ };
1808
+
1809
+
1810
+ /**
1811
+ * optional int32 level = 2;
1812
+ * @return {number}
1813
+ */
1814
+ proto.cashback.SearchRequest.prototype.getLevel = function() {
1815
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
1816
+ };
1817
+
1818
+
1819
+ /**
1820
+ * @param {number} value
1821
+ * @return {!proto.cashback.SearchRequest} returns this
1822
+ */
1823
+ proto.cashback.SearchRequest.prototype.setLevel = function(value) {
1824
+ return jspb.Message.setField(this, 2, value);
1825
+ };
1826
+
1827
+
1828
+ /**
1829
+ * Clears the field making it undefined.
1830
+ * @return {!proto.cashback.SearchRequest} returns this
1831
+ */
1832
+ proto.cashback.SearchRequest.prototype.clearLevel = function() {
1833
+ return jspb.Message.setField(this, 2, undefined);
1834
+ };
1835
+
1836
+
1837
+ /**
1838
+ * Returns whether this field is set.
1839
+ * @return {boolean}
1840
+ */
1841
+ proto.cashback.SearchRequest.prototype.hasLevel = function() {
1842
+ return jspb.Message.getField(this, 2) != null;
1843
+ };
1844
+
1845
+
1846
+ /**
1847
+ * repeated string type = 3;
1848
+ * @return {!Array<string>}
1849
+ */
1850
+ proto.cashback.SearchRequest.prototype.getTypeList = function() {
1851
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 3));
1852
+ };
1853
+
1854
+
1855
+ /**
1856
+ * @param {!Array<string>} value
1857
+ * @return {!proto.cashback.SearchRequest} returns this
1858
+ */
1859
+ proto.cashback.SearchRequest.prototype.setTypeList = function(value) {
1860
+ return jspb.Message.setField(this, 3, value || []);
1861
+ };
1862
+
1863
+
1864
+ /**
1865
+ * @param {string} value
1866
+ * @param {number=} opt_index
1867
+ * @return {!proto.cashback.SearchRequest} returns this
1868
+ */
1869
+ proto.cashback.SearchRequest.prototype.addType = function(value, opt_index) {
1870
+ return jspb.Message.addToRepeatedField(this, 3, value, opt_index);
1871
+ };
1872
+
1873
+
1874
+ /**
1875
+ * Clears the list making it empty but non-null.
1876
+ * @return {!proto.cashback.SearchRequest} returns this
1877
+ */
1878
+ proto.cashback.SearchRequest.prototype.clearTypeList = function() {
1879
+ return this.setTypeList([]);
1880
+ };
1881
+
1882
+
1883
+ /**
1884
+ * optional int32 is_active = 4;
1885
+ * @return {number}
1886
+ */
1887
+ proto.cashback.SearchRequest.prototype.getIsActive = function() {
1888
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
1889
+ };
1890
+
1891
+
1892
+ /**
1893
+ * @param {number} value
1894
+ * @return {!proto.cashback.SearchRequest} returns this
1895
+ */
1896
+ proto.cashback.SearchRequest.prototype.setIsActive = function(value) {
1897
+ return jspb.Message.setField(this, 4, value);
1898
+ };
1899
+
1900
+
1901
+ /**
1902
+ * Clears the field making it undefined.
1903
+ * @return {!proto.cashback.SearchRequest} returns this
1904
+ */
1905
+ proto.cashback.SearchRequest.prototype.clearIsActive = function() {
1906
+ return jspb.Message.setField(this, 4, undefined);
1907
+ };
1908
+
1909
+
1910
+ /**
1911
+ * Returns whether this field is set.
1912
+ * @return {boolean}
1913
+ */
1914
+ proto.cashback.SearchRequest.prototype.hasIsActive = function() {
1915
+ return jspb.Message.getField(this, 4) != null;
1916
+ };
1917
+
1918
+
1919
+
1547
1920
  /**
1548
1921
  * List of repeated fields within this message type.
1549
1922
  * @private {!Array<number>}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protobuf-platform",
3
- "version": "1.1.58",
3
+ "version": "1.1.60",
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.