protobuf-platform 1.2.400 → 1.2.402

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
@@ -24,6 +24,7 @@ service Bonus {
24
24
  rpc cancelUserBonus(GetUserBonusRequest) returns (BonusStatusResponse);
25
25
  rpc activateUserBonus(GetUserBonusRequest) returns (BonusStatusResponse);
26
26
  rpc applyUserPromocodeToUserBonus(ApplyUserPromocodeToUserBonusRequest) returns (BonusStatusResponse);
27
+ rpc applyUserBonusPromocode(ApplyUserBonusPromocodeRequest) returns (BonusStatusResponse);
27
28
  rpc getUserBonuses(PaginationRequest) returns (UserBonusItemsResponse);
28
29
  rpc checkBonusForUser(GetUserBonusRequest) returns (UserBonusItem);
29
30
  rpc getUserBonusesHistory(PaginationRequest) returns (UserBonusItemsResponse);
@@ -338,6 +339,14 @@ message ApplyUserPromocodeToUserBonusRequest {
338
339
  optional string country = 5;
339
340
  optional string locale = 6;
340
341
  }
342
+ message ApplyUserBonusPromocodeRequest {
343
+ int32 user_id = 1;
344
+ string promo_code = 2;
345
+ optional int32 user_bonus_id = 3;
346
+ optional string currency = 4;
347
+ optional string country = 5;
348
+ optional string locale = 6;
349
+ }
341
350
  message UserBonusItemsResponse {
342
351
  repeated UserBonusItem items = 1;
343
352
  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_ApplyUserBonusPromocodeRequest(arg) {
19
+ if (!(arg instanceof bonus_pb.ApplyUserBonusPromocodeRequest)) {
20
+ throw new Error('Expected argument of type bonus.ApplyUserBonusPromocodeRequest');
21
+ }
22
+ return Buffer.from(arg.serializeBinary());
23
+ }
24
+
25
+ function deserialize_bonus_ApplyUserBonusPromocodeRequest(buffer_arg) {
26
+ return bonus_pb.ApplyUserBonusPromocodeRequest.deserializeBinary(new Uint8Array(buffer_arg));
27
+ }
28
+
18
29
  function serialize_bonus_ApplyUserPromocodeToUserBonusRequest(arg) {
19
30
  if (!(arg instanceof bonus_pb.ApplyUserPromocodeToUserBonusRequest)) {
20
31
  throw new Error('Expected argument of type bonus.ApplyUserPromocodeToUserBonusRequest');
@@ -635,6 +646,17 @@ claimUserBonus: {
635
646
  responseSerialize: serialize_bonus_BonusStatusResponse,
636
647
  responseDeserialize: deserialize_bonus_BonusStatusResponse,
637
648
  },
649
+ applyUserBonusPromocode: {
650
+ path: '/bonus.Bonus/applyUserBonusPromocode',
651
+ requestStream: false,
652
+ responseStream: false,
653
+ requestType: bonus_pb.ApplyUserBonusPromocodeRequest,
654
+ responseType: bonus_pb.BonusStatusResponse,
655
+ requestSerialize: serialize_bonus_ApplyUserBonusPromocodeRequest,
656
+ requestDeserialize: deserialize_bonus_ApplyUserBonusPromocodeRequest,
657
+ responseSerialize: serialize_bonus_BonusStatusResponse,
658
+ responseDeserialize: deserialize_bonus_BonusStatusResponse,
659
+ },
638
660
  getUserBonuses: {
639
661
  path: '/bonus.Bonus/getUserBonuses',
640
662
  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.ApplyUserBonusPromocodeRequest', null, global);
27
28
  goog.exportSymbol('proto.bonus.ApplyUserPromocodeToUserBonusRequest', null, global);
28
29
  goog.exportSymbol('proto.bonus.BetsRange', null, global);
29
30
  goog.exportSymbol('proto.bonus.BonusActivationRulesRequest', null, global);
@@ -769,6 +770,27 @@ if (goog.DEBUG && !COMPILED) {
769
770
  */
770
771
  proto.bonus.ApplyUserPromocodeToUserBonusRequest.displayName = 'proto.bonus.ApplyUserPromocodeToUserBonusRequest';
771
772
  }
773
+ /**
774
+ * Generated by JsPbCodeGenerator.
775
+ * @param {Array=} opt_data Optional initial data array, typically from a
776
+ * server response, or constructed directly in Javascript. The array is used
777
+ * in place and becomes part of the constructed object. It is not cloned.
778
+ * If no data is provided, the constructed object will be empty, but still
779
+ * valid.
780
+ * @extends {jspb.Message}
781
+ * @constructor
782
+ */
783
+ proto.bonus.ApplyUserBonusPromocodeRequest = function(opt_data) {
784
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
785
+ };
786
+ goog.inherits(proto.bonus.ApplyUserBonusPromocodeRequest, jspb.Message);
787
+ if (goog.DEBUG && !COMPILED) {
788
+ /**
789
+ * @public
790
+ * @override
791
+ */
792
+ proto.bonus.ApplyUserBonusPromocodeRequest.displayName = 'proto.bonus.ApplyUserBonusPromocodeRequest';
793
+ }
772
794
  /**
773
795
  * Generated by JsPbCodeGenerator.
774
796
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -14886,6 +14908,358 @@ proto.bonus.ApplyUserPromocodeToUserBonusRequest.prototype.hasLocale = function(
14886
14908
 
14887
14909
 
14888
14910
 
14911
+
14912
+
14913
+ if (jspb.Message.GENERATE_TO_OBJECT) {
14914
+ /**
14915
+ * Creates an object representation of this proto.
14916
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
14917
+ * Optional fields that are not set will be set to undefined.
14918
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
14919
+ * For the list of reserved names please see:
14920
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
14921
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
14922
+ * JSPB instance for transitional soy proto support:
14923
+ * http://goto/soy-param-migration
14924
+ * @return {!Object}
14925
+ */
14926
+ proto.bonus.ApplyUserBonusPromocodeRequest.prototype.toObject = function(opt_includeInstance) {
14927
+ return proto.bonus.ApplyUserBonusPromocodeRequest.toObject(opt_includeInstance, this);
14928
+ };
14929
+
14930
+
14931
+ /**
14932
+ * Static version of the {@see toObject} method.
14933
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
14934
+ * the JSPB instance for transitional soy proto support:
14935
+ * http://goto/soy-param-migration
14936
+ * @param {!proto.bonus.ApplyUserBonusPromocodeRequest} msg The msg instance to transform.
14937
+ * @return {!Object}
14938
+ * @suppress {unusedLocalVariables} f is only used for nested messages
14939
+ */
14940
+ proto.bonus.ApplyUserBonusPromocodeRequest.toObject = function(includeInstance, msg) {
14941
+ var f, obj = {
14942
+ userId: jspb.Message.getFieldWithDefault(msg, 1, 0),
14943
+ promoCode: jspb.Message.getFieldWithDefault(msg, 2, ""),
14944
+ userBonusId: jspb.Message.getFieldWithDefault(msg, 3, 0),
14945
+ currency: jspb.Message.getFieldWithDefault(msg, 4, ""),
14946
+ country: jspb.Message.getFieldWithDefault(msg, 5, ""),
14947
+ locale: jspb.Message.getFieldWithDefault(msg, 6, "")
14948
+ };
14949
+
14950
+ if (includeInstance) {
14951
+ obj.$jspbMessageInstance = msg;
14952
+ }
14953
+ return obj;
14954
+ };
14955
+ }
14956
+
14957
+
14958
+ /**
14959
+ * Deserializes binary data (in protobuf wire format).
14960
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
14961
+ * @return {!proto.bonus.ApplyUserBonusPromocodeRequest}
14962
+ */
14963
+ proto.bonus.ApplyUserBonusPromocodeRequest.deserializeBinary = function(bytes) {
14964
+ var reader = new jspb.BinaryReader(bytes);
14965
+ var msg = new proto.bonus.ApplyUserBonusPromocodeRequest;
14966
+ return proto.bonus.ApplyUserBonusPromocodeRequest.deserializeBinaryFromReader(msg, reader);
14967
+ };
14968
+
14969
+
14970
+ /**
14971
+ * Deserializes binary data (in protobuf wire format) from the
14972
+ * given reader into the given message object.
14973
+ * @param {!proto.bonus.ApplyUserBonusPromocodeRequest} msg The message object to deserialize into.
14974
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
14975
+ * @return {!proto.bonus.ApplyUserBonusPromocodeRequest}
14976
+ */
14977
+ proto.bonus.ApplyUserBonusPromocodeRequest.deserializeBinaryFromReader = function(msg, reader) {
14978
+ while (reader.nextField()) {
14979
+ if (reader.isEndGroup()) {
14980
+ break;
14981
+ }
14982
+ var field = reader.getFieldNumber();
14983
+ switch (field) {
14984
+ case 1:
14985
+ var value = /** @type {number} */ (reader.readInt32());
14986
+ msg.setUserId(value);
14987
+ break;
14988
+ case 2:
14989
+ var value = /** @type {string} */ (reader.readString());
14990
+ msg.setPromoCode(value);
14991
+ break;
14992
+ case 3:
14993
+ var value = /** @type {number} */ (reader.readInt32());
14994
+ msg.setUserBonusId(value);
14995
+ break;
14996
+ case 4:
14997
+ var value = /** @type {string} */ (reader.readString());
14998
+ msg.setCurrency(value);
14999
+ break;
15000
+ case 5:
15001
+ var value = /** @type {string} */ (reader.readString());
15002
+ msg.setCountry(value);
15003
+ break;
15004
+ case 6:
15005
+ var value = /** @type {string} */ (reader.readString());
15006
+ msg.setLocale(value);
15007
+ break;
15008
+ default:
15009
+ reader.skipField();
15010
+ break;
15011
+ }
15012
+ }
15013
+ return msg;
15014
+ };
15015
+
15016
+
15017
+ /**
15018
+ * Serializes the message to binary data (in protobuf wire format).
15019
+ * @return {!Uint8Array}
15020
+ */
15021
+ proto.bonus.ApplyUserBonusPromocodeRequest.prototype.serializeBinary = function() {
15022
+ var writer = new jspb.BinaryWriter();
15023
+ proto.bonus.ApplyUserBonusPromocodeRequest.serializeBinaryToWriter(this, writer);
15024
+ return writer.getResultBuffer();
15025
+ };
15026
+
15027
+
15028
+ /**
15029
+ * Serializes the given message to binary data (in protobuf wire
15030
+ * format), writing to the given BinaryWriter.
15031
+ * @param {!proto.bonus.ApplyUserBonusPromocodeRequest} message
15032
+ * @param {!jspb.BinaryWriter} writer
15033
+ * @suppress {unusedLocalVariables} f is only used for nested messages
15034
+ */
15035
+ proto.bonus.ApplyUserBonusPromocodeRequest.serializeBinaryToWriter = function(message, writer) {
15036
+ var f = undefined;
15037
+ f = message.getUserId();
15038
+ if (f !== 0) {
15039
+ writer.writeInt32(
15040
+ 1,
15041
+ f
15042
+ );
15043
+ }
15044
+ f = message.getPromoCode();
15045
+ if (f.length > 0) {
15046
+ writer.writeString(
15047
+ 2,
15048
+ f
15049
+ );
15050
+ }
15051
+ f = /** @type {number} */ (jspb.Message.getField(message, 3));
15052
+ if (f != null) {
15053
+ writer.writeInt32(
15054
+ 3,
15055
+ f
15056
+ );
15057
+ }
15058
+ f = /** @type {string} */ (jspb.Message.getField(message, 4));
15059
+ if (f != null) {
15060
+ writer.writeString(
15061
+ 4,
15062
+ f
15063
+ );
15064
+ }
15065
+ f = /** @type {string} */ (jspb.Message.getField(message, 5));
15066
+ if (f != null) {
15067
+ writer.writeString(
15068
+ 5,
15069
+ f
15070
+ );
15071
+ }
15072
+ f = /** @type {string} */ (jspb.Message.getField(message, 6));
15073
+ if (f != null) {
15074
+ writer.writeString(
15075
+ 6,
15076
+ f
15077
+ );
15078
+ }
15079
+ };
15080
+
15081
+
15082
+ /**
15083
+ * optional int32 user_id = 1;
15084
+ * @return {number}
15085
+ */
15086
+ proto.bonus.ApplyUserBonusPromocodeRequest.prototype.getUserId = function() {
15087
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
15088
+ };
15089
+
15090
+
15091
+ /**
15092
+ * @param {number} value
15093
+ * @return {!proto.bonus.ApplyUserBonusPromocodeRequest} returns this
15094
+ */
15095
+ proto.bonus.ApplyUserBonusPromocodeRequest.prototype.setUserId = function(value) {
15096
+ return jspb.Message.setProto3IntField(this, 1, value);
15097
+ };
15098
+
15099
+
15100
+ /**
15101
+ * optional string promo_code = 2;
15102
+ * @return {string}
15103
+ */
15104
+ proto.bonus.ApplyUserBonusPromocodeRequest.prototype.getPromoCode = function() {
15105
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
15106
+ };
15107
+
15108
+
15109
+ /**
15110
+ * @param {string} value
15111
+ * @return {!proto.bonus.ApplyUserBonusPromocodeRequest} returns this
15112
+ */
15113
+ proto.bonus.ApplyUserBonusPromocodeRequest.prototype.setPromoCode = function(value) {
15114
+ return jspb.Message.setProto3StringField(this, 2, value);
15115
+ };
15116
+
15117
+
15118
+ /**
15119
+ * optional int32 user_bonus_id = 3;
15120
+ * @return {number}
15121
+ */
15122
+ proto.bonus.ApplyUserBonusPromocodeRequest.prototype.getUserBonusId = function() {
15123
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
15124
+ };
15125
+
15126
+
15127
+ /**
15128
+ * @param {number} value
15129
+ * @return {!proto.bonus.ApplyUserBonusPromocodeRequest} returns this
15130
+ */
15131
+ proto.bonus.ApplyUserBonusPromocodeRequest.prototype.setUserBonusId = function(value) {
15132
+ return jspb.Message.setField(this, 3, value);
15133
+ };
15134
+
15135
+
15136
+ /**
15137
+ * Clears the field making it undefined.
15138
+ * @return {!proto.bonus.ApplyUserBonusPromocodeRequest} returns this
15139
+ */
15140
+ proto.bonus.ApplyUserBonusPromocodeRequest.prototype.clearUserBonusId = function() {
15141
+ return jspb.Message.setField(this, 3, undefined);
15142
+ };
15143
+
15144
+
15145
+ /**
15146
+ * Returns whether this field is set.
15147
+ * @return {boolean}
15148
+ */
15149
+ proto.bonus.ApplyUserBonusPromocodeRequest.prototype.hasUserBonusId = function() {
15150
+ return jspb.Message.getField(this, 3) != null;
15151
+ };
15152
+
15153
+
15154
+ /**
15155
+ * optional string currency = 4;
15156
+ * @return {string}
15157
+ */
15158
+ proto.bonus.ApplyUserBonusPromocodeRequest.prototype.getCurrency = function() {
15159
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
15160
+ };
15161
+
15162
+
15163
+ /**
15164
+ * @param {string} value
15165
+ * @return {!proto.bonus.ApplyUserBonusPromocodeRequest} returns this
15166
+ */
15167
+ proto.bonus.ApplyUserBonusPromocodeRequest.prototype.setCurrency = function(value) {
15168
+ return jspb.Message.setField(this, 4, value);
15169
+ };
15170
+
15171
+
15172
+ /**
15173
+ * Clears the field making it undefined.
15174
+ * @return {!proto.bonus.ApplyUserBonusPromocodeRequest} returns this
15175
+ */
15176
+ proto.bonus.ApplyUserBonusPromocodeRequest.prototype.clearCurrency = function() {
15177
+ return jspb.Message.setField(this, 4, undefined);
15178
+ };
15179
+
15180
+
15181
+ /**
15182
+ * Returns whether this field is set.
15183
+ * @return {boolean}
15184
+ */
15185
+ proto.bonus.ApplyUserBonusPromocodeRequest.prototype.hasCurrency = function() {
15186
+ return jspb.Message.getField(this, 4) != null;
15187
+ };
15188
+
15189
+
15190
+ /**
15191
+ * optional string country = 5;
15192
+ * @return {string}
15193
+ */
15194
+ proto.bonus.ApplyUserBonusPromocodeRequest.prototype.getCountry = function() {
15195
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
15196
+ };
15197
+
15198
+
15199
+ /**
15200
+ * @param {string} value
15201
+ * @return {!proto.bonus.ApplyUserBonusPromocodeRequest} returns this
15202
+ */
15203
+ proto.bonus.ApplyUserBonusPromocodeRequest.prototype.setCountry = function(value) {
15204
+ return jspb.Message.setField(this, 5, value);
15205
+ };
15206
+
15207
+
15208
+ /**
15209
+ * Clears the field making it undefined.
15210
+ * @return {!proto.bonus.ApplyUserBonusPromocodeRequest} returns this
15211
+ */
15212
+ proto.bonus.ApplyUserBonusPromocodeRequest.prototype.clearCountry = function() {
15213
+ return jspb.Message.setField(this, 5, undefined);
15214
+ };
15215
+
15216
+
15217
+ /**
15218
+ * Returns whether this field is set.
15219
+ * @return {boolean}
15220
+ */
15221
+ proto.bonus.ApplyUserBonusPromocodeRequest.prototype.hasCountry = function() {
15222
+ return jspb.Message.getField(this, 5) != null;
15223
+ };
15224
+
15225
+
15226
+ /**
15227
+ * optional string locale = 6;
15228
+ * @return {string}
15229
+ */
15230
+ proto.bonus.ApplyUserBonusPromocodeRequest.prototype.getLocale = function() {
15231
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
15232
+ };
15233
+
15234
+
15235
+ /**
15236
+ * @param {string} value
15237
+ * @return {!proto.bonus.ApplyUserBonusPromocodeRequest} returns this
15238
+ */
15239
+ proto.bonus.ApplyUserBonusPromocodeRequest.prototype.setLocale = function(value) {
15240
+ return jspb.Message.setField(this, 6, value);
15241
+ };
15242
+
15243
+
15244
+ /**
15245
+ * Clears the field making it undefined.
15246
+ * @return {!proto.bonus.ApplyUserBonusPromocodeRequest} returns this
15247
+ */
15248
+ proto.bonus.ApplyUserBonusPromocodeRequest.prototype.clearLocale = function() {
15249
+ return jspb.Message.setField(this, 6, undefined);
15250
+ };
15251
+
15252
+
15253
+ /**
15254
+ * Returns whether this field is set.
15255
+ * @return {boolean}
15256
+ */
15257
+ proto.bonus.ApplyUserBonusPromocodeRequest.prototype.hasLocale = function() {
15258
+ return jspb.Message.getField(this, 6) != null;
15259
+ };
15260
+
15261
+
15262
+
14889
15263
  /**
14890
15264
  * List of repeated fields within this message type.
14891
15265
  * @private {!Array<number>}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protobuf-platform",
3
- "version": "1.2.400",
3
+ "version": "1.2.402",
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>}