protobuf-platform 1.2.491 → 1.2.495

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.
@@ -107,6 +107,9 @@ message CreateWithdrawalTransferResponse {
107
107
  string tx_signature = 4;
108
108
  string network_code = 5;
109
109
  string asset_code = 6;
110
+ bool reconciliation_required = 7;
111
+ bool already_executed = 8;
112
+ optional string broadcast_at = 9;
110
113
  }
111
114
 
112
115
  message ReadWithdrawalTransferRequest {
@@ -127,4 +130,6 @@ message ReadWithdrawalTransferResponse {
127
130
  string amount_decimal = 9;
128
131
  string error_code = 10;
129
132
  string error_message = 11;
133
+ bool reconciliation_required = 12;
134
+ optional string broadcast_at = 13;
130
135
  }
@@ -3332,7 +3332,10 @@ proto.crypto.CreateWithdrawalTransferResponse.toObject = function(includeInstanc
3332
3332
  status: jspb.Message.getFieldWithDefault(msg, 3, ""),
3333
3333
  txSignature: jspb.Message.getFieldWithDefault(msg, 4, ""),
3334
3334
  networkCode: jspb.Message.getFieldWithDefault(msg, 5, ""),
3335
- assetCode: jspb.Message.getFieldWithDefault(msg, 6, "")
3335
+ assetCode: jspb.Message.getFieldWithDefault(msg, 6, ""),
3336
+ reconciliationRequired: jspb.Message.getBooleanFieldWithDefault(msg, 7, false),
3337
+ alreadyExecuted: jspb.Message.getBooleanFieldWithDefault(msg, 8, false),
3338
+ broadcastAt: jspb.Message.getFieldWithDefault(msg, 9, "")
3336
3339
  };
3337
3340
 
3338
3341
  if (includeInstance) {
@@ -3393,6 +3396,18 @@ proto.crypto.CreateWithdrawalTransferResponse.deserializeBinaryFromReader = func
3393
3396
  var value = /** @type {string} */ (reader.readString());
3394
3397
  msg.setAssetCode(value);
3395
3398
  break;
3399
+ case 7:
3400
+ var value = /** @type {boolean} */ (reader.readBool());
3401
+ msg.setReconciliationRequired(value);
3402
+ break;
3403
+ case 8:
3404
+ var value = /** @type {boolean} */ (reader.readBool());
3405
+ msg.setAlreadyExecuted(value);
3406
+ break;
3407
+ case 9:
3408
+ var value = /** @type {string} */ (reader.readString());
3409
+ msg.setBroadcastAt(value);
3410
+ break;
3396
3411
  default:
3397
3412
  reader.skipField();
3398
3413
  break;
@@ -3464,6 +3479,27 @@ proto.crypto.CreateWithdrawalTransferResponse.serializeBinaryToWriter = function
3464
3479
  f
3465
3480
  );
3466
3481
  }
3482
+ f = message.getReconciliationRequired();
3483
+ if (f) {
3484
+ writer.writeBool(
3485
+ 7,
3486
+ f
3487
+ );
3488
+ }
3489
+ f = message.getAlreadyExecuted();
3490
+ if (f) {
3491
+ writer.writeBool(
3492
+ 8,
3493
+ f
3494
+ );
3495
+ }
3496
+ f = /** @type {string} */ (jspb.Message.getField(message, 9));
3497
+ if (f != null) {
3498
+ writer.writeString(
3499
+ 9,
3500
+ f
3501
+ );
3502
+ }
3467
3503
  };
3468
3504
 
3469
3505
 
@@ -3575,6 +3611,78 @@ proto.crypto.CreateWithdrawalTransferResponse.prototype.setAssetCode = function(
3575
3611
  };
3576
3612
 
3577
3613
 
3614
+ /**
3615
+ * optional bool reconciliation_required = 7;
3616
+ * @return {boolean}
3617
+ */
3618
+ proto.crypto.CreateWithdrawalTransferResponse.prototype.getReconciliationRequired = function() {
3619
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false));
3620
+ };
3621
+
3622
+
3623
+ /**
3624
+ * @param {boolean} value
3625
+ * @return {!proto.crypto.CreateWithdrawalTransferResponse} returns this
3626
+ */
3627
+ proto.crypto.CreateWithdrawalTransferResponse.prototype.setReconciliationRequired = function(value) {
3628
+ return jspb.Message.setProto3BooleanField(this, 7, value);
3629
+ };
3630
+
3631
+
3632
+ /**
3633
+ * optional bool already_executed = 8;
3634
+ * @return {boolean}
3635
+ */
3636
+ proto.crypto.CreateWithdrawalTransferResponse.prototype.getAlreadyExecuted = function() {
3637
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false));
3638
+ };
3639
+
3640
+
3641
+ /**
3642
+ * @param {boolean} value
3643
+ * @return {!proto.crypto.CreateWithdrawalTransferResponse} returns this
3644
+ */
3645
+ proto.crypto.CreateWithdrawalTransferResponse.prototype.setAlreadyExecuted = function(value) {
3646
+ return jspb.Message.setProto3BooleanField(this, 8, value);
3647
+ };
3648
+
3649
+
3650
+ /**
3651
+ * optional string broadcast_at = 9;
3652
+ * @return {string}
3653
+ */
3654
+ proto.crypto.CreateWithdrawalTransferResponse.prototype.getBroadcastAt = function() {
3655
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, ""));
3656
+ };
3657
+
3658
+
3659
+ /**
3660
+ * @param {string} value
3661
+ * @return {!proto.crypto.CreateWithdrawalTransferResponse} returns this
3662
+ */
3663
+ proto.crypto.CreateWithdrawalTransferResponse.prototype.setBroadcastAt = function(value) {
3664
+ return jspb.Message.setField(this, 9, value);
3665
+ };
3666
+
3667
+
3668
+ /**
3669
+ * Clears the field making it undefined.
3670
+ * @return {!proto.crypto.CreateWithdrawalTransferResponse} returns this
3671
+ */
3672
+ proto.crypto.CreateWithdrawalTransferResponse.prototype.clearBroadcastAt = function() {
3673
+ return jspb.Message.setField(this, 9, undefined);
3674
+ };
3675
+
3676
+
3677
+ /**
3678
+ * Returns whether this field is set.
3679
+ * @return {boolean}
3680
+ */
3681
+ proto.crypto.CreateWithdrawalTransferResponse.prototype.hasBroadcastAt = function() {
3682
+ return jspb.Message.getField(this, 9) != null;
3683
+ };
3684
+
3685
+
3578
3686
 
3579
3687
 
3580
3688
 
@@ -3807,7 +3915,9 @@ proto.crypto.ReadWithdrawalTransferResponse.toObject = function(includeInstance,
3807
3915
  amountRaw: jspb.Message.getFieldWithDefault(msg, 8, ""),
3808
3916
  amountDecimal: jspb.Message.getFieldWithDefault(msg, 9, ""),
3809
3917
  errorCode: jspb.Message.getFieldWithDefault(msg, 10, ""),
3810
- errorMessage: jspb.Message.getFieldWithDefault(msg, 11, "")
3918
+ errorMessage: jspb.Message.getFieldWithDefault(msg, 11, ""),
3919
+ reconciliationRequired: jspb.Message.getBooleanFieldWithDefault(msg, 12, false),
3920
+ broadcastAt: jspb.Message.getFieldWithDefault(msg, 13, "")
3811
3921
  };
3812
3922
 
3813
3923
  if (includeInstance) {
@@ -3888,6 +3998,14 @@ proto.crypto.ReadWithdrawalTransferResponse.deserializeBinaryFromReader = functi
3888
3998
  var value = /** @type {string} */ (reader.readString());
3889
3999
  msg.setErrorMessage(value);
3890
4000
  break;
4001
+ case 12:
4002
+ var value = /** @type {boolean} */ (reader.readBool());
4003
+ msg.setReconciliationRequired(value);
4004
+ break;
4005
+ case 13:
4006
+ var value = /** @type {string} */ (reader.readString());
4007
+ msg.setBroadcastAt(value);
4008
+ break;
3891
4009
  default:
3892
4010
  reader.skipField();
3893
4011
  break;
@@ -3994,6 +4112,20 @@ proto.crypto.ReadWithdrawalTransferResponse.serializeBinaryToWriter = function(m
3994
4112
  f
3995
4113
  );
3996
4114
  }
4115
+ f = message.getReconciliationRequired();
4116
+ if (f) {
4117
+ writer.writeBool(
4118
+ 12,
4119
+ f
4120
+ );
4121
+ }
4122
+ f = /** @type {string} */ (jspb.Message.getField(message, 13));
4123
+ if (f != null) {
4124
+ writer.writeString(
4125
+ 13,
4126
+ f
4127
+ );
4128
+ }
3997
4129
  };
3998
4130
 
3999
4131
 
@@ -4195,4 +4327,58 @@ proto.crypto.ReadWithdrawalTransferResponse.prototype.setErrorMessage = function
4195
4327
  };
4196
4328
 
4197
4329
 
4330
+ /**
4331
+ * optional bool reconciliation_required = 12;
4332
+ * @return {boolean}
4333
+ */
4334
+ proto.crypto.ReadWithdrawalTransferResponse.prototype.getReconciliationRequired = function() {
4335
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 12, false));
4336
+ };
4337
+
4338
+
4339
+ /**
4340
+ * @param {boolean} value
4341
+ * @return {!proto.crypto.ReadWithdrawalTransferResponse} returns this
4342
+ */
4343
+ proto.crypto.ReadWithdrawalTransferResponse.prototype.setReconciliationRequired = function(value) {
4344
+ return jspb.Message.setProto3BooleanField(this, 12, value);
4345
+ };
4346
+
4347
+
4348
+ /**
4349
+ * optional string broadcast_at = 13;
4350
+ * @return {string}
4351
+ */
4352
+ proto.crypto.ReadWithdrawalTransferResponse.prototype.getBroadcastAt = function() {
4353
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, ""));
4354
+ };
4355
+
4356
+
4357
+ /**
4358
+ * @param {string} value
4359
+ * @return {!proto.crypto.ReadWithdrawalTransferResponse} returns this
4360
+ */
4361
+ proto.crypto.ReadWithdrawalTransferResponse.prototype.setBroadcastAt = function(value) {
4362
+ return jspb.Message.setField(this, 13, value);
4363
+ };
4364
+
4365
+
4366
+ /**
4367
+ * Clears the field making it undefined.
4368
+ * @return {!proto.crypto.ReadWithdrawalTransferResponse} returns this
4369
+ */
4370
+ proto.crypto.ReadWithdrawalTransferResponse.prototype.clearBroadcastAt = function() {
4371
+ return jspb.Message.setField(this, 13, undefined);
4372
+ };
4373
+
4374
+
4375
+ /**
4376
+ * Returns whether this field is set.
4377
+ * @return {boolean}
4378
+ */
4379
+ proto.crypto.ReadWithdrawalTransferResponse.prototype.hasBroadcastAt = function() {
4380
+ return jspb.Message.getField(this, 13) != null;
4381
+ };
4382
+
4383
+
4198
4384
  goog.object.extend(exports, proto.crypto);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protobuf-platform",
3
- "version": "1.2.491",
3
+ "version": "1.2.495",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/user/user.proto CHANGED
@@ -29,6 +29,8 @@ service User {
29
29
  rpc addPermissionToUserRole(RolePermissionRequest) returns (RolePermissionStatusResponse);
30
30
  rpc rolesList(PaginationRequest) returns (RolesItemsResponse);
31
31
  rpc getSingleRole(GetRoleRequest) returns (Role);
32
+ rpc createSingleRole(CreateRoleRequest) returns (Role);
33
+ rpc updateSingleRole(UpdateRoleRequest) returns (Role);
32
34
  //CRUD
33
35
  rpc readListUsers(PaginationRequest) returns (UsersResponse);
34
36
  rpc updateSingleUser(UserRequest) returns (UserDataResponse);
@@ -691,6 +693,15 @@ message Role {
691
693
  optional string permissions = 4;
692
694
  }
693
695
  message GetRoleRequest { int32 id = 1; }
696
+ message CreateRoleRequest {
697
+ string title = 1;
698
+ optional string description = 2;
699
+ }
700
+ message UpdateRoleRequest {
701
+ int32 id = 1;
702
+ optional string title = 2;
703
+ optional string description = 3;
704
+ }
694
705
  message RolesItemsResponse {
695
706
  repeated Role items = 1;
696
707
  int32 total_items = 2;
@@ -246,6 +246,17 @@ function deserialize_user_CreatePresetResponse(buffer_arg) {
246
246
  return user_pb.CreatePresetResponse.deserializeBinary(new Uint8Array(buffer_arg));
247
247
  }
248
248
 
249
+ function serialize_user_CreateRoleRequest(arg) {
250
+ if (!(arg instanceof user_pb.CreateRoleRequest)) {
251
+ throw new Error('Expected argument of type user.CreateRoleRequest');
252
+ }
253
+ return Buffer.from(arg.serializeBinary());
254
+ }
255
+
256
+ function deserialize_user_CreateRoleRequest(buffer_arg) {
257
+ return user_pb.CreateRoleRequest.deserializeBinary(new Uint8Array(buffer_arg));
258
+ }
259
+
249
260
  function serialize_user_CreateUserKycDocumentMetadataRequest(arg) {
250
261
  if (!(arg instanceof user_pb.CreateUserKycDocumentMetadataRequest)) {
251
262
  throw new Error('Expected argument of type user.CreateUserKycDocumentMetadataRequest');
@@ -1401,6 +1412,17 @@ function deserialize_user_UpdateRiskPermissionMatrixRequest(buffer_arg) {
1401
1412
  return user_pb.UpdateRiskPermissionMatrixRequest.deserializeBinary(new Uint8Array(buffer_arg));
1402
1413
  }
1403
1414
 
1415
+ function serialize_user_UpdateRoleRequest(arg) {
1416
+ if (!(arg instanceof user_pb.UpdateRoleRequest)) {
1417
+ throw new Error('Expected argument of type user.UpdateRoleRequest');
1418
+ }
1419
+ return Buffer.from(arg.serializeBinary());
1420
+ }
1421
+
1422
+ function deserialize_user_UpdateRoleRequest(buffer_arg) {
1423
+ return user_pb.UpdateRoleRequest.deserializeBinary(new Uint8Array(buffer_arg));
1424
+ }
1425
+
1404
1426
  function serialize_user_UpdateUserKycDocumentReviewRequest(arg) {
1405
1427
  if (!(arg instanceof user_pb.UpdateUserKycDocumentReviewRequest)) {
1406
1428
  throw new Error('Expected argument of type user.UpdateUserKycDocumentReviewRequest');
@@ -2131,6 +2153,28 @@ addPermissionToUserRole: {
2131
2153
  responseSerialize: serialize_user_Role,
2132
2154
  responseDeserialize: deserialize_user_Role,
2133
2155
  },
2156
+ createSingleRole: {
2157
+ path: '/user.User/createSingleRole',
2158
+ requestStream: false,
2159
+ responseStream: false,
2160
+ requestType: user_pb.CreateRoleRequest,
2161
+ responseType: user_pb.Role,
2162
+ requestSerialize: serialize_user_CreateRoleRequest,
2163
+ requestDeserialize: deserialize_user_CreateRoleRequest,
2164
+ responseSerialize: serialize_user_Role,
2165
+ responseDeserialize: deserialize_user_Role,
2166
+ },
2167
+ updateSingleRole: {
2168
+ path: '/user.User/updateSingleRole',
2169
+ requestStream: false,
2170
+ responseStream: false,
2171
+ requestType: user_pb.UpdateRoleRequest,
2172
+ responseType: user_pb.Role,
2173
+ requestSerialize: serialize_user_UpdateRoleRequest,
2174
+ requestDeserialize: deserialize_user_UpdateRoleRequest,
2175
+ responseSerialize: serialize_user_Role,
2176
+ responseDeserialize: deserialize_user_Role,
2177
+ },
2134
2178
  // CRUD
2135
2179
  readListUsers: {
2136
2180
  path: '/user.User/readListUsers',
package/user/user_pb.js CHANGED
@@ -46,6 +46,7 @@ goog.exportSymbol('proto.user.CreateKycRequirementPresetRequest', null, global);
46
46
  goog.exportSymbol('proto.user.CreateKycRuleDefinitionRequest', null, global);
47
47
  goog.exportSymbol('proto.user.CreatePresetRequest', null, global);
48
48
  goog.exportSymbol('proto.user.CreatePresetResponse', null, global);
49
+ goog.exportSymbol('proto.user.CreateRoleRequest', null, global);
49
50
  goog.exportSymbol('proto.user.CreateUserKycDocumentMetadataRequest', null, global);
50
51
  goog.exportSymbol('proto.user.DashboardRequest', null, global);
51
52
  goog.exportSymbol('proto.user.DashboardResponse', null, global);
@@ -174,6 +175,7 @@ goog.exportSymbol('proto.user.UpdatePresetRequest', null, global);
174
175
  goog.exportSymbol('proto.user.UpdatePresetResponse', null, global);
175
176
  goog.exportSymbol('proto.user.UpdateRiskPermissionMatrixLimitRequest', null, global);
176
177
  goog.exportSymbol('proto.user.UpdateRiskPermissionMatrixRequest', null, global);
178
+ goog.exportSymbol('proto.user.UpdateRoleRequest', null, global);
177
179
  goog.exportSymbol('proto.user.UpdateUserKycDocumentReviewRequest', null, global);
178
180
  goog.exportSymbol('proto.user.UpdateUserKycProfileRequest', null, global);
179
181
  goog.exportSymbol('proto.user.UpdateUserManualRestrictionInBunchItem', null, global);
@@ -1317,6 +1319,48 @@ if (goog.DEBUG && !COMPILED) {
1317
1319
  */
1318
1320
  proto.user.GetRoleRequest.displayName = 'proto.user.GetRoleRequest';
1319
1321
  }
1322
+ /**
1323
+ * Generated by JsPbCodeGenerator.
1324
+ * @param {Array=} opt_data Optional initial data array, typically from a
1325
+ * server response, or constructed directly in Javascript. The array is used
1326
+ * in place and becomes part of the constructed object. It is not cloned.
1327
+ * If no data is provided, the constructed object will be empty, but still
1328
+ * valid.
1329
+ * @extends {jspb.Message}
1330
+ * @constructor
1331
+ */
1332
+ proto.user.CreateRoleRequest = function(opt_data) {
1333
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
1334
+ };
1335
+ goog.inherits(proto.user.CreateRoleRequest, jspb.Message);
1336
+ if (goog.DEBUG && !COMPILED) {
1337
+ /**
1338
+ * @public
1339
+ * @override
1340
+ */
1341
+ proto.user.CreateRoleRequest.displayName = 'proto.user.CreateRoleRequest';
1342
+ }
1343
+ /**
1344
+ * Generated by JsPbCodeGenerator.
1345
+ * @param {Array=} opt_data Optional initial data array, typically from a
1346
+ * server response, or constructed directly in Javascript. The array is used
1347
+ * in place and becomes part of the constructed object. It is not cloned.
1348
+ * If no data is provided, the constructed object will be empty, but still
1349
+ * valid.
1350
+ * @extends {jspb.Message}
1351
+ * @constructor
1352
+ */
1353
+ proto.user.UpdateRoleRequest = function(opt_data) {
1354
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
1355
+ };
1356
+ goog.inherits(proto.user.UpdateRoleRequest, jspb.Message);
1357
+ if (goog.DEBUG && !COMPILED) {
1358
+ /**
1359
+ * @public
1360
+ * @override
1361
+ */
1362
+ proto.user.UpdateRoleRequest.displayName = 'proto.user.UpdateRoleRequest';
1363
+ }
1320
1364
  /**
1321
1365
  * Generated by JsPbCodeGenerator.
1322
1366
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -28143,6 +28187,410 @@ proto.user.GetRoleRequest.prototype.setId = function(value) {
28143
28187
 
28144
28188
 
28145
28189
 
28190
+
28191
+
28192
+ if (jspb.Message.GENERATE_TO_OBJECT) {
28193
+ /**
28194
+ * Creates an object representation of this proto.
28195
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
28196
+ * Optional fields that are not set will be set to undefined.
28197
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
28198
+ * For the list of reserved names please see:
28199
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
28200
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
28201
+ * JSPB instance for transitional soy proto support:
28202
+ * http://goto/soy-param-migration
28203
+ * @return {!Object}
28204
+ */
28205
+ proto.user.CreateRoleRequest.prototype.toObject = function(opt_includeInstance) {
28206
+ return proto.user.CreateRoleRequest.toObject(opt_includeInstance, this);
28207
+ };
28208
+
28209
+
28210
+ /**
28211
+ * Static version of the {@see toObject} method.
28212
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
28213
+ * the JSPB instance for transitional soy proto support:
28214
+ * http://goto/soy-param-migration
28215
+ * @param {!proto.user.CreateRoleRequest} msg The msg instance to transform.
28216
+ * @return {!Object}
28217
+ * @suppress {unusedLocalVariables} f is only used for nested messages
28218
+ */
28219
+ proto.user.CreateRoleRequest.toObject = function(includeInstance, msg) {
28220
+ var f, obj = {
28221
+ title: jspb.Message.getFieldWithDefault(msg, 1, ""),
28222
+ description: jspb.Message.getFieldWithDefault(msg, 2, "")
28223
+ };
28224
+
28225
+ if (includeInstance) {
28226
+ obj.$jspbMessageInstance = msg;
28227
+ }
28228
+ return obj;
28229
+ };
28230
+ }
28231
+
28232
+
28233
+ /**
28234
+ * Deserializes binary data (in protobuf wire format).
28235
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
28236
+ * @return {!proto.user.CreateRoleRequest}
28237
+ */
28238
+ proto.user.CreateRoleRequest.deserializeBinary = function(bytes) {
28239
+ var reader = new jspb.BinaryReader(bytes);
28240
+ var msg = new proto.user.CreateRoleRequest;
28241
+ return proto.user.CreateRoleRequest.deserializeBinaryFromReader(msg, reader);
28242
+ };
28243
+
28244
+
28245
+ /**
28246
+ * Deserializes binary data (in protobuf wire format) from the
28247
+ * given reader into the given message object.
28248
+ * @param {!proto.user.CreateRoleRequest} msg The message object to deserialize into.
28249
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
28250
+ * @return {!proto.user.CreateRoleRequest}
28251
+ */
28252
+ proto.user.CreateRoleRequest.deserializeBinaryFromReader = function(msg, reader) {
28253
+ while (reader.nextField()) {
28254
+ if (reader.isEndGroup()) {
28255
+ break;
28256
+ }
28257
+ var field = reader.getFieldNumber();
28258
+ switch (field) {
28259
+ case 1:
28260
+ var value = /** @type {string} */ (reader.readString());
28261
+ msg.setTitle(value);
28262
+ break;
28263
+ case 2:
28264
+ var value = /** @type {string} */ (reader.readString());
28265
+ msg.setDescription(value);
28266
+ break;
28267
+ default:
28268
+ reader.skipField();
28269
+ break;
28270
+ }
28271
+ }
28272
+ return msg;
28273
+ };
28274
+
28275
+
28276
+ /**
28277
+ * Serializes the message to binary data (in protobuf wire format).
28278
+ * @return {!Uint8Array}
28279
+ */
28280
+ proto.user.CreateRoleRequest.prototype.serializeBinary = function() {
28281
+ var writer = new jspb.BinaryWriter();
28282
+ proto.user.CreateRoleRequest.serializeBinaryToWriter(this, writer);
28283
+ return writer.getResultBuffer();
28284
+ };
28285
+
28286
+
28287
+ /**
28288
+ * Serializes the given message to binary data (in protobuf wire
28289
+ * format), writing to the given BinaryWriter.
28290
+ * @param {!proto.user.CreateRoleRequest} message
28291
+ * @param {!jspb.BinaryWriter} writer
28292
+ * @suppress {unusedLocalVariables} f is only used for nested messages
28293
+ */
28294
+ proto.user.CreateRoleRequest.serializeBinaryToWriter = function(message, writer) {
28295
+ var f = undefined;
28296
+ f = message.getTitle();
28297
+ if (f.length > 0) {
28298
+ writer.writeString(
28299
+ 1,
28300
+ f
28301
+ );
28302
+ }
28303
+ f = /** @type {string} */ (jspb.Message.getField(message, 2));
28304
+ if (f != null) {
28305
+ writer.writeString(
28306
+ 2,
28307
+ f
28308
+ );
28309
+ }
28310
+ };
28311
+
28312
+
28313
+ /**
28314
+ * optional string title = 1;
28315
+ * @return {string}
28316
+ */
28317
+ proto.user.CreateRoleRequest.prototype.getTitle = function() {
28318
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
28319
+ };
28320
+
28321
+
28322
+ /**
28323
+ * @param {string} value
28324
+ * @return {!proto.user.CreateRoleRequest} returns this
28325
+ */
28326
+ proto.user.CreateRoleRequest.prototype.setTitle = function(value) {
28327
+ return jspb.Message.setProto3StringField(this, 1, value);
28328
+ };
28329
+
28330
+
28331
+ /**
28332
+ * optional string description = 2;
28333
+ * @return {string}
28334
+ */
28335
+ proto.user.CreateRoleRequest.prototype.getDescription = function() {
28336
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
28337
+ };
28338
+
28339
+
28340
+ /**
28341
+ * @param {string} value
28342
+ * @return {!proto.user.CreateRoleRequest} returns this
28343
+ */
28344
+ proto.user.CreateRoleRequest.prototype.setDescription = function(value) {
28345
+ return jspb.Message.setField(this, 2, value);
28346
+ };
28347
+
28348
+
28349
+ /**
28350
+ * Clears the field making it undefined.
28351
+ * @return {!proto.user.CreateRoleRequest} returns this
28352
+ */
28353
+ proto.user.CreateRoleRequest.prototype.clearDescription = function() {
28354
+ return jspb.Message.setField(this, 2, undefined);
28355
+ };
28356
+
28357
+
28358
+ /**
28359
+ * Returns whether this field is set.
28360
+ * @return {boolean}
28361
+ */
28362
+ proto.user.CreateRoleRequest.prototype.hasDescription = function() {
28363
+ return jspb.Message.getField(this, 2) != null;
28364
+ };
28365
+
28366
+
28367
+
28368
+
28369
+
28370
+ if (jspb.Message.GENERATE_TO_OBJECT) {
28371
+ /**
28372
+ * Creates an object representation of this proto.
28373
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
28374
+ * Optional fields that are not set will be set to undefined.
28375
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
28376
+ * For the list of reserved names please see:
28377
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
28378
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
28379
+ * JSPB instance for transitional soy proto support:
28380
+ * http://goto/soy-param-migration
28381
+ * @return {!Object}
28382
+ */
28383
+ proto.user.UpdateRoleRequest.prototype.toObject = function(opt_includeInstance) {
28384
+ return proto.user.UpdateRoleRequest.toObject(opt_includeInstance, this);
28385
+ };
28386
+
28387
+
28388
+ /**
28389
+ * Static version of the {@see toObject} method.
28390
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
28391
+ * the JSPB instance for transitional soy proto support:
28392
+ * http://goto/soy-param-migration
28393
+ * @param {!proto.user.UpdateRoleRequest} msg The msg instance to transform.
28394
+ * @return {!Object}
28395
+ * @suppress {unusedLocalVariables} f is only used for nested messages
28396
+ */
28397
+ proto.user.UpdateRoleRequest.toObject = function(includeInstance, msg) {
28398
+ var f, obj = {
28399
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0),
28400
+ title: jspb.Message.getFieldWithDefault(msg, 2, ""),
28401
+ description: jspb.Message.getFieldWithDefault(msg, 3, "")
28402
+ };
28403
+
28404
+ if (includeInstance) {
28405
+ obj.$jspbMessageInstance = msg;
28406
+ }
28407
+ return obj;
28408
+ };
28409
+ }
28410
+
28411
+
28412
+ /**
28413
+ * Deserializes binary data (in protobuf wire format).
28414
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
28415
+ * @return {!proto.user.UpdateRoleRequest}
28416
+ */
28417
+ proto.user.UpdateRoleRequest.deserializeBinary = function(bytes) {
28418
+ var reader = new jspb.BinaryReader(bytes);
28419
+ var msg = new proto.user.UpdateRoleRequest;
28420
+ return proto.user.UpdateRoleRequest.deserializeBinaryFromReader(msg, reader);
28421
+ };
28422
+
28423
+
28424
+ /**
28425
+ * Deserializes binary data (in protobuf wire format) from the
28426
+ * given reader into the given message object.
28427
+ * @param {!proto.user.UpdateRoleRequest} msg The message object to deserialize into.
28428
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
28429
+ * @return {!proto.user.UpdateRoleRequest}
28430
+ */
28431
+ proto.user.UpdateRoleRequest.deserializeBinaryFromReader = function(msg, reader) {
28432
+ while (reader.nextField()) {
28433
+ if (reader.isEndGroup()) {
28434
+ break;
28435
+ }
28436
+ var field = reader.getFieldNumber();
28437
+ switch (field) {
28438
+ case 1:
28439
+ var value = /** @type {number} */ (reader.readInt32());
28440
+ msg.setId(value);
28441
+ break;
28442
+ case 2:
28443
+ var value = /** @type {string} */ (reader.readString());
28444
+ msg.setTitle(value);
28445
+ break;
28446
+ case 3:
28447
+ var value = /** @type {string} */ (reader.readString());
28448
+ msg.setDescription(value);
28449
+ break;
28450
+ default:
28451
+ reader.skipField();
28452
+ break;
28453
+ }
28454
+ }
28455
+ return msg;
28456
+ };
28457
+
28458
+
28459
+ /**
28460
+ * Serializes the message to binary data (in protobuf wire format).
28461
+ * @return {!Uint8Array}
28462
+ */
28463
+ proto.user.UpdateRoleRequest.prototype.serializeBinary = function() {
28464
+ var writer = new jspb.BinaryWriter();
28465
+ proto.user.UpdateRoleRequest.serializeBinaryToWriter(this, writer);
28466
+ return writer.getResultBuffer();
28467
+ };
28468
+
28469
+
28470
+ /**
28471
+ * Serializes the given message to binary data (in protobuf wire
28472
+ * format), writing to the given BinaryWriter.
28473
+ * @param {!proto.user.UpdateRoleRequest} message
28474
+ * @param {!jspb.BinaryWriter} writer
28475
+ * @suppress {unusedLocalVariables} f is only used for nested messages
28476
+ */
28477
+ proto.user.UpdateRoleRequest.serializeBinaryToWriter = function(message, writer) {
28478
+ var f = undefined;
28479
+ f = message.getId();
28480
+ if (f !== 0) {
28481
+ writer.writeInt32(
28482
+ 1,
28483
+ f
28484
+ );
28485
+ }
28486
+ f = /** @type {string} */ (jspb.Message.getField(message, 2));
28487
+ if (f != null) {
28488
+ writer.writeString(
28489
+ 2,
28490
+ f
28491
+ );
28492
+ }
28493
+ f = /** @type {string} */ (jspb.Message.getField(message, 3));
28494
+ if (f != null) {
28495
+ writer.writeString(
28496
+ 3,
28497
+ f
28498
+ );
28499
+ }
28500
+ };
28501
+
28502
+
28503
+ /**
28504
+ * optional int32 id = 1;
28505
+ * @return {number}
28506
+ */
28507
+ proto.user.UpdateRoleRequest.prototype.getId = function() {
28508
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
28509
+ };
28510
+
28511
+
28512
+ /**
28513
+ * @param {number} value
28514
+ * @return {!proto.user.UpdateRoleRequest} returns this
28515
+ */
28516
+ proto.user.UpdateRoleRequest.prototype.setId = function(value) {
28517
+ return jspb.Message.setProto3IntField(this, 1, value);
28518
+ };
28519
+
28520
+
28521
+ /**
28522
+ * optional string title = 2;
28523
+ * @return {string}
28524
+ */
28525
+ proto.user.UpdateRoleRequest.prototype.getTitle = function() {
28526
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
28527
+ };
28528
+
28529
+
28530
+ /**
28531
+ * @param {string} value
28532
+ * @return {!proto.user.UpdateRoleRequest} returns this
28533
+ */
28534
+ proto.user.UpdateRoleRequest.prototype.setTitle = function(value) {
28535
+ return jspb.Message.setField(this, 2, value);
28536
+ };
28537
+
28538
+
28539
+ /**
28540
+ * Clears the field making it undefined.
28541
+ * @return {!proto.user.UpdateRoleRequest} returns this
28542
+ */
28543
+ proto.user.UpdateRoleRequest.prototype.clearTitle = function() {
28544
+ return jspb.Message.setField(this, 2, undefined);
28545
+ };
28546
+
28547
+
28548
+ /**
28549
+ * Returns whether this field is set.
28550
+ * @return {boolean}
28551
+ */
28552
+ proto.user.UpdateRoleRequest.prototype.hasTitle = function() {
28553
+ return jspb.Message.getField(this, 2) != null;
28554
+ };
28555
+
28556
+
28557
+ /**
28558
+ * optional string description = 3;
28559
+ * @return {string}
28560
+ */
28561
+ proto.user.UpdateRoleRequest.prototype.getDescription = function() {
28562
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
28563
+ };
28564
+
28565
+
28566
+ /**
28567
+ * @param {string} value
28568
+ * @return {!proto.user.UpdateRoleRequest} returns this
28569
+ */
28570
+ proto.user.UpdateRoleRequest.prototype.setDescription = function(value) {
28571
+ return jspb.Message.setField(this, 3, value);
28572
+ };
28573
+
28574
+
28575
+ /**
28576
+ * Clears the field making it undefined.
28577
+ * @return {!proto.user.UpdateRoleRequest} returns this
28578
+ */
28579
+ proto.user.UpdateRoleRequest.prototype.clearDescription = function() {
28580
+ return jspb.Message.setField(this, 3, undefined);
28581
+ };
28582
+
28583
+
28584
+ /**
28585
+ * Returns whether this field is set.
28586
+ * @return {boolean}
28587
+ */
28588
+ proto.user.UpdateRoleRequest.prototype.hasDescription = function() {
28589
+ return jspb.Message.getField(this, 3) != null;
28590
+ };
28591
+
28592
+
28593
+
28146
28594
  /**
28147
28595
  * List of repeated fields within this message type.
28148
28596
  * @private {!Array<number>}