protobuf-platform 1.2.716 → 1.2.717

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.
@@ -32,6 +32,7 @@ goog.exportSymbol('proto.loyalty.DepositPointLevelLimitRequest', null, global);
32
32
  goog.exportSymbol('proto.loyalty.DepositPointLevelLimitResponse', null, global);
33
33
  goog.exportSymbol('proto.loyalty.DepositPointLimitSettingsResponse', null, global);
34
34
  goog.exportSymbol('proto.loyalty.DepositPointLimitStatusResponse', null, global);
35
+ goog.exportSymbol('proto.loyalty.ExternalStorePurchaseRequest', null, global);
35
36
  goog.exportSymbol('proto.loyalty.File', null, global);
36
37
  goog.exportSymbol('proto.loyalty.GetDepositPointLevelLimitRequest', null, global);
37
38
  goog.exportSymbol('proto.loyalty.GetDepositPointLimitSettingsRequest', null, global);
@@ -69,10 +70,207 @@ goog.exportSymbol('proto.loyalty.PongResponse', null, global);
69
70
  goog.exportSymbol('proto.loyalty.ReplaceLevelRewardsRequest', null, global);
70
71
  goog.exportSymbol('proto.loyalty.SetDepositPointLimitPeriodRequest', null, global);
71
72
  goog.exportSymbol('proto.loyalty.SignUpPoint', null, global);
73
+ goog.exportSymbol('proto.loyalty.StoreAvailableBalanceRequest', null, global);
74
+ goog.exportSymbol('proto.loyalty.StoreAvailableBalanceResponse', null, global);
75
+ goog.exportSymbol('proto.loyalty.StoreCatalogItem', null, global);
76
+ goog.exportSymbol('proto.loyalty.StoreCatalogRequest', null, global);
77
+ goog.exportSymbol('proto.loyalty.StoreCatalogResponse', null, global);
78
+ goog.exportSymbol('proto.loyalty.StorePrice', null, global);
79
+ goog.exportSymbol('proto.loyalty.StorePurchaseRequest', null, global);
80
+ goog.exportSymbol('proto.loyalty.StorePurchaseResponse', null, global);
72
81
  goog.exportSymbol('proto.loyalty.UserLoyaltyPoint', null, global);
73
82
  goog.exportSymbol('proto.loyalty.UserLoyaltyPointsResponse', null, global);
74
83
  goog.exportSymbol('proto.loyalty.UserLoyaltyResponse', null, global);
75
84
  goog.exportSymbol('proto.loyalty.WagerPoint', null, global);
85
+ /**
86
+ * Generated by JsPbCodeGenerator.
87
+ * @param {Array=} opt_data Optional initial data array, typically from a
88
+ * server response, or constructed directly in Javascript. The array is used
89
+ * in place and becomes part of the constructed object. It is not cloned.
90
+ * If no data is provided, the constructed object will be empty, but still
91
+ * valid.
92
+ * @extends {jspb.Message}
93
+ * @constructor
94
+ */
95
+ proto.loyalty.StoreCatalogRequest = function(opt_data) {
96
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
97
+ };
98
+ goog.inherits(proto.loyalty.StoreCatalogRequest, jspb.Message);
99
+ if (goog.DEBUG && !COMPILED) {
100
+ /**
101
+ * @public
102
+ * @override
103
+ */
104
+ proto.loyalty.StoreCatalogRequest.displayName = 'proto.loyalty.StoreCatalogRequest';
105
+ }
106
+ /**
107
+ * Generated by JsPbCodeGenerator.
108
+ * @param {Array=} opt_data Optional initial data array, typically from a
109
+ * server response, or constructed directly in Javascript. The array is used
110
+ * in place and becomes part of the constructed object. It is not cloned.
111
+ * If no data is provided, the constructed object will be empty, but still
112
+ * valid.
113
+ * @extends {jspb.Message}
114
+ * @constructor
115
+ */
116
+ proto.loyalty.StorePrice = function(opt_data) {
117
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
118
+ };
119
+ goog.inherits(proto.loyalty.StorePrice, jspb.Message);
120
+ if (goog.DEBUG && !COMPILED) {
121
+ /**
122
+ * @public
123
+ * @override
124
+ */
125
+ proto.loyalty.StorePrice.displayName = 'proto.loyalty.StorePrice';
126
+ }
127
+ /**
128
+ * Generated by JsPbCodeGenerator.
129
+ * @param {Array=} opt_data Optional initial data array, typically from a
130
+ * server response, or constructed directly in Javascript. The array is used
131
+ * in place and becomes part of the constructed object. It is not cloned.
132
+ * If no data is provided, the constructed object will be empty, but still
133
+ * valid.
134
+ * @extends {jspb.Message}
135
+ * @constructor
136
+ */
137
+ proto.loyalty.StoreCatalogItem = function(opt_data) {
138
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
139
+ };
140
+ goog.inherits(proto.loyalty.StoreCatalogItem, jspb.Message);
141
+ if (goog.DEBUG && !COMPILED) {
142
+ /**
143
+ * @public
144
+ * @override
145
+ */
146
+ proto.loyalty.StoreCatalogItem.displayName = 'proto.loyalty.StoreCatalogItem';
147
+ }
148
+ /**
149
+ * Generated by JsPbCodeGenerator.
150
+ * @param {Array=} opt_data Optional initial data array, typically from a
151
+ * server response, or constructed directly in Javascript. The array is used
152
+ * in place and becomes part of the constructed object. It is not cloned.
153
+ * If no data is provided, the constructed object will be empty, but still
154
+ * valid.
155
+ * @extends {jspb.Message}
156
+ * @constructor
157
+ */
158
+ proto.loyalty.StoreCatalogResponse = function(opt_data) {
159
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.loyalty.StoreCatalogResponse.repeatedFields_, null);
160
+ };
161
+ goog.inherits(proto.loyalty.StoreCatalogResponse, jspb.Message);
162
+ if (goog.DEBUG && !COMPILED) {
163
+ /**
164
+ * @public
165
+ * @override
166
+ */
167
+ proto.loyalty.StoreCatalogResponse.displayName = 'proto.loyalty.StoreCatalogResponse';
168
+ }
169
+ /**
170
+ * Generated by JsPbCodeGenerator.
171
+ * @param {Array=} opt_data Optional initial data array, typically from a
172
+ * server response, or constructed directly in Javascript. The array is used
173
+ * in place and becomes part of the constructed object. It is not cloned.
174
+ * If no data is provided, the constructed object will be empty, but still
175
+ * valid.
176
+ * @extends {jspb.Message}
177
+ * @constructor
178
+ */
179
+ proto.loyalty.StorePurchaseRequest = function(opt_data) {
180
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
181
+ };
182
+ goog.inherits(proto.loyalty.StorePurchaseRequest, jspb.Message);
183
+ if (goog.DEBUG && !COMPILED) {
184
+ /**
185
+ * @public
186
+ * @override
187
+ */
188
+ proto.loyalty.StorePurchaseRequest.displayName = 'proto.loyalty.StorePurchaseRequest';
189
+ }
190
+ /**
191
+ * Generated by JsPbCodeGenerator.
192
+ * @param {Array=} opt_data Optional initial data array, typically from a
193
+ * server response, or constructed directly in Javascript. The array is used
194
+ * in place and becomes part of the constructed object. It is not cloned.
195
+ * If no data is provided, the constructed object will be empty, but still
196
+ * valid.
197
+ * @extends {jspb.Message}
198
+ * @constructor
199
+ */
200
+ proto.loyalty.ExternalStorePurchaseRequest = function(opt_data) {
201
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
202
+ };
203
+ goog.inherits(proto.loyalty.ExternalStorePurchaseRequest, jspb.Message);
204
+ if (goog.DEBUG && !COMPILED) {
205
+ /**
206
+ * @public
207
+ * @override
208
+ */
209
+ proto.loyalty.ExternalStorePurchaseRequest.displayName = 'proto.loyalty.ExternalStorePurchaseRequest';
210
+ }
211
+ /**
212
+ * Generated by JsPbCodeGenerator.
213
+ * @param {Array=} opt_data Optional initial data array, typically from a
214
+ * server response, or constructed directly in Javascript. The array is used
215
+ * in place and becomes part of the constructed object. It is not cloned.
216
+ * If no data is provided, the constructed object will be empty, but still
217
+ * valid.
218
+ * @extends {jspb.Message}
219
+ * @constructor
220
+ */
221
+ proto.loyalty.StorePurchaseResponse = function(opt_data) {
222
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
223
+ };
224
+ goog.inherits(proto.loyalty.StorePurchaseResponse, jspb.Message);
225
+ if (goog.DEBUG && !COMPILED) {
226
+ /**
227
+ * @public
228
+ * @override
229
+ */
230
+ proto.loyalty.StorePurchaseResponse.displayName = 'proto.loyalty.StorePurchaseResponse';
231
+ }
232
+ /**
233
+ * Generated by JsPbCodeGenerator.
234
+ * @param {Array=} opt_data Optional initial data array, typically from a
235
+ * server response, or constructed directly in Javascript. The array is used
236
+ * in place and becomes part of the constructed object. It is not cloned.
237
+ * If no data is provided, the constructed object will be empty, but still
238
+ * valid.
239
+ * @extends {jspb.Message}
240
+ * @constructor
241
+ */
242
+ proto.loyalty.StoreAvailableBalanceRequest = function(opt_data) {
243
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
244
+ };
245
+ goog.inherits(proto.loyalty.StoreAvailableBalanceRequest, jspb.Message);
246
+ if (goog.DEBUG && !COMPILED) {
247
+ /**
248
+ * @public
249
+ * @override
250
+ */
251
+ proto.loyalty.StoreAvailableBalanceRequest.displayName = 'proto.loyalty.StoreAvailableBalanceRequest';
252
+ }
253
+ /**
254
+ * Generated by JsPbCodeGenerator.
255
+ * @param {Array=} opt_data Optional initial data array, typically from a
256
+ * server response, or constructed directly in Javascript. The array is used
257
+ * in place and becomes part of the constructed object. It is not cloned.
258
+ * If no data is provided, the constructed object will be empty, but still
259
+ * valid.
260
+ * @extends {jspb.Message}
261
+ * @constructor
262
+ */
263
+ proto.loyalty.StoreAvailableBalanceResponse = function(opt_data) {
264
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
265
+ };
266
+ goog.inherits(proto.loyalty.StoreAvailableBalanceResponse, jspb.Message);
267
+ if (goog.DEBUG && !COMPILED) {
268
+ /**
269
+ * @public
270
+ * @override
271
+ */
272
+ proto.loyalty.StoreAvailableBalanceResponse.displayName = 'proto.loyalty.StoreAvailableBalanceResponse';
273
+ }
76
274
  /**
77
275
  * Generated by JsPbCodeGenerator.
78
276
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -1147,6 +1345,2139 @@ if (goog.DEBUG && !COMPILED) {
1147
1345
 
1148
1346
 
1149
1347
 
1348
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1349
+ /**
1350
+ * Creates an object representation of this proto.
1351
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1352
+ * Optional fields that are not set will be set to undefined.
1353
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1354
+ * For the list of reserved names please see:
1355
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1356
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1357
+ * JSPB instance for transitional soy proto support:
1358
+ * http://goto/soy-param-migration
1359
+ * @return {!Object}
1360
+ */
1361
+ proto.loyalty.StoreCatalogRequest.prototype.toObject = function(opt_includeInstance) {
1362
+ return proto.loyalty.StoreCatalogRequest.toObject(opt_includeInstance, this);
1363
+ };
1364
+
1365
+
1366
+ /**
1367
+ * Static version of the {@see toObject} method.
1368
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1369
+ * the JSPB instance for transitional soy proto support:
1370
+ * http://goto/soy-param-migration
1371
+ * @param {!proto.loyalty.StoreCatalogRequest} msg The msg instance to transform.
1372
+ * @return {!Object}
1373
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1374
+ */
1375
+ proto.loyalty.StoreCatalogRequest.toObject = function(includeInstance, msg) {
1376
+ var f, obj = {
1377
+ userId: jspb.Message.getFieldWithDefault(msg, 1, 0),
1378
+ locale: jspb.Message.getFieldWithDefault(msg, 2, "")
1379
+ };
1380
+
1381
+ if (includeInstance) {
1382
+ obj.$jspbMessageInstance = msg;
1383
+ }
1384
+ return obj;
1385
+ };
1386
+ }
1387
+
1388
+
1389
+ /**
1390
+ * Deserializes binary data (in protobuf wire format).
1391
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1392
+ * @return {!proto.loyalty.StoreCatalogRequest}
1393
+ */
1394
+ proto.loyalty.StoreCatalogRequest.deserializeBinary = function(bytes) {
1395
+ var reader = new jspb.BinaryReader(bytes);
1396
+ var msg = new proto.loyalty.StoreCatalogRequest;
1397
+ return proto.loyalty.StoreCatalogRequest.deserializeBinaryFromReader(msg, reader);
1398
+ };
1399
+
1400
+
1401
+ /**
1402
+ * Deserializes binary data (in protobuf wire format) from the
1403
+ * given reader into the given message object.
1404
+ * @param {!proto.loyalty.StoreCatalogRequest} msg The message object to deserialize into.
1405
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1406
+ * @return {!proto.loyalty.StoreCatalogRequest}
1407
+ */
1408
+ proto.loyalty.StoreCatalogRequest.deserializeBinaryFromReader = function(msg, reader) {
1409
+ while (reader.nextField()) {
1410
+ if (reader.isEndGroup()) {
1411
+ break;
1412
+ }
1413
+ var field = reader.getFieldNumber();
1414
+ switch (field) {
1415
+ case 1:
1416
+ var value = /** @type {number} */ (reader.readInt32());
1417
+ msg.setUserId(value);
1418
+ break;
1419
+ case 2:
1420
+ var value = /** @type {string} */ (reader.readString());
1421
+ msg.setLocale(value);
1422
+ break;
1423
+ default:
1424
+ reader.skipField();
1425
+ break;
1426
+ }
1427
+ }
1428
+ return msg;
1429
+ };
1430
+
1431
+
1432
+ /**
1433
+ * Serializes the message to binary data (in protobuf wire format).
1434
+ * @return {!Uint8Array}
1435
+ */
1436
+ proto.loyalty.StoreCatalogRequest.prototype.serializeBinary = function() {
1437
+ var writer = new jspb.BinaryWriter();
1438
+ proto.loyalty.StoreCatalogRequest.serializeBinaryToWriter(this, writer);
1439
+ return writer.getResultBuffer();
1440
+ };
1441
+
1442
+
1443
+ /**
1444
+ * Serializes the given message to binary data (in protobuf wire
1445
+ * format), writing to the given BinaryWriter.
1446
+ * @param {!proto.loyalty.StoreCatalogRequest} message
1447
+ * @param {!jspb.BinaryWriter} writer
1448
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1449
+ */
1450
+ proto.loyalty.StoreCatalogRequest.serializeBinaryToWriter = function(message, writer) {
1451
+ var f = undefined;
1452
+ f = message.getUserId();
1453
+ if (f !== 0) {
1454
+ writer.writeInt32(
1455
+ 1,
1456
+ f
1457
+ );
1458
+ }
1459
+ f = message.getLocale();
1460
+ if (f.length > 0) {
1461
+ writer.writeString(
1462
+ 2,
1463
+ f
1464
+ );
1465
+ }
1466
+ };
1467
+
1468
+
1469
+ /**
1470
+ * optional int32 user_id = 1;
1471
+ * @return {number}
1472
+ */
1473
+ proto.loyalty.StoreCatalogRequest.prototype.getUserId = function() {
1474
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
1475
+ };
1476
+
1477
+
1478
+ /**
1479
+ * @param {number} value
1480
+ * @return {!proto.loyalty.StoreCatalogRequest} returns this
1481
+ */
1482
+ proto.loyalty.StoreCatalogRequest.prototype.setUserId = function(value) {
1483
+ return jspb.Message.setProto3IntField(this, 1, value);
1484
+ };
1485
+
1486
+
1487
+ /**
1488
+ * optional string locale = 2;
1489
+ * @return {string}
1490
+ */
1491
+ proto.loyalty.StoreCatalogRequest.prototype.getLocale = function() {
1492
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1493
+ };
1494
+
1495
+
1496
+ /**
1497
+ * @param {string} value
1498
+ * @return {!proto.loyalty.StoreCatalogRequest} returns this
1499
+ */
1500
+ proto.loyalty.StoreCatalogRequest.prototype.setLocale = function(value) {
1501
+ return jspb.Message.setProto3StringField(this, 2, value);
1502
+ };
1503
+
1504
+
1505
+
1506
+
1507
+
1508
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1509
+ /**
1510
+ * Creates an object representation of this proto.
1511
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1512
+ * Optional fields that are not set will be set to undefined.
1513
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1514
+ * For the list of reserved names please see:
1515
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1516
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1517
+ * JSPB instance for transitional soy proto support:
1518
+ * http://goto/soy-param-migration
1519
+ * @return {!Object}
1520
+ */
1521
+ proto.loyalty.StorePrice.prototype.toObject = function(opt_includeInstance) {
1522
+ return proto.loyalty.StorePrice.toObject(opt_includeInstance, this);
1523
+ };
1524
+
1525
+
1526
+ /**
1527
+ * Static version of the {@see toObject} method.
1528
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1529
+ * the JSPB instance for transitional soy proto support:
1530
+ * http://goto/soy-param-migration
1531
+ * @param {!proto.loyalty.StorePrice} msg The msg instance to transform.
1532
+ * @return {!Object}
1533
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1534
+ */
1535
+ proto.loyalty.StorePrice.toObject = function(includeInstance, msg) {
1536
+ var f, obj = {
1537
+ currency: jspb.Message.getFieldWithDefault(msg, 1, ""),
1538
+ amountMinor: jspb.Message.getFieldWithDefault(msg, 2, ""),
1539
+ currencyScale: jspb.Message.getFieldWithDefault(msg, 3, 0)
1540
+ };
1541
+
1542
+ if (includeInstance) {
1543
+ obj.$jspbMessageInstance = msg;
1544
+ }
1545
+ return obj;
1546
+ };
1547
+ }
1548
+
1549
+
1550
+ /**
1551
+ * Deserializes binary data (in protobuf wire format).
1552
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1553
+ * @return {!proto.loyalty.StorePrice}
1554
+ */
1555
+ proto.loyalty.StorePrice.deserializeBinary = function(bytes) {
1556
+ var reader = new jspb.BinaryReader(bytes);
1557
+ var msg = new proto.loyalty.StorePrice;
1558
+ return proto.loyalty.StorePrice.deserializeBinaryFromReader(msg, reader);
1559
+ };
1560
+
1561
+
1562
+ /**
1563
+ * Deserializes binary data (in protobuf wire format) from the
1564
+ * given reader into the given message object.
1565
+ * @param {!proto.loyalty.StorePrice} msg The message object to deserialize into.
1566
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1567
+ * @return {!proto.loyalty.StorePrice}
1568
+ */
1569
+ proto.loyalty.StorePrice.deserializeBinaryFromReader = function(msg, reader) {
1570
+ while (reader.nextField()) {
1571
+ if (reader.isEndGroup()) {
1572
+ break;
1573
+ }
1574
+ var field = reader.getFieldNumber();
1575
+ switch (field) {
1576
+ case 1:
1577
+ var value = /** @type {string} */ (reader.readString());
1578
+ msg.setCurrency(value);
1579
+ break;
1580
+ case 2:
1581
+ var value = /** @type {string} */ (reader.readString());
1582
+ msg.setAmountMinor(value);
1583
+ break;
1584
+ case 3:
1585
+ var value = /** @type {number} */ (reader.readInt32());
1586
+ msg.setCurrencyScale(value);
1587
+ break;
1588
+ default:
1589
+ reader.skipField();
1590
+ break;
1591
+ }
1592
+ }
1593
+ return msg;
1594
+ };
1595
+
1596
+
1597
+ /**
1598
+ * Serializes the message to binary data (in protobuf wire format).
1599
+ * @return {!Uint8Array}
1600
+ */
1601
+ proto.loyalty.StorePrice.prototype.serializeBinary = function() {
1602
+ var writer = new jspb.BinaryWriter();
1603
+ proto.loyalty.StorePrice.serializeBinaryToWriter(this, writer);
1604
+ return writer.getResultBuffer();
1605
+ };
1606
+
1607
+
1608
+ /**
1609
+ * Serializes the given message to binary data (in protobuf wire
1610
+ * format), writing to the given BinaryWriter.
1611
+ * @param {!proto.loyalty.StorePrice} message
1612
+ * @param {!jspb.BinaryWriter} writer
1613
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1614
+ */
1615
+ proto.loyalty.StorePrice.serializeBinaryToWriter = function(message, writer) {
1616
+ var f = undefined;
1617
+ f = message.getCurrency();
1618
+ if (f.length > 0) {
1619
+ writer.writeString(
1620
+ 1,
1621
+ f
1622
+ );
1623
+ }
1624
+ f = message.getAmountMinor();
1625
+ if (f.length > 0) {
1626
+ writer.writeString(
1627
+ 2,
1628
+ f
1629
+ );
1630
+ }
1631
+ f = message.getCurrencyScale();
1632
+ if (f !== 0) {
1633
+ writer.writeInt32(
1634
+ 3,
1635
+ f
1636
+ );
1637
+ }
1638
+ };
1639
+
1640
+
1641
+ /**
1642
+ * optional string currency = 1;
1643
+ * @return {string}
1644
+ */
1645
+ proto.loyalty.StorePrice.prototype.getCurrency = function() {
1646
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1647
+ };
1648
+
1649
+
1650
+ /**
1651
+ * @param {string} value
1652
+ * @return {!proto.loyalty.StorePrice} returns this
1653
+ */
1654
+ proto.loyalty.StorePrice.prototype.setCurrency = function(value) {
1655
+ return jspb.Message.setProto3StringField(this, 1, value);
1656
+ };
1657
+
1658
+
1659
+ /**
1660
+ * optional string amount_minor = 2;
1661
+ * @return {string}
1662
+ */
1663
+ proto.loyalty.StorePrice.prototype.getAmountMinor = function() {
1664
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1665
+ };
1666
+
1667
+
1668
+ /**
1669
+ * @param {string} value
1670
+ * @return {!proto.loyalty.StorePrice} returns this
1671
+ */
1672
+ proto.loyalty.StorePrice.prototype.setAmountMinor = function(value) {
1673
+ return jspb.Message.setProto3StringField(this, 2, value);
1674
+ };
1675
+
1676
+
1677
+ /**
1678
+ * optional int32 currency_scale = 3;
1679
+ * @return {number}
1680
+ */
1681
+ proto.loyalty.StorePrice.prototype.getCurrencyScale = function() {
1682
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
1683
+ };
1684
+
1685
+
1686
+ /**
1687
+ * @param {number} value
1688
+ * @return {!proto.loyalty.StorePrice} returns this
1689
+ */
1690
+ proto.loyalty.StorePrice.prototype.setCurrencyScale = function(value) {
1691
+ return jspb.Message.setProto3IntField(this, 3, value);
1692
+ };
1693
+
1694
+
1695
+
1696
+
1697
+
1698
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1699
+ /**
1700
+ * Creates an object representation of this proto.
1701
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1702
+ * Optional fields that are not set will be set to undefined.
1703
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1704
+ * For the list of reserved names please see:
1705
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1706
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1707
+ * JSPB instance for transitional soy proto support:
1708
+ * http://goto/soy-param-migration
1709
+ * @return {!Object}
1710
+ */
1711
+ proto.loyalty.StoreCatalogItem.prototype.toObject = function(opt_includeInstance) {
1712
+ return proto.loyalty.StoreCatalogItem.toObject(opt_includeInstance, this);
1713
+ };
1714
+
1715
+
1716
+ /**
1717
+ * Static version of the {@see toObject} method.
1718
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1719
+ * the JSPB instance for transitional soy proto support:
1720
+ * http://goto/soy-param-migration
1721
+ * @param {!proto.loyalty.StoreCatalogItem} msg The msg instance to transform.
1722
+ * @return {!Object}
1723
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1724
+ */
1725
+ proto.loyalty.StoreCatalogItem.toObject = function(includeInstance, msg) {
1726
+ var f, obj = {
1727
+ itemId: jspb.Message.getFieldWithDefault(msg, 1, ""),
1728
+ title: jspb.Message.getFieldWithDefault(msg, 2, ""),
1729
+ description: jspb.Message.getFieldWithDefault(msg, 3, ""),
1730
+ locale: jspb.Message.getFieldWithDefault(msg, 4, ""),
1731
+ price: (f = msg.getPrice()) && proto.loyalty.StorePrice.toObject(includeInstance, f)
1732
+ };
1733
+
1734
+ if (includeInstance) {
1735
+ obj.$jspbMessageInstance = msg;
1736
+ }
1737
+ return obj;
1738
+ };
1739
+ }
1740
+
1741
+
1742
+ /**
1743
+ * Deserializes binary data (in protobuf wire format).
1744
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1745
+ * @return {!proto.loyalty.StoreCatalogItem}
1746
+ */
1747
+ proto.loyalty.StoreCatalogItem.deserializeBinary = function(bytes) {
1748
+ var reader = new jspb.BinaryReader(bytes);
1749
+ var msg = new proto.loyalty.StoreCatalogItem;
1750
+ return proto.loyalty.StoreCatalogItem.deserializeBinaryFromReader(msg, reader);
1751
+ };
1752
+
1753
+
1754
+ /**
1755
+ * Deserializes binary data (in protobuf wire format) from the
1756
+ * given reader into the given message object.
1757
+ * @param {!proto.loyalty.StoreCatalogItem} msg The message object to deserialize into.
1758
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1759
+ * @return {!proto.loyalty.StoreCatalogItem}
1760
+ */
1761
+ proto.loyalty.StoreCatalogItem.deserializeBinaryFromReader = function(msg, reader) {
1762
+ while (reader.nextField()) {
1763
+ if (reader.isEndGroup()) {
1764
+ break;
1765
+ }
1766
+ var field = reader.getFieldNumber();
1767
+ switch (field) {
1768
+ case 1:
1769
+ var value = /** @type {string} */ (reader.readString());
1770
+ msg.setItemId(value);
1771
+ break;
1772
+ case 2:
1773
+ var value = /** @type {string} */ (reader.readString());
1774
+ msg.setTitle(value);
1775
+ break;
1776
+ case 3:
1777
+ var value = /** @type {string} */ (reader.readString());
1778
+ msg.setDescription(value);
1779
+ break;
1780
+ case 4:
1781
+ var value = /** @type {string} */ (reader.readString());
1782
+ msg.setLocale(value);
1783
+ break;
1784
+ case 5:
1785
+ var value = new proto.loyalty.StorePrice;
1786
+ reader.readMessage(value,proto.loyalty.StorePrice.deserializeBinaryFromReader);
1787
+ msg.setPrice(value);
1788
+ break;
1789
+ default:
1790
+ reader.skipField();
1791
+ break;
1792
+ }
1793
+ }
1794
+ return msg;
1795
+ };
1796
+
1797
+
1798
+ /**
1799
+ * Serializes the message to binary data (in protobuf wire format).
1800
+ * @return {!Uint8Array}
1801
+ */
1802
+ proto.loyalty.StoreCatalogItem.prototype.serializeBinary = function() {
1803
+ var writer = new jspb.BinaryWriter();
1804
+ proto.loyalty.StoreCatalogItem.serializeBinaryToWriter(this, writer);
1805
+ return writer.getResultBuffer();
1806
+ };
1807
+
1808
+
1809
+ /**
1810
+ * Serializes the given message to binary data (in protobuf wire
1811
+ * format), writing to the given BinaryWriter.
1812
+ * @param {!proto.loyalty.StoreCatalogItem} message
1813
+ * @param {!jspb.BinaryWriter} writer
1814
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1815
+ */
1816
+ proto.loyalty.StoreCatalogItem.serializeBinaryToWriter = function(message, writer) {
1817
+ var f = undefined;
1818
+ f = message.getItemId();
1819
+ if (f.length > 0) {
1820
+ writer.writeString(
1821
+ 1,
1822
+ f
1823
+ );
1824
+ }
1825
+ f = message.getTitle();
1826
+ if (f.length > 0) {
1827
+ writer.writeString(
1828
+ 2,
1829
+ f
1830
+ );
1831
+ }
1832
+ f = message.getDescription();
1833
+ if (f.length > 0) {
1834
+ writer.writeString(
1835
+ 3,
1836
+ f
1837
+ );
1838
+ }
1839
+ f = message.getLocale();
1840
+ if (f.length > 0) {
1841
+ writer.writeString(
1842
+ 4,
1843
+ f
1844
+ );
1845
+ }
1846
+ f = message.getPrice();
1847
+ if (f != null) {
1848
+ writer.writeMessage(
1849
+ 5,
1850
+ f,
1851
+ proto.loyalty.StorePrice.serializeBinaryToWriter
1852
+ );
1853
+ }
1854
+ };
1855
+
1856
+
1857
+ /**
1858
+ * optional string item_id = 1;
1859
+ * @return {string}
1860
+ */
1861
+ proto.loyalty.StoreCatalogItem.prototype.getItemId = function() {
1862
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1863
+ };
1864
+
1865
+
1866
+ /**
1867
+ * @param {string} value
1868
+ * @return {!proto.loyalty.StoreCatalogItem} returns this
1869
+ */
1870
+ proto.loyalty.StoreCatalogItem.prototype.setItemId = function(value) {
1871
+ return jspb.Message.setProto3StringField(this, 1, value);
1872
+ };
1873
+
1874
+
1875
+ /**
1876
+ * optional string title = 2;
1877
+ * @return {string}
1878
+ */
1879
+ proto.loyalty.StoreCatalogItem.prototype.getTitle = function() {
1880
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1881
+ };
1882
+
1883
+
1884
+ /**
1885
+ * @param {string} value
1886
+ * @return {!proto.loyalty.StoreCatalogItem} returns this
1887
+ */
1888
+ proto.loyalty.StoreCatalogItem.prototype.setTitle = function(value) {
1889
+ return jspb.Message.setProto3StringField(this, 2, value);
1890
+ };
1891
+
1892
+
1893
+ /**
1894
+ * optional string description = 3;
1895
+ * @return {string}
1896
+ */
1897
+ proto.loyalty.StoreCatalogItem.prototype.getDescription = function() {
1898
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1899
+ };
1900
+
1901
+
1902
+ /**
1903
+ * @param {string} value
1904
+ * @return {!proto.loyalty.StoreCatalogItem} returns this
1905
+ */
1906
+ proto.loyalty.StoreCatalogItem.prototype.setDescription = function(value) {
1907
+ return jspb.Message.setProto3StringField(this, 3, value);
1908
+ };
1909
+
1910
+
1911
+ /**
1912
+ * optional string locale = 4;
1913
+ * @return {string}
1914
+ */
1915
+ proto.loyalty.StoreCatalogItem.prototype.getLocale = function() {
1916
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
1917
+ };
1918
+
1919
+
1920
+ /**
1921
+ * @param {string} value
1922
+ * @return {!proto.loyalty.StoreCatalogItem} returns this
1923
+ */
1924
+ proto.loyalty.StoreCatalogItem.prototype.setLocale = function(value) {
1925
+ return jspb.Message.setProto3StringField(this, 4, value);
1926
+ };
1927
+
1928
+
1929
+ /**
1930
+ * optional StorePrice price = 5;
1931
+ * @return {?proto.loyalty.StorePrice}
1932
+ */
1933
+ proto.loyalty.StoreCatalogItem.prototype.getPrice = function() {
1934
+ return /** @type{?proto.loyalty.StorePrice} */ (
1935
+ jspb.Message.getWrapperField(this, proto.loyalty.StorePrice, 5));
1936
+ };
1937
+
1938
+
1939
+ /**
1940
+ * @param {?proto.loyalty.StorePrice|undefined} value
1941
+ * @return {!proto.loyalty.StoreCatalogItem} returns this
1942
+ */
1943
+ proto.loyalty.StoreCatalogItem.prototype.setPrice = function(value) {
1944
+ return jspb.Message.setWrapperField(this, 5, value);
1945
+ };
1946
+
1947
+
1948
+ /**
1949
+ * Clears the message field making it undefined.
1950
+ * @return {!proto.loyalty.StoreCatalogItem} returns this
1951
+ */
1952
+ proto.loyalty.StoreCatalogItem.prototype.clearPrice = function() {
1953
+ return this.setPrice(undefined);
1954
+ };
1955
+
1956
+
1957
+ /**
1958
+ * Returns whether this field is set.
1959
+ * @return {boolean}
1960
+ */
1961
+ proto.loyalty.StoreCatalogItem.prototype.hasPrice = function() {
1962
+ return jspb.Message.getField(this, 5) != null;
1963
+ };
1964
+
1965
+
1966
+
1967
+ /**
1968
+ * List of repeated fields within this message type.
1969
+ * @private {!Array<number>}
1970
+ * @const
1971
+ */
1972
+ proto.loyalty.StoreCatalogResponse.repeatedFields_ = [1];
1973
+
1974
+
1975
+
1976
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1977
+ /**
1978
+ * Creates an object representation of this proto.
1979
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1980
+ * Optional fields that are not set will be set to undefined.
1981
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1982
+ * For the list of reserved names please see:
1983
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1984
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1985
+ * JSPB instance for transitional soy proto support:
1986
+ * http://goto/soy-param-migration
1987
+ * @return {!Object}
1988
+ */
1989
+ proto.loyalty.StoreCatalogResponse.prototype.toObject = function(opt_includeInstance) {
1990
+ return proto.loyalty.StoreCatalogResponse.toObject(opt_includeInstance, this);
1991
+ };
1992
+
1993
+
1994
+ /**
1995
+ * Static version of the {@see toObject} method.
1996
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1997
+ * the JSPB instance for transitional soy proto support:
1998
+ * http://goto/soy-param-migration
1999
+ * @param {!proto.loyalty.StoreCatalogResponse} msg The msg instance to transform.
2000
+ * @return {!Object}
2001
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2002
+ */
2003
+ proto.loyalty.StoreCatalogResponse.toObject = function(includeInstance, msg) {
2004
+ var f, obj = {
2005
+ itemsList: jspb.Message.toObjectList(msg.getItemsList(),
2006
+ proto.loyalty.StoreCatalogItem.toObject, includeInstance)
2007
+ };
2008
+
2009
+ if (includeInstance) {
2010
+ obj.$jspbMessageInstance = msg;
2011
+ }
2012
+ return obj;
2013
+ };
2014
+ }
2015
+
2016
+
2017
+ /**
2018
+ * Deserializes binary data (in protobuf wire format).
2019
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2020
+ * @return {!proto.loyalty.StoreCatalogResponse}
2021
+ */
2022
+ proto.loyalty.StoreCatalogResponse.deserializeBinary = function(bytes) {
2023
+ var reader = new jspb.BinaryReader(bytes);
2024
+ var msg = new proto.loyalty.StoreCatalogResponse;
2025
+ return proto.loyalty.StoreCatalogResponse.deserializeBinaryFromReader(msg, reader);
2026
+ };
2027
+
2028
+
2029
+ /**
2030
+ * Deserializes binary data (in protobuf wire format) from the
2031
+ * given reader into the given message object.
2032
+ * @param {!proto.loyalty.StoreCatalogResponse} msg The message object to deserialize into.
2033
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2034
+ * @return {!proto.loyalty.StoreCatalogResponse}
2035
+ */
2036
+ proto.loyalty.StoreCatalogResponse.deserializeBinaryFromReader = function(msg, reader) {
2037
+ while (reader.nextField()) {
2038
+ if (reader.isEndGroup()) {
2039
+ break;
2040
+ }
2041
+ var field = reader.getFieldNumber();
2042
+ switch (field) {
2043
+ case 1:
2044
+ var value = new proto.loyalty.StoreCatalogItem;
2045
+ reader.readMessage(value,proto.loyalty.StoreCatalogItem.deserializeBinaryFromReader);
2046
+ msg.addItems(value);
2047
+ break;
2048
+ default:
2049
+ reader.skipField();
2050
+ break;
2051
+ }
2052
+ }
2053
+ return msg;
2054
+ };
2055
+
2056
+
2057
+ /**
2058
+ * Serializes the message to binary data (in protobuf wire format).
2059
+ * @return {!Uint8Array}
2060
+ */
2061
+ proto.loyalty.StoreCatalogResponse.prototype.serializeBinary = function() {
2062
+ var writer = new jspb.BinaryWriter();
2063
+ proto.loyalty.StoreCatalogResponse.serializeBinaryToWriter(this, writer);
2064
+ return writer.getResultBuffer();
2065
+ };
2066
+
2067
+
2068
+ /**
2069
+ * Serializes the given message to binary data (in protobuf wire
2070
+ * format), writing to the given BinaryWriter.
2071
+ * @param {!proto.loyalty.StoreCatalogResponse} message
2072
+ * @param {!jspb.BinaryWriter} writer
2073
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2074
+ */
2075
+ proto.loyalty.StoreCatalogResponse.serializeBinaryToWriter = function(message, writer) {
2076
+ var f = undefined;
2077
+ f = message.getItemsList();
2078
+ if (f.length > 0) {
2079
+ writer.writeRepeatedMessage(
2080
+ 1,
2081
+ f,
2082
+ proto.loyalty.StoreCatalogItem.serializeBinaryToWriter
2083
+ );
2084
+ }
2085
+ };
2086
+
2087
+
2088
+ /**
2089
+ * repeated StoreCatalogItem items = 1;
2090
+ * @return {!Array<!proto.loyalty.StoreCatalogItem>}
2091
+ */
2092
+ proto.loyalty.StoreCatalogResponse.prototype.getItemsList = function() {
2093
+ return /** @type{!Array<!proto.loyalty.StoreCatalogItem>} */ (
2094
+ jspb.Message.getRepeatedWrapperField(this, proto.loyalty.StoreCatalogItem, 1));
2095
+ };
2096
+
2097
+
2098
+ /**
2099
+ * @param {!Array<!proto.loyalty.StoreCatalogItem>} value
2100
+ * @return {!proto.loyalty.StoreCatalogResponse} returns this
2101
+ */
2102
+ proto.loyalty.StoreCatalogResponse.prototype.setItemsList = function(value) {
2103
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
2104
+ };
2105
+
2106
+
2107
+ /**
2108
+ * @param {!proto.loyalty.StoreCatalogItem=} opt_value
2109
+ * @param {number=} opt_index
2110
+ * @return {!proto.loyalty.StoreCatalogItem}
2111
+ */
2112
+ proto.loyalty.StoreCatalogResponse.prototype.addItems = function(opt_value, opt_index) {
2113
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.loyalty.StoreCatalogItem, opt_index);
2114
+ };
2115
+
2116
+
2117
+ /**
2118
+ * Clears the list making it empty but non-null.
2119
+ * @return {!proto.loyalty.StoreCatalogResponse} returns this
2120
+ */
2121
+ proto.loyalty.StoreCatalogResponse.prototype.clearItemsList = function() {
2122
+ return this.setItemsList([]);
2123
+ };
2124
+
2125
+
2126
+
2127
+
2128
+
2129
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2130
+ /**
2131
+ * Creates an object representation of this proto.
2132
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2133
+ * Optional fields that are not set will be set to undefined.
2134
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2135
+ * For the list of reserved names please see:
2136
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2137
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2138
+ * JSPB instance for transitional soy proto support:
2139
+ * http://goto/soy-param-migration
2140
+ * @return {!Object}
2141
+ */
2142
+ proto.loyalty.StorePurchaseRequest.prototype.toObject = function(opt_includeInstance) {
2143
+ return proto.loyalty.StorePurchaseRequest.toObject(opt_includeInstance, this);
2144
+ };
2145
+
2146
+
2147
+ /**
2148
+ * Static version of the {@see toObject} method.
2149
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2150
+ * the JSPB instance for transitional soy proto support:
2151
+ * http://goto/soy-param-migration
2152
+ * @param {!proto.loyalty.StorePurchaseRequest} msg The msg instance to transform.
2153
+ * @return {!Object}
2154
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2155
+ */
2156
+ proto.loyalty.StorePurchaseRequest.toObject = function(includeInstance, msg) {
2157
+ var f, obj = {
2158
+ userId: jspb.Message.getFieldWithDefault(msg, 1, 0),
2159
+ identity: jspb.Message.getFieldWithDefault(msg, 2, ""),
2160
+ itemId: jspb.Message.getFieldWithDefault(msg, 3, ""),
2161
+ currency: jspb.Message.getFieldWithDefault(msg, 4, ""),
2162
+ expectedAmountMinor: jspb.Message.getFieldWithDefault(msg, 5, "")
2163
+ };
2164
+
2165
+ if (includeInstance) {
2166
+ obj.$jspbMessageInstance = msg;
2167
+ }
2168
+ return obj;
2169
+ };
2170
+ }
2171
+
2172
+
2173
+ /**
2174
+ * Deserializes binary data (in protobuf wire format).
2175
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2176
+ * @return {!proto.loyalty.StorePurchaseRequest}
2177
+ */
2178
+ proto.loyalty.StorePurchaseRequest.deserializeBinary = function(bytes) {
2179
+ var reader = new jspb.BinaryReader(bytes);
2180
+ var msg = new proto.loyalty.StorePurchaseRequest;
2181
+ return proto.loyalty.StorePurchaseRequest.deserializeBinaryFromReader(msg, reader);
2182
+ };
2183
+
2184
+
2185
+ /**
2186
+ * Deserializes binary data (in protobuf wire format) from the
2187
+ * given reader into the given message object.
2188
+ * @param {!proto.loyalty.StorePurchaseRequest} msg The message object to deserialize into.
2189
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2190
+ * @return {!proto.loyalty.StorePurchaseRequest}
2191
+ */
2192
+ proto.loyalty.StorePurchaseRequest.deserializeBinaryFromReader = function(msg, reader) {
2193
+ while (reader.nextField()) {
2194
+ if (reader.isEndGroup()) {
2195
+ break;
2196
+ }
2197
+ var field = reader.getFieldNumber();
2198
+ switch (field) {
2199
+ case 1:
2200
+ var value = /** @type {number} */ (reader.readInt32());
2201
+ msg.setUserId(value);
2202
+ break;
2203
+ case 2:
2204
+ var value = /** @type {string} */ (reader.readString());
2205
+ msg.setIdentity(value);
2206
+ break;
2207
+ case 3:
2208
+ var value = /** @type {string} */ (reader.readString());
2209
+ msg.setItemId(value);
2210
+ break;
2211
+ case 4:
2212
+ var value = /** @type {string} */ (reader.readString());
2213
+ msg.setCurrency(value);
2214
+ break;
2215
+ case 5:
2216
+ var value = /** @type {string} */ (reader.readString());
2217
+ msg.setExpectedAmountMinor(value);
2218
+ break;
2219
+ default:
2220
+ reader.skipField();
2221
+ break;
2222
+ }
2223
+ }
2224
+ return msg;
2225
+ };
2226
+
2227
+
2228
+ /**
2229
+ * Serializes the message to binary data (in protobuf wire format).
2230
+ * @return {!Uint8Array}
2231
+ */
2232
+ proto.loyalty.StorePurchaseRequest.prototype.serializeBinary = function() {
2233
+ var writer = new jspb.BinaryWriter();
2234
+ proto.loyalty.StorePurchaseRequest.serializeBinaryToWriter(this, writer);
2235
+ return writer.getResultBuffer();
2236
+ };
2237
+
2238
+
2239
+ /**
2240
+ * Serializes the given message to binary data (in protobuf wire
2241
+ * format), writing to the given BinaryWriter.
2242
+ * @param {!proto.loyalty.StorePurchaseRequest} message
2243
+ * @param {!jspb.BinaryWriter} writer
2244
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2245
+ */
2246
+ proto.loyalty.StorePurchaseRequest.serializeBinaryToWriter = function(message, writer) {
2247
+ var f = undefined;
2248
+ f = message.getUserId();
2249
+ if (f !== 0) {
2250
+ writer.writeInt32(
2251
+ 1,
2252
+ f
2253
+ );
2254
+ }
2255
+ f = message.getIdentity();
2256
+ if (f.length > 0) {
2257
+ writer.writeString(
2258
+ 2,
2259
+ f
2260
+ );
2261
+ }
2262
+ f = message.getItemId();
2263
+ if (f.length > 0) {
2264
+ writer.writeString(
2265
+ 3,
2266
+ f
2267
+ );
2268
+ }
2269
+ f = message.getCurrency();
2270
+ if (f.length > 0) {
2271
+ writer.writeString(
2272
+ 4,
2273
+ f
2274
+ );
2275
+ }
2276
+ f = message.getExpectedAmountMinor();
2277
+ if (f.length > 0) {
2278
+ writer.writeString(
2279
+ 5,
2280
+ f
2281
+ );
2282
+ }
2283
+ };
2284
+
2285
+
2286
+ /**
2287
+ * optional int32 user_id = 1;
2288
+ * @return {number}
2289
+ */
2290
+ proto.loyalty.StorePurchaseRequest.prototype.getUserId = function() {
2291
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
2292
+ };
2293
+
2294
+
2295
+ /**
2296
+ * @param {number} value
2297
+ * @return {!proto.loyalty.StorePurchaseRequest} returns this
2298
+ */
2299
+ proto.loyalty.StorePurchaseRequest.prototype.setUserId = function(value) {
2300
+ return jspb.Message.setProto3IntField(this, 1, value);
2301
+ };
2302
+
2303
+
2304
+ /**
2305
+ * optional string identity = 2;
2306
+ * @return {string}
2307
+ */
2308
+ proto.loyalty.StorePurchaseRequest.prototype.getIdentity = function() {
2309
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
2310
+ };
2311
+
2312
+
2313
+ /**
2314
+ * @param {string} value
2315
+ * @return {!proto.loyalty.StorePurchaseRequest} returns this
2316
+ */
2317
+ proto.loyalty.StorePurchaseRequest.prototype.setIdentity = function(value) {
2318
+ return jspb.Message.setProto3StringField(this, 2, value);
2319
+ };
2320
+
2321
+
2322
+ /**
2323
+ * optional string item_id = 3;
2324
+ * @return {string}
2325
+ */
2326
+ proto.loyalty.StorePurchaseRequest.prototype.getItemId = function() {
2327
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
2328
+ };
2329
+
2330
+
2331
+ /**
2332
+ * @param {string} value
2333
+ * @return {!proto.loyalty.StorePurchaseRequest} returns this
2334
+ */
2335
+ proto.loyalty.StorePurchaseRequest.prototype.setItemId = function(value) {
2336
+ return jspb.Message.setProto3StringField(this, 3, value);
2337
+ };
2338
+
2339
+
2340
+ /**
2341
+ * optional string currency = 4;
2342
+ * @return {string}
2343
+ */
2344
+ proto.loyalty.StorePurchaseRequest.prototype.getCurrency = function() {
2345
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
2346
+ };
2347
+
2348
+
2349
+ /**
2350
+ * @param {string} value
2351
+ * @return {!proto.loyalty.StorePurchaseRequest} returns this
2352
+ */
2353
+ proto.loyalty.StorePurchaseRequest.prototype.setCurrency = function(value) {
2354
+ return jspb.Message.setProto3StringField(this, 4, value);
2355
+ };
2356
+
2357
+
2358
+ /**
2359
+ * optional string expected_amount_minor = 5;
2360
+ * @return {string}
2361
+ */
2362
+ proto.loyalty.StorePurchaseRequest.prototype.getExpectedAmountMinor = function() {
2363
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
2364
+ };
2365
+
2366
+
2367
+ /**
2368
+ * @param {string} value
2369
+ * @return {!proto.loyalty.StorePurchaseRequest} returns this
2370
+ */
2371
+ proto.loyalty.StorePurchaseRequest.prototype.setExpectedAmountMinor = function(value) {
2372
+ return jspb.Message.setProto3StringField(this, 5, value);
2373
+ };
2374
+
2375
+
2376
+
2377
+
2378
+
2379
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2380
+ /**
2381
+ * Creates an object representation of this proto.
2382
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2383
+ * Optional fields that are not set will be set to undefined.
2384
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2385
+ * For the list of reserved names please see:
2386
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2387
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2388
+ * JSPB instance for transitional soy proto support:
2389
+ * http://goto/soy-param-migration
2390
+ * @return {!Object}
2391
+ */
2392
+ proto.loyalty.ExternalStorePurchaseRequest.prototype.toObject = function(opt_includeInstance) {
2393
+ return proto.loyalty.ExternalStorePurchaseRequest.toObject(opt_includeInstance, this);
2394
+ };
2395
+
2396
+
2397
+ /**
2398
+ * Static version of the {@see toObject} method.
2399
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2400
+ * the JSPB instance for transitional soy proto support:
2401
+ * http://goto/soy-param-migration
2402
+ * @param {!proto.loyalty.ExternalStorePurchaseRequest} msg The msg instance to transform.
2403
+ * @return {!Object}
2404
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2405
+ */
2406
+ proto.loyalty.ExternalStorePurchaseRequest.toObject = function(includeInstance, msg) {
2407
+ var f, obj = {
2408
+ userPublicId: jspb.Message.getFieldWithDefault(msg, 1, ""),
2409
+ source: jspb.Message.getFieldWithDefault(msg, 2, ""),
2410
+ externalReference: jspb.Message.getFieldWithDefault(msg, 3, ""),
2411
+ currency: jspb.Message.getFieldWithDefault(msg, 4, ""),
2412
+ amountMinor: jspb.Message.getFieldWithDefault(msg, 5, ""),
2413
+ itemReference: jspb.Message.getFieldWithDefault(msg, 6, "")
2414
+ };
2415
+
2416
+ if (includeInstance) {
2417
+ obj.$jspbMessageInstance = msg;
2418
+ }
2419
+ return obj;
2420
+ };
2421
+ }
2422
+
2423
+
2424
+ /**
2425
+ * Deserializes binary data (in protobuf wire format).
2426
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2427
+ * @return {!proto.loyalty.ExternalStorePurchaseRequest}
2428
+ */
2429
+ proto.loyalty.ExternalStorePurchaseRequest.deserializeBinary = function(bytes) {
2430
+ var reader = new jspb.BinaryReader(bytes);
2431
+ var msg = new proto.loyalty.ExternalStorePurchaseRequest;
2432
+ return proto.loyalty.ExternalStorePurchaseRequest.deserializeBinaryFromReader(msg, reader);
2433
+ };
2434
+
2435
+
2436
+ /**
2437
+ * Deserializes binary data (in protobuf wire format) from the
2438
+ * given reader into the given message object.
2439
+ * @param {!proto.loyalty.ExternalStorePurchaseRequest} msg The message object to deserialize into.
2440
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2441
+ * @return {!proto.loyalty.ExternalStorePurchaseRequest}
2442
+ */
2443
+ proto.loyalty.ExternalStorePurchaseRequest.deserializeBinaryFromReader = function(msg, reader) {
2444
+ while (reader.nextField()) {
2445
+ if (reader.isEndGroup()) {
2446
+ break;
2447
+ }
2448
+ var field = reader.getFieldNumber();
2449
+ switch (field) {
2450
+ case 1:
2451
+ var value = /** @type {string} */ (reader.readString());
2452
+ msg.setUserPublicId(value);
2453
+ break;
2454
+ case 2:
2455
+ var value = /** @type {string} */ (reader.readString());
2456
+ msg.setSource(value);
2457
+ break;
2458
+ case 3:
2459
+ var value = /** @type {string} */ (reader.readString());
2460
+ msg.setExternalReference(value);
2461
+ break;
2462
+ case 4:
2463
+ var value = /** @type {string} */ (reader.readString());
2464
+ msg.setCurrency(value);
2465
+ break;
2466
+ case 5:
2467
+ var value = /** @type {string} */ (reader.readString());
2468
+ msg.setAmountMinor(value);
2469
+ break;
2470
+ case 6:
2471
+ var value = /** @type {string} */ (reader.readString());
2472
+ msg.setItemReference(value);
2473
+ break;
2474
+ default:
2475
+ reader.skipField();
2476
+ break;
2477
+ }
2478
+ }
2479
+ return msg;
2480
+ };
2481
+
2482
+
2483
+ /**
2484
+ * Serializes the message to binary data (in protobuf wire format).
2485
+ * @return {!Uint8Array}
2486
+ */
2487
+ proto.loyalty.ExternalStorePurchaseRequest.prototype.serializeBinary = function() {
2488
+ var writer = new jspb.BinaryWriter();
2489
+ proto.loyalty.ExternalStorePurchaseRequest.serializeBinaryToWriter(this, writer);
2490
+ return writer.getResultBuffer();
2491
+ };
2492
+
2493
+
2494
+ /**
2495
+ * Serializes the given message to binary data (in protobuf wire
2496
+ * format), writing to the given BinaryWriter.
2497
+ * @param {!proto.loyalty.ExternalStorePurchaseRequest} message
2498
+ * @param {!jspb.BinaryWriter} writer
2499
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2500
+ */
2501
+ proto.loyalty.ExternalStorePurchaseRequest.serializeBinaryToWriter = function(message, writer) {
2502
+ var f = undefined;
2503
+ f = message.getUserPublicId();
2504
+ if (f.length > 0) {
2505
+ writer.writeString(
2506
+ 1,
2507
+ f
2508
+ );
2509
+ }
2510
+ f = message.getSource();
2511
+ if (f.length > 0) {
2512
+ writer.writeString(
2513
+ 2,
2514
+ f
2515
+ );
2516
+ }
2517
+ f = message.getExternalReference();
2518
+ if (f.length > 0) {
2519
+ writer.writeString(
2520
+ 3,
2521
+ f
2522
+ );
2523
+ }
2524
+ f = message.getCurrency();
2525
+ if (f.length > 0) {
2526
+ writer.writeString(
2527
+ 4,
2528
+ f
2529
+ );
2530
+ }
2531
+ f = message.getAmountMinor();
2532
+ if (f.length > 0) {
2533
+ writer.writeString(
2534
+ 5,
2535
+ f
2536
+ );
2537
+ }
2538
+ f = /** @type {string} */ (jspb.Message.getField(message, 6));
2539
+ if (f != null) {
2540
+ writer.writeString(
2541
+ 6,
2542
+ f
2543
+ );
2544
+ }
2545
+ };
2546
+
2547
+
2548
+ /**
2549
+ * optional string user_public_id = 1;
2550
+ * @return {string}
2551
+ */
2552
+ proto.loyalty.ExternalStorePurchaseRequest.prototype.getUserPublicId = function() {
2553
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2554
+ };
2555
+
2556
+
2557
+ /**
2558
+ * @param {string} value
2559
+ * @return {!proto.loyalty.ExternalStorePurchaseRequest} returns this
2560
+ */
2561
+ proto.loyalty.ExternalStorePurchaseRequest.prototype.setUserPublicId = function(value) {
2562
+ return jspb.Message.setProto3StringField(this, 1, value);
2563
+ };
2564
+
2565
+
2566
+ /**
2567
+ * optional string source = 2;
2568
+ * @return {string}
2569
+ */
2570
+ proto.loyalty.ExternalStorePurchaseRequest.prototype.getSource = function() {
2571
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
2572
+ };
2573
+
2574
+
2575
+ /**
2576
+ * @param {string} value
2577
+ * @return {!proto.loyalty.ExternalStorePurchaseRequest} returns this
2578
+ */
2579
+ proto.loyalty.ExternalStorePurchaseRequest.prototype.setSource = function(value) {
2580
+ return jspb.Message.setProto3StringField(this, 2, value);
2581
+ };
2582
+
2583
+
2584
+ /**
2585
+ * optional string external_reference = 3;
2586
+ * @return {string}
2587
+ */
2588
+ proto.loyalty.ExternalStorePurchaseRequest.prototype.getExternalReference = function() {
2589
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
2590
+ };
2591
+
2592
+
2593
+ /**
2594
+ * @param {string} value
2595
+ * @return {!proto.loyalty.ExternalStorePurchaseRequest} returns this
2596
+ */
2597
+ proto.loyalty.ExternalStorePurchaseRequest.prototype.setExternalReference = function(value) {
2598
+ return jspb.Message.setProto3StringField(this, 3, value);
2599
+ };
2600
+
2601
+
2602
+ /**
2603
+ * optional string currency = 4;
2604
+ * @return {string}
2605
+ */
2606
+ proto.loyalty.ExternalStorePurchaseRequest.prototype.getCurrency = function() {
2607
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
2608
+ };
2609
+
2610
+
2611
+ /**
2612
+ * @param {string} value
2613
+ * @return {!proto.loyalty.ExternalStorePurchaseRequest} returns this
2614
+ */
2615
+ proto.loyalty.ExternalStorePurchaseRequest.prototype.setCurrency = function(value) {
2616
+ return jspb.Message.setProto3StringField(this, 4, value);
2617
+ };
2618
+
2619
+
2620
+ /**
2621
+ * optional string amount_minor = 5;
2622
+ * @return {string}
2623
+ */
2624
+ proto.loyalty.ExternalStorePurchaseRequest.prototype.getAmountMinor = function() {
2625
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
2626
+ };
2627
+
2628
+
2629
+ /**
2630
+ * @param {string} value
2631
+ * @return {!proto.loyalty.ExternalStorePurchaseRequest} returns this
2632
+ */
2633
+ proto.loyalty.ExternalStorePurchaseRequest.prototype.setAmountMinor = function(value) {
2634
+ return jspb.Message.setProto3StringField(this, 5, value);
2635
+ };
2636
+
2637
+
2638
+ /**
2639
+ * optional string item_reference = 6;
2640
+ * @return {string}
2641
+ */
2642
+ proto.loyalty.ExternalStorePurchaseRequest.prototype.getItemReference = function() {
2643
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
2644
+ };
2645
+
2646
+
2647
+ /**
2648
+ * @param {string} value
2649
+ * @return {!proto.loyalty.ExternalStorePurchaseRequest} returns this
2650
+ */
2651
+ proto.loyalty.ExternalStorePurchaseRequest.prototype.setItemReference = function(value) {
2652
+ return jspb.Message.setField(this, 6, value);
2653
+ };
2654
+
2655
+
2656
+ /**
2657
+ * Clears the field making it undefined.
2658
+ * @return {!proto.loyalty.ExternalStorePurchaseRequest} returns this
2659
+ */
2660
+ proto.loyalty.ExternalStorePurchaseRequest.prototype.clearItemReference = function() {
2661
+ return jspb.Message.setField(this, 6, undefined);
2662
+ };
2663
+
2664
+
2665
+ /**
2666
+ * Returns whether this field is set.
2667
+ * @return {boolean}
2668
+ */
2669
+ proto.loyalty.ExternalStorePurchaseRequest.prototype.hasItemReference = function() {
2670
+ return jspb.Message.getField(this, 6) != null;
2671
+ };
2672
+
2673
+
2674
+
2675
+
2676
+
2677
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2678
+ /**
2679
+ * Creates an object representation of this proto.
2680
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2681
+ * Optional fields that are not set will be set to undefined.
2682
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2683
+ * For the list of reserved names please see:
2684
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2685
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2686
+ * JSPB instance for transitional soy proto support:
2687
+ * http://goto/soy-param-migration
2688
+ * @return {!Object}
2689
+ */
2690
+ proto.loyalty.StorePurchaseResponse.prototype.toObject = function(opt_includeInstance) {
2691
+ return proto.loyalty.StorePurchaseResponse.toObject(opt_includeInstance, this);
2692
+ };
2693
+
2694
+
2695
+ /**
2696
+ * Static version of the {@see toObject} method.
2697
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2698
+ * the JSPB instance for transitional soy proto support:
2699
+ * http://goto/soy-param-migration
2700
+ * @param {!proto.loyalty.StorePurchaseResponse} msg The msg instance to transform.
2701
+ * @return {!Object}
2702
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2703
+ */
2704
+ proto.loyalty.StorePurchaseResponse.toObject = function(includeInstance, msg) {
2705
+ var f, obj = {
2706
+ purchaseId: jspb.Message.getFieldWithDefault(msg, 1, ""),
2707
+ status: jspb.Message.getFieldWithDefault(msg, 2, ""),
2708
+ currency: jspb.Message.getFieldWithDefault(msg, 3, ""),
2709
+ amountMinor: jspb.Message.getFieldWithDefault(msg, 4, ""),
2710
+ currencyScale: jspb.Message.getFieldWithDefault(msg, 5, 0),
2711
+ replay: jspb.Message.getBooleanFieldWithDefault(msg, 6, false),
2712
+ availableMinor: jspb.Message.getFieldWithDefault(msg, 7, ""),
2713
+ remainderNumerator: jspb.Message.getFieldWithDefault(msg, 8, ""),
2714
+ remainderDenominator: jspb.Message.getFieldWithDefault(msg, 9, "")
2715
+ };
2716
+
2717
+ if (includeInstance) {
2718
+ obj.$jspbMessageInstance = msg;
2719
+ }
2720
+ return obj;
2721
+ };
2722
+ }
2723
+
2724
+
2725
+ /**
2726
+ * Deserializes binary data (in protobuf wire format).
2727
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2728
+ * @return {!proto.loyalty.StorePurchaseResponse}
2729
+ */
2730
+ proto.loyalty.StorePurchaseResponse.deserializeBinary = function(bytes) {
2731
+ var reader = new jspb.BinaryReader(bytes);
2732
+ var msg = new proto.loyalty.StorePurchaseResponse;
2733
+ return proto.loyalty.StorePurchaseResponse.deserializeBinaryFromReader(msg, reader);
2734
+ };
2735
+
2736
+
2737
+ /**
2738
+ * Deserializes binary data (in protobuf wire format) from the
2739
+ * given reader into the given message object.
2740
+ * @param {!proto.loyalty.StorePurchaseResponse} msg The message object to deserialize into.
2741
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2742
+ * @return {!proto.loyalty.StorePurchaseResponse}
2743
+ */
2744
+ proto.loyalty.StorePurchaseResponse.deserializeBinaryFromReader = function(msg, reader) {
2745
+ while (reader.nextField()) {
2746
+ if (reader.isEndGroup()) {
2747
+ break;
2748
+ }
2749
+ var field = reader.getFieldNumber();
2750
+ switch (field) {
2751
+ case 1:
2752
+ var value = /** @type {string} */ (reader.readString());
2753
+ msg.setPurchaseId(value);
2754
+ break;
2755
+ case 2:
2756
+ var value = /** @type {string} */ (reader.readString());
2757
+ msg.setStatus(value);
2758
+ break;
2759
+ case 3:
2760
+ var value = /** @type {string} */ (reader.readString());
2761
+ msg.setCurrency(value);
2762
+ break;
2763
+ case 4:
2764
+ var value = /** @type {string} */ (reader.readString());
2765
+ msg.setAmountMinor(value);
2766
+ break;
2767
+ case 5:
2768
+ var value = /** @type {number} */ (reader.readInt32());
2769
+ msg.setCurrencyScale(value);
2770
+ break;
2771
+ case 6:
2772
+ var value = /** @type {boolean} */ (reader.readBool());
2773
+ msg.setReplay(value);
2774
+ break;
2775
+ case 7:
2776
+ var value = /** @type {string} */ (reader.readString());
2777
+ msg.setAvailableMinor(value);
2778
+ break;
2779
+ case 8:
2780
+ var value = /** @type {string} */ (reader.readString());
2781
+ msg.setRemainderNumerator(value);
2782
+ break;
2783
+ case 9:
2784
+ var value = /** @type {string} */ (reader.readString());
2785
+ msg.setRemainderDenominator(value);
2786
+ break;
2787
+ default:
2788
+ reader.skipField();
2789
+ break;
2790
+ }
2791
+ }
2792
+ return msg;
2793
+ };
2794
+
2795
+
2796
+ /**
2797
+ * Serializes the message to binary data (in protobuf wire format).
2798
+ * @return {!Uint8Array}
2799
+ */
2800
+ proto.loyalty.StorePurchaseResponse.prototype.serializeBinary = function() {
2801
+ var writer = new jspb.BinaryWriter();
2802
+ proto.loyalty.StorePurchaseResponse.serializeBinaryToWriter(this, writer);
2803
+ return writer.getResultBuffer();
2804
+ };
2805
+
2806
+
2807
+ /**
2808
+ * Serializes the given message to binary data (in protobuf wire
2809
+ * format), writing to the given BinaryWriter.
2810
+ * @param {!proto.loyalty.StorePurchaseResponse} message
2811
+ * @param {!jspb.BinaryWriter} writer
2812
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2813
+ */
2814
+ proto.loyalty.StorePurchaseResponse.serializeBinaryToWriter = function(message, writer) {
2815
+ var f = undefined;
2816
+ f = message.getPurchaseId();
2817
+ if (f.length > 0) {
2818
+ writer.writeString(
2819
+ 1,
2820
+ f
2821
+ );
2822
+ }
2823
+ f = message.getStatus();
2824
+ if (f.length > 0) {
2825
+ writer.writeString(
2826
+ 2,
2827
+ f
2828
+ );
2829
+ }
2830
+ f = message.getCurrency();
2831
+ if (f.length > 0) {
2832
+ writer.writeString(
2833
+ 3,
2834
+ f
2835
+ );
2836
+ }
2837
+ f = message.getAmountMinor();
2838
+ if (f.length > 0) {
2839
+ writer.writeString(
2840
+ 4,
2841
+ f
2842
+ );
2843
+ }
2844
+ f = message.getCurrencyScale();
2845
+ if (f !== 0) {
2846
+ writer.writeInt32(
2847
+ 5,
2848
+ f
2849
+ );
2850
+ }
2851
+ f = message.getReplay();
2852
+ if (f) {
2853
+ writer.writeBool(
2854
+ 6,
2855
+ f
2856
+ );
2857
+ }
2858
+ f = /** @type {string} */ (jspb.Message.getField(message, 7));
2859
+ if (f != null) {
2860
+ writer.writeString(
2861
+ 7,
2862
+ f
2863
+ );
2864
+ }
2865
+ f = /** @type {string} */ (jspb.Message.getField(message, 8));
2866
+ if (f != null) {
2867
+ writer.writeString(
2868
+ 8,
2869
+ f
2870
+ );
2871
+ }
2872
+ f = /** @type {string} */ (jspb.Message.getField(message, 9));
2873
+ if (f != null) {
2874
+ writer.writeString(
2875
+ 9,
2876
+ f
2877
+ );
2878
+ }
2879
+ };
2880
+
2881
+
2882
+ /**
2883
+ * optional string purchase_id = 1;
2884
+ * @return {string}
2885
+ */
2886
+ proto.loyalty.StorePurchaseResponse.prototype.getPurchaseId = function() {
2887
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2888
+ };
2889
+
2890
+
2891
+ /**
2892
+ * @param {string} value
2893
+ * @return {!proto.loyalty.StorePurchaseResponse} returns this
2894
+ */
2895
+ proto.loyalty.StorePurchaseResponse.prototype.setPurchaseId = function(value) {
2896
+ return jspb.Message.setProto3StringField(this, 1, value);
2897
+ };
2898
+
2899
+
2900
+ /**
2901
+ * optional string status = 2;
2902
+ * @return {string}
2903
+ */
2904
+ proto.loyalty.StorePurchaseResponse.prototype.getStatus = function() {
2905
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
2906
+ };
2907
+
2908
+
2909
+ /**
2910
+ * @param {string} value
2911
+ * @return {!proto.loyalty.StorePurchaseResponse} returns this
2912
+ */
2913
+ proto.loyalty.StorePurchaseResponse.prototype.setStatus = function(value) {
2914
+ return jspb.Message.setProto3StringField(this, 2, value);
2915
+ };
2916
+
2917
+
2918
+ /**
2919
+ * optional string currency = 3;
2920
+ * @return {string}
2921
+ */
2922
+ proto.loyalty.StorePurchaseResponse.prototype.getCurrency = function() {
2923
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
2924
+ };
2925
+
2926
+
2927
+ /**
2928
+ * @param {string} value
2929
+ * @return {!proto.loyalty.StorePurchaseResponse} returns this
2930
+ */
2931
+ proto.loyalty.StorePurchaseResponse.prototype.setCurrency = function(value) {
2932
+ return jspb.Message.setProto3StringField(this, 3, value);
2933
+ };
2934
+
2935
+
2936
+ /**
2937
+ * optional string amount_minor = 4;
2938
+ * @return {string}
2939
+ */
2940
+ proto.loyalty.StorePurchaseResponse.prototype.getAmountMinor = function() {
2941
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
2942
+ };
2943
+
2944
+
2945
+ /**
2946
+ * @param {string} value
2947
+ * @return {!proto.loyalty.StorePurchaseResponse} returns this
2948
+ */
2949
+ proto.loyalty.StorePurchaseResponse.prototype.setAmountMinor = function(value) {
2950
+ return jspb.Message.setProto3StringField(this, 4, value);
2951
+ };
2952
+
2953
+
2954
+ /**
2955
+ * optional int32 currency_scale = 5;
2956
+ * @return {number}
2957
+ */
2958
+ proto.loyalty.StorePurchaseResponse.prototype.getCurrencyScale = function() {
2959
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
2960
+ };
2961
+
2962
+
2963
+ /**
2964
+ * @param {number} value
2965
+ * @return {!proto.loyalty.StorePurchaseResponse} returns this
2966
+ */
2967
+ proto.loyalty.StorePurchaseResponse.prototype.setCurrencyScale = function(value) {
2968
+ return jspb.Message.setProto3IntField(this, 5, value);
2969
+ };
2970
+
2971
+
2972
+ /**
2973
+ * optional bool replay = 6;
2974
+ * @return {boolean}
2975
+ */
2976
+ proto.loyalty.StorePurchaseResponse.prototype.getReplay = function() {
2977
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false));
2978
+ };
2979
+
2980
+
2981
+ /**
2982
+ * @param {boolean} value
2983
+ * @return {!proto.loyalty.StorePurchaseResponse} returns this
2984
+ */
2985
+ proto.loyalty.StorePurchaseResponse.prototype.setReplay = function(value) {
2986
+ return jspb.Message.setProto3BooleanField(this, 6, value);
2987
+ };
2988
+
2989
+
2990
+ /**
2991
+ * optional string available_minor = 7;
2992
+ * @return {string}
2993
+ */
2994
+ proto.loyalty.StorePurchaseResponse.prototype.getAvailableMinor = function() {
2995
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
2996
+ };
2997
+
2998
+
2999
+ /**
3000
+ * @param {string} value
3001
+ * @return {!proto.loyalty.StorePurchaseResponse} returns this
3002
+ */
3003
+ proto.loyalty.StorePurchaseResponse.prototype.setAvailableMinor = function(value) {
3004
+ return jspb.Message.setField(this, 7, value);
3005
+ };
3006
+
3007
+
3008
+ /**
3009
+ * Clears the field making it undefined.
3010
+ * @return {!proto.loyalty.StorePurchaseResponse} returns this
3011
+ */
3012
+ proto.loyalty.StorePurchaseResponse.prototype.clearAvailableMinor = function() {
3013
+ return jspb.Message.setField(this, 7, undefined);
3014
+ };
3015
+
3016
+
3017
+ /**
3018
+ * Returns whether this field is set.
3019
+ * @return {boolean}
3020
+ */
3021
+ proto.loyalty.StorePurchaseResponse.prototype.hasAvailableMinor = function() {
3022
+ return jspb.Message.getField(this, 7) != null;
3023
+ };
3024
+
3025
+
3026
+ /**
3027
+ * optional string remainder_numerator = 8;
3028
+ * @return {string}
3029
+ */
3030
+ proto.loyalty.StorePurchaseResponse.prototype.getRemainderNumerator = function() {
3031
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
3032
+ };
3033
+
3034
+
3035
+ /**
3036
+ * @param {string} value
3037
+ * @return {!proto.loyalty.StorePurchaseResponse} returns this
3038
+ */
3039
+ proto.loyalty.StorePurchaseResponse.prototype.setRemainderNumerator = function(value) {
3040
+ return jspb.Message.setField(this, 8, value);
3041
+ };
3042
+
3043
+
3044
+ /**
3045
+ * Clears the field making it undefined.
3046
+ * @return {!proto.loyalty.StorePurchaseResponse} returns this
3047
+ */
3048
+ proto.loyalty.StorePurchaseResponse.prototype.clearRemainderNumerator = function() {
3049
+ return jspb.Message.setField(this, 8, undefined);
3050
+ };
3051
+
3052
+
3053
+ /**
3054
+ * Returns whether this field is set.
3055
+ * @return {boolean}
3056
+ */
3057
+ proto.loyalty.StorePurchaseResponse.prototype.hasRemainderNumerator = function() {
3058
+ return jspb.Message.getField(this, 8) != null;
3059
+ };
3060
+
3061
+
3062
+ /**
3063
+ * optional string remainder_denominator = 9;
3064
+ * @return {string}
3065
+ */
3066
+ proto.loyalty.StorePurchaseResponse.prototype.getRemainderDenominator = function() {
3067
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, ""));
3068
+ };
3069
+
3070
+
3071
+ /**
3072
+ * @param {string} value
3073
+ * @return {!proto.loyalty.StorePurchaseResponse} returns this
3074
+ */
3075
+ proto.loyalty.StorePurchaseResponse.prototype.setRemainderDenominator = function(value) {
3076
+ return jspb.Message.setField(this, 9, value);
3077
+ };
3078
+
3079
+
3080
+ /**
3081
+ * Clears the field making it undefined.
3082
+ * @return {!proto.loyalty.StorePurchaseResponse} returns this
3083
+ */
3084
+ proto.loyalty.StorePurchaseResponse.prototype.clearRemainderDenominator = function() {
3085
+ return jspb.Message.setField(this, 9, undefined);
3086
+ };
3087
+
3088
+
3089
+ /**
3090
+ * Returns whether this field is set.
3091
+ * @return {boolean}
3092
+ */
3093
+ proto.loyalty.StorePurchaseResponse.prototype.hasRemainderDenominator = function() {
3094
+ return jspb.Message.getField(this, 9) != null;
3095
+ };
3096
+
3097
+
3098
+
3099
+
3100
+
3101
+ if (jspb.Message.GENERATE_TO_OBJECT) {
3102
+ /**
3103
+ * Creates an object representation of this proto.
3104
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
3105
+ * Optional fields that are not set will be set to undefined.
3106
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3107
+ * For the list of reserved names please see:
3108
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3109
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3110
+ * JSPB instance for transitional soy proto support:
3111
+ * http://goto/soy-param-migration
3112
+ * @return {!Object}
3113
+ */
3114
+ proto.loyalty.StoreAvailableBalanceRequest.prototype.toObject = function(opt_includeInstance) {
3115
+ return proto.loyalty.StoreAvailableBalanceRequest.toObject(opt_includeInstance, this);
3116
+ };
3117
+
3118
+
3119
+ /**
3120
+ * Static version of the {@see toObject} method.
3121
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3122
+ * the JSPB instance for transitional soy proto support:
3123
+ * http://goto/soy-param-migration
3124
+ * @param {!proto.loyalty.StoreAvailableBalanceRequest} msg The msg instance to transform.
3125
+ * @return {!Object}
3126
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3127
+ */
3128
+ proto.loyalty.StoreAvailableBalanceRequest.toObject = function(includeInstance, msg) {
3129
+ var f, obj = {
3130
+ userPublicId: jspb.Message.getFieldWithDefault(msg, 1, "")
3131
+ };
3132
+
3133
+ if (includeInstance) {
3134
+ obj.$jspbMessageInstance = msg;
3135
+ }
3136
+ return obj;
3137
+ };
3138
+ }
3139
+
3140
+
3141
+ /**
3142
+ * Deserializes binary data (in protobuf wire format).
3143
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
3144
+ * @return {!proto.loyalty.StoreAvailableBalanceRequest}
3145
+ */
3146
+ proto.loyalty.StoreAvailableBalanceRequest.deserializeBinary = function(bytes) {
3147
+ var reader = new jspb.BinaryReader(bytes);
3148
+ var msg = new proto.loyalty.StoreAvailableBalanceRequest;
3149
+ return proto.loyalty.StoreAvailableBalanceRequest.deserializeBinaryFromReader(msg, reader);
3150
+ };
3151
+
3152
+
3153
+ /**
3154
+ * Deserializes binary data (in protobuf wire format) from the
3155
+ * given reader into the given message object.
3156
+ * @param {!proto.loyalty.StoreAvailableBalanceRequest} msg The message object to deserialize into.
3157
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3158
+ * @return {!proto.loyalty.StoreAvailableBalanceRequest}
3159
+ */
3160
+ proto.loyalty.StoreAvailableBalanceRequest.deserializeBinaryFromReader = function(msg, reader) {
3161
+ while (reader.nextField()) {
3162
+ if (reader.isEndGroup()) {
3163
+ break;
3164
+ }
3165
+ var field = reader.getFieldNumber();
3166
+ switch (field) {
3167
+ case 1:
3168
+ var value = /** @type {string} */ (reader.readString());
3169
+ msg.setUserPublicId(value);
3170
+ break;
3171
+ default:
3172
+ reader.skipField();
3173
+ break;
3174
+ }
3175
+ }
3176
+ return msg;
3177
+ };
3178
+
3179
+
3180
+ /**
3181
+ * Serializes the message to binary data (in protobuf wire format).
3182
+ * @return {!Uint8Array}
3183
+ */
3184
+ proto.loyalty.StoreAvailableBalanceRequest.prototype.serializeBinary = function() {
3185
+ var writer = new jspb.BinaryWriter();
3186
+ proto.loyalty.StoreAvailableBalanceRequest.serializeBinaryToWriter(this, writer);
3187
+ return writer.getResultBuffer();
3188
+ };
3189
+
3190
+
3191
+ /**
3192
+ * Serializes the given message to binary data (in protobuf wire
3193
+ * format), writing to the given BinaryWriter.
3194
+ * @param {!proto.loyalty.StoreAvailableBalanceRequest} message
3195
+ * @param {!jspb.BinaryWriter} writer
3196
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3197
+ */
3198
+ proto.loyalty.StoreAvailableBalanceRequest.serializeBinaryToWriter = function(message, writer) {
3199
+ var f = undefined;
3200
+ f = message.getUserPublicId();
3201
+ if (f.length > 0) {
3202
+ writer.writeString(
3203
+ 1,
3204
+ f
3205
+ );
3206
+ }
3207
+ };
3208
+
3209
+
3210
+ /**
3211
+ * optional string user_public_id = 1;
3212
+ * @return {string}
3213
+ */
3214
+ proto.loyalty.StoreAvailableBalanceRequest.prototype.getUserPublicId = function() {
3215
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
3216
+ };
3217
+
3218
+
3219
+ /**
3220
+ * @param {string} value
3221
+ * @return {!proto.loyalty.StoreAvailableBalanceRequest} returns this
3222
+ */
3223
+ proto.loyalty.StoreAvailableBalanceRequest.prototype.setUserPublicId = function(value) {
3224
+ return jspb.Message.setProto3StringField(this, 1, value);
3225
+ };
3226
+
3227
+
3228
+
3229
+
3230
+
3231
+ if (jspb.Message.GENERATE_TO_OBJECT) {
3232
+ /**
3233
+ * Creates an object representation of this proto.
3234
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
3235
+ * Optional fields that are not set will be set to undefined.
3236
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3237
+ * For the list of reserved names please see:
3238
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3239
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3240
+ * JSPB instance for transitional soy proto support:
3241
+ * http://goto/soy-param-migration
3242
+ * @return {!Object}
3243
+ */
3244
+ proto.loyalty.StoreAvailableBalanceResponse.prototype.toObject = function(opt_includeInstance) {
3245
+ return proto.loyalty.StoreAvailableBalanceResponse.toObject(opt_includeInstance, this);
3246
+ };
3247
+
3248
+
3249
+ /**
3250
+ * Static version of the {@see toObject} method.
3251
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3252
+ * the JSPB instance for transitional soy proto support:
3253
+ * http://goto/soy-param-migration
3254
+ * @param {!proto.loyalty.StoreAvailableBalanceResponse} msg The msg instance to transform.
3255
+ * @return {!Object}
3256
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3257
+ */
3258
+ proto.loyalty.StoreAvailableBalanceResponse.toObject = function(includeInstance, msg) {
3259
+ var f, obj = {
3260
+ currency: jspb.Message.getFieldWithDefault(msg, 1, ""),
3261
+ currencyScale: jspb.Message.getFieldWithDefault(msg, 2, 0),
3262
+ availableMinor: jspb.Message.getFieldWithDefault(msg, 3, ""),
3263
+ remainderNumerator: jspb.Message.getFieldWithDefault(msg, 4, ""),
3264
+ remainderDenominator: jspb.Message.getFieldWithDefault(msg, 5, "")
3265
+ };
3266
+
3267
+ if (includeInstance) {
3268
+ obj.$jspbMessageInstance = msg;
3269
+ }
3270
+ return obj;
3271
+ };
3272
+ }
3273
+
3274
+
3275
+ /**
3276
+ * Deserializes binary data (in protobuf wire format).
3277
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
3278
+ * @return {!proto.loyalty.StoreAvailableBalanceResponse}
3279
+ */
3280
+ proto.loyalty.StoreAvailableBalanceResponse.deserializeBinary = function(bytes) {
3281
+ var reader = new jspb.BinaryReader(bytes);
3282
+ var msg = new proto.loyalty.StoreAvailableBalanceResponse;
3283
+ return proto.loyalty.StoreAvailableBalanceResponse.deserializeBinaryFromReader(msg, reader);
3284
+ };
3285
+
3286
+
3287
+ /**
3288
+ * Deserializes binary data (in protobuf wire format) from the
3289
+ * given reader into the given message object.
3290
+ * @param {!proto.loyalty.StoreAvailableBalanceResponse} msg The message object to deserialize into.
3291
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3292
+ * @return {!proto.loyalty.StoreAvailableBalanceResponse}
3293
+ */
3294
+ proto.loyalty.StoreAvailableBalanceResponse.deserializeBinaryFromReader = function(msg, reader) {
3295
+ while (reader.nextField()) {
3296
+ if (reader.isEndGroup()) {
3297
+ break;
3298
+ }
3299
+ var field = reader.getFieldNumber();
3300
+ switch (field) {
3301
+ case 1:
3302
+ var value = /** @type {string} */ (reader.readString());
3303
+ msg.setCurrency(value);
3304
+ break;
3305
+ case 2:
3306
+ var value = /** @type {number} */ (reader.readInt32());
3307
+ msg.setCurrencyScale(value);
3308
+ break;
3309
+ case 3:
3310
+ var value = /** @type {string} */ (reader.readString());
3311
+ msg.setAvailableMinor(value);
3312
+ break;
3313
+ case 4:
3314
+ var value = /** @type {string} */ (reader.readString());
3315
+ msg.setRemainderNumerator(value);
3316
+ break;
3317
+ case 5:
3318
+ var value = /** @type {string} */ (reader.readString());
3319
+ msg.setRemainderDenominator(value);
3320
+ break;
3321
+ default:
3322
+ reader.skipField();
3323
+ break;
3324
+ }
3325
+ }
3326
+ return msg;
3327
+ };
3328
+
3329
+
3330
+ /**
3331
+ * Serializes the message to binary data (in protobuf wire format).
3332
+ * @return {!Uint8Array}
3333
+ */
3334
+ proto.loyalty.StoreAvailableBalanceResponse.prototype.serializeBinary = function() {
3335
+ var writer = new jspb.BinaryWriter();
3336
+ proto.loyalty.StoreAvailableBalanceResponse.serializeBinaryToWriter(this, writer);
3337
+ return writer.getResultBuffer();
3338
+ };
3339
+
3340
+
3341
+ /**
3342
+ * Serializes the given message to binary data (in protobuf wire
3343
+ * format), writing to the given BinaryWriter.
3344
+ * @param {!proto.loyalty.StoreAvailableBalanceResponse} message
3345
+ * @param {!jspb.BinaryWriter} writer
3346
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3347
+ */
3348
+ proto.loyalty.StoreAvailableBalanceResponse.serializeBinaryToWriter = function(message, writer) {
3349
+ var f = undefined;
3350
+ f = message.getCurrency();
3351
+ if (f.length > 0) {
3352
+ writer.writeString(
3353
+ 1,
3354
+ f
3355
+ );
3356
+ }
3357
+ f = message.getCurrencyScale();
3358
+ if (f !== 0) {
3359
+ writer.writeInt32(
3360
+ 2,
3361
+ f
3362
+ );
3363
+ }
3364
+ f = message.getAvailableMinor();
3365
+ if (f.length > 0) {
3366
+ writer.writeString(
3367
+ 3,
3368
+ f
3369
+ );
3370
+ }
3371
+ f = message.getRemainderNumerator();
3372
+ if (f.length > 0) {
3373
+ writer.writeString(
3374
+ 4,
3375
+ f
3376
+ );
3377
+ }
3378
+ f = message.getRemainderDenominator();
3379
+ if (f.length > 0) {
3380
+ writer.writeString(
3381
+ 5,
3382
+ f
3383
+ );
3384
+ }
3385
+ };
3386
+
3387
+
3388
+ /**
3389
+ * optional string currency = 1;
3390
+ * @return {string}
3391
+ */
3392
+ proto.loyalty.StoreAvailableBalanceResponse.prototype.getCurrency = function() {
3393
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
3394
+ };
3395
+
3396
+
3397
+ /**
3398
+ * @param {string} value
3399
+ * @return {!proto.loyalty.StoreAvailableBalanceResponse} returns this
3400
+ */
3401
+ proto.loyalty.StoreAvailableBalanceResponse.prototype.setCurrency = function(value) {
3402
+ return jspb.Message.setProto3StringField(this, 1, value);
3403
+ };
3404
+
3405
+
3406
+ /**
3407
+ * optional int32 currency_scale = 2;
3408
+ * @return {number}
3409
+ */
3410
+ proto.loyalty.StoreAvailableBalanceResponse.prototype.getCurrencyScale = function() {
3411
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
3412
+ };
3413
+
3414
+
3415
+ /**
3416
+ * @param {number} value
3417
+ * @return {!proto.loyalty.StoreAvailableBalanceResponse} returns this
3418
+ */
3419
+ proto.loyalty.StoreAvailableBalanceResponse.prototype.setCurrencyScale = function(value) {
3420
+ return jspb.Message.setProto3IntField(this, 2, value);
3421
+ };
3422
+
3423
+
3424
+ /**
3425
+ * optional string available_minor = 3;
3426
+ * @return {string}
3427
+ */
3428
+ proto.loyalty.StoreAvailableBalanceResponse.prototype.getAvailableMinor = function() {
3429
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
3430
+ };
3431
+
3432
+
3433
+ /**
3434
+ * @param {string} value
3435
+ * @return {!proto.loyalty.StoreAvailableBalanceResponse} returns this
3436
+ */
3437
+ proto.loyalty.StoreAvailableBalanceResponse.prototype.setAvailableMinor = function(value) {
3438
+ return jspb.Message.setProto3StringField(this, 3, value);
3439
+ };
3440
+
3441
+
3442
+ /**
3443
+ * optional string remainder_numerator = 4;
3444
+ * @return {string}
3445
+ */
3446
+ proto.loyalty.StoreAvailableBalanceResponse.prototype.getRemainderNumerator = function() {
3447
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
3448
+ };
3449
+
3450
+
3451
+ /**
3452
+ * @param {string} value
3453
+ * @return {!proto.loyalty.StoreAvailableBalanceResponse} returns this
3454
+ */
3455
+ proto.loyalty.StoreAvailableBalanceResponse.prototype.setRemainderNumerator = function(value) {
3456
+ return jspb.Message.setProto3StringField(this, 4, value);
3457
+ };
3458
+
3459
+
3460
+ /**
3461
+ * optional string remainder_denominator = 5;
3462
+ * @return {string}
3463
+ */
3464
+ proto.loyalty.StoreAvailableBalanceResponse.prototype.getRemainderDenominator = function() {
3465
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
3466
+ };
3467
+
3468
+
3469
+ /**
3470
+ * @param {string} value
3471
+ * @return {!proto.loyalty.StoreAvailableBalanceResponse} returns this
3472
+ */
3473
+ proto.loyalty.StoreAvailableBalanceResponse.prototype.setRemainderDenominator = function(value) {
3474
+ return jspb.Message.setProto3StringField(this, 5, value);
3475
+ };
3476
+
3477
+
3478
+
3479
+
3480
+
1150
3481
  if (jspb.Message.GENERATE_TO_OBJECT) {
1151
3482
  /**
1152
3483
  * Creates an object representation of this proto.