protobuf-platform 1.0.58 → 1.0.60

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/game/game.proto CHANGED
@@ -23,6 +23,8 @@ service Game {
23
23
  rpc updateSingleTag(stream TagRequest) returns (TagResponse);
24
24
  rpc deleteSingleTag(GetTagRequest) returns (TagStatusResponse);
25
25
  rpc readListTags(PaginationRequest) returns (TagItemsResponse);
26
+ //Games
27
+ rpc parseGames(ParseGamesRequest) returns (ParseGamesResponse);
26
28
  }
27
29
 
28
30
  message PingRequest { string ping = 1; }
@@ -154,4 +156,8 @@ message TagItemsResponse {
154
156
  }
155
157
  message TagStatusResponse {
156
158
  string status = 1;
157
- }
159
+ }
160
+
161
+ //Games
162
+ message ParseGamesRequest { string vendor = 1; }
163
+ message ParseGamesResponse { string data = 1; }
@@ -147,6 +147,28 @@ function deserialize_game_PaginationRequest(buffer_arg) {
147
147
  return game_pb.PaginationRequest.deserializeBinary(new Uint8Array(buffer_arg));
148
148
  }
149
149
 
150
+ function serialize_game_ParseGamesRequest(arg) {
151
+ if (!(arg instanceof game_pb.ParseGamesRequest)) {
152
+ throw new Error('Expected argument of type game.ParseGamesRequest');
153
+ }
154
+ return Buffer.from(arg.serializeBinary());
155
+ }
156
+
157
+ function deserialize_game_ParseGamesRequest(buffer_arg) {
158
+ return game_pb.ParseGamesRequest.deserializeBinary(new Uint8Array(buffer_arg));
159
+ }
160
+
161
+ function serialize_game_ParseGamesResponse(arg) {
162
+ if (!(arg instanceof game_pb.ParseGamesResponse)) {
163
+ throw new Error('Expected argument of type game.ParseGamesResponse');
164
+ }
165
+ return Buffer.from(arg.serializeBinary());
166
+ }
167
+
168
+ function deserialize_game_ParseGamesResponse(buffer_arg) {
169
+ return game_pb.ParseGamesResponse.deserializeBinary(new Uint8Array(buffer_arg));
170
+ }
171
+
150
172
  function serialize_game_PingRequest(arg) {
151
173
  if (!(arg instanceof game_pb.PingRequest)) {
152
174
  throw new Error('Expected argument of type game.PingRequest');
@@ -405,6 +427,18 @@ createSingleTag: {
405
427
  responseSerialize: serialize_game_TagItemsResponse,
406
428
  responseDeserialize: deserialize_game_TagItemsResponse,
407
429
  },
430
+ // Games
431
+ parseGames: {
432
+ path: '/game.Game/parseGames',
433
+ requestStream: false,
434
+ responseStream: false,
435
+ requestType: game_pb.ParseGamesRequest,
436
+ responseType: game_pb.ParseGamesResponse,
437
+ requestSerialize: serialize_game_ParseGamesRequest,
438
+ requestDeserialize: deserialize_game_ParseGamesRequest,
439
+ responseSerialize: serialize_game_ParseGamesResponse,
440
+ responseDeserialize: deserialize_game_ParseGamesResponse,
441
+ },
408
442
  };
409
443
 
410
444
  exports.GameClient = grpc.makeGenericClientConstructor(GameService);
package/game/game_pb.js CHANGED
@@ -41,6 +41,8 @@ goog.exportSymbol('proto.game.GetCollectionRequest', null, global);
41
41
  goog.exportSymbol('proto.game.GetFileRequest', null, global);
42
42
  goog.exportSymbol('proto.game.GetTagRequest', null, global);
43
43
  goog.exportSymbol('proto.game.PaginationRequest', null, global);
44
+ goog.exportSymbol('proto.game.ParseGamesRequest', null, global);
45
+ goog.exportSymbol('proto.game.ParseGamesResponse', null, global);
44
46
  goog.exportSymbol('proto.game.PingRequest', null, global);
45
47
  goog.exportSymbol('proto.game.PongResponse', null, global);
46
48
  goog.exportSymbol('proto.game.TagItem', null, global);
@@ -596,6 +598,48 @@ if (goog.DEBUG && !COMPILED) {
596
598
  */
597
599
  proto.game.TagStatusResponse.displayName = 'proto.game.TagStatusResponse';
598
600
  }
601
+ /**
602
+ * Generated by JsPbCodeGenerator.
603
+ * @param {Array=} opt_data Optional initial data array, typically from a
604
+ * server response, or constructed directly in Javascript. The array is used
605
+ * in place and becomes part of the constructed object. It is not cloned.
606
+ * If no data is provided, the constructed object will be empty, but still
607
+ * valid.
608
+ * @extends {jspb.Message}
609
+ * @constructor
610
+ */
611
+ proto.game.ParseGamesRequest = function(opt_data) {
612
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
613
+ };
614
+ goog.inherits(proto.game.ParseGamesRequest, jspb.Message);
615
+ if (goog.DEBUG && !COMPILED) {
616
+ /**
617
+ * @public
618
+ * @override
619
+ */
620
+ proto.game.ParseGamesRequest.displayName = 'proto.game.ParseGamesRequest';
621
+ }
622
+ /**
623
+ * Generated by JsPbCodeGenerator.
624
+ * @param {Array=} opt_data Optional initial data array, typically from a
625
+ * server response, or constructed directly in Javascript. The array is used
626
+ * in place and becomes part of the constructed object. It is not cloned.
627
+ * If no data is provided, the constructed object will be empty, but still
628
+ * valid.
629
+ * @extends {jspb.Message}
630
+ * @constructor
631
+ */
632
+ proto.game.ParseGamesResponse = function(opt_data) {
633
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
634
+ };
635
+ goog.inherits(proto.game.ParseGamesResponse, jspb.Message);
636
+ if (goog.DEBUG && !COMPILED) {
637
+ /**
638
+ * @public
639
+ * @override
640
+ */
641
+ proto.game.ParseGamesResponse.displayName = 'proto.game.ParseGamesResponse';
642
+ }
599
643
 
600
644
 
601
645
 
@@ -6586,4 +6630,264 @@ proto.game.TagStatusResponse.prototype.setStatus = function(value) {
6586
6630
  };
6587
6631
 
6588
6632
 
6633
+
6634
+
6635
+
6636
+ if (jspb.Message.GENERATE_TO_OBJECT) {
6637
+ /**
6638
+ * Creates an object representation of this proto.
6639
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
6640
+ * Optional fields that are not set will be set to undefined.
6641
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
6642
+ * For the list of reserved names please see:
6643
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
6644
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
6645
+ * JSPB instance for transitional soy proto support:
6646
+ * http://goto/soy-param-migration
6647
+ * @return {!Object}
6648
+ */
6649
+ proto.game.ParseGamesRequest.prototype.toObject = function(opt_includeInstance) {
6650
+ return proto.game.ParseGamesRequest.toObject(opt_includeInstance, this);
6651
+ };
6652
+
6653
+
6654
+ /**
6655
+ * Static version of the {@see toObject} method.
6656
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
6657
+ * the JSPB instance for transitional soy proto support:
6658
+ * http://goto/soy-param-migration
6659
+ * @param {!proto.game.ParseGamesRequest} msg The msg instance to transform.
6660
+ * @return {!Object}
6661
+ * @suppress {unusedLocalVariables} f is only used for nested messages
6662
+ */
6663
+ proto.game.ParseGamesRequest.toObject = function(includeInstance, msg) {
6664
+ var f, obj = {
6665
+ vendor: jspb.Message.getFieldWithDefault(msg, 1, "")
6666
+ };
6667
+
6668
+ if (includeInstance) {
6669
+ obj.$jspbMessageInstance = msg;
6670
+ }
6671
+ return obj;
6672
+ };
6673
+ }
6674
+
6675
+
6676
+ /**
6677
+ * Deserializes binary data (in protobuf wire format).
6678
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
6679
+ * @return {!proto.game.ParseGamesRequest}
6680
+ */
6681
+ proto.game.ParseGamesRequest.deserializeBinary = function(bytes) {
6682
+ var reader = new jspb.BinaryReader(bytes);
6683
+ var msg = new proto.game.ParseGamesRequest;
6684
+ return proto.game.ParseGamesRequest.deserializeBinaryFromReader(msg, reader);
6685
+ };
6686
+
6687
+
6688
+ /**
6689
+ * Deserializes binary data (in protobuf wire format) from the
6690
+ * given reader into the given message object.
6691
+ * @param {!proto.game.ParseGamesRequest} msg The message object to deserialize into.
6692
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
6693
+ * @return {!proto.game.ParseGamesRequest}
6694
+ */
6695
+ proto.game.ParseGamesRequest.deserializeBinaryFromReader = function(msg, reader) {
6696
+ while (reader.nextField()) {
6697
+ if (reader.isEndGroup()) {
6698
+ break;
6699
+ }
6700
+ var field = reader.getFieldNumber();
6701
+ switch (field) {
6702
+ case 1:
6703
+ var value = /** @type {string} */ (reader.readString());
6704
+ msg.setVendor(value);
6705
+ break;
6706
+ default:
6707
+ reader.skipField();
6708
+ break;
6709
+ }
6710
+ }
6711
+ return msg;
6712
+ };
6713
+
6714
+
6715
+ /**
6716
+ * Serializes the message to binary data (in protobuf wire format).
6717
+ * @return {!Uint8Array}
6718
+ */
6719
+ proto.game.ParseGamesRequest.prototype.serializeBinary = function() {
6720
+ var writer = new jspb.BinaryWriter();
6721
+ proto.game.ParseGamesRequest.serializeBinaryToWriter(this, writer);
6722
+ return writer.getResultBuffer();
6723
+ };
6724
+
6725
+
6726
+ /**
6727
+ * Serializes the given message to binary data (in protobuf wire
6728
+ * format), writing to the given BinaryWriter.
6729
+ * @param {!proto.game.ParseGamesRequest} message
6730
+ * @param {!jspb.BinaryWriter} writer
6731
+ * @suppress {unusedLocalVariables} f is only used for nested messages
6732
+ */
6733
+ proto.game.ParseGamesRequest.serializeBinaryToWriter = function(message, writer) {
6734
+ var f = undefined;
6735
+ f = message.getVendor();
6736
+ if (f.length > 0) {
6737
+ writer.writeString(
6738
+ 1,
6739
+ f
6740
+ );
6741
+ }
6742
+ };
6743
+
6744
+
6745
+ /**
6746
+ * optional string vendor = 1;
6747
+ * @return {string}
6748
+ */
6749
+ proto.game.ParseGamesRequest.prototype.getVendor = function() {
6750
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
6751
+ };
6752
+
6753
+
6754
+ /**
6755
+ * @param {string} value
6756
+ * @return {!proto.game.ParseGamesRequest} returns this
6757
+ */
6758
+ proto.game.ParseGamesRequest.prototype.setVendor = function(value) {
6759
+ return jspb.Message.setProto3StringField(this, 1, value);
6760
+ };
6761
+
6762
+
6763
+
6764
+
6765
+
6766
+ if (jspb.Message.GENERATE_TO_OBJECT) {
6767
+ /**
6768
+ * Creates an object representation of this proto.
6769
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
6770
+ * Optional fields that are not set will be set to undefined.
6771
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
6772
+ * For the list of reserved names please see:
6773
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
6774
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
6775
+ * JSPB instance for transitional soy proto support:
6776
+ * http://goto/soy-param-migration
6777
+ * @return {!Object}
6778
+ */
6779
+ proto.game.ParseGamesResponse.prototype.toObject = function(opt_includeInstance) {
6780
+ return proto.game.ParseGamesResponse.toObject(opt_includeInstance, this);
6781
+ };
6782
+
6783
+
6784
+ /**
6785
+ * Static version of the {@see toObject} method.
6786
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
6787
+ * the JSPB instance for transitional soy proto support:
6788
+ * http://goto/soy-param-migration
6789
+ * @param {!proto.game.ParseGamesResponse} msg The msg instance to transform.
6790
+ * @return {!Object}
6791
+ * @suppress {unusedLocalVariables} f is only used for nested messages
6792
+ */
6793
+ proto.game.ParseGamesResponse.toObject = function(includeInstance, msg) {
6794
+ var f, obj = {
6795
+ data: jspb.Message.getFieldWithDefault(msg, 1, "")
6796
+ };
6797
+
6798
+ if (includeInstance) {
6799
+ obj.$jspbMessageInstance = msg;
6800
+ }
6801
+ return obj;
6802
+ };
6803
+ }
6804
+
6805
+
6806
+ /**
6807
+ * Deserializes binary data (in protobuf wire format).
6808
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
6809
+ * @return {!proto.game.ParseGamesResponse}
6810
+ */
6811
+ proto.game.ParseGamesResponse.deserializeBinary = function(bytes) {
6812
+ var reader = new jspb.BinaryReader(bytes);
6813
+ var msg = new proto.game.ParseGamesResponse;
6814
+ return proto.game.ParseGamesResponse.deserializeBinaryFromReader(msg, reader);
6815
+ };
6816
+
6817
+
6818
+ /**
6819
+ * Deserializes binary data (in protobuf wire format) from the
6820
+ * given reader into the given message object.
6821
+ * @param {!proto.game.ParseGamesResponse} msg The message object to deserialize into.
6822
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
6823
+ * @return {!proto.game.ParseGamesResponse}
6824
+ */
6825
+ proto.game.ParseGamesResponse.deserializeBinaryFromReader = function(msg, reader) {
6826
+ while (reader.nextField()) {
6827
+ if (reader.isEndGroup()) {
6828
+ break;
6829
+ }
6830
+ var field = reader.getFieldNumber();
6831
+ switch (field) {
6832
+ case 1:
6833
+ var value = /** @type {string} */ (reader.readString());
6834
+ msg.setData(value);
6835
+ break;
6836
+ default:
6837
+ reader.skipField();
6838
+ break;
6839
+ }
6840
+ }
6841
+ return msg;
6842
+ };
6843
+
6844
+
6845
+ /**
6846
+ * Serializes the message to binary data (in protobuf wire format).
6847
+ * @return {!Uint8Array}
6848
+ */
6849
+ proto.game.ParseGamesResponse.prototype.serializeBinary = function() {
6850
+ var writer = new jspb.BinaryWriter();
6851
+ proto.game.ParseGamesResponse.serializeBinaryToWriter(this, writer);
6852
+ return writer.getResultBuffer();
6853
+ };
6854
+
6855
+
6856
+ /**
6857
+ * Serializes the given message to binary data (in protobuf wire
6858
+ * format), writing to the given BinaryWriter.
6859
+ * @param {!proto.game.ParseGamesResponse} message
6860
+ * @param {!jspb.BinaryWriter} writer
6861
+ * @suppress {unusedLocalVariables} f is only used for nested messages
6862
+ */
6863
+ proto.game.ParseGamesResponse.serializeBinaryToWriter = function(message, writer) {
6864
+ var f = undefined;
6865
+ f = message.getData();
6866
+ if (f.length > 0) {
6867
+ writer.writeString(
6868
+ 1,
6869
+ f
6870
+ );
6871
+ }
6872
+ };
6873
+
6874
+
6875
+ /**
6876
+ * optional string data = 1;
6877
+ * @return {string}
6878
+ */
6879
+ proto.game.ParseGamesResponse.prototype.getData = function() {
6880
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
6881
+ };
6882
+
6883
+
6884
+ /**
6885
+ * @param {string} value
6886
+ * @return {!proto.game.ParseGamesResponse} returns this
6887
+ */
6888
+ proto.game.ParseGamesResponse.prototype.setData = function(value) {
6889
+ return jspb.Message.setProto3StringField(this, 1, value);
6890
+ };
6891
+
6892
+
6589
6893
  goog.object.extend(exports, proto.game);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protobuf-platform",
3
- "version": "1.0.58",
3
+ "version": "1.0.60",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/user/user.proto CHANGED
@@ -11,6 +11,7 @@ service User {
11
11
  //Role and Permissions
12
12
  rpc addPermissionToUserRole(RolePermissionRequest) returns (RolePermissionStatusResponse);
13
13
  rpc rolesList(PaginationRequest) returns (RolesItemsResponse);
14
+ rpc getSingleRole(GetRoleRequest) returns (Role);
14
15
  }
15
16
 
16
17
  message PingRequest { string ping = 1; }
@@ -73,7 +74,9 @@ message Role {
73
74
  int32 id = 1;
74
75
  string title = 2;
75
76
  optional string description = 3;
77
+ optional string permissions = 4;
76
78
  }
79
+ message GetRoleRequest { int32 id = 1; }
77
80
  message RolesItemsResponse {
78
81
  repeated Role items = 1;
79
82
  int32 total_items = 2;
@@ -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_GetRoleRequest(arg) {
8
+ if (!(arg instanceof user_pb.GetRoleRequest)) {
9
+ throw new Error('Expected argument of type user.GetRoleRequest');
10
+ }
11
+ return Buffer.from(arg.serializeBinary());
12
+ }
13
+
14
+ function deserialize_user_GetRoleRequest(buffer_arg) {
15
+ return user_pb.GetRoleRequest.deserializeBinary(new Uint8Array(buffer_arg));
16
+ }
17
+
7
18
  function serialize_user_LoggedInResponse(arg) {
8
19
  if (!(arg instanceof user_pb.LoggedInResponse)) {
9
20
  throw new Error('Expected argument of type user.LoggedInResponse');
@@ -70,6 +81,17 @@ function deserialize_user_RegistrationRequest(buffer_arg) {
70
81
  return user_pb.RegistrationRequest.deserializeBinary(new Uint8Array(buffer_arg));
71
82
  }
72
83
 
84
+ function serialize_user_Role(arg) {
85
+ if (!(arg instanceof user_pb.Role)) {
86
+ throw new Error('Expected argument of type user.Role');
87
+ }
88
+ return Buffer.from(arg.serializeBinary());
89
+ }
90
+
91
+ function deserialize_user_Role(buffer_arg) {
92
+ return user_pb.Role.deserializeBinary(new Uint8Array(buffer_arg));
93
+ }
94
+
73
95
  function serialize_user_RolePermissionRequest(arg) {
74
96
  if (!(arg instanceof user_pb.RolePermissionRequest)) {
75
97
  throw new Error('Expected argument of type user.RolePermissionRequest');
@@ -195,6 +217,17 @@ addPermissionToUserRole: {
195
217
  responseSerialize: serialize_user_RolesItemsResponse,
196
218
  responseDeserialize: deserialize_user_RolesItemsResponse,
197
219
  },
220
+ getSingleRole: {
221
+ path: '/user.User/getSingleRole',
222
+ requestStream: false,
223
+ responseStream: false,
224
+ requestType: user_pb.GetRoleRequest,
225
+ responseType: user_pb.Role,
226
+ requestSerialize: serialize_user_GetRoleRequest,
227
+ requestDeserialize: deserialize_user_GetRoleRequest,
228
+ responseSerialize: serialize_user_Role,
229
+ responseDeserialize: deserialize_user_Role,
230
+ },
198
231
  };
199
232
 
200
233
  exports.UserClient = grpc.makeGenericClientConstructor(UserService);
package/user/user_pb.js CHANGED
@@ -21,6 +21,7 @@ var global = (function() {
21
21
  return Function('return this')();
22
22
  }.call(null));
23
23
 
24
+ goog.exportSymbol('proto.user.GetRoleRequest', null, global);
24
25
  goog.exportSymbol('proto.user.LoggedInResponse', null, global);
25
26
  goog.exportSymbol('proto.user.LoginRequest', null, global);
26
27
  goog.exportSymbol('proto.user.PaginationRequest', null, global);
@@ -264,6 +265,27 @@ if (goog.DEBUG && !COMPILED) {
264
265
  */
265
266
  proto.user.Role.displayName = 'proto.user.Role';
266
267
  }
268
+ /**
269
+ * Generated by JsPbCodeGenerator.
270
+ * @param {Array=} opt_data Optional initial data array, typically from a
271
+ * server response, or constructed directly in Javascript. The array is used
272
+ * in place and becomes part of the constructed object. It is not cloned.
273
+ * If no data is provided, the constructed object will be empty, but still
274
+ * valid.
275
+ * @extends {jspb.Message}
276
+ * @constructor
277
+ */
278
+ proto.user.GetRoleRequest = function(opt_data) {
279
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
280
+ };
281
+ goog.inherits(proto.user.GetRoleRequest, jspb.Message);
282
+ if (goog.DEBUG && !COMPILED) {
283
+ /**
284
+ * @public
285
+ * @override
286
+ */
287
+ proto.user.GetRoleRequest.displayName = 'proto.user.GetRoleRequest';
288
+ }
267
289
  /**
268
290
  * Generated by JsPbCodeGenerator.
269
291
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -2741,7 +2763,8 @@ proto.user.Role.toObject = function(includeInstance, msg) {
2741
2763
  var f, obj = {
2742
2764
  id: jspb.Message.getFieldWithDefault(msg, 1, 0),
2743
2765
  title: jspb.Message.getFieldWithDefault(msg, 2, ""),
2744
- description: jspb.Message.getFieldWithDefault(msg, 3, "")
2766
+ description: jspb.Message.getFieldWithDefault(msg, 3, ""),
2767
+ permissions: jspb.Message.getFieldWithDefault(msg, 4, "")
2745
2768
  };
2746
2769
 
2747
2770
  if (includeInstance) {
@@ -2790,6 +2813,10 @@ proto.user.Role.deserializeBinaryFromReader = function(msg, reader) {
2790
2813
  var value = /** @type {string} */ (reader.readString());
2791
2814
  msg.setDescription(value);
2792
2815
  break;
2816
+ case 4:
2817
+ var value = /** @type {string} */ (reader.readString());
2818
+ msg.setPermissions(value);
2819
+ break;
2793
2820
  default:
2794
2821
  reader.skipField();
2795
2822
  break;
@@ -2840,6 +2867,13 @@ proto.user.Role.serializeBinaryToWriter = function(message, writer) {
2840
2867
  f
2841
2868
  );
2842
2869
  }
2870
+ f = /** @type {string} */ (jspb.Message.getField(message, 4));
2871
+ if (f != null) {
2872
+ writer.writeString(
2873
+ 4,
2874
+ f
2875
+ );
2876
+ }
2843
2877
  };
2844
2878
 
2845
2879
 
@@ -2915,6 +2949,172 @@ proto.user.Role.prototype.hasDescription = function() {
2915
2949
  };
2916
2950
 
2917
2951
 
2952
+ /**
2953
+ * optional string permissions = 4;
2954
+ * @return {string}
2955
+ */
2956
+ proto.user.Role.prototype.getPermissions = function() {
2957
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
2958
+ };
2959
+
2960
+
2961
+ /**
2962
+ * @param {string} value
2963
+ * @return {!proto.user.Role} returns this
2964
+ */
2965
+ proto.user.Role.prototype.setPermissions = function(value) {
2966
+ return jspb.Message.setField(this, 4, value);
2967
+ };
2968
+
2969
+
2970
+ /**
2971
+ * Clears the field making it undefined.
2972
+ * @return {!proto.user.Role} returns this
2973
+ */
2974
+ proto.user.Role.prototype.clearPermissions = function() {
2975
+ return jspb.Message.setField(this, 4, undefined);
2976
+ };
2977
+
2978
+
2979
+ /**
2980
+ * Returns whether this field is set.
2981
+ * @return {boolean}
2982
+ */
2983
+ proto.user.Role.prototype.hasPermissions = function() {
2984
+ return jspb.Message.getField(this, 4) != null;
2985
+ };
2986
+
2987
+
2988
+
2989
+
2990
+
2991
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2992
+ /**
2993
+ * Creates an object representation of this proto.
2994
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2995
+ * Optional fields that are not set will be set to undefined.
2996
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2997
+ * For the list of reserved names please see:
2998
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2999
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3000
+ * JSPB instance for transitional soy proto support:
3001
+ * http://goto/soy-param-migration
3002
+ * @return {!Object}
3003
+ */
3004
+ proto.user.GetRoleRequest.prototype.toObject = function(opt_includeInstance) {
3005
+ return proto.user.GetRoleRequest.toObject(opt_includeInstance, this);
3006
+ };
3007
+
3008
+
3009
+ /**
3010
+ * Static version of the {@see toObject} method.
3011
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3012
+ * the JSPB instance for transitional soy proto support:
3013
+ * http://goto/soy-param-migration
3014
+ * @param {!proto.user.GetRoleRequest} msg The msg instance to transform.
3015
+ * @return {!Object}
3016
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3017
+ */
3018
+ proto.user.GetRoleRequest.toObject = function(includeInstance, msg) {
3019
+ var f, obj = {
3020
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0)
3021
+ };
3022
+
3023
+ if (includeInstance) {
3024
+ obj.$jspbMessageInstance = msg;
3025
+ }
3026
+ return obj;
3027
+ };
3028
+ }
3029
+
3030
+
3031
+ /**
3032
+ * Deserializes binary data (in protobuf wire format).
3033
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
3034
+ * @return {!proto.user.GetRoleRequest}
3035
+ */
3036
+ proto.user.GetRoleRequest.deserializeBinary = function(bytes) {
3037
+ var reader = new jspb.BinaryReader(bytes);
3038
+ var msg = new proto.user.GetRoleRequest;
3039
+ return proto.user.GetRoleRequest.deserializeBinaryFromReader(msg, reader);
3040
+ };
3041
+
3042
+
3043
+ /**
3044
+ * Deserializes binary data (in protobuf wire format) from the
3045
+ * given reader into the given message object.
3046
+ * @param {!proto.user.GetRoleRequest} msg The message object to deserialize into.
3047
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3048
+ * @return {!proto.user.GetRoleRequest}
3049
+ */
3050
+ proto.user.GetRoleRequest.deserializeBinaryFromReader = function(msg, reader) {
3051
+ while (reader.nextField()) {
3052
+ if (reader.isEndGroup()) {
3053
+ break;
3054
+ }
3055
+ var field = reader.getFieldNumber();
3056
+ switch (field) {
3057
+ case 1:
3058
+ var value = /** @type {number} */ (reader.readInt32());
3059
+ msg.setId(value);
3060
+ break;
3061
+ default:
3062
+ reader.skipField();
3063
+ break;
3064
+ }
3065
+ }
3066
+ return msg;
3067
+ };
3068
+
3069
+
3070
+ /**
3071
+ * Serializes the message to binary data (in protobuf wire format).
3072
+ * @return {!Uint8Array}
3073
+ */
3074
+ proto.user.GetRoleRequest.prototype.serializeBinary = function() {
3075
+ var writer = new jspb.BinaryWriter();
3076
+ proto.user.GetRoleRequest.serializeBinaryToWriter(this, writer);
3077
+ return writer.getResultBuffer();
3078
+ };
3079
+
3080
+
3081
+ /**
3082
+ * Serializes the given message to binary data (in protobuf wire
3083
+ * format), writing to the given BinaryWriter.
3084
+ * @param {!proto.user.GetRoleRequest} message
3085
+ * @param {!jspb.BinaryWriter} writer
3086
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3087
+ */
3088
+ proto.user.GetRoleRequest.serializeBinaryToWriter = function(message, writer) {
3089
+ var f = undefined;
3090
+ f = message.getId();
3091
+ if (f !== 0) {
3092
+ writer.writeInt32(
3093
+ 1,
3094
+ f
3095
+ );
3096
+ }
3097
+ };
3098
+
3099
+
3100
+ /**
3101
+ * optional int32 id = 1;
3102
+ * @return {number}
3103
+ */
3104
+ proto.user.GetRoleRequest.prototype.getId = function() {
3105
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
3106
+ };
3107
+
3108
+
3109
+ /**
3110
+ * @param {number} value
3111
+ * @return {!proto.user.GetRoleRequest} returns this
3112
+ */
3113
+ proto.user.GetRoleRequest.prototype.setId = function(value) {
3114
+ return jspb.Message.setProto3IntField(this, 1, value);
3115
+ };
3116
+
3117
+
2918
3118
 
2919
3119
  /**
2920
3120
  * List of repeated fields within this message type.