protobuf-platform 1.2.399 → 1.2.401

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bonus/bonus.proto CHANGED
@@ -23,6 +23,7 @@ service Bonus {
23
23
  rpc claimUserBonus(GetUserBonusRequest) returns (BonusStatusResponse);
24
24
  rpc cancelUserBonus(GetUserBonusRequest) returns (BonusStatusResponse);
25
25
  rpc activateUserBonus(GetUserBonusRequest) returns (BonusStatusResponse);
26
+ rpc applyUserPromocodeToUserBonus(ApplyUserPromocodeToUserBonusRequest) returns (BonusStatusResponse);
26
27
  rpc getUserBonuses(PaginationRequest) returns (UserBonusItemsResponse);
27
28
  rpc checkBonusForUser(GetUserBonusRequest) returns (UserBonusItem);
28
29
  rpc getUserBonusesHistory(PaginationRequest) returns (UserBonusItemsResponse);
@@ -329,6 +330,14 @@ message GetUserBonusRequest {
329
330
  optional bool is_mobile = 11;
330
331
  optional string promo_code = 12;
331
332
  }
333
+ message ApplyUserPromocodeToUserBonusRequest {
334
+ int32 user_id = 1;
335
+ int32 user_bonus_id = 2;
336
+ string promo_code = 3;
337
+ optional string currency = 4;
338
+ optional string country = 5;
339
+ optional string locale = 6;
340
+ }
332
341
  message UserBonusItemsResponse {
333
342
  repeated UserBonusItem items = 1;
334
343
  optional int32 total_pages = 2;
@@ -15,6 +15,17 @@ function deserialize_bonus_ActiveWageringUserBonusesResponse(buffer_arg) {
15
15
  return bonus_pb.ActiveWageringUserBonusesResponse.deserializeBinary(new Uint8Array(buffer_arg));
16
16
  }
17
17
 
18
+ function serialize_bonus_ApplyUserPromocodeToUserBonusRequest(arg) {
19
+ if (!(arg instanceof bonus_pb.ApplyUserPromocodeToUserBonusRequest)) {
20
+ throw new Error('Expected argument of type bonus.ApplyUserPromocodeToUserBonusRequest');
21
+ }
22
+ return Buffer.from(arg.serializeBinary());
23
+ }
24
+
25
+ function deserialize_bonus_ApplyUserPromocodeToUserBonusRequest(buffer_arg) {
26
+ return bonus_pb.ApplyUserPromocodeToUserBonusRequest.deserializeBinary(new Uint8Array(buffer_arg));
27
+ }
28
+
18
29
  function serialize_bonus_BonusActivationRulesRequest(arg) {
19
30
  if (!(arg instanceof bonus_pb.BonusActivationRulesRequest)) {
20
31
  throw new Error('Expected argument of type bonus.BonusActivationRulesRequest');
@@ -613,6 +624,17 @@ claimUserBonus: {
613
624
  responseSerialize: serialize_bonus_BonusStatusResponse,
614
625
  responseDeserialize: deserialize_bonus_BonusStatusResponse,
615
626
  },
627
+ applyUserPromocodeToUserBonus: {
628
+ path: '/bonus.Bonus/applyUserPromocodeToUserBonus',
629
+ requestStream: false,
630
+ responseStream: false,
631
+ requestType: bonus_pb.ApplyUserPromocodeToUserBonusRequest,
632
+ responseType: bonus_pb.BonusStatusResponse,
633
+ requestSerialize: serialize_bonus_ApplyUserPromocodeToUserBonusRequest,
634
+ requestDeserialize: deserialize_bonus_ApplyUserPromocodeToUserBonusRequest,
635
+ responseSerialize: serialize_bonus_BonusStatusResponse,
636
+ responseDeserialize: deserialize_bonus_BonusStatusResponse,
637
+ },
616
638
  getUserBonuses: {
617
639
  path: '/bonus.Bonus/getUserBonuses',
618
640
  requestStream: false,
package/bonus/bonus_pb.js CHANGED
@@ -24,6 +24,7 @@ var global = (function() {
24
24
  goog.exportSymbol('proto.bonus.ActivationRule', null, global);
25
25
  goog.exportSymbol('proto.bonus.ActiveWageringUserBonusItem', null, global);
26
26
  goog.exportSymbol('proto.bonus.ActiveWageringUserBonusesResponse', null, global);
27
+ goog.exportSymbol('proto.bonus.ApplyUserPromocodeToUserBonusRequest', null, global);
27
28
  goog.exportSymbol('proto.bonus.BetsRange', null, global);
28
29
  goog.exportSymbol('proto.bonus.BonusActivationRulesRequest', null, global);
29
30
  goog.exportSymbol('proto.bonus.BonusBetRangesRequest', null, global);
@@ -747,6 +748,27 @@ if (goog.DEBUG && !COMPILED) {
747
748
  */
748
749
  proto.bonus.GetUserBonusRequest.displayName = 'proto.bonus.GetUserBonusRequest';
749
750
  }
751
+ /**
752
+ * Generated by JsPbCodeGenerator.
753
+ * @param {Array=} opt_data Optional initial data array, typically from a
754
+ * server response, or constructed directly in Javascript. The array is used
755
+ * in place and becomes part of the constructed object. It is not cloned.
756
+ * If no data is provided, the constructed object will be empty, but still
757
+ * valid.
758
+ * @extends {jspb.Message}
759
+ * @constructor
760
+ */
761
+ proto.bonus.ApplyUserPromocodeToUserBonusRequest = function(opt_data) {
762
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
763
+ };
764
+ goog.inherits(proto.bonus.ApplyUserPromocodeToUserBonusRequest, jspb.Message);
765
+ if (goog.DEBUG && !COMPILED) {
766
+ /**
767
+ * @public
768
+ * @override
769
+ */
770
+ proto.bonus.ApplyUserPromocodeToUserBonusRequest.displayName = 'proto.bonus.ApplyUserPromocodeToUserBonusRequest';
771
+ }
750
772
  /**
751
773
  * Generated by JsPbCodeGenerator.
752
774
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -14530,6 +14552,340 @@ proto.bonus.GetUserBonusRequest.prototype.hasPromoCode = function() {
14530
14552
 
14531
14553
 
14532
14554
 
14555
+
14556
+
14557
+ if (jspb.Message.GENERATE_TO_OBJECT) {
14558
+ /**
14559
+ * Creates an object representation of this proto.
14560
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
14561
+ * Optional fields that are not set will be set to undefined.
14562
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
14563
+ * For the list of reserved names please see:
14564
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
14565
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
14566
+ * JSPB instance for transitional soy proto support:
14567
+ * http://goto/soy-param-migration
14568
+ * @return {!Object}
14569
+ */
14570
+ proto.bonus.ApplyUserPromocodeToUserBonusRequest.prototype.toObject = function(opt_includeInstance) {
14571
+ return proto.bonus.ApplyUserPromocodeToUserBonusRequest.toObject(opt_includeInstance, this);
14572
+ };
14573
+
14574
+
14575
+ /**
14576
+ * Static version of the {@see toObject} method.
14577
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
14578
+ * the JSPB instance for transitional soy proto support:
14579
+ * http://goto/soy-param-migration
14580
+ * @param {!proto.bonus.ApplyUserPromocodeToUserBonusRequest} msg The msg instance to transform.
14581
+ * @return {!Object}
14582
+ * @suppress {unusedLocalVariables} f is only used for nested messages
14583
+ */
14584
+ proto.bonus.ApplyUserPromocodeToUserBonusRequest.toObject = function(includeInstance, msg) {
14585
+ var f, obj = {
14586
+ userId: jspb.Message.getFieldWithDefault(msg, 1, 0),
14587
+ userBonusId: jspb.Message.getFieldWithDefault(msg, 2, 0),
14588
+ promoCode: jspb.Message.getFieldWithDefault(msg, 3, ""),
14589
+ currency: jspb.Message.getFieldWithDefault(msg, 4, ""),
14590
+ country: jspb.Message.getFieldWithDefault(msg, 5, ""),
14591
+ locale: jspb.Message.getFieldWithDefault(msg, 6, "")
14592
+ };
14593
+
14594
+ if (includeInstance) {
14595
+ obj.$jspbMessageInstance = msg;
14596
+ }
14597
+ return obj;
14598
+ };
14599
+ }
14600
+
14601
+
14602
+ /**
14603
+ * Deserializes binary data (in protobuf wire format).
14604
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
14605
+ * @return {!proto.bonus.ApplyUserPromocodeToUserBonusRequest}
14606
+ */
14607
+ proto.bonus.ApplyUserPromocodeToUserBonusRequest.deserializeBinary = function(bytes) {
14608
+ var reader = new jspb.BinaryReader(bytes);
14609
+ var msg = new proto.bonus.ApplyUserPromocodeToUserBonusRequest;
14610
+ return proto.bonus.ApplyUserPromocodeToUserBonusRequest.deserializeBinaryFromReader(msg, reader);
14611
+ };
14612
+
14613
+
14614
+ /**
14615
+ * Deserializes binary data (in protobuf wire format) from the
14616
+ * given reader into the given message object.
14617
+ * @param {!proto.bonus.ApplyUserPromocodeToUserBonusRequest} msg The message object to deserialize into.
14618
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
14619
+ * @return {!proto.bonus.ApplyUserPromocodeToUserBonusRequest}
14620
+ */
14621
+ proto.bonus.ApplyUserPromocodeToUserBonusRequest.deserializeBinaryFromReader = function(msg, reader) {
14622
+ while (reader.nextField()) {
14623
+ if (reader.isEndGroup()) {
14624
+ break;
14625
+ }
14626
+ var field = reader.getFieldNumber();
14627
+ switch (field) {
14628
+ case 1:
14629
+ var value = /** @type {number} */ (reader.readInt32());
14630
+ msg.setUserId(value);
14631
+ break;
14632
+ case 2:
14633
+ var value = /** @type {number} */ (reader.readInt32());
14634
+ msg.setUserBonusId(value);
14635
+ break;
14636
+ case 3:
14637
+ var value = /** @type {string} */ (reader.readString());
14638
+ msg.setPromoCode(value);
14639
+ break;
14640
+ case 4:
14641
+ var value = /** @type {string} */ (reader.readString());
14642
+ msg.setCurrency(value);
14643
+ break;
14644
+ case 5:
14645
+ var value = /** @type {string} */ (reader.readString());
14646
+ msg.setCountry(value);
14647
+ break;
14648
+ case 6:
14649
+ var value = /** @type {string} */ (reader.readString());
14650
+ msg.setLocale(value);
14651
+ break;
14652
+ default:
14653
+ reader.skipField();
14654
+ break;
14655
+ }
14656
+ }
14657
+ return msg;
14658
+ };
14659
+
14660
+
14661
+ /**
14662
+ * Serializes the message to binary data (in protobuf wire format).
14663
+ * @return {!Uint8Array}
14664
+ */
14665
+ proto.bonus.ApplyUserPromocodeToUserBonusRequest.prototype.serializeBinary = function() {
14666
+ var writer = new jspb.BinaryWriter();
14667
+ proto.bonus.ApplyUserPromocodeToUserBonusRequest.serializeBinaryToWriter(this, writer);
14668
+ return writer.getResultBuffer();
14669
+ };
14670
+
14671
+
14672
+ /**
14673
+ * Serializes the given message to binary data (in protobuf wire
14674
+ * format), writing to the given BinaryWriter.
14675
+ * @param {!proto.bonus.ApplyUserPromocodeToUserBonusRequest} message
14676
+ * @param {!jspb.BinaryWriter} writer
14677
+ * @suppress {unusedLocalVariables} f is only used for nested messages
14678
+ */
14679
+ proto.bonus.ApplyUserPromocodeToUserBonusRequest.serializeBinaryToWriter = function(message, writer) {
14680
+ var f = undefined;
14681
+ f = message.getUserId();
14682
+ if (f !== 0) {
14683
+ writer.writeInt32(
14684
+ 1,
14685
+ f
14686
+ );
14687
+ }
14688
+ f = message.getUserBonusId();
14689
+ if (f !== 0) {
14690
+ writer.writeInt32(
14691
+ 2,
14692
+ f
14693
+ );
14694
+ }
14695
+ f = message.getPromoCode();
14696
+ if (f.length > 0) {
14697
+ writer.writeString(
14698
+ 3,
14699
+ f
14700
+ );
14701
+ }
14702
+ f = /** @type {string} */ (jspb.Message.getField(message, 4));
14703
+ if (f != null) {
14704
+ writer.writeString(
14705
+ 4,
14706
+ f
14707
+ );
14708
+ }
14709
+ f = /** @type {string} */ (jspb.Message.getField(message, 5));
14710
+ if (f != null) {
14711
+ writer.writeString(
14712
+ 5,
14713
+ f
14714
+ );
14715
+ }
14716
+ f = /** @type {string} */ (jspb.Message.getField(message, 6));
14717
+ if (f != null) {
14718
+ writer.writeString(
14719
+ 6,
14720
+ f
14721
+ );
14722
+ }
14723
+ };
14724
+
14725
+
14726
+ /**
14727
+ * optional int32 user_id = 1;
14728
+ * @return {number}
14729
+ */
14730
+ proto.bonus.ApplyUserPromocodeToUserBonusRequest.prototype.getUserId = function() {
14731
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
14732
+ };
14733
+
14734
+
14735
+ /**
14736
+ * @param {number} value
14737
+ * @return {!proto.bonus.ApplyUserPromocodeToUserBonusRequest} returns this
14738
+ */
14739
+ proto.bonus.ApplyUserPromocodeToUserBonusRequest.prototype.setUserId = function(value) {
14740
+ return jspb.Message.setProto3IntField(this, 1, value);
14741
+ };
14742
+
14743
+
14744
+ /**
14745
+ * optional int32 user_bonus_id = 2;
14746
+ * @return {number}
14747
+ */
14748
+ proto.bonus.ApplyUserPromocodeToUserBonusRequest.prototype.getUserBonusId = function() {
14749
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
14750
+ };
14751
+
14752
+
14753
+ /**
14754
+ * @param {number} value
14755
+ * @return {!proto.bonus.ApplyUserPromocodeToUserBonusRequest} returns this
14756
+ */
14757
+ proto.bonus.ApplyUserPromocodeToUserBonusRequest.prototype.setUserBonusId = function(value) {
14758
+ return jspb.Message.setProto3IntField(this, 2, value);
14759
+ };
14760
+
14761
+
14762
+ /**
14763
+ * optional string promo_code = 3;
14764
+ * @return {string}
14765
+ */
14766
+ proto.bonus.ApplyUserPromocodeToUserBonusRequest.prototype.getPromoCode = function() {
14767
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
14768
+ };
14769
+
14770
+
14771
+ /**
14772
+ * @param {string} value
14773
+ * @return {!proto.bonus.ApplyUserPromocodeToUserBonusRequest} returns this
14774
+ */
14775
+ proto.bonus.ApplyUserPromocodeToUserBonusRequest.prototype.setPromoCode = function(value) {
14776
+ return jspb.Message.setProto3StringField(this, 3, value);
14777
+ };
14778
+
14779
+
14780
+ /**
14781
+ * optional string currency = 4;
14782
+ * @return {string}
14783
+ */
14784
+ proto.bonus.ApplyUserPromocodeToUserBonusRequest.prototype.getCurrency = function() {
14785
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
14786
+ };
14787
+
14788
+
14789
+ /**
14790
+ * @param {string} value
14791
+ * @return {!proto.bonus.ApplyUserPromocodeToUserBonusRequest} returns this
14792
+ */
14793
+ proto.bonus.ApplyUserPromocodeToUserBonusRequest.prototype.setCurrency = function(value) {
14794
+ return jspb.Message.setField(this, 4, value);
14795
+ };
14796
+
14797
+
14798
+ /**
14799
+ * Clears the field making it undefined.
14800
+ * @return {!proto.bonus.ApplyUserPromocodeToUserBonusRequest} returns this
14801
+ */
14802
+ proto.bonus.ApplyUserPromocodeToUserBonusRequest.prototype.clearCurrency = function() {
14803
+ return jspb.Message.setField(this, 4, undefined);
14804
+ };
14805
+
14806
+
14807
+ /**
14808
+ * Returns whether this field is set.
14809
+ * @return {boolean}
14810
+ */
14811
+ proto.bonus.ApplyUserPromocodeToUserBonusRequest.prototype.hasCurrency = function() {
14812
+ return jspb.Message.getField(this, 4) != null;
14813
+ };
14814
+
14815
+
14816
+ /**
14817
+ * optional string country = 5;
14818
+ * @return {string}
14819
+ */
14820
+ proto.bonus.ApplyUserPromocodeToUserBonusRequest.prototype.getCountry = function() {
14821
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
14822
+ };
14823
+
14824
+
14825
+ /**
14826
+ * @param {string} value
14827
+ * @return {!proto.bonus.ApplyUserPromocodeToUserBonusRequest} returns this
14828
+ */
14829
+ proto.bonus.ApplyUserPromocodeToUserBonusRequest.prototype.setCountry = function(value) {
14830
+ return jspb.Message.setField(this, 5, value);
14831
+ };
14832
+
14833
+
14834
+ /**
14835
+ * Clears the field making it undefined.
14836
+ * @return {!proto.bonus.ApplyUserPromocodeToUserBonusRequest} returns this
14837
+ */
14838
+ proto.bonus.ApplyUserPromocodeToUserBonusRequest.prototype.clearCountry = function() {
14839
+ return jspb.Message.setField(this, 5, undefined);
14840
+ };
14841
+
14842
+
14843
+ /**
14844
+ * Returns whether this field is set.
14845
+ * @return {boolean}
14846
+ */
14847
+ proto.bonus.ApplyUserPromocodeToUserBonusRequest.prototype.hasCountry = function() {
14848
+ return jspb.Message.getField(this, 5) != null;
14849
+ };
14850
+
14851
+
14852
+ /**
14853
+ * optional string locale = 6;
14854
+ * @return {string}
14855
+ */
14856
+ proto.bonus.ApplyUserPromocodeToUserBonusRequest.prototype.getLocale = function() {
14857
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
14858
+ };
14859
+
14860
+
14861
+ /**
14862
+ * @param {string} value
14863
+ * @return {!proto.bonus.ApplyUserPromocodeToUserBonusRequest} returns this
14864
+ */
14865
+ proto.bonus.ApplyUserPromocodeToUserBonusRequest.prototype.setLocale = function(value) {
14866
+ return jspb.Message.setField(this, 6, value);
14867
+ };
14868
+
14869
+
14870
+ /**
14871
+ * Clears the field making it undefined.
14872
+ * @return {!proto.bonus.ApplyUserPromocodeToUserBonusRequest} returns this
14873
+ */
14874
+ proto.bonus.ApplyUserPromocodeToUserBonusRequest.prototype.clearLocale = function() {
14875
+ return jspb.Message.setField(this, 6, undefined);
14876
+ };
14877
+
14878
+
14879
+ /**
14880
+ * Returns whether this field is set.
14881
+ * @return {boolean}
14882
+ */
14883
+ proto.bonus.ApplyUserPromocodeToUserBonusRequest.prototype.hasLocale = function() {
14884
+ return jspb.Message.getField(this, 6) != null;
14885
+ };
14886
+
14887
+
14888
+
14533
14889
  /**
14534
14890
  * List of repeated fields within this message type.
14535
14891
  * @private {!Array<number>}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protobuf-platform",
3
- "version": "1.2.399",
3
+ "version": "1.2.401",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -19,6 +19,7 @@ service Promocode {
19
19
  rpc readListBonusMasks(BonusMaskPaginationRequest) returns (BonusMaskItemsResponse);
20
20
  //User promocodes (runtime)
21
21
  rpc applyUserPromocode(ApplyUserPromocodeRequest) returns (ApplyUserPromocodeResponse);
22
+ rpc prepareUserPromocodeGrant(PrepareUserPromocodeGrantRequest) returns (PrepareUserPromocodeGrantResponse);
22
23
  rpc batchGetUserPromocodeSnapshots(BatchGetUserPromocodeSnapshotsRequest) returns (BatchGetUserPromocodeSnapshotsResponse);
23
24
  }
24
25
  message PingRequest { string ping = 1; }
@@ -205,6 +206,22 @@ message ApplyUserPromocodeResponse {
205
206
  optional string snapshot = 11;
206
207
  optional string status = 12;
207
208
  }
209
+ message PrepareUserPromocodeGrantRequest {
210
+ int32 user_id = 1;
211
+ string promo_code = 2;
212
+ string activation_area = 3;
213
+ string target_domain = 4;
214
+ optional string currency = 5;
215
+ optional string country = 6;
216
+ optional string locale = 7;
217
+ }
218
+ message PrepareUserPromocodeGrantResponse {
219
+ string status = 1;
220
+ int32 promocode_id = 2;
221
+ int32 target_bonus_id = 3;
222
+ string application_mode = 4;
223
+ optional string currency = 5;
224
+ }
208
225
  message BatchGetUserPromocodeSnapshotsRequest {
209
226
  repeated int32 user_promocode_ids = 1;
210
227
  }
@@ -213,6 +213,28 @@ function deserialize_promocode_PongResponse(buffer_arg) {
213
213
  return promocode_pb.PongResponse.deserializeBinary(new Uint8Array(buffer_arg));
214
214
  }
215
215
 
216
+ function serialize_promocode_PrepareUserPromocodeGrantRequest(arg) {
217
+ if (!(arg instanceof promocode_pb.PrepareUserPromocodeGrantRequest)) {
218
+ throw new Error('Expected argument of type promocode.PrepareUserPromocodeGrantRequest');
219
+ }
220
+ return Buffer.from(arg.serializeBinary());
221
+ }
222
+
223
+ function deserialize_promocode_PrepareUserPromocodeGrantRequest(buffer_arg) {
224
+ return promocode_pb.PrepareUserPromocodeGrantRequest.deserializeBinary(new Uint8Array(buffer_arg));
225
+ }
226
+
227
+ function serialize_promocode_PrepareUserPromocodeGrantResponse(arg) {
228
+ if (!(arg instanceof promocode_pb.PrepareUserPromocodeGrantResponse)) {
229
+ throw new Error('Expected argument of type promocode.PrepareUserPromocodeGrantResponse');
230
+ }
231
+ return Buffer.from(arg.serializeBinary());
232
+ }
233
+
234
+ function deserialize_promocode_PrepareUserPromocodeGrantResponse(buffer_arg) {
235
+ return promocode_pb.PrepareUserPromocodeGrantResponse.deserializeBinary(new Uint8Array(buffer_arg));
236
+ }
237
+
216
238
 
217
239
  var PromocodeService = exports.PromocodeService = {
218
240
  checkConnection: {
@@ -361,6 +383,17 @@ applyUserPromocode: {
361
383
  responseSerialize: serialize_promocode_ApplyUserPromocodeResponse,
362
384
  responseDeserialize: deserialize_promocode_ApplyUserPromocodeResponse,
363
385
  },
386
+ prepareUserPromocodeGrant: {
387
+ path: '/promocode.Promocode/prepareUserPromocodeGrant',
388
+ requestStream: false,
389
+ responseStream: false,
390
+ requestType: promocode_pb.PrepareUserPromocodeGrantRequest,
391
+ responseType: promocode_pb.PrepareUserPromocodeGrantResponse,
392
+ requestSerialize: serialize_promocode_PrepareUserPromocodeGrantRequest,
393
+ requestDeserialize: deserialize_promocode_PrepareUserPromocodeGrantRequest,
394
+ responseSerialize: serialize_promocode_PrepareUserPromocodeGrantResponse,
395
+ responseDeserialize: deserialize_promocode_PrepareUserPromocodeGrantResponse,
396
+ },
364
397
  batchGetUserPromocodeSnapshots: {
365
398
  path: '/promocode.Promocode/batchGetUserPromocodeSnapshots',
366
399
  requestStream: false,
@@ -43,6 +43,8 @@ goog.exportSymbol('proto.promocode.ItemsBunchRequest', null, global);
43
43
  goog.exportSymbol('proto.promocode.PaginationRequest', null, global);
44
44
  goog.exportSymbol('proto.promocode.PingRequest', null, global);
45
45
  goog.exportSymbol('proto.promocode.PongResponse', null, global);
46
+ goog.exportSymbol('proto.promocode.PrepareUserPromocodeGrantRequest', null, global);
47
+ goog.exportSymbol('proto.promocode.PrepareUserPromocodeGrantResponse', null, global);
46
48
  goog.exportSymbol('proto.promocode.SearchRequest', null, global);
47
49
  goog.exportSymbol('proto.promocode.UserPromocodeSnapshotItem', null, global);
48
50
  goog.exportSymbol('proto.promocode.UserSearchRequest', null, global);
@@ -508,6 +510,48 @@ if (goog.DEBUG && !COMPILED) {
508
510
  */
509
511
  proto.promocode.ApplyUserPromocodeResponse.displayName = 'proto.promocode.ApplyUserPromocodeResponse';
510
512
  }
513
+ /**
514
+ * Generated by JsPbCodeGenerator.
515
+ * @param {Array=} opt_data Optional initial data array, typically from a
516
+ * server response, or constructed directly in Javascript. The array is used
517
+ * in place and becomes part of the constructed object. It is not cloned.
518
+ * If no data is provided, the constructed object will be empty, but still
519
+ * valid.
520
+ * @extends {jspb.Message}
521
+ * @constructor
522
+ */
523
+ proto.promocode.PrepareUserPromocodeGrantRequest = function(opt_data) {
524
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
525
+ };
526
+ goog.inherits(proto.promocode.PrepareUserPromocodeGrantRequest, jspb.Message);
527
+ if (goog.DEBUG && !COMPILED) {
528
+ /**
529
+ * @public
530
+ * @override
531
+ */
532
+ proto.promocode.PrepareUserPromocodeGrantRequest.displayName = 'proto.promocode.PrepareUserPromocodeGrantRequest';
533
+ }
534
+ /**
535
+ * Generated by JsPbCodeGenerator.
536
+ * @param {Array=} opt_data Optional initial data array, typically from a
537
+ * server response, or constructed directly in Javascript. The array is used
538
+ * in place and becomes part of the constructed object. It is not cloned.
539
+ * If no data is provided, the constructed object will be empty, but still
540
+ * valid.
541
+ * @extends {jspb.Message}
542
+ * @constructor
543
+ */
544
+ proto.promocode.PrepareUserPromocodeGrantResponse = function(opt_data) {
545
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
546
+ };
547
+ goog.inherits(proto.promocode.PrepareUserPromocodeGrantResponse, jspb.Message);
548
+ if (goog.DEBUG && !COMPILED) {
549
+ /**
550
+ * @public
551
+ * @override
552
+ */
553
+ proto.promocode.PrepareUserPromocodeGrantResponse.displayName = 'proto.promocode.PrepareUserPromocodeGrantResponse';
554
+ }
511
555
  /**
512
556
  * Generated by JsPbCodeGenerator.
513
557
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -8419,6 +8463,638 @@ proto.promocode.ApplyUserPromocodeResponse.prototype.hasStatus = function() {
8419
8463
 
8420
8464
 
8421
8465
 
8466
+
8467
+
8468
+ if (jspb.Message.GENERATE_TO_OBJECT) {
8469
+ /**
8470
+ * Creates an object representation of this proto.
8471
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
8472
+ * Optional fields that are not set will be set to undefined.
8473
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
8474
+ * For the list of reserved names please see:
8475
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
8476
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
8477
+ * JSPB instance for transitional soy proto support:
8478
+ * http://goto/soy-param-migration
8479
+ * @return {!Object}
8480
+ */
8481
+ proto.promocode.PrepareUserPromocodeGrantRequest.prototype.toObject = function(opt_includeInstance) {
8482
+ return proto.promocode.PrepareUserPromocodeGrantRequest.toObject(opt_includeInstance, this);
8483
+ };
8484
+
8485
+
8486
+ /**
8487
+ * Static version of the {@see toObject} method.
8488
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
8489
+ * the JSPB instance for transitional soy proto support:
8490
+ * http://goto/soy-param-migration
8491
+ * @param {!proto.promocode.PrepareUserPromocodeGrantRequest} msg The msg instance to transform.
8492
+ * @return {!Object}
8493
+ * @suppress {unusedLocalVariables} f is only used for nested messages
8494
+ */
8495
+ proto.promocode.PrepareUserPromocodeGrantRequest.toObject = function(includeInstance, msg) {
8496
+ var f, obj = {
8497
+ userId: jspb.Message.getFieldWithDefault(msg, 1, 0),
8498
+ promoCode: jspb.Message.getFieldWithDefault(msg, 2, ""),
8499
+ activationArea: jspb.Message.getFieldWithDefault(msg, 3, ""),
8500
+ targetDomain: jspb.Message.getFieldWithDefault(msg, 4, ""),
8501
+ currency: jspb.Message.getFieldWithDefault(msg, 5, ""),
8502
+ country: jspb.Message.getFieldWithDefault(msg, 6, ""),
8503
+ locale: jspb.Message.getFieldWithDefault(msg, 7, "")
8504
+ };
8505
+
8506
+ if (includeInstance) {
8507
+ obj.$jspbMessageInstance = msg;
8508
+ }
8509
+ return obj;
8510
+ };
8511
+ }
8512
+
8513
+
8514
+ /**
8515
+ * Deserializes binary data (in protobuf wire format).
8516
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
8517
+ * @return {!proto.promocode.PrepareUserPromocodeGrantRequest}
8518
+ */
8519
+ proto.promocode.PrepareUserPromocodeGrantRequest.deserializeBinary = function(bytes) {
8520
+ var reader = new jspb.BinaryReader(bytes);
8521
+ var msg = new proto.promocode.PrepareUserPromocodeGrantRequest;
8522
+ return proto.promocode.PrepareUserPromocodeGrantRequest.deserializeBinaryFromReader(msg, reader);
8523
+ };
8524
+
8525
+
8526
+ /**
8527
+ * Deserializes binary data (in protobuf wire format) from the
8528
+ * given reader into the given message object.
8529
+ * @param {!proto.promocode.PrepareUserPromocodeGrantRequest} msg The message object to deserialize into.
8530
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
8531
+ * @return {!proto.promocode.PrepareUserPromocodeGrantRequest}
8532
+ */
8533
+ proto.promocode.PrepareUserPromocodeGrantRequest.deserializeBinaryFromReader = function(msg, reader) {
8534
+ while (reader.nextField()) {
8535
+ if (reader.isEndGroup()) {
8536
+ break;
8537
+ }
8538
+ var field = reader.getFieldNumber();
8539
+ switch (field) {
8540
+ case 1:
8541
+ var value = /** @type {number} */ (reader.readInt32());
8542
+ msg.setUserId(value);
8543
+ break;
8544
+ case 2:
8545
+ var value = /** @type {string} */ (reader.readString());
8546
+ msg.setPromoCode(value);
8547
+ break;
8548
+ case 3:
8549
+ var value = /** @type {string} */ (reader.readString());
8550
+ msg.setActivationArea(value);
8551
+ break;
8552
+ case 4:
8553
+ var value = /** @type {string} */ (reader.readString());
8554
+ msg.setTargetDomain(value);
8555
+ break;
8556
+ case 5:
8557
+ var value = /** @type {string} */ (reader.readString());
8558
+ msg.setCurrency(value);
8559
+ break;
8560
+ case 6:
8561
+ var value = /** @type {string} */ (reader.readString());
8562
+ msg.setCountry(value);
8563
+ break;
8564
+ case 7:
8565
+ var value = /** @type {string} */ (reader.readString());
8566
+ msg.setLocale(value);
8567
+ break;
8568
+ default:
8569
+ reader.skipField();
8570
+ break;
8571
+ }
8572
+ }
8573
+ return msg;
8574
+ };
8575
+
8576
+
8577
+ /**
8578
+ * Serializes the message to binary data (in protobuf wire format).
8579
+ * @return {!Uint8Array}
8580
+ */
8581
+ proto.promocode.PrepareUserPromocodeGrantRequest.prototype.serializeBinary = function() {
8582
+ var writer = new jspb.BinaryWriter();
8583
+ proto.promocode.PrepareUserPromocodeGrantRequest.serializeBinaryToWriter(this, writer);
8584
+ return writer.getResultBuffer();
8585
+ };
8586
+
8587
+
8588
+ /**
8589
+ * Serializes the given message to binary data (in protobuf wire
8590
+ * format), writing to the given BinaryWriter.
8591
+ * @param {!proto.promocode.PrepareUserPromocodeGrantRequest} message
8592
+ * @param {!jspb.BinaryWriter} writer
8593
+ * @suppress {unusedLocalVariables} f is only used for nested messages
8594
+ */
8595
+ proto.promocode.PrepareUserPromocodeGrantRequest.serializeBinaryToWriter = function(message, writer) {
8596
+ var f = undefined;
8597
+ f = message.getUserId();
8598
+ if (f !== 0) {
8599
+ writer.writeInt32(
8600
+ 1,
8601
+ f
8602
+ );
8603
+ }
8604
+ f = message.getPromoCode();
8605
+ if (f.length > 0) {
8606
+ writer.writeString(
8607
+ 2,
8608
+ f
8609
+ );
8610
+ }
8611
+ f = message.getActivationArea();
8612
+ if (f.length > 0) {
8613
+ writer.writeString(
8614
+ 3,
8615
+ f
8616
+ );
8617
+ }
8618
+ f = message.getTargetDomain();
8619
+ if (f.length > 0) {
8620
+ writer.writeString(
8621
+ 4,
8622
+ f
8623
+ );
8624
+ }
8625
+ f = /** @type {string} */ (jspb.Message.getField(message, 5));
8626
+ if (f != null) {
8627
+ writer.writeString(
8628
+ 5,
8629
+ f
8630
+ );
8631
+ }
8632
+ f = /** @type {string} */ (jspb.Message.getField(message, 6));
8633
+ if (f != null) {
8634
+ writer.writeString(
8635
+ 6,
8636
+ f
8637
+ );
8638
+ }
8639
+ f = /** @type {string} */ (jspb.Message.getField(message, 7));
8640
+ if (f != null) {
8641
+ writer.writeString(
8642
+ 7,
8643
+ f
8644
+ );
8645
+ }
8646
+ };
8647
+
8648
+
8649
+ /**
8650
+ * optional int32 user_id = 1;
8651
+ * @return {number}
8652
+ */
8653
+ proto.promocode.PrepareUserPromocodeGrantRequest.prototype.getUserId = function() {
8654
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
8655
+ };
8656
+
8657
+
8658
+ /**
8659
+ * @param {number} value
8660
+ * @return {!proto.promocode.PrepareUserPromocodeGrantRequest} returns this
8661
+ */
8662
+ proto.promocode.PrepareUserPromocodeGrantRequest.prototype.setUserId = function(value) {
8663
+ return jspb.Message.setProto3IntField(this, 1, value);
8664
+ };
8665
+
8666
+
8667
+ /**
8668
+ * optional string promo_code = 2;
8669
+ * @return {string}
8670
+ */
8671
+ proto.promocode.PrepareUserPromocodeGrantRequest.prototype.getPromoCode = function() {
8672
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
8673
+ };
8674
+
8675
+
8676
+ /**
8677
+ * @param {string} value
8678
+ * @return {!proto.promocode.PrepareUserPromocodeGrantRequest} returns this
8679
+ */
8680
+ proto.promocode.PrepareUserPromocodeGrantRequest.prototype.setPromoCode = function(value) {
8681
+ return jspb.Message.setProto3StringField(this, 2, value);
8682
+ };
8683
+
8684
+
8685
+ /**
8686
+ * optional string activation_area = 3;
8687
+ * @return {string}
8688
+ */
8689
+ proto.promocode.PrepareUserPromocodeGrantRequest.prototype.getActivationArea = function() {
8690
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
8691
+ };
8692
+
8693
+
8694
+ /**
8695
+ * @param {string} value
8696
+ * @return {!proto.promocode.PrepareUserPromocodeGrantRequest} returns this
8697
+ */
8698
+ proto.promocode.PrepareUserPromocodeGrantRequest.prototype.setActivationArea = function(value) {
8699
+ return jspb.Message.setProto3StringField(this, 3, value);
8700
+ };
8701
+
8702
+
8703
+ /**
8704
+ * optional string target_domain = 4;
8705
+ * @return {string}
8706
+ */
8707
+ proto.promocode.PrepareUserPromocodeGrantRequest.prototype.getTargetDomain = function() {
8708
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
8709
+ };
8710
+
8711
+
8712
+ /**
8713
+ * @param {string} value
8714
+ * @return {!proto.promocode.PrepareUserPromocodeGrantRequest} returns this
8715
+ */
8716
+ proto.promocode.PrepareUserPromocodeGrantRequest.prototype.setTargetDomain = function(value) {
8717
+ return jspb.Message.setProto3StringField(this, 4, value);
8718
+ };
8719
+
8720
+
8721
+ /**
8722
+ * optional string currency = 5;
8723
+ * @return {string}
8724
+ */
8725
+ proto.promocode.PrepareUserPromocodeGrantRequest.prototype.getCurrency = function() {
8726
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
8727
+ };
8728
+
8729
+
8730
+ /**
8731
+ * @param {string} value
8732
+ * @return {!proto.promocode.PrepareUserPromocodeGrantRequest} returns this
8733
+ */
8734
+ proto.promocode.PrepareUserPromocodeGrantRequest.prototype.setCurrency = function(value) {
8735
+ return jspb.Message.setField(this, 5, value);
8736
+ };
8737
+
8738
+
8739
+ /**
8740
+ * Clears the field making it undefined.
8741
+ * @return {!proto.promocode.PrepareUserPromocodeGrantRequest} returns this
8742
+ */
8743
+ proto.promocode.PrepareUserPromocodeGrantRequest.prototype.clearCurrency = function() {
8744
+ return jspb.Message.setField(this, 5, undefined);
8745
+ };
8746
+
8747
+
8748
+ /**
8749
+ * Returns whether this field is set.
8750
+ * @return {boolean}
8751
+ */
8752
+ proto.promocode.PrepareUserPromocodeGrantRequest.prototype.hasCurrency = function() {
8753
+ return jspb.Message.getField(this, 5) != null;
8754
+ };
8755
+
8756
+
8757
+ /**
8758
+ * optional string country = 6;
8759
+ * @return {string}
8760
+ */
8761
+ proto.promocode.PrepareUserPromocodeGrantRequest.prototype.getCountry = function() {
8762
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
8763
+ };
8764
+
8765
+
8766
+ /**
8767
+ * @param {string} value
8768
+ * @return {!proto.promocode.PrepareUserPromocodeGrantRequest} returns this
8769
+ */
8770
+ proto.promocode.PrepareUserPromocodeGrantRequest.prototype.setCountry = function(value) {
8771
+ return jspb.Message.setField(this, 6, value);
8772
+ };
8773
+
8774
+
8775
+ /**
8776
+ * Clears the field making it undefined.
8777
+ * @return {!proto.promocode.PrepareUserPromocodeGrantRequest} returns this
8778
+ */
8779
+ proto.promocode.PrepareUserPromocodeGrantRequest.prototype.clearCountry = function() {
8780
+ return jspb.Message.setField(this, 6, undefined);
8781
+ };
8782
+
8783
+
8784
+ /**
8785
+ * Returns whether this field is set.
8786
+ * @return {boolean}
8787
+ */
8788
+ proto.promocode.PrepareUserPromocodeGrantRequest.prototype.hasCountry = function() {
8789
+ return jspb.Message.getField(this, 6) != null;
8790
+ };
8791
+
8792
+
8793
+ /**
8794
+ * optional string locale = 7;
8795
+ * @return {string}
8796
+ */
8797
+ proto.promocode.PrepareUserPromocodeGrantRequest.prototype.getLocale = function() {
8798
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
8799
+ };
8800
+
8801
+
8802
+ /**
8803
+ * @param {string} value
8804
+ * @return {!proto.promocode.PrepareUserPromocodeGrantRequest} returns this
8805
+ */
8806
+ proto.promocode.PrepareUserPromocodeGrantRequest.prototype.setLocale = function(value) {
8807
+ return jspb.Message.setField(this, 7, value);
8808
+ };
8809
+
8810
+
8811
+ /**
8812
+ * Clears the field making it undefined.
8813
+ * @return {!proto.promocode.PrepareUserPromocodeGrantRequest} returns this
8814
+ */
8815
+ proto.promocode.PrepareUserPromocodeGrantRequest.prototype.clearLocale = function() {
8816
+ return jspb.Message.setField(this, 7, undefined);
8817
+ };
8818
+
8819
+
8820
+ /**
8821
+ * Returns whether this field is set.
8822
+ * @return {boolean}
8823
+ */
8824
+ proto.promocode.PrepareUserPromocodeGrantRequest.prototype.hasLocale = function() {
8825
+ return jspb.Message.getField(this, 7) != null;
8826
+ };
8827
+
8828
+
8829
+
8830
+
8831
+
8832
+ if (jspb.Message.GENERATE_TO_OBJECT) {
8833
+ /**
8834
+ * Creates an object representation of this proto.
8835
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
8836
+ * Optional fields that are not set will be set to undefined.
8837
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
8838
+ * For the list of reserved names please see:
8839
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
8840
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
8841
+ * JSPB instance for transitional soy proto support:
8842
+ * http://goto/soy-param-migration
8843
+ * @return {!Object}
8844
+ */
8845
+ proto.promocode.PrepareUserPromocodeGrantResponse.prototype.toObject = function(opt_includeInstance) {
8846
+ return proto.promocode.PrepareUserPromocodeGrantResponse.toObject(opt_includeInstance, this);
8847
+ };
8848
+
8849
+
8850
+ /**
8851
+ * Static version of the {@see toObject} method.
8852
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
8853
+ * the JSPB instance for transitional soy proto support:
8854
+ * http://goto/soy-param-migration
8855
+ * @param {!proto.promocode.PrepareUserPromocodeGrantResponse} msg The msg instance to transform.
8856
+ * @return {!Object}
8857
+ * @suppress {unusedLocalVariables} f is only used for nested messages
8858
+ */
8859
+ proto.promocode.PrepareUserPromocodeGrantResponse.toObject = function(includeInstance, msg) {
8860
+ var f, obj = {
8861
+ status: jspb.Message.getFieldWithDefault(msg, 1, ""),
8862
+ promocodeId: jspb.Message.getFieldWithDefault(msg, 2, 0),
8863
+ targetBonusId: jspb.Message.getFieldWithDefault(msg, 3, 0),
8864
+ applicationMode: jspb.Message.getFieldWithDefault(msg, 4, ""),
8865
+ currency: jspb.Message.getFieldWithDefault(msg, 5, "")
8866
+ };
8867
+
8868
+ if (includeInstance) {
8869
+ obj.$jspbMessageInstance = msg;
8870
+ }
8871
+ return obj;
8872
+ };
8873
+ }
8874
+
8875
+
8876
+ /**
8877
+ * Deserializes binary data (in protobuf wire format).
8878
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
8879
+ * @return {!proto.promocode.PrepareUserPromocodeGrantResponse}
8880
+ */
8881
+ proto.promocode.PrepareUserPromocodeGrantResponse.deserializeBinary = function(bytes) {
8882
+ var reader = new jspb.BinaryReader(bytes);
8883
+ var msg = new proto.promocode.PrepareUserPromocodeGrantResponse;
8884
+ return proto.promocode.PrepareUserPromocodeGrantResponse.deserializeBinaryFromReader(msg, reader);
8885
+ };
8886
+
8887
+
8888
+ /**
8889
+ * Deserializes binary data (in protobuf wire format) from the
8890
+ * given reader into the given message object.
8891
+ * @param {!proto.promocode.PrepareUserPromocodeGrantResponse} msg The message object to deserialize into.
8892
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
8893
+ * @return {!proto.promocode.PrepareUserPromocodeGrantResponse}
8894
+ */
8895
+ proto.promocode.PrepareUserPromocodeGrantResponse.deserializeBinaryFromReader = function(msg, reader) {
8896
+ while (reader.nextField()) {
8897
+ if (reader.isEndGroup()) {
8898
+ break;
8899
+ }
8900
+ var field = reader.getFieldNumber();
8901
+ switch (field) {
8902
+ case 1:
8903
+ var value = /** @type {string} */ (reader.readString());
8904
+ msg.setStatus(value);
8905
+ break;
8906
+ case 2:
8907
+ var value = /** @type {number} */ (reader.readInt32());
8908
+ msg.setPromocodeId(value);
8909
+ break;
8910
+ case 3:
8911
+ var value = /** @type {number} */ (reader.readInt32());
8912
+ msg.setTargetBonusId(value);
8913
+ break;
8914
+ case 4:
8915
+ var value = /** @type {string} */ (reader.readString());
8916
+ msg.setApplicationMode(value);
8917
+ break;
8918
+ case 5:
8919
+ var value = /** @type {string} */ (reader.readString());
8920
+ msg.setCurrency(value);
8921
+ break;
8922
+ default:
8923
+ reader.skipField();
8924
+ break;
8925
+ }
8926
+ }
8927
+ return msg;
8928
+ };
8929
+
8930
+
8931
+ /**
8932
+ * Serializes the message to binary data (in protobuf wire format).
8933
+ * @return {!Uint8Array}
8934
+ */
8935
+ proto.promocode.PrepareUserPromocodeGrantResponse.prototype.serializeBinary = function() {
8936
+ var writer = new jspb.BinaryWriter();
8937
+ proto.promocode.PrepareUserPromocodeGrantResponse.serializeBinaryToWriter(this, writer);
8938
+ return writer.getResultBuffer();
8939
+ };
8940
+
8941
+
8942
+ /**
8943
+ * Serializes the given message to binary data (in protobuf wire
8944
+ * format), writing to the given BinaryWriter.
8945
+ * @param {!proto.promocode.PrepareUserPromocodeGrantResponse} message
8946
+ * @param {!jspb.BinaryWriter} writer
8947
+ * @suppress {unusedLocalVariables} f is only used for nested messages
8948
+ */
8949
+ proto.promocode.PrepareUserPromocodeGrantResponse.serializeBinaryToWriter = function(message, writer) {
8950
+ var f = undefined;
8951
+ f = message.getStatus();
8952
+ if (f.length > 0) {
8953
+ writer.writeString(
8954
+ 1,
8955
+ f
8956
+ );
8957
+ }
8958
+ f = message.getPromocodeId();
8959
+ if (f !== 0) {
8960
+ writer.writeInt32(
8961
+ 2,
8962
+ f
8963
+ );
8964
+ }
8965
+ f = message.getTargetBonusId();
8966
+ if (f !== 0) {
8967
+ writer.writeInt32(
8968
+ 3,
8969
+ f
8970
+ );
8971
+ }
8972
+ f = message.getApplicationMode();
8973
+ if (f.length > 0) {
8974
+ writer.writeString(
8975
+ 4,
8976
+ f
8977
+ );
8978
+ }
8979
+ f = /** @type {string} */ (jspb.Message.getField(message, 5));
8980
+ if (f != null) {
8981
+ writer.writeString(
8982
+ 5,
8983
+ f
8984
+ );
8985
+ }
8986
+ };
8987
+
8988
+
8989
+ /**
8990
+ * optional string status = 1;
8991
+ * @return {string}
8992
+ */
8993
+ proto.promocode.PrepareUserPromocodeGrantResponse.prototype.getStatus = function() {
8994
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
8995
+ };
8996
+
8997
+
8998
+ /**
8999
+ * @param {string} value
9000
+ * @return {!proto.promocode.PrepareUserPromocodeGrantResponse} returns this
9001
+ */
9002
+ proto.promocode.PrepareUserPromocodeGrantResponse.prototype.setStatus = function(value) {
9003
+ return jspb.Message.setProto3StringField(this, 1, value);
9004
+ };
9005
+
9006
+
9007
+ /**
9008
+ * optional int32 promocode_id = 2;
9009
+ * @return {number}
9010
+ */
9011
+ proto.promocode.PrepareUserPromocodeGrantResponse.prototype.getPromocodeId = function() {
9012
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
9013
+ };
9014
+
9015
+
9016
+ /**
9017
+ * @param {number} value
9018
+ * @return {!proto.promocode.PrepareUserPromocodeGrantResponse} returns this
9019
+ */
9020
+ proto.promocode.PrepareUserPromocodeGrantResponse.prototype.setPromocodeId = function(value) {
9021
+ return jspb.Message.setProto3IntField(this, 2, value);
9022
+ };
9023
+
9024
+
9025
+ /**
9026
+ * optional int32 target_bonus_id = 3;
9027
+ * @return {number}
9028
+ */
9029
+ proto.promocode.PrepareUserPromocodeGrantResponse.prototype.getTargetBonusId = function() {
9030
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
9031
+ };
9032
+
9033
+
9034
+ /**
9035
+ * @param {number} value
9036
+ * @return {!proto.promocode.PrepareUserPromocodeGrantResponse} returns this
9037
+ */
9038
+ proto.promocode.PrepareUserPromocodeGrantResponse.prototype.setTargetBonusId = function(value) {
9039
+ return jspb.Message.setProto3IntField(this, 3, value);
9040
+ };
9041
+
9042
+
9043
+ /**
9044
+ * optional string application_mode = 4;
9045
+ * @return {string}
9046
+ */
9047
+ proto.promocode.PrepareUserPromocodeGrantResponse.prototype.getApplicationMode = function() {
9048
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
9049
+ };
9050
+
9051
+
9052
+ /**
9053
+ * @param {string} value
9054
+ * @return {!proto.promocode.PrepareUserPromocodeGrantResponse} returns this
9055
+ */
9056
+ proto.promocode.PrepareUserPromocodeGrantResponse.prototype.setApplicationMode = function(value) {
9057
+ return jspb.Message.setProto3StringField(this, 4, value);
9058
+ };
9059
+
9060
+
9061
+ /**
9062
+ * optional string currency = 5;
9063
+ * @return {string}
9064
+ */
9065
+ proto.promocode.PrepareUserPromocodeGrantResponse.prototype.getCurrency = function() {
9066
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
9067
+ };
9068
+
9069
+
9070
+ /**
9071
+ * @param {string} value
9072
+ * @return {!proto.promocode.PrepareUserPromocodeGrantResponse} returns this
9073
+ */
9074
+ proto.promocode.PrepareUserPromocodeGrantResponse.prototype.setCurrency = function(value) {
9075
+ return jspb.Message.setField(this, 5, value);
9076
+ };
9077
+
9078
+
9079
+ /**
9080
+ * Clears the field making it undefined.
9081
+ * @return {!proto.promocode.PrepareUserPromocodeGrantResponse} returns this
9082
+ */
9083
+ proto.promocode.PrepareUserPromocodeGrantResponse.prototype.clearCurrency = function() {
9084
+ return jspb.Message.setField(this, 5, undefined);
9085
+ };
9086
+
9087
+
9088
+ /**
9089
+ * Returns whether this field is set.
9090
+ * @return {boolean}
9091
+ */
9092
+ proto.promocode.PrepareUserPromocodeGrantResponse.prototype.hasCurrency = function() {
9093
+ return jspb.Message.getField(this, 5) != null;
9094
+ };
9095
+
9096
+
9097
+
8422
9098
  /**
8423
9099
  * List of repeated fields within this message type.
8424
9100
  * @private {!Array<number>}