protobuf-platform 1.0.104 → 1.0.105

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.104",
3
+ "version": "1.0.105",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/user/user.proto CHANGED
@@ -12,11 +12,17 @@ service User {
12
12
  rpc addPermissionToUserRole(RolePermissionRequest) returns (RolePermissionStatusResponse);
13
13
  rpc rolesList(PaginationRequest) returns (RolesItemsResponse);
14
14
  rpc getSingleRole(GetRoleRequest) returns (Role);
15
+ //CRUD
16
+ rpc readListUsers(PaginationRequest) returns (UsersResponse);
15
17
  }
16
18
 
17
19
  message PingRequest { string ping = 1; }
18
20
  message PongResponse { string pong = 1; }
19
- message PaginationRequest { int32 limit = 1; int32 offset = 2; }
21
+ message PaginationRequest { int32 limit = 1; int32 offset = 2; optional UserSearchParams user_search_params = 3; }
22
+ message UserSearchParams {
23
+ repeated string user_public_ids = 1;
24
+ repeated int32 user_ids = 2;
25
+ }
20
26
 
21
27
  //Auth [Registration & Login]
22
28
  message RegistrationRequest {
@@ -65,6 +71,11 @@ message UserDataResponse {
65
71
  optional float balance_bonus = 13;
66
72
  optional string balance_type = 14;
67
73
  }
74
+ message UsersResponse {
75
+ repeated UserDataResponse items = 1;
76
+ optional int32 total_pages = 2;
77
+ optional int32 total_items = 3;
78
+ }
68
79
  //Permissions
69
80
  message RolePermissionRequest {
70
81
  string role = 1;
@@ -147,6 +147,17 @@ function deserialize_user_UserDataResponse(buffer_arg) {
147
147
  return user_pb.UserDataResponse.deserializeBinary(new Uint8Array(buffer_arg));
148
148
  }
149
149
 
150
+ function serialize_user_UsersResponse(arg) {
151
+ if (!(arg instanceof user_pb.UsersResponse)) {
152
+ throw new Error('Expected argument of type user.UsersResponse');
153
+ }
154
+ return Buffer.from(arg.serializeBinary());
155
+ }
156
+
157
+ function deserialize_user_UsersResponse(buffer_arg) {
158
+ return user_pb.UsersResponse.deserializeBinary(new Uint8Array(buffer_arg));
159
+ }
160
+
150
161
 
151
162
  var UserService = exports.UserService = {
152
163
  checkConnection: {
@@ -228,6 +239,18 @@ addPermissionToUserRole: {
228
239
  responseSerialize: serialize_user_Role,
229
240
  responseDeserialize: deserialize_user_Role,
230
241
  },
242
+ // CRUD
243
+ readListUsers: {
244
+ path: '/user.User/readListUsers',
245
+ requestStream: false,
246
+ responseStream: false,
247
+ requestType: user_pb.PaginationRequest,
248
+ responseType: user_pb.UsersResponse,
249
+ requestSerialize: serialize_user_PaginationRequest,
250
+ requestDeserialize: deserialize_user_PaginationRequest,
251
+ responseSerialize: serialize_user_UsersResponse,
252
+ responseDeserialize: deserialize_user_UsersResponse,
253
+ },
231
254
  };
232
255
 
233
256
  exports.UserClient = grpc.makeGenericClientConstructor(UserService);
package/user/user_pb.js CHANGED
@@ -34,6 +34,8 @@ goog.exportSymbol('proto.user.RolePermissionStatusResponse', null, global);
34
34
  goog.exportSymbol('proto.user.RolesItemsResponse', null, global);
35
35
  goog.exportSymbol('proto.user.UserDataRequest', null, global);
36
36
  goog.exportSymbol('proto.user.UserDataResponse', null, global);
37
+ goog.exportSymbol('proto.user.UserSearchParams', null, global);
38
+ goog.exportSymbol('proto.user.UsersResponse', null, global);
37
39
  /**
38
40
  * Generated by JsPbCodeGenerator.
39
41
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -97,6 +99,27 @@ if (goog.DEBUG && !COMPILED) {
97
99
  */
98
100
  proto.user.PaginationRequest.displayName = 'proto.user.PaginationRequest';
99
101
  }
102
+ /**
103
+ * Generated by JsPbCodeGenerator.
104
+ * @param {Array=} opt_data Optional initial data array, typically from a
105
+ * server response, or constructed directly in Javascript. The array is used
106
+ * in place and becomes part of the constructed object. It is not cloned.
107
+ * If no data is provided, the constructed object will be empty, but still
108
+ * valid.
109
+ * @extends {jspb.Message}
110
+ * @constructor
111
+ */
112
+ proto.user.UserSearchParams = function(opt_data) {
113
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.user.UserSearchParams.repeatedFields_, null);
114
+ };
115
+ goog.inherits(proto.user.UserSearchParams, jspb.Message);
116
+ if (goog.DEBUG && !COMPILED) {
117
+ /**
118
+ * @public
119
+ * @override
120
+ */
121
+ proto.user.UserSearchParams.displayName = 'proto.user.UserSearchParams';
122
+ }
100
123
  /**
101
124
  * Generated by JsPbCodeGenerator.
102
125
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -202,6 +225,27 @@ if (goog.DEBUG && !COMPILED) {
202
225
  */
203
226
  proto.user.UserDataResponse.displayName = 'proto.user.UserDataResponse';
204
227
  }
228
+ /**
229
+ * Generated by JsPbCodeGenerator.
230
+ * @param {Array=} opt_data Optional initial data array, typically from a
231
+ * server response, or constructed directly in Javascript. The array is used
232
+ * in place and becomes part of the constructed object. It is not cloned.
233
+ * If no data is provided, the constructed object will be empty, but still
234
+ * valid.
235
+ * @extends {jspb.Message}
236
+ * @constructor
237
+ */
238
+ proto.user.UsersResponse = function(opt_data) {
239
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.user.UsersResponse.repeatedFields_, null);
240
+ };
241
+ goog.inherits(proto.user.UsersResponse, jspb.Message);
242
+ if (goog.DEBUG && !COMPILED) {
243
+ /**
244
+ * @public
245
+ * @override
246
+ */
247
+ proto.user.UsersResponse.displayName = 'proto.user.UsersResponse';
248
+ }
205
249
  /**
206
250
  * Generated by JsPbCodeGenerator.
207
251
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -600,7 +644,8 @@ proto.user.PaginationRequest.prototype.toObject = function(opt_includeInstance)
600
644
  proto.user.PaginationRequest.toObject = function(includeInstance, msg) {
601
645
  var f, obj = {
602
646
  limit: jspb.Message.getFieldWithDefault(msg, 1, 0),
603
- offset: jspb.Message.getFieldWithDefault(msg, 2, 0)
647
+ offset: jspb.Message.getFieldWithDefault(msg, 2, 0),
648
+ userSearchParams: (f = msg.getUserSearchParams()) && proto.user.UserSearchParams.toObject(includeInstance, f)
604
649
  };
605
650
 
606
651
  if (includeInstance) {
@@ -645,6 +690,11 @@ proto.user.PaginationRequest.deserializeBinaryFromReader = function(msg, reader)
645
690
  var value = /** @type {number} */ (reader.readInt32());
646
691
  msg.setOffset(value);
647
692
  break;
693
+ case 3:
694
+ var value = new proto.user.UserSearchParams;
695
+ reader.readMessage(value,proto.user.UserSearchParams.deserializeBinaryFromReader);
696
+ msg.setUserSearchParams(value);
697
+ break;
648
698
  default:
649
699
  reader.skipField();
650
700
  break;
@@ -688,6 +738,14 @@ proto.user.PaginationRequest.serializeBinaryToWriter = function(message, writer)
688
738
  f
689
739
  );
690
740
  }
741
+ f = message.getUserSearchParams();
742
+ if (f != null) {
743
+ writer.writeMessage(
744
+ 3,
745
+ f,
746
+ proto.user.UserSearchParams.serializeBinaryToWriter
747
+ );
748
+ }
691
749
  };
692
750
 
693
751
 
@@ -727,6 +785,250 @@ proto.user.PaginationRequest.prototype.setOffset = function(value) {
727
785
  };
728
786
 
729
787
 
788
+ /**
789
+ * optional UserSearchParams user_search_params = 3;
790
+ * @return {?proto.user.UserSearchParams}
791
+ */
792
+ proto.user.PaginationRequest.prototype.getUserSearchParams = function() {
793
+ return /** @type{?proto.user.UserSearchParams} */ (
794
+ jspb.Message.getWrapperField(this, proto.user.UserSearchParams, 3));
795
+ };
796
+
797
+
798
+ /**
799
+ * @param {?proto.user.UserSearchParams|undefined} value
800
+ * @return {!proto.user.PaginationRequest} returns this
801
+ */
802
+ proto.user.PaginationRequest.prototype.setUserSearchParams = function(value) {
803
+ return jspb.Message.setWrapperField(this, 3, value);
804
+ };
805
+
806
+
807
+ /**
808
+ * Clears the message field making it undefined.
809
+ * @return {!proto.user.PaginationRequest} returns this
810
+ */
811
+ proto.user.PaginationRequest.prototype.clearUserSearchParams = function() {
812
+ return this.setUserSearchParams(undefined);
813
+ };
814
+
815
+
816
+ /**
817
+ * Returns whether this field is set.
818
+ * @return {boolean}
819
+ */
820
+ proto.user.PaginationRequest.prototype.hasUserSearchParams = function() {
821
+ return jspb.Message.getField(this, 3) != null;
822
+ };
823
+
824
+
825
+
826
+ /**
827
+ * List of repeated fields within this message type.
828
+ * @private {!Array<number>}
829
+ * @const
830
+ */
831
+ proto.user.UserSearchParams.repeatedFields_ = [1,2];
832
+
833
+
834
+
835
+ if (jspb.Message.GENERATE_TO_OBJECT) {
836
+ /**
837
+ * Creates an object representation of this proto.
838
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
839
+ * Optional fields that are not set will be set to undefined.
840
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
841
+ * For the list of reserved names please see:
842
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
843
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
844
+ * JSPB instance for transitional soy proto support:
845
+ * http://goto/soy-param-migration
846
+ * @return {!Object}
847
+ */
848
+ proto.user.UserSearchParams.prototype.toObject = function(opt_includeInstance) {
849
+ return proto.user.UserSearchParams.toObject(opt_includeInstance, this);
850
+ };
851
+
852
+
853
+ /**
854
+ * Static version of the {@see toObject} method.
855
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
856
+ * the JSPB instance for transitional soy proto support:
857
+ * http://goto/soy-param-migration
858
+ * @param {!proto.user.UserSearchParams} msg The msg instance to transform.
859
+ * @return {!Object}
860
+ * @suppress {unusedLocalVariables} f is only used for nested messages
861
+ */
862
+ proto.user.UserSearchParams.toObject = function(includeInstance, msg) {
863
+ var f, obj = {
864
+ userPublicIdsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f,
865
+ userIdsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f
866
+ };
867
+
868
+ if (includeInstance) {
869
+ obj.$jspbMessageInstance = msg;
870
+ }
871
+ return obj;
872
+ };
873
+ }
874
+
875
+
876
+ /**
877
+ * Deserializes binary data (in protobuf wire format).
878
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
879
+ * @return {!proto.user.UserSearchParams}
880
+ */
881
+ proto.user.UserSearchParams.deserializeBinary = function(bytes) {
882
+ var reader = new jspb.BinaryReader(bytes);
883
+ var msg = new proto.user.UserSearchParams;
884
+ return proto.user.UserSearchParams.deserializeBinaryFromReader(msg, reader);
885
+ };
886
+
887
+
888
+ /**
889
+ * Deserializes binary data (in protobuf wire format) from the
890
+ * given reader into the given message object.
891
+ * @param {!proto.user.UserSearchParams} msg The message object to deserialize into.
892
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
893
+ * @return {!proto.user.UserSearchParams}
894
+ */
895
+ proto.user.UserSearchParams.deserializeBinaryFromReader = function(msg, reader) {
896
+ while (reader.nextField()) {
897
+ if (reader.isEndGroup()) {
898
+ break;
899
+ }
900
+ var field = reader.getFieldNumber();
901
+ switch (field) {
902
+ case 1:
903
+ var value = /** @type {string} */ (reader.readString());
904
+ msg.addUserPublicIds(value);
905
+ break;
906
+ case 2:
907
+ var values = /** @type {!Array<number>} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]);
908
+ for (var i = 0; i < values.length; i++) {
909
+ msg.addUserIds(values[i]);
910
+ }
911
+ break;
912
+ default:
913
+ reader.skipField();
914
+ break;
915
+ }
916
+ }
917
+ return msg;
918
+ };
919
+
920
+
921
+ /**
922
+ * Serializes the message to binary data (in protobuf wire format).
923
+ * @return {!Uint8Array}
924
+ */
925
+ proto.user.UserSearchParams.prototype.serializeBinary = function() {
926
+ var writer = new jspb.BinaryWriter();
927
+ proto.user.UserSearchParams.serializeBinaryToWriter(this, writer);
928
+ return writer.getResultBuffer();
929
+ };
930
+
931
+
932
+ /**
933
+ * Serializes the given message to binary data (in protobuf wire
934
+ * format), writing to the given BinaryWriter.
935
+ * @param {!proto.user.UserSearchParams} message
936
+ * @param {!jspb.BinaryWriter} writer
937
+ * @suppress {unusedLocalVariables} f is only used for nested messages
938
+ */
939
+ proto.user.UserSearchParams.serializeBinaryToWriter = function(message, writer) {
940
+ var f = undefined;
941
+ f = message.getUserPublicIdsList();
942
+ if (f.length > 0) {
943
+ writer.writeRepeatedString(
944
+ 1,
945
+ f
946
+ );
947
+ }
948
+ f = message.getUserIdsList();
949
+ if (f.length > 0) {
950
+ writer.writePackedInt32(
951
+ 2,
952
+ f
953
+ );
954
+ }
955
+ };
956
+
957
+
958
+ /**
959
+ * repeated string user_public_ids = 1;
960
+ * @return {!Array<string>}
961
+ */
962
+ proto.user.UserSearchParams.prototype.getUserPublicIdsList = function() {
963
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 1));
964
+ };
965
+
966
+
967
+ /**
968
+ * @param {!Array<string>} value
969
+ * @return {!proto.user.UserSearchParams} returns this
970
+ */
971
+ proto.user.UserSearchParams.prototype.setUserPublicIdsList = function(value) {
972
+ return jspb.Message.setField(this, 1, value || []);
973
+ };
974
+
975
+
976
+ /**
977
+ * @param {string} value
978
+ * @param {number=} opt_index
979
+ * @return {!proto.user.UserSearchParams} returns this
980
+ */
981
+ proto.user.UserSearchParams.prototype.addUserPublicIds = function(value, opt_index) {
982
+ return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
983
+ };
984
+
985
+
986
+ /**
987
+ * Clears the list making it empty but non-null.
988
+ * @return {!proto.user.UserSearchParams} returns this
989
+ */
990
+ proto.user.UserSearchParams.prototype.clearUserPublicIdsList = function() {
991
+ return this.setUserPublicIdsList([]);
992
+ };
993
+
994
+
995
+ /**
996
+ * repeated int32 user_ids = 2;
997
+ * @return {!Array<number>}
998
+ */
999
+ proto.user.UserSearchParams.prototype.getUserIdsList = function() {
1000
+ return /** @type {!Array<number>} */ (jspb.Message.getRepeatedField(this, 2));
1001
+ };
1002
+
1003
+
1004
+ /**
1005
+ * @param {!Array<number>} value
1006
+ * @return {!proto.user.UserSearchParams} returns this
1007
+ */
1008
+ proto.user.UserSearchParams.prototype.setUserIdsList = function(value) {
1009
+ return jspb.Message.setField(this, 2, value || []);
1010
+ };
1011
+
1012
+
1013
+ /**
1014
+ * @param {number} value
1015
+ * @param {number=} opt_index
1016
+ * @return {!proto.user.UserSearchParams} returns this
1017
+ */
1018
+ proto.user.UserSearchParams.prototype.addUserIds = function(value, opt_index) {
1019
+ return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
1020
+ };
1021
+
1022
+
1023
+ /**
1024
+ * Clears the list making it empty but non-null.
1025
+ * @return {!proto.user.UserSearchParams} returns this
1026
+ */
1027
+ proto.user.UserSearchParams.prototype.clearUserIdsList = function() {
1028
+ return this.setUserIdsList([]);
1029
+ };
1030
+
1031
+
730
1032
 
731
1033
 
732
1034
 
@@ -2614,6 +2916,262 @@ proto.user.UserDataResponse.prototype.hasBalanceType = function() {
2614
2916
 
2615
2917
 
2616
2918
 
2919
+ /**
2920
+ * List of repeated fields within this message type.
2921
+ * @private {!Array<number>}
2922
+ * @const
2923
+ */
2924
+ proto.user.UsersResponse.repeatedFields_ = [1];
2925
+
2926
+
2927
+
2928
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2929
+ /**
2930
+ * Creates an object representation of this proto.
2931
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2932
+ * Optional fields that are not set will be set to undefined.
2933
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2934
+ * For the list of reserved names please see:
2935
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2936
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2937
+ * JSPB instance for transitional soy proto support:
2938
+ * http://goto/soy-param-migration
2939
+ * @return {!Object}
2940
+ */
2941
+ proto.user.UsersResponse.prototype.toObject = function(opt_includeInstance) {
2942
+ return proto.user.UsersResponse.toObject(opt_includeInstance, this);
2943
+ };
2944
+
2945
+
2946
+ /**
2947
+ * Static version of the {@see toObject} method.
2948
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2949
+ * the JSPB instance for transitional soy proto support:
2950
+ * http://goto/soy-param-migration
2951
+ * @param {!proto.user.UsersResponse} msg The msg instance to transform.
2952
+ * @return {!Object}
2953
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2954
+ */
2955
+ proto.user.UsersResponse.toObject = function(includeInstance, msg) {
2956
+ var f, obj = {
2957
+ itemsList: jspb.Message.toObjectList(msg.getItemsList(),
2958
+ proto.user.UserDataResponse.toObject, includeInstance),
2959
+ totalPages: jspb.Message.getFieldWithDefault(msg, 2, 0),
2960
+ totalItems: jspb.Message.getFieldWithDefault(msg, 3, 0)
2961
+ };
2962
+
2963
+ if (includeInstance) {
2964
+ obj.$jspbMessageInstance = msg;
2965
+ }
2966
+ return obj;
2967
+ };
2968
+ }
2969
+
2970
+
2971
+ /**
2972
+ * Deserializes binary data (in protobuf wire format).
2973
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2974
+ * @return {!proto.user.UsersResponse}
2975
+ */
2976
+ proto.user.UsersResponse.deserializeBinary = function(bytes) {
2977
+ var reader = new jspb.BinaryReader(bytes);
2978
+ var msg = new proto.user.UsersResponse;
2979
+ return proto.user.UsersResponse.deserializeBinaryFromReader(msg, reader);
2980
+ };
2981
+
2982
+
2983
+ /**
2984
+ * Deserializes binary data (in protobuf wire format) from the
2985
+ * given reader into the given message object.
2986
+ * @param {!proto.user.UsersResponse} msg The message object to deserialize into.
2987
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2988
+ * @return {!proto.user.UsersResponse}
2989
+ */
2990
+ proto.user.UsersResponse.deserializeBinaryFromReader = function(msg, reader) {
2991
+ while (reader.nextField()) {
2992
+ if (reader.isEndGroup()) {
2993
+ break;
2994
+ }
2995
+ var field = reader.getFieldNumber();
2996
+ switch (field) {
2997
+ case 1:
2998
+ var value = new proto.user.UserDataResponse;
2999
+ reader.readMessage(value,proto.user.UserDataResponse.deserializeBinaryFromReader);
3000
+ msg.addItems(value);
3001
+ break;
3002
+ case 2:
3003
+ var value = /** @type {number} */ (reader.readInt32());
3004
+ msg.setTotalPages(value);
3005
+ break;
3006
+ case 3:
3007
+ var value = /** @type {number} */ (reader.readInt32());
3008
+ msg.setTotalItems(value);
3009
+ break;
3010
+ default:
3011
+ reader.skipField();
3012
+ break;
3013
+ }
3014
+ }
3015
+ return msg;
3016
+ };
3017
+
3018
+
3019
+ /**
3020
+ * Serializes the message to binary data (in protobuf wire format).
3021
+ * @return {!Uint8Array}
3022
+ */
3023
+ proto.user.UsersResponse.prototype.serializeBinary = function() {
3024
+ var writer = new jspb.BinaryWriter();
3025
+ proto.user.UsersResponse.serializeBinaryToWriter(this, writer);
3026
+ return writer.getResultBuffer();
3027
+ };
3028
+
3029
+
3030
+ /**
3031
+ * Serializes the given message to binary data (in protobuf wire
3032
+ * format), writing to the given BinaryWriter.
3033
+ * @param {!proto.user.UsersResponse} message
3034
+ * @param {!jspb.BinaryWriter} writer
3035
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3036
+ */
3037
+ proto.user.UsersResponse.serializeBinaryToWriter = function(message, writer) {
3038
+ var f = undefined;
3039
+ f = message.getItemsList();
3040
+ if (f.length > 0) {
3041
+ writer.writeRepeatedMessage(
3042
+ 1,
3043
+ f,
3044
+ proto.user.UserDataResponse.serializeBinaryToWriter
3045
+ );
3046
+ }
3047
+ f = /** @type {number} */ (jspb.Message.getField(message, 2));
3048
+ if (f != null) {
3049
+ writer.writeInt32(
3050
+ 2,
3051
+ f
3052
+ );
3053
+ }
3054
+ f = /** @type {number} */ (jspb.Message.getField(message, 3));
3055
+ if (f != null) {
3056
+ writer.writeInt32(
3057
+ 3,
3058
+ f
3059
+ );
3060
+ }
3061
+ };
3062
+
3063
+
3064
+ /**
3065
+ * repeated UserDataResponse items = 1;
3066
+ * @return {!Array<!proto.user.UserDataResponse>}
3067
+ */
3068
+ proto.user.UsersResponse.prototype.getItemsList = function() {
3069
+ return /** @type{!Array<!proto.user.UserDataResponse>} */ (
3070
+ jspb.Message.getRepeatedWrapperField(this, proto.user.UserDataResponse, 1));
3071
+ };
3072
+
3073
+
3074
+ /**
3075
+ * @param {!Array<!proto.user.UserDataResponse>} value
3076
+ * @return {!proto.user.UsersResponse} returns this
3077
+ */
3078
+ proto.user.UsersResponse.prototype.setItemsList = function(value) {
3079
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
3080
+ };
3081
+
3082
+
3083
+ /**
3084
+ * @param {!proto.user.UserDataResponse=} opt_value
3085
+ * @param {number=} opt_index
3086
+ * @return {!proto.user.UserDataResponse}
3087
+ */
3088
+ proto.user.UsersResponse.prototype.addItems = function(opt_value, opt_index) {
3089
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.user.UserDataResponse, opt_index);
3090
+ };
3091
+
3092
+
3093
+ /**
3094
+ * Clears the list making it empty but non-null.
3095
+ * @return {!proto.user.UsersResponse} returns this
3096
+ */
3097
+ proto.user.UsersResponse.prototype.clearItemsList = function() {
3098
+ return this.setItemsList([]);
3099
+ };
3100
+
3101
+
3102
+ /**
3103
+ * optional int32 total_pages = 2;
3104
+ * @return {number}
3105
+ */
3106
+ proto.user.UsersResponse.prototype.getTotalPages = function() {
3107
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
3108
+ };
3109
+
3110
+
3111
+ /**
3112
+ * @param {number} value
3113
+ * @return {!proto.user.UsersResponse} returns this
3114
+ */
3115
+ proto.user.UsersResponse.prototype.setTotalPages = function(value) {
3116
+ return jspb.Message.setField(this, 2, value);
3117
+ };
3118
+
3119
+
3120
+ /**
3121
+ * Clears the field making it undefined.
3122
+ * @return {!proto.user.UsersResponse} returns this
3123
+ */
3124
+ proto.user.UsersResponse.prototype.clearTotalPages = function() {
3125
+ return jspb.Message.setField(this, 2, undefined);
3126
+ };
3127
+
3128
+
3129
+ /**
3130
+ * Returns whether this field is set.
3131
+ * @return {boolean}
3132
+ */
3133
+ proto.user.UsersResponse.prototype.hasTotalPages = function() {
3134
+ return jspb.Message.getField(this, 2) != null;
3135
+ };
3136
+
3137
+
3138
+ /**
3139
+ * optional int32 total_items = 3;
3140
+ * @return {number}
3141
+ */
3142
+ proto.user.UsersResponse.prototype.getTotalItems = function() {
3143
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
3144
+ };
3145
+
3146
+
3147
+ /**
3148
+ * @param {number} value
3149
+ * @return {!proto.user.UsersResponse} returns this
3150
+ */
3151
+ proto.user.UsersResponse.prototype.setTotalItems = function(value) {
3152
+ return jspb.Message.setField(this, 3, value);
3153
+ };
3154
+
3155
+
3156
+ /**
3157
+ * Clears the field making it undefined.
3158
+ * @return {!proto.user.UsersResponse} returns this
3159
+ */
3160
+ proto.user.UsersResponse.prototype.clearTotalItems = function() {
3161
+ return jspb.Message.setField(this, 3, undefined);
3162
+ };
3163
+
3164
+
3165
+ /**
3166
+ * Returns whether this field is set.
3167
+ * @return {boolean}
3168
+ */
3169
+ proto.user.UsersResponse.prototype.hasTotalItems = function() {
3170
+ return jspb.Message.getField(this, 3) != null;
3171
+ };
3172
+
3173
+
3174
+
2617
3175
 
2618
3176
 
2619
3177
  if (jspb.Message.GENERATE_TO_OBJECT) {