protobuf-platform 1.0.185 → 1.0.186
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/loyalty/loyalty.proto +16 -1
- package/loyalty/loyalty_grpc_pb.js +34 -0
- package/loyalty/loyalty_pb.js +658 -0
- package/package.json +1 -1
package/loyalty/loyalty.proto
CHANGED
@@ -17,6 +17,8 @@ service Loyalty {
|
|
17
17
|
rpc updateSinglePoint(PointRequest) returns (PointResponse);
|
18
18
|
rpc deleteSinglePoint(GetPointRequest) returns (PointStatusResponse);
|
19
19
|
rpc readListPoints(PaginationRequest) returns (PointItemsResponse);
|
20
|
+
//Users
|
21
|
+
rpc getUserLoyalty(GetUserLoyaltyRequest) returns (UserLoyaltyResponse);
|
20
22
|
}
|
21
23
|
|
22
24
|
message PingRequest { string ping = 1; }
|
@@ -73,7 +75,6 @@ message LevelStatusResponse {
|
|
73
75
|
string status = 1;
|
74
76
|
}
|
75
77
|
|
76
|
-
|
77
78
|
//Point CRUD
|
78
79
|
message SignUpPoint {
|
79
80
|
string country = 1;
|
@@ -125,4 +126,18 @@ message PointItemsResponse {
|
|
125
126
|
}
|
126
127
|
message PointStatusResponse {
|
127
128
|
string status = 1;
|
129
|
+
}
|
130
|
+
//User
|
131
|
+
message GetUserLoyaltyRequest {
|
132
|
+
int32 user_id = 1;
|
133
|
+
optional bool admin_side = 2;
|
134
|
+
}
|
135
|
+
message UserLoyaltyResponse {
|
136
|
+
optional int32 loyalty_id = 1;
|
137
|
+
optional int32 loyalty_level = 2;
|
138
|
+
optional string title = 3;
|
139
|
+
optional string description = 4;
|
140
|
+
optional int32 points_to_complete = 5;
|
141
|
+
optional string image = 6;
|
142
|
+
optional int32 current_points = 7;
|
128
143
|
}
|
@@ -48,6 +48,17 @@ function deserialize_loyalty_GetPointRequest(buffer_arg) {
|
|
48
48
|
return loyalty_pb.GetPointRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
49
49
|
}
|
50
50
|
|
51
|
+
function serialize_loyalty_GetUserLoyaltyRequest(arg) {
|
52
|
+
if (!(arg instanceof loyalty_pb.GetUserLoyaltyRequest)) {
|
53
|
+
throw new Error('Expected argument of type loyalty.GetUserLoyaltyRequest');
|
54
|
+
}
|
55
|
+
return Buffer.from(arg.serializeBinary());
|
56
|
+
}
|
57
|
+
|
58
|
+
function deserialize_loyalty_GetUserLoyaltyRequest(buffer_arg) {
|
59
|
+
return loyalty_pb.GetUserLoyaltyRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
60
|
+
}
|
61
|
+
|
51
62
|
function serialize_loyalty_LevelItemsResponse(arg) {
|
52
63
|
if (!(arg instanceof loyalty_pb.LevelItemsResponse)) {
|
53
64
|
throw new Error('Expected argument of type loyalty.LevelItemsResponse');
|
@@ -169,6 +180,17 @@ function deserialize_loyalty_PongResponse(buffer_arg) {
|
|
169
180
|
return loyalty_pb.PongResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
170
181
|
}
|
171
182
|
|
183
|
+
function serialize_loyalty_UserLoyaltyResponse(arg) {
|
184
|
+
if (!(arg instanceof loyalty_pb.UserLoyaltyResponse)) {
|
185
|
+
throw new Error('Expected argument of type loyalty.UserLoyaltyResponse');
|
186
|
+
}
|
187
|
+
return Buffer.from(arg.serializeBinary());
|
188
|
+
}
|
189
|
+
|
190
|
+
function deserialize_loyalty_UserLoyaltyResponse(buffer_arg) {
|
191
|
+
return loyalty_pb.UserLoyaltyResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
192
|
+
}
|
193
|
+
|
172
194
|
|
173
195
|
var LoyaltyService = exports.LoyaltyService = {
|
174
196
|
checkConnection: {
|
@@ -305,6 +327,18 @@ createSinglePoint: {
|
|
305
327
|
responseSerialize: serialize_loyalty_PointItemsResponse,
|
306
328
|
responseDeserialize: deserialize_loyalty_PointItemsResponse,
|
307
329
|
},
|
330
|
+
// Users
|
331
|
+
getUserLoyalty: {
|
332
|
+
path: '/loyalty.Loyalty/getUserLoyalty',
|
333
|
+
requestStream: false,
|
334
|
+
responseStream: false,
|
335
|
+
requestType: loyalty_pb.GetUserLoyaltyRequest,
|
336
|
+
responseType: loyalty_pb.UserLoyaltyResponse,
|
337
|
+
requestSerialize: serialize_loyalty_GetUserLoyaltyRequest,
|
338
|
+
requestDeserialize: deserialize_loyalty_GetUserLoyaltyRequest,
|
339
|
+
responseSerialize: serialize_loyalty_UserLoyaltyResponse,
|
340
|
+
responseDeserialize: deserialize_loyalty_UserLoyaltyResponse,
|
341
|
+
},
|
308
342
|
};
|
309
343
|
|
310
344
|
exports.LoyaltyClient = grpc.makeGenericClientConstructor(LoyaltyService);
|
package/loyalty/loyalty_pb.js
CHANGED
@@ -27,6 +27,7 @@ goog.exportSymbol('proto.loyalty.File', null, global);
|
|
27
27
|
goog.exportSymbol('proto.loyalty.GetFileRequest', null, global);
|
28
28
|
goog.exportSymbol('proto.loyalty.GetLevelRequest', null, global);
|
29
29
|
goog.exportSymbol('proto.loyalty.GetPointRequest', null, global);
|
30
|
+
goog.exportSymbol('proto.loyalty.GetUserLoyaltyRequest', null, global);
|
30
31
|
goog.exportSymbol('proto.loyalty.LevelItem', null, global);
|
31
32
|
goog.exportSymbol('proto.loyalty.LevelItemRequest', null, global);
|
32
33
|
goog.exportSymbol('proto.loyalty.LevelItemsResponse', null, global);
|
@@ -44,6 +45,7 @@ goog.exportSymbol('proto.loyalty.PointResponse', null, global);
|
|
44
45
|
goog.exportSymbol('proto.loyalty.PointStatusResponse', null, global);
|
45
46
|
goog.exportSymbol('proto.loyalty.PongResponse', null, global);
|
46
47
|
goog.exportSymbol('proto.loyalty.SignUpPoint', null, global);
|
48
|
+
goog.exportSymbol('proto.loyalty.UserLoyaltyResponse', null, global);
|
47
49
|
/**
|
48
50
|
* Generated by JsPbCodeGenerator.
|
49
51
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
@@ -506,6 +508,48 @@ if (goog.DEBUG && !COMPILED) {
|
|
506
508
|
*/
|
507
509
|
proto.loyalty.PointStatusResponse.displayName = 'proto.loyalty.PointStatusResponse';
|
508
510
|
}
|
511
|
+
/**
|
512
|
+
* Generated by JsPbCodeGenerator.
|
513
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
514
|
+
* server response, or constructed directly in Javascript. The array is used
|
515
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
516
|
+
* If no data is provided, the constructed object will be empty, but still
|
517
|
+
* valid.
|
518
|
+
* @extends {jspb.Message}
|
519
|
+
* @constructor
|
520
|
+
*/
|
521
|
+
proto.loyalty.GetUserLoyaltyRequest = function(opt_data) {
|
522
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
523
|
+
};
|
524
|
+
goog.inherits(proto.loyalty.GetUserLoyaltyRequest, jspb.Message);
|
525
|
+
if (goog.DEBUG && !COMPILED) {
|
526
|
+
/**
|
527
|
+
* @public
|
528
|
+
* @override
|
529
|
+
*/
|
530
|
+
proto.loyalty.GetUserLoyaltyRequest.displayName = 'proto.loyalty.GetUserLoyaltyRequest';
|
531
|
+
}
|
532
|
+
/**
|
533
|
+
* Generated by JsPbCodeGenerator.
|
534
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
535
|
+
* server response, or constructed directly in Javascript. The array is used
|
536
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
537
|
+
* If no data is provided, the constructed object will be empty, but still
|
538
|
+
* valid.
|
539
|
+
* @extends {jspb.Message}
|
540
|
+
* @constructor
|
541
|
+
*/
|
542
|
+
proto.loyalty.UserLoyaltyResponse = function(opt_data) {
|
543
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
544
|
+
};
|
545
|
+
goog.inherits(proto.loyalty.UserLoyaltyResponse, jspb.Message);
|
546
|
+
if (goog.DEBUG && !COMPILED) {
|
547
|
+
/**
|
548
|
+
* @public
|
549
|
+
* @override
|
550
|
+
*/
|
551
|
+
proto.loyalty.UserLoyaltyResponse.displayName = 'proto.loyalty.UserLoyaltyResponse';
|
552
|
+
}
|
509
553
|
|
510
554
|
|
511
555
|
|
@@ -5585,4 +5629,618 @@ proto.loyalty.PointStatusResponse.prototype.setStatus = function(value) {
|
|
5585
5629
|
};
|
5586
5630
|
|
5587
5631
|
|
5632
|
+
|
5633
|
+
|
5634
|
+
|
5635
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
5636
|
+
/**
|
5637
|
+
* Creates an object representation of this proto.
|
5638
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
5639
|
+
* Optional fields that are not set will be set to undefined.
|
5640
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
5641
|
+
* For the list of reserved names please see:
|
5642
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
5643
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
5644
|
+
* JSPB instance for transitional soy proto support:
|
5645
|
+
* http://goto/soy-param-migration
|
5646
|
+
* @return {!Object}
|
5647
|
+
*/
|
5648
|
+
proto.loyalty.GetUserLoyaltyRequest.prototype.toObject = function(opt_includeInstance) {
|
5649
|
+
return proto.loyalty.GetUserLoyaltyRequest.toObject(opt_includeInstance, this);
|
5650
|
+
};
|
5651
|
+
|
5652
|
+
|
5653
|
+
/**
|
5654
|
+
* Static version of the {@see toObject} method.
|
5655
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
5656
|
+
* the JSPB instance for transitional soy proto support:
|
5657
|
+
* http://goto/soy-param-migration
|
5658
|
+
* @param {!proto.loyalty.GetUserLoyaltyRequest} msg The msg instance to transform.
|
5659
|
+
* @return {!Object}
|
5660
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
5661
|
+
*/
|
5662
|
+
proto.loyalty.GetUserLoyaltyRequest.toObject = function(includeInstance, msg) {
|
5663
|
+
var f, obj = {
|
5664
|
+
userId: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
5665
|
+
adminSide: jspb.Message.getBooleanFieldWithDefault(msg, 2, false)
|
5666
|
+
};
|
5667
|
+
|
5668
|
+
if (includeInstance) {
|
5669
|
+
obj.$jspbMessageInstance = msg;
|
5670
|
+
}
|
5671
|
+
return obj;
|
5672
|
+
};
|
5673
|
+
}
|
5674
|
+
|
5675
|
+
|
5676
|
+
/**
|
5677
|
+
* Deserializes binary data (in protobuf wire format).
|
5678
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
5679
|
+
* @return {!proto.loyalty.GetUserLoyaltyRequest}
|
5680
|
+
*/
|
5681
|
+
proto.loyalty.GetUserLoyaltyRequest.deserializeBinary = function(bytes) {
|
5682
|
+
var reader = new jspb.BinaryReader(bytes);
|
5683
|
+
var msg = new proto.loyalty.GetUserLoyaltyRequest;
|
5684
|
+
return proto.loyalty.GetUserLoyaltyRequest.deserializeBinaryFromReader(msg, reader);
|
5685
|
+
};
|
5686
|
+
|
5687
|
+
|
5688
|
+
/**
|
5689
|
+
* Deserializes binary data (in protobuf wire format) from the
|
5690
|
+
* given reader into the given message object.
|
5691
|
+
* @param {!proto.loyalty.GetUserLoyaltyRequest} msg The message object to deserialize into.
|
5692
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
5693
|
+
* @return {!proto.loyalty.GetUserLoyaltyRequest}
|
5694
|
+
*/
|
5695
|
+
proto.loyalty.GetUserLoyaltyRequest.deserializeBinaryFromReader = function(msg, reader) {
|
5696
|
+
while (reader.nextField()) {
|
5697
|
+
if (reader.isEndGroup()) {
|
5698
|
+
break;
|
5699
|
+
}
|
5700
|
+
var field = reader.getFieldNumber();
|
5701
|
+
switch (field) {
|
5702
|
+
case 1:
|
5703
|
+
var value = /** @type {number} */ (reader.readInt32());
|
5704
|
+
msg.setUserId(value);
|
5705
|
+
break;
|
5706
|
+
case 2:
|
5707
|
+
var value = /** @type {boolean} */ (reader.readBool());
|
5708
|
+
msg.setAdminSide(value);
|
5709
|
+
break;
|
5710
|
+
default:
|
5711
|
+
reader.skipField();
|
5712
|
+
break;
|
5713
|
+
}
|
5714
|
+
}
|
5715
|
+
return msg;
|
5716
|
+
};
|
5717
|
+
|
5718
|
+
|
5719
|
+
/**
|
5720
|
+
* Serializes the message to binary data (in protobuf wire format).
|
5721
|
+
* @return {!Uint8Array}
|
5722
|
+
*/
|
5723
|
+
proto.loyalty.GetUserLoyaltyRequest.prototype.serializeBinary = function() {
|
5724
|
+
var writer = new jspb.BinaryWriter();
|
5725
|
+
proto.loyalty.GetUserLoyaltyRequest.serializeBinaryToWriter(this, writer);
|
5726
|
+
return writer.getResultBuffer();
|
5727
|
+
};
|
5728
|
+
|
5729
|
+
|
5730
|
+
/**
|
5731
|
+
* Serializes the given message to binary data (in protobuf wire
|
5732
|
+
* format), writing to the given BinaryWriter.
|
5733
|
+
* @param {!proto.loyalty.GetUserLoyaltyRequest} message
|
5734
|
+
* @param {!jspb.BinaryWriter} writer
|
5735
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
5736
|
+
*/
|
5737
|
+
proto.loyalty.GetUserLoyaltyRequest.serializeBinaryToWriter = function(message, writer) {
|
5738
|
+
var f = undefined;
|
5739
|
+
f = message.getUserId();
|
5740
|
+
if (f !== 0) {
|
5741
|
+
writer.writeInt32(
|
5742
|
+
1,
|
5743
|
+
f
|
5744
|
+
);
|
5745
|
+
}
|
5746
|
+
f = /** @type {boolean} */ (jspb.Message.getField(message, 2));
|
5747
|
+
if (f != null) {
|
5748
|
+
writer.writeBool(
|
5749
|
+
2,
|
5750
|
+
f
|
5751
|
+
);
|
5752
|
+
}
|
5753
|
+
};
|
5754
|
+
|
5755
|
+
|
5756
|
+
/**
|
5757
|
+
* optional int32 user_id = 1;
|
5758
|
+
* @return {number}
|
5759
|
+
*/
|
5760
|
+
proto.loyalty.GetUserLoyaltyRequest.prototype.getUserId = function() {
|
5761
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
5762
|
+
};
|
5763
|
+
|
5764
|
+
|
5765
|
+
/**
|
5766
|
+
* @param {number} value
|
5767
|
+
* @return {!proto.loyalty.GetUserLoyaltyRequest} returns this
|
5768
|
+
*/
|
5769
|
+
proto.loyalty.GetUserLoyaltyRequest.prototype.setUserId = function(value) {
|
5770
|
+
return jspb.Message.setProto3IntField(this, 1, value);
|
5771
|
+
};
|
5772
|
+
|
5773
|
+
|
5774
|
+
/**
|
5775
|
+
* optional bool admin_side = 2;
|
5776
|
+
* @return {boolean}
|
5777
|
+
*/
|
5778
|
+
proto.loyalty.GetUserLoyaltyRequest.prototype.getAdminSide = function() {
|
5779
|
+
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));
|
5780
|
+
};
|
5781
|
+
|
5782
|
+
|
5783
|
+
/**
|
5784
|
+
* @param {boolean} value
|
5785
|
+
* @return {!proto.loyalty.GetUserLoyaltyRequest} returns this
|
5786
|
+
*/
|
5787
|
+
proto.loyalty.GetUserLoyaltyRequest.prototype.setAdminSide = function(value) {
|
5788
|
+
return jspb.Message.setField(this, 2, value);
|
5789
|
+
};
|
5790
|
+
|
5791
|
+
|
5792
|
+
/**
|
5793
|
+
* Clears the field making it undefined.
|
5794
|
+
* @return {!proto.loyalty.GetUserLoyaltyRequest} returns this
|
5795
|
+
*/
|
5796
|
+
proto.loyalty.GetUserLoyaltyRequest.prototype.clearAdminSide = function() {
|
5797
|
+
return jspb.Message.setField(this, 2, undefined);
|
5798
|
+
};
|
5799
|
+
|
5800
|
+
|
5801
|
+
/**
|
5802
|
+
* Returns whether this field is set.
|
5803
|
+
* @return {boolean}
|
5804
|
+
*/
|
5805
|
+
proto.loyalty.GetUserLoyaltyRequest.prototype.hasAdminSide = function() {
|
5806
|
+
return jspb.Message.getField(this, 2) != null;
|
5807
|
+
};
|
5808
|
+
|
5809
|
+
|
5810
|
+
|
5811
|
+
|
5812
|
+
|
5813
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
5814
|
+
/**
|
5815
|
+
* Creates an object representation of this proto.
|
5816
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
5817
|
+
* Optional fields that are not set will be set to undefined.
|
5818
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
5819
|
+
* For the list of reserved names please see:
|
5820
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
5821
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
5822
|
+
* JSPB instance for transitional soy proto support:
|
5823
|
+
* http://goto/soy-param-migration
|
5824
|
+
* @return {!Object}
|
5825
|
+
*/
|
5826
|
+
proto.loyalty.UserLoyaltyResponse.prototype.toObject = function(opt_includeInstance) {
|
5827
|
+
return proto.loyalty.UserLoyaltyResponse.toObject(opt_includeInstance, this);
|
5828
|
+
};
|
5829
|
+
|
5830
|
+
|
5831
|
+
/**
|
5832
|
+
* Static version of the {@see toObject} method.
|
5833
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
5834
|
+
* the JSPB instance for transitional soy proto support:
|
5835
|
+
* http://goto/soy-param-migration
|
5836
|
+
* @param {!proto.loyalty.UserLoyaltyResponse} msg The msg instance to transform.
|
5837
|
+
* @return {!Object}
|
5838
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
5839
|
+
*/
|
5840
|
+
proto.loyalty.UserLoyaltyResponse.toObject = function(includeInstance, msg) {
|
5841
|
+
var f, obj = {
|
5842
|
+
loyaltyId: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
5843
|
+
loyaltyLevel: jspb.Message.getFieldWithDefault(msg, 2, 0),
|
5844
|
+
title: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
5845
|
+
description: jspb.Message.getFieldWithDefault(msg, 4, ""),
|
5846
|
+
pointsToComplete: jspb.Message.getFieldWithDefault(msg, 5, 0),
|
5847
|
+
image: jspb.Message.getFieldWithDefault(msg, 6, ""),
|
5848
|
+
currentPoints: jspb.Message.getFieldWithDefault(msg, 7, 0)
|
5849
|
+
};
|
5850
|
+
|
5851
|
+
if (includeInstance) {
|
5852
|
+
obj.$jspbMessageInstance = msg;
|
5853
|
+
}
|
5854
|
+
return obj;
|
5855
|
+
};
|
5856
|
+
}
|
5857
|
+
|
5858
|
+
|
5859
|
+
/**
|
5860
|
+
* Deserializes binary data (in protobuf wire format).
|
5861
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
5862
|
+
* @return {!proto.loyalty.UserLoyaltyResponse}
|
5863
|
+
*/
|
5864
|
+
proto.loyalty.UserLoyaltyResponse.deserializeBinary = function(bytes) {
|
5865
|
+
var reader = new jspb.BinaryReader(bytes);
|
5866
|
+
var msg = new proto.loyalty.UserLoyaltyResponse;
|
5867
|
+
return proto.loyalty.UserLoyaltyResponse.deserializeBinaryFromReader(msg, reader);
|
5868
|
+
};
|
5869
|
+
|
5870
|
+
|
5871
|
+
/**
|
5872
|
+
* Deserializes binary data (in protobuf wire format) from the
|
5873
|
+
* given reader into the given message object.
|
5874
|
+
* @param {!proto.loyalty.UserLoyaltyResponse} msg The message object to deserialize into.
|
5875
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
5876
|
+
* @return {!proto.loyalty.UserLoyaltyResponse}
|
5877
|
+
*/
|
5878
|
+
proto.loyalty.UserLoyaltyResponse.deserializeBinaryFromReader = function(msg, reader) {
|
5879
|
+
while (reader.nextField()) {
|
5880
|
+
if (reader.isEndGroup()) {
|
5881
|
+
break;
|
5882
|
+
}
|
5883
|
+
var field = reader.getFieldNumber();
|
5884
|
+
switch (field) {
|
5885
|
+
case 1:
|
5886
|
+
var value = /** @type {number} */ (reader.readInt32());
|
5887
|
+
msg.setLoyaltyId(value);
|
5888
|
+
break;
|
5889
|
+
case 2:
|
5890
|
+
var value = /** @type {number} */ (reader.readInt32());
|
5891
|
+
msg.setLoyaltyLevel(value);
|
5892
|
+
break;
|
5893
|
+
case 3:
|
5894
|
+
var value = /** @type {string} */ (reader.readString());
|
5895
|
+
msg.setTitle(value);
|
5896
|
+
break;
|
5897
|
+
case 4:
|
5898
|
+
var value = /** @type {string} */ (reader.readString());
|
5899
|
+
msg.setDescription(value);
|
5900
|
+
break;
|
5901
|
+
case 5:
|
5902
|
+
var value = /** @type {number} */ (reader.readInt32());
|
5903
|
+
msg.setPointsToComplete(value);
|
5904
|
+
break;
|
5905
|
+
case 6:
|
5906
|
+
var value = /** @type {string} */ (reader.readString());
|
5907
|
+
msg.setImage(value);
|
5908
|
+
break;
|
5909
|
+
case 7:
|
5910
|
+
var value = /** @type {number} */ (reader.readInt32());
|
5911
|
+
msg.setCurrentPoints(value);
|
5912
|
+
break;
|
5913
|
+
default:
|
5914
|
+
reader.skipField();
|
5915
|
+
break;
|
5916
|
+
}
|
5917
|
+
}
|
5918
|
+
return msg;
|
5919
|
+
};
|
5920
|
+
|
5921
|
+
|
5922
|
+
/**
|
5923
|
+
* Serializes the message to binary data (in protobuf wire format).
|
5924
|
+
* @return {!Uint8Array}
|
5925
|
+
*/
|
5926
|
+
proto.loyalty.UserLoyaltyResponse.prototype.serializeBinary = function() {
|
5927
|
+
var writer = new jspb.BinaryWriter();
|
5928
|
+
proto.loyalty.UserLoyaltyResponse.serializeBinaryToWriter(this, writer);
|
5929
|
+
return writer.getResultBuffer();
|
5930
|
+
};
|
5931
|
+
|
5932
|
+
|
5933
|
+
/**
|
5934
|
+
* Serializes the given message to binary data (in protobuf wire
|
5935
|
+
* format), writing to the given BinaryWriter.
|
5936
|
+
* @param {!proto.loyalty.UserLoyaltyResponse} message
|
5937
|
+
* @param {!jspb.BinaryWriter} writer
|
5938
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
5939
|
+
*/
|
5940
|
+
proto.loyalty.UserLoyaltyResponse.serializeBinaryToWriter = function(message, writer) {
|
5941
|
+
var f = undefined;
|
5942
|
+
f = /** @type {number} */ (jspb.Message.getField(message, 1));
|
5943
|
+
if (f != null) {
|
5944
|
+
writer.writeInt32(
|
5945
|
+
1,
|
5946
|
+
f
|
5947
|
+
);
|
5948
|
+
}
|
5949
|
+
f = /** @type {number} */ (jspb.Message.getField(message, 2));
|
5950
|
+
if (f != null) {
|
5951
|
+
writer.writeInt32(
|
5952
|
+
2,
|
5953
|
+
f
|
5954
|
+
);
|
5955
|
+
}
|
5956
|
+
f = /** @type {string} */ (jspb.Message.getField(message, 3));
|
5957
|
+
if (f != null) {
|
5958
|
+
writer.writeString(
|
5959
|
+
3,
|
5960
|
+
f
|
5961
|
+
);
|
5962
|
+
}
|
5963
|
+
f = /** @type {string} */ (jspb.Message.getField(message, 4));
|
5964
|
+
if (f != null) {
|
5965
|
+
writer.writeString(
|
5966
|
+
4,
|
5967
|
+
f
|
5968
|
+
);
|
5969
|
+
}
|
5970
|
+
f = /** @type {number} */ (jspb.Message.getField(message, 5));
|
5971
|
+
if (f != null) {
|
5972
|
+
writer.writeInt32(
|
5973
|
+
5,
|
5974
|
+
f
|
5975
|
+
);
|
5976
|
+
}
|
5977
|
+
f = /** @type {string} */ (jspb.Message.getField(message, 6));
|
5978
|
+
if (f != null) {
|
5979
|
+
writer.writeString(
|
5980
|
+
6,
|
5981
|
+
f
|
5982
|
+
);
|
5983
|
+
}
|
5984
|
+
f = /** @type {number} */ (jspb.Message.getField(message, 7));
|
5985
|
+
if (f != null) {
|
5986
|
+
writer.writeInt32(
|
5987
|
+
7,
|
5988
|
+
f
|
5989
|
+
);
|
5990
|
+
}
|
5991
|
+
};
|
5992
|
+
|
5993
|
+
|
5994
|
+
/**
|
5995
|
+
* optional int32 loyalty_id = 1;
|
5996
|
+
* @return {number}
|
5997
|
+
*/
|
5998
|
+
proto.loyalty.UserLoyaltyResponse.prototype.getLoyaltyId = function() {
|
5999
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
6000
|
+
};
|
6001
|
+
|
6002
|
+
|
6003
|
+
/**
|
6004
|
+
* @param {number} value
|
6005
|
+
* @return {!proto.loyalty.UserLoyaltyResponse} returns this
|
6006
|
+
*/
|
6007
|
+
proto.loyalty.UserLoyaltyResponse.prototype.setLoyaltyId = function(value) {
|
6008
|
+
return jspb.Message.setField(this, 1, value);
|
6009
|
+
};
|
6010
|
+
|
6011
|
+
|
6012
|
+
/**
|
6013
|
+
* Clears the field making it undefined.
|
6014
|
+
* @return {!proto.loyalty.UserLoyaltyResponse} returns this
|
6015
|
+
*/
|
6016
|
+
proto.loyalty.UserLoyaltyResponse.prototype.clearLoyaltyId = function() {
|
6017
|
+
return jspb.Message.setField(this, 1, undefined);
|
6018
|
+
};
|
6019
|
+
|
6020
|
+
|
6021
|
+
/**
|
6022
|
+
* Returns whether this field is set.
|
6023
|
+
* @return {boolean}
|
6024
|
+
*/
|
6025
|
+
proto.loyalty.UserLoyaltyResponse.prototype.hasLoyaltyId = function() {
|
6026
|
+
return jspb.Message.getField(this, 1) != null;
|
6027
|
+
};
|
6028
|
+
|
6029
|
+
|
6030
|
+
/**
|
6031
|
+
* optional int32 loyalty_level = 2;
|
6032
|
+
* @return {number}
|
6033
|
+
*/
|
6034
|
+
proto.loyalty.UserLoyaltyResponse.prototype.getLoyaltyLevel = function() {
|
6035
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
|
6036
|
+
};
|
6037
|
+
|
6038
|
+
|
6039
|
+
/**
|
6040
|
+
* @param {number} value
|
6041
|
+
* @return {!proto.loyalty.UserLoyaltyResponse} returns this
|
6042
|
+
*/
|
6043
|
+
proto.loyalty.UserLoyaltyResponse.prototype.setLoyaltyLevel = function(value) {
|
6044
|
+
return jspb.Message.setField(this, 2, value);
|
6045
|
+
};
|
6046
|
+
|
6047
|
+
|
6048
|
+
/**
|
6049
|
+
* Clears the field making it undefined.
|
6050
|
+
* @return {!proto.loyalty.UserLoyaltyResponse} returns this
|
6051
|
+
*/
|
6052
|
+
proto.loyalty.UserLoyaltyResponse.prototype.clearLoyaltyLevel = function() {
|
6053
|
+
return jspb.Message.setField(this, 2, undefined);
|
6054
|
+
};
|
6055
|
+
|
6056
|
+
|
6057
|
+
/**
|
6058
|
+
* Returns whether this field is set.
|
6059
|
+
* @return {boolean}
|
6060
|
+
*/
|
6061
|
+
proto.loyalty.UserLoyaltyResponse.prototype.hasLoyaltyLevel = function() {
|
6062
|
+
return jspb.Message.getField(this, 2) != null;
|
6063
|
+
};
|
6064
|
+
|
6065
|
+
|
6066
|
+
/**
|
6067
|
+
* optional string title = 3;
|
6068
|
+
* @return {string}
|
6069
|
+
*/
|
6070
|
+
proto.loyalty.UserLoyaltyResponse.prototype.getTitle = function() {
|
6071
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
|
6072
|
+
};
|
6073
|
+
|
6074
|
+
|
6075
|
+
/**
|
6076
|
+
* @param {string} value
|
6077
|
+
* @return {!proto.loyalty.UserLoyaltyResponse} returns this
|
6078
|
+
*/
|
6079
|
+
proto.loyalty.UserLoyaltyResponse.prototype.setTitle = function(value) {
|
6080
|
+
return jspb.Message.setField(this, 3, value);
|
6081
|
+
};
|
6082
|
+
|
6083
|
+
|
6084
|
+
/**
|
6085
|
+
* Clears the field making it undefined.
|
6086
|
+
* @return {!proto.loyalty.UserLoyaltyResponse} returns this
|
6087
|
+
*/
|
6088
|
+
proto.loyalty.UserLoyaltyResponse.prototype.clearTitle = function() {
|
6089
|
+
return jspb.Message.setField(this, 3, undefined);
|
6090
|
+
};
|
6091
|
+
|
6092
|
+
|
6093
|
+
/**
|
6094
|
+
* Returns whether this field is set.
|
6095
|
+
* @return {boolean}
|
6096
|
+
*/
|
6097
|
+
proto.loyalty.UserLoyaltyResponse.prototype.hasTitle = function() {
|
6098
|
+
return jspb.Message.getField(this, 3) != null;
|
6099
|
+
};
|
6100
|
+
|
6101
|
+
|
6102
|
+
/**
|
6103
|
+
* optional string description = 4;
|
6104
|
+
* @return {string}
|
6105
|
+
*/
|
6106
|
+
proto.loyalty.UserLoyaltyResponse.prototype.getDescription = function() {
|
6107
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
|
6108
|
+
};
|
6109
|
+
|
6110
|
+
|
6111
|
+
/**
|
6112
|
+
* @param {string} value
|
6113
|
+
* @return {!proto.loyalty.UserLoyaltyResponse} returns this
|
6114
|
+
*/
|
6115
|
+
proto.loyalty.UserLoyaltyResponse.prototype.setDescription = function(value) {
|
6116
|
+
return jspb.Message.setField(this, 4, value);
|
6117
|
+
};
|
6118
|
+
|
6119
|
+
|
6120
|
+
/**
|
6121
|
+
* Clears the field making it undefined.
|
6122
|
+
* @return {!proto.loyalty.UserLoyaltyResponse} returns this
|
6123
|
+
*/
|
6124
|
+
proto.loyalty.UserLoyaltyResponse.prototype.clearDescription = function() {
|
6125
|
+
return jspb.Message.setField(this, 4, undefined);
|
6126
|
+
};
|
6127
|
+
|
6128
|
+
|
6129
|
+
/**
|
6130
|
+
* Returns whether this field is set.
|
6131
|
+
* @return {boolean}
|
6132
|
+
*/
|
6133
|
+
proto.loyalty.UserLoyaltyResponse.prototype.hasDescription = function() {
|
6134
|
+
return jspb.Message.getField(this, 4) != null;
|
6135
|
+
};
|
6136
|
+
|
6137
|
+
|
6138
|
+
/**
|
6139
|
+
* optional int32 points_to_complete = 5;
|
6140
|
+
* @return {number}
|
6141
|
+
*/
|
6142
|
+
proto.loyalty.UserLoyaltyResponse.prototype.getPointsToComplete = function() {
|
6143
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
|
6144
|
+
};
|
6145
|
+
|
6146
|
+
|
6147
|
+
/**
|
6148
|
+
* @param {number} value
|
6149
|
+
* @return {!proto.loyalty.UserLoyaltyResponse} returns this
|
6150
|
+
*/
|
6151
|
+
proto.loyalty.UserLoyaltyResponse.prototype.setPointsToComplete = function(value) {
|
6152
|
+
return jspb.Message.setField(this, 5, value);
|
6153
|
+
};
|
6154
|
+
|
6155
|
+
|
6156
|
+
/**
|
6157
|
+
* Clears the field making it undefined.
|
6158
|
+
* @return {!proto.loyalty.UserLoyaltyResponse} returns this
|
6159
|
+
*/
|
6160
|
+
proto.loyalty.UserLoyaltyResponse.prototype.clearPointsToComplete = function() {
|
6161
|
+
return jspb.Message.setField(this, 5, undefined);
|
6162
|
+
};
|
6163
|
+
|
6164
|
+
|
6165
|
+
/**
|
6166
|
+
* Returns whether this field is set.
|
6167
|
+
* @return {boolean}
|
6168
|
+
*/
|
6169
|
+
proto.loyalty.UserLoyaltyResponse.prototype.hasPointsToComplete = function() {
|
6170
|
+
return jspb.Message.getField(this, 5) != null;
|
6171
|
+
};
|
6172
|
+
|
6173
|
+
|
6174
|
+
/**
|
6175
|
+
* optional string image = 6;
|
6176
|
+
* @return {string}
|
6177
|
+
*/
|
6178
|
+
proto.loyalty.UserLoyaltyResponse.prototype.getImage = function() {
|
6179
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
|
6180
|
+
};
|
6181
|
+
|
6182
|
+
|
6183
|
+
/**
|
6184
|
+
* @param {string} value
|
6185
|
+
* @return {!proto.loyalty.UserLoyaltyResponse} returns this
|
6186
|
+
*/
|
6187
|
+
proto.loyalty.UserLoyaltyResponse.prototype.setImage = function(value) {
|
6188
|
+
return jspb.Message.setField(this, 6, value);
|
6189
|
+
};
|
6190
|
+
|
6191
|
+
|
6192
|
+
/**
|
6193
|
+
* Clears the field making it undefined.
|
6194
|
+
* @return {!proto.loyalty.UserLoyaltyResponse} returns this
|
6195
|
+
*/
|
6196
|
+
proto.loyalty.UserLoyaltyResponse.prototype.clearImage = function() {
|
6197
|
+
return jspb.Message.setField(this, 6, undefined);
|
6198
|
+
};
|
6199
|
+
|
6200
|
+
|
6201
|
+
/**
|
6202
|
+
* Returns whether this field is set.
|
6203
|
+
* @return {boolean}
|
6204
|
+
*/
|
6205
|
+
proto.loyalty.UserLoyaltyResponse.prototype.hasImage = function() {
|
6206
|
+
return jspb.Message.getField(this, 6) != null;
|
6207
|
+
};
|
6208
|
+
|
6209
|
+
|
6210
|
+
/**
|
6211
|
+
* optional int32 current_points = 7;
|
6212
|
+
* @return {number}
|
6213
|
+
*/
|
6214
|
+
proto.loyalty.UserLoyaltyResponse.prototype.getCurrentPoints = function() {
|
6215
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
|
6216
|
+
};
|
6217
|
+
|
6218
|
+
|
6219
|
+
/**
|
6220
|
+
* @param {number} value
|
6221
|
+
* @return {!proto.loyalty.UserLoyaltyResponse} returns this
|
6222
|
+
*/
|
6223
|
+
proto.loyalty.UserLoyaltyResponse.prototype.setCurrentPoints = function(value) {
|
6224
|
+
return jspb.Message.setField(this, 7, value);
|
6225
|
+
};
|
6226
|
+
|
6227
|
+
|
6228
|
+
/**
|
6229
|
+
* Clears the field making it undefined.
|
6230
|
+
* @return {!proto.loyalty.UserLoyaltyResponse} returns this
|
6231
|
+
*/
|
6232
|
+
proto.loyalty.UserLoyaltyResponse.prototype.clearCurrentPoints = function() {
|
6233
|
+
return jspb.Message.setField(this, 7, undefined);
|
6234
|
+
};
|
6235
|
+
|
6236
|
+
|
6237
|
+
/**
|
6238
|
+
* Returns whether this field is set.
|
6239
|
+
* @return {boolean}
|
6240
|
+
*/
|
6241
|
+
proto.loyalty.UserLoyaltyResponse.prototype.hasCurrentPoints = function() {
|
6242
|
+
return jspb.Message.getField(this, 7) != null;
|
6243
|
+
};
|
6244
|
+
|
6245
|
+
|
5588
6246
|
goog.object.extend(exports, proto.loyalty);
|