protobuf-platform 1.0.122 → 1.0.123
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 +26 -0
- package/bonus/bonus_grpc_pb.js +45 -0
- package/bonus/bonus_pb.js +1112 -0
- package/package.json +1 -1
package/bonus/bonus.proto
CHANGED
@@ -9,6 +9,9 @@ service Bonus {
|
|
9
9
|
rpc updateSingleBonus(stream BonusRequest) returns (BonusResponse);
|
10
10
|
rpc deleteSingleBonus(GetBonusRequest) returns (BonusStatusResponse);
|
11
11
|
rpc readListBonuses(PaginationRequest) returns (BonusItemsResponse);
|
12
|
+
//Common lists
|
13
|
+
rpc readListBonusTypes(PaginationRequest) returns (BonusTypesResponse);
|
14
|
+
rpc readListBonusStatuses(PaginationRequest) returns (BonusStatusesResponse);
|
12
15
|
}
|
13
16
|
//Technical
|
14
17
|
message PingRequest { string ping = 1; }
|
@@ -95,3 +98,26 @@ message BonusItemsResponse {
|
|
95
98
|
message BonusStatusResponse {
|
96
99
|
string status = 1;
|
97
100
|
}
|
101
|
+
//Common Lists
|
102
|
+
message BonusType {
|
103
|
+
int32 id = 1;
|
104
|
+
string title = 2;
|
105
|
+
optional string description = 3;
|
106
|
+
optional bool is_active = 4;
|
107
|
+
}
|
108
|
+
message BonusStatus {
|
109
|
+
int32 id = 1;
|
110
|
+
string title = 2;
|
111
|
+
optional string description = 3;
|
112
|
+
optional bool is_active = 4;
|
113
|
+
}
|
114
|
+
message BonusTypesResponse {
|
115
|
+
repeated BonusType items = 1;
|
116
|
+
optional int32 total_pages = 2;
|
117
|
+
optional int32 total_items = 3;
|
118
|
+
}
|
119
|
+
message BonusStatusesResponse {
|
120
|
+
repeated BonusStatus items = 1;
|
121
|
+
optional int32 total_pages = 2;
|
122
|
+
optional int32 total_items = 3;
|
123
|
+
}
|
package/bonus/bonus_grpc_pb.js
CHANGED
@@ -48,6 +48,28 @@ function deserialize_bonus_BonusStatusResponse(buffer_arg) {
|
|
48
48
|
return bonus_pb.BonusStatusResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
49
49
|
}
|
50
50
|
|
51
|
+
function serialize_bonus_BonusStatusesResponse(arg) {
|
52
|
+
if (!(arg instanceof bonus_pb.BonusStatusesResponse)) {
|
53
|
+
throw new Error('Expected argument of type bonus.BonusStatusesResponse');
|
54
|
+
}
|
55
|
+
return Buffer.from(arg.serializeBinary());
|
56
|
+
}
|
57
|
+
|
58
|
+
function deserialize_bonus_BonusStatusesResponse(buffer_arg) {
|
59
|
+
return bonus_pb.BonusStatusesResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
60
|
+
}
|
61
|
+
|
62
|
+
function serialize_bonus_BonusTypesResponse(arg) {
|
63
|
+
if (!(arg instanceof bonus_pb.BonusTypesResponse)) {
|
64
|
+
throw new Error('Expected argument of type bonus.BonusTypesResponse');
|
65
|
+
}
|
66
|
+
return Buffer.from(arg.serializeBinary());
|
67
|
+
}
|
68
|
+
|
69
|
+
function deserialize_bonus_BonusTypesResponse(buffer_arg) {
|
70
|
+
return bonus_pb.BonusTypesResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
71
|
+
}
|
72
|
+
|
51
73
|
function serialize_bonus_GetBonusRequest(arg) {
|
52
74
|
if (!(arg instanceof bonus_pb.GetBonusRequest)) {
|
53
75
|
throw new Error('Expected argument of type bonus.GetBonusRequest');
|
@@ -160,6 +182,29 @@ var BonusService = exports.BonusService = {
|
|
160
182
|
responseSerialize: serialize_bonus_BonusItemsResponse,
|
161
183
|
responseDeserialize: deserialize_bonus_BonusItemsResponse,
|
162
184
|
},
|
185
|
+
// Common lists
|
186
|
+
readListBonusTypes: {
|
187
|
+
path: '/bonus.Bonus/readListBonusTypes',
|
188
|
+
requestStream: false,
|
189
|
+
responseStream: false,
|
190
|
+
requestType: bonus_pb.PaginationRequest,
|
191
|
+
responseType: bonus_pb.BonusTypesResponse,
|
192
|
+
requestSerialize: serialize_bonus_PaginationRequest,
|
193
|
+
requestDeserialize: deserialize_bonus_PaginationRequest,
|
194
|
+
responseSerialize: serialize_bonus_BonusTypesResponse,
|
195
|
+
responseDeserialize: deserialize_bonus_BonusTypesResponse,
|
196
|
+
},
|
197
|
+
readListBonusStatuses: {
|
198
|
+
path: '/bonus.Bonus/readListBonusStatuses',
|
199
|
+
requestStream: false,
|
200
|
+
responseStream: false,
|
201
|
+
requestType: bonus_pb.PaginationRequest,
|
202
|
+
responseType: bonus_pb.BonusStatusesResponse,
|
203
|
+
requestSerialize: serialize_bonus_PaginationRequest,
|
204
|
+
requestDeserialize: deserialize_bonus_PaginationRequest,
|
205
|
+
responseSerialize: serialize_bonus_BonusStatusesResponse,
|
206
|
+
responseDeserialize: deserialize_bonus_BonusStatusesResponse,
|
207
|
+
},
|
163
208
|
};
|
164
209
|
|
165
210
|
exports.BonusClient = grpc.makeGenericClientConstructor(BonusService);
|
package/bonus/bonus_pb.js
CHANGED
@@ -29,7 +29,11 @@ goog.exportSymbol('proto.bonus.BonusRequest', null, global);
|
|
29
29
|
goog.exportSymbol('proto.bonus.BonusRequest.RequestCase', null, global);
|
30
30
|
goog.exportSymbol('proto.bonus.BonusResponse', null, global);
|
31
31
|
goog.exportSymbol('proto.bonus.BonusReward', null, global);
|
32
|
+
goog.exportSymbol('proto.bonus.BonusStatus', null, global);
|
32
33
|
goog.exportSymbol('proto.bonus.BonusStatusResponse', null, global);
|
34
|
+
goog.exportSymbol('proto.bonus.BonusStatusesResponse', null, global);
|
35
|
+
goog.exportSymbol('proto.bonus.BonusType', null, global);
|
36
|
+
goog.exportSymbol('proto.bonus.BonusTypesResponse', null, global);
|
33
37
|
goog.exportSymbol('proto.bonus.File', null, global);
|
34
38
|
goog.exportSymbol('proto.bonus.GetBonusRequest', null, global);
|
35
39
|
goog.exportSymbol('proto.bonus.GetFileRequest', null, global);
|
@@ -330,6 +334,90 @@ if (goog.DEBUG && !COMPILED) {
|
|
330
334
|
*/
|
331
335
|
proto.bonus.BonusStatusResponse.displayName = 'proto.bonus.BonusStatusResponse';
|
332
336
|
}
|
337
|
+
/**
|
338
|
+
* Generated by JsPbCodeGenerator.
|
339
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
340
|
+
* server response, or constructed directly in Javascript. The array is used
|
341
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
342
|
+
* If no data is provided, the constructed object will be empty, but still
|
343
|
+
* valid.
|
344
|
+
* @extends {jspb.Message}
|
345
|
+
* @constructor
|
346
|
+
*/
|
347
|
+
proto.bonus.BonusType = function(opt_data) {
|
348
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
349
|
+
};
|
350
|
+
goog.inherits(proto.bonus.BonusType, jspb.Message);
|
351
|
+
if (goog.DEBUG && !COMPILED) {
|
352
|
+
/**
|
353
|
+
* @public
|
354
|
+
* @override
|
355
|
+
*/
|
356
|
+
proto.bonus.BonusType.displayName = 'proto.bonus.BonusType';
|
357
|
+
}
|
358
|
+
/**
|
359
|
+
* Generated by JsPbCodeGenerator.
|
360
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
361
|
+
* server response, or constructed directly in Javascript. The array is used
|
362
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
363
|
+
* If no data is provided, the constructed object will be empty, but still
|
364
|
+
* valid.
|
365
|
+
* @extends {jspb.Message}
|
366
|
+
* @constructor
|
367
|
+
*/
|
368
|
+
proto.bonus.BonusStatus = function(opt_data) {
|
369
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
370
|
+
};
|
371
|
+
goog.inherits(proto.bonus.BonusStatus, jspb.Message);
|
372
|
+
if (goog.DEBUG && !COMPILED) {
|
373
|
+
/**
|
374
|
+
* @public
|
375
|
+
* @override
|
376
|
+
*/
|
377
|
+
proto.bonus.BonusStatus.displayName = 'proto.bonus.BonusStatus';
|
378
|
+
}
|
379
|
+
/**
|
380
|
+
* Generated by JsPbCodeGenerator.
|
381
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
382
|
+
* server response, or constructed directly in Javascript. The array is used
|
383
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
384
|
+
* If no data is provided, the constructed object will be empty, but still
|
385
|
+
* valid.
|
386
|
+
* @extends {jspb.Message}
|
387
|
+
* @constructor
|
388
|
+
*/
|
389
|
+
proto.bonus.BonusTypesResponse = function(opt_data) {
|
390
|
+
jspb.Message.initialize(this, opt_data, 0, -1, proto.bonus.BonusTypesResponse.repeatedFields_, null);
|
391
|
+
};
|
392
|
+
goog.inherits(proto.bonus.BonusTypesResponse, jspb.Message);
|
393
|
+
if (goog.DEBUG && !COMPILED) {
|
394
|
+
/**
|
395
|
+
* @public
|
396
|
+
* @override
|
397
|
+
*/
|
398
|
+
proto.bonus.BonusTypesResponse.displayName = 'proto.bonus.BonusTypesResponse';
|
399
|
+
}
|
400
|
+
/**
|
401
|
+
* Generated by JsPbCodeGenerator.
|
402
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
403
|
+
* server response, or constructed directly in Javascript. The array is used
|
404
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
405
|
+
* If no data is provided, the constructed object will be empty, but still
|
406
|
+
* valid.
|
407
|
+
* @extends {jspb.Message}
|
408
|
+
* @constructor
|
409
|
+
*/
|
410
|
+
proto.bonus.BonusStatusesResponse = function(opt_data) {
|
411
|
+
jspb.Message.initialize(this, opt_data, 0, -1, proto.bonus.BonusStatusesResponse.repeatedFields_, null);
|
412
|
+
};
|
413
|
+
goog.inherits(proto.bonus.BonusStatusesResponse, jspb.Message);
|
414
|
+
if (goog.DEBUG && !COMPILED) {
|
415
|
+
/**
|
416
|
+
* @public
|
417
|
+
* @override
|
418
|
+
*/
|
419
|
+
proto.bonus.BonusStatusesResponse.displayName = 'proto.bonus.BonusStatusesResponse';
|
420
|
+
}
|
333
421
|
|
334
422
|
|
335
423
|
|
@@ -4625,4 +4713,1028 @@ proto.bonus.BonusStatusResponse.prototype.setStatus = function(value) {
|
|
4625
4713
|
};
|
4626
4714
|
|
4627
4715
|
|
4716
|
+
|
4717
|
+
|
4718
|
+
|
4719
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
4720
|
+
/**
|
4721
|
+
* Creates an object representation of this proto.
|
4722
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
4723
|
+
* Optional fields that are not set will be set to undefined.
|
4724
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
4725
|
+
* For the list of reserved names please see:
|
4726
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
4727
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
4728
|
+
* JSPB instance for transitional soy proto support:
|
4729
|
+
* http://goto/soy-param-migration
|
4730
|
+
* @return {!Object}
|
4731
|
+
*/
|
4732
|
+
proto.bonus.BonusType.prototype.toObject = function(opt_includeInstance) {
|
4733
|
+
return proto.bonus.BonusType.toObject(opt_includeInstance, this);
|
4734
|
+
};
|
4735
|
+
|
4736
|
+
|
4737
|
+
/**
|
4738
|
+
* Static version of the {@see toObject} method.
|
4739
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
4740
|
+
* the JSPB instance for transitional soy proto support:
|
4741
|
+
* http://goto/soy-param-migration
|
4742
|
+
* @param {!proto.bonus.BonusType} msg The msg instance to transform.
|
4743
|
+
* @return {!Object}
|
4744
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
4745
|
+
*/
|
4746
|
+
proto.bonus.BonusType.toObject = function(includeInstance, msg) {
|
4747
|
+
var f, obj = {
|
4748
|
+
id: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
4749
|
+
title: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
4750
|
+
description: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
4751
|
+
isActive: jspb.Message.getBooleanFieldWithDefault(msg, 4, false)
|
4752
|
+
};
|
4753
|
+
|
4754
|
+
if (includeInstance) {
|
4755
|
+
obj.$jspbMessageInstance = msg;
|
4756
|
+
}
|
4757
|
+
return obj;
|
4758
|
+
};
|
4759
|
+
}
|
4760
|
+
|
4761
|
+
|
4762
|
+
/**
|
4763
|
+
* Deserializes binary data (in protobuf wire format).
|
4764
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
4765
|
+
* @return {!proto.bonus.BonusType}
|
4766
|
+
*/
|
4767
|
+
proto.bonus.BonusType.deserializeBinary = function(bytes) {
|
4768
|
+
var reader = new jspb.BinaryReader(bytes);
|
4769
|
+
var msg = new proto.bonus.BonusType;
|
4770
|
+
return proto.bonus.BonusType.deserializeBinaryFromReader(msg, reader);
|
4771
|
+
};
|
4772
|
+
|
4773
|
+
|
4774
|
+
/**
|
4775
|
+
* Deserializes binary data (in protobuf wire format) from the
|
4776
|
+
* given reader into the given message object.
|
4777
|
+
* @param {!proto.bonus.BonusType} msg The message object to deserialize into.
|
4778
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
4779
|
+
* @return {!proto.bonus.BonusType}
|
4780
|
+
*/
|
4781
|
+
proto.bonus.BonusType.deserializeBinaryFromReader = function(msg, reader) {
|
4782
|
+
while (reader.nextField()) {
|
4783
|
+
if (reader.isEndGroup()) {
|
4784
|
+
break;
|
4785
|
+
}
|
4786
|
+
var field = reader.getFieldNumber();
|
4787
|
+
switch (field) {
|
4788
|
+
case 1:
|
4789
|
+
var value = /** @type {number} */ (reader.readInt32());
|
4790
|
+
msg.setId(value);
|
4791
|
+
break;
|
4792
|
+
case 2:
|
4793
|
+
var value = /** @type {string} */ (reader.readString());
|
4794
|
+
msg.setTitle(value);
|
4795
|
+
break;
|
4796
|
+
case 3:
|
4797
|
+
var value = /** @type {string} */ (reader.readString());
|
4798
|
+
msg.setDescription(value);
|
4799
|
+
break;
|
4800
|
+
case 4:
|
4801
|
+
var value = /** @type {boolean} */ (reader.readBool());
|
4802
|
+
msg.setIsActive(value);
|
4803
|
+
break;
|
4804
|
+
default:
|
4805
|
+
reader.skipField();
|
4806
|
+
break;
|
4807
|
+
}
|
4808
|
+
}
|
4809
|
+
return msg;
|
4810
|
+
};
|
4811
|
+
|
4812
|
+
|
4813
|
+
/**
|
4814
|
+
* Serializes the message to binary data (in protobuf wire format).
|
4815
|
+
* @return {!Uint8Array}
|
4816
|
+
*/
|
4817
|
+
proto.bonus.BonusType.prototype.serializeBinary = function() {
|
4818
|
+
var writer = new jspb.BinaryWriter();
|
4819
|
+
proto.bonus.BonusType.serializeBinaryToWriter(this, writer);
|
4820
|
+
return writer.getResultBuffer();
|
4821
|
+
};
|
4822
|
+
|
4823
|
+
|
4824
|
+
/**
|
4825
|
+
* Serializes the given message to binary data (in protobuf wire
|
4826
|
+
* format), writing to the given BinaryWriter.
|
4827
|
+
* @param {!proto.bonus.BonusType} message
|
4828
|
+
* @param {!jspb.BinaryWriter} writer
|
4829
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
4830
|
+
*/
|
4831
|
+
proto.bonus.BonusType.serializeBinaryToWriter = function(message, writer) {
|
4832
|
+
var f = undefined;
|
4833
|
+
f = message.getId();
|
4834
|
+
if (f !== 0) {
|
4835
|
+
writer.writeInt32(
|
4836
|
+
1,
|
4837
|
+
f
|
4838
|
+
);
|
4839
|
+
}
|
4840
|
+
f = message.getTitle();
|
4841
|
+
if (f.length > 0) {
|
4842
|
+
writer.writeString(
|
4843
|
+
2,
|
4844
|
+
f
|
4845
|
+
);
|
4846
|
+
}
|
4847
|
+
f = /** @type {string} */ (jspb.Message.getField(message, 3));
|
4848
|
+
if (f != null) {
|
4849
|
+
writer.writeString(
|
4850
|
+
3,
|
4851
|
+
f
|
4852
|
+
);
|
4853
|
+
}
|
4854
|
+
f = /** @type {boolean} */ (jspb.Message.getField(message, 4));
|
4855
|
+
if (f != null) {
|
4856
|
+
writer.writeBool(
|
4857
|
+
4,
|
4858
|
+
f
|
4859
|
+
);
|
4860
|
+
}
|
4861
|
+
};
|
4862
|
+
|
4863
|
+
|
4864
|
+
/**
|
4865
|
+
* optional int32 id = 1;
|
4866
|
+
* @return {number}
|
4867
|
+
*/
|
4868
|
+
proto.bonus.BonusType.prototype.getId = function() {
|
4869
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
4870
|
+
};
|
4871
|
+
|
4872
|
+
|
4873
|
+
/**
|
4874
|
+
* @param {number} value
|
4875
|
+
* @return {!proto.bonus.BonusType} returns this
|
4876
|
+
*/
|
4877
|
+
proto.bonus.BonusType.prototype.setId = function(value) {
|
4878
|
+
return jspb.Message.setProto3IntField(this, 1, value);
|
4879
|
+
};
|
4880
|
+
|
4881
|
+
|
4882
|
+
/**
|
4883
|
+
* optional string title = 2;
|
4884
|
+
* @return {string}
|
4885
|
+
*/
|
4886
|
+
proto.bonus.BonusType.prototype.getTitle = function() {
|
4887
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
4888
|
+
};
|
4889
|
+
|
4890
|
+
|
4891
|
+
/**
|
4892
|
+
* @param {string} value
|
4893
|
+
* @return {!proto.bonus.BonusType} returns this
|
4894
|
+
*/
|
4895
|
+
proto.bonus.BonusType.prototype.setTitle = function(value) {
|
4896
|
+
return jspb.Message.setProto3StringField(this, 2, value);
|
4897
|
+
};
|
4898
|
+
|
4899
|
+
|
4900
|
+
/**
|
4901
|
+
* optional string description = 3;
|
4902
|
+
* @return {string}
|
4903
|
+
*/
|
4904
|
+
proto.bonus.BonusType.prototype.getDescription = function() {
|
4905
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
|
4906
|
+
};
|
4907
|
+
|
4908
|
+
|
4909
|
+
/**
|
4910
|
+
* @param {string} value
|
4911
|
+
* @return {!proto.bonus.BonusType} returns this
|
4912
|
+
*/
|
4913
|
+
proto.bonus.BonusType.prototype.setDescription = function(value) {
|
4914
|
+
return jspb.Message.setField(this, 3, value);
|
4915
|
+
};
|
4916
|
+
|
4917
|
+
|
4918
|
+
/**
|
4919
|
+
* Clears the field making it undefined.
|
4920
|
+
* @return {!proto.bonus.BonusType} returns this
|
4921
|
+
*/
|
4922
|
+
proto.bonus.BonusType.prototype.clearDescription = function() {
|
4923
|
+
return jspb.Message.setField(this, 3, undefined);
|
4924
|
+
};
|
4925
|
+
|
4926
|
+
|
4927
|
+
/**
|
4928
|
+
* Returns whether this field is set.
|
4929
|
+
* @return {boolean}
|
4930
|
+
*/
|
4931
|
+
proto.bonus.BonusType.prototype.hasDescription = function() {
|
4932
|
+
return jspb.Message.getField(this, 3) != null;
|
4933
|
+
};
|
4934
|
+
|
4935
|
+
|
4936
|
+
/**
|
4937
|
+
* optional bool is_active = 4;
|
4938
|
+
* @return {boolean}
|
4939
|
+
*/
|
4940
|
+
proto.bonus.BonusType.prototype.getIsActive = function() {
|
4941
|
+
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false));
|
4942
|
+
};
|
4943
|
+
|
4944
|
+
|
4945
|
+
/**
|
4946
|
+
* @param {boolean} value
|
4947
|
+
* @return {!proto.bonus.BonusType} returns this
|
4948
|
+
*/
|
4949
|
+
proto.bonus.BonusType.prototype.setIsActive = function(value) {
|
4950
|
+
return jspb.Message.setField(this, 4, value);
|
4951
|
+
};
|
4952
|
+
|
4953
|
+
|
4954
|
+
/**
|
4955
|
+
* Clears the field making it undefined.
|
4956
|
+
* @return {!proto.bonus.BonusType} returns this
|
4957
|
+
*/
|
4958
|
+
proto.bonus.BonusType.prototype.clearIsActive = function() {
|
4959
|
+
return jspb.Message.setField(this, 4, undefined);
|
4960
|
+
};
|
4961
|
+
|
4962
|
+
|
4963
|
+
/**
|
4964
|
+
* Returns whether this field is set.
|
4965
|
+
* @return {boolean}
|
4966
|
+
*/
|
4967
|
+
proto.bonus.BonusType.prototype.hasIsActive = function() {
|
4968
|
+
return jspb.Message.getField(this, 4) != null;
|
4969
|
+
};
|
4970
|
+
|
4971
|
+
|
4972
|
+
|
4973
|
+
|
4974
|
+
|
4975
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
4976
|
+
/**
|
4977
|
+
* Creates an object representation of this proto.
|
4978
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
4979
|
+
* Optional fields that are not set will be set to undefined.
|
4980
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
4981
|
+
* For the list of reserved names please see:
|
4982
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
4983
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
4984
|
+
* JSPB instance for transitional soy proto support:
|
4985
|
+
* http://goto/soy-param-migration
|
4986
|
+
* @return {!Object}
|
4987
|
+
*/
|
4988
|
+
proto.bonus.BonusStatus.prototype.toObject = function(opt_includeInstance) {
|
4989
|
+
return proto.bonus.BonusStatus.toObject(opt_includeInstance, this);
|
4990
|
+
};
|
4991
|
+
|
4992
|
+
|
4993
|
+
/**
|
4994
|
+
* Static version of the {@see toObject} method.
|
4995
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
4996
|
+
* the JSPB instance for transitional soy proto support:
|
4997
|
+
* http://goto/soy-param-migration
|
4998
|
+
* @param {!proto.bonus.BonusStatus} msg The msg instance to transform.
|
4999
|
+
* @return {!Object}
|
5000
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
5001
|
+
*/
|
5002
|
+
proto.bonus.BonusStatus.toObject = function(includeInstance, msg) {
|
5003
|
+
var f, obj = {
|
5004
|
+
id: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
5005
|
+
title: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
5006
|
+
description: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
5007
|
+
isActive: jspb.Message.getBooleanFieldWithDefault(msg, 4, false)
|
5008
|
+
};
|
5009
|
+
|
5010
|
+
if (includeInstance) {
|
5011
|
+
obj.$jspbMessageInstance = msg;
|
5012
|
+
}
|
5013
|
+
return obj;
|
5014
|
+
};
|
5015
|
+
}
|
5016
|
+
|
5017
|
+
|
5018
|
+
/**
|
5019
|
+
* Deserializes binary data (in protobuf wire format).
|
5020
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
5021
|
+
* @return {!proto.bonus.BonusStatus}
|
5022
|
+
*/
|
5023
|
+
proto.bonus.BonusStatus.deserializeBinary = function(bytes) {
|
5024
|
+
var reader = new jspb.BinaryReader(bytes);
|
5025
|
+
var msg = new proto.bonus.BonusStatus;
|
5026
|
+
return proto.bonus.BonusStatus.deserializeBinaryFromReader(msg, reader);
|
5027
|
+
};
|
5028
|
+
|
5029
|
+
|
5030
|
+
/**
|
5031
|
+
* Deserializes binary data (in protobuf wire format) from the
|
5032
|
+
* given reader into the given message object.
|
5033
|
+
* @param {!proto.bonus.BonusStatus} msg The message object to deserialize into.
|
5034
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
5035
|
+
* @return {!proto.bonus.BonusStatus}
|
5036
|
+
*/
|
5037
|
+
proto.bonus.BonusStatus.deserializeBinaryFromReader = function(msg, reader) {
|
5038
|
+
while (reader.nextField()) {
|
5039
|
+
if (reader.isEndGroup()) {
|
5040
|
+
break;
|
5041
|
+
}
|
5042
|
+
var field = reader.getFieldNumber();
|
5043
|
+
switch (field) {
|
5044
|
+
case 1:
|
5045
|
+
var value = /** @type {number} */ (reader.readInt32());
|
5046
|
+
msg.setId(value);
|
5047
|
+
break;
|
5048
|
+
case 2:
|
5049
|
+
var value = /** @type {string} */ (reader.readString());
|
5050
|
+
msg.setTitle(value);
|
5051
|
+
break;
|
5052
|
+
case 3:
|
5053
|
+
var value = /** @type {string} */ (reader.readString());
|
5054
|
+
msg.setDescription(value);
|
5055
|
+
break;
|
5056
|
+
case 4:
|
5057
|
+
var value = /** @type {boolean} */ (reader.readBool());
|
5058
|
+
msg.setIsActive(value);
|
5059
|
+
break;
|
5060
|
+
default:
|
5061
|
+
reader.skipField();
|
5062
|
+
break;
|
5063
|
+
}
|
5064
|
+
}
|
5065
|
+
return msg;
|
5066
|
+
};
|
5067
|
+
|
5068
|
+
|
5069
|
+
/**
|
5070
|
+
* Serializes the message to binary data (in protobuf wire format).
|
5071
|
+
* @return {!Uint8Array}
|
5072
|
+
*/
|
5073
|
+
proto.bonus.BonusStatus.prototype.serializeBinary = function() {
|
5074
|
+
var writer = new jspb.BinaryWriter();
|
5075
|
+
proto.bonus.BonusStatus.serializeBinaryToWriter(this, writer);
|
5076
|
+
return writer.getResultBuffer();
|
5077
|
+
};
|
5078
|
+
|
5079
|
+
|
5080
|
+
/**
|
5081
|
+
* Serializes the given message to binary data (in protobuf wire
|
5082
|
+
* format), writing to the given BinaryWriter.
|
5083
|
+
* @param {!proto.bonus.BonusStatus} message
|
5084
|
+
* @param {!jspb.BinaryWriter} writer
|
5085
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
5086
|
+
*/
|
5087
|
+
proto.bonus.BonusStatus.serializeBinaryToWriter = function(message, writer) {
|
5088
|
+
var f = undefined;
|
5089
|
+
f = message.getId();
|
5090
|
+
if (f !== 0) {
|
5091
|
+
writer.writeInt32(
|
5092
|
+
1,
|
5093
|
+
f
|
5094
|
+
);
|
5095
|
+
}
|
5096
|
+
f = message.getTitle();
|
5097
|
+
if (f.length > 0) {
|
5098
|
+
writer.writeString(
|
5099
|
+
2,
|
5100
|
+
f
|
5101
|
+
);
|
5102
|
+
}
|
5103
|
+
f = /** @type {string} */ (jspb.Message.getField(message, 3));
|
5104
|
+
if (f != null) {
|
5105
|
+
writer.writeString(
|
5106
|
+
3,
|
5107
|
+
f
|
5108
|
+
);
|
5109
|
+
}
|
5110
|
+
f = /** @type {boolean} */ (jspb.Message.getField(message, 4));
|
5111
|
+
if (f != null) {
|
5112
|
+
writer.writeBool(
|
5113
|
+
4,
|
5114
|
+
f
|
5115
|
+
);
|
5116
|
+
}
|
5117
|
+
};
|
5118
|
+
|
5119
|
+
|
5120
|
+
/**
|
5121
|
+
* optional int32 id = 1;
|
5122
|
+
* @return {number}
|
5123
|
+
*/
|
5124
|
+
proto.bonus.BonusStatus.prototype.getId = function() {
|
5125
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
5126
|
+
};
|
5127
|
+
|
5128
|
+
|
5129
|
+
/**
|
5130
|
+
* @param {number} value
|
5131
|
+
* @return {!proto.bonus.BonusStatus} returns this
|
5132
|
+
*/
|
5133
|
+
proto.bonus.BonusStatus.prototype.setId = function(value) {
|
5134
|
+
return jspb.Message.setProto3IntField(this, 1, value);
|
5135
|
+
};
|
5136
|
+
|
5137
|
+
|
5138
|
+
/**
|
5139
|
+
* optional string title = 2;
|
5140
|
+
* @return {string}
|
5141
|
+
*/
|
5142
|
+
proto.bonus.BonusStatus.prototype.getTitle = function() {
|
5143
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
5144
|
+
};
|
5145
|
+
|
5146
|
+
|
5147
|
+
/**
|
5148
|
+
* @param {string} value
|
5149
|
+
* @return {!proto.bonus.BonusStatus} returns this
|
5150
|
+
*/
|
5151
|
+
proto.bonus.BonusStatus.prototype.setTitle = function(value) {
|
5152
|
+
return jspb.Message.setProto3StringField(this, 2, value);
|
5153
|
+
};
|
5154
|
+
|
5155
|
+
|
5156
|
+
/**
|
5157
|
+
* optional string description = 3;
|
5158
|
+
* @return {string}
|
5159
|
+
*/
|
5160
|
+
proto.bonus.BonusStatus.prototype.getDescription = function() {
|
5161
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
|
5162
|
+
};
|
5163
|
+
|
5164
|
+
|
5165
|
+
/**
|
5166
|
+
* @param {string} value
|
5167
|
+
* @return {!proto.bonus.BonusStatus} returns this
|
5168
|
+
*/
|
5169
|
+
proto.bonus.BonusStatus.prototype.setDescription = function(value) {
|
5170
|
+
return jspb.Message.setField(this, 3, value);
|
5171
|
+
};
|
5172
|
+
|
5173
|
+
|
5174
|
+
/**
|
5175
|
+
* Clears the field making it undefined.
|
5176
|
+
* @return {!proto.bonus.BonusStatus} returns this
|
5177
|
+
*/
|
5178
|
+
proto.bonus.BonusStatus.prototype.clearDescription = function() {
|
5179
|
+
return jspb.Message.setField(this, 3, undefined);
|
5180
|
+
};
|
5181
|
+
|
5182
|
+
|
5183
|
+
/**
|
5184
|
+
* Returns whether this field is set.
|
5185
|
+
* @return {boolean}
|
5186
|
+
*/
|
5187
|
+
proto.bonus.BonusStatus.prototype.hasDescription = function() {
|
5188
|
+
return jspb.Message.getField(this, 3) != null;
|
5189
|
+
};
|
5190
|
+
|
5191
|
+
|
5192
|
+
/**
|
5193
|
+
* optional bool is_active = 4;
|
5194
|
+
* @return {boolean}
|
5195
|
+
*/
|
5196
|
+
proto.bonus.BonusStatus.prototype.getIsActive = function() {
|
5197
|
+
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false));
|
5198
|
+
};
|
5199
|
+
|
5200
|
+
|
5201
|
+
/**
|
5202
|
+
* @param {boolean} value
|
5203
|
+
* @return {!proto.bonus.BonusStatus} returns this
|
5204
|
+
*/
|
5205
|
+
proto.bonus.BonusStatus.prototype.setIsActive = function(value) {
|
5206
|
+
return jspb.Message.setField(this, 4, value);
|
5207
|
+
};
|
5208
|
+
|
5209
|
+
|
5210
|
+
/**
|
5211
|
+
* Clears the field making it undefined.
|
5212
|
+
* @return {!proto.bonus.BonusStatus} returns this
|
5213
|
+
*/
|
5214
|
+
proto.bonus.BonusStatus.prototype.clearIsActive = function() {
|
5215
|
+
return jspb.Message.setField(this, 4, undefined);
|
5216
|
+
};
|
5217
|
+
|
5218
|
+
|
5219
|
+
/**
|
5220
|
+
* Returns whether this field is set.
|
5221
|
+
* @return {boolean}
|
5222
|
+
*/
|
5223
|
+
proto.bonus.BonusStatus.prototype.hasIsActive = function() {
|
5224
|
+
return jspb.Message.getField(this, 4) != null;
|
5225
|
+
};
|
5226
|
+
|
5227
|
+
|
5228
|
+
|
5229
|
+
/**
|
5230
|
+
* List of repeated fields within this message type.
|
5231
|
+
* @private {!Array<number>}
|
5232
|
+
* @const
|
5233
|
+
*/
|
5234
|
+
proto.bonus.BonusTypesResponse.repeatedFields_ = [1];
|
5235
|
+
|
5236
|
+
|
5237
|
+
|
5238
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
5239
|
+
/**
|
5240
|
+
* Creates an object representation of this proto.
|
5241
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
5242
|
+
* Optional fields that are not set will be set to undefined.
|
5243
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
5244
|
+
* For the list of reserved names please see:
|
5245
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
5246
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
5247
|
+
* JSPB instance for transitional soy proto support:
|
5248
|
+
* http://goto/soy-param-migration
|
5249
|
+
* @return {!Object}
|
5250
|
+
*/
|
5251
|
+
proto.bonus.BonusTypesResponse.prototype.toObject = function(opt_includeInstance) {
|
5252
|
+
return proto.bonus.BonusTypesResponse.toObject(opt_includeInstance, this);
|
5253
|
+
};
|
5254
|
+
|
5255
|
+
|
5256
|
+
/**
|
5257
|
+
* Static version of the {@see toObject} method.
|
5258
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
5259
|
+
* the JSPB instance for transitional soy proto support:
|
5260
|
+
* http://goto/soy-param-migration
|
5261
|
+
* @param {!proto.bonus.BonusTypesResponse} msg The msg instance to transform.
|
5262
|
+
* @return {!Object}
|
5263
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
5264
|
+
*/
|
5265
|
+
proto.bonus.BonusTypesResponse.toObject = function(includeInstance, msg) {
|
5266
|
+
var f, obj = {
|
5267
|
+
itemsList: jspb.Message.toObjectList(msg.getItemsList(),
|
5268
|
+
proto.bonus.BonusType.toObject, includeInstance),
|
5269
|
+
totalPages: jspb.Message.getFieldWithDefault(msg, 2, 0),
|
5270
|
+
totalItems: jspb.Message.getFieldWithDefault(msg, 3, 0)
|
5271
|
+
};
|
5272
|
+
|
5273
|
+
if (includeInstance) {
|
5274
|
+
obj.$jspbMessageInstance = msg;
|
5275
|
+
}
|
5276
|
+
return obj;
|
5277
|
+
};
|
5278
|
+
}
|
5279
|
+
|
5280
|
+
|
5281
|
+
/**
|
5282
|
+
* Deserializes binary data (in protobuf wire format).
|
5283
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
5284
|
+
* @return {!proto.bonus.BonusTypesResponse}
|
5285
|
+
*/
|
5286
|
+
proto.bonus.BonusTypesResponse.deserializeBinary = function(bytes) {
|
5287
|
+
var reader = new jspb.BinaryReader(bytes);
|
5288
|
+
var msg = new proto.bonus.BonusTypesResponse;
|
5289
|
+
return proto.bonus.BonusTypesResponse.deserializeBinaryFromReader(msg, reader);
|
5290
|
+
};
|
5291
|
+
|
5292
|
+
|
5293
|
+
/**
|
5294
|
+
* Deserializes binary data (in protobuf wire format) from the
|
5295
|
+
* given reader into the given message object.
|
5296
|
+
* @param {!proto.bonus.BonusTypesResponse} msg The message object to deserialize into.
|
5297
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
5298
|
+
* @return {!proto.bonus.BonusTypesResponse}
|
5299
|
+
*/
|
5300
|
+
proto.bonus.BonusTypesResponse.deserializeBinaryFromReader = function(msg, reader) {
|
5301
|
+
while (reader.nextField()) {
|
5302
|
+
if (reader.isEndGroup()) {
|
5303
|
+
break;
|
5304
|
+
}
|
5305
|
+
var field = reader.getFieldNumber();
|
5306
|
+
switch (field) {
|
5307
|
+
case 1:
|
5308
|
+
var value = new proto.bonus.BonusType;
|
5309
|
+
reader.readMessage(value,proto.bonus.BonusType.deserializeBinaryFromReader);
|
5310
|
+
msg.addItems(value);
|
5311
|
+
break;
|
5312
|
+
case 2:
|
5313
|
+
var value = /** @type {number} */ (reader.readInt32());
|
5314
|
+
msg.setTotalPages(value);
|
5315
|
+
break;
|
5316
|
+
case 3:
|
5317
|
+
var value = /** @type {number} */ (reader.readInt32());
|
5318
|
+
msg.setTotalItems(value);
|
5319
|
+
break;
|
5320
|
+
default:
|
5321
|
+
reader.skipField();
|
5322
|
+
break;
|
5323
|
+
}
|
5324
|
+
}
|
5325
|
+
return msg;
|
5326
|
+
};
|
5327
|
+
|
5328
|
+
|
5329
|
+
/**
|
5330
|
+
* Serializes the message to binary data (in protobuf wire format).
|
5331
|
+
* @return {!Uint8Array}
|
5332
|
+
*/
|
5333
|
+
proto.bonus.BonusTypesResponse.prototype.serializeBinary = function() {
|
5334
|
+
var writer = new jspb.BinaryWriter();
|
5335
|
+
proto.bonus.BonusTypesResponse.serializeBinaryToWriter(this, writer);
|
5336
|
+
return writer.getResultBuffer();
|
5337
|
+
};
|
5338
|
+
|
5339
|
+
|
5340
|
+
/**
|
5341
|
+
* Serializes the given message to binary data (in protobuf wire
|
5342
|
+
* format), writing to the given BinaryWriter.
|
5343
|
+
* @param {!proto.bonus.BonusTypesResponse} message
|
5344
|
+
* @param {!jspb.BinaryWriter} writer
|
5345
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
5346
|
+
*/
|
5347
|
+
proto.bonus.BonusTypesResponse.serializeBinaryToWriter = function(message, writer) {
|
5348
|
+
var f = undefined;
|
5349
|
+
f = message.getItemsList();
|
5350
|
+
if (f.length > 0) {
|
5351
|
+
writer.writeRepeatedMessage(
|
5352
|
+
1,
|
5353
|
+
f,
|
5354
|
+
proto.bonus.BonusType.serializeBinaryToWriter
|
5355
|
+
);
|
5356
|
+
}
|
5357
|
+
f = /** @type {number} */ (jspb.Message.getField(message, 2));
|
5358
|
+
if (f != null) {
|
5359
|
+
writer.writeInt32(
|
5360
|
+
2,
|
5361
|
+
f
|
5362
|
+
);
|
5363
|
+
}
|
5364
|
+
f = /** @type {number} */ (jspb.Message.getField(message, 3));
|
5365
|
+
if (f != null) {
|
5366
|
+
writer.writeInt32(
|
5367
|
+
3,
|
5368
|
+
f
|
5369
|
+
);
|
5370
|
+
}
|
5371
|
+
};
|
5372
|
+
|
5373
|
+
|
5374
|
+
/**
|
5375
|
+
* repeated BonusType items = 1;
|
5376
|
+
* @return {!Array<!proto.bonus.BonusType>}
|
5377
|
+
*/
|
5378
|
+
proto.bonus.BonusTypesResponse.prototype.getItemsList = function() {
|
5379
|
+
return /** @type{!Array<!proto.bonus.BonusType>} */ (
|
5380
|
+
jspb.Message.getRepeatedWrapperField(this, proto.bonus.BonusType, 1));
|
5381
|
+
};
|
5382
|
+
|
5383
|
+
|
5384
|
+
/**
|
5385
|
+
* @param {!Array<!proto.bonus.BonusType>} value
|
5386
|
+
* @return {!proto.bonus.BonusTypesResponse} returns this
|
5387
|
+
*/
|
5388
|
+
proto.bonus.BonusTypesResponse.prototype.setItemsList = function(value) {
|
5389
|
+
return jspb.Message.setRepeatedWrapperField(this, 1, value);
|
5390
|
+
};
|
5391
|
+
|
5392
|
+
|
5393
|
+
/**
|
5394
|
+
* @param {!proto.bonus.BonusType=} opt_value
|
5395
|
+
* @param {number=} opt_index
|
5396
|
+
* @return {!proto.bonus.BonusType}
|
5397
|
+
*/
|
5398
|
+
proto.bonus.BonusTypesResponse.prototype.addItems = function(opt_value, opt_index) {
|
5399
|
+
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.bonus.BonusType, opt_index);
|
5400
|
+
};
|
5401
|
+
|
5402
|
+
|
5403
|
+
/**
|
5404
|
+
* Clears the list making it empty but non-null.
|
5405
|
+
* @return {!proto.bonus.BonusTypesResponse} returns this
|
5406
|
+
*/
|
5407
|
+
proto.bonus.BonusTypesResponse.prototype.clearItemsList = function() {
|
5408
|
+
return this.setItemsList([]);
|
5409
|
+
};
|
5410
|
+
|
5411
|
+
|
5412
|
+
/**
|
5413
|
+
* optional int32 total_pages = 2;
|
5414
|
+
* @return {number}
|
5415
|
+
*/
|
5416
|
+
proto.bonus.BonusTypesResponse.prototype.getTotalPages = function() {
|
5417
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
|
5418
|
+
};
|
5419
|
+
|
5420
|
+
|
5421
|
+
/**
|
5422
|
+
* @param {number} value
|
5423
|
+
* @return {!proto.bonus.BonusTypesResponse} returns this
|
5424
|
+
*/
|
5425
|
+
proto.bonus.BonusTypesResponse.prototype.setTotalPages = function(value) {
|
5426
|
+
return jspb.Message.setField(this, 2, value);
|
5427
|
+
};
|
5428
|
+
|
5429
|
+
|
5430
|
+
/**
|
5431
|
+
* Clears the field making it undefined.
|
5432
|
+
* @return {!proto.bonus.BonusTypesResponse} returns this
|
5433
|
+
*/
|
5434
|
+
proto.bonus.BonusTypesResponse.prototype.clearTotalPages = function() {
|
5435
|
+
return jspb.Message.setField(this, 2, undefined);
|
5436
|
+
};
|
5437
|
+
|
5438
|
+
|
5439
|
+
/**
|
5440
|
+
* Returns whether this field is set.
|
5441
|
+
* @return {boolean}
|
5442
|
+
*/
|
5443
|
+
proto.bonus.BonusTypesResponse.prototype.hasTotalPages = function() {
|
5444
|
+
return jspb.Message.getField(this, 2) != null;
|
5445
|
+
};
|
5446
|
+
|
5447
|
+
|
5448
|
+
/**
|
5449
|
+
* optional int32 total_items = 3;
|
5450
|
+
* @return {number}
|
5451
|
+
*/
|
5452
|
+
proto.bonus.BonusTypesResponse.prototype.getTotalItems = function() {
|
5453
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
|
5454
|
+
};
|
5455
|
+
|
5456
|
+
|
5457
|
+
/**
|
5458
|
+
* @param {number} value
|
5459
|
+
* @return {!proto.bonus.BonusTypesResponse} returns this
|
5460
|
+
*/
|
5461
|
+
proto.bonus.BonusTypesResponse.prototype.setTotalItems = function(value) {
|
5462
|
+
return jspb.Message.setField(this, 3, value);
|
5463
|
+
};
|
5464
|
+
|
5465
|
+
|
5466
|
+
/**
|
5467
|
+
* Clears the field making it undefined.
|
5468
|
+
* @return {!proto.bonus.BonusTypesResponse} returns this
|
5469
|
+
*/
|
5470
|
+
proto.bonus.BonusTypesResponse.prototype.clearTotalItems = function() {
|
5471
|
+
return jspb.Message.setField(this, 3, undefined);
|
5472
|
+
};
|
5473
|
+
|
5474
|
+
|
5475
|
+
/**
|
5476
|
+
* Returns whether this field is set.
|
5477
|
+
* @return {boolean}
|
5478
|
+
*/
|
5479
|
+
proto.bonus.BonusTypesResponse.prototype.hasTotalItems = function() {
|
5480
|
+
return jspb.Message.getField(this, 3) != null;
|
5481
|
+
};
|
5482
|
+
|
5483
|
+
|
5484
|
+
|
5485
|
+
/**
|
5486
|
+
* List of repeated fields within this message type.
|
5487
|
+
* @private {!Array<number>}
|
5488
|
+
* @const
|
5489
|
+
*/
|
5490
|
+
proto.bonus.BonusStatusesResponse.repeatedFields_ = [1];
|
5491
|
+
|
5492
|
+
|
5493
|
+
|
5494
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
5495
|
+
/**
|
5496
|
+
* Creates an object representation of this proto.
|
5497
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
5498
|
+
* Optional fields that are not set will be set to undefined.
|
5499
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
5500
|
+
* For the list of reserved names please see:
|
5501
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
5502
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
5503
|
+
* JSPB instance for transitional soy proto support:
|
5504
|
+
* http://goto/soy-param-migration
|
5505
|
+
* @return {!Object}
|
5506
|
+
*/
|
5507
|
+
proto.bonus.BonusStatusesResponse.prototype.toObject = function(opt_includeInstance) {
|
5508
|
+
return proto.bonus.BonusStatusesResponse.toObject(opt_includeInstance, this);
|
5509
|
+
};
|
5510
|
+
|
5511
|
+
|
5512
|
+
/**
|
5513
|
+
* Static version of the {@see toObject} method.
|
5514
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
5515
|
+
* the JSPB instance for transitional soy proto support:
|
5516
|
+
* http://goto/soy-param-migration
|
5517
|
+
* @param {!proto.bonus.BonusStatusesResponse} msg The msg instance to transform.
|
5518
|
+
* @return {!Object}
|
5519
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
5520
|
+
*/
|
5521
|
+
proto.bonus.BonusStatusesResponse.toObject = function(includeInstance, msg) {
|
5522
|
+
var f, obj = {
|
5523
|
+
itemsList: jspb.Message.toObjectList(msg.getItemsList(),
|
5524
|
+
proto.bonus.BonusStatus.toObject, includeInstance),
|
5525
|
+
totalPages: jspb.Message.getFieldWithDefault(msg, 2, 0),
|
5526
|
+
totalItems: jspb.Message.getFieldWithDefault(msg, 3, 0)
|
5527
|
+
};
|
5528
|
+
|
5529
|
+
if (includeInstance) {
|
5530
|
+
obj.$jspbMessageInstance = msg;
|
5531
|
+
}
|
5532
|
+
return obj;
|
5533
|
+
};
|
5534
|
+
}
|
5535
|
+
|
5536
|
+
|
5537
|
+
/**
|
5538
|
+
* Deserializes binary data (in protobuf wire format).
|
5539
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
5540
|
+
* @return {!proto.bonus.BonusStatusesResponse}
|
5541
|
+
*/
|
5542
|
+
proto.bonus.BonusStatusesResponse.deserializeBinary = function(bytes) {
|
5543
|
+
var reader = new jspb.BinaryReader(bytes);
|
5544
|
+
var msg = new proto.bonus.BonusStatusesResponse;
|
5545
|
+
return proto.bonus.BonusStatusesResponse.deserializeBinaryFromReader(msg, reader);
|
5546
|
+
};
|
5547
|
+
|
5548
|
+
|
5549
|
+
/**
|
5550
|
+
* Deserializes binary data (in protobuf wire format) from the
|
5551
|
+
* given reader into the given message object.
|
5552
|
+
* @param {!proto.bonus.BonusStatusesResponse} msg The message object to deserialize into.
|
5553
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
5554
|
+
* @return {!proto.bonus.BonusStatusesResponse}
|
5555
|
+
*/
|
5556
|
+
proto.bonus.BonusStatusesResponse.deserializeBinaryFromReader = function(msg, reader) {
|
5557
|
+
while (reader.nextField()) {
|
5558
|
+
if (reader.isEndGroup()) {
|
5559
|
+
break;
|
5560
|
+
}
|
5561
|
+
var field = reader.getFieldNumber();
|
5562
|
+
switch (field) {
|
5563
|
+
case 1:
|
5564
|
+
var value = new proto.bonus.BonusStatus;
|
5565
|
+
reader.readMessage(value,proto.bonus.BonusStatus.deserializeBinaryFromReader);
|
5566
|
+
msg.addItems(value);
|
5567
|
+
break;
|
5568
|
+
case 2:
|
5569
|
+
var value = /** @type {number} */ (reader.readInt32());
|
5570
|
+
msg.setTotalPages(value);
|
5571
|
+
break;
|
5572
|
+
case 3:
|
5573
|
+
var value = /** @type {number} */ (reader.readInt32());
|
5574
|
+
msg.setTotalItems(value);
|
5575
|
+
break;
|
5576
|
+
default:
|
5577
|
+
reader.skipField();
|
5578
|
+
break;
|
5579
|
+
}
|
5580
|
+
}
|
5581
|
+
return msg;
|
5582
|
+
};
|
5583
|
+
|
5584
|
+
|
5585
|
+
/**
|
5586
|
+
* Serializes the message to binary data (in protobuf wire format).
|
5587
|
+
* @return {!Uint8Array}
|
5588
|
+
*/
|
5589
|
+
proto.bonus.BonusStatusesResponse.prototype.serializeBinary = function() {
|
5590
|
+
var writer = new jspb.BinaryWriter();
|
5591
|
+
proto.bonus.BonusStatusesResponse.serializeBinaryToWriter(this, writer);
|
5592
|
+
return writer.getResultBuffer();
|
5593
|
+
};
|
5594
|
+
|
5595
|
+
|
5596
|
+
/**
|
5597
|
+
* Serializes the given message to binary data (in protobuf wire
|
5598
|
+
* format), writing to the given BinaryWriter.
|
5599
|
+
* @param {!proto.bonus.BonusStatusesResponse} message
|
5600
|
+
* @param {!jspb.BinaryWriter} writer
|
5601
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
5602
|
+
*/
|
5603
|
+
proto.bonus.BonusStatusesResponse.serializeBinaryToWriter = function(message, writer) {
|
5604
|
+
var f = undefined;
|
5605
|
+
f = message.getItemsList();
|
5606
|
+
if (f.length > 0) {
|
5607
|
+
writer.writeRepeatedMessage(
|
5608
|
+
1,
|
5609
|
+
f,
|
5610
|
+
proto.bonus.BonusStatus.serializeBinaryToWriter
|
5611
|
+
);
|
5612
|
+
}
|
5613
|
+
f = /** @type {number} */ (jspb.Message.getField(message, 2));
|
5614
|
+
if (f != null) {
|
5615
|
+
writer.writeInt32(
|
5616
|
+
2,
|
5617
|
+
f
|
5618
|
+
);
|
5619
|
+
}
|
5620
|
+
f = /** @type {number} */ (jspb.Message.getField(message, 3));
|
5621
|
+
if (f != null) {
|
5622
|
+
writer.writeInt32(
|
5623
|
+
3,
|
5624
|
+
f
|
5625
|
+
);
|
5626
|
+
}
|
5627
|
+
};
|
5628
|
+
|
5629
|
+
|
5630
|
+
/**
|
5631
|
+
* repeated BonusStatus items = 1;
|
5632
|
+
* @return {!Array<!proto.bonus.BonusStatus>}
|
5633
|
+
*/
|
5634
|
+
proto.bonus.BonusStatusesResponse.prototype.getItemsList = function() {
|
5635
|
+
return /** @type{!Array<!proto.bonus.BonusStatus>} */ (
|
5636
|
+
jspb.Message.getRepeatedWrapperField(this, proto.bonus.BonusStatus, 1));
|
5637
|
+
};
|
5638
|
+
|
5639
|
+
|
5640
|
+
/**
|
5641
|
+
* @param {!Array<!proto.bonus.BonusStatus>} value
|
5642
|
+
* @return {!proto.bonus.BonusStatusesResponse} returns this
|
5643
|
+
*/
|
5644
|
+
proto.bonus.BonusStatusesResponse.prototype.setItemsList = function(value) {
|
5645
|
+
return jspb.Message.setRepeatedWrapperField(this, 1, value);
|
5646
|
+
};
|
5647
|
+
|
5648
|
+
|
5649
|
+
/**
|
5650
|
+
* @param {!proto.bonus.BonusStatus=} opt_value
|
5651
|
+
* @param {number=} opt_index
|
5652
|
+
* @return {!proto.bonus.BonusStatus}
|
5653
|
+
*/
|
5654
|
+
proto.bonus.BonusStatusesResponse.prototype.addItems = function(opt_value, opt_index) {
|
5655
|
+
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.bonus.BonusStatus, opt_index);
|
5656
|
+
};
|
5657
|
+
|
5658
|
+
|
5659
|
+
/**
|
5660
|
+
* Clears the list making it empty but non-null.
|
5661
|
+
* @return {!proto.bonus.BonusStatusesResponse} returns this
|
5662
|
+
*/
|
5663
|
+
proto.bonus.BonusStatusesResponse.prototype.clearItemsList = function() {
|
5664
|
+
return this.setItemsList([]);
|
5665
|
+
};
|
5666
|
+
|
5667
|
+
|
5668
|
+
/**
|
5669
|
+
* optional int32 total_pages = 2;
|
5670
|
+
* @return {number}
|
5671
|
+
*/
|
5672
|
+
proto.bonus.BonusStatusesResponse.prototype.getTotalPages = function() {
|
5673
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
|
5674
|
+
};
|
5675
|
+
|
5676
|
+
|
5677
|
+
/**
|
5678
|
+
* @param {number} value
|
5679
|
+
* @return {!proto.bonus.BonusStatusesResponse} returns this
|
5680
|
+
*/
|
5681
|
+
proto.bonus.BonusStatusesResponse.prototype.setTotalPages = function(value) {
|
5682
|
+
return jspb.Message.setField(this, 2, value);
|
5683
|
+
};
|
5684
|
+
|
5685
|
+
|
5686
|
+
/**
|
5687
|
+
* Clears the field making it undefined.
|
5688
|
+
* @return {!proto.bonus.BonusStatusesResponse} returns this
|
5689
|
+
*/
|
5690
|
+
proto.bonus.BonusStatusesResponse.prototype.clearTotalPages = function() {
|
5691
|
+
return jspb.Message.setField(this, 2, undefined);
|
5692
|
+
};
|
5693
|
+
|
5694
|
+
|
5695
|
+
/**
|
5696
|
+
* Returns whether this field is set.
|
5697
|
+
* @return {boolean}
|
5698
|
+
*/
|
5699
|
+
proto.bonus.BonusStatusesResponse.prototype.hasTotalPages = function() {
|
5700
|
+
return jspb.Message.getField(this, 2) != null;
|
5701
|
+
};
|
5702
|
+
|
5703
|
+
|
5704
|
+
/**
|
5705
|
+
* optional int32 total_items = 3;
|
5706
|
+
* @return {number}
|
5707
|
+
*/
|
5708
|
+
proto.bonus.BonusStatusesResponse.prototype.getTotalItems = function() {
|
5709
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
|
5710
|
+
};
|
5711
|
+
|
5712
|
+
|
5713
|
+
/**
|
5714
|
+
* @param {number} value
|
5715
|
+
* @return {!proto.bonus.BonusStatusesResponse} returns this
|
5716
|
+
*/
|
5717
|
+
proto.bonus.BonusStatusesResponse.prototype.setTotalItems = function(value) {
|
5718
|
+
return jspb.Message.setField(this, 3, value);
|
5719
|
+
};
|
5720
|
+
|
5721
|
+
|
5722
|
+
/**
|
5723
|
+
* Clears the field making it undefined.
|
5724
|
+
* @return {!proto.bonus.BonusStatusesResponse} returns this
|
5725
|
+
*/
|
5726
|
+
proto.bonus.BonusStatusesResponse.prototype.clearTotalItems = function() {
|
5727
|
+
return jspb.Message.setField(this, 3, undefined);
|
5728
|
+
};
|
5729
|
+
|
5730
|
+
|
5731
|
+
/**
|
5732
|
+
* Returns whether this field is set.
|
5733
|
+
* @return {boolean}
|
5734
|
+
*/
|
5735
|
+
proto.bonus.BonusStatusesResponse.prototype.hasTotalItems = function() {
|
5736
|
+
return jspb.Message.getField(this, 3) != null;
|
5737
|
+
};
|
5738
|
+
|
5739
|
+
|
4628
5740
|
goog.object.extend(exports, proto.bonus);
|