protobuf-platform 1.0.282 → 1.0.284
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 +14 -0
- package/loyalty/loyalty_grpc_pb.js +22 -0
- package/loyalty/loyalty_pb.js +635 -1
- package/package.json +1 -1
package/loyalty/loyalty.proto
CHANGED
@@ -19,6 +19,7 @@ service Loyalty {
|
|
19
19
|
rpc readListPoints(PaginationRequest) returns (PointItemsResponse);
|
20
20
|
//Users
|
21
21
|
rpc getUserLoyalty(GetUserLoyaltyRequest) returns (UserLoyaltyResponse);
|
22
|
+
rpc getUserLoyaltyPoints(GetUserLoyaltyRequest) returns (UserLoyaltyPointsResponse);
|
22
23
|
}
|
23
24
|
|
24
25
|
message PingRequest { string ping = 1; }
|
@@ -131,6 +132,8 @@ message PointStatusResponse {
|
|
131
132
|
message GetUserLoyaltyRequest {
|
132
133
|
int32 user_id = 1;
|
133
134
|
optional bool admin_side = 2;
|
135
|
+
optional int32 limit = 3;
|
136
|
+
optional int32 offset = 4;
|
134
137
|
}
|
135
138
|
message UserLoyaltyResponse {
|
136
139
|
optional int32 loyalty_id = 1;
|
@@ -140,4 +143,15 @@ message UserLoyaltyResponse {
|
|
140
143
|
optional int32 points_to_complete = 5;
|
141
144
|
optional string image = 6;
|
142
145
|
optional int32 current_points = 7;
|
146
|
+
}
|
147
|
+
message UserLoyaltyPoint {
|
148
|
+
int32 user_point_id = 1;
|
149
|
+
string type = 2;
|
150
|
+
int32 points = 3;
|
151
|
+
optional string created = 4;
|
152
|
+
}
|
153
|
+
message UserLoyaltyPointsResponse {
|
154
|
+
repeated UserLoyaltyPoint items = 1;
|
155
|
+
optional int32 total_pages = 2;
|
156
|
+
optional int32 total_items = 3;
|
143
157
|
}
|
@@ -180,6 +180,17 @@ function deserialize_loyalty_PongResponse(buffer_arg) {
|
|
180
180
|
return loyalty_pb.PongResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
181
181
|
}
|
182
182
|
|
183
|
+
function serialize_loyalty_UserLoyaltyPointsResponse(arg) {
|
184
|
+
if (!(arg instanceof loyalty_pb.UserLoyaltyPointsResponse)) {
|
185
|
+
throw new Error('Expected argument of type loyalty.UserLoyaltyPointsResponse');
|
186
|
+
}
|
187
|
+
return Buffer.from(arg.serializeBinary());
|
188
|
+
}
|
189
|
+
|
190
|
+
function deserialize_loyalty_UserLoyaltyPointsResponse(buffer_arg) {
|
191
|
+
return loyalty_pb.UserLoyaltyPointsResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
192
|
+
}
|
193
|
+
|
183
194
|
function serialize_loyalty_UserLoyaltyResponse(arg) {
|
184
195
|
if (!(arg instanceof loyalty_pb.UserLoyaltyResponse)) {
|
185
196
|
throw new Error('Expected argument of type loyalty.UserLoyaltyResponse');
|
@@ -339,6 +350,17 @@ getUserLoyalty: {
|
|
339
350
|
responseSerialize: serialize_loyalty_UserLoyaltyResponse,
|
340
351
|
responseDeserialize: deserialize_loyalty_UserLoyaltyResponse,
|
341
352
|
},
|
353
|
+
getUserLoyaltyPoints: {
|
354
|
+
path: '/loyalty.Loyalty/getUserLoyaltyPoints',
|
355
|
+
requestStream: false,
|
356
|
+
responseStream: false,
|
357
|
+
requestType: loyalty_pb.GetUserLoyaltyRequest,
|
358
|
+
responseType: loyalty_pb.UserLoyaltyPointsResponse,
|
359
|
+
requestSerialize: serialize_loyalty_GetUserLoyaltyRequest,
|
360
|
+
requestDeserialize: deserialize_loyalty_GetUserLoyaltyRequest,
|
361
|
+
responseSerialize: serialize_loyalty_UserLoyaltyPointsResponse,
|
362
|
+
responseDeserialize: deserialize_loyalty_UserLoyaltyPointsResponse,
|
363
|
+
},
|
342
364
|
};
|
343
365
|
|
344
366
|
exports.LoyaltyClient = grpc.makeGenericClientConstructor(LoyaltyService);
|
package/loyalty/loyalty_pb.js
CHANGED
@@ -45,6 +45,8 @@ goog.exportSymbol('proto.loyalty.PointResponse', null, global);
|
|
45
45
|
goog.exportSymbol('proto.loyalty.PointStatusResponse', null, global);
|
46
46
|
goog.exportSymbol('proto.loyalty.PongResponse', null, global);
|
47
47
|
goog.exportSymbol('proto.loyalty.SignUpPoint', null, global);
|
48
|
+
goog.exportSymbol('proto.loyalty.UserLoyaltyPoint', null, global);
|
49
|
+
goog.exportSymbol('proto.loyalty.UserLoyaltyPointsResponse', null, global);
|
48
50
|
goog.exportSymbol('proto.loyalty.UserLoyaltyResponse', null, global);
|
49
51
|
/**
|
50
52
|
* Generated by JsPbCodeGenerator.
|
@@ -550,6 +552,48 @@ if (goog.DEBUG && !COMPILED) {
|
|
550
552
|
*/
|
551
553
|
proto.loyalty.UserLoyaltyResponse.displayName = 'proto.loyalty.UserLoyaltyResponse';
|
552
554
|
}
|
555
|
+
/**
|
556
|
+
* Generated by JsPbCodeGenerator.
|
557
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
558
|
+
* server response, or constructed directly in Javascript. The array is used
|
559
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
560
|
+
* If no data is provided, the constructed object will be empty, but still
|
561
|
+
* valid.
|
562
|
+
* @extends {jspb.Message}
|
563
|
+
* @constructor
|
564
|
+
*/
|
565
|
+
proto.loyalty.UserLoyaltyPoint = function(opt_data) {
|
566
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
567
|
+
};
|
568
|
+
goog.inherits(proto.loyalty.UserLoyaltyPoint, jspb.Message);
|
569
|
+
if (goog.DEBUG && !COMPILED) {
|
570
|
+
/**
|
571
|
+
* @public
|
572
|
+
* @override
|
573
|
+
*/
|
574
|
+
proto.loyalty.UserLoyaltyPoint.displayName = 'proto.loyalty.UserLoyaltyPoint';
|
575
|
+
}
|
576
|
+
/**
|
577
|
+
* Generated by JsPbCodeGenerator.
|
578
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
579
|
+
* server response, or constructed directly in Javascript. The array is used
|
580
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
581
|
+
* If no data is provided, the constructed object will be empty, but still
|
582
|
+
* valid.
|
583
|
+
* @extends {jspb.Message}
|
584
|
+
* @constructor
|
585
|
+
*/
|
586
|
+
proto.loyalty.UserLoyaltyPointsResponse = function(opt_data) {
|
587
|
+
jspb.Message.initialize(this, opt_data, 0, -1, proto.loyalty.UserLoyaltyPointsResponse.repeatedFields_, null);
|
588
|
+
};
|
589
|
+
goog.inherits(proto.loyalty.UserLoyaltyPointsResponse, jspb.Message);
|
590
|
+
if (goog.DEBUG && !COMPILED) {
|
591
|
+
/**
|
592
|
+
* @public
|
593
|
+
* @override
|
594
|
+
*/
|
595
|
+
proto.loyalty.UserLoyaltyPointsResponse.displayName = 'proto.loyalty.UserLoyaltyPointsResponse';
|
596
|
+
}
|
553
597
|
|
554
598
|
|
555
599
|
|
@@ -5662,7 +5706,9 @@ proto.loyalty.GetUserLoyaltyRequest.prototype.toObject = function(opt_includeIns
|
|
5662
5706
|
proto.loyalty.GetUserLoyaltyRequest.toObject = function(includeInstance, msg) {
|
5663
5707
|
var f, obj = {
|
5664
5708
|
userId: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
5665
|
-
adminSide: jspb.Message.getBooleanFieldWithDefault(msg, 2, false)
|
5709
|
+
adminSide: jspb.Message.getBooleanFieldWithDefault(msg, 2, false),
|
5710
|
+
limit: jspb.Message.getFieldWithDefault(msg, 3, 0),
|
5711
|
+
offset: jspb.Message.getFieldWithDefault(msg, 4, 0)
|
5666
5712
|
};
|
5667
5713
|
|
5668
5714
|
if (includeInstance) {
|
@@ -5707,6 +5753,14 @@ proto.loyalty.GetUserLoyaltyRequest.deserializeBinaryFromReader = function(msg,
|
|
5707
5753
|
var value = /** @type {boolean} */ (reader.readBool());
|
5708
5754
|
msg.setAdminSide(value);
|
5709
5755
|
break;
|
5756
|
+
case 3:
|
5757
|
+
var value = /** @type {number} */ (reader.readInt32());
|
5758
|
+
msg.setLimit(value);
|
5759
|
+
break;
|
5760
|
+
case 4:
|
5761
|
+
var value = /** @type {number} */ (reader.readInt32());
|
5762
|
+
msg.setOffset(value);
|
5763
|
+
break;
|
5710
5764
|
default:
|
5711
5765
|
reader.skipField();
|
5712
5766
|
break;
|
@@ -5750,6 +5804,20 @@ proto.loyalty.GetUserLoyaltyRequest.serializeBinaryToWriter = function(message,
|
|
5750
5804
|
f
|
5751
5805
|
);
|
5752
5806
|
}
|
5807
|
+
f = /** @type {number} */ (jspb.Message.getField(message, 3));
|
5808
|
+
if (f != null) {
|
5809
|
+
writer.writeInt32(
|
5810
|
+
3,
|
5811
|
+
f
|
5812
|
+
);
|
5813
|
+
}
|
5814
|
+
f = /** @type {number} */ (jspb.Message.getField(message, 4));
|
5815
|
+
if (f != null) {
|
5816
|
+
writer.writeInt32(
|
5817
|
+
4,
|
5818
|
+
f
|
5819
|
+
);
|
5820
|
+
}
|
5753
5821
|
};
|
5754
5822
|
|
5755
5823
|
|
@@ -5807,6 +5875,78 @@ proto.loyalty.GetUserLoyaltyRequest.prototype.hasAdminSide = function() {
|
|
5807
5875
|
};
|
5808
5876
|
|
5809
5877
|
|
5878
|
+
/**
|
5879
|
+
* optional int32 limit = 3;
|
5880
|
+
* @return {number}
|
5881
|
+
*/
|
5882
|
+
proto.loyalty.GetUserLoyaltyRequest.prototype.getLimit = function() {
|
5883
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
|
5884
|
+
};
|
5885
|
+
|
5886
|
+
|
5887
|
+
/**
|
5888
|
+
* @param {number} value
|
5889
|
+
* @return {!proto.loyalty.GetUserLoyaltyRequest} returns this
|
5890
|
+
*/
|
5891
|
+
proto.loyalty.GetUserLoyaltyRequest.prototype.setLimit = function(value) {
|
5892
|
+
return jspb.Message.setField(this, 3, value);
|
5893
|
+
};
|
5894
|
+
|
5895
|
+
|
5896
|
+
/**
|
5897
|
+
* Clears the field making it undefined.
|
5898
|
+
* @return {!proto.loyalty.GetUserLoyaltyRequest} returns this
|
5899
|
+
*/
|
5900
|
+
proto.loyalty.GetUserLoyaltyRequest.prototype.clearLimit = function() {
|
5901
|
+
return jspb.Message.setField(this, 3, undefined);
|
5902
|
+
};
|
5903
|
+
|
5904
|
+
|
5905
|
+
/**
|
5906
|
+
* Returns whether this field is set.
|
5907
|
+
* @return {boolean}
|
5908
|
+
*/
|
5909
|
+
proto.loyalty.GetUserLoyaltyRequest.prototype.hasLimit = function() {
|
5910
|
+
return jspb.Message.getField(this, 3) != null;
|
5911
|
+
};
|
5912
|
+
|
5913
|
+
|
5914
|
+
/**
|
5915
|
+
* optional int32 offset = 4;
|
5916
|
+
* @return {number}
|
5917
|
+
*/
|
5918
|
+
proto.loyalty.GetUserLoyaltyRequest.prototype.getOffset = function() {
|
5919
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
|
5920
|
+
};
|
5921
|
+
|
5922
|
+
|
5923
|
+
/**
|
5924
|
+
* @param {number} value
|
5925
|
+
* @return {!proto.loyalty.GetUserLoyaltyRequest} returns this
|
5926
|
+
*/
|
5927
|
+
proto.loyalty.GetUserLoyaltyRequest.prototype.setOffset = function(value) {
|
5928
|
+
return jspb.Message.setField(this, 4, value);
|
5929
|
+
};
|
5930
|
+
|
5931
|
+
|
5932
|
+
/**
|
5933
|
+
* Clears the field making it undefined.
|
5934
|
+
* @return {!proto.loyalty.GetUserLoyaltyRequest} returns this
|
5935
|
+
*/
|
5936
|
+
proto.loyalty.GetUserLoyaltyRequest.prototype.clearOffset = function() {
|
5937
|
+
return jspb.Message.setField(this, 4, undefined);
|
5938
|
+
};
|
5939
|
+
|
5940
|
+
|
5941
|
+
/**
|
5942
|
+
* Returns whether this field is set.
|
5943
|
+
* @return {boolean}
|
5944
|
+
*/
|
5945
|
+
proto.loyalty.GetUserLoyaltyRequest.prototype.hasOffset = function() {
|
5946
|
+
return jspb.Message.getField(this, 4) != null;
|
5947
|
+
};
|
5948
|
+
|
5949
|
+
|
5810
5950
|
|
5811
5951
|
|
5812
5952
|
|
@@ -6243,4 +6383,498 @@ proto.loyalty.UserLoyaltyResponse.prototype.hasCurrentPoints = function() {
|
|
6243
6383
|
};
|
6244
6384
|
|
6245
6385
|
|
6386
|
+
|
6387
|
+
|
6388
|
+
|
6389
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
6390
|
+
/**
|
6391
|
+
* Creates an object representation of this proto.
|
6392
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
6393
|
+
* Optional fields that are not set will be set to undefined.
|
6394
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
6395
|
+
* For the list of reserved names please see:
|
6396
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
6397
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
6398
|
+
* JSPB instance for transitional soy proto support:
|
6399
|
+
* http://goto/soy-param-migration
|
6400
|
+
* @return {!Object}
|
6401
|
+
*/
|
6402
|
+
proto.loyalty.UserLoyaltyPoint.prototype.toObject = function(opt_includeInstance) {
|
6403
|
+
return proto.loyalty.UserLoyaltyPoint.toObject(opt_includeInstance, this);
|
6404
|
+
};
|
6405
|
+
|
6406
|
+
|
6407
|
+
/**
|
6408
|
+
* Static version of the {@see toObject} method.
|
6409
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
6410
|
+
* the JSPB instance for transitional soy proto support:
|
6411
|
+
* http://goto/soy-param-migration
|
6412
|
+
* @param {!proto.loyalty.UserLoyaltyPoint} msg The msg instance to transform.
|
6413
|
+
* @return {!Object}
|
6414
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
6415
|
+
*/
|
6416
|
+
proto.loyalty.UserLoyaltyPoint.toObject = function(includeInstance, msg) {
|
6417
|
+
var f, obj = {
|
6418
|
+
userPointId: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
6419
|
+
type: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
6420
|
+
points: jspb.Message.getFieldWithDefault(msg, 3, 0),
|
6421
|
+
created: jspb.Message.getFieldWithDefault(msg, 4, "")
|
6422
|
+
};
|
6423
|
+
|
6424
|
+
if (includeInstance) {
|
6425
|
+
obj.$jspbMessageInstance = msg;
|
6426
|
+
}
|
6427
|
+
return obj;
|
6428
|
+
};
|
6429
|
+
}
|
6430
|
+
|
6431
|
+
|
6432
|
+
/**
|
6433
|
+
* Deserializes binary data (in protobuf wire format).
|
6434
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
6435
|
+
* @return {!proto.loyalty.UserLoyaltyPoint}
|
6436
|
+
*/
|
6437
|
+
proto.loyalty.UserLoyaltyPoint.deserializeBinary = function(bytes) {
|
6438
|
+
var reader = new jspb.BinaryReader(bytes);
|
6439
|
+
var msg = new proto.loyalty.UserLoyaltyPoint;
|
6440
|
+
return proto.loyalty.UserLoyaltyPoint.deserializeBinaryFromReader(msg, reader);
|
6441
|
+
};
|
6442
|
+
|
6443
|
+
|
6444
|
+
/**
|
6445
|
+
* Deserializes binary data (in protobuf wire format) from the
|
6446
|
+
* given reader into the given message object.
|
6447
|
+
* @param {!proto.loyalty.UserLoyaltyPoint} msg The message object to deserialize into.
|
6448
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
6449
|
+
* @return {!proto.loyalty.UserLoyaltyPoint}
|
6450
|
+
*/
|
6451
|
+
proto.loyalty.UserLoyaltyPoint.deserializeBinaryFromReader = function(msg, reader) {
|
6452
|
+
while (reader.nextField()) {
|
6453
|
+
if (reader.isEndGroup()) {
|
6454
|
+
break;
|
6455
|
+
}
|
6456
|
+
var field = reader.getFieldNumber();
|
6457
|
+
switch (field) {
|
6458
|
+
case 1:
|
6459
|
+
var value = /** @type {number} */ (reader.readInt32());
|
6460
|
+
msg.setUserPointId(value);
|
6461
|
+
break;
|
6462
|
+
case 2:
|
6463
|
+
var value = /** @type {string} */ (reader.readString());
|
6464
|
+
msg.setType(value);
|
6465
|
+
break;
|
6466
|
+
case 3:
|
6467
|
+
var value = /** @type {number} */ (reader.readInt32());
|
6468
|
+
msg.setPoints(value);
|
6469
|
+
break;
|
6470
|
+
case 4:
|
6471
|
+
var value = /** @type {string} */ (reader.readString());
|
6472
|
+
msg.setCreated(value);
|
6473
|
+
break;
|
6474
|
+
default:
|
6475
|
+
reader.skipField();
|
6476
|
+
break;
|
6477
|
+
}
|
6478
|
+
}
|
6479
|
+
return msg;
|
6480
|
+
};
|
6481
|
+
|
6482
|
+
|
6483
|
+
/**
|
6484
|
+
* Serializes the message to binary data (in protobuf wire format).
|
6485
|
+
* @return {!Uint8Array}
|
6486
|
+
*/
|
6487
|
+
proto.loyalty.UserLoyaltyPoint.prototype.serializeBinary = function() {
|
6488
|
+
var writer = new jspb.BinaryWriter();
|
6489
|
+
proto.loyalty.UserLoyaltyPoint.serializeBinaryToWriter(this, writer);
|
6490
|
+
return writer.getResultBuffer();
|
6491
|
+
};
|
6492
|
+
|
6493
|
+
|
6494
|
+
/**
|
6495
|
+
* Serializes the given message to binary data (in protobuf wire
|
6496
|
+
* format), writing to the given BinaryWriter.
|
6497
|
+
* @param {!proto.loyalty.UserLoyaltyPoint} message
|
6498
|
+
* @param {!jspb.BinaryWriter} writer
|
6499
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
6500
|
+
*/
|
6501
|
+
proto.loyalty.UserLoyaltyPoint.serializeBinaryToWriter = function(message, writer) {
|
6502
|
+
var f = undefined;
|
6503
|
+
f = message.getUserPointId();
|
6504
|
+
if (f !== 0) {
|
6505
|
+
writer.writeInt32(
|
6506
|
+
1,
|
6507
|
+
f
|
6508
|
+
);
|
6509
|
+
}
|
6510
|
+
f = message.getType();
|
6511
|
+
if (f.length > 0) {
|
6512
|
+
writer.writeString(
|
6513
|
+
2,
|
6514
|
+
f
|
6515
|
+
);
|
6516
|
+
}
|
6517
|
+
f = message.getPoints();
|
6518
|
+
if (f !== 0) {
|
6519
|
+
writer.writeInt32(
|
6520
|
+
3,
|
6521
|
+
f
|
6522
|
+
);
|
6523
|
+
}
|
6524
|
+
f = /** @type {string} */ (jspb.Message.getField(message, 4));
|
6525
|
+
if (f != null) {
|
6526
|
+
writer.writeString(
|
6527
|
+
4,
|
6528
|
+
f
|
6529
|
+
);
|
6530
|
+
}
|
6531
|
+
};
|
6532
|
+
|
6533
|
+
|
6534
|
+
/**
|
6535
|
+
* optional int32 user_point_id = 1;
|
6536
|
+
* @return {number}
|
6537
|
+
*/
|
6538
|
+
proto.loyalty.UserLoyaltyPoint.prototype.getUserPointId = function() {
|
6539
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
6540
|
+
};
|
6541
|
+
|
6542
|
+
|
6543
|
+
/**
|
6544
|
+
* @param {number} value
|
6545
|
+
* @return {!proto.loyalty.UserLoyaltyPoint} returns this
|
6546
|
+
*/
|
6547
|
+
proto.loyalty.UserLoyaltyPoint.prototype.setUserPointId = function(value) {
|
6548
|
+
return jspb.Message.setProto3IntField(this, 1, value);
|
6549
|
+
};
|
6550
|
+
|
6551
|
+
|
6552
|
+
/**
|
6553
|
+
* optional string type = 2;
|
6554
|
+
* @return {string}
|
6555
|
+
*/
|
6556
|
+
proto.loyalty.UserLoyaltyPoint.prototype.getType = function() {
|
6557
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
6558
|
+
};
|
6559
|
+
|
6560
|
+
|
6561
|
+
/**
|
6562
|
+
* @param {string} value
|
6563
|
+
* @return {!proto.loyalty.UserLoyaltyPoint} returns this
|
6564
|
+
*/
|
6565
|
+
proto.loyalty.UserLoyaltyPoint.prototype.setType = function(value) {
|
6566
|
+
return jspb.Message.setProto3StringField(this, 2, value);
|
6567
|
+
};
|
6568
|
+
|
6569
|
+
|
6570
|
+
/**
|
6571
|
+
* optional int32 points = 3;
|
6572
|
+
* @return {number}
|
6573
|
+
*/
|
6574
|
+
proto.loyalty.UserLoyaltyPoint.prototype.getPoints = function() {
|
6575
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
|
6576
|
+
};
|
6577
|
+
|
6578
|
+
|
6579
|
+
/**
|
6580
|
+
* @param {number} value
|
6581
|
+
* @return {!proto.loyalty.UserLoyaltyPoint} returns this
|
6582
|
+
*/
|
6583
|
+
proto.loyalty.UserLoyaltyPoint.prototype.setPoints = function(value) {
|
6584
|
+
return jspb.Message.setProto3IntField(this, 3, value);
|
6585
|
+
};
|
6586
|
+
|
6587
|
+
|
6588
|
+
/**
|
6589
|
+
* optional string created = 4;
|
6590
|
+
* @return {string}
|
6591
|
+
*/
|
6592
|
+
proto.loyalty.UserLoyaltyPoint.prototype.getCreated = function() {
|
6593
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
|
6594
|
+
};
|
6595
|
+
|
6596
|
+
|
6597
|
+
/**
|
6598
|
+
* @param {string} value
|
6599
|
+
* @return {!proto.loyalty.UserLoyaltyPoint} returns this
|
6600
|
+
*/
|
6601
|
+
proto.loyalty.UserLoyaltyPoint.prototype.setCreated = function(value) {
|
6602
|
+
return jspb.Message.setField(this, 4, value);
|
6603
|
+
};
|
6604
|
+
|
6605
|
+
|
6606
|
+
/**
|
6607
|
+
* Clears the field making it undefined.
|
6608
|
+
* @return {!proto.loyalty.UserLoyaltyPoint} returns this
|
6609
|
+
*/
|
6610
|
+
proto.loyalty.UserLoyaltyPoint.prototype.clearCreated = function() {
|
6611
|
+
return jspb.Message.setField(this, 4, undefined);
|
6612
|
+
};
|
6613
|
+
|
6614
|
+
|
6615
|
+
/**
|
6616
|
+
* Returns whether this field is set.
|
6617
|
+
* @return {boolean}
|
6618
|
+
*/
|
6619
|
+
proto.loyalty.UserLoyaltyPoint.prototype.hasCreated = function() {
|
6620
|
+
return jspb.Message.getField(this, 4) != null;
|
6621
|
+
};
|
6622
|
+
|
6623
|
+
|
6624
|
+
|
6625
|
+
/**
|
6626
|
+
* List of repeated fields within this message type.
|
6627
|
+
* @private {!Array<number>}
|
6628
|
+
* @const
|
6629
|
+
*/
|
6630
|
+
proto.loyalty.UserLoyaltyPointsResponse.repeatedFields_ = [1];
|
6631
|
+
|
6632
|
+
|
6633
|
+
|
6634
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
6635
|
+
/**
|
6636
|
+
* Creates an object representation of this proto.
|
6637
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
6638
|
+
* Optional fields that are not set will be set to undefined.
|
6639
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
6640
|
+
* For the list of reserved names please see:
|
6641
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
6642
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
6643
|
+
* JSPB instance for transitional soy proto support:
|
6644
|
+
* http://goto/soy-param-migration
|
6645
|
+
* @return {!Object}
|
6646
|
+
*/
|
6647
|
+
proto.loyalty.UserLoyaltyPointsResponse.prototype.toObject = function(opt_includeInstance) {
|
6648
|
+
return proto.loyalty.UserLoyaltyPointsResponse.toObject(opt_includeInstance, this);
|
6649
|
+
};
|
6650
|
+
|
6651
|
+
|
6652
|
+
/**
|
6653
|
+
* Static version of the {@see toObject} method.
|
6654
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
6655
|
+
* the JSPB instance for transitional soy proto support:
|
6656
|
+
* http://goto/soy-param-migration
|
6657
|
+
* @param {!proto.loyalty.UserLoyaltyPointsResponse} msg The msg instance to transform.
|
6658
|
+
* @return {!Object}
|
6659
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
6660
|
+
*/
|
6661
|
+
proto.loyalty.UserLoyaltyPointsResponse.toObject = function(includeInstance, msg) {
|
6662
|
+
var f, obj = {
|
6663
|
+
itemsList: jspb.Message.toObjectList(msg.getItemsList(),
|
6664
|
+
proto.loyalty.UserLoyaltyPoint.toObject, includeInstance),
|
6665
|
+
totalPages: jspb.Message.getFieldWithDefault(msg, 2, 0),
|
6666
|
+
totalItems: jspb.Message.getFieldWithDefault(msg, 3, 0)
|
6667
|
+
};
|
6668
|
+
|
6669
|
+
if (includeInstance) {
|
6670
|
+
obj.$jspbMessageInstance = msg;
|
6671
|
+
}
|
6672
|
+
return obj;
|
6673
|
+
};
|
6674
|
+
}
|
6675
|
+
|
6676
|
+
|
6677
|
+
/**
|
6678
|
+
* Deserializes binary data (in protobuf wire format).
|
6679
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
6680
|
+
* @return {!proto.loyalty.UserLoyaltyPointsResponse}
|
6681
|
+
*/
|
6682
|
+
proto.loyalty.UserLoyaltyPointsResponse.deserializeBinary = function(bytes) {
|
6683
|
+
var reader = new jspb.BinaryReader(bytes);
|
6684
|
+
var msg = new proto.loyalty.UserLoyaltyPointsResponse;
|
6685
|
+
return proto.loyalty.UserLoyaltyPointsResponse.deserializeBinaryFromReader(msg, reader);
|
6686
|
+
};
|
6687
|
+
|
6688
|
+
|
6689
|
+
/**
|
6690
|
+
* Deserializes binary data (in protobuf wire format) from the
|
6691
|
+
* given reader into the given message object.
|
6692
|
+
* @param {!proto.loyalty.UserLoyaltyPointsResponse} msg The message object to deserialize into.
|
6693
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
6694
|
+
* @return {!proto.loyalty.UserLoyaltyPointsResponse}
|
6695
|
+
*/
|
6696
|
+
proto.loyalty.UserLoyaltyPointsResponse.deserializeBinaryFromReader = function(msg, reader) {
|
6697
|
+
while (reader.nextField()) {
|
6698
|
+
if (reader.isEndGroup()) {
|
6699
|
+
break;
|
6700
|
+
}
|
6701
|
+
var field = reader.getFieldNumber();
|
6702
|
+
switch (field) {
|
6703
|
+
case 1:
|
6704
|
+
var value = new proto.loyalty.UserLoyaltyPoint;
|
6705
|
+
reader.readMessage(value,proto.loyalty.UserLoyaltyPoint.deserializeBinaryFromReader);
|
6706
|
+
msg.addItems(value);
|
6707
|
+
break;
|
6708
|
+
case 2:
|
6709
|
+
var value = /** @type {number} */ (reader.readInt32());
|
6710
|
+
msg.setTotalPages(value);
|
6711
|
+
break;
|
6712
|
+
case 3:
|
6713
|
+
var value = /** @type {number} */ (reader.readInt32());
|
6714
|
+
msg.setTotalItems(value);
|
6715
|
+
break;
|
6716
|
+
default:
|
6717
|
+
reader.skipField();
|
6718
|
+
break;
|
6719
|
+
}
|
6720
|
+
}
|
6721
|
+
return msg;
|
6722
|
+
};
|
6723
|
+
|
6724
|
+
|
6725
|
+
/**
|
6726
|
+
* Serializes the message to binary data (in protobuf wire format).
|
6727
|
+
* @return {!Uint8Array}
|
6728
|
+
*/
|
6729
|
+
proto.loyalty.UserLoyaltyPointsResponse.prototype.serializeBinary = function() {
|
6730
|
+
var writer = new jspb.BinaryWriter();
|
6731
|
+
proto.loyalty.UserLoyaltyPointsResponse.serializeBinaryToWriter(this, writer);
|
6732
|
+
return writer.getResultBuffer();
|
6733
|
+
};
|
6734
|
+
|
6735
|
+
|
6736
|
+
/**
|
6737
|
+
* Serializes the given message to binary data (in protobuf wire
|
6738
|
+
* format), writing to the given BinaryWriter.
|
6739
|
+
* @param {!proto.loyalty.UserLoyaltyPointsResponse} message
|
6740
|
+
* @param {!jspb.BinaryWriter} writer
|
6741
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
6742
|
+
*/
|
6743
|
+
proto.loyalty.UserLoyaltyPointsResponse.serializeBinaryToWriter = function(message, writer) {
|
6744
|
+
var f = undefined;
|
6745
|
+
f = message.getItemsList();
|
6746
|
+
if (f.length > 0) {
|
6747
|
+
writer.writeRepeatedMessage(
|
6748
|
+
1,
|
6749
|
+
f,
|
6750
|
+
proto.loyalty.UserLoyaltyPoint.serializeBinaryToWriter
|
6751
|
+
);
|
6752
|
+
}
|
6753
|
+
f = /** @type {number} */ (jspb.Message.getField(message, 2));
|
6754
|
+
if (f != null) {
|
6755
|
+
writer.writeInt32(
|
6756
|
+
2,
|
6757
|
+
f
|
6758
|
+
);
|
6759
|
+
}
|
6760
|
+
f = /** @type {number} */ (jspb.Message.getField(message, 3));
|
6761
|
+
if (f != null) {
|
6762
|
+
writer.writeInt32(
|
6763
|
+
3,
|
6764
|
+
f
|
6765
|
+
);
|
6766
|
+
}
|
6767
|
+
};
|
6768
|
+
|
6769
|
+
|
6770
|
+
/**
|
6771
|
+
* repeated UserLoyaltyPoint items = 1;
|
6772
|
+
* @return {!Array<!proto.loyalty.UserLoyaltyPoint>}
|
6773
|
+
*/
|
6774
|
+
proto.loyalty.UserLoyaltyPointsResponse.prototype.getItemsList = function() {
|
6775
|
+
return /** @type{!Array<!proto.loyalty.UserLoyaltyPoint>} */ (
|
6776
|
+
jspb.Message.getRepeatedWrapperField(this, proto.loyalty.UserLoyaltyPoint, 1));
|
6777
|
+
};
|
6778
|
+
|
6779
|
+
|
6780
|
+
/**
|
6781
|
+
* @param {!Array<!proto.loyalty.UserLoyaltyPoint>} value
|
6782
|
+
* @return {!proto.loyalty.UserLoyaltyPointsResponse} returns this
|
6783
|
+
*/
|
6784
|
+
proto.loyalty.UserLoyaltyPointsResponse.prototype.setItemsList = function(value) {
|
6785
|
+
return jspb.Message.setRepeatedWrapperField(this, 1, value);
|
6786
|
+
};
|
6787
|
+
|
6788
|
+
|
6789
|
+
/**
|
6790
|
+
* @param {!proto.loyalty.UserLoyaltyPoint=} opt_value
|
6791
|
+
* @param {number=} opt_index
|
6792
|
+
* @return {!proto.loyalty.UserLoyaltyPoint}
|
6793
|
+
*/
|
6794
|
+
proto.loyalty.UserLoyaltyPointsResponse.prototype.addItems = function(opt_value, opt_index) {
|
6795
|
+
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.loyalty.UserLoyaltyPoint, opt_index);
|
6796
|
+
};
|
6797
|
+
|
6798
|
+
|
6799
|
+
/**
|
6800
|
+
* Clears the list making it empty but non-null.
|
6801
|
+
* @return {!proto.loyalty.UserLoyaltyPointsResponse} returns this
|
6802
|
+
*/
|
6803
|
+
proto.loyalty.UserLoyaltyPointsResponse.prototype.clearItemsList = function() {
|
6804
|
+
return this.setItemsList([]);
|
6805
|
+
};
|
6806
|
+
|
6807
|
+
|
6808
|
+
/**
|
6809
|
+
* optional int32 total_pages = 2;
|
6810
|
+
* @return {number}
|
6811
|
+
*/
|
6812
|
+
proto.loyalty.UserLoyaltyPointsResponse.prototype.getTotalPages = function() {
|
6813
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
|
6814
|
+
};
|
6815
|
+
|
6816
|
+
|
6817
|
+
/**
|
6818
|
+
* @param {number} value
|
6819
|
+
* @return {!proto.loyalty.UserLoyaltyPointsResponse} returns this
|
6820
|
+
*/
|
6821
|
+
proto.loyalty.UserLoyaltyPointsResponse.prototype.setTotalPages = function(value) {
|
6822
|
+
return jspb.Message.setField(this, 2, value);
|
6823
|
+
};
|
6824
|
+
|
6825
|
+
|
6826
|
+
/**
|
6827
|
+
* Clears the field making it undefined.
|
6828
|
+
* @return {!proto.loyalty.UserLoyaltyPointsResponse} returns this
|
6829
|
+
*/
|
6830
|
+
proto.loyalty.UserLoyaltyPointsResponse.prototype.clearTotalPages = function() {
|
6831
|
+
return jspb.Message.setField(this, 2, undefined);
|
6832
|
+
};
|
6833
|
+
|
6834
|
+
|
6835
|
+
/**
|
6836
|
+
* Returns whether this field is set.
|
6837
|
+
* @return {boolean}
|
6838
|
+
*/
|
6839
|
+
proto.loyalty.UserLoyaltyPointsResponse.prototype.hasTotalPages = function() {
|
6840
|
+
return jspb.Message.getField(this, 2) != null;
|
6841
|
+
};
|
6842
|
+
|
6843
|
+
|
6844
|
+
/**
|
6845
|
+
* optional int32 total_items = 3;
|
6846
|
+
* @return {number}
|
6847
|
+
*/
|
6848
|
+
proto.loyalty.UserLoyaltyPointsResponse.prototype.getTotalItems = function() {
|
6849
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
|
6850
|
+
};
|
6851
|
+
|
6852
|
+
|
6853
|
+
/**
|
6854
|
+
* @param {number} value
|
6855
|
+
* @return {!proto.loyalty.UserLoyaltyPointsResponse} returns this
|
6856
|
+
*/
|
6857
|
+
proto.loyalty.UserLoyaltyPointsResponse.prototype.setTotalItems = function(value) {
|
6858
|
+
return jspb.Message.setField(this, 3, value);
|
6859
|
+
};
|
6860
|
+
|
6861
|
+
|
6862
|
+
/**
|
6863
|
+
* Clears the field making it undefined.
|
6864
|
+
* @return {!proto.loyalty.UserLoyaltyPointsResponse} returns this
|
6865
|
+
*/
|
6866
|
+
proto.loyalty.UserLoyaltyPointsResponse.prototype.clearTotalItems = function() {
|
6867
|
+
return jspb.Message.setField(this, 3, undefined);
|
6868
|
+
};
|
6869
|
+
|
6870
|
+
|
6871
|
+
/**
|
6872
|
+
* Returns whether this field is set.
|
6873
|
+
* @return {boolean}
|
6874
|
+
*/
|
6875
|
+
proto.loyalty.UserLoyaltyPointsResponse.prototype.hasTotalItems = function() {
|
6876
|
+
return jspb.Message.getField(this, 3) != null;
|
6877
|
+
};
|
6878
|
+
|
6879
|
+
|
6246
6880
|
goog.object.extend(exports, proto.loyalty);
|