protobuf-platform 1.0.267 → 1.0.268

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protobuf-platform",
3
- "version": "1.0.267",
3
+ "version": "1.0.268",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/user/user.proto CHANGED
@@ -25,8 +25,12 @@ service User {
25
25
  rpc addUsersIntoMultiSegments(GetSegmentRequest) returns (SegmentStatusResponse);
26
26
  rpc removeUsersFromSegments(GetSegmentRequest) returns (SegmentStatusResponse);
27
27
  rpc fetchUsersFromSegment(PaginationRequest) returns (UsersResponse);
28
- //Risk Status
28
+ //Risk Statuses
29
29
  rpc readListRiskStatuses(PaginationRequest) returns (RiskStatusItemsResponse);
30
+ //Categories
31
+ rpc readListCategories(PaginationRequest) returns (CategoryItemsResponse);
32
+ //Verification Statuses
33
+ rpc readListVerificationStatuses(PaginationRequest) returns (VerificationStatusItemsResponse);
30
34
  //Dashboard
31
35
  rpc getDashboardInfo(DashboardRequest) returns (DashboardResponse);
32
36
  //Notes
@@ -225,7 +229,7 @@ message SegmentItemsResponse {
225
229
  optional int32 total_pages = 2;
226
230
  optional int32 total_items = 3;
227
231
  }
228
- //Risk Status
232
+ //Statuses
229
233
  message RiskStatus {
230
234
  int32 id = 1;
231
235
  string title = 2;
@@ -236,6 +240,26 @@ message RiskStatusItemsResponse {
236
240
  optional int32 total_pages = 2;
237
241
  optional int32 total_items = 3;
238
242
  }
243
+ message CategoryItem {
244
+ int32 id = 1;
245
+ string title = 2;
246
+ optional string description = 3;
247
+ }
248
+ message CategoryItemsResponse {
249
+ repeated CategoryItem items = 1;
250
+ optional int32 total_pages = 2;
251
+ optional int32 total_items = 3;
252
+ }
253
+ message VerificationStatus {
254
+ int32 id = 1;
255
+ string title = 2;
256
+ optional string description = 3;
257
+ }
258
+ message VerificationStatusItemsResponse {
259
+ repeated VerificationStatus items = 1;
260
+ optional int32 total_pages = 2;
261
+ optional int32 total_items = 3;
262
+ }
239
263
  //Dashboard
240
264
  message DashboardRequest {
241
265
  string start_date = 1;
@@ -4,6 +4,17 @@
4
4
  var grpc = require('@grpc/grpc-js');
5
5
  var user_pb = require('./user_pb.js');
6
6
 
7
+ function serialize_user_CategoryItemsResponse(arg) {
8
+ if (!(arg instanceof user_pb.CategoryItemsResponse)) {
9
+ throw new Error('Expected argument of type user.CategoryItemsResponse');
10
+ }
11
+ return Buffer.from(arg.serializeBinary());
12
+ }
13
+
14
+ function deserialize_user_CategoryItemsResponse(buffer_arg) {
15
+ return user_pb.CategoryItemsResponse.deserializeBinary(new Uint8Array(buffer_arg));
16
+ }
17
+
7
18
  function serialize_user_DashboardRequest(arg) {
8
19
  if (!(arg instanceof user_pb.DashboardRequest)) {
9
20
  throw new Error('Expected argument of type user.DashboardRequest');
@@ -312,6 +323,17 @@ function deserialize_user_UsersResponse(buffer_arg) {
312
323
  return user_pb.UsersResponse.deserializeBinary(new Uint8Array(buffer_arg));
313
324
  }
314
325
 
326
+ function serialize_user_VerificationStatusItemsResponse(arg) {
327
+ if (!(arg instanceof user_pb.VerificationStatusItemsResponse)) {
328
+ throw new Error('Expected argument of type user.VerificationStatusItemsResponse');
329
+ }
330
+ return Buffer.from(arg.serializeBinary());
331
+ }
332
+
333
+ function deserialize_user_VerificationStatusItemsResponse(buffer_arg) {
334
+ return user_pb.VerificationStatusItemsResponse.deserializeBinary(new Uint8Array(buffer_arg));
335
+ }
336
+
315
337
 
316
338
  var UserService = exports.UserService = {
317
339
  checkConnection: {
@@ -516,7 +538,7 @@ createSingleSegment: {
516
538
  responseSerialize: serialize_user_UsersResponse,
517
539
  responseDeserialize: deserialize_user_UsersResponse,
518
540
  },
519
- // Risk Status
541
+ // Risk Statuses
520
542
  readListRiskStatuses: {
521
543
  path: '/user.User/readListRiskStatuses',
522
544
  requestStream: false,
@@ -528,6 +550,30 @@ readListRiskStatuses: {
528
550
  responseSerialize: serialize_user_RiskStatusItemsResponse,
529
551
  responseDeserialize: deserialize_user_RiskStatusItemsResponse,
530
552
  },
553
+ // Categories
554
+ readListCategories: {
555
+ path: '/user.User/readListCategories',
556
+ requestStream: false,
557
+ responseStream: false,
558
+ requestType: user_pb.PaginationRequest,
559
+ responseType: user_pb.CategoryItemsResponse,
560
+ requestSerialize: serialize_user_PaginationRequest,
561
+ requestDeserialize: deserialize_user_PaginationRequest,
562
+ responseSerialize: serialize_user_CategoryItemsResponse,
563
+ responseDeserialize: deserialize_user_CategoryItemsResponse,
564
+ },
565
+ // Verification Statuses
566
+ readListVerificationStatuses: {
567
+ path: '/user.User/readListVerificationStatuses',
568
+ requestStream: false,
569
+ responseStream: false,
570
+ requestType: user_pb.PaginationRequest,
571
+ responseType: user_pb.VerificationStatusItemsResponse,
572
+ requestSerialize: serialize_user_PaginationRequest,
573
+ requestDeserialize: deserialize_user_PaginationRequest,
574
+ responseSerialize: serialize_user_VerificationStatusItemsResponse,
575
+ responseDeserialize: deserialize_user_VerificationStatusItemsResponse,
576
+ },
531
577
  // Dashboard
532
578
  getDashboardInfo: {
533
579
  path: '/user.User/getDashboardInfo',
package/user/user_pb.js CHANGED
@@ -21,6 +21,8 @@ var global = (function() {
21
21
  return Function('return this')();
22
22
  }.call(null));
23
23
 
24
+ goog.exportSymbol('proto.user.CategoryItem', null, global);
25
+ goog.exportSymbol('proto.user.CategoryItemsResponse', null, global);
24
26
  goog.exportSymbol('proto.user.DashboardRequest', null, global);
25
27
  goog.exportSymbol('proto.user.DashboardResponse', null, global);
26
28
  goog.exportSymbol('proto.user.GetNoteRequest', null, global);
@@ -54,6 +56,8 @@ goog.exportSymbol('proto.user.UserLoyaltyItem', null, global);
54
56
  goog.exportSymbol('proto.user.UserRequest', null, global);
55
57
  goog.exportSymbol('proto.user.UserSearchParams', null, global);
56
58
  goog.exportSymbol('proto.user.UsersResponse', null, global);
59
+ goog.exportSymbol('proto.user.VerificationStatus', null, global);
60
+ goog.exportSymbol('proto.user.VerificationStatusItemsResponse', null, global);
57
61
  /**
58
62
  * Generated by JsPbCodeGenerator.
59
63
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -600,6 +604,90 @@ if (goog.DEBUG && !COMPILED) {
600
604
  */
601
605
  proto.user.RiskStatusItemsResponse.displayName = 'proto.user.RiskStatusItemsResponse';
602
606
  }
607
+ /**
608
+ * Generated by JsPbCodeGenerator.
609
+ * @param {Array=} opt_data Optional initial data array, typically from a
610
+ * server response, or constructed directly in Javascript. The array is used
611
+ * in place and becomes part of the constructed object. It is not cloned.
612
+ * If no data is provided, the constructed object will be empty, but still
613
+ * valid.
614
+ * @extends {jspb.Message}
615
+ * @constructor
616
+ */
617
+ proto.user.CategoryItem = function(opt_data) {
618
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
619
+ };
620
+ goog.inherits(proto.user.CategoryItem, jspb.Message);
621
+ if (goog.DEBUG && !COMPILED) {
622
+ /**
623
+ * @public
624
+ * @override
625
+ */
626
+ proto.user.CategoryItem.displayName = 'proto.user.CategoryItem';
627
+ }
628
+ /**
629
+ * Generated by JsPbCodeGenerator.
630
+ * @param {Array=} opt_data Optional initial data array, typically from a
631
+ * server response, or constructed directly in Javascript. The array is used
632
+ * in place and becomes part of the constructed object. It is not cloned.
633
+ * If no data is provided, the constructed object will be empty, but still
634
+ * valid.
635
+ * @extends {jspb.Message}
636
+ * @constructor
637
+ */
638
+ proto.user.CategoryItemsResponse = function(opt_data) {
639
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.user.CategoryItemsResponse.repeatedFields_, null);
640
+ };
641
+ goog.inherits(proto.user.CategoryItemsResponse, jspb.Message);
642
+ if (goog.DEBUG && !COMPILED) {
643
+ /**
644
+ * @public
645
+ * @override
646
+ */
647
+ proto.user.CategoryItemsResponse.displayName = 'proto.user.CategoryItemsResponse';
648
+ }
649
+ /**
650
+ * Generated by JsPbCodeGenerator.
651
+ * @param {Array=} opt_data Optional initial data array, typically from a
652
+ * server response, or constructed directly in Javascript. The array is used
653
+ * in place and becomes part of the constructed object. It is not cloned.
654
+ * If no data is provided, the constructed object will be empty, but still
655
+ * valid.
656
+ * @extends {jspb.Message}
657
+ * @constructor
658
+ */
659
+ proto.user.VerificationStatus = function(opt_data) {
660
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
661
+ };
662
+ goog.inherits(proto.user.VerificationStatus, jspb.Message);
663
+ if (goog.DEBUG && !COMPILED) {
664
+ /**
665
+ * @public
666
+ * @override
667
+ */
668
+ proto.user.VerificationStatus.displayName = 'proto.user.VerificationStatus';
669
+ }
670
+ /**
671
+ * Generated by JsPbCodeGenerator.
672
+ * @param {Array=} opt_data Optional initial data array, typically from a
673
+ * server response, or constructed directly in Javascript. The array is used
674
+ * in place and becomes part of the constructed object. It is not cloned.
675
+ * If no data is provided, the constructed object will be empty, but still
676
+ * valid.
677
+ * @extends {jspb.Message}
678
+ * @constructor
679
+ */
680
+ proto.user.VerificationStatusItemsResponse = function(opt_data) {
681
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.user.VerificationStatusItemsResponse.repeatedFields_, null);
682
+ };
683
+ goog.inherits(proto.user.VerificationStatusItemsResponse, jspb.Message);
684
+ if (goog.DEBUG && !COMPILED) {
685
+ /**
686
+ * @public
687
+ * @override
688
+ */
689
+ proto.user.VerificationStatusItemsResponse.displayName = 'proto.user.VerificationStatusItemsResponse';
690
+ }
603
691
  /**
604
692
  * Generated by JsPbCodeGenerator.
605
693
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -9823,6 +9911,934 @@ proto.user.RiskStatusItemsResponse.prototype.hasTotalItems = function() {
9823
9911
 
9824
9912
 
9825
9913
 
9914
+ if (jspb.Message.GENERATE_TO_OBJECT) {
9915
+ /**
9916
+ * Creates an object representation of this proto.
9917
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
9918
+ * Optional fields that are not set will be set to undefined.
9919
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
9920
+ * For the list of reserved names please see:
9921
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
9922
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
9923
+ * JSPB instance for transitional soy proto support:
9924
+ * http://goto/soy-param-migration
9925
+ * @return {!Object}
9926
+ */
9927
+ proto.user.CategoryItem.prototype.toObject = function(opt_includeInstance) {
9928
+ return proto.user.CategoryItem.toObject(opt_includeInstance, this);
9929
+ };
9930
+
9931
+
9932
+ /**
9933
+ * Static version of the {@see toObject} method.
9934
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
9935
+ * the JSPB instance for transitional soy proto support:
9936
+ * http://goto/soy-param-migration
9937
+ * @param {!proto.user.CategoryItem} msg The msg instance to transform.
9938
+ * @return {!Object}
9939
+ * @suppress {unusedLocalVariables} f is only used for nested messages
9940
+ */
9941
+ proto.user.CategoryItem.toObject = function(includeInstance, msg) {
9942
+ var f, obj = {
9943
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0),
9944
+ title: jspb.Message.getFieldWithDefault(msg, 2, ""),
9945
+ description: jspb.Message.getFieldWithDefault(msg, 3, "")
9946
+ };
9947
+
9948
+ if (includeInstance) {
9949
+ obj.$jspbMessageInstance = msg;
9950
+ }
9951
+ return obj;
9952
+ };
9953
+ }
9954
+
9955
+
9956
+ /**
9957
+ * Deserializes binary data (in protobuf wire format).
9958
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
9959
+ * @return {!proto.user.CategoryItem}
9960
+ */
9961
+ proto.user.CategoryItem.deserializeBinary = function(bytes) {
9962
+ var reader = new jspb.BinaryReader(bytes);
9963
+ var msg = new proto.user.CategoryItem;
9964
+ return proto.user.CategoryItem.deserializeBinaryFromReader(msg, reader);
9965
+ };
9966
+
9967
+
9968
+ /**
9969
+ * Deserializes binary data (in protobuf wire format) from the
9970
+ * given reader into the given message object.
9971
+ * @param {!proto.user.CategoryItem} msg The message object to deserialize into.
9972
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
9973
+ * @return {!proto.user.CategoryItem}
9974
+ */
9975
+ proto.user.CategoryItem.deserializeBinaryFromReader = function(msg, reader) {
9976
+ while (reader.nextField()) {
9977
+ if (reader.isEndGroup()) {
9978
+ break;
9979
+ }
9980
+ var field = reader.getFieldNumber();
9981
+ switch (field) {
9982
+ case 1:
9983
+ var value = /** @type {number} */ (reader.readInt32());
9984
+ msg.setId(value);
9985
+ break;
9986
+ case 2:
9987
+ var value = /** @type {string} */ (reader.readString());
9988
+ msg.setTitle(value);
9989
+ break;
9990
+ case 3:
9991
+ var value = /** @type {string} */ (reader.readString());
9992
+ msg.setDescription(value);
9993
+ break;
9994
+ default:
9995
+ reader.skipField();
9996
+ break;
9997
+ }
9998
+ }
9999
+ return msg;
10000
+ };
10001
+
10002
+
10003
+ /**
10004
+ * Serializes the message to binary data (in protobuf wire format).
10005
+ * @return {!Uint8Array}
10006
+ */
10007
+ proto.user.CategoryItem.prototype.serializeBinary = function() {
10008
+ var writer = new jspb.BinaryWriter();
10009
+ proto.user.CategoryItem.serializeBinaryToWriter(this, writer);
10010
+ return writer.getResultBuffer();
10011
+ };
10012
+
10013
+
10014
+ /**
10015
+ * Serializes the given message to binary data (in protobuf wire
10016
+ * format), writing to the given BinaryWriter.
10017
+ * @param {!proto.user.CategoryItem} message
10018
+ * @param {!jspb.BinaryWriter} writer
10019
+ * @suppress {unusedLocalVariables} f is only used for nested messages
10020
+ */
10021
+ proto.user.CategoryItem.serializeBinaryToWriter = function(message, writer) {
10022
+ var f = undefined;
10023
+ f = message.getId();
10024
+ if (f !== 0) {
10025
+ writer.writeInt32(
10026
+ 1,
10027
+ f
10028
+ );
10029
+ }
10030
+ f = message.getTitle();
10031
+ if (f.length > 0) {
10032
+ writer.writeString(
10033
+ 2,
10034
+ f
10035
+ );
10036
+ }
10037
+ f = /** @type {string} */ (jspb.Message.getField(message, 3));
10038
+ if (f != null) {
10039
+ writer.writeString(
10040
+ 3,
10041
+ f
10042
+ );
10043
+ }
10044
+ };
10045
+
10046
+
10047
+ /**
10048
+ * optional int32 id = 1;
10049
+ * @return {number}
10050
+ */
10051
+ proto.user.CategoryItem.prototype.getId = function() {
10052
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
10053
+ };
10054
+
10055
+
10056
+ /**
10057
+ * @param {number} value
10058
+ * @return {!proto.user.CategoryItem} returns this
10059
+ */
10060
+ proto.user.CategoryItem.prototype.setId = function(value) {
10061
+ return jspb.Message.setProto3IntField(this, 1, value);
10062
+ };
10063
+
10064
+
10065
+ /**
10066
+ * optional string title = 2;
10067
+ * @return {string}
10068
+ */
10069
+ proto.user.CategoryItem.prototype.getTitle = function() {
10070
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
10071
+ };
10072
+
10073
+
10074
+ /**
10075
+ * @param {string} value
10076
+ * @return {!proto.user.CategoryItem} returns this
10077
+ */
10078
+ proto.user.CategoryItem.prototype.setTitle = function(value) {
10079
+ return jspb.Message.setProto3StringField(this, 2, value);
10080
+ };
10081
+
10082
+
10083
+ /**
10084
+ * optional string description = 3;
10085
+ * @return {string}
10086
+ */
10087
+ proto.user.CategoryItem.prototype.getDescription = function() {
10088
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
10089
+ };
10090
+
10091
+
10092
+ /**
10093
+ * @param {string} value
10094
+ * @return {!proto.user.CategoryItem} returns this
10095
+ */
10096
+ proto.user.CategoryItem.prototype.setDescription = function(value) {
10097
+ return jspb.Message.setField(this, 3, value);
10098
+ };
10099
+
10100
+
10101
+ /**
10102
+ * Clears the field making it undefined.
10103
+ * @return {!proto.user.CategoryItem} returns this
10104
+ */
10105
+ proto.user.CategoryItem.prototype.clearDescription = function() {
10106
+ return jspb.Message.setField(this, 3, undefined);
10107
+ };
10108
+
10109
+
10110
+ /**
10111
+ * Returns whether this field is set.
10112
+ * @return {boolean}
10113
+ */
10114
+ proto.user.CategoryItem.prototype.hasDescription = function() {
10115
+ return jspb.Message.getField(this, 3) != null;
10116
+ };
10117
+
10118
+
10119
+
10120
+ /**
10121
+ * List of repeated fields within this message type.
10122
+ * @private {!Array<number>}
10123
+ * @const
10124
+ */
10125
+ proto.user.CategoryItemsResponse.repeatedFields_ = [1];
10126
+
10127
+
10128
+
10129
+ if (jspb.Message.GENERATE_TO_OBJECT) {
10130
+ /**
10131
+ * Creates an object representation of this proto.
10132
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
10133
+ * Optional fields that are not set will be set to undefined.
10134
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
10135
+ * For the list of reserved names please see:
10136
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
10137
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
10138
+ * JSPB instance for transitional soy proto support:
10139
+ * http://goto/soy-param-migration
10140
+ * @return {!Object}
10141
+ */
10142
+ proto.user.CategoryItemsResponse.prototype.toObject = function(opt_includeInstance) {
10143
+ return proto.user.CategoryItemsResponse.toObject(opt_includeInstance, this);
10144
+ };
10145
+
10146
+
10147
+ /**
10148
+ * Static version of the {@see toObject} method.
10149
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
10150
+ * the JSPB instance for transitional soy proto support:
10151
+ * http://goto/soy-param-migration
10152
+ * @param {!proto.user.CategoryItemsResponse} msg The msg instance to transform.
10153
+ * @return {!Object}
10154
+ * @suppress {unusedLocalVariables} f is only used for nested messages
10155
+ */
10156
+ proto.user.CategoryItemsResponse.toObject = function(includeInstance, msg) {
10157
+ var f, obj = {
10158
+ itemsList: jspb.Message.toObjectList(msg.getItemsList(),
10159
+ proto.user.CategoryItem.toObject, includeInstance),
10160
+ totalPages: jspb.Message.getFieldWithDefault(msg, 2, 0),
10161
+ totalItems: jspb.Message.getFieldWithDefault(msg, 3, 0)
10162
+ };
10163
+
10164
+ if (includeInstance) {
10165
+ obj.$jspbMessageInstance = msg;
10166
+ }
10167
+ return obj;
10168
+ };
10169
+ }
10170
+
10171
+
10172
+ /**
10173
+ * Deserializes binary data (in protobuf wire format).
10174
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
10175
+ * @return {!proto.user.CategoryItemsResponse}
10176
+ */
10177
+ proto.user.CategoryItemsResponse.deserializeBinary = function(bytes) {
10178
+ var reader = new jspb.BinaryReader(bytes);
10179
+ var msg = new proto.user.CategoryItemsResponse;
10180
+ return proto.user.CategoryItemsResponse.deserializeBinaryFromReader(msg, reader);
10181
+ };
10182
+
10183
+
10184
+ /**
10185
+ * Deserializes binary data (in protobuf wire format) from the
10186
+ * given reader into the given message object.
10187
+ * @param {!proto.user.CategoryItemsResponse} msg The message object to deserialize into.
10188
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
10189
+ * @return {!proto.user.CategoryItemsResponse}
10190
+ */
10191
+ proto.user.CategoryItemsResponse.deserializeBinaryFromReader = function(msg, reader) {
10192
+ while (reader.nextField()) {
10193
+ if (reader.isEndGroup()) {
10194
+ break;
10195
+ }
10196
+ var field = reader.getFieldNumber();
10197
+ switch (field) {
10198
+ case 1:
10199
+ var value = new proto.user.CategoryItem;
10200
+ reader.readMessage(value,proto.user.CategoryItem.deserializeBinaryFromReader);
10201
+ msg.addItems(value);
10202
+ break;
10203
+ case 2:
10204
+ var value = /** @type {number} */ (reader.readInt32());
10205
+ msg.setTotalPages(value);
10206
+ break;
10207
+ case 3:
10208
+ var value = /** @type {number} */ (reader.readInt32());
10209
+ msg.setTotalItems(value);
10210
+ break;
10211
+ default:
10212
+ reader.skipField();
10213
+ break;
10214
+ }
10215
+ }
10216
+ return msg;
10217
+ };
10218
+
10219
+
10220
+ /**
10221
+ * Serializes the message to binary data (in protobuf wire format).
10222
+ * @return {!Uint8Array}
10223
+ */
10224
+ proto.user.CategoryItemsResponse.prototype.serializeBinary = function() {
10225
+ var writer = new jspb.BinaryWriter();
10226
+ proto.user.CategoryItemsResponse.serializeBinaryToWriter(this, writer);
10227
+ return writer.getResultBuffer();
10228
+ };
10229
+
10230
+
10231
+ /**
10232
+ * Serializes the given message to binary data (in protobuf wire
10233
+ * format), writing to the given BinaryWriter.
10234
+ * @param {!proto.user.CategoryItemsResponse} message
10235
+ * @param {!jspb.BinaryWriter} writer
10236
+ * @suppress {unusedLocalVariables} f is only used for nested messages
10237
+ */
10238
+ proto.user.CategoryItemsResponse.serializeBinaryToWriter = function(message, writer) {
10239
+ var f = undefined;
10240
+ f = message.getItemsList();
10241
+ if (f.length > 0) {
10242
+ writer.writeRepeatedMessage(
10243
+ 1,
10244
+ f,
10245
+ proto.user.CategoryItem.serializeBinaryToWriter
10246
+ );
10247
+ }
10248
+ f = /** @type {number} */ (jspb.Message.getField(message, 2));
10249
+ if (f != null) {
10250
+ writer.writeInt32(
10251
+ 2,
10252
+ f
10253
+ );
10254
+ }
10255
+ f = /** @type {number} */ (jspb.Message.getField(message, 3));
10256
+ if (f != null) {
10257
+ writer.writeInt32(
10258
+ 3,
10259
+ f
10260
+ );
10261
+ }
10262
+ };
10263
+
10264
+
10265
+ /**
10266
+ * repeated CategoryItem items = 1;
10267
+ * @return {!Array<!proto.user.CategoryItem>}
10268
+ */
10269
+ proto.user.CategoryItemsResponse.prototype.getItemsList = function() {
10270
+ return /** @type{!Array<!proto.user.CategoryItem>} */ (
10271
+ jspb.Message.getRepeatedWrapperField(this, proto.user.CategoryItem, 1));
10272
+ };
10273
+
10274
+
10275
+ /**
10276
+ * @param {!Array<!proto.user.CategoryItem>} value
10277
+ * @return {!proto.user.CategoryItemsResponse} returns this
10278
+ */
10279
+ proto.user.CategoryItemsResponse.prototype.setItemsList = function(value) {
10280
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
10281
+ };
10282
+
10283
+
10284
+ /**
10285
+ * @param {!proto.user.CategoryItem=} opt_value
10286
+ * @param {number=} opt_index
10287
+ * @return {!proto.user.CategoryItem}
10288
+ */
10289
+ proto.user.CategoryItemsResponse.prototype.addItems = function(opt_value, opt_index) {
10290
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.user.CategoryItem, opt_index);
10291
+ };
10292
+
10293
+
10294
+ /**
10295
+ * Clears the list making it empty but non-null.
10296
+ * @return {!proto.user.CategoryItemsResponse} returns this
10297
+ */
10298
+ proto.user.CategoryItemsResponse.prototype.clearItemsList = function() {
10299
+ return this.setItemsList([]);
10300
+ };
10301
+
10302
+
10303
+ /**
10304
+ * optional int32 total_pages = 2;
10305
+ * @return {number}
10306
+ */
10307
+ proto.user.CategoryItemsResponse.prototype.getTotalPages = function() {
10308
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
10309
+ };
10310
+
10311
+
10312
+ /**
10313
+ * @param {number} value
10314
+ * @return {!proto.user.CategoryItemsResponse} returns this
10315
+ */
10316
+ proto.user.CategoryItemsResponse.prototype.setTotalPages = function(value) {
10317
+ return jspb.Message.setField(this, 2, value);
10318
+ };
10319
+
10320
+
10321
+ /**
10322
+ * Clears the field making it undefined.
10323
+ * @return {!proto.user.CategoryItemsResponse} returns this
10324
+ */
10325
+ proto.user.CategoryItemsResponse.prototype.clearTotalPages = function() {
10326
+ return jspb.Message.setField(this, 2, undefined);
10327
+ };
10328
+
10329
+
10330
+ /**
10331
+ * Returns whether this field is set.
10332
+ * @return {boolean}
10333
+ */
10334
+ proto.user.CategoryItemsResponse.prototype.hasTotalPages = function() {
10335
+ return jspb.Message.getField(this, 2) != null;
10336
+ };
10337
+
10338
+
10339
+ /**
10340
+ * optional int32 total_items = 3;
10341
+ * @return {number}
10342
+ */
10343
+ proto.user.CategoryItemsResponse.prototype.getTotalItems = function() {
10344
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
10345
+ };
10346
+
10347
+
10348
+ /**
10349
+ * @param {number} value
10350
+ * @return {!proto.user.CategoryItemsResponse} returns this
10351
+ */
10352
+ proto.user.CategoryItemsResponse.prototype.setTotalItems = function(value) {
10353
+ return jspb.Message.setField(this, 3, value);
10354
+ };
10355
+
10356
+
10357
+ /**
10358
+ * Clears the field making it undefined.
10359
+ * @return {!proto.user.CategoryItemsResponse} returns this
10360
+ */
10361
+ proto.user.CategoryItemsResponse.prototype.clearTotalItems = function() {
10362
+ return jspb.Message.setField(this, 3, undefined);
10363
+ };
10364
+
10365
+
10366
+ /**
10367
+ * Returns whether this field is set.
10368
+ * @return {boolean}
10369
+ */
10370
+ proto.user.CategoryItemsResponse.prototype.hasTotalItems = function() {
10371
+ return jspb.Message.getField(this, 3) != null;
10372
+ };
10373
+
10374
+
10375
+
10376
+
10377
+
10378
+ if (jspb.Message.GENERATE_TO_OBJECT) {
10379
+ /**
10380
+ * Creates an object representation of this proto.
10381
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
10382
+ * Optional fields that are not set will be set to undefined.
10383
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
10384
+ * For the list of reserved names please see:
10385
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
10386
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
10387
+ * JSPB instance for transitional soy proto support:
10388
+ * http://goto/soy-param-migration
10389
+ * @return {!Object}
10390
+ */
10391
+ proto.user.VerificationStatus.prototype.toObject = function(opt_includeInstance) {
10392
+ return proto.user.VerificationStatus.toObject(opt_includeInstance, this);
10393
+ };
10394
+
10395
+
10396
+ /**
10397
+ * Static version of the {@see toObject} method.
10398
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
10399
+ * the JSPB instance for transitional soy proto support:
10400
+ * http://goto/soy-param-migration
10401
+ * @param {!proto.user.VerificationStatus} msg The msg instance to transform.
10402
+ * @return {!Object}
10403
+ * @suppress {unusedLocalVariables} f is only used for nested messages
10404
+ */
10405
+ proto.user.VerificationStatus.toObject = function(includeInstance, msg) {
10406
+ var f, obj = {
10407
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0),
10408
+ title: jspb.Message.getFieldWithDefault(msg, 2, ""),
10409
+ description: jspb.Message.getFieldWithDefault(msg, 3, "")
10410
+ };
10411
+
10412
+ if (includeInstance) {
10413
+ obj.$jspbMessageInstance = msg;
10414
+ }
10415
+ return obj;
10416
+ };
10417
+ }
10418
+
10419
+
10420
+ /**
10421
+ * Deserializes binary data (in protobuf wire format).
10422
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
10423
+ * @return {!proto.user.VerificationStatus}
10424
+ */
10425
+ proto.user.VerificationStatus.deserializeBinary = function(bytes) {
10426
+ var reader = new jspb.BinaryReader(bytes);
10427
+ var msg = new proto.user.VerificationStatus;
10428
+ return proto.user.VerificationStatus.deserializeBinaryFromReader(msg, reader);
10429
+ };
10430
+
10431
+
10432
+ /**
10433
+ * Deserializes binary data (in protobuf wire format) from the
10434
+ * given reader into the given message object.
10435
+ * @param {!proto.user.VerificationStatus} msg The message object to deserialize into.
10436
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
10437
+ * @return {!proto.user.VerificationStatus}
10438
+ */
10439
+ proto.user.VerificationStatus.deserializeBinaryFromReader = function(msg, reader) {
10440
+ while (reader.nextField()) {
10441
+ if (reader.isEndGroup()) {
10442
+ break;
10443
+ }
10444
+ var field = reader.getFieldNumber();
10445
+ switch (field) {
10446
+ case 1:
10447
+ var value = /** @type {number} */ (reader.readInt32());
10448
+ msg.setId(value);
10449
+ break;
10450
+ case 2:
10451
+ var value = /** @type {string} */ (reader.readString());
10452
+ msg.setTitle(value);
10453
+ break;
10454
+ case 3:
10455
+ var value = /** @type {string} */ (reader.readString());
10456
+ msg.setDescription(value);
10457
+ break;
10458
+ default:
10459
+ reader.skipField();
10460
+ break;
10461
+ }
10462
+ }
10463
+ return msg;
10464
+ };
10465
+
10466
+
10467
+ /**
10468
+ * Serializes the message to binary data (in protobuf wire format).
10469
+ * @return {!Uint8Array}
10470
+ */
10471
+ proto.user.VerificationStatus.prototype.serializeBinary = function() {
10472
+ var writer = new jspb.BinaryWriter();
10473
+ proto.user.VerificationStatus.serializeBinaryToWriter(this, writer);
10474
+ return writer.getResultBuffer();
10475
+ };
10476
+
10477
+
10478
+ /**
10479
+ * Serializes the given message to binary data (in protobuf wire
10480
+ * format), writing to the given BinaryWriter.
10481
+ * @param {!proto.user.VerificationStatus} message
10482
+ * @param {!jspb.BinaryWriter} writer
10483
+ * @suppress {unusedLocalVariables} f is only used for nested messages
10484
+ */
10485
+ proto.user.VerificationStatus.serializeBinaryToWriter = function(message, writer) {
10486
+ var f = undefined;
10487
+ f = message.getId();
10488
+ if (f !== 0) {
10489
+ writer.writeInt32(
10490
+ 1,
10491
+ f
10492
+ );
10493
+ }
10494
+ f = message.getTitle();
10495
+ if (f.length > 0) {
10496
+ writer.writeString(
10497
+ 2,
10498
+ f
10499
+ );
10500
+ }
10501
+ f = /** @type {string} */ (jspb.Message.getField(message, 3));
10502
+ if (f != null) {
10503
+ writer.writeString(
10504
+ 3,
10505
+ f
10506
+ );
10507
+ }
10508
+ };
10509
+
10510
+
10511
+ /**
10512
+ * optional int32 id = 1;
10513
+ * @return {number}
10514
+ */
10515
+ proto.user.VerificationStatus.prototype.getId = function() {
10516
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
10517
+ };
10518
+
10519
+
10520
+ /**
10521
+ * @param {number} value
10522
+ * @return {!proto.user.VerificationStatus} returns this
10523
+ */
10524
+ proto.user.VerificationStatus.prototype.setId = function(value) {
10525
+ return jspb.Message.setProto3IntField(this, 1, value);
10526
+ };
10527
+
10528
+
10529
+ /**
10530
+ * optional string title = 2;
10531
+ * @return {string}
10532
+ */
10533
+ proto.user.VerificationStatus.prototype.getTitle = function() {
10534
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
10535
+ };
10536
+
10537
+
10538
+ /**
10539
+ * @param {string} value
10540
+ * @return {!proto.user.VerificationStatus} returns this
10541
+ */
10542
+ proto.user.VerificationStatus.prototype.setTitle = function(value) {
10543
+ return jspb.Message.setProto3StringField(this, 2, value);
10544
+ };
10545
+
10546
+
10547
+ /**
10548
+ * optional string description = 3;
10549
+ * @return {string}
10550
+ */
10551
+ proto.user.VerificationStatus.prototype.getDescription = function() {
10552
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
10553
+ };
10554
+
10555
+
10556
+ /**
10557
+ * @param {string} value
10558
+ * @return {!proto.user.VerificationStatus} returns this
10559
+ */
10560
+ proto.user.VerificationStatus.prototype.setDescription = function(value) {
10561
+ return jspb.Message.setField(this, 3, value);
10562
+ };
10563
+
10564
+
10565
+ /**
10566
+ * Clears the field making it undefined.
10567
+ * @return {!proto.user.VerificationStatus} returns this
10568
+ */
10569
+ proto.user.VerificationStatus.prototype.clearDescription = function() {
10570
+ return jspb.Message.setField(this, 3, undefined);
10571
+ };
10572
+
10573
+
10574
+ /**
10575
+ * Returns whether this field is set.
10576
+ * @return {boolean}
10577
+ */
10578
+ proto.user.VerificationStatus.prototype.hasDescription = function() {
10579
+ return jspb.Message.getField(this, 3) != null;
10580
+ };
10581
+
10582
+
10583
+
10584
+ /**
10585
+ * List of repeated fields within this message type.
10586
+ * @private {!Array<number>}
10587
+ * @const
10588
+ */
10589
+ proto.user.VerificationStatusItemsResponse.repeatedFields_ = [1];
10590
+
10591
+
10592
+
10593
+ if (jspb.Message.GENERATE_TO_OBJECT) {
10594
+ /**
10595
+ * Creates an object representation of this proto.
10596
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
10597
+ * Optional fields that are not set will be set to undefined.
10598
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
10599
+ * For the list of reserved names please see:
10600
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
10601
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
10602
+ * JSPB instance for transitional soy proto support:
10603
+ * http://goto/soy-param-migration
10604
+ * @return {!Object}
10605
+ */
10606
+ proto.user.VerificationStatusItemsResponse.prototype.toObject = function(opt_includeInstance) {
10607
+ return proto.user.VerificationStatusItemsResponse.toObject(opt_includeInstance, this);
10608
+ };
10609
+
10610
+
10611
+ /**
10612
+ * Static version of the {@see toObject} method.
10613
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
10614
+ * the JSPB instance for transitional soy proto support:
10615
+ * http://goto/soy-param-migration
10616
+ * @param {!proto.user.VerificationStatusItemsResponse} msg The msg instance to transform.
10617
+ * @return {!Object}
10618
+ * @suppress {unusedLocalVariables} f is only used for nested messages
10619
+ */
10620
+ proto.user.VerificationStatusItemsResponse.toObject = function(includeInstance, msg) {
10621
+ var f, obj = {
10622
+ itemsList: jspb.Message.toObjectList(msg.getItemsList(),
10623
+ proto.user.VerificationStatus.toObject, includeInstance),
10624
+ totalPages: jspb.Message.getFieldWithDefault(msg, 2, 0),
10625
+ totalItems: jspb.Message.getFieldWithDefault(msg, 3, 0)
10626
+ };
10627
+
10628
+ if (includeInstance) {
10629
+ obj.$jspbMessageInstance = msg;
10630
+ }
10631
+ return obj;
10632
+ };
10633
+ }
10634
+
10635
+
10636
+ /**
10637
+ * Deserializes binary data (in protobuf wire format).
10638
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
10639
+ * @return {!proto.user.VerificationStatusItemsResponse}
10640
+ */
10641
+ proto.user.VerificationStatusItemsResponse.deserializeBinary = function(bytes) {
10642
+ var reader = new jspb.BinaryReader(bytes);
10643
+ var msg = new proto.user.VerificationStatusItemsResponse;
10644
+ return proto.user.VerificationStatusItemsResponse.deserializeBinaryFromReader(msg, reader);
10645
+ };
10646
+
10647
+
10648
+ /**
10649
+ * Deserializes binary data (in protobuf wire format) from the
10650
+ * given reader into the given message object.
10651
+ * @param {!proto.user.VerificationStatusItemsResponse} msg The message object to deserialize into.
10652
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
10653
+ * @return {!proto.user.VerificationStatusItemsResponse}
10654
+ */
10655
+ proto.user.VerificationStatusItemsResponse.deserializeBinaryFromReader = function(msg, reader) {
10656
+ while (reader.nextField()) {
10657
+ if (reader.isEndGroup()) {
10658
+ break;
10659
+ }
10660
+ var field = reader.getFieldNumber();
10661
+ switch (field) {
10662
+ case 1:
10663
+ var value = new proto.user.VerificationStatus;
10664
+ reader.readMessage(value,proto.user.VerificationStatus.deserializeBinaryFromReader);
10665
+ msg.addItems(value);
10666
+ break;
10667
+ case 2:
10668
+ var value = /** @type {number} */ (reader.readInt32());
10669
+ msg.setTotalPages(value);
10670
+ break;
10671
+ case 3:
10672
+ var value = /** @type {number} */ (reader.readInt32());
10673
+ msg.setTotalItems(value);
10674
+ break;
10675
+ default:
10676
+ reader.skipField();
10677
+ break;
10678
+ }
10679
+ }
10680
+ return msg;
10681
+ };
10682
+
10683
+
10684
+ /**
10685
+ * Serializes the message to binary data (in protobuf wire format).
10686
+ * @return {!Uint8Array}
10687
+ */
10688
+ proto.user.VerificationStatusItemsResponse.prototype.serializeBinary = function() {
10689
+ var writer = new jspb.BinaryWriter();
10690
+ proto.user.VerificationStatusItemsResponse.serializeBinaryToWriter(this, writer);
10691
+ return writer.getResultBuffer();
10692
+ };
10693
+
10694
+
10695
+ /**
10696
+ * Serializes the given message to binary data (in protobuf wire
10697
+ * format), writing to the given BinaryWriter.
10698
+ * @param {!proto.user.VerificationStatusItemsResponse} message
10699
+ * @param {!jspb.BinaryWriter} writer
10700
+ * @suppress {unusedLocalVariables} f is only used for nested messages
10701
+ */
10702
+ proto.user.VerificationStatusItemsResponse.serializeBinaryToWriter = function(message, writer) {
10703
+ var f = undefined;
10704
+ f = message.getItemsList();
10705
+ if (f.length > 0) {
10706
+ writer.writeRepeatedMessage(
10707
+ 1,
10708
+ f,
10709
+ proto.user.VerificationStatus.serializeBinaryToWriter
10710
+ );
10711
+ }
10712
+ f = /** @type {number} */ (jspb.Message.getField(message, 2));
10713
+ if (f != null) {
10714
+ writer.writeInt32(
10715
+ 2,
10716
+ f
10717
+ );
10718
+ }
10719
+ f = /** @type {number} */ (jspb.Message.getField(message, 3));
10720
+ if (f != null) {
10721
+ writer.writeInt32(
10722
+ 3,
10723
+ f
10724
+ );
10725
+ }
10726
+ };
10727
+
10728
+
10729
+ /**
10730
+ * repeated VerificationStatus items = 1;
10731
+ * @return {!Array<!proto.user.VerificationStatus>}
10732
+ */
10733
+ proto.user.VerificationStatusItemsResponse.prototype.getItemsList = function() {
10734
+ return /** @type{!Array<!proto.user.VerificationStatus>} */ (
10735
+ jspb.Message.getRepeatedWrapperField(this, proto.user.VerificationStatus, 1));
10736
+ };
10737
+
10738
+
10739
+ /**
10740
+ * @param {!Array<!proto.user.VerificationStatus>} value
10741
+ * @return {!proto.user.VerificationStatusItemsResponse} returns this
10742
+ */
10743
+ proto.user.VerificationStatusItemsResponse.prototype.setItemsList = function(value) {
10744
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
10745
+ };
10746
+
10747
+
10748
+ /**
10749
+ * @param {!proto.user.VerificationStatus=} opt_value
10750
+ * @param {number=} opt_index
10751
+ * @return {!proto.user.VerificationStatus}
10752
+ */
10753
+ proto.user.VerificationStatusItemsResponse.prototype.addItems = function(opt_value, opt_index) {
10754
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.user.VerificationStatus, opt_index);
10755
+ };
10756
+
10757
+
10758
+ /**
10759
+ * Clears the list making it empty but non-null.
10760
+ * @return {!proto.user.VerificationStatusItemsResponse} returns this
10761
+ */
10762
+ proto.user.VerificationStatusItemsResponse.prototype.clearItemsList = function() {
10763
+ return this.setItemsList([]);
10764
+ };
10765
+
10766
+
10767
+ /**
10768
+ * optional int32 total_pages = 2;
10769
+ * @return {number}
10770
+ */
10771
+ proto.user.VerificationStatusItemsResponse.prototype.getTotalPages = function() {
10772
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
10773
+ };
10774
+
10775
+
10776
+ /**
10777
+ * @param {number} value
10778
+ * @return {!proto.user.VerificationStatusItemsResponse} returns this
10779
+ */
10780
+ proto.user.VerificationStatusItemsResponse.prototype.setTotalPages = function(value) {
10781
+ return jspb.Message.setField(this, 2, value);
10782
+ };
10783
+
10784
+
10785
+ /**
10786
+ * Clears the field making it undefined.
10787
+ * @return {!proto.user.VerificationStatusItemsResponse} returns this
10788
+ */
10789
+ proto.user.VerificationStatusItemsResponse.prototype.clearTotalPages = function() {
10790
+ return jspb.Message.setField(this, 2, undefined);
10791
+ };
10792
+
10793
+
10794
+ /**
10795
+ * Returns whether this field is set.
10796
+ * @return {boolean}
10797
+ */
10798
+ proto.user.VerificationStatusItemsResponse.prototype.hasTotalPages = function() {
10799
+ return jspb.Message.getField(this, 2) != null;
10800
+ };
10801
+
10802
+
10803
+ /**
10804
+ * optional int32 total_items = 3;
10805
+ * @return {number}
10806
+ */
10807
+ proto.user.VerificationStatusItemsResponse.prototype.getTotalItems = function() {
10808
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
10809
+ };
10810
+
10811
+
10812
+ /**
10813
+ * @param {number} value
10814
+ * @return {!proto.user.VerificationStatusItemsResponse} returns this
10815
+ */
10816
+ proto.user.VerificationStatusItemsResponse.prototype.setTotalItems = function(value) {
10817
+ return jspb.Message.setField(this, 3, value);
10818
+ };
10819
+
10820
+
10821
+ /**
10822
+ * Clears the field making it undefined.
10823
+ * @return {!proto.user.VerificationStatusItemsResponse} returns this
10824
+ */
10825
+ proto.user.VerificationStatusItemsResponse.prototype.clearTotalItems = function() {
10826
+ return jspb.Message.setField(this, 3, undefined);
10827
+ };
10828
+
10829
+
10830
+ /**
10831
+ * Returns whether this field is set.
10832
+ * @return {boolean}
10833
+ */
10834
+ proto.user.VerificationStatusItemsResponse.prototype.hasTotalItems = function() {
10835
+ return jspb.Message.getField(this, 3) != null;
10836
+ };
10837
+
10838
+
10839
+
10840
+
10841
+
9826
10842
  if (jspb.Message.GENERATE_TO_OBJECT) {
9827
10843
  /**
9828
10844
  * Creates an object representation of this proto.