protobuf-platform 1.2.320 → 1.2.322

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.2.320",
3
+ "version": "1.2.322",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -50,6 +50,7 @@ service Payment {
50
50
  rpc getSegmentedUsers(SegmentedUserRequest) returns (SegmentedUserResponse);
51
51
  //Currency source-of-truth
52
52
  rpc getCurrencyMetadata(GetCurrencyMetadataRequest) returns (CurrencyMetadataResponse);
53
+ rpc getCurrenciesMetadata(GetCurrenciesMetadataRequest) returns (CurrenciesMetadataResponse);
53
54
  //Currency directory
54
55
  rpc readSingleCurrency(GetCurrencyRequest) returns (CurrencyResponse);
55
56
  rpc readListCurrencies(PaginationRequest) returns (CurrencyItemsResponse);
@@ -549,6 +550,16 @@ message CurrencyMetadataResponse {
549
550
  string currency = 1;
550
551
  int32 currency_scale = 2;
551
552
  }
553
+ message GetCurrenciesMetadataRequest {
554
+ repeated string currencies = 1;
555
+ }
556
+ message CurrencyMetadataItem {
557
+ string currency = 1;
558
+ int32 currency_scale = 2;
559
+ }
560
+ message CurrenciesMetadataResponse {
561
+ repeated CurrencyMetadataItem items = 1;
562
+ }
552
563
  message GetCurrencyRequest {
553
564
  int32 id = 1;
554
565
  }
@@ -26,6 +26,17 @@ function deserialize_payment_AttemptWithdrawalRequest(buffer_arg) {
26
26
  return payment_pb.AttemptWithdrawalRequest.deserializeBinary(new Uint8Array(buffer_arg));
27
27
  }
28
28
 
29
+ function serialize_payment_CurrenciesMetadataResponse(arg) {
30
+ if (!(arg instanceof payment_pb.CurrenciesMetadataResponse)) {
31
+ throw new Error('Expected argument of type payment.CurrenciesMetadataResponse');
32
+ }
33
+ return Buffer.from(arg.serializeBinary());
34
+ }
35
+
36
+ function deserialize_payment_CurrenciesMetadataResponse(buffer_arg) {
37
+ return payment_pb.CurrenciesMetadataResponse.deserializeBinary(new Uint8Array(buffer_arg));
38
+ }
39
+
29
40
  function serialize_payment_CurrencyItemsResponse(arg) {
30
41
  if (!(arg instanceof payment_pb.CurrencyItemsResponse)) {
31
42
  throw new Error('Expected argument of type payment.CurrencyItemsResponse');
@@ -136,6 +147,17 @@ function deserialize_payment_File(buffer_arg) {
136
147
  return payment_pb.File.deserializeBinary(new Uint8Array(buffer_arg));
137
148
  }
138
149
 
150
+ function serialize_payment_GetCurrenciesMetadataRequest(arg) {
151
+ if (!(arg instanceof payment_pb.GetCurrenciesMetadataRequest)) {
152
+ throw new Error('Expected argument of type payment.GetCurrenciesMetadataRequest');
153
+ }
154
+ return Buffer.from(arg.serializeBinary());
155
+ }
156
+
157
+ function deserialize_payment_GetCurrenciesMetadataRequest(buffer_arg) {
158
+ return payment_pb.GetCurrenciesMetadataRequest.deserializeBinary(new Uint8Array(buffer_arg));
159
+ }
160
+
139
161
  function serialize_payment_GetCurrencyMetadataRequest(arg) {
140
162
  if (!(arg instanceof payment_pb.GetCurrencyMetadataRequest)) {
141
163
  throw new Error('Expected argument of type payment.GetCurrencyMetadataRequest');
@@ -1005,6 +1027,17 @@ getCurrencyMetadata: {
1005
1027
  responseSerialize: serialize_payment_CurrencyMetadataResponse,
1006
1028
  responseDeserialize: deserialize_payment_CurrencyMetadataResponse,
1007
1029
  },
1030
+ getCurrenciesMetadata: {
1031
+ path: '/payment.Payment/getCurrenciesMetadata',
1032
+ requestStream: false,
1033
+ responseStream: false,
1034
+ requestType: payment_pb.GetCurrenciesMetadataRequest,
1035
+ responseType: payment_pb.CurrenciesMetadataResponse,
1036
+ requestSerialize: serialize_payment_GetCurrenciesMetadataRequest,
1037
+ requestDeserialize: deserialize_payment_GetCurrenciesMetadataRequest,
1038
+ responseSerialize: serialize_payment_CurrenciesMetadataResponse,
1039
+ responseDeserialize: deserialize_payment_CurrenciesMetadataResponse,
1040
+ },
1008
1041
  // Currency directory
1009
1042
  readSingleCurrency: {
1010
1043
  path: '/payment.Payment/readSingleCurrency',
@@ -23,8 +23,10 @@ var global = (function() {
23
23
 
24
24
  goog.exportSymbol('proto.payment.AttemptDepositRequest', null, global);
25
25
  goog.exportSymbol('proto.payment.AttemptWithdrawalRequest', null, global);
26
+ goog.exportSymbol('proto.payment.CurrenciesMetadataResponse', null, global);
26
27
  goog.exportSymbol('proto.payment.CurrencyItem', null, global);
27
28
  goog.exportSymbol('proto.payment.CurrencyItemsResponse', null, global);
29
+ goog.exportSymbol('proto.payment.CurrencyMetadataItem', null, global);
28
30
  goog.exportSymbol('proto.payment.CurrencyMetadataResponse', null, global);
29
31
  goog.exportSymbol('proto.payment.CurrencyResponse', null, global);
30
32
  goog.exportSymbol('proto.payment.DepositItem', null, global);
@@ -36,6 +38,7 @@ goog.exportSymbol('proto.payment.DepositStatus', null, global);
36
38
  goog.exportSymbol('proto.payment.DepositStatusItemsResponse', null, global);
37
39
  goog.exportSymbol('proto.payment.DepositWebHookRequest', null, global);
38
40
  goog.exportSymbol('proto.payment.File', null, global);
41
+ goog.exportSymbol('proto.payment.GetCurrenciesMetadataRequest', null, global);
39
42
  goog.exportSymbol('proto.payment.GetCurrencyMetadataRequest', null, global);
40
43
  goog.exportSymbol('proto.payment.GetCurrencyRequest', null, global);
41
44
  goog.exportSymbol('proto.payment.GetDepositRequest', null, global);
@@ -1414,6 +1417,69 @@ if (goog.DEBUG && !COMPILED) {
1414
1417
  */
1415
1418
  proto.payment.CurrencyMetadataResponse.displayName = 'proto.payment.CurrencyMetadataResponse';
1416
1419
  }
1420
+ /**
1421
+ * Generated by JsPbCodeGenerator.
1422
+ * @param {Array=} opt_data Optional initial data array, typically from a
1423
+ * server response, or constructed directly in Javascript. The array is used
1424
+ * in place and becomes part of the constructed object. It is not cloned.
1425
+ * If no data is provided, the constructed object will be empty, but still
1426
+ * valid.
1427
+ * @extends {jspb.Message}
1428
+ * @constructor
1429
+ */
1430
+ proto.payment.GetCurrenciesMetadataRequest = function(opt_data) {
1431
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.payment.GetCurrenciesMetadataRequest.repeatedFields_, null);
1432
+ };
1433
+ goog.inherits(proto.payment.GetCurrenciesMetadataRequest, jspb.Message);
1434
+ if (goog.DEBUG && !COMPILED) {
1435
+ /**
1436
+ * @public
1437
+ * @override
1438
+ */
1439
+ proto.payment.GetCurrenciesMetadataRequest.displayName = 'proto.payment.GetCurrenciesMetadataRequest';
1440
+ }
1441
+ /**
1442
+ * Generated by JsPbCodeGenerator.
1443
+ * @param {Array=} opt_data Optional initial data array, typically from a
1444
+ * server response, or constructed directly in Javascript. The array is used
1445
+ * in place and becomes part of the constructed object. It is not cloned.
1446
+ * If no data is provided, the constructed object will be empty, but still
1447
+ * valid.
1448
+ * @extends {jspb.Message}
1449
+ * @constructor
1450
+ */
1451
+ proto.payment.CurrencyMetadataItem = function(opt_data) {
1452
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
1453
+ };
1454
+ goog.inherits(proto.payment.CurrencyMetadataItem, jspb.Message);
1455
+ if (goog.DEBUG && !COMPILED) {
1456
+ /**
1457
+ * @public
1458
+ * @override
1459
+ */
1460
+ proto.payment.CurrencyMetadataItem.displayName = 'proto.payment.CurrencyMetadataItem';
1461
+ }
1462
+ /**
1463
+ * Generated by JsPbCodeGenerator.
1464
+ * @param {Array=} opt_data Optional initial data array, typically from a
1465
+ * server response, or constructed directly in Javascript. The array is used
1466
+ * in place and becomes part of the constructed object. It is not cloned.
1467
+ * If no data is provided, the constructed object will be empty, but still
1468
+ * valid.
1469
+ * @extends {jspb.Message}
1470
+ * @constructor
1471
+ */
1472
+ proto.payment.CurrenciesMetadataResponse = function(opt_data) {
1473
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.payment.CurrenciesMetadataResponse.repeatedFields_, null);
1474
+ };
1475
+ goog.inherits(proto.payment.CurrenciesMetadataResponse, jspb.Message);
1476
+ if (goog.DEBUG && !COMPILED) {
1477
+ /**
1478
+ * @public
1479
+ * @override
1480
+ */
1481
+ proto.payment.CurrenciesMetadataResponse.displayName = 'proto.payment.CurrenciesMetadataResponse';
1482
+ }
1417
1483
  /**
1418
1484
  * Generated by JsPbCodeGenerator.
1419
1485
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -23259,6 +23325,482 @@ proto.payment.CurrencyMetadataResponse.prototype.setCurrencyScale = function(val
23259
23325
 
23260
23326
 
23261
23327
 
23328
+ /**
23329
+ * List of repeated fields within this message type.
23330
+ * @private {!Array<number>}
23331
+ * @const
23332
+ */
23333
+ proto.payment.GetCurrenciesMetadataRequest.repeatedFields_ = [1];
23334
+
23335
+
23336
+
23337
+ if (jspb.Message.GENERATE_TO_OBJECT) {
23338
+ /**
23339
+ * Creates an object representation of this proto.
23340
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
23341
+ * Optional fields that are not set will be set to undefined.
23342
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
23343
+ * For the list of reserved names please see:
23344
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
23345
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
23346
+ * JSPB instance for transitional soy proto support:
23347
+ * http://goto/soy-param-migration
23348
+ * @return {!Object}
23349
+ */
23350
+ proto.payment.GetCurrenciesMetadataRequest.prototype.toObject = function(opt_includeInstance) {
23351
+ return proto.payment.GetCurrenciesMetadataRequest.toObject(opt_includeInstance, this);
23352
+ };
23353
+
23354
+
23355
+ /**
23356
+ * Static version of the {@see toObject} method.
23357
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
23358
+ * the JSPB instance for transitional soy proto support:
23359
+ * http://goto/soy-param-migration
23360
+ * @param {!proto.payment.GetCurrenciesMetadataRequest} msg The msg instance to transform.
23361
+ * @return {!Object}
23362
+ * @suppress {unusedLocalVariables} f is only used for nested messages
23363
+ */
23364
+ proto.payment.GetCurrenciesMetadataRequest.toObject = function(includeInstance, msg) {
23365
+ var f, obj = {
23366
+ currenciesList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f
23367
+ };
23368
+
23369
+ if (includeInstance) {
23370
+ obj.$jspbMessageInstance = msg;
23371
+ }
23372
+ return obj;
23373
+ };
23374
+ }
23375
+
23376
+
23377
+ /**
23378
+ * Deserializes binary data (in protobuf wire format).
23379
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
23380
+ * @return {!proto.payment.GetCurrenciesMetadataRequest}
23381
+ */
23382
+ proto.payment.GetCurrenciesMetadataRequest.deserializeBinary = function(bytes) {
23383
+ var reader = new jspb.BinaryReader(bytes);
23384
+ var msg = new proto.payment.GetCurrenciesMetadataRequest;
23385
+ return proto.payment.GetCurrenciesMetadataRequest.deserializeBinaryFromReader(msg, reader);
23386
+ };
23387
+
23388
+
23389
+ /**
23390
+ * Deserializes binary data (in protobuf wire format) from the
23391
+ * given reader into the given message object.
23392
+ * @param {!proto.payment.GetCurrenciesMetadataRequest} msg The message object to deserialize into.
23393
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
23394
+ * @return {!proto.payment.GetCurrenciesMetadataRequest}
23395
+ */
23396
+ proto.payment.GetCurrenciesMetadataRequest.deserializeBinaryFromReader = function(msg, reader) {
23397
+ while (reader.nextField()) {
23398
+ if (reader.isEndGroup()) {
23399
+ break;
23400
+ }
23401
+ var field = reader.getFieldNumber();
23402
+ switch (field) {
23403
+ case 1:
23404
+ var value = /** @type {string} */ (reader.readString());
23405
+ msg.addCurrencies(value);
23406
+ break;
23407
+ default:
23408
+ reader.skipField();
23409
+ break;
23410
+ }
23411
+ }
23412
+ return msg;
23413
+ };
23414
+
23415
+
23416
+ /**
23417
+ * Serializes the message to binary data (in protobuf wire format).
23418
+ * @return {!Uint8Array}
23419
+ */
23420
+ proto.payment.GetCurrenciesMetadataRequest.prototype.serializeBinary = function() {
23421
+ var writer = new jspb.BinaryWriter();
23422
+ proto.payment.GetCurrenciesMetadataRequest.serializeBinaryToWriter(this, writer);
23423
+ return writer.getResultBuffer();
23424
+ };
23425
+
23426
+
23427
+ /**
23428
+ * Serializes the given message to binary data (in protobuf wire
23429
+ * format), writing to the given BinaryWriter.
23430
+ * @param {!proto.payment.GetCurrenciesMetadataRequest} message
23431
+ * @param {!jspb.BinaryWriter} writer
23432
+ * @suppress {unusedLocalVariables} f is only used for nested messages
23433
+ */
23434
+ proto.payment.GetCurrenciesMetadataRequest.serializeBinaryToWriter = function(message, writer) {
23435
+ var f = undefined;
23436
+ f = message.getCurrenciesList();
23437
+ if (f.length > 0) {
23438
+ writer.writeRepeatedString(
23439
+ 1,
23440
+ f
23441
+ );
23442
+ }
23443
+ };
23444
+
23445
+
23446
+ /**
23447
+ * repeated string currencies = 1;
23448
+ * @return {!Array<string>}
23449
+ */
23450
+ proto.payment.GetCurrenciesMetadataRequest.prototype.getCurrenciesList = function() {
23451
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 1));
23452
+ };
23453
+
23454
+
23455
+ /**
23456
+ * @param {!Array<string>} value
23457
+ * @return {!proto.payment.GetCurrenciesMetadataRequest} returns this
23458
+ */
23459
+ proto.payment.GetCurrenciesMetadataRequest.prototype.setCurrenciesList = function(value) {
23460
+ return jspb.Message.setField(this, 1, value || []);
23461
+ };
23462
+
23463
+
23464
+ /**
23465
+ * @param {string} value
23466
+ * @param {number=} opt_index
23467
+ * @return {!proto.payment.GetCurrenciesMetadataRequest} returns this
23468
+ */
23469
+ proto.payment.GetCurrenciesMetadataRequest.prototype.addCurrencies = function(value, opt_index) {
23470
+ return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
23471
+ };
23472
+
23473
+
23474
+ /**
23475
+ * Clears the list making it empty but non-null.
23476
+ * @return {!proto.payment.GetCurrenciesMetadataRequest} returns this
23477
+ */
23478
+ proto.payment.GetCurrenciesMetadataRequest.prototype.clearCurrenciesList = function() {
23479
+ return this.setCurrenciesList([]);
23480
+ };
23481
+
23482
+
23483
+
23484
+
23485
+
23486
+ if (jspb.Message.GENERATE_TO_OBJECT) {
23487
+ /**
23488
+ * Creates an object representation of this proto.
23489
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
23490
+ * Optional fields that are not set will be set to undefined.
23491
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
23492
+ * For the list of reserved names please see:
23493
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
23494
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
23495
+ * JSPB instance for transitional soy proto support:
23496
+ * http://goto/soy-param-migration
23497
+ * @return {!Object}
23498
+ */
23499
+ proto.payment.CurrencyMetadataItem.prototype.toObject = function(opt_includeInstance) {
23500
+ return proto.payment.CurrencyMetadataItem.toObject(opt_includeInstance, this);
23501
+ };
23502
+
23503
+
23504
+ /**
23505
+ * Static version of the {@see toObject} method.
23506
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
23507
+ * the JSPB instance for transitional soy proto support:
23508
+ * http://goto/soy-param-migration
23509
+ * @param {!proto.payment.CurrencyMetadataItem} msg The msg instance to transform.
23510
+ * @return {!Object}
23511
+ * @suppress {unusedLocalVariables} f is only used for nested messages
23512
+ */
23513
+ proto.payment.CurrencyMetadataItem.toObject = function(includeInstance, msg) {
23514
+ var f, obj = {
23515
+ currency: jspb.Message.getFieldWithDefault(msg, 1, ""),
23516
+ currencyScale: jspb.Message.getFieldWithDefault(msg, 2, 0)
23517
+ };
23518
+
23519
+ if (includeInstance) {
23520
+ obj.$jspbMessageInstance = msg;
23521
+ }
23522
+ return obj;
23523
+ };
23524
+ }
23525
+
23526
+
23527
+ /**
23528
+ * Deserializes binary data (in protobuf wire format).
23529
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
23530
+ * @return {!proto.payment.CurrencyMetadataItem}
23531
+ */
23532
+ proto.payment.CurrencyMetadataItem.deserializeBinary = function(bytes) {
23533
+ var reader = new jspb.BinaryReader(bytes);
23534
+ var msg = new proto.payment.CurrencyMetadataItem;
23535
+ return proto.payment.CurrencyMetadataItem.deserializeBinaryFromReader(msg, reader);
23536
+ };
23537
+
23538
+
23539
+ /**
23540
+ * Deserializes binary data (in protobuf wire format) from the
23541
+ * given reader into the given message object.
23542
+ * @param {!proto.payment.CurrencyMetadataItem} msg The message object to deserialize into.
23543
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
23544
+ * @return {!proto.payment.CurrencyMetadataItem}
23545
+ */
23546
+ proto.payment.CurrencyMetadataItem.deserializeBinaryFromReader = function(msg, reader) {
23547
+ while (reader.nextField()) {
23548
+ if (reader.isEndGroup()) {
23549
+ break;
23550
+ }
23551
+ var field = reader.getFieldNumber();
23552
+ switch (field) {
23553
+ case 1:
23554
+ var value = /** @type {string} */ (reader.readString());
23555
+ msg.setCurrency(value);
23556
+ break;
23557
+ case 2:
23558
+ var value = /** @type {number} */ (reader.readInt32());
23559
+ msg.setCurrencyScale(value);
23560
+ break;
23561
+ default:
23562
+ reader.skipField();
23563
+ break;
23564
+ }
23565
+ }
23566
+ return msg;
23567
+ };
23568
+
23569
+
23570
+ /**
23571
+ * Serializes the message to binary data (in protobuf wire format).
23572
+ * @return {!Uint8Array}
23573
+ */
23574
+ proto.payment.CurrencyMetadataItem.prototype.serializeBinary = function() {
23575
+ var writer = new jspb.BinaryWriter();
23576
+ proto.payment.CurrencyMetadataItem.serializeBinaryToWriter(this, writer);
23577
+ return writer.getResultBuffer();
23578
+ };
23579
+
23580
+
23581
+ /**
23582
+ * Serializes the given message to binary data (in protobuf wire
23583
+ * format), writing to the given BinaryWriter.
23584
+ * @param {!proto.payment.CurrencyMetadataItem} message
23585
+ * @param {!jspb.BinaryWriter} writer
23586
+ * @suppress {unusedLocalVariables} f is only used for nested messages
23587
+ */
23588
+ proto.payment.CurrencyMetadataItem.serializeBinaryToWriter = function(message, writer) {
23589
+ var f = undefined;
23590
+ f = message.getCurrency();
23591
+ if (f.length > 0) {
23592
+ writer.writeString(
23593
+ 1,
23594
+ f
23595
+ );
23596
+ }
23597
+ f = message.getCurrencyScale();
23598
+ if (f !== 0) {
23599
+ writer.writeInt32(
23600
+ 2,
23601
+ f
23602
+ );
23603
+ }
23604
+ };
23605
+
23606
+
23607
+ /**
23608
+ * optional string currency = 1;
23609
+ * @return {string}
23610
+ */
23611
+ proto.payment.CurrencyMetadataItem.prototype.getCurrency = function() {
23612
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
23613
+ };
23614
+
23615
+
23616
+ /**
23617
+ * @param {string} value
23618
+ * @return {!proto.payment.CurrencyMetadataItem} returns this
23619
+ */
23620
+ proto.payment.CurrencyMetadataItem.prototype.setCurrency = function(value) {
23621
+ return jspb.Message.setProto3StringField(this, 1, value);
23622
+ };
23623
+
23624
+
23625
+ /**
23626
+ * optional int32 currency_scale = 2;
23627
+ * @return {number}
23628
+ */
23629
+ proto.payment.CurrencyMetadataItem.prototype.getCurrencyScale = function() {
23630
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
23631
+ };
23632
+
23633
+
23634
+ /**
23635
+ * @param {number} value
23636
+ * @return {!proto.payment.CurrencyMetadataItem} returns this
23637
+ */
23638
+ proto.payment.CurrencyMetadataItem.prototype.setCurrencyScale = function(value) {
23639
+ return jspb.Message.setProto3IntField(this, 2, value);
23640
+ };
23641
+
23642
+
23643
+
23644
+ /**
23645
+ * List of repeated fields within this message type.
23646
+ * @private {!Array<number>}
23647
+ * @const
23648
+ */
23649
+ proto.payment.CurrenciesMetadataResponse.repeatedFields_ = [1];
23650
+
23651
+
23652
+
23653
+ if (jspb.Message.GENERATE_TO_OBJECT) {
23654
+ /**
23655
+ * Creates an object representation of this proto.
23656
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
23657
+ * Optional fields that are not set will be set to undefined.
23658
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
23659
+ * For the list of reserved names please see:
23660
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
23661
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
23662
+ * JSPB instance for transitional soy proto support:
23663
+ * http://goto/soy-param-migration
23664
+ * @return {!Object}
23665
+ */
23666
+ proto.payment.CurrenciesMetadataResponse.prototype.toObject = function(opt_includeInstance) {
23667
+ return proto.payment.CurrenciesMetadataResponse.toObject(opt_includeInstance, this);
23668
+ };
23669
+
23670
+
23671
+ /**
23672
+ * Static version of the {@see toObject} method.
23673
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
23674
+ * the JSPB instance for transitional soy proto support:
23675
+ * http://goto/soy-param-migration
23676
+ * @param {!proto.payment.CurrenciesMetadataResponse} msg The msg instance to transform.
23677
+ * @return {!Object}
23678
+ * @suppress {unusedLocalVariables} f is only used for nested messages
23679
+ */
23680
+ proto.payment.CurrenciesMetadataResponse.toObject = function(includeInstance, msg) {
23681
+ var f, obj = {
23682
+ itemsList: jspb.Message.toObjectList(msg.getItemsList(),
23683
+ proto.payment.CurrencyMetadataItem.toObject, includeInstance)
23684
+ };
23685
+
23686
+ if (includeInstance) {
23687
+ obj.$jspbMessageInstance = msg;
23688
+ }
23689
+ return obj;
23690
+ };
23691
+ }
23692
+
23693
+
23694
+ /**
23695
+ * Deserializes binary data (in protobuf wire format).
23696
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
23697
+ * @return {!proto.payment.CurrenciesMetadataResponse}
23698
+ */
23699
+ proto.payment.CurrenciesMetadataResponse.deserializeBinary = function(bytes) {
23700
+ var reader = new jspb.BinaryReader(bytes);
23701
+ var msg = new proto.payment.CurrenciesMetadataResponse;
23702
+ return proto.payment.CurrenciesMetadataResponse.deserializeBinaryFromReader(msg, reader);
23703
+ };
23704
+
23705
+
23706
+ /**
23707
+ * Deserializes binary data (in protobuf wire format) from the
23708
+ * given reader into the given message object.
23709
+ * @param {!proto.payment.CurrenciesMetadataResponse} msg The message object to deserialize into.
23710
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
23711
+ * @return {!proto.payment.CurrenciesMetadataResponse}
23712
+ */
23713
+ proto.payment.CurrenciesMetadataResponse.deserializeBinaryFromReader = function(msg, reader) {
23714
+ while (reader.nextField()) {
23715
+ if (reader.isEndGroup()) {
23716
+ break;
23717
+ }
23718
+ var field = reader.getFieldNumber();
23719
+ switch (field) {
23720
+ case 1:
23721
+ var value = new proto.payment.CurrencyMetadataItem;
23722
+ reader.readMessage(value,proto.payment.CurrencyMetadataItem.deserializeBinaryFromReader);
23723
+ msg.addItems(value);
23724
+ break;
23725
+ default:
23726
+ reader.skipField();
23727
+ break;
23728
+ }
23729
+ }
23730
+ return msg;
23731
+ };
23732
+
23733
+
23734
+ /**
23735
+ * Serializes the message to binary data (in protobuf wire format).
23736
+ * @return {!Uint8Array}
23737
+ */
23738
+ proto.payment.CurrenciesMetadataResponse.prototype.serializeBinary = function() {
23739
+ var writer = new jspb.BinaryWriter();
23740
+ proto.payment.CurrenciesMetadataResponse.serializeBinaryToWriter(this, writer);
23741
+ return writer.getResultBuffer();
23742
+ };
23743
+
23744
+
23745
+ /**
23746
+ * Serializes the given message to binary data (in protobuf wire
23747
+ * format), writing to the given BinaryWriter.
23748
+ * @param {!proto.payment.CurrenciesMetadataResponse} message
23749
+ * @param {!jspb.BinaryWriter} writer
23750
+ * @suppress {unusedLocalVariables} f is only used for nested messages
23751
+ */
23752
+ proto.payment.CurrenciesMetadataResponse.serializeBinaryToWriter = function(message, writer) {
23753
+ var f = undefined;
23754
+ f = message.getItemsList();
23755
+ if (f.length > 0) {
23756
+ writer.writeRepeatedMessage(
23757
+ 1,
23758
+ f,
23759
+ proto.payment.CurrencyMetadataItem.serializeBinaryToWriter
23760
+ );
23761
+ }
23762
+ };
23763
+
23764
+
23765
+ /**
23766
+ * repeated CurrencyMetadataItem items = 1;
23767
+ * @return {!Array<!proto.payment.CurrencyMetadataItem>}
23768
+ */
23769
+ proto.payment.CurrenciesMetadataResponse.prototype.getItemsList = function() {
23770
+ return /** @type{!Array<!proto.payment.CurrencyMetadataItem>} */ (
23771
+ jspb.Message.getRepeatedWrapperField(this, proto.payment.CurrencyMetadataItem, 1));
23772
+ };
23773
+
23774
+
23775
+ /**
23776
+ * @param {!Array<!proto.payment.CurrencyMetadataItem>} value
23777
+ * @return {!proto.payment.CurrenciesMetadataResponse} returns this
23778
+ */
23779
+ proto.payment.CurrenciesMetadataResponse.prototype.setItemsList = function(value) {
23780
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
23781
+ };
23782
+
23783
+
23784
+ /**
23785
+ * @param {!proto.payment.CurrencyMetadataItem=} opt_value
23786
+ * @param {number=} opt_index
23787
+ * @return {!proto.payment.CurrencyMetadataItem}
23788
+ */
23789
+ proto.payment.CurrenciesMetadataResponse.prototype.addItems = function(opt_value, opt_index) {
23790
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.payment.CurrencyMetadataItem, opt_index);
23791
+ };
23792
+
23793
+
23794
+ /**
23795
+ * Clears the list making it empty but non-null.
23796
+ * @return {!proto.payment.CurrenciesMetadataResponse} returns this
23797
+ */
23798
+ proto.payment.CurrenciesMetadataResponse.prototype.clearItemsList = function() {
23799
+ return this.setItemsList([]);
23800
+ };
23801
+
23802
+
23803
+
23262
23804
 
23263
23805
 
23264
23806
  if (jspb.Message.GENERATE_TO_OBJECT) {
package/user/user.proto CHANGED
@@ -54,6 +54,7 @@ service User {
54
54
  //Manual user restrictions
55
55
  rpc readUserManualRestrictions(ReadUserManualRestrictionsRequest) returns (UserManualRestrictionsResponse);
56
56
  rpc updateUserManualRestriction(UpdateUserManualRestrictionRequest) returns (UserManualRestrictionItem);
57
+ rpc updateUserManualRestrictionsInBunch(UpdateUserManualRestrictionsInBunchRequest) returns (UserManualRestrictionsResponse);
57
58
  //Calculated user restrictions
58
59
  rpc readUserCalculatedRestrictions(ReadUserCalculatedRestrictionsRequest) returns (UserCalculatedRestrictionsResponse);
59
60
  //Risk permission matrix
@@ -693,6 +694,17 @@ message UpdateUserManualRestrictionRequest {
693
694
  bool is_blocked = 3;
694
695
  optional string reason = 4;
695
696
  }
697
+
698
+ message UpdateUserManualRestrictionInBunchItem {
699
+ string restriction_type = 1;
700
+ bool is_blocked = 2;
701
+ optional string reason = 3;
702
+ }
703
+ // Updates or creates only restrictions listed in items; others unchanged.
704
+ message UpdateUserManualRestrictionsInBunchRequest {
705
+ int64 user_id = 1;
706
+ repeated UpdateUserManualRestrictionInBunchItem items = 2;
707
+ }
696
708
  message ReadUserCalculatedRestrictionsRequest {
697
709
  int32 user_id = 1;
698
710
  optional string restriction_type = 2;
@@ -785,6 +785,17 @@ function deserialize_user_UpdateUserManualRestrictionRequest(buffer_arg) {
785
785
  return user_pb.UpdateUserManualRestrictionRequest.deserializeBinary(new Uint8Array(buffer_arg));
786
786
  }
787
787
 
788
+ function serialize_user_UpdateUserManualRestrictionsInBunchRequest(arg) {
789
+ if (!(arg instanceof user_pb.UpdateUserManualRestrictionsInBunchRequest)) {
790
+ throw new Error('Expected argument of type user.UpdateUserManualRestrictionsInBunchRequest');
791
+ }
792
+ return Buffer.from(arg.serializeBinary());
793
+ }
794
+
795
+ function deserialize_user_UpdateUserManualRestrictionsInBunchRequest(buffer_arg) {
796
+ return user_pb.UpdateUserManualRestrictionsInBunchRequest.deserializeBinary(new Uint8Array(buffer_arg));
797
+ }
798
+
788
799
  function serialize_user_UpdateUserRiskProfileRequest(arg) {
789
800
  if (!(arg instanceof user_pb.UpdateUserRiskProfileRequest)) {
790
801
  throw new Error('Expected argument of type user.UpdateUserRiskProfileRequest');
@@ -1608,6 +1619,17 @@ readUserManualRestrictions: {
1608
1619
  responseSerialize: serialize_user_UserManualRestrictionItem,
1609
1620
  responseDeserialize: deserialize_user_UserManualRestrictionItem,
1610
1621
  },
1622
+ updateUserManualRestrictionsInBunch: {
1623
+ path: '/user.User/updateUserManualRestrictionsInBunch',
1624
+ requestStream: false,
1625
+ responseStream: false,
1626
+ requestType: user_pb.UpdateUserManualRestrictionsInBunchRequest,
1627
+ responseType: user_pb.UserManualRestrictionsResponse,
1628
+ requestSerialize: serialize_user_UpdateUserManualRestrictionsInBunchRequest,
1629
+ requestDeserialize: deserialize_user_UpdateUserManualRestrictionsInBunchRequest,
1630
+ responseSerialize: serialize_user_UserManualRestrictionsResponse,
1631
+ responseDeserialize: deserialize_user_UserManualRestrictionsResponse,
1632
+ },
1611
1633
  // Calculated user restrictions
1612
1634
  readUserCalculatedRestrictions: {
1613
1635
  path: '/user.User/readUserCalculatedRestrictions',
package/user/user_pb.js CHANGED
@@ -110,7 +110,9 @@ goog.exportSymbol('proto.user.UpdateRiskPermissionMatrixLimitRequest', null, glo
110
110
  goog.exportSymbol('proto.user.UpdateRiskPermissionMatrixRequest', null, global);
111
111
  goog.exportSymbol('proto.user.UpdateUserKycDocumentReviewRequest', null, global);
112
112
  goog.exportSymbol('proto.user.UpdateUserKycProfileRequest', null, global);
113
+ goog.exportSymbol('proto.user.UpdateUserManualRestrictionInBunchItem', null, global);
113
114
  goog.exportSymbol('proto.user.UpdateUserManualRestrictionRequest', null, global);
115
+ goog.exportSymbol('proto.user.UpdateUserManualRestrictionsInBunchRequest', null, global);
114
116
  goog.exportSymbol('proto.user.UpdateUserRiskProfileRequest', null, global);
115
117
  goog.exportSymbol('proto.user.UserActionRequest', null, global);
116
118
  goog.exportSymbol('proto.user.UserActionResponse', null, global);
@@ -1658,6 +1660,48 @@ if (goog.DEBUG && !COMPILED) {
1658
1660
  */
1659
1661
  proto.user.UpdateUserManualRestrictionRequest.displayName = 'proto.user.UpdateUserManualRestrictionRequest';
1660
1662
  }
1663
+ /**
1664
+ * Generated by JsPbCodeGenerator.
1665
+ * @param {Array=} opt_data Optional initial data array, typically from a
1666
+ * server response, or constructed directly in Javascript. The array is used
1667
+ * in place and becomes part of the constructed object. It is not cloned.
1668
+ * If no data is provided, the constructed object will be empty, but still
1669
+ * valid.
1670
+ * @extends {jspb.Message}
1671
+ * @constructor
1672
+ */
1673
+ proto.user.UpdateUserManualRestrictionInBunchItem = function(opt_data) {
1674
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
1675
+ };
1676
+ goog.inherits(proto.user.UpdateUserManualRestrictionInBunchItem, jspb.Message);
1677
+ if (goog.DEBUG && !COMPILED) {
1678
+ /**
1679
+ * @public
1680
+ * @override
1681
+ */
1682
+ proto.user.UpdateUserManualRestrictionInBunchItem.displayName = 'proto.user.UpdateUserManualRestrictionInBunchItem';
1683
+ }
1684
+ /**
1685
+ * Generated by JsPbCodeGenerator.
1686
+ * @param {Array=} opt_data Optional initial data array, typically from a
1687
+ * server response, or constructed directly in Javascript. The array is used
1688
+ * in place and becomes part of the constructed object. It is not cloned.
1689
+ * If no data is provided, the constructed object will be empty, but still
1690
+ * valid.
1691
+ * @extends {jspb.Message}
1692
+ * @constructor
1693
+ */
1694
+ proto.user.UpdateUserManualRestrictionsInBunchRequest = function(opt_data) {
1695
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.user.UpdateUserManualRestrictionsInBunchRequest.repeatedFields_, null);
1696
+ };
1697
+ goog.inherits(proto.user.UpdateUserManualRestrictionsInBunchRequest, jspb.Message);
1698
+ if (goog.DEBUG && !COMPILED) {
1699
+ /**
1700
+ * @public
1701
+ * @override
1702
+ */
1703
+ proto.user.UpdateUserManualRestrictionsInBunchRequest.displayName = 'proto.user.UpdateUserManualRestrictionsInBunchRequest';
1704
+ }
1661
1705
  /**
1662
1706
  * Generated by JsPbCodeGenerator.
1663
1707
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -30171,6 +30215,404 @@ proto.user.UpdateUserManualRestrictionRequest.prototype.hasReason = function() {
30171
30215
 
30172
30216
 
30173
30217
 
30218
+ if (jspb.Message.GENERATE_TO_OBJECT) {
30219
+ /**
30220
+ * Creates an object representation of this proto.
30221
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
30222
+ * Optional fields that are not set will be set to undefined.
30223
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
30224
+ * For the list of reserved names please see:
30225
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
30226
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
30227
+ * JSPB instance for transitional soy proto support:
30228
+ * http://goto/soy-param-migration
30229
+ * @return {!Object}
30230
+ */
30231
+ proto.user.UpdateUserManualRestrictionInBunchItem.prototype.toObject = function(opt_includeInstance) {
30232
+ return proto.user.UpdateUserManualRestrictionInBunchItem.toObject(opt_includeInstance, this);
30233
+ };
30234
+
30235
+
30236
+ /**
30237
+ * Static version of the {@see toObject} method.
30238
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
30239
+ * the JSPB instance for transitional soy proto support:
30240
+ * http://goto/soy-param-migration
30241
+ * @param {!proto.user.UpdateUserManualRestrictionInBunchItem} msg The msg instance to transform.
30242
+ * @return {!Object}
30243
+ * @suppress {unusedLocalVariables} f is only used for nested messages
30244
+ */
30245
+ proto.user.UpdateUserManualRestrictionInBunchItem.toObject = function(includeInstance, msg) {
30246
+ var f, obj = {
30247
+ restrictionType: jspb.Message.getFieldWithDefault(msg, 1, ""),
30248
+ isBlocked: jspb.Message.getBooleanFieldWithDefault(msg, 2, false),
30249
+ reason: jspb.Message.getFieldWithDefault(msg, 3, "")
30250
+ };
30251
+
30252
+ if (includeInstance) {
30253
+ obj.$jspbMessageInstance = msg;
30254
+ }
30255
+ return obj;
30256
+ };
30257
+ }
30258
+
30259
+
30260
+ /**
30261
+ * Deserializes binary data (in protobuf wire format).
30262
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
30263
+ * @return {!proto.user.UpdateUserManualRestrictionInBunchItem}
30264
+ */
30265
+ proto.user.UpdateUserManualRestrictionInBunchItem.deserializeBinary = function(bytes) {
30266
+ var reader = new jspb.BinaryReader(bytes);
30267
+ var msg = new proto.user.UpdateUserManualRestrictionInBunchItem;
30268
+ return proto.user.UpdateUserManualRestrictionInBunchItem.deserializeBinaryFromReader(msg, reader);
30269
+ };
30270
+
30271
+
30272
+ /**
30273
+ * Deserializes binary data (in protobuf wire format) from the
30274
+ * given reader into the given message object.
30275
+ * @param {!proto.user.UpdateUserManualRestrictionInBunchItem} msg The message object to deserialize into.
30276
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
30277
+ * @return {!proto.user.UpdateUserManualRestrictionInBunchItem}
30278
+ */
30279
+ proto.user.UpdateUserManualRestrictionInBunchItem.deserializeBinaryFromReader = function(msg, reader) {
30280
+ while (reader.nextField()) {
30281
+ if (reader.isEndGroup()) {
30282
+ break;
30283
+ }
30284
+ var field = reader.getFieldNumber();
30285
+ switch (field) {
30286
+ case 1:
30287
+ var value = /** @type {string} */ (reader.readString());
30288
+ msg.setRestrictionType(value);
30289
+ break;
30290
+ case 2:
30291
+ var value = /** @type {boolean} */ (reader.readBool());
30292
+ msg.setIsBlocked(value);
30293
+ break;
30294
+ case 3:
30295
+ var value = /** @type {string} */ (reader.readString());
30296
+ msg.setReason(value);
30297
+ break;
30298
+ default:
30299
+ reader.skipField();
30300
+ break;
30301
+ }
30302
+ }
30303
+ return msg;
30304
+ };
30305
+
30306
+
30307
+ /**
30308
+ * Serializes the message to binary data (in protobuf wire format).
30309
+ * @return {!Uint8Array}
30310
+ */
30311
+ proto.user.UpdateUserManualRestrictionInBunchItem.prototype.serializeBinary = function() {
30312
+ var writer = new jspb.BinaryWriter();
30313
+ proto.user.UpdateUserManualRestrictionInBunchItem.serializeBinaryToWriter(this, writer);
30314
+ return writer.getResultBuffer();
30315
+ };
30316
+
30317
+
30318
+ /**
30319
+ * Serializes the given message to binary data (in protobuf wire
30320
+ * format), writing to the given BinaryWriter.
30321
+ * @param {!proto.user.UpdateUserManualRestrictionInBunchItem} message
30322
+ * @param {!jspb.BinaryWriter} writer
30323
+ * @suppress {unusedLocalVariables} f is only used for nested messages
30324
+ */
30325
+ proto.user.UpdateUserManualRestrictionInBunchItem.serializeBinaryToWriter = function(message, writer) {
30326
+ var f = undefined;
30327
+ f = message.getRestrictionType();
30328
+ if (f.length > 0) {
30329
+ writer.writeString(
30330
+ 1,
30331
+ f
30332
+ );
30333
+ }
30334
+ f = message.getIsBlocked();
30335
+ if (f) {
30336
+ writer.writeBool(
30337
+ 2,
30338
+ f
30339
+ );
30340
+ }
30341
+ f = /** @type {string} */ (jspb.Message.getField(message, 3));
30342
+ if (f != null) {
30343
+ writer.writeString(
30344
+ 3,
30345
+ f
30346
+ );
30347
+ }
30348
+ };
30349
+
30350
+
30351
+ /**
30352
+ * optional string restriction_type = 1;
30353
+ * @return {string}
30354
+ */
30355
+ proto.user.UpdateUserManualRestrictionInBunchItem.prototype.getRestrictionType = function() {
30356
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
30357
+ };
30358
+
30359
+
30360
+ /**
30361
+ * @param {string} value
30362
+ * @return {!proto.user.UpdateUserManualRestrictionInBunchItem} returns this
30363
+ */
30364
+ proto.user.UpdateUserManualRestrictionInBunchItem.prototype.setRestrictionType = function(value) {
30365
+ return jspb.Message.setProto3StringField(this, 1, value);
30366
+ };
30367
+
30368
+
30369
+ /**
30370
+ * optional bool is_blocked = 2;
30371
+ * @return {boolean}
30372
+ */
30373
+ proto.user.UpdateUserManualRestrictionInBunchItem.prototype.getIsBlocked = function() {
30374
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));
30375
+ };
30376
+
30377
+
30378
+ /**
30379
+ * @param {boolean} value
30380
+ * @return {!proto.user.UpdateUserManualRestrictionInBunchItem} returns this
30381
+ */
30382
+ proto.user.UpdateUserManualRestrictionInBunchItem.prototype.setIsBlocked = function(value) {
30383
+ return jspb.Message.setProto3BooleanField(this, 2, value);
30384
+ };
30385
+
30386
+
30387
+ /**
30388
+ * optional string reason = 3;
30389
+ * @return {string}
30390
+ */
30391
+ proto.user.UpdateUserManualRestrictionInBunchItem.prototype.getReason = function() {
30392
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
30393
+ };
30394
+
30395
+
30396
+ /**
30397
+ * @param {string} value
30398
+ * @return {!proto.user.UpdateUserManualRestrictionInBunchItem} returns this
30399
+ */
30400
+ proto.user.UpdateUserManualRestrictionInBunchItem.prototype.setReason = function(value) {
30401
+ return jspb.Message.setField(this, 3, value);
30402
+ };
30403
+
30404
+
30405
+ /**
30406
+ * Clears the field making it undefined.
30407
+ * @return {!proto.user.UpdateUserManualRestrictionInBunchItem} returns this
30408
+ */
30409
+ proto.user.UpdateUserManualRestrictionInBunchItem.prototype.clearReason = function() {
30410
+ return jspb.Message.setField(this, 3, undefined);
30411
+ };
30412
+
30413
+
30414
+ /**
30415
+ * Returns whether this field is set.
30416
+ * @return {boolean}
30417
+ */
30418
+ proto.user.UpdateUserManualRestrictionInBunchItem.prototype.hasReason = function() {
30419
+ return jspb.Message.getField(this, 3) != null;
30420
+ };
30421
+
30422
+
30423
+
30424
+ /**
30425
+ * List of repeated fields within this message type.
30426
+ * @private {!Array<number>}
30427
+ * @const
30428
+ */
30429
+ proto.user.UpdateUserManualRestrictionsInBunchRequest.repeatedFields_ = [2];
30430
+
30431
+
30432
+
30433
+ if (jspb.Message.GENERATE_TO_OBJECT) {
30434
+ /**
30435
+ * Creates an object representation of this proto.
30436
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
30437
+ * Optional fields that are not set will be set to undefined.
30438
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
30439
+ * For the list of reserved names please see:
30440
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
30441
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
30442
+ * JSPB instance for transitional soy proto support:
30443
+ * http://goto/soy-param-migration
30444
+ * @return {!Object}
30445
+ */
30446
+ proto.user.UpdateUserManualRestrictionsInBunchRequest.prototype.toObject = function(opt_includeInstance) {
30447
+ return proto.user.UpdateUserManualRestrictionsInBunchRequest.toObject(opt_includeInstance, this);
30448
+ };
30449
+
30450
+
30451
+ /**
30452
+ * Static version of the {@see toObject} method.
30453
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
30454
+ * the JSPB instance for transitional soy proto support:
30455
+ * http://goto/soy-param-migration
30456
+ * @param {!proto.user.UpdateUserManualRestrictionsInBunchRequest} msg The msg instance to transform.
30457
+ * @return {!Object}
30458
+ * @suppress {unusedLocalVariables} f is only used for nested messages
30459
+ */
30460
+ proto.user.UpdateUserManualRestrictionsInBunchRequest.toObject = function(includeInstance, msg) {
30461
+ var f, obj = {
30462
+ userId: jspb.Message.getFieldWithDefault(msg, 1, 0),
30463
+ itemsList: jspb.Message.toObjectList(msg.getItemsList(),
30464
+ proto.user.UpdateUserManualRestrictionInBunchItem.toObject, includeInstance)
30465
+ };
30466
+
30467
+ if (includeInstance) {
30468
+ obj.$jspbMessageInstance = msg;
30469
+ }
30470
+ return obj;
30471
+ };
30472
+ }
30473
+
30474
+
30475
+ /**
30476
+ * Deserializes binary data (in protobuf wire format).
30477
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
30478
+ * @return {!proto.user.UpdateUserManualRestrictionsInBunchRequest}
30479
+ */
30480
+ proto.user.UpdateUserManualRestrictionsInBunchRequest.deserializeBinary = function(bytes) {
30481
+ var reader = new jspb.BinaryReader(bytes);
30482
+ var msg = new proto.user.UpdateUserManualRestrictionsInBunchRequest;
30483
+ return proto.user.UpdateUserManualRestrictionsInBunchRequest.deserializeBinaryFromReader(msg, reader);
30484
+ };
30485
+
30486
+
30487
+ /**
30488
+ * Deserializes binary data (in protobuf wire format) from the
30489
+ * given reader into the given message object.
30490
+ * @param {!proto.user.UpdateUserManualRestrictionsInBunchRequest} msg The message object to deserialize into.
30491
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
30492
+ * @return {!proto.user.UpdateUserManualRestrictionsInBunchRequest}
30493
+ */
30494
+ proto.user.UpdateUserManualRestrictionsInBunchRequest.deserializeBinaryFromReader = function(msg, reader) {
30495
+ while (reader.nextField()) {
30496
+ if (reader.isEndGroup()) {
30497
+ break;
30498
+ }
30499
+ var field = reader.getFieldNumber();
30500
+ switch (field) {
30501
+ case 1:
30502
+ var value = /** @type {number} */ (reader.readInt64());
30503
+ msg.setUserId(value);
30504
+ break;
30505
+ case 2:
30506
+ var value = new proto.user.UpdateUserManualRestrictionInBunchItem;
30507
+ reader.readMessage(value,proto.user.UpdateUserManualRestrictionInBunchItem.deserializeBinaryFromReader);
30508
+ msg.addItems(value);
30509
+ break;
30510
+ default:
30511
+ reader.skipField();
30512
+ break;
30513
+ }
30514
+ }
30515
+ return msg;
30516
+ };
30517
+
30518
+
30519
+ /**
30520
+ * Serializes the message to binary data (in protobuf wire format).
30521
+ * @return {!Uint8Array}
30522
+ */
30523
+ proto.user.UpdateUserManualRestrictionsInBunchRequest.prototype.serializeBinary = function() {
30524
+ var writer = new jspb.BinaryWriter();
30525
+ proto.user.UpdateUserManualRestrictionsInBunchRequest.serializeBinaryToWriter(this, writer);
30526
+ return writer.getResultBuffer();
30527
+ };
30528
+
30529
+
30530
+ /**
30531
+ * Serializes the given message to binary data (in protobuf wire
30532
+ * format), writing to the given BinaryWriter.
30533
+ * @param {!proto.user.UpdateUserManualRestrictionsInBunchRequest} message
30534
+ * @param {!jspb.BinaryWriter} writer
30535
+ * @suppress {unusedLocalVariables} f is only used for nested messages
30536
+ */
30537
+ proto.user.UpdateUserManualRestrictionsInBunchRequest.serializeBinaryToWriter = function(message, writer) {
30538
+ var f = undefined;
30539
+ f = message.getUserId();
30540
+ if (f !== 0) {
30541
+ writer.writeInt64(
30542
+ 1,
30543
+ f
30544
+ );
30545
+ }
30546
+ f = message.getItemsList();
30547
+ if (f.length > 0) {
30548
+ writer.writeRepeatedMessage(
30549
+ 2,
30550
+ f,
30551
+ proto.user.UpdateUserManualRestrictionInBunchItem.serializeBinaryToWriter
30552
+ );
30553
+ }
30554
+ };
30555
+
30556
+
30557
+ /**
30558
+ * optional int64 user_id = 1;
30559
+ * @return {number}
30560
+ */
30561
+ proto.user.UpdateUserManualRestrictionsInBunchRequest.prototype.getUserId = function() {
30562
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
30563
+ };
30564
+
30565
+
30566
+ /**
30567
+ * @param {number} value
30568
+ * @return {!proto.user.UpdateUserManualRestrictionsInBunchRequest} returns this
30569
+ */
30570
+ proto.user.UpdateUserManualRestrictionsInBunchRequest.prototype.setUserId = function(value) {
30571
+ return jspb.Message.setProto3IntField(this, 1, value);
30572
+ };
30573
+
30574
+
30575
+ /**
30576
+ * repeated UpdateUserManualRestrictionInBunchItem items = 2;
30577
+ * @return {!Array<!proto.user.UpdateUserManualRestrictionInBunchItem>}
30578
+ */
30579
+ proto.user.UpdateUserManualRestrictionsInBunchRequest.prototype.getItemsList = function() {
30580
+ return /** @type{!Array<!proto.user.UpdateUserManualRestrictionInBunchItem>} */ (
30581
+ jspb.Message.getRepeatedWrapperField(this, proto.user.UpdateUserManualRestrictionInBunchItem, 2));
30582
+ };
30583
+
30584
+
30585
+ /**
30586
+ * @param {!Array<!proto.user.UpdateUserManualRestrictionInBunchItem>} value
30587
+ * @return {!proto.user.UpdateUserManualRestrictionsInBunchRequest} returns this
30588
+ */
30589
+ proto.user.UpdateUserManualRestrictionsInBunchRequest.prototype.setItemsList = function(value) {
30590
+ return jspb.Message.setRepeatedWrapperField(this, 2, value);
30591
+ };
30592
+
30593
+
30594
+ /**
30595
+ * @param {!proto.user.UpdateUserManualRestrictionInBunchItem=} opt_value
30596
+ * @param {number=} opt_index
30597
+ * @return {!proto.user.UpdateUserManualRestrictionInBunchItem}
30598
+ */
30599
+ proto.user.UpdateUserManualRestrictionsInBunchRequest.prototype.addItems = function(opt_value, opt_index) {
30600
+ return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.user.UpdateUserManualRestrictionInBunchItem, opt_index);
30601
+ };
30602
+
30603
+
30604
+ /**
30605
+ * Clears the list making it empty but non-null.
30606
+ * @return {!proto.user.UpdateUserManualRestrictionsInBunchRequest} returns this
30607
+ */
30608
+ proto.user.UpdateUserManualRestrictionsInBunchRequest.prototype.clearItemsList = function() {
30609
+ return this.setItemsList([]);
30610
+ };
30611
+
30612
+
30613
+
30614
+
30615
+
30174
30616
  if (jspb.Message.GENERATE_TO_OBJECT) {
30175
30617
  /**
30176
30618
  * Creates an object representation of this proto.