protobuf-platform 1.2.529 → 1.2.531

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
@@ -454,7 +454,7 @@ message DepositEligibleUserBonusRewardItem {
454
454
  optional string config = 3;
455
455
  }
456
456
  message DepositEligibleUserBonusItem {
457
- int32 user_bonus_id = 1;
457
+ optional int32 user_bonus_id = 1;
458
458
  // UI fields
459
459
  optional string title = 2;
460
460
  // Images
@@ -474,6 +474,7 @@ message DepositEligibleUserBonusItem {
474
474
  optional int32 payout_x = 14;
475
475
  repeated ActivationRule activation_rules = 15;
476
476
  repeated BetsRange bets_range = 16;
477
+ optional int32 bonus_id = 17;
477
478
  }
478
479
  message GetActiveWageringUserBonusesRequest {
479
480
  int32 user_id = 1;
package/bonus/bonus_pb.js CHANGED
@@ -19552,7 +19552,8 @@ proto.bonus.DepositEligibleUserBonusItem.toObject = function(includeInstance, ms
19552
19552
  activationRulesList: jspb.Message.toObjectList(msg.getActivationRulesList(),
19553
19553
  proto.bonus.ActivationRule.toObject, includeInstance),
19554
19554
  betsRangeList: jspb.Message.toObjectList(msg.getBetsRangeList(),
19555
- proto.bonus.BetsRange.toObject, includeInstance)
19555
+ proto.bonus.BetsRange.toObject, includeInstance),
19556
+ bonusId: jspb.Message.getFieldWithDefault(msg, 17, 0)
19556
19557
  };
19557
19558
 
19558
19559
  if (includeInstance) {
@@ -19656,6 +19657,10 @@ proto.bonus.DepositEligibleUserBonusItem.deserializeBinaryFromReader = function(
19656
19657
  reader.readMessage(value,proto.bonus.BetsRange.deserializeBinaryFromReader);
19657
19658
  msg.addBetsRange(value);
19658
19659
  break;
19660
+ case 17:
19661
+ var value = /** @type {number} */ (reader.readInt32());
19662
+ msg.setBonusId(value);
19663
+ break;
19659
19664
  default:
19660
19665
  reader.skipField();
19661
19666
  break;
@@ -19685,8 +19690,8 @@ proto.bonus.DepositEligibleUserBonusItem.prototype.serializeBinary = function()
19685
19690
  */
19686
19691
  proto.bonus.DepositEligibleUserBonusItem.serializeBinaryToWriter = function(message, writer) {
19687
19692
  var f = undefined;
19688
- f = message.getUserBonusId();
19689
- if (f !== 0) {
19693
+ f = /** @type {number} */ (jspb.Message.getField(message, 1));
19694
+ if (f != null) {
19690
19695
  writer.writeInt32(
19691
19696
  1,
19692
19697
  f
@@ -19800,6 +19805,13 @@ proto.bonus.DepositEligibleUserBonusItem.serializeBinaryToWriter = function(mess
19800
19805
  proto.bonus.BetsRange.serializeBinaryToWriter
19801
19806
  );
19802
19807
  }
19808
+ f = /** @type {number} */ (jspb.Message.getField(message, 17));
19809
+ if (f != null) {
19810
+ writer.writeInt32(
19811
+ 17,
19812
+ f
19813
+ );
19814
+ }
19803
19815
  };
19804
19816
 
19805
19817
 
@@ -19817,7 +19829,25 @@ proto.bonus.DepositEligibleUserBonusItem.prototype.getUserBonusId = function() {
19817
19829
  * @return {!proto.bonus.DepositEligibleUserBonusItem} returns this
19818
19830
  */
19819
19831
  proto.bonus.DepositEligibleUserBonusItem.prototype.setUserBonusId = function(value) {
19820
- return jspb.Message.setProto3IntField(this, 1, value);
19832
+ return jspb.Message.setField(this, 1, value);
19833
+ };
19834
+
19835
+
19836
+ /**
19837
+ * Clears the field making it undefined.
19838
+ * @return {!proto.bonus.DepositEligibleUserBonusItem} returns this
19839
+ */
19840
+ proto.bonus.DepositEligibleUserBonusItem.prototype.clearUserBonusId = function() {
19841
+ return jspb.Message.setField(this, 1, undefined);
19842
+ };
19843
+
19844
+
19845
+ /**
19846
+ * Returns whether this field is set.
19847
+ * @return {boolean}
19848
+ */
19849
+ proto.bonus.DepositEligibleUserBonusItem.prototype.hasUserBonusId = function() {
19850
+ return jspb.Message.getField(this, 1) != null;
19821
19851
  };
19822
19852
 
19823
19853
 
@@ -20367,6 +20397,42 @@ proto.bonus.DepositEligibleUserBonusItem.prototype.clearBetsRangeList = function
20367
20397
  };
20368
20398
 
20369
20399
 
20400
+ /**
20401
+ * optional int32 bonus_id = 17;
20402
+ * @return {number}
20403
+ */
20404
+ proto.bonus.DepositEligibleUserBonusItem.prototype.getBonusId = function() {
20405
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 17, 0));
20406
+ };
20407
+
20408
+
20409
+ /**
20410
+ * @param {number} value
20411
+ * @return {!proto.bonus.DepositEligibleUserBonusItem} returns this
20412
+ */
20413
+ proto.bonus.DepositEligibleUserBonusItem.prototype.setBonusId = function(value) {
20414
+ return jspb.Message.setField(this, 17, value);
20415
+ };
20416
+
20417
+
20418
+ /**
20419
+ * Clears the field making it undefined.
20420
+ * @return {!proto.bonus.DepositEligibleUserBonusItem} returns this
20421
+ */
20422
+ proto.bonus.DepositEligibleUserBonusItem.prototype.clearBonusId = function() {
20423
+ return jspb.Message.setField(this, 17, undefined);
20424
+ };
20425
+
20426
+
20427
+ /**
20428
+ * Returns whether this field is set.
20429
+ * @return {boolean}
20430
+ */
20431
+ proto.bonus.DepositEligibleUserBonusItem.prototype.hasBonusId = function() {
20432
+ return jspb.Message.getField(this, 17) != null;
20433
+ };
20434
+
20435
+
20370
20436
 
20371
20437
 
20372
20438
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protobuf-platform",
3
- "version": "1.2.529",
3
+ "version": "1.2.531",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -390,6 +390,7 @@ message AttemptDepositRequest {
390
390
  optional string crypto_wallet = 45;
391
391
  optional string request_currency = 46;
392
392
  optional string antifraud_session = 47;
393
+ optional int32 bonus_id = 48;
393
394
  }
394
395
  message GetDepositRequest {
395
396
  int32 id = 1;
@@ -14695,7 +14695,8 @@ proto.payment.AttemptDepositRequest.toObject = function(includeInstance, msg) {
14695
14695
  ifsc: jspb.Message.getFieldWithDefault(msg, 44, ""),
14696
14696
  cryptoWallet: jspb.Message.getFieldWithDefault(msg, 45, ""),
14697
14697
  requestCurrency: jspb.Message.getFieldWithDefault(msg, 46, ""),
14698
- antifraudSession: jspb.Message.getFieldWithDefault(msg, 47, "")
14698
+ antifraudSession: jspb.Message.getFieldWithDefault(msg, 47, ""),
14699
+ bonusId: jspb.Message.getFieldWithDefault(msg, 48, 0)
14699
14700
  };
14700
14701
 
14701
14702
  if (includeInstance) {
@@ -14920,6 +14921,10 @@ proto.payment.AttemptDepositRequest.deserializeBinaryFromReader = function(msg,
14920
14921
  var value = /** @type {string} */ (reader.readString());
14921
14922
  msg.setAntifraudSession(value);
14922
14923
  break;
14924
+ case 48:
14925
+ var value = /** @type {number} */ (reader.readInt32());
14926
+ msg.setBonusId(value);
14927
+ break;
14923
14928
  default:
14924
14929
  reader.skipField();
14925
14930
  break;
@@ -15278,6 +15283,13 @@ proto.payment.AttemptDepositRequest.serializeBinaryToWriter = function(message,
15278
15283
  f
15279
15284
  );
15280
15285
  }
15286
+ f = /** @type {number} */ (jspb.Message.getField(message, 48));
15287
+ if (f != null) {
15288
+ writer.writeInt32(
15289
+ 48,
15290
+ f
15291
+ );
15292
+ }
15281
15293
  };
15282
15294
 
15283
15295
 
@@ -16919,6 +16931,42 @@ proto.payment.AttemptDepositRequest.prototype.hasAntifraudSession = function() {
16919
16931
  };
16920
16932
 
16921
16933
 
16934
+ /**
16935
+ * optional int32 bonus_id = 48;
16936
+ * @return {number}
16937
+ */
16938
+ proto.payment.AttemptDepositRequest.prototype.getBonusId = function() {
16939
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 48, 0));
16940
+ };
16941
+
16942
+
16943
+ /**
16944
+ * @param {number} value
16945
+ * @return {!proto.payment.AttemptDepositRequest} returns this
16946
+ */
16947
+ proto.payment.AttemptDepositRequest.prototype.setBonusId = function(value) {
16948
+ return jspb.Message.setField(this, 48, value);
16949
+ };
16950
+
16951
+
16952
+ /**
16953
+ * Clears the field making it undefined.
16954
+ * @return {!proto.payment.AttemptDepositRequest} returns this
16955
+ */
16956
+ proto.payment.AttemptDepositRequest.prototype.clearBonusId = function() {
16957
+ return jspb.Message.setField(this, 48, undefined);
16958
+ };
16959
+
16960
+
16961
+ /**
16962
+ * Returns whether this field is set.
16963
+ * @return {boolean}
16964
+ */
16965
+ proto.payment.AttemptDepositRequest.prototype.hasBonusId = function() {
16966
+ return jspb.Message.getField(this, 48) != null;
16967
+ };
16968
+
16969
+
16922
16970
 
16923
16971
 
16924
16972
 
@@ -21,6 +21,7 @@ service Promocode {
21
21
  rpc applyUserPromocode(ApplyUserPromocodeRequest) returns (ApplyUserPromocodeResponse);
22
22
  rpc prepareUserPromocodeGrant(PrepareUserPromocodeGrantRequest) returns (PrepareUserPromocodeGrantResponse);
23
23
  rpc batchGetUserPromocodeSnapshots(BatchGetUserPromocodeSnapshotsRequest) returns (BatchGetUserPromocodeSnapshotsResponse);
24
+ rpc getUserRegistrationPromocode(GetUserRegistrationPromocodeRequest) returns (GetUserRegistrationPromocodeResponse);
24
25
  }
25
26
  message PingRequest { string ping = 1; }
26
27
  message PongResponse { string pong = 1; }
@@ -263,3 +264,10 @@ message UserPromocodeSnapshotItem {
263
264
  message BatchGetUserPromocodeSnapshotsResponse {
264
265
  repeated UserPromocodeSnapshotItem items = 1;
265
266
  }
267
+ message GetUserRegistrationPromocodeRequest {
268
+ int32 user_id = 1;
269
+ }
270
+ message GetUserRegistrationPromocodeResponse {
271
+ bool found = 1;
272
+ optional string promo_code = 2;
273
+ }
@@ -169,6 +169,28 @@ function deserialize_promocode_GetCodeRequest(buffer_arg) {
169
169
  return promocode_pb.GetCodeRequest.deserializeBinary(new Uint8Array(buffer_arg));
170
170
  }
171
171
 
172
+ function serialize_promocode_GetUserRegistrationPromocodeRequest(arg) {
173
+ if (!(arg instanceof promocode_pb.GetUserRegistrationPromocodeRequest)) {
174
+ throw new Error('Expected argument of type promocode.GetUserRegistrationPromocodeRequest');
175
+ }
176
+ return Buffer.from(arg.serializeBinary());
177
+ }
178
+
179
+ function deserialize_promocode_GetUserRegistrationPromocodeRequest(buffer_arg) {
180
+ return promocode_pb.GetUserRegistrationPromocodeRequest.deserializeBinary(new Uint8Array(buffer_arg));
181
+ }
182
+
183
+ function serialize_promocode_GetUserRegistrationPromocodeResponse(arg) {
184
+ if (!(arg instanceof promocode_pb.GetUserRegistrationPromocodeResponse)) {
185
+ throw new Error('Expected argument of type promocode.GetUserRegistrationPromocodeResponse');
186
+ }
187
+ return Buffer.from(arg.serializeBinary());
188
+ }
189
+
190
+ function deserialize_promocode_GetUserRegistrationPromocodeResponse(buffer_arg) {
191
+ return promocode_pb.GetUserRegistrationPromocodeResponse.deserializeBinary(new Uint8Array(buffer_arg));
192
+ }
193
+
172
194
  function serialize_promocode_ItemsBunchRequest(arg) {
173
195
  if (!(arg instanceof promocode_pb.ItemsBunchRequest)) {
174
196
  throw new Error('Expected argument of type promocode.ItemsBunchRequest');
@@ -405,6 +427,17 @@ applyUserPromocode: {
405
427
  responseSerialize: serialize_promocode_BatchGetUserPromocodeSnapshotsResponse,
406
428
  responseDeserialize: deserialize_promocode_BatchGetUserPromocodeSnapshotsResponse,
407
429
  },
430
+ getUserRegistrationPromocode: {
431
+ path: '/promocode.Promocode/getUserRegistrationPromocode',
432
+ requestStream: false,
433
+ responseStream: false,
434
+ requestType: promocode_pb.GetUserRegistrationPromocodeRequest,
435
+ responseType: promocode_pb.GetUserRegistrationPromocodeResponse,
436
+ requestSerialize: serialize_promocode_GetUserRegistrationPromocodeRequest,
437
+ requestDeserialize: deserialize_promocode_GetUserRegistrationPromocodeRequest,
438
+ responseSerialize: serialize_promocode_GetUserRegistrationPromocodeResponse,
439
+ responseDeserialize: deserialize_promocode_GetUserRegistrationPromocodeResponse,
440
+ },
408
441
  };
409
442
 
410
443
  exports.PromocodeClient = grpc.makeGenericClientConstructor(PromocodeService, 'Promocode');
@@ -42,6 +42,8 @@ goog.exportSymbol('proto.promocode.CodeStatusResponse', null, global);
42
42
  goog.exportSymbol('proto.promocode.File', null, global);
43
43
  goog.exportSymbol('proto.promocode.GetBonusMaskRequest', null, global);
44
44
  goog.exportSymbol('proto.promocode.GetCodeRequest', null, global);
45
+ goog.exportSymbol('proto.promocode.GetUserRegistrationPromocodeRequest', null, global);
46
+ goog.exportSymbol('proto.promocode.GetUserRegistrationPromocodeResponse', null, global);
45
47
  goog.exportSymbol('proto.promocode.ItemsBunchRequest', null, global);
46
48
  goog.exportSymbol('proto.promocode.PaginationRequest', null, global);
47
49
  goog.exportSymbol('proto.promocode.PingRequest', null, global);
@@ -660,6 +662,48 @@ if (goog.DEBUG && !COMPILED) {
660
662
  */
661
663
  proto.promocode.BatchGetUserPromocodeSnapshotsResponse.displayName = 'proto.promocode.BatchGetUserPromocodeSnapshotsResponse';
662
664
  }
665
+ /**
666
+ * Generated by JsPbCodeGenerator.
667
+ * @param {Array=} opt_data Optional initial data array, typically from a
668
+ * server response, or constructed directly in Javascript. The array is used
669
+ * in place and becomes part of the constructed object. It is not cloned.
670
+ * If no data is provided, the constructed object will be empty, but still
671
+ * valid.
672
+ * @extends {jspb.Message}
673
+ * @constructor
674
+ */
675
+ proto.promocode.GetUserRegistrationPromocodeRequest = function(opt_data) {
676
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
677
+ };
678
+ goog.inherits(proto.promocode.GetUserRegistrationPromocodeRequest, jspb.Message);
679
+ if (goog.DEBUG && !COMPILED) {
680
+ /**
681
+ * @public
682
+ * @override
683
+ */
684
+ proto.promocode.GetUserRegistrationPromocodeRequest.displayName = 'proto.promocode.GetUserRegistrationPromocodeRequest';
685
+ }
686
+ /**
687
+ * Generated by JsPbCodeGenerator.
688
+ * @param {Array=} opt_data Optional initial data array, typically from a
689
+ * server response, or constructed directly in Javascript. The array is used
690
+ * in place and becomes part of the constructed object. It is not cloned.
691
+ * If no data is provided, the constructed object will be empty, but still
692
+ * valid.
693
+ * @extends {jspb.Message}
694
+ * @constructor
695
+ */
696
+ proto.promocode.GetUserRegistrationPromocodeResponse = function(opt_data) {
697
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
698
+ };
699
+ goog.inherits(proto.promocode.GetUserRegistrationPromocodeResponse, jspb.Message);
700
+ if (goog.DEBUG && !COMPILED) {
701
+ /**
702
+ * @public
703
+ * @override
704
+ */
705
+ proto.promocode.GetUserRegistrationPromocodeResponse.displayName = 'proto.promocode.GetUserRegistrationPromocodeResponse';
706
+ }
663
707
 
664
708
 
665
709
 
@@ -10911,4 +10955,312 @@ proto.promocode.BatchGetUserPromocodeSnapshotsResponse.prototype.clearItemsList
10911
10955
  };
10912
10956
 
10913
10957
 
10958
+
10959
+
10960
+
10961
+ if (jspb.Message.GENERATE_TO_OBJECT) {
10962
+ /**
10963
+ * Creates an object representation of this proto.
10964
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
10965
+ * Optional fields that are not set will be set to undefined.
10966
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
10967
+ * For the list of reserved names please see:
10968
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
10969
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
10970
+ * JSPB instance for transitional soy proto support:
10971
+ * http://goto/soy-param-migration
10972
+ * @return {!Object}
10973
+ */
10974
+ proto.promocode.GetUserRegistrationPromocodeRequest.prototype.toObject = function(opt_includeInstance) {
10975
+ return proto.promocode.GetUserRegistrationPromocodeRequest.toObject(opt_includeInstance, this);
10976
+ };
10977
+
10978
+
10979
+ /**
10980
+ * Static version of the {@see toObject} method.
10981
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
10982
+ * the JSPB instance for transitional soy proto support:
10983
+ * http://goto/soy-param-migration
10984
+ * @param {!proto.promocode.GetUserRegistrationPromocodeRequest} msg The msg instance to transform.
10985
+ * @return {!Object}
10986
+ * @suppress {unusedLocalVariables} f is only used for nested messages
10987
+ */
10988
+ proto.promocode.GetUserRegistrationPromocodeRequest.toObject = function(includeInstance, msg) {
10989
+ var f, obj = {
10990
+ userId: jspb.Message.getFieldWithDefault(msg, 1, 0)
10991
+ };
10992
+
10993
+ if (includeInstance) {
10994
+ obj.$jspbMessageInstance = msg;
10995
+ }
10996
+ return obj;
10997
+ };
10998
+ }
10999
+
11000
+
11001
+ /**
11002
+ * Deserializes binary data (in protobuf wire format).
11003
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
11004
+ * @return {!proto.promocode.GetUserRegistrationPromocodeRequest}
11005
+ */
11006
+ proto.promocode.GetUserRegistrationPromocodeRequest.deserializeBinary = function(bytes) {
11007
+ var reader = new jspb.BinaryReader(bytes);
11008
+ var msg = new proto.promocode.GetUserRegistrationPromocodeRequest;
11009
+ return proto.promocode.GetUserRegistrationPromocodeRequest.deserializeBinaryFromReader(msg, reader);
11010
+ };
11011
+
11012
+
11013
+ /**
11014
+ * Deserializes binary data (in protobuf wire format) from the
11015
+ * given reader into the given message object.
11016
+ * @param {!proto.promocode.GetUserRegistrationPromocodeRequest} msg The message object to deserialize into.
11017
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
11018
+ * @return {!proto.promocode.GetUserRegistrationPromocodeRequest}
11019
+ */
11020
+ proto.promocode.GetUserRegistrationPromocodeRequest.deserializeBinaryFromReader = function(msg, reader) {
11021
+ while (reader.nextField()) {
11022
+ if (reader.isEndGroup()) {
11023
+ break;
11024
+ }
11025
+ var field = reader.getFieldNumber();
11026
+ switch (field) {
11027
+ case 1:
11028
+ var value = /** @type {number} */ (reader.readInt32());
11029
+ msg.setUserId(value);
11030
+ break;
11031
+ default:
11032
+ reader.skipField();
11033
+ break;
11034
+ }
11035
+ }
11036
+ return msg;
11037
+ };
11038
+
11039
+
11040
+ /**
11041
+ * Serializes the message to binary data (in protobuf wire format).
11042
+ * @return {!Uint8Array}
11043
+ */
11044
+ proto.promocode.GetUserRegistrationPromocodeRequest.prototype.serializeBinary = function() {
11045
+ var writer = new jspb.BinaryWriter();
11046
+ proto.promocode.GetUserRegistrationPromocodeRequest.serializeBinaryToWriter(this, writer);
11047
+ return writer.getResultBuffer();
11048
+ };
11049
+
11050
+
11051
+ /**
11052
+ * Serializes the given message to binary data (in protobuf wire
11053
+ * format), writing to the given BinaryWriter.
11054
+ * @param {!proto.promocode.GetUserRegistrationPromocodeRequest} message
11055
+ * @param {!jspb.BinaryWriter} writer
11056
+ * @suppress {unusedLocalVariables} f is only used for nested messages
11057
+ */
11058
+ proto.promocode.GetUserRegistrationPromocodeRequest.serializeBinaryToWriter = function(message, writer) {
11059
+ var f = undefined;
11060
+ f = message.getUserId();
11061
+ if (f !== 0) {
11062
+ writer.writeInt32(
11063
+ 1,
11064
+ f
11065
+ );
11066
+ }
11067
+ };
11068
+
11069
+
11070
+ /**
11071
+ * optional int32 user_id = 1;
11072
+ * @return {number}
11073
+ */
11074
+ proto.promocode.GetUserRegistrationPromocodeRequest.prototype.getUserId = function() {
11075
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
11076
+ };
11077
+
11078
+
11079
+ /**
11080
+ * @param {number} value
11081
+ * @return {!proto.promocode.GetUserRegistrationPromocodeRequest} returns this
11082
+ */
11083
+ proto.promocode.GetUserRegistrationPromocodeRequest.prototype.setUserId = function(value) {
11084
+ return jspb.Message.setProto3IntField(this, 1, value);
11085
+ };
11086
+
11087
+
11088
+
11089
+
11090
+
11091
+ if (jspb.Message.GENERATE_TO_OBJECT) {
11092
+ /**
11093
+ * Creates an object representation of this proto.
11094
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
11095
+ * Optional fields that are not set will be set to undefined.
11096
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
11097
+ * For the list of reserved names please see:
11098
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
11099
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
11100
+ * JSPB instance for transitional soy proto support:
11101
+ * http://goto/soy-param-migration
11102
+ * @return {!Object}
11103
+ */
11104
+ proto.promocode.GetUserRegistrationPromocodeResponse.prototype.toObject = function(opt_includeInstance) {
11105
+ return proto.promocode.GetUserRegistrationPromocodeResponse.toObject(opt_includeInstance, this);
11106
+ };
11107
+
11108
+
11109
+ /**
11110
+ * Static version of the {@see toObject} method.
11111
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
11112
+ * the JSPB instance for transitional soy proto support:
11113
+ * http://goto/soy-param-migration
11114
+ * @param {!proto.promocode.GetUserRegistrationPromocodeResponse} msg The msg instance to transform.
11115
+ * @return {!Object}
11116
+ * @suppress {unusedLocalVariables} f is only used for nested messages
11117
+ */
11118
+ proto.promocode.GetUserRegistrationPromocodeResponse.toObject = function(includeInstance, msg) {
11119
+ var f, obj = {
11120
+ found: jspb.Message.getBooleanFieldWithDefault(msg, 1, false),
11121
+ promoCode: jspb.Message.getFieldWithDefault(msg, 2, "")
11122
+ };
11123
+
11124
+ if (includeInstance) {
11125
+ obj.$jspbMessageInstance = msg;
11126
+ }
11127
+ return obj;
11128
+ };
11129
+ }
11130
+
11131
+
11132
+ /**
11133
+ * Deserializes binary data (in protobuf wire format).
11134
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
11135
+ * @return {!proto.promocode.GetUserRegistrationPromocodeResponse}
11136
+ */
11137
+ proto.promocode.GetUserRegistrationPromocodeResponse.deserializeBinary = function(bytes) {
11138
+ var reader = new jspb.BinaryReader(bytes);
11139
+ var msg = new proto.promocode.GetUserRegistrationPromocodeResponse;
11140
+ return proto.promocode.GetUserRegistrationPromocodeResponse.deserializeBinaryFromReader(msg, reader);
11141
+ };
11142
+
11143
+
11144
+ /**
11145
+ * Deserializes binary data (in protobuf wire format) from the
11146
+ * given reader into the given message object.
11147
+ * @param {!proto.promocode.GetUserRegistrationPromocodeResponse} msg The message object to deserialize into.
11148
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
11149
+ * @return {!proto.promocode.GetUserRegistrationPromocodeResponse}
11150
+ */
11151
+ proto.promocode.GetUserRegistrationPromocodeResponse.deserializeBinaryFromReader = function(msg, reader) {
11152
+ while (reader.nextField()) {
11153
+ if (reader.isEndGroup()) {
11154
+ break;
11155
+ }
11156
+ var field = reader.getFieldNumber();
11157
+ switch (field) {
11158
+ case 1:
11159
+ var value = /** @type {boolean} */ (reader.readBool());
11160
+ msg.setFound(value);
11161
+ break;
11162
+ case 2:
11163
+ var value = /** @type {string} */ (reader.readString());
11164
+ msg.setPromoCode(value);
11165
+ break;
11166
+ default:
11167
+ reader.skipField();
11168
+ break;
11169
+ }
11170
+ }
11171
+ return msg;
11172
+ };
11173
+
11174
+
11175
+ /**
11176
+ * Serializes the message to binary data (in protobuf wire format).
11177
+ * @return {!Uint8Array}
11178
+ */
11179
+ proto.promocode.GetUserRegistrationPromocodeResponse.prototype.serializeBinary = function() {
11180
+ var writer = new jspb.BinaryWriter();
11181
+ proto.promocode.GetUserRegistrationPromocodeResponse.serializeBinaryToWriter(this, writer);
11182
+ return writer.getResultBuffer();
11183
+ };
11184
+
11185
+
11186
+ /**
11187
+ * Serializes the given message to binary data (in protobuf wire
11188
+ * format), writing to the given BinaryWriter.
11189
+ * @param {!proto.promocode.GetUserRegistrationPromocodeResponse} message
11190
+ * @param {!jspb.BinaryWriter} writer
11191
+ * @suppress {unusedLocalVariables} f is only used for nested messages
11192
+ */
11193
+ proto.promocode.GetUserRegistrationPromocodeResponse.serializeBinaryToWriter = function(message, writer) {
11194
+ var f = undefined;
11195
+ f = message.getFound();
11196
+ if (f) {
11197
+ writer.writeBool(
11198
+ 1,
11199
+ f
11200
+ );
11201
+ }
11202
+ f = /** @type {string} */ (jspb.Message.getField(message, 2));
11203
+ if (f != null) {
11204
+ writer.writeString(
11205
+ 2,
11206
+ f
11207
+ );
11208
+ }
11209
+ };
11210
+
11211
+
11212
+ /**
11213
+ * optional bool found = 1;
11214
+ * @return {boolean}
11215
+ */
11216
+ proto.promocode.GetUserRegistrationPromocodeResponse.prototype.getFound = function() {
11217
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false));
11218
+ };
11219
+
11220
+
11221
+ /**
11222
+ * @param {boolean} value
11223
+ * @return {!proto.promocode.GetUserRegistrationPromocodeResponse} returns this
11224
+ */
11225
+ proto.promocode.GetUserRegistrationPromocodeResponse.prototype.setFound = function(value) {
11226
+ return jspb.Message.setProto3BooleanField(this, 1, value);
11227
+ };
11228
+
11229
+
11230
+ /**
11231
+ * optional string promo_code = 2;
11232
+ * @return {string}
11233
+ */
11234
+ proto.promocode.GetUserRegistrationPromocodeResponse.prototype.getPromoCode = function() {
11235
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
11236
+ };
11237
+
11238
+
11239
+ /**
11240
+ * @param {string} value
11241
+ * @return {!proto.promocode.GetUserRegistrationPromocodeResponse} returns this
11242
+ */
11243
+ proto.promocode.GetUserRegistrationPromocodeResponse.prototype.setPromoCode = function(value) {
11244
+ return jspb.Message.setField(this, 2, value);
11245
+ };
11246
+
11247
+
11248
+ /**
11249
+ * Clears the field making it undefined.
11250
+ * @return {!proto.promocode.GetUserRegistrationPromocodeResponse} returns this
11251
+ */
11252
+ proto.promocode.GetUserRegistrationPromocodeResponse.prototype.clearPromoCode = function() {
11253
+ return jspb.Message.setField(this, 2, undefined);
11254
+ };
11255
+
11256
+
11257
+ /**
11258
+ * Returns whether this field is set.
11259
+ * @return {boolean}
11260
+ */
11261
+ proto.promocode.GetUserRegistrationPromocodeResponse.prototype.hasPromoCode = function() {
11262
+ return jspb.Message.getField(this, 2) != null;
11263
+ };
11264
+
11265
+
10914
11266
  goog.object.extend(exports, proto.promocode);