core-3nweb-client-lib 0.48.7 → 0.49.0

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.
@@ -40,7 +40,7 @@ $root.bytes = (function() {
40
40
  function SpliceRequestBody(properties) {
41
41
  if (properties)
42
42
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
43
- if (properties[keys[i]] != null)
43
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
44
44
  this[keys[i]] = properties[keys[i]];
45
45
  }
46
46
 
@@ -89,15 +89,19 @@ $root.bytes = (function() {
89
89
  * @param {$protobuf.Writer} [writer] Writer to encode to
90
90
  * @returns {$protobuf.Writer} Writer
91
91
  */
92
- SpliceRequestBody.encode = function encode(message, writer) {
92
+ SpliceRequestBody.encode = function encode(message, writer, q) {
93
93
  if (!writer)
94
94
  writer = $Writer.create();
95
+ if (q === undefined)
96
+ q = 0;
97
+ if (q > $util.recursionLimit)
98
+ throw Error("max depth exceeded");
95
99
  if (message.pos != null && Object.hasOwnProperty.call(message, "pos"))
96
100
  writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.pos);
97
101
  if (message.del != null && Object.hasOwnProperty.call(message, "del"))
98
102
  writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.del);
99
103
  if (message.bytes != null && Object.hasOwnProperty.call(message, "bytes"))
100
- $root.common.BytesValue.encode(message.bytes, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
104
+ $root.common.BytesValue.encode(message.bytes, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim();
101
105
  return writer;
102
106
  };
103
107
 
@@ -111,7 +115,7 @@ $root.bytes = (function() {
111
115
  * @returns {$protobuf.Writer} Writer
112
116
  */
113
117
  SpliceRequestBody.encodeDelimited = function encodeDelimited(message, writer) {
114
- return this.encode(message, writer).ldelim();
118
+ return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();
115
119
  };
116
120
 
117
121
  /**
@@ -125,9 +129,13 @@ $root.bytes = (function() {
125
129
  * @throws {Error} If the payload is not a reader or valid buffer
126
130
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
127
131
  */
128
- SpliceRequestBody.decode = function decode(reader, length, error) {
132
+ SpliceRequestBody.decode = function decode(reader, length, error, long) {
129
133
  if (!(reader instanceof $Reader))
130
134
  reader = $Reader.create(reader);
135
+ if (long === undefined)
136
+ long = 0;
137
+ if (long > $Reader.recursionLimit)
138
+ throw Error("maximum nesting depth exceeded");
131
139
  var end = length === undefined ? reader.len : reader.pos + length, message = new $root.bytes.SpliceRequestBody();
132
140
  while (reader.pos < end) {
133
141
  var tag = reader.uint32();
@@ -143,11 +151,11 @@ $root.bytes = (function() {
143
151
  break;
144
152
  }
145
153
  case 3: {
146
- message.bytes = $root.common.BytesValue.decode(reader, reader.uint32());
154
+ message.bytes = $root.common.BytesValue.decode(reader, reader.uint32(), undefined, long + 1);
147
155
  break;
148
156
  }
149
157
  default:
150
- reader.skipType(tag & 7);
158
+ reader.skipType(tag & 7, long);
151
159
  break;
152
160
  }
153
161
  }
@@ -178,17 +186,21 @@ $root.bytes = (function() {
178
186
  * @param {Object.<string,*>} message Plain object to verify
179
187
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
180
188
  */
181
- SpliceRequestBody.verify = function verify(message) {
189
+ SpliceRequestBody.verify = function verify(message, long) {
182
190
  if (typeof message !== "object" || message === null)
183
191
  return "object expected";
184
- if (message.pos != null && message.hasOwnProperty("pos"))
192
+ if (long === undefined)
193
+ long = 0;
194
+ if (long > $util.recursionLimit)
195
+ return "maximum nesting depth exceeded";
196
+ if (message.pos != null && Object.hasOwnProperty.call(message, "pos"))
185
197
  if (!$util.isInteger(message.pos) && !(message.pos && $util.isInteger(message.pos.low) && $util.isInteger(message.pos.high)))
186
198
  return "pos: integer|Long expected";
187
- if (message.del != null && message.hasOwnProperty("del"))
199
+ if (message.del != null && Object.hasOwnProperty.call(message, "del"))
188
200
  if (!$util.isInteger(message.del) && !(message.del && $util.isInteger(message.del.low) && $util.isInteger(message.del.high)))
189
201
  return "del: integer|Long expected";
190
- if (message.bytes != null && message.hasOwnProperty("bytes")) {
191
- var error = $root.common.BytesValue.verify(message.bytes);
202
+ if (message.bytes != null && Object.hasOwnProperty.call(message, "bytes")) {
203
+ var error = $root.common.BytesValue.verify(message.bytes, long + 1);
192
204
  if (error)
193
205
  return "bytes." + error;
194
206
  }
@@ -203,13 +215,19 @@ $root.bytes = (function() {
203
215
  * @param {Object.<string,*>} object Plain object
204
216
  * @returns {bytes.SpliceRequestBody} SpliceRequestBody
205
217
  */
206
- SpliceRequestBody.fromObject = function fromObject(object) {
218
+ SpliceRequestBody.fromObject = function fromObject(object, long) {
207
219
  if (object instanceof $root.bytes.SpliceRequestBody)
208
220
  return object;
221
+ if (!$util.isObject(object))
222
+ throw TypeError(".bytes.SpliceRequestBody: object expected");
223
+ if (long === undefined)
224
+ long = 0;
225
+ if (long > $util.recursionLimit)
226
+ throw Error("maximum nesting depth exceeded");
209
227
  var message = new $root.bytes.SpliceRequestBody();
210
228
  if (object.pos != null)
211
229
  if ($util.Long)
212
- (message.pos = $util.Long.fromValue(object.pos)).unsigned = true;
230
+ message.pos = $util.Long.fromValue(object.pos, true);
213
231
  else if (typeof object.pos === "string")
214
232
  message.pos = parseInt(object.pos, 10);
215
233
  else if (typeof object.pos === "number")
@@ -218,7 +236,7 @@ $root.bytes = (function() {
218
236
  message.pos = new $util.LongBits(object.pos.low >>> 0, object.pos.high >>> 0).toNumber(true);
219
237
  if (object.del != null)
220
238
  if ($util.Long)
221
- (message.del = $util.Long.fromValue(object.del)).unsigned = true;
239
+ message.del = $util.Long.fromValue(object.del, true);
222
240
  else if (typeof object.del === "string")
223
241
  message.del = parseInt(object.del, 10);
224
242
  else if (typeof object.del === "number")
@@ -226,9 +244,9 @@ $root.bytes = (function() {
226
244
  else if (typeof object.del === "object")
227
245
  message.del = new $util.LongBits(object.del.low >>> 0, object.del.high >>> 0).toNumber(true);
228
246
  if (object.bytes != null) {
229
- if (typeof object.bytes !== "object")
247
+ if (!$util.isObject(object.bytes))
230
248
  throw TypeError(".bytes.SpliceRequestBody.bytes: object expected");
231
- message.bytes = $root.common.BytesValue.fromObject(object.bytes);
249
+ message.bytes = $root.common.BytesValue.fromObject(object.bytes, long + 1);
232
250
  }
233
251
  return message;
234
252
  };
@@ -242,35 +260,43 @@ $root.bytes = (function() {
242
260
  * @param {$protobuf.IConversionOptions} [options] Conversion options
243
261
  * @returns {Object.<string,*>} Plain object
244
262
  */
245
- SpliceRequestBody.toObject = function toObject(message, options) {
263
+ SpliceRequestBody.toObject = function toObject(message, options, q) {
246
264
  if (!options)
247
265
  options = {};
266
+ if (q === undefined)
267
+ q = 0;
268
+ if (q > $util.recursionLimit)
269
+ throw Error("max depth exceeded");
248
270
  var object = {};
249
271
  if (options.defaults) {
250
272
  if ($util.Long) {
251
273
  var long = new $util.Long(0, 0, true);
252
- object.pos = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
274
+ object.pos = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long;
253
275
  } else
254
- object.pos = options.longs === String ? "0" : 0;
276
+ object.pos = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0;
255
277
  if ($util.Long) {
256
278
  var long = new $util.Long(0, 0, true);
257
- object.del = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
279
+ object.del = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long;
258
280
  } else
259
- object.del = options.longs === String ? "0" : 0;
281
+ object.del = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0;
260
282
  object.bytes = null;
261
283
  }
262
- if (message.pos != null && message.hasOwnProperty("pos"))
263
- if (typeof message.pos === "number")
284
+ if (message.pos != null && Object.hasOwnProperty.call(message, "pos"))
285
+ if (typeof BigInt !== "undefined" && options.longs === BigInt)
286
+ object.pos = typeof message.pos === "number" ? BigInt(message.pos) : $util.Long.fromBits(message.pos.low >>> 0, message.pos.high >>> 0, true).toBigInt();
287
+ else if (typeof message.pos === "number")
264
288
  object.pos = options.longs === String ? String(message.pos) : message.pos;
265
289
  else
266
290
  object.pos = options.longs === String ? $util.Long.prototype.toString.call(message.pos) : options.longs === Number ? new $util.LongBits(message.pos.low >>> 0, message.pos.high >>> 0).toNumber(true) : message.pos;
267
- if (message.del != null && message.hasOwnProperty("del"))
268
- if (typeof message.del === "number")
291
+ if (message.del != null && Object.hasOwnProperty.call(message, "del"))
292
+ if (typeof BigInt !== "undefined" && options.longs === BigInt)
293
+ object.del = typeof message.del === "number" ? BigInt(message.del) : $util.Long.fromBits(message.del.low >>> 0, message.del.high >>> 0, true).toBigInt();
294
+ else if (typeof message.del === "number")
269
295
  object.del = options.longs === String ? String(message.del) : message.del;
270
296
  else
271
297
  object.del = options.longs === String ? $util.Long.prototype.toString.call(message.del) : options.longs === Number ? new $util.LongBits(message.del.low >>> 0, message.del.high >>> 0).toNumber(true) : message.del;
272
- if (message.bytes != null && message.hasOwnProperty("bytes"))
273
- object.bytes = $root.common.BytesValue.toObject(message.bytes, options);
298
+ if (message.bytes != null && Object.hasOwnProperty.call(message, "bytes"))
299
+ object.bytes = $root.common.BytesValue.toObject(message.bytes, options, q + 1);
274
300
  return object;
275
301
  };
276
302
 
@@ -323,7 +349,7 @@ $root.bytes = (function() {
323
349
  function TruncateRequestBody(properties) {
324
350
  if (properties)
325
351
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
326
- if (properties[keys[i]] != null)
352
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
327
353
  this[keys[i]] = properties[keys[i]];
328
354
  }
329
355
 
@@ -356,9 +382,13 @@ $root.bytes = (function() {
356
382
  * @param {$protobuf.Writer} [writer] Writer to encode to
357
383
  * @returns {$protobuf.Writer} Writer
358
384
  */
359
- TruncateRequestBody.encode = function encode(message, writer) {
385
+ TruncateRequestBody.encode = function encode(message, writer, q) {
360
386
  if (!writer)
361
387
  writer = $Writer.create();
388
+ if (q === undefined)
389
+ q = 0;
390
+ if (q > $util.recursionLimit)
391
+ throw Error("max depth exceeded");
362
392
  if (message.size != null && Object.hasOwnProperty.call(message, "size"))
363
393
  writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.size);
364
394
  return writer;
@@ -374,7 +404,7 @@ $root.bytes = (function() {
374
404
  * @returns {$protobuf.Writer} Writer
375
405
  */
376
406
  TruncateRequestBody.encodeDelimited = function encodeDelimited(message, writer) {
377
- return this.encode(message, writer).ldelim();
407
+ return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();
378
408
  };
379
409
 
380
410
  /**
@@ -388,9 +418,13 @@ $root.bytes = (function() {
388
418
  * @throws {Error} If the payload is not a reader or valid buffer
389
419
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
390
420
  */
391
- TruncateRequestBody.decode = function decode(reader, length, error) {
421
+ TruncateRequestBody.decode = function decode(reader, length, error, long) {
392
422
  if (!(reader instanceof $Reader))
393
423
  reader = $Reader.create(reader);
424
+ if (long === undefined)
425
+ long = 0;
426
+ if (long > $Reader.recursionLimit)
427
+ throw Error("maximum nesting depth exceeded");
394
428
  var end = length === undefined ? reader.len : reader.pos + length, message = new $root.bytes.TruncateRequestBody();
395
429
  while (reader.pos < end) {
396
430
  var tag = reader.uint32();
@@ -402,7 +436,7 @@ $root.bytes = (function() {
402
436
  break;
403
437
  }
404
438
  default:
405
- reader.skipType(tag & 7);
439
+ reader.skipType(tag & 7, long);
406
440
  break;
407
441
  }
408
442
  }
@@ -433,10 +467,14 @@ $root.bytes = (function() {
433
467
  * @param {Object.<string,*>} message Plain object to verify
434
468
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
435
469
  */
436
- TruncateRequestBody.verify = function verify(message) {
470
+ TruncateRequestBody.verify = function verify(message, long) {
437
471
  if (typeof message !== "object" || message === null)
438
472
  return "object expected";
439
- if (message.size != null && message.hasOwnProperty("size"))
473
+ if (long === undefined)
474
+ long = 0;
475
+ if (long > $util.recursionLimit)
476
+ return "maximum nesting depth exceeded";
477
+ if (message.size != null && Object.hasOwnProperty.call(message, "size"))
440
478
  if (!$util.isInteger(message.size) && !(message.size && $util.isInteger(message.size.low) && $util.isInteger(message.size.high)))
441
479
  return "size: integer|Long expected";
442
480
  return null;
@@ -450,13 +488,19 @@ $root.bytes = (function() {
450
488
  * @param {Object.<string,*>} object Plain object
451
489
  * @returns {bytes.TruncateRequestBody} TruncateRequestBody
452
490
  */
453
- TruncateRequestBody.fromObject = function fromObject(object) {
491
+ TruncateRequestBody.fromObject = function fromObject(object, long) {
454
492
  if (object instanceof $root.bytes.TruncateRequestBody)
455
493
  return object;
494
+ if (!$util.isObject(object))
495
+ throw TypeError(".bytes.TruncateRequestBody: object expected");
496
+ if (long === undefined)
497
+ long = 0;
498
+ if (long > $util.recursionLimit)
499
+ throw Error("maximum nesting depth exceeded");
456
500
  var message = new $root.bytes.TruncateRequestBody();
457
501
  if (object.size != null)
458
502
  if ($util.Long)
459
- (message.size = $util.Long.fromValue(object.size)).unsigned = true;
503
+ message.size = $util.Long.fromValue(object.size, true);
460
504
  else if (typeof object.size === "string")
461
505
  message.size = parseInt(object.size, 10);
462
506
  else if (typeof object.size === "number")
@@ -475,18 +519,24 @@ $root.bytes = (function() {
475
519
  * @param {$protobuf.IConversionOptions} [options] Conversion options
476
520
  * @returns {Object.<string,*>} Plain object
477
521
  */
478
- TruncateRequestBody.toObject = function toObject(message, options) {
522
+ TruncateRequestBody.toObject = function toObject(message, options, q) {
479
523
  if (!options)
480
524
  options = {};
525
+ if (q === undefined)
526
+ q = 0;
527
+ if (q > $util.recursionLimit)
528
+ throw Error("max depth exceeded");
481
529
  var object = {};
482
530
  if (options.defaults)
483
531
  if ($util.Long) {
484
532
  var long = new $util.Long(0, 0, true);
485
- object.size = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
533
+ object.size = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long;
486
534
  } else
487
- object.size = options.longs === String ? "0" : 0;
488
- if (message.size != null && message.hasOwnProperty("size"))
489
- if (typeof message.size === "number")
535
+ object.size = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0;
536
+ if (message.size != null && Object.hasOwnProperty.call(message, "size"))
537
+ if (typeof BigInt !== "undefined" && options.longs === BigInt)
538
+ object.size = typeof message.size === "number" ? BigInt(message.size) : $util.Long.fromBits(message.size.low >>> 0, message.size.high >>> 0, true).toBigInt();
539
+ else if (typeof message.size === "number")
490
540
  object.size = options.longs === String ? String(message.size) : message.size;
491
541
  else
492
542
  object.size = options.longs === String ? $util.Long.prototype.toString.call(message.size) : options.longs === Number ? new $util.LongBits(message.size.low >>> 0, message.size.high >>> 0).toNumber(true) : message.size;
@@ -544,7 +594,7 @@ $root.bytes = (function() {
544
594
  this.sections = [];
545
595
  if (properties)
546
596
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
547
- if (properties[keys[i]] != null)
597
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
548
598
  this[keys[i]] = properties[keys[i]];
549
599
  }
550
600
 
@@ -585,14 +635,18 @@ $root.bytes = (function() {
585
635
  * @param {$protobuf.Writer} [writer] Writer to encode to
586
636
  * @returns {$protobuf.Writer} Writer
587
637
  */
588
- FileLayoutMsg.encode = function encode(message, writer) {
638
+ FileLayoutMsg.encode = function encode(message, writer, q) {
589
639
  if (!writer)
590
640
  writer = $Writer.create();
641
+ if (q === undefined)
642
+ q = 0;
643
+ if (q > $util.recursionLimit)
644
+ throw Error("max depth exceeded");
591
645
  if (message.base != null && Object.hasOwnProperty.call(message, "base"))
592
- $root.common.UInt64Value.encode(message.base, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
646
+ $root.common.UInt64Value.encode(message.base, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim();
593
647
  if (message.sections != null && message.sections.length)
594
648
  for (var i = 0; i < message.sections.length; ++i)
595
- $root.bytes.FileLayoutMsg.LayoutSection.encode(message.sections[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
649
+ $root.bytes.FileLayoutMsg.LayoutSection.encode(message.sections[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim();
596
650
  return writer;
597
651
  };
598
652
 
@@ -606,7 +660,7 @@ $root.bytes = (function() {
606
660
  * @returns {$protobuf.Writer} Writer
607
661
  */
608
662
  FileLayoutMsg.encodeDelimited = function encodeDelimited(message, writer) {
609
- return this.encode(message, writer).ldelim();
663
+ return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();
610
664
  };
611
665
 
612
666
  /**
@@ -620,9 +674,13 @@ $root.bytes = (function() {
620
674
  * @throws {Error} If the payload is not a reader or valid buffer
621
675
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
622
676
  */
623
- FileLayoutMsg.decode = function decode(reader, length, error) {
677
+ FileLayoutMsg.decode = function decode(reader, length, error, long) {
624
678
  if (!(reader instanceof $Reader))
625
679
  reader = $Reader.create(reader);
680
+ if (long === undefined)
681
+ long = 0;
682
+ if (long > $Reader.recursionLimit)
683
+ throw Error("maximum nesting depth exceeded");
626
684
  var end = length === undefined ? reader.len : reader.pos + length, message = new $root.bytes.FileLayoutMsg();
627
685
  while (reader.pos < end) {
628
686
  var tag = reader.uint32();
@@ -630,17 +688,17 @@ $root.bytes = (function() {
630
688
  break;
631
689
  switch (tag >>> 3) {
632
690
  case 1: {
633
- message.base = $root.common.UInt64Value.decode(reader, reader.uint32());
691
+ message.base = $root.common.UInt64Value.decode(reader, reader.uint32(), undefined, long + 1);
634
692
  break;
635
693
  }
636
694
  case 2: {
637
695
  if (!(message.sections && message.sections.length))
638
696
  message.sections = [];
639
- message.sections.push($root.bytes.FileLayoutMsg.LayoutSection.decode(reader, reader.uint32()));
697
+ message.sections.push($root.bytes.FileLayoutMsg.LayoutSection.decode(reader, reader.uint32(), undefined, long + 1));
640
698
  break;
641
699
  }
642
700
  default:
643
- reader.skipType(tag & 7);
701
+ reader.skipType(tag & 7, long);
644
702
  break;
645
703
  }
646
704
  }
@@ -671,19 +729,23 @@ $root.bytes = (function() {
671
729
  * @param {Object.<string,*>} message Plain object to verify
672
730
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
673
731
  */
674
- FileLayoutMsg.verify = function verify(message) {
732
+ FileLayoutMsg.verify = function verify(message, long) {
675
733
  if (typeof message !== "object" || message === null)
676
734
  return "object expected";
677
- if (message.base != null && message.hasOwnProperty("base")) {
678
- var error = $root.common.UInt64Value.verify(message.base);
735
+ if (long === undefined)
736
+ long = 0;
737
+ if (long > $util.recursionLimit)
738
+ return "maximum nesting depth exceeded";
739
+ if (message.base != null && Object.hasOwnProperty.call(message, "base")) {
740
+ var error = $root.common.UInt64Value.verify(message.base, long + 1);
679
741
  if (error)
680
742
  return "base." + error;
681
743
  }
682
- if (message.sections != null && message.hasOwnProperty("sections")) {
744
+ if (message.sections != null && Object.hasOwnProperty.call(message, "sections")) {
683
745
  if (!Array.isArray(message.sections))
684
746
  return "sections: array expected";
685
747
  for (var i = 0; i < message.sections.length; ++i) {
686
- var error = $root.bytes.FileLayoutMsg.LayoutSection.verify(message.sections[i]);
748
+ var error = $root.bytes.FileLayoutMsg.LayoutSection.verify(message.sections[i], long + 1);
687
749
  if (error)
688
750
  return "sections." + error;
689
751
  }
@@ -699,23 +761,29 @@ $root.bytes = (function() {
699
761
  * @param {Object.<string,*>} object Plain object
700
762
  * @returns {bytes.FileLayoutMsg} FileLayoutMsg
701
763
  */
702
- FileLayoutMsg.fromObject = function fromObject(object) {
764
+ FileLayoutMsg.fromObject = function fromObject(object, long) {
703
765
  if (object instanceof $root.bytes.FileLayoutMsg)
704
766
  return object;
767
+ if (!$util.isObject(object))
768
+ throw TypeError(".bytes.FileLayoutMsg: object expected");
769
+ if (long === undefined)
770
+ long = 0;
771
+ if (long > $util.recursionLimit)
772
+ throw Error("maximum nesting depth exceeded");
705
773
  var message = new $root.bytes.FileLayoutMsg();
706
774
  if (object.base != null) {
707
- if (typeof object.base !== "object")
775
+ if (!$util.isObject(object.base))
708
776
  throw TypeError(".bytes.FileLayoutMsg.base: object expected");
709
- message.base = $root.common.UInt64Value.fromObject(object.base);
777
+ message.base = $root.common.UInt64Value.fromObject(object.base, long + 1);
710
778
  }
711
779
  if (object.sections) {
712
780
  if (!Array.isArray(object.sections))
713
781
  throw TypeError(".bytes.FileLayoutMsg.sections: array expected");
714
782
  message.sections = [];
715
783
  for (var i = 0; i < object.sections.length; ++i) {
716
- if (typeof object.sections[i] !== "object")
784
+ if (!$util.isObject(object.sections[i]))
717
785
  throw TypeError(".bytes.FileLayoutMsg.sections: object expected");
718
- message.sections[i] = $root.bytes.FileLayoutMsg.LayoutSection.fromObject(object.sections[i]);
786
+ message.sections[i] = $root.bytes.FileLayoutMsg.LayoutSection.fromObject(object.sections[i], long + 1);
719
787
  }
720
788
  }
721
789
  return message;
@@ -730,20 +798,24 @@ $root.bytes = (function() {
730
798
  * @param {$protobuf.IConversionOptions} [options] Conversion options
731
799
  * @returns {Object.<string,*>} Plain object
732
800
  */
733
- FileLayoutMsg.toObject = function toObject(message, options) {
801
+ FileLayoutMsg.toObject = function toObject(message, options, q) {
734
802
  if (!options)
735
803
  options = {};
804
+ if (q === undefined)
805
+ q = 0;
806
+ if (q > $util.recursionLimit)
807
+ throw Error("max depth exceeded");
736
808
  var object = {};
737
809
  if (options.arrays || options.defaults)
738
810
  object.sections = [];
739
811
  if (options.defaults)
740
812
  object.base = null;
741
- if (message.base != null && message.hasOwnProperty("base"))
742
- object.base = $root.common.UInt64Value.toObject(message.base, options);
813
+ if (message.base != null && Object.hasOwnProperty.call(message, "base"))
814
+ object.base = $root.common.UInt64Value.toObject(message.base, options, q + 1);
743
815
  if (message.sections && message.sections.length) {
744
816
  object.sections = [];
745
817
  for (var j = 0; j < message.sections.length; ++j)
746
- object.sections[j] = $root.bytes.FileLayoutMsg.LayoutSection.toObject(message.sections[j], options);
818
+ object.sections[j] = $root.bytes.FileLayoutMsg.LayoutSection.toObject(message.sections[j], options, q + 1);
747
819
  }
748
820
  return object;
749
821
  };
@@ -796,7 +868,7 @@ $root.bytes = (function() {
796
868
  function LayoutSection(properties) {
797
869
  if (properties)
798
870
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
799
- if (properties[keys[i]] != null)
871
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
800
872
  this[keys[i]] = properties[keys[i]];
801
873
  }
802
874
 
@@ -845,9 +917,13 @@ $root.bytes = (function() {
845
917
  * @param {$protobuf.Writer} [writer] Writer to encode to
846
918
  * @returns {$protobuf.Writer} Writer
847
919
  */
848
- LayoutSection.encode = function encode(message, writer) {
920
+ LayoutSection.encode = function encode(message, writer, q) {
849
921
  if (!writer)
850
922
  writer = $Writer.create();
923
+ if (q === undefined)
924
+ q = 0;
925
+ if (q > $util.recursionLimit)
926
+ throw Error("max depth exceeded");
851
927
  if (message.src != null && Object.hasOwnProperty.call(message, "src"))
852
928
  writer.uint32(/* id 1, wireType 2 =*/10).string(message.src);
853
929
  if (message.ofs != null && Object.hasOwnProperty.call(message, "ofs"))
@@ -867,7 +943,7 @@ $root.bytes = (function() {
867
943
  * @returns {$protobuf.Writer} Writer
868
944
  */
869
945
  LayoutSection.encodeDelimited = function encodeDelimited(message, writer) {
870
- return this.encode(message, writer).ldelim();
946
+ return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();
871
947
  };
872
948
 
873
949
  /**
@@ -881,9 +957,13 @@ $root.bytes = (function() {
881
957
  * @throws {Error} If the payload is not a reader or valid buffer
882
958
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
883
959
  */
884
- LayoutSection.decode = function decode(reader, length, error) {
960
+ LayoutSection.decode = function decode(reader, length, error, long) {
885
961
  if (!(reader instanceof $Reader))
886
962
  reader = $Reader.create(reader);
963
+ if (long === undefined)
964
+ long = 0;
965
+ if (long > $Reader.recursionLimit)
966
+ throw Error("maximum nesting depth exceeded");
887
967
  var end = length === undefined ? reader.len : reader.pos + length, message = new $root.bytes.FileLayoutMsg.LayoutSection();
888
968
  while (reader.pos < end) {
889
969
  var tag = reader.uint32();
@@ -903,7 +983,7 @@ $root.bytes = (function() {
903
983
  break;
904
984
  }
905
985
  default:
906
- reader.skipType(tag & 7);
986
+ reader.skipType(tag & 7, long);
907
987
  break;
908
988
  }
909
989
  }
@@ -934,16 +1014,20 @@ $root.bytes = (function() {
934
1014
  * @param {Object.<string,*>} message Plain object to verify
935
1015
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
936
1016
  */
937
- LayoutSection.verify = function verify(message) {
1017
+ LayoutSection.verify = function verify(message, long) {
938
1018
  if (typeof message !== "object" || message === null)
939
1019
  return "object expected";
940
- if (message.src != null && message.hasOwnProperty("src"))
1020
+ if (long === undefined)
1021
+ long = 0;
1022
+ if (long > $util.recursionLimit)
1023
+ return "maximum nesting depth exceeded";
1024
+ if (message.src != null && Object.hasOwnProperty.call(message, "src"))
941
1025
  if (!$util.isString(message.src))
942
1026
  return "src: string expected";
943
- if (message.ofs != null && message.hasOwnProperty("ofs"))
1027
+ if (message.ofs != null && Object.hasOwnProperty.call(message, "ofs"))
944
1028
  if (!$util.isInteger(message.ofs) && !(message.ofs && $util.isInteger(message.ofs.low) && $util.isInteger(message.ofs.high)))
945
1029
  return "ofs: integer|Long expected";
946
- if (message.len != null && message.hasOwnProperty("len"))
1030
+ if (message.len != null && Object.hasOwnProperty.call(message, "len"))
947
1031
  if (!$util.isInteger(message.len) && !(message.len && $util.isInteger(message.len.low) && $util.isInteger(message.len.high)))
948
1032
  return "len: integer|Long expected";
949
1033
  return null;
@@ -957,15 +1041,21 @@ $root.bytes = (function() {
957
1041
  * @param {Object.<string,*>} object Plain object
958
1042
  * @returns {bytes.FileLayoutMsg.LayoutSection} LayoutSection
959
1043
  */
960
- LayoutSection.fromObject = function fromObject(object) {
1044
+ LayoutSection.fromObject = function fromObject(object, long) {
961
1045
  if (object instanceof $root.bytes.FileLayoutMsg.LayoutSection)
962
1046
  return object;
1047
+ if (!$util.isObject(object))
1048
+ throw TypeError(".bytes.FileLayoutMsg.LayoutSection: object expected");
1049
+ if (long === undefined)
1050
+ long = 0;
1051
+ if (long > $util.recursionLimit)
1052
+ throw Error("maximum nesting depth exceeded");
963
1053
  var message = new $root.bytes.FileLayoutMsg.LayoutSection();
964
1054
  if (object.src != null)
965
1055
  message.src = String(object.src);
966
1056
  if (object.ofs != null)
967
1057
  if ($util.Long)
968
- (message.ofs = $util.Long.fromValue(object.ofs)).unsigned = true;
1058
+ message.ofs = $util.Long.fromValue(object.ofs, true);
969
1059
  else if (typeof object.ofs === "string")
970
1060
  message.ofs = parseInt(object.ofs, 10);
971
1061
  else if (typeof object.ofs === "number")
@@ -974,7 +1064,7 @@ $root.bytes = (function() {
974
1064
  message.ofs = new $util.LongBits(object.ofs.low >>> 0, object.ofs.high >>> 0).toNumber(true);
975
1065
  if (object.len != null)
976
1066
  if ($util.Long)
977
- (message.len = $util.Long.fromValue(object.len)).unsigned = true;
1067
+ message.len = $util.Long.fromValue(object.len, true);
978
1068
  else if (typeof object.len === "string")
979
1069
  message.len = parseInt(object.len, 10);
980
1070
  else if (typeof object.len === "number")
@@ -993,32 +1083,40 @@ $root.bytes = (function() {
993
1083
  * @param {$protobuf.IConversionOptions} [options] Conversion options
994
1084
  * @returns {Object.<string,*>} Plain object
995
1085
  */
996
- LayoutSection.toObject = function toObject(message, options) {
1086
+ LayoutSection.toObject = function toObject(message, options, q) {
997
1087
  if (!options)
998
1088
  options = {};
1089
+ if (q === undefined)
1090
+ q = 0;
1091
+ if (q > $util.recursionLimit)
1092
+ throw Error("max depth exceeded");
999
1093
  var object = {};
1000
1094
  if (options.defaults) {
1001
1095
  object.src = "";
1002
1096
  if ($util.Long) {
1003
1097
  var long = new $util.Long(0, 0, true);
1004
- object.ofs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
1098
+ object.ofs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long;
1005
1099
  } else
1006
- object.ofs = options.longs === String ? "0" : 0;
1100
+ object.ofs = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0;
1007
1101
  if ($util.Long) {
1008
1102
  var long = new $util.Long(0, 0, true);
1009
- object.len = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
1103
+ object.len = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long;
1010
1104
  } else
1011
- object.len = options.longs === String ? "0" : 0;
1105
+ object.len = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0;
1012
1106
  }
1013
- if (message.src != null && message.hasOwnProperty("src"))
1107
+ if (message.src != null && Object.hasOwnProperty.call(message, "src"))
1014
1108
  object.src = message.src;
1015
- if (message.ofs != null && message.hasOwnProperty("ofs"))
1016
- if (typeof message.ofs === "number")
1109
+ if (message.ofs != null && Object.hasOwnProperty.call(message, "ofs"))
1110
+ if (typeof BigInt !== "undefined" && options.longs === BigInt)
1111
+ object.ofs = typeof message.ofs === "number" ? BigInt(message.ofs) : $util.Long.fromBits(message.ofs.low >>> 0, message.ofs.high >>> 0, true).toBigInt();
1112
+ else if (typeof message.ofs === "number")
1017
1113
  object.ofs = options.longs === String ? String(message.ofs) : message.ofs;
1018
1114
  else
1019
1115
  object.ofs = options.longs === String ? $util.Long.prototype.toString.call(message.ofs) : options.longs === Number ? new $util.LongBits(message.ofs.low >>> 0, message.ofs.high >>> 0).toNumber(true) : message.ofs;
1020
- if (message.len != null && message.hasOwnProperty("len"))
1021
- if (typeof message.len === "number")
1116
+ if (message.len != null && Object.hasOwnProperty.call(message, "len"))
1117
+ if (typeof BigInt !== "undefined" && options.longs === BigInt)
1118
+ object.len = typeof message.len === "number" ? BigInt(message.len) : $util.Long.fromBits(message.len.low >>> 0, message.len.high >>> 0, true).toBigInt();
1119
+ else if (typeof message.len === "number")
1022
1120
  object.len = options.longs === String ? String(message.len) : message.len;
1023
1121
  else
1024
1122
  object.len = options.longs === String ? $util.Long.prototype.toString.call(message.len) : options.longs === Number ? new $util.LongBits(message.len.low >>> 0, message.len.high >>> 0).toNumber(true) : message.len;
@@ -1077,7 +1175,7 @@ $root.bytes = (function() {
1077
1175
  function DoneRequestBody(properties) {
1078
1176
  if (properties)
1079
1177
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
1080
- if (properties[keys[i]] != null)
1178
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
1081
1179
  this[keys[i]] = properties[keys[i]];
1082
1180
  }
1083
1181
 
@@ -1110,11 +1208,15 @@ $root.bytes = (function() {
1110
1208
  * @param {$protobuf.Writer} [writer] Writer to encode to
1111
1209
  * @returns {$protobuf.Writer} Writer
1112
1210
  */
1113
- DoneRequestBody.encode = function encode(message, writer) {
1211
+ DoneRequestBody.encode = function encode(message, writer, q) {
1114
1212
  if (!writer)
1115
1213
  writer = $Writer.create();
1214
+ if (q === undefined)
1215
+ q = 0;
1216
+ if (q > $util.recursionLimit)
1217
+ throw Error("max depth exceeded");
1116
1218
  if (message.err != null && Object.hasOwnProperty.call(message, "err"))
1117
- $root.common.ErrorValue.encode(message.err, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
1219
+ $root.common.ErrorValue.encode(message.err, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim();
1118
1220
  return writer;
1119
1221
  };
1120
1222
 
@@ -1128,7 +1230,7 @@ $root.bytes = (function() {
1128
1230
  * @returns {$protobuf.Writer} Writer
1129
1231
  */
1130
1232
  DoneRequestBody.encodeDelimited = function encodeDelimited(message, writer) {
1131
- return this.encode(message, writer).ldelim();
1233
+ return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();
1132
1234
  };
1133
1235
 
1134
1236
  /**
@@ -1142,9 +1244,13 @@ $root.bytes = (function() {
1142
1244
  * @throws {Error} If the payload is not a reader or valid buffer
1143
1245
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
1144
1246
  */
1145
- DoneRequestBody.decode = function decode(reader, length, error) {
1247
+ DoneRequestBody.decode = function decode(reader, length, error, long) {
1146
1248
  if (!(reader instanceof $Reader))
1147
1249
  reader = $Reader.create(reader);
1250
+ if (long === undefined)
1251
+ long = 0;
1252
+ if (long > $Reader.recursionLimit)
1253
+ throw Error("maximum nesting depth exceeded");
1148
1254
  var end = length === undefined ? reader.len : reader.pos + length, message = new $root.bytes.DoneRequestBody();
1149
1255
  while (reader.pos < end) {
1150
1256
  var tag = reader.uint32();
@@ -1152,11 +1258,11 @@ $root.bytes = (function() {
1152
1258
  break;
1153
1259
  switch (tag >>> 3) {
1154
1260
  case 1: {
1155
- message.err = $root.common.ErrorValue.decode(reader, reader.uint32());
1261
+ message.err = $root.common.ErrorValue.decode(reader, reader.uint32(), undefined, long + 1);
1156
1262
  break;
1157
1263
  }
1158
1264
  default:
1159
- reader.skipType(tag & 7);
1265
+ reader.skipType(tag & 7, long);
1160
1266
  break;
1161
1267
  }
1162
1268
  }
@@ -1187,11 +1293,15 @@ $root.bytes = (function() {
1187
1293
  * @param {Object.<string,*>} message Plain object to verify
1188
1294
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
1189
1295
  */
1190
- DoneRequestBody.verify = function verify(message) {
1296
+ DoneRequestBody.verify = function verify(message, long) {
1191
1297
  if (typeof message !== "object" || message === null)
1192
1298
  return "object expected";
1193
- if (message.err != null && message.hasOwnProperty("err")) {
1194
- var error = $root.common.ErrorValue.verify(message.err);
1299
+ if (long === undefined)
1300
+ long = 0;
1301
+ if (long > $util.recursionLimit)
1302
+ return "maximum nesting depth exceeded";
1303
+ if (message.err != null && Object.hasOwnProperty.call(message, "err")) {
1304
+ var error = $root.common.ErrorValue.verify(message.err, long + 1);
1195
1305
  if (error)
1196
1306
  return "err." + error;
1197
1307
  }
@@ -1206,14 +1316,20 @@ $root.bytes = (function() {
1206
1316
  * @param {Object.<string,*>} object Plain object
1207
1317
  * @returns {bytes.DoneRequestBody} DoneRequestBody
1208
1318
  */
1209
- DoneRequestBody.fromObject = function fromObject(object) {
1319
+ DoneRequestBody.fromObject = function fromObject(object, long) {
1210
1320
  if (object instanceof $root.bytes.DoneRequestBody)
1211
1321
  return object;
1322
+ if (!$util.isObject(object))
1323
+ throw TypeError(".bytes.DoneRequestBody: object expected");
1324
+ if (long === undefined)
1325
+ long = 0;
1326
+ if (long > $util.recursionLimit)
1327
+ throw Error("maximum nesting depth exceeded");
1212
1328
  var message = new $root.bytes.DoneRequestBody();
1213
1329
  if (object.err != null) {
1214
- if (typeof object.err !== "object")
1330
+ if (!$util.isObject(object.err))
1215
1331
  throw TypeError(".bytes.DoneRequestBody.err: object expected");
1216
- message.err = $root.common.ErrorValue.fromObject(object.err);
1332
+ message.err = $root.common.ErrorValue.fromObject(object.err, long + 1);
1217
1333
  }
1218
1334
  return message;
1219
1335
  };
@@ -1227,14 +1343,18 @@ $root.bytes = (function() {
1227
1343
  * @param {$protobuf.IConversionOptions} [options] Conversion options
1228
1344
  * @returns {Object.<string,*>} Plain object
1229
1345
  */
1230
- DoneRequestBody.toObject = function toObject(message, options) {
1346
+ DoneRequestBody.toObject = function toObject(message, options, q) {
1231
1347
  if (!options)
1232
1348
  options = {};
1349
+ if (q === undefined)
1350
+ q = 0;
1351
+ if (q > $util.recursionLimit)
1352
+ throw Error("max depth exceeded");
1233
1353
  var object = {};
1234
1354
  if (options.defaults)
1235
1355
  object.err = null;
1236
- if (message.err != null && message.hasOwnProperty("err"))
1237
- object.err = $root.common.ErrorValue.toObject(message.err, options);
1356
+ if (message.err != null && Object.hasOwnProperty.call(message, "err"))
1357
+ object.err = $root.common.ErrorValue.toObject(message.err, options, q + 1);
1238
1358
  return object;
1239
1359
  };
1240
1360
 
@@ -1287,7 +1407,7 @@ $root.bytes = (function() {
1287
1407
  function ReadReplyBody(properties) {
1288
1408
  if (properties)
1289
1409
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
1290
- if (properties[keys[i]] != null)
1410
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
1291
1411
  this[keys[i]] = properties[keys[i]];
1292
1412
  }
1293
1413
 
@@ -1320,11 +1440,15 @@ $root.bytes = (function() {
1320
1440
  * @param {$protobuf.Writer} [writer] Writer to encode to
1321
1441
  * @returns {$protobuf.Writer} Writer
1322
1442
  */
1323
- ReadReplyBody.encode = function encode(message, writer) {
1443
+ ReadReplyBody.encode = function encode(message, writer, q) {
1324
1444
  if (!writer)
1325
1445
  writer = $Writer.create();
1446
+ if (q === undefined)
1447
+ q = 0;
1448
+ if (q > $util.recursionLimit)
1449
+ throw Error("max depth exceeded");
1326
1450
  if (message.bytes != null && Object.hasOwnProperty.call(message, "bytes"))
1327
- $root.common.BytesValue.encode(message.bytes, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
1451
+ $root.common.BytesValue.encode(message.bytes, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim();
1328
1452
  return writer;
1329
1453
  };
1330
1454
 
@@ -1338,7 +1462,7 @@ $root.bytes = (function() {
1338
1462
  * @returns {$protobuf.Writer} Writer
1339
1463
  */
1340
1464
  ReadReplyBody.encodeDelimited = function encodeDelimited(message, writer) {
1341
- return this.encode(message, writer).ldelim();
1465
+ return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();
1342
1466
  };
1343
1467
 
1344
1468
  /**
@@ -1352,9 +1476,13 @@ $root.bytes = (function() {
1352
1476
  * @throws {Error} If the payload is not a reader or valid buffer
1353
1477
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
1354
1478
  */
1355
- ReadReplyBody.decode = function decode(reader, length, error) {
1479
+ ReadReplyBody.decode = function decode(reader, length, error, long) {
1356
1480
  if (!(reader instanceof $Reader))
1357
1481
  reader = $Reader.create(reader);
1482
+ if (long === undefined)
1483
+ long = 0;
1484
+ if (long > $Reader.recursionLimit)
1485
+ throw Error("maximum nesting depth exceeded");
1358
1486
  var end = length === undefined ? reader.len : reader.pos + length, message = new $root.bytes.ReadReplyBody();
1359
1487
  while (reader.pos < end) {
1360
1488
  var tag = reader.uint32();
@@ -1362,11 +1490,11 @@ $root.bytes = (function() {
1362
1490
  break;
1363
1491
  switch (tag >>> 3) {
1364
1492
  case 1: {
1365
- message.bytes = $root.common.BytesValue.decode(reader, reader.uint32());
1493
+ message.bytes = $root.common.BytesValue.decode(reader, reader.uint32(), undefined, long + 1);
1366
1494
  break;
1367
1495
  }
1368
1496
  default:
1369
- reader.skipType(tag & 7);
1497
+ reader.skipType(tag & 7, long);
1370
1498
  break;
1371
1499
  }
1372
1500
  }
@@ -1397,11 +1525,15 @@ $root.bytes = (function() {
1397
1525
  * @param {Object.<string,*>} message Plain object to verify
1398
1526
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
1399
1527
  */
1400
- ReadReplyBody.verify = function verify(message) {
1528
+ ReadReplyBody.verify = function verify(message, long) {
1401
1529
  if (typeof message !== "object" || message === null)
1402
1530
  return "object expected";
1403
- if (message.bytes != null && message.hasOwnProperty("bytes")) {
1404
- var error = $root.common.BytesValue.verify(message.bytes);
1531
+ if (long === undefined)
1532
+ long = 0;
1533
+ if (long > $util.recursionLimit)
1534
+ return "maximum nesting depth exceeded";
1535
+ if (message.bytes != null && Object.hasOwnProperty.call(message, "bytes")) {
1536
+ var error = $root.common.BytesValue.verify(message.bytes, long + 1);
1405
1537
  if (error)
1406
1538
  return "bytes." + error;
1407
1539
  }
@@ -1416,14 +1548,20 @@ $root.bytes = (function() {
1416
1548
  * @param {Object.<string,*>} object Plain object
1417
1549
  * @returns {bytes.ReadReplyBody} ReadReplyBody
1418
1550
  */
1419
- ReadReplyBody.fromObject = function fromObject(object) {
1551
+ ReadReplyBody.fromObject = function fromObject(object, long) {
1420
1552
  if (object instanceof $root.bytes.ReadReplyBody)
1421
1553
  return object;
1554
+ if (!$util.isObject(object))
1555
+ throw TypeError(".bytes.ReadReplyBody: object expected");
1556
+ if (long === undefined)
1557
+ long = 0;
1558
+ if (long > $util.recursionLimit)
1559
+ throw Error("maximum nesting depth exceeded");
1422
1560
  var message = new $root.bytes.ReadReplyBody();
1423
1561
  if (object.bytes != null) {
1424
- if (typeof object.bytes !== "object")
1562
+ if (!$util.isObject(object.bytes))
1425
1563
  throw TypeError(".bytes.ReadReplyBody.bytes: object expected");
1426
- message.bytes = $root.common.BytesValue.fromObject(object.bytes);
1564
+ message.bytes = $root.common.BytesValue.fromObject(object.bytes, long + 1);
1427
1565
  }
1428
1566
  return message;
1429
1567
  };
@@ -1437,14 +1575,18 @@ $root.bytes = (function() {
1437
1575
  * @param {$protobuf.IConversionOptions} [options] Conversion options
1438
1576
  * @returns {Object.<string,*>} Plain object
1439
1577
  */
1440
- ReadReplyBody.toObject = function toObject(message, options) {
1578
+ ReadReplyBody.toObject = function toObject(message, options, q) {
1441
1579
  if (!options)
1442
1580
  options = {};
1581
+ if (q === undefined)
1582
+ q = 0;
1583
+ if (q > $util.recursionLimit)
1584
+ throw Error("max depth exceeded");
1443
1585
  var object = {};
1444
1586
  if (options.defaults)
1445
1587
  object.bytes = null;
1446
- if (message.bytes != null && message.hasOwnProperty("bytes"))
1447
- object.bytes = $root.common.BytesValue.toObject(message.bytes, options);
1588
+ if (message.bytes != null && Object.hasOwnProperty.call(message, "bytes"))
1589
+ object.bytes = $root.common.BytesValue.toObject(message.bytes, options, q + 1);
1448
1590
  return object;
1449
1591
  };
1450
1592
 
@@ -1497,7 +1639,7 @@ $root.bytes = (function() {
1497
1639
  function ReadNextRequestBody(properties) {
1498
1640
  if (properties)
1499
1641
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
1500
- if (properties[keys[i]] != null)
1642
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
1501
1643
  this[keys[i]] = properties[keys[i]];
1502
1644
  }
1503
1645
 
@@ -1530,11 +1672,15 @@ $root.bytes = (function() {
1530
1672
  * @param {$protobuf.Writer} [writer] Writer to encode to
1531
1673
  * @returns {$protobuf.Writer} Writer
1532
1674
  */
1533
- ReadNextRequestBody.encode = function encode(message, writer) {
1675
+ ReadNextRequestBody.encode = function encode(message, writer, q) {
1534
1676
  if (!writer)
1535
1677
  writer = $Writer.create();
1678
+ if (q === undefined)
1679
+ q = 0;
1680
+ if (q > $util.recursionLimit)
1681
+ throw Error("max depth exceeded");
1536
1682
  if (message.len != null && Object.hasOwnProperty.call(message, "len"))
1537
- $root.common.UInt64Value.encode(message.len, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
1683
+ $root.common.UInt64Value.encode(message.len, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim();
1538
1684
  return writer;
1539
1685
  };
1540
1686
 
@@ -1548,7 +1694,7 @@ $root.bytes = (function() {
1548
1694
  * @returns {$protobuf.Writer} Writer
1549
1695
  */
1550
1696
  ReadNextRequestBody.encodeDelimited = function encodeDelimited(message, writer) {
1551
- return this.encode(message, writer).ldelim();
1697
+ return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();
1552
1698
  };
1553
1699
 
1554
1700
  /**
@@ -1562,9 +1708,13 @@ $root.bytes = (function() {
1562
1708
  * @throws {Error} If the payload is not a reader or valid buffer
1563
1709
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
1564
1710
  */
1565
- ReadNextRequestBody.decode = function decode(reader, length, error) {
1711
+ ReadNextRequestBody.decode = function decode(reader, length, error, long) {
1566
1712
  if (!(reader instanceof $Reader))
1567
1713
  reader = $Reader.create(reader);
1714
+ if (long === undefined)
1715
+ long = 0;
1716
+ if (long > $Reader.recursionLimit)
1717
+ throw Error("maximum nesting depth exceeded");
1568
1718
  var end = length === undefined ? reader.len : reader.pos + length, message = new $root.bytes.ReadNextRequestBody();
1569
1719
  while (reader.pos < end) {
1570
1720
  var tag = reader.uint32();
@@ -1572,11 +1722,11 @@ $root.bytes = (function() {
1572
1722
  break;
1573
1723
  switch (tag >>> 3) {
1574
1724
  case 1: {
1575
- message.len = $root.common.UInt64Value.decode(reader, reader.uint32());
1725
+ message.len = $root.common.UInt64Value.decode(reader, reader.uint32(), undefined, long + 1);
1576
1726
  break;
1577
1727
  }
1578
1728
  default:
1579
- reader.skipType(tag & 7);
1729
+ reader.skipType(tag & 7, long);
1580
1730
  break;
1581
1731
  }
1582
1732
  }
@@ -1607,11 +1757,15 @@ $root.bytes = (function() {
1607
1757
  * @param {Object.<string,*>} message Plain object to verify
1608
1758
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
1609
1759
  */
1610
- ReadNextRequestBody.verify = function verify(message) {
1760
+ ReadNextRequestBody.verify = function verify(message, long) {
1611
1761
  if (typeof message !== "object" || message === null)
1612
1762
  return "object expected";
1613
- if (message.len != null && message.hasOwnProperty("len")) {
1614
- var error = $root.common.UInt64Value.verify(message.len);
1763
+ if (long === undefined)
1764
+ long = 0;
1765
+ if (long > $util.recursionLimit)
1766
+ return "maximum nesting depth exceeded";
1767
+ if (message.len != null && Object.hasOwnProperty.call(message, "len")) {
1768
+ var error = $root.common.UInt64Value.verify(message.len, long + 1);
1615
1769
  if (error)
1616
1770
  return "len." + error;
1617
1771
  }
@@ -1626,14 +1780,20 @@ $root.bytes = (function() {
1626
1780
  * @param {Object.<string,*>} object Plain object
1627
1781
  * @returns {bytes.ReadNextRequestBody} ReadNextRequestBody
1628
1782
  */
1629
- ReadNextRequestBody.fromObject = function fromObject(object) {
1783
+ ReadNextRequestBody.fromObject = function fromObject(object, long) {
1630
1784
  if (object instanceof $root.bytes.ReadNextRequestBody)
1631
1785
  return object;
1786
+ if (!$util.isObject(object))
1787
+ throw TypeError(".bytes.ReadNextRequestBody: object expected");
1788
+ if (long === undefined)
1789
+ long = 0;
1790
+ if (long > $util.recursionLimit)
1791
+ throw Error("maximum nesting depth exceeded");
1632
1792
  var message = new $root.bytes.ReadNextRequestBody();
1633
1793
  if (object.len != null) {
1634
- if (typeof object.len !== "object")
1794
+ if (!$util.isObject(object.len))
1635
1795
  throw TypeError(".bytes.ReadNextRequestBody.len: object expected");
1636
- message.len = $root.common.UInt64Value.fromObject(object.len);
1796
+ message.len = $root.common.UInt64Value.fromObject(object.len, long + 1);
1637
1797
  }
1638
1798
  return message;
1639
1799
  };
@@ -1647,14 +1807,18 @@ $root.bytes = (function() {
1647
1807
  * @param {$protobuf.IConversionOptions} [options] Conversion options
1648
1808
  * @returns {Object.<string,*>} Plain object
1649
1809
  */
1650
- ReadNextRequestBody.toObject = function toObject(message, options) {
1810
+ ReadNextRequestBody.toObject = function toObject(message, options, q) {
1651
1811
  if (!options)
1652
1812
  options = {};
1813
+ if (q === undefined)
1814
+ q = 0;
1815
+ if (q > $util.recursionLimit)
1816
+ throw Error("max depth exceeded");
1653
1817
  var object = {};
1654
1818
  if (options.defaults)
1655
1819
  object.len = null;
1656
- if (message.len != null && message.hasOwnProperty("len"))
1657
- object.len = $root.common.UInt64Value.toObject(message.len, options);
1820
+ if (message.len != null && Object.hasOwnProperty.call(message, "len"))
1821
+ object.len = $root.common.UInt64Value.toObject(message.len, options, q + 1);
1658
1822
  return object;
1659
1823
  };
1660
1824
 
@@ -1708,7 +1872,7 @@ $root.bytes = (function() {
1708
1872
  function ReadAtRequestBody(properties) {
1709
1873
  if (properties)
1710
1874
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
1711
- if (properties[keys[i]] != null)
1875
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
1712
1876
  this[keys[i]] = properties[keys[i]];
1713
1877
  }
1714
1878
 
@@ -1749,13 +1913,17 @@ $root.bytes = (function() {
1749
1913
  * @param {$protobuf.Writer} [writer] Writer to encode to
1750
1914
  * @returns {$protobuf.Writer} Writer
1751
1915
  */
1752
- ReadAtRequestBody.encode = function encode(message, writer) {
1916
+ ReadAtRequestBody.encode = function encode(message, writer, q) {
1753
1917
  if (!writer)
1754
1918
  writer = $Writer.create();
1919
+ if (q === undefined)
1920
+ q = 0;
1921
+ if (q > $util.recursionLimit)
1922
+ throw Error("max depth exceeded");
1755
1923
  if (message.pos != null && Object.hasOwnProperty.call(message, "pos"))
1756
1924
  writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.pos);
1757
1925
  if (message.len != null && Object.hasOwnProperty.call(message, "len"))
1758
- $root.common.UInt64Value.encode(message.len, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
1926
+ $root.common.UInt64Value.encode(message.len, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim();
1759
1927
  return writer;
1760
1928
  };
1761
1929
 
@@ -1769,7 +1937,7 @@ $root.bytes = (function() {
1769
1937
  * @returns {$protobuf.Writer} Writer
1770
1938
  */
1771
1939
  ReadAtRequestBody.encodeDelimited = function encodeDelimited(message, writer) {
1772
- return this.encode(message, writer).ldelim();
1940
+ return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();
1773
1941
  };
1774
1942
 
1775
1943
  /**
@@ -1783,9 +1951,13 @@ $root.bytes = (function() {
1783
1951
  * @throws {Error} If the payload is not a reader or valid buffer
1784
1952
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
1785
1953
  */
1786
- ReadAtRequestBody.decode = function decode(reader, length, error) {
1954
+ ReadAtRequestBody.decode = function decode(reader, length, error, long) {
1787
1955
  if (!(reader instanceof $Reader))
1788
1956
  reader = $Reader.create(reader);
1957
+ if (long === undefined)
1958
+ long = 0;
1959
+ if (long > $Reader.recursionLimit)
1960
+ throw Error("maximum nesting depth exceeded");
1789
1961
  var end = length === undefined ? reader.len : reader.pos + length, message = new $root.bytes.ReadAtRequestBody();
1790
1962
  while (reader.pos < end) {
1791
1963
  var tag = reader.uint32();
@@ -1797,11 +1969,11 @@ $root.bytes = (function() {
1797
1969
  break;
1798
1970
  }
1799
1971
  case 2: {
1800
- message.len = $root.common.UInt64Value.decode(reader, reader.uint32());
1972
+ message.len = $root.common.UInt64Value.decode(reader, reader.uint32(), undefined, long + 1);
1801
1973
  break;
1802
1974
  }
1803
1975
  default:
1804
- reader.skipType(tag & 7);
1976
+ reader.skipType(tag & 7, long);
1805
1977
  break;
1806
1978
  }
1807
1979
  }
@@ -1832,14 +2004,18 @@ $root.bytes = (function() {
1832
2004
  * @param {Object.<string,*>} message Plain object to verify
1833
2005
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
1834
2006
  */
1835
- ReadAtRequestBody.verify = function verify(message) {
2007
+ ReadAtRequestBody.verify = function verify(message, long) {
1836
2008
  if (typeof message !== "object" || message === null)
1837
2009
  return "object expected";
1838
- if (message.pos != null && message.hasOwnProperty("pos"))
2010
+ if (long === undefined)
2011
+ long = 0;
2012
+ if (long > $util.recursionLimit)
2013
+ return "maximum nesting depth exceeded";
2014
+ if (message.pos != null && Object.hasOwnProperty.call(message, "pos"))
1839
2015
  if (!$util.isInteger(message.pos) && !(message.pos && $util.isInteger(message.pos.low) && $util.isInteger(message.pos.high)))
1840
2016
  return "pos: integer|Long expected";
1841
- if (message.len != null && message.hasOwnProperty("len")) {
1842
- var error = $root.common.UInt64Value.verify(message.len);
2017
+ if (message.len != null && Object.hasOwnProperty.call(message, "len")) {
2018
+ var error = $root.common.UInt64Value.verify(message.len, long + 1);
1843
2019
  if (error)
1844
2020
  return "len." + error;
1845
2021
  }
@@ -1854,13 +2030,19 @@ $root.bytes = (function() {
1854
2030
  * @param {Object.<string,*>} object Plain object
1855
2031
  * @returns {bytes.ReadAtRequestBody} ReadAtRequestBody
1856
2032
  */
1857
- ReadAtRequestBody.fromObject = function fromObject(object) {
2033
+ ReadAtRequestBody.fromObject = function fromObject(object, long) {
1858
2034
  if (object instanceof $root.bytes.ReadAtRequestBody)
1859
2035
  return object;
2036
+ if (!$util.isObject(object))
2037
+ throw TypeError(".bytes.ReadAtRequestBody: object expected");
2038
+ if (long === undefined)
2039
+ long = 0;
2040
+ if (long > $util.recursionLimit)
2041
+ throw Error("maximum nesting depth exceeded");
1860
2042
  var message = new $root.bytes.ReadAtRequestBody();
1861
2043
  if (object.pos != null)
1862
2044
  if ($util.Long)
1863
- (message.pos = $util.Long.fromValue(object.pos)).unsigned = true;
2045
+ message.pos = $util.Long.fromValue(object.pos, true);
1864
2046
  else if (typeof object.pos === "string")
1865
2047
  message.pos = parseInt(object.pos, 10);
1866
2048
  else if (typeof object.pos === "number")
@@ -1868,9 +2050,9 @@ $root.bytes = (function() {
1868
2050
  else if (typeof object.pos === "object")
1869
2051
  message.pos = new $util.LongBits(object.pos.low >>> 0, object.pos.high >>> 0).toNumber(true);
1870
2052
  if (object.len != null) {
1871
- if (typeof object.len !== "object")
2053
+ if (!$util.isObject(object.len))
1872
2054
  throw TypeError(".bytes.ReadAtRequestBody.len: object expected");
1873
- message.len = $root.common.UInt64Value.fromObject(object.len);
2055
+ message.len = $root.common.UInt64Value.fromObject(object.len, long + 1);
1874
2056
  }
1875
2057
  return message;
1876
2058
  };
@@ -1884,25 +2066,31 @@ $root.bytes = (function() {
1884
2066
  * @param {$protobuf.IConversionOptions} [options] Conversion options
1885
2067
  * @returns {Object.<string,*>} Plain object
1886
2068
  */
1887
- ReadAtRequestBody.toObject = function toObject(message, options) {
2069
+ ReadAtRequestBody.toObject = function toObject(message, options, q) {
1888
2070
  if (!options)
1889
2071
  options = {};
2072
+ if (q === undefined)
2073
+ q = 0;
2074
+ if (q > $util.recursionLimit)
2075
+ throw Error("max depth exceeded");
1890
2076
  var object = {};
1891
2077
  if (options.defaults) {
1892
2078
  if ($util.Long) {
1893
2079
  var long = new $util.Long(0, 0, true);
1894
- object.pos = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
2080
+ object.pos = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long;
1895
2081
  } else
1896
- object.pos = options.longs === String ? "0" : 0;
2082
+ object.pos = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0;
1897
2083
  object.len = null;
1898
2084
  }
1899
- if (message.pos != null && message.hasOwnProperty("pos"))
1900
- if (typeof message.pos === "number")
2085
+ if (message.pos != null && Object.hasOwnProperty.call(message, "pos"))
2086
+ if (typeof BigInt !== "undefined" && options.longs === BigInt)
2087
+ object.pos = typeof message.pos === "number" ? BigInt(message.pos) : $util.Long.fromBits(message.pos.low >>> 0, message.pos.high >>> 0, true).toBigInt();
2088
+ else if (typeof message.pos === "number")
1901
2089
  object.pos = options.longs === String ? String(message.pos) : message.pos;
1902
2090
  else
1903
2091
  object.pos = options.longs === String ? $util.Long.prototype.toString.call(message.pos) : options.longs === Number ? new $util.LongBits(message.pos.low >>> 0, message.pos.high >>> 0).toNumber(true) : message.pos;
1904
- if (message.len != null && message.hasOwnProperty("len"))
1905
- object.len = $root.common.UInt64Value.toObject(message.len, options);
2092
+ if (message.len != null && Object.hasOwnProperty.call(message, "len"))
2093
+ object.len = $root.common.UInt64Value.toObject(message.len, options, q + 1);
1906
2094
  return object;
1907
2095
  };
1908
2096
 
@@ -1955,7 +2143,7 @@ $root.bytes = (function() {
1955
2143
  function SeekRequestBody(properties) {
1956
2144
  if (properties)
1957
2145
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
1958
- if (properties[keys[i]] != null)
2146
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
1959
2147
  this[keys[i]] = properties[keys[i]];
1960
2148
  }
1961
2149
 
@@ -1988,9 +2176,13 @@ $root.bytes = (function() {
1988
2176
  * @param {$protobuf.Writer} [writer] Writer to encode to
1989
2177
  * @returns {$protobuf.Writer} Writer
1990
2178
  */
1991
- SeekRequestBody.encode = function encode(message, writer) {
2179
+ SeekRequestBody.encode = function encode(message, writer, q) {
1992
2180
  if (!writer)
1993
2181
  writer = $Writer.create();
2182
+ if (q === undefined)
2183
+ q = 0;
2184
+ if (q > $util.recursionLimit)
2185
+ throw Error("max depth exceeded");
1994
2186
  if (message.offset != null && Object.hasOwnProperty.call(message, "offset"))
1995
2187
  writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.offset);
1996
2188
  return writer;
@@ -2006,7 +2198,7 @@ $root.bytes = (function() {
2006
2198
  * @returns {$protobuf.Writer} Writer
2007
2199
  */
2008
2200
  SeekRequestBody.encodeDelimited = function encodeDelimited(message, writer) {
2009
- return this.encode(message, writer).ldelim();
2201
+ return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();
2010
2202
  };
2011
2203
 
2012
2204
  /**
@@ -2020,9 +2212,13 @@ $root.bytes = (function() {
2020
2212
  * @throws {Error} If the payload is not a reader or valid buffer
2021
2213
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
2022
2214
  */
2023
- SeekRequestBody.decode = function decode(reader, length, error) {
2215
+ SeekRequestBody.decode = function decode(reader, length, error, long) {
2024
2216
  if (!(reader instanceof $Reader))
2025
2217
  reader = $Reader.create(reader);
2218
+ if (long === undefined)
2219
+ long = 0;
2220
+ if (long > $Reader.recursionLimit)
2221
+ throw Error("maximum nesting depth exceeded");
2026
2222
  var end = length === undefined ? reader.len : reader.pos + length, message = new $root.bytes.SeekRequestBody();
2027
2223
  while (reader.pos < end) {
2028
2224
  var tag = reader.uint32();
@@ -2034,7 +2230,7 @@ $root.bytes = (function() {
2034
2230
  break;
2035
2231
  }
2036
2232
  default:
2037
- reader.skipType(tag & 7);
2233
+ reader.skipType(tag & 7, long);
2038
2234
  break;
2039
2235
  }
2040
2236
  }
@@ -2065,10 +2261,14 @@ $root.bytes = (function() {
2065
2261
  * @param {Object.<string,*>} message Plain object to verify
2066
2262
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
2067
2263
  */
2068
- SeekRequestBody.verify = function verify(message) {
2264
+ SeekRequestBody.verify = function verify(message, long) {
2069
2265
  if (typeof message !== "object" || message === null)
2070
2266
  return "object expected";
2071
- if (message.offset != null && message.hasOwnProperty("offset"))
2267
+ if (long === undefined)
2268
+ long = 0;
2269
+ if (long > $util.recursionLimit)
2270
+ return "maximum nesting depth exceeded";
2271
+ if (message.offset != null && Object.hasOwnProperty.call(message, "offset"))
2072
2272
  if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high)))
2073
2273
  return "offset: integer|Long expected";
2074
2274
  return null;
@@ -2082,13 +2282,19 @@ $root.bytes = (function() {
2082
2282
  * @param {Object.<string,*>} object Plain object
2083
2283
  * @returns {bytes.SeekRequestBody} SeekRequestBody
2084
2284
  */
2085
- SeekRequestBody.fromObject = function fromObject(object) {
2285
+ SeekRequestBody.fromObject = function fromObject(object, long) {
2086
2286
  if (object instanceof $root.bytes.SeekRequestBody)
2087
2287
  return object;
2288
+ if (!$util.isObject(object))
2289
+ throw TypeError(".bytes.SeekRequestBody: object expected");
2290
+ if (long === undefined)
2291
+ long = 0;
2292
+ if (long > $util.recursionLimit)
2293
+ throw Error("maximum nesting depth exceeded");
2088
2294
  var message = new $root.bytes.SeekRequestBody();
2089
2295
  if (object.offset != null)
2090
2296
  if ($util.Long)
2091
- (message.offset = $util.Long.fromValue(object.offset)).unsigned = true;
2297
+ message.offset = $util.Long.fromValue(object.offset, true);
2092
2298
  else if (typeof object.offset === "string")
2093
2299
  message.offset = parseInt(object.offset, 10);
2094
2300
  else if (typeof object.offset === "number")
@@ -2107,18 +2313,24 @@ $root.bytes = (function() {
2107
2313
  * @param {$protobuf.IConversionOptions} [options] Conversion options
2108
2314
  * @returns {Object.<string,*>} Plain object
2109
2315
  */
2110
- SeekRequestBody.toObject = function toObject(message, options) {
2316
+ SeekRequestBody.toObject = function toObject(message, options, q) {
2111
2317
  if (!options)
2112
2318
  options = {};
2319
+ if (q === undefined)
2320
+ q = 0;
2321
+ if (q > $util.recursionLimit)
2322
+ throw Error("max depth exceeded");
2113
2323
  var object = {};
2114
2324
  if (options.defaults)
2115
2325
  if ($util.Long) {
2116
2326
  var long = new $util.Long(0, 0, true);
2117
- object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
2327
+ object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long;
2118
2328
  } else
2119
- object.offset = options.longs === String ? "0" : 0;
2120
- if (message.offset != null && message.hasOwnProperty("offset"))
2121
- if (typeof message.offset === "number")
2329
+ object.offset = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0;
2330
+ if (message.offset != null && Object.hasOwnProperty.call(message, "offset"))
2331
+ if (typeof BigInt !== "undefined" && options.longs === BigInt)
2332
+ object.offset = typeof message.offset === "number" ? BigInt(message.offset) : $util.Long.fromBits(message.offset.low >>> 0, message.offset.high >>> 0, true).toBigInt();
2333
+ else if (typeof message.offset === "number")
2122
2334
  object.offset = options.longs === String ? String(message.offset) : message.offset;
2123
2335
  else
2124
2336
  object.offset = options.longs === String ? $util.Long.prototype.toString.call(message.offset) : options.longs === Number ? new $util.LongBits(message.offset.low >>> 0, message.offset.high >>> 0).toNumber(true) : message.offset;
@@ -2188,7 +2400,7 @@ $root.common = (function() {
2188
2400
  this.path = [];
2189
2401
  if (properties)
2190
2402
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
2191
- if (properties[keys[i]] != null)
2403
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
2192
2404
  this[keys[i]] = properties[keys[i]];
2193
2405
  }
2194
2406
 
@@ -2229,9 +2441,13 @@ $root.common = (function() {
2229
2441
  * @param {$protobuf.Writer} [writer] Writer to encode to
2230
2442
  * @returns {$protobuf.Writer} Writer
2231
2443
  */
2232
- ObjectReference.encode = function encode(message, writer) {
2444
+ ObjectReference.encode = function encode(message, writer, q) {
2233
2445
  if (!writer)
2234
2446
  writer = $Writer.create();
2447
+ if (q === undefined)
2448
+ q = 0;
2449
+ if (q > $util.recursionLimit)
2450
+ throw Error("max depth exceeded");
2235
2451
  if (message.objType != null && Object.hasOwnProperty.call(message, "objType"))
2236
2452
  writer.uint32(/* id 1, wireType 2 =*/10).string(message.objType);
2237
2453
  if (message.path != null && message.path.length)
@@ -2250,7 +2466,7 @@ $root.common = (function() {
2250
2466
  * @returns {$protobuf.Writer} Writer
2251
2467
  */
2252
2468
  ObjectReference.encodeDelimited = function encodeDelimited(message, writer) {
2253
- return this.encode(message, writer).ldelim();
2469
+ return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();
2254
2470
  };
2255
2471
 
2256
2472
  /**
@@ -2264,9 +2480,13 @@ $root.common = (function() {
2264
2480
  * @throws {Error} If the payload is not a reader or valid buffer
2265
2481
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
2266
2482
  */
2267
- ObjectReference.decode = function decode(reader, length, error) {
2483
+ ObjectReference.decode = function decode(reader, length, error, long) {
2268
2484
  if (!(reader instanceof $Reader))
2269
2485
  reader = $Reader.create(reader);
2486
+ if (long === undefined)
2487
+ long = 0;
2488
+ if (long > $Reader.recursionLimit)
2489
+ throw Error("maximum nesting depth exceeded");
2270
2490
  var end = length === undefined ? reader.len : reader.pos + length, message = new $root.common.ObjectReference();
2271
2491
  while (reader.pos < end) {
2272
2492
  var tag = reader.uint32();
@@ -2284,7 +2504,7 @@ $root.common = (function() {
2284
2504
  break;
2285
2505
  }
2286
2506
  default:
2287
- reader.skipType(tag & 7);
2507
+ reader.skipType(tag & 7, long);
2288
2508
  break;
2289
2509
  }
2290
2510
  }
@@ -2315,13 +2535,17 @@ $root.common = (function() {
2315
2535
  * @param {Object.<string,*>} message Plain object to verify
2316
2536
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
2317
2537
  */
2318
- ObjectReference.verify = function verify(message) {
2538
+ ObjectReference.verify = function verify(message, long) {
2319
2539
  if (typeof message !== "object" || message === null)
2320
2540
  return "object expected";
2321
- if (message.objType != null && message.hasOwnProperty("objType"))
2541
+ if (long === undefined)
2542
+ long = 0;
2543
+ if (long > $util.recursionLimit)
2544
+ return "maximum nesting depth exceeded";
2545
+ if (message.objType != null && Object.hasOwnProperty.call(message, "objType"))
2322
2546
  if (!$util.isString(message.objType))
2323
2547
  return "objType: string expected";
2324
- if (message.path != null && message.hasOwnProperty("path")) {
2548
+ if (message.path != null && Object.hasOwnProperty.call(message, "path")) {
2325
2549
  if (!Array.isArray(message.path))
2326
2550
  return "path: array expected";
2327
2551
  for (var i = 0; i < message.path.length; ++i)
@@ -2339,9 +2563,15 @@ $root.common = (function() {
2339
2563
  * @param {Object.<string,*>} object Plain object
2340
2564
  * @returns {common.ObjectReference} ObjectReference
2341
2565
  */
2342
- ObjectReference.fromObject = function fromObject(object) {
2566
+ ObjectReference.fromObject = function fromObject(object, long) {
2343
2567
  if (object instanceof $root.common.ObjectReference)
2344
2568
  return object;
2569
+ if (!$util.isObject(object))
2570
+ throw TypeError(".common.ObjectReference: object expected");
2571
+ if (long === undefined)
2572
+ long = 0;
2573
+ if (long > $util.recursionLimit)
2574
+ throw Error("maximum nesting depth exceeded");
2345
2575
  var message = new $root.common.ObjectReference();
2346
2576
  if (object.objType != null)
2347
2577
  message.objType = String(object.objType);
@@ -2364,15 +2594,19 @@ $root.common = (function() {
2364
2594
  * @param {$protobuf.IConversionOptions} [options] Conversion options
2365
2595
  * @returns {Object.<string,*>} Plain object
2366
2596
  */
2367
- ObjectReference.toObject = function toObject(message, options) {
2597
+ ObjectReference.toObject = function toObject(message, options, q) {
2368
2598
  if (!options)
2369
2599
  options = {};
2600
+ if (q === undefined)
2601
+ q = 0;
2602
+ if (q > $util.recursionLimit)
2603
+ throw Error("max depth exceeded");
2370
2604
  var object = {};
2371
2605
  if (options.arrays || options.defaults)
2372
2606
  object.path = [];
2373
2607
  if (options.defaults)
2374
2608
  object.objType = "";
2375
- if (message.objType != null && message.hasOwnProperty("objType"))
2609
+ if (message.objType != null && Object.hasOwnProperty.call(message, "objType"))
2376
2610
  object.objType = message.objType;
2377
2611
  if (message.path && message.path.length) {
2378
2612
  object.path = [];
@@ -2431,7 +2665,7 @@ $root.common = (function() {
2431
2665
  function BooleanValue(properties) {
2432
2666
  if (properties)
2433
2667
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
2434
- if (properties[keys[i]] != null)
2668
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
2435
2669
  this[keys[i]] = properties[keys[i]];
2436
2670
  }
2437
2671
 
@@ -2464,9 +2698,13 @@ $root.common = (function() {
2464
2698
  * @param {$protobuf.Writer} [writer] Writer to encode to
2465
2699
  * @returns {$protobuf.Writer} Writer
2466
2700
  */
2467
- BooleanValue.encode = function encode(message, writer) {
2701
+ BooleanValue.encode = function encode(message, writer, q) {
2468
2702
  if (!writer)
2469
2703
  writer = $Writer.create();
2704
+ if (q === undefined)
2705
+ q = 0;
2706
+ if (q > $util.recursionLimit)
2707
+ throw Error("max depth exceeded");
2470
2708
  if (message.value != null && Object.hasOwnProperty.call(message, "value"))
2471
2709
  writer.uint32(/* id 1, wireType 0 =*/8).bool(message.value);
2472
2710
  return writer;
@@ -2482,7 +2720,7 @@ $root.common = (function() {
2482
2720
  * @returns {$protobuf.Writer} Writer
2483
2721
  */
2484
2722
  BooleanValue.encodeDelimited = function encodeDelimited(message, writer) {
2485
- return this.encode(message, writer).ldelim();
2723
+ return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();
2486
2724
  };
2487
2725
 
2488
2726
  /**
@@ -2496,9 +2734,13 @@ $root.common = (function() {
2496
2734
  * @throws {Error} If the payload is not a reader or valid buffer
2497
2735
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
2498
2736
  */
2499
- BooleanValue.decode = function decode(reader, length, error) {
2737
+ BooleanValue.decode = function decode(reader, length, error, long) {
2500
2738
  if (!(reader instanceof $Reader))
2501
2739
  reader = $Reader.create(reader);
2740
+ if (long === undefined)
2741
+ long = 0;
2742
+ if (long > $Reader.recursionLimit)
2743
+ throw Error("maximum nesting depth exceeded");
2502
2744
  var end = length === undefined ? reader.len : reader.pos + length, message = new $root.common.BooleanValue();
2503
2745
  while (reader.pos < end) {
2504
2746
  var tag = reader.uint32();
@@ -2510,7 +2752,7 @@ $root.common = (function() {
2510
2752
  break;
2511
2753
  }
2512
2754
  default:
2513
- reader.skipType(tag & 7);
2755
+ reader.skipType(tag & 7, long);
2514
2756
  break;
2515
2757
  }
2516
2758
  }
@@ -2541,10 +2783,14 @@ $root.common = (function() {
2541
2783
  * @param {Object.<string,*>} message Plain object to verify
2542
2784
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
2543
2785
  */
2544
- BooleanValue.verify = function verify(message) {
2786
+ BooleanValue.verify = function verify(message, long) {
2545
2787
  if (typeof message !== "object" || message === null)
2546
2788
  return "object expected";
2547
- if (message.value != null && message.hasOwnProperty("value"))
2789
+ if (long === undefined)
2790
+ long = 0;
2791
+ if (long > $util.recursionLimit)
2792
+ return "maximum nesting depth exceeded";
2793
+ if (message.value != null && Object.hasOwnProperty.call(message, "value"))
2548
2794
  if (typeof message.value !== "boolean")
2549
2795
  return "value: boolean expected";
2550
2796
  return null;
@@ -2558,9 +2804,15 @@ $root.common = (function() {
2558
2804
  * @param {Object.<string,*>} object Plain object
2559
2805
  * @returns {common.BooleanValue} BooleanValue
2560
2806
  */
2561
- BooleanValue.fromObject = function fromObject(object) {
2807
+ BooleanValue.fromObject = function fromObject(object, long) {
2562
2808
  if (object instanceof $root.common.BooleanValue)
2563
2809
  return object;
2810
+ if (!$util.isObject(object))
2811
+ throw TypeError(".common.BooleanValue: object expected");
2812
+ if (long === undefined)
2813
+ long = 0;
2814
+ if (long > $util.recursionLimit)
2815
+ throw Error("maximum nesting depth exceeded");
2564
2816
  var message = new $root.common.BooleanValue();
2565
2817
  if (object.value != null)
2566
2818
  message.value = Boolean(object.value);
@@ -2576,13 +2828,17 @@ $root.common = (function() {
2576
2828
  * @param {$protobuf.IConversionOptions} [options] Conversion options
2577
2829
  * @returns {Object.<string,*>} Plain object
2578
2830
  */
2579
- BooleanValue.toObject = function toObject(message, options) {
2831
+ BooleanValue.toObject = function toObject(message, options, q) {
2580
2832
  if (!options)
2581
2833
  options = {};
2834
+ if (q === undefined)
2835
+ q = 0;
2836
+ if (q > $util.recursionLimit)
2837
+ throw Error("max depth exceeded");
2582
2838
  var object = {};
2583
2839
  if (options.defaults)
2584
2840
  object.value = false;
2585
- if (message.value != null && message.hasOwnProperty("value"))
2841
+ if (message.value != null && Object.hasOwnProperty.call(message, "value"))
2586
2842
  object.value = message.value;
2587
2843
  return object;
2588
2844
  };
@@ -2637,7 +2893,7 @@ $root.common = (function() {
2637
2893
  this.values = [];
2638
2894
  if (properties)
2639
2895
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
2640
- if (properties[keys[i]] != null)
2896
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
2641
2897
  this[keys[i]] = properties[keys[i]];
2642
2898
  }
2643
2899
 
@@ -2670,9 +2926,13 @@ $root.common = (function() {
2670
2926
  * @param {$protobuf.Writer} [writer] Writer to encode to
2671
2927
  * @returns {$protobuf.Writer} Writer
2672
2928
  */
2673
- StringArrayValue.encode = function encode(message, writer) {
2929
+ StringArrayValue.encode = function encode(message, writer, q) {
2674
2930
  if (!writer)
2675
2931
  writer = $Writer.create();
2932
+ if (q === undefined)
2933
+ q = 0;
2934
+ if (q > $util.recursionLimit)
2935
+ throw Error("max depth exceeded");
2676
2936
  if (message.values != null && message.values.length)
2677
2937
  for (var i = 0; i < message.values.length; ++i)
2678
2938
  writer.uint32(/* id 1, wireType 2 =*/10).string(message.values[i]);
@@ -2689,7 +2949,7 @@ $root.common = (function() {
2689
2949
  * @returns {$protobuf.Writer} Writer
2690
2950
  */
2691
2951
  StringArrayValue.encodeDelimited = function encodeDelimited(message, writer) {
2692
- return this.encode(message, writer).ldelim();
2952
+ return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();
2693
2953
  };
2694
2954
 
2695
2955
  /**
@@ -2703,9 +2963,13 @@ $root.common = (function() {
2703
2963
  * @throws {Error} If the payload is not a reader or valid buffer
2704
2964
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
2705
2965
  */
2706
- StringArrayValue.decode = function decode(reader, length, error) {
2966
+ StringArrayValue.decode = function decode(reader, length, error, long) {
2707
2967
  if (!(reader instanceof $Reader))
2708
2968
  reader = $Reader.create(reader);
2969
+ if (long === undefined)
2970
+ long = 0;
2971
+ if (long > $Reader.recursionLimit)
2972
+ throw Error("maximum nesting depth exceeded");
2709
2973
  var end = length === undefined ? reader.len : reader.pos + length, message = new $root.common.StringArrayValue();
2710
2974
  while (reader.pos < end) {
2711
2975
  var tag = reader.uint32();
@@ -2719,7 +2983,7 @@ $root.common = (function() {
2719
2983
  break;
2720
2984
  }
2721
2985
  default:
2722
- reader.skipType(tag & 7);
2986
+ reader.skipType(tag & 7, long);
2723
2987
  break;
2724
2988
  }
2725
2989
  }
@@ -2750,10 +3014,14 @@ $root.common = (function() {
2750
3014
  * @param {Object.<string,*>} message Plain object to verify
2751
3015
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
2752
3016
  */
2753
- StringArrayValue.verify = function verify(message) {
3017
+ StringArrayValue.verify = function verify(message, long) {
2754
3018
  if (typeof message !== "object" || message === null)
2755
3019
  return "object expected";
2756
- if (message.values != null && message.hasOwnProperty("values")) {
3020
+ if (long === undefined)
3021
+ long = 0;
3022
+ if (long > $util.recursionLimit)
3023
+ return "maximum nesting depth exceeded";
3024
+ if (message.values != null && Object.hasOwnProperty.call(message, "values")) {
2757
3025
  if (!Array.isArray(message.values))
2758
3026
  return "values: array expected";
2759
3027
  for (var i = 0; i < message.values.length; ++i)
@@ -2771,9 +3039,15 @@ $root.common = (function() {
2771
3039
  * @param {Object.<string,*>} object Plain object
2772
3040
  * @returns {common.StringArrayValue} StringArrayValue
2773
3041
  */
2774
- StringArrayValue.fromObject = function fromObject(object) {
3042
+ StringArrayValue.fromObject = function fromObject(object, long) {
2775
3043
  if (object instanceof $root.common.StringArrayValue)
2776
3044
  return object;
3045
+ if (!$util.isObject(object))
3046
+ throw TypeError(".common.StringArrayValue: object expected");
3047
+ if (long === undefined)
3048
+ long = 0;
3049
+ if (long > $util.recursionLimit)
3050
+ throw Error("maximum nesting depth exceeded");
2777
3051
  var message = new $root.common.StringArrayValue();
2778
3052
  if (object.values) {
2779
3053
  if (!Array.isArray(object.values))
@@ -2794,9 +3068,13 @@ $root.common = (function() {
2794
3068
  * @param {$protobuf.IConversionOptions} [options] Conversion options
2795
3069
  * @returns {Object.<string,*>} Plain object
2796
3070
  */
2797
- StringArrayValue.toObject = function toObject(message, options) {
3071
+ StringArrayValue.toObject = function toObject(message, options, q) {
2798
3072
  if (!options)
2799
3073
  options = {};
3074
+ if (q === undefined)
3075
+ q = 0;
3076
+ if (q > $util.recursionLimit)
3077
+ throw Error("max depth exceeded");
2800
3078
  var object = {};
2801
3079
  if (options.arrays || options.defaults)
2802
3080
  object.values = [];
@@ -2857,7 +3135,7 @@ $root.common = (function() {
2857
3135
  function UInt64Value(properties) {
2858
3136
  if (properties)
2859
3137
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
2860
- if (properties[keys[i]] != null)
3138
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
2861
3139
  this[keys[i]] = properties[keys[i]];
2862
3140
  }
2863
3141
 
@@ -2890,9 +3168,13 @@ $root.common = (function() {
2890
3168
  * @param {$protobuf.Writer} [writer] Writer to encode to
2891
3169
  * @returns {$protobuf.Writer} Writer
2892
3170
  */
2893
- UInt64Value.encode = function encode(message, writer) {
3171
+ UInt64Value.encode = function encode(message, writer, q) {
2894
3172
  if (!writer)
2895
3173
  writer = $Writer.create();
3174
+ if (q === undefined)
3175
+ q = 0;
3176
+ if (q > $util.recursionLimit)
3177
+ throw Error("max depth exceeded");
2896
3178
  if (message.value != null && Object.hasOwnProperty.call(message, "value"))
2897
3179
  writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.value);
2898
3180
  return writer;
@@ -2908,7 +3190,7 @@ $root.common = (function() {
2908
3190
  * @returns {$protobuf.Writer} Writer
2909
3191
  */
2910
3192
  UInt64Value.encodeDelimited = function encodeDelimited(message, writer) {
2911
- return this.encode(message, writer).ldelim();
3193
+ return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();
2912
3194
  };
2913
3195
 
2914
3196
  /**
@@ -2922,9 +3204,13 @@ $root.common = (function() {
2922
3204
  * @throws {Error} If the payload is not a reader or valid buffer
2923
3205
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
2924
3206
  */
2925
- UInt64Value.decode = function decode(reader, length, error) {
3207
+ UInt64Value.decode = function decode(reader, length, error, long) {
2926
3208
  if (!(reader instanceof $Reader))
2927
3209
  reader = $Reader.create(reader);
3210
+ if (long === undefined)
3211
+ long = 0;
3212
+ if (long > $Reader.recursionLimit)
3213
+ throw Error("maximum nesting depth exceeded");
2928
3214
  var end = length === undefined ? reader.len : reader.pos + length, message = new $root.common.UInt64Value();
2929
3215
  while (reader.pos < end) {
2930
3216
  var tag = reader.uint32();
@@ -2936,7 +3222,7 @@ $root.common = (function() {
2936
3222
  break;
2937
3223
  }
2938
3224
  default:
2939
- reader.skipType(tag & 7);
3225
+ reader.skipType(tag & 7, long);
2940
3226
  break;
2941
3227
  }
2942
3228
  }
@@ -2967,10 +3253,14 @@ $root.common = (function() {
2967
3253
  * @param {Object.<string,*>} message Plain object to verify
2968
3254
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
2969
3255
  */
2970
- UInt64Value.verify = function verify(message) {
3256
+ UInt64Value.verify = function verify(message, long) {
2971
3257
  if (typeof message !== "object" || message === null)
2972
3258
  return "object expected";
2973
- if (message.value != null && message.hasOwnProperty("value"))
3259
+ if (long === undefined)
3260
+ long = 0;
3261
+ if (long > $util.recursionLimit)
3262
+ return "maximum nesting depth exceeded";
3263
+ if (message.value != null && Object.hasOwnProperty.call(message, "value"))
2974
3264
  if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high)))
2975
3265
  return "value: integer|Long expected";
2976
3266
  return null;
@@ -2984,13 +3274,19 @@ $root.common = (function() {
2984
3274
  * @param {Object.<string,*>} object Plain object
2985
3275
  * @returns {common.UInt64Value} UInt64Value
2986
3276
  */
2987
- UInt64Value.fromObject = function fromObject(object) {
3277
+ UInt64Value.fromObject = function fromObject(object, long) {
2988
3278
  if (object instanceof $root.common.UInt64Value)
2989
3279
  return object;
3280
+ if (!$util.isObject(object))
3281
+ throw TypeError(".common.UInt64Value: object expected");
3282
+ if (long === undefined)
3283
+ long = 0;
3284
+ if (long > $util.recursionLimit)
3285
+ throw Error("maximum nesting depth exceeded");
2990
3286
  var message = new $root.common.UInt64Value();
2991
3287
  if (object.value != null)
2992
3288
  if ($util.Long)
2993
- (message.value = $util.Long.fromValue(object.value)).unsigned = true;
3289
+ message.value = $util.Long.fromValue(object.value, true);
2994
3290
  else if (typeof object.value === "string")
2995
3291
  message.value = parseInt(object.value, 10);
2996
3292
  else if (typeof object.value === "number")
@@ -3009,18 +3305,24 @@ $root.common = (function() {
3009
3305
  * @param {$protobuf.IConversionOptions} [options] Conversion options
3010
3306
  * @returns {Object.<string,*>} Plain object
3011
3307
  */
3012
- UInt64Value.toObject = function toObject(message, options) {
3308
+ UInt64Value.toObject = function toObject(message, options, q) {
3013
3309
  if (!options)
3014
3310
  options = {};
3311
+ if (q === undefined)
3312
+ q = 0;
3313
+ if (q > $util.recursionLimit)
3314
+ throw Error("max depth exceeded");
3015
3315
  var object = {};
3016
3316
  if (options.defaults)
3017
3317
  if ($util.Long) {
3018
3318
  var long = new $util.Long(0, 0, true);
3019
- object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
3319
+ object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long;
3020
3320
  } else
3021
- object.value = options.longs === String ? "0" : 0;
3022
- if (message.value != null && message.hasOwnProperty("value"))
3023
- if (typeof message.value === "number")
3321
+ object.value = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0;
3322
+ if (message.value != null && Object.hasOwnProperty.call(message, "value"))
3323
+ if (typeof BigInt !== "undefined" && options.longs === BigInt)
3324
+ object.value = typeof message.value === "number" ? BigInt(message.value) : $util.Long.fromBits(message.value.low >>> 0, message.value.high >>> 0, true).toBigInt();
3325
+ else if (typeof message.value === "number")
3024
3326
  object.value = options.longs === String ? String(message.value) : message.value;
3025
3327
  else
3026
3328
  object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber(true) : message.value;
@@ -3076,7 +3378,7 @@ $root.common = (function() {
3076
3378
  function UInt32Value(properties) {
3077
3379
  if (properties)
3078
3380
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
3079
- if (properties[keys[i]] != null)
3381
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
3080
3382
  this[keys[i]] = properties[keys[i]];
3081
3383
  }
3082
3384
 
@@ -3109,9 +3411,13 @@ $root.common = (function() {
3109
3411
  * @param {$protobuf.Writer} [writer] Writer to encode to
3110
3412
  * @returns {$protobuf.Writer} Writer
3111
3413
  */
3112
- UInt32Value.encode = function encode(message, writer) {
3414
+ UInt32Value.encode = function encode(message, writer, q) {
3113
3415
  if (!writer)
3114
3416
  writer = $Writer.create();
3417
+ if (q === undefined)
3418
+ q = 0;
3419
+ if (q > $util.recursionLimit)
3420
+ throw Error("max depth exceeded");
3115
3421
  if (message.value != null && Object.hasOwnProperty.call(message, "value"))
3116
3422
  writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.value);
3117
3423
  return writer;
@@ -3127,7 +3433,7 @@ $root.common = (function() {
3127
3433
  * @returns {$protobuf.Writer} Writer
3128
3434
  */
3129
3435
  UInt32Value.encodeDelimited = function encodeDelimited(message, writer) {
3130
- return this.encode(message, writer).ldelim();
3436
+ return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();
3131
3437
  };
3132
3438
 
3133
3439
  /**
@@ -3141,9 +3447,13 @@ $root.common = (function() {
3141
3447
  * @throws {Error} If the payload is not a reader or valid buffer
3142
3448
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
3143
3449
  */
3144
- UInt32Value.decode = function decode(reader, length, error) {
3450
+ UInt32Value.decode = function decode(reader, length, error, long) {
3145
3451
  if (!(reader instanceof $Reader))
3146
3452
  reader = $Reader.create(reader);
3453
+ if (long === undefined)
3454
+ long = 0;
3455
+ if (long > $Reader.recursionLimit)
3456
+ throw Error("maximum nesting depth exceeded");
3147
3457
  var end = length === undefined ? reader.len : reader.pos + length, message = new $root.common.UInt32Value();
3148
3458
  while (reader.pos < end) {
3149
3459
  var tag = reader.uint32();
@@ -3155,7 +3465,7 @@ $root.common = (function() {
3155
3465
  break;
3156
3466
  }
3157
3467
  default:
3158
- reader.skipType(tag & 7);
3468
+ reader.skipType(tag & 7, long);
3159
3469
  break;
3160
3470
  }
3161
3471
  }
@@ -3186,10 +3496,14 @@ $root.common = (function() {
3186
3496
  * @param {Object.<string,*>} message Plain object to verify
3187
3497
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
3188
3498
  */
3189
- UInt32Value.verify = function verify(message) {
3499
+ UInt32Value.verify = function verify(message, long) {
3190
3500
  if (typeof message !== "object" || message === null)
3191
3501
  return "object expected";
3192
- if (message.value != null && message.hasOwnProperty("value"))
3502
+ if (long === undefined)
3503
+ long = 0;
3504
+ if (long > $util.recursionLimit)
3505
+ return "maximum nesting depth exceeded";
3506
+ if (message.value != null && Object.hasOwnProperty.call(message, "value"))
3193
3507
  if (!$util.isInteger(message.value))
3194
3508
  return "value: integer expected";
3195
3509
  return null;
@@ -3203,9 +3517,15 @@ $root.common = (function() {
3203
3517
  * @param {Object.<string,*>} object Plain object
3204
3518
  * @returns {common.UInt32Value} UInt32Value
3205
3519
  */
3206
- UInt32Value.fromObject = function fromObject(object) {
3520
+ UInt32Value.fromObject = function fromObject(object, long) {
3207
3521
  if (object instanceof $root.common.UInt32Value)
3208
3522
  return object;
3523
+ if (!$util.isObject(object))
3524
+ throw TypeError(".common.UInt32Value: object expected");
3525
+ if (long === undefined)
3526
+ long = 0;
3527
+ if (long > $util.recursionLimit)
3528
+ throw Error("maximum nesting depth exceeded");
3209
3529
  var message = new $root.common.UInt32Value();
3210
3530
  if (object.value != null)
3211
3531
  message.value = object.value >>> 0;
@@ -3221,13 +3541,17 @@ $root.common = (function() {
3221
3541
  * @param {$protobuf.IConversionOptions} [options] Conversion options
3222
3542
  * @returns {Object.<string,*>} Plain object
3223
3543
  */
3224
- UInt32Value.toObject = function toObject(message, options) {
3544
+ UInt32Value.toObject = function toObject(message, options, q) {
3225
3545
  if (!options)
3226
3546
  options = {};
3547
+ if (q === undefined)
3548
+ q = 0;
3549
+ if (q > $util.recursionLimit)
3550
+ throw Error("max depth exceeded");
3227
3551
  var object = {};
3228
3552
  if (options.defaults)
3229
3553
  object.value = 0;
3230
- if (message.value != null && message.hasOwnProperty("value"))
3554
+ if (message.value != null && Object.hasOwnProperty.call(message, "value"))
3231
3555
  object.value = message.value;
3232
3556
  return object;
3233
3557
  };
@@ -3281,7 +3605,7 @@ $root.common = (function() {
3281
3605
  function StringValue(properties) {
3282
3606
  if (properties)
3283
3607
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
3284
- if (properties[keys[i]] != null)
3608
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
3285
3609
  this[keys[i]] = properties[keys[i]];
3286
3610
  }
3287
3611
 
@@ -3314,9 +3638,13 @@ $root.common = (function() {
3314
3638
  * @param {$protobuf.Writer} [writer] Writer to encode to
3315
3639
  * @returns {$protobuf.Writer} Writer
3316
3640
  */
3317
- StringValue.encode = function encode(message, writer) {
3641
+ StringValue.encode = function encode(message, writer, q) {
3318
3642
  if (!writer)
3319
3643
  writer = $Writer.create();
3644
+ if (q === undefined)
3645
+ q = 0;
3646
+ if (q > $util.recursionLimit)
3647
+ throw Error("max depth exceeded");
3320
3648
  if (message.value != null && Object.hasOwnProperty.call(message, "value"))
3321
3649
  writer.uint32(/* id 1, wireType 2 =*/10).string(message.value);
3322
3650
  return writer;
@@ -3332,7 +3660,7 @@ $root.common = (function() {
3332
3660
  * @returns {$protobuf.Writer} Writer
3333
3661
  */
3334
3662
  StringValue.encodeDelimited = function encodeDelimited(message, writer) {
3335
- return this.encode(message, writer).ldelim();
3663
+ return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();
3336
3664
  };
3337
3665
 
3338
3666
  /**
@@ -3346,9 +3674,13 @@ $root.common = (function() {
3346
3674
  * @throws {Error} If the payload is not a reader or valid buffer
3347
3675
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
3348
3676
  */
3349
- StringValue.decode = function decode(reader, length, error) {
3677
+ StringValue.decode = function decode(reader, length, error, long) {
3350
3678
  if (!(reader instanceof $Reader))
3351
3679
  reader = $Reader.create(reader);
3680
+ if (long === undefined)
3681
+ long = 0;
3682
+ if (long > $Reader.recursionLimit)
3683
+ throw Error("maximum nesting depth exceeded");
3352
3684
  var end = length === undefined ? reader.len : reader.pos + length, message = new $root.common.StringValue();
3353
3685
  while (reader.pos < end) {
3354
3686
  var tag = reader.uint32();
@@ -3360,7 +3692,7 @@ $root.common = (function() {
3360
3692
  break;
3361
3693
  }
3362
3694
  default:
3363
- reader.skipType(tag & 7);
3695
+ reader.skipType(tag & 7, long);
3364
3696
  break;
3365
3697
  }
3366
3698
  }
@@ -3391,10 +3723,14 @@ $root.common = (function() {
3391
3723
  * @param {Object.<string,*>} message Plain object to verify
3392
3724
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
3393
3725
  */
3394
- StringValue.verify = function verify(message) {
3726
+ StringValue.verify = function verify(message, long) {
3395
3727
  if (typeof message !== "object" || message === null)
3396
3728
  return "object expected";
3397
- if (message.value != null && message.hasOwnProperty("value"))
3729
+ if (long === undefined)
3730
+ long = 0;
3731
+ if (long > $util.recursionLimit)
3732
+ return "maximum nesting depth exceeded";
3733
+ if (message.value != null && Object.hasOwnProperty.call(message, "value"))
3398
3734
  if (!$util.isString(message.value))
3399
3735
  return "value: string expected";
3400
3736
  return null;
@@ -3408,9 +3744,15 @@ $root.common = (function() {
3408
3744
  * @param {Object.<string,*>} object Plain object
3409
3745
  * @returns {common.StringValue} StringValue
3410
3746
  */
3411
- StringValue.fromObject = function fromObject(object) {
3747
+ StringValue.fromObject = function fromObject(object, long) {
3412
3748
  if (object instanceof $root.common.StringValue)
3413
3749
  return object;
3750
+ if (!$util.isObject(object))
3751
+ throw TypeError(".common.StringValue: object expected");
3752
+ if (long === undefined)
3753
+ long = 0;
3754
+ if (long > $util.recursionLimit)
3755
+ throw Error("maximum nesting depth exceeded");
3414
3756
  var message = new $root.common.StringValue();
3415
3757
  if (object.value != null)
3416
3758
  message.value = String(object.value);
@@ -3426,13 +3768,17 @@ $root.common = (function() {
3426
3768
  * @param {$protobuf.IConversionOptions} [options] Conversion options
3427
3769
  * @returns {Object.<string,*>} Plain object
3428
3770
  */
3429
- StringValue.toObject = function toObject(message, options) {
3771
+ StringValue.toObject = function toObject(message, options, q) {
3430
3772
  if (!options)
3431
3773
  options = {};
3774
+ if (q === undefined)
3775
+ q = 0;
3776
+ if (q > $util.recursionLimit)
3777
+ throw Error("max depth exceeded");
3432
3778
  var object = {};
3433
3779
  if (options.defaults)
3434
3780
  object.value = "";
3435
- if (message.value != null && message.hasOwnProperty("value"))
3781
+ if (message.value != null && Object.hasOwnProperty.call(message, "value"))
3436
3782
  object.value = message.value;
3437
3783
  return object;
3438
3784
  };
@@ -3486,7 +3832,7 @@ $root.common = (function() {
3486
3832
  function BytesValue(properties) {
3487
3833
  if (properties)
3488
3834
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
3489
- if (properties[keys[i]] != null)
3835
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
3490
3836
  this[keys[i]] = properties[keys[i]];
3491
3837
  }
3492
3838
 
@@ -3519,9 +3865,13 @@ $root.common = (function() {
3519
3865
  * @param {$protobuf.Writer} [writer] Writer to encode to
3520
3866
  * @returns {$protobuf.Writer} Writer
3521
3867
  */
3522
- BytesValue.encode = function encode(message, writer) {
3868
+ BytesValue.encode = function encode(message, writer, q) {
3523
3869
  if (!writer)
3524
3870
  writer = $Writer.create();
3871
+ if (q === undefined)
3872
+ q = 0;
3873
+ if (q > $util.recursionLimit)
3874
+ throw Error("max depth exceeded");
3525
3875
  if (message.value != null && Object.hasOwnProperty.call(message, "value"))
3526
3876
  writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.value);
3527
3877
  return writer;
@@ -3537,7 +3887,7 @@ $root.common = (function() {
3537
3887
  * @returns {$protobuf.Writer} Writer
3538
3888
  */
3539
3889
  BytesValue.encodeDelimited = function encodeDelimited(message, writer) {
3540
- return this.encode(message, writer).ldelim();
3890
+ return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();
3541
3891
  };
3542
3892
 
3543
3893
  /**
@@ -3551,9 +3901,13 @@ $root.common = (function() {
3551
3901
  * @throws {Error} If the payload is not a reader or valid buffer
3552
3902
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
3553
3903
  */
3554
- BytesValue.decode = function decode(reader, length, error) {
3904
+ BytesValue.decode = function decode(reader, length, error, long) {
3555
3905
  if (!(reader instanceof $Reader))
3556
3906
  reader = $Reader.create(reader);
3907
+ if (long === undefined)
3908
+ long = 0;
3909
+ if (long > $Reader.recursionLimit)
3910
+ throw Error("maximum nesting depth exceeded");
3557
3911
  var end = length === undefined ? reader.len : reader.pos + length, message = new $root.common.BytesValue();
3558
3912
  while (reader.pos < end) {
3559
3913
  var tag = reader.uint32();
@@ -3565,7 +3919,7 @@ $root.common = (function() {
3565
3919
  break;
3566
3920
  }
3567
3921
  default:
3568
- reader.skipType(tag & 7);
3922
+ reader.skipType(tag & 7, long);
3569
3923
  break;
3570
3924
  }
3571
3925
  }
@@ -3596,10 +3950,14 @@ $root.common = (function() {
3596
3950
  * @param {Object.<string,*>} message Plain object to verify
3597
3951
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
3598
3952
  */
3599
- BytesValue.verify = function verify(message) {
3953
+ BytesValue.verify = function verify(message, long) {
3600
3954
  if (typeof message !== "object" || message === null)
3601
3955
  return "object expected";
3602
- if (message.value != null && message.hasOwnProperty("value"))
3956
+ if (long === undefined)
3957
+ long = 0;
3958
+ if (long > $util.recursionLimit)
3959
+ return "maximum nesting depth exceeded";
3960
+ if (message.value != null && Object.hasOwnProperty.call(message, "value"))
3603
3961
  if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value)))
3604
3962
  return "value: buffer expected";
3605
3963
  return null;
@@ -3613,9 +3971,15 @@ $root.common = (function() {
3613
3971
  * @param {Object.<string,*>} object Plain object
3614
3972
  * @returns {common.BytesValue} BytesValue
3615
3973
  */
3616
- BytesValue.fromObject = function fromObject(object) {
3974
+ BytesValue.fromObject = function fromObject(object, long) {
3617
3975
  if (object instanceof $root.common.BytesValue)
3618
3976
  return object;
3977
+ if (!$util.isObject(object))
3978
+ throw TypeError(".common.BytesValue: object expected");
3979
+ if (long === undefined)
3980
+ long = 0;
3981
+ if (long > $util.recursionLimit)
3982
+ throw Error("maximum nesting depth exceeded");
3619
3983
  var message = new $root.common.BytesValue();
3620
3984
  if (object.value != null)
3621
3985
  if (typeof object.value === "string")
@@ -3634,9 +3998,13 @@ $root.common = (function() {
3634
3998
  * @param {$protobuf.IConversionOptions} [options] Conversion options
3635
3999
  * @returns {Object.<string,*>} Plain object
3636
4000
  */
3637
- BytesValue.toObject = function toObject(message, options) {
4001
+ BytesValue.toObject = function toObject(message, options, q) {
3638
4002
  if (!options)
3639
4003
  options = {};
4004
+ if (q === undefined)
4005
+ q = 0;
4006
+ if (q > $util.recursionLimit)
4007
+ throw Error("max depth exceeded");
3640
4008
  var object = {};
3641
4009
  if (options.defaults)
3642
4010
  if (options.bytes === String)
@@ -3646,7 +4014,7 @@ $root.common = (function() {
3646
4014
  if (options.bytes !== Array)
3647
4015
  object.value = $util.newBuffer(object.value);
3648
4016
  }
3649
- if (message.value != null && message.hasOwnProperty("value"))
4017
+ if (message.value != null && Object.hasOwnProperty.call(message, "value"))
3650
4018
  object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value;
3651
4019
  return object;
3652
4020
  };
@@ -3701,7 +4069,7 @@ $root.common = (function() {
3701
4069
  function ErrorValue(properties) {
3702
4070
  if (properties)
3703
4071
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
3704
- if (properties[keys[i]] != null)
4072
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
3705
4073
  this[keys[i]] = properties[keys[i]];
3706
4074
  }
3707
4075
 
@@ -3742,9 +4110,13 @@ $root.common = (function() {
3742
4110
  * @param {$protobuf.Writer} [writer] Writer to encode to
3743
4111
  * @returns {$protobuf.Writer} Writer
3744
4112
  */
3745
- ErrorValue.encode = function encode(message, writer) {
4113
+ ErrorValue.encode = function encode(message, writer, q) {
3746
4114
  if (!writer)
3747
4115
  writer = $Writer.create();
4116
+ if (q === undefined)
4117
+ q = 0;
4118
+ if (q > $util.recursionLimit)
4119
+ throw Error("max depth exceeded");
3748
4120
  if (message.runtimeExcJson != null && Object.hasOwnProperty.call(message, "runtimeExcJson"))
3749
4121
  writer.uint32(/* id 1, wireType 2 =*/10).string(message.runtimeExcJson);
3750
4122
  if (message.err != null && Object.hasOwnProperty.call(message, "err"))
@@ -3762,7 +4134,7 @@ $root.common = (function() {
3762
4134
  * @returns {$protobuf.Writer} Writer
3763
4135
  */
3764
4136
  ErrorValue.encodeDelimited = function encodeDelimited(message, writer) {
3765
- return this.encode(message, writer).ldelim();
4137
+ return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();
3766
4138
  };
3767
4139
 
3768
4140
  /**
@@ -3776,9 +4148,13 @@ $root.common = (function() {
3776
4148
  * @throws {Error} If the payload is not a reader or valid buffer
3777
4149
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
3778
4150
  */
3779
- ErrorValue.decode = function decode(reader, length, error) {
4151
+ ErrorValue.decode = function decode(reader, length, error, long) {
3780
4152
  if (!(reader instanceof $Reader))
3781
4153
  reader = $Reader.create(reader);
4154
+ if (long === undefined)
4155
+ long = 0;
4156
+ if (long > $Reader.recursionLimit)
4157
+ throw Error("maximum nesting depth exceeded");
3782
4158
  var end = length === undefined ? reader.len : reader.pos + length, message = new $root.common.ErrorValue();
3783
4159
  while (reader.pos < end) {
3784
4160
  var tag = reader.uint32();
@@ -3794,7 +4170,7 @@ $root.common = (function() {
3794
4170
  break;
3795
4171
  }
3796
4172
  default:
3797
- reader.skipType(tag & 7);
4173
+ reader.skipType(tag & 7, long);
3798
4174
  break;
3799
4175
  }
3800
4176
  }
@@ -3825,13 +4201,17 @@ $root.common = (function() {
3825
4201
  * @param {Object.<string,*>} message Plain object to verify
3826
4202
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
3827
4203
  */
3828
- ErrorValue.verify = function verify(message) {
4204
+ ErrorValue.verify = function verify(message, long) {
3829
4205
  if (typeof message !== "object" || message === null)
3830
4206
  return "object expected";
3831
- if (message.runtimeExcJson != null && message.hasOwnProperty("runtimeExcJson"))
4207
+ if (long === undefined)
4208
+ long = 0;
4209
+ if (long > $util.recursionLimit)
4210
+ return "maximum nesting depth exceeded";
4211
+ if (message.runtimeExcJson != null && Object.hasOwnProperty.call(message, "runtimeExcJson"))
3832
4212
  if (!$util.isString(message.runtimeExcJson))
3833
4213
  return "runtimeExcJson: string expected";
3834
- if (message.err != null && message.hasOwnProperty("err"))
4214
+ if (message.err != null && Object.hasOwnProperty.call(message, "err"))
3835
4215
  if (!$util.isString(message.err))
3836
4216
  return "err: string expected";
3837
4217
  return null;
@@ -3845,9 +4225,15 @@ $root.common = (function() {
3845
4225
  * @param {Object.<string,*>} object Plain object
3846
4226
  * @returns {common.ErrorValue} ErrorValue
3847
4227
  */
3848
- ErrorValue.fromObject = function fromObject(object) {
4228
+ ErrorValue.fromObject = function fromObject(object, long) {
3849
4229
  if (object instanceof $root.common.ErrorValue)
3850
4230
  return object;
4231
+ if (!$util.isObject(object))
4232
+ throw TypeError(".common.ErrorValue: object expected");
4233
+ if (long === undefined)
4234
+ long = 0;
4235
+ if (long > $util.recursionLimit)
4236
+ throw Error("maximum nesting depth exceeded");
3851
4237
  var message = new $root.common.ErrorValue();
3852
4238
  if (object.runtimeExcJson != null)
3853
4239
  message.runtimeExcJson = String(object.runtimeExcJson);
@@ -3865,17 +4251,21 @@ $root.common = (function() {
3865
4251
  * @param {$protobuf.IConversionOptions} [options] Conversion options
3866
4252
  * @returns {Object.<string,*>} Plain object
3867
4253
  */
3868
- ErrorValue.toObject = function toObject(message, options) {
4254
+ ErrorValue.toObject = function toObject(message, options, q) {
3869
4255
  if (!options)
3870
4256
  options = {};
4257
+ if (q === undefined)
4258
+ q = 0;
4259
+ if (q > $util.recursionLimit)
4260
+ throw Error("max depth exceeded");
3871
4261
  var object = {};
3872
4262
  if (options.defaults) {
3873
4263
  object.runtimeExcJson = "";
3874
4264
  object.err = "";
3875
4265
  }
3876
- if (message.runtimeExcJson != null && message.hasOwnProperty("runtimeExcJson"))
4266
+ if (message.runtimeExcJson != null && Object.hasOwnProperty.call(message, "runtimeExcJson"))
3877
4267
  object.runtimeExcJson = message.runtimeExcJson;
3878
- if (message.err != null && message.hasOwnProperty("err"))
4268
+ if (message.err != null && Object.hasOwnProperty.call(message, "err"))
3879
4269
  object.err = message.err;
3880
4270
  return object;
3881
4271
  };
@@ -3931,7 +4321,7 @@ $root.common = (function() {
3931
4321
  function AnyValue(properties) {
3932
4322
  if (properties)
3933
4323
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
3934
- if (properties[keys[i]] != null)
4324
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
3935
4325
  this[keys[i]] = properties[keys[i]];
3936
4326
  }
3937
4327
 
@@ -3980,15 +4370,19 @@ $root.common = (function() {
3980
4370
  * @param {$protobuf.Writer} [writer] Writer to encode to
3981
4371
  * @returns {$protobuf.Writer} Writer
3982
4372
  */
3983
- AnyValue.encode = function encode(message, writer) {
4373
+ AnyValue.encode = function encode(message, writer, q) {
3984
4374
  if (!writer)
3985
4375
  writer = $Writer.create();
4376
+ if (q === undefined)
4377
+ q = 0;
4378
+ if (q > $util.recursionLimit)
4379
+ throw Error("max depth exceeded");
3986
4380
  if (message.type != null && Object.hasOwnProperty.call(message, "type"))
3987
4381
  writer.uint32(/* id 1, wireType 2 =*/10).string(message.type);
3988
4382
  if (message.json != null && Object.hasOwnProperty.call(message, "json"))
3989
- $root.common.StringValue.encode(message.json, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
4383
+ $root.common.StringValue.encode(message.json, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim();
3990
4384
  if (message.bytes != null && Object.hasOwnProperty.call(message, "bytes"))
3991
- $root.common.BytesValue.encode(message.bytes, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
4385
+ $root.common.BytesValue.encode(message.bytes, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim();
3992
4386
  return writer;
3993
4387
  };
3994
4388
 
@@ -4002,7 +4396,7 @@ $root.common = (function() {
4002
4396
  * @returns {$protobuf.Writer} Writer
4003
4397
  */
4004
4398
  AnyValue.encodeDelimited = function encodeDelimited(message, writer) {
4005
- return this.encode(message, writer).ldelim();
4399
+ return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();
4006
4400
  };
4007
4401
 
4008
4402
  /**
@@ -4016,9 +4410,13 @@ $root.common = (function() {
4016
4410
  * @throws {Error} If the payload is not a reader or valid buffer
4017
4411
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
4018
4412
  */
4019
- AnyValue.decode = function decode(reader, length, error) {
4413
+ AnyValue.decode = function decode(reader, length, error, long) {
4020
4414
  if (!(reader instanceof $Reader))
4021
4415
  reader = $Reader.create(reader);
4416
+ if (long === undefined)
4417
+ long = 0;
4418
+ if (long > $Reader.recursionLimit)
4419
+ throw Error("maximum nesting depth exceeded");
4022
4420
  var end = length === undefined ? reader.len : reader.pos + length, message = new $root.common.AnyValue();
4023
4421
  while (reader.pos < end) {
4024
4422
  var tag = reader.uint32();
@@ -4030,15 +4428,15 @@ $root.common = (function() {
4030
4428
  break;
4031
4429
  }
4032
4430
  case 2: {
4033
- message.json = $root.common.StringValue.decode(reader, reader.uint32());
4431
+ message.json = $root.common.StringValue.decode(reader, reader.uint32(), undefined, long + 1);
4034
4432
  break;
4035
4433
  }
4036
4434
  case 3: {
4037
- message.bytes = $root.common.BytesValue.decode(reader, reader.uint32());
4435
+ message.bytes = $root.common.BytesValue.decode(reader, reader.uint32(), undefined, long + 1);
4038
4436
  break;
4039
4437
  }
4040
4438
  default:
4041
- reader.skipType(tag & 7);
4439
+ reader.skipType(tag & 7, long);
4042
4440
  break;
4043
4441
  }
4044
4442
  }
@@ -4069,19 +4467,23 @@ $root.common = (function() {
4069
4467
  * @param {Object.<string,*>} message Plain object to verify
4070
4468
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
4071
4469
  */
4072
- AnyValue.verify = function verify(message) {
4470
+ AnyValue.verify = function verify(message, long) {
4073
4471
  if (typeof message !== "object" || message === null)
4074
4472
  return "object expected";
4075
- if (message.type != null && message.hasOwnProperty("type"))
4473
+ if (long === undefined)
4474
+ long = 0;
4475
+ if (long > $util.recursionLimit)
4476
+ return "maximum nesting depth exceeded";
4477
+ if (message.type != null && Object.hasOwnProperty.call(message, "type"))
4076
4478
  if (!$util.isString(message.type))
4077
4479
  return "type: string expected";
4078
- if (message.json != null && message.hasOwnProperty("json")) {
4079
- var error = $root.common.StringValue.verify(message.json);
4480
+ if (message.json != null && Object.hasOwnProperty.call(message, "json")) {
4481
+ var error = $root.common.StringValue.verify(message.json, long + 1);
4080
4482
  if (error)
4081
4483
  return "json." + error;
4082
4484
  }
4083
- if (message.bytes != null && message.hasOwnProperty("bytes")) {
4084
- var error = $root.common.BytesValue.verify(message.bytes);
4485
+ if (message.bytes != null && Object.hasOwnProperty.call(message, "bytes")) {
4486
+ var error = $root.common.BytesValue.verify(message.bytes, long + 1);
4085
4487
  if (error)
4086
4488
  return "bytes." + error;
4087
4489
  }
@@ -4096,21 +4498,27 @@ $root.common = (function() {
4096
4498
  * @param {Object.<string,*>} object Plain object
4097
4499
  * @returns {common.AnyValue} AnyValue
4098
4500
  */
4099
- AnyValue.fromObject = function fromObject(object) {
4501
+ AnyValue.fromObject = function fromObject(object, long) {
4100
4502
  if (object instanceof $root.common.AnyValue)
4101
4503
  return object;
4504
+ if (!$util.isObject(object))
4505
+ throw TypeError(".common.AnyValue: object expected");
4506
+ if (long === undefined)
4507
+ long = 0;
4508
+ if (long > $util.recursionLimit)
4509
+ throw Error("maximum nesting depth exceeded");
4102
4510
  var message = new $root.common.AnyValue();
4103
4511
  if (object.type != null)
4104
4512
  message.type = String(object.type);
4105
4513
  if (object.json != null) {
4106
- if (typeof object.json !== "object")
4514
+ if (!$util.isObject(object.json))
4107
4515
  throw TypeError(".common.AnyValue.json: object expected");
4108
- message.json = $root.common.StringValue.fromObject(object.json);
4516
+ message.json = $root.common.StringValue.fromObject(object.json, long + 1);
4109
4517
  }
4110
4518
  if (object.bytes != null) {
4111
- if (typeof object.bytes !== "object")
4519
+ if (!$util.isObject(object.bytes))
4112
4520
  throw TypeError(".common.AnyValue.bytes: object expected");
4113
- message.bytes = $root.common.BytesValue.fromObject(object.bytes);
4521
+ message.bytes = $root.common.BytesValue.fromObject(object.bytes, long + 1);
4114
4522
  }
4115
4523
  return message;
4116
4524
  };
@@ -4124,21 +4532,25 @@ $root.common = (function() {
4124
4532
  * @param {$protobuf.IConversionOptions} [options] Conversion options
4125
4533
  * @returns {Object.<string,*>} Plain object
4126
4534
  */
4127
- AnyValue.toObject = function toObject(message, options) {
4535
+ AnyValue.toObject = function toObject(message, options, q) {
4128
4536
  if (!options)
4129
4537
  options = {};
4538
+ if (q === undefined)
4539
+ q = 0;
4540
+ if (q > $util.recursionLimit)
4541
+ throw Error("max depth exceeded");
4130
4542
  var object = {};
4131
4543
  if (options.defaults) {
4132
4544
  object.type = "";
4133
4545
  object.json = null;
4134
4546
  object.bytes = null;
4135
4547
  }
4136
- if (message.type != null && message.hasOwnProperty("type"))
4548
+ if (message.type != null && Object.hasOwnProperty.call(message, "type"))
4137
4549
  object.type = message.type;
4138
- if (message.json != null && message.hasOwnProperty("json"))
4139
- object.json = $root.common.StringValue.toObject(message.json, options);
4140
- if (message.bytes != null && message.hasOwnProperty("bytes"))
4141
- object.bytes = $root.common.BytesValue.toObject(message.bytes, options);
4550
+ if (message.json != null && Object.hasOwnProperty.call(message, "json"))
4551
+ object.json = $root.common.StringValue.toObject(message.json, options, q + 1);
4552
+ if (message.bytes != null && Object.hasOwnProperty.call(message, "bytes"))
4553
+ object.bytes = $root.common.BytesValue.toObject(message.bytes, options, q + 1);
4142
4554
  return object;
4143
4555
  };
4144
4556