core-3nweb-client-lib 0.22.1 → 0.24.1

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.
Files changed (57) hide show
  1. package/build/core/index.d.ts +1 -1
  2. package/build/core/index.js +1 -1
  3. package/build/ipc-via-protobuf/asmail-cap.js +17 -18
  4. package/build/ipc-via-protobuf/bytes.d.ts +4 -4
  5. package/build/ipc-via-protobuf/bytes.js +10 -11
  6. package/build/ipc-via-protobuf/connector-clients-side.d.ts +2 -2
  7. package/build/ipc-via-protobuf/connector-services-side.d.ts +3 -3
  8. package/build/ipc-via-protobuf/connector-services-side.js +0 -1
  9. package/build/ipc-via-protobuf/connector.d.ts +8 -8
  10. package/build/ipc-via-protobuf/connector.js +5 -18
  11. package/build/ipc-via-protobuf/file.d.ts +4 -4
  12. package/build/ipc-via-protobuf/file.js +30 -31
  13. package/build/ipc-via-protobuf/fs.d.ts +3 -3
  14. package/build/ipc-via-protobuf/fs.js +37 -38
  15. package/build/ipc-via-protobuf/log-cap.js +4 -5
  16. package/build/ipc-via-protobuf/mailerid.js +5 -7
  17. package/build/ipc-via-protobuf/protobuf-msg.d.ts +4 -6
  18. package/build/ipc-via-protobuf/protobuf-msg.js +9 -24
  19. package/build/ipc-via-protobuf/startup-cap.js +10 -11
  20. package/build/ipc-via-protobuf/storage-cap.js +7 -8
  21. package/build/lib-client/cryptor/cryptor-in-worker.js +7 -20
  22. package/build/lib-client/cryptor/in-proc-wasm.js +7 -20
  23. package/build/lib-client/{protobuf-loader.d.ts → protobuf-type.d.ts} +2 -4
  24. package/build/lib-client/{protobuf-loader.js → protobuf-type.js} +3 -43
  25. package/build/lib-index.d.ts +0 -1
  26. package/build/protos/asmail.proto.js +22296 -0
  27. package/build/protos/bytes.proto.js +3614 -0
  28. package/build/protos/common.proto.js +1863 -0
  29. package/build/protos/cryptor.proto.js +1667 -0
  30. package/build/protos/file.proto.js +7264 -0
  31. package/build/protos/fs.proto.js +17142 -0
  32. package/build/protos/ipc.proto.js +2349 -0
  33. package/build/protos/logger.proto.js +2112 -0
  34. package/build/protos/mailerid.proto.js +2249 -0
  35. package/build/protos/startup.proto.js +3291 -0
  36. package/build/protos/storage.proto.js +2689 -0
  37. package/package.json +2 -2
  38. package/{build/ipc-via-protobuf/protos → protos}/asmail.proto +0 -0
  39. package/{build/ipc-via-protobuf/protos → protos}/bytes.proto +0 -0
  40. package/{build/ipc-via-protobuf/protos → protos}/common.proto +0 -0
  41. package/{build/ipc-via-protobuf/protos → protos}/file.proto +0 -0
  42. package/{build/ipc-via-protobuf/protos → protos}/fs.proto +0 -0
  43. package/{build/ipc-via-protobuf/protos → protos}/ipc.proto +0 -0
  44. package/{build/ipc-via-protobuf/protos → protos}/logger.proto +0 -0
  45. package/{build/ipc-via-protobuf/protos → protos}/mailerid.proto +0 -0
  46. package/{build/ipc-via-protobuf/protos → protos}/startup.proto +0 -0
  47. package/{build/ipc-via-protobuf/protos → protos}/storage.proto +0 -0
  48. package/build/api-defs/asmail.d.ts +0 -292
  49. package/build/api-defs/common-caps.d.ts +0 -84
  50. package/build/api-defs/files.d.ts +0 -1037
  51. package/build/api-defs/mailerid.d.ts +0 -29
  52. package/build/api-defs/startup.d.ts +0 -121
  53. package/build/api-defs/storage.d.ts +0 -69
  54. package/build/api-defs/web3n.d.ts +0 -50
  55. package/build/ipc-via-protobuf/proto-defs.js +0 -1092
  56. package/build/lib-client/cryptor/proto-defs.js +0 -50
  57. package/build/lib-client/cryptor/protos/cryptor.proto +0 -45
@@ -0,0 +1,1863 @@
1
+ /*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/
2
+ "use strict";
3
+
4
+ var $protobuf = require("protobufjs/minimal");
5
+
6
+ // Common aliases
7
+ var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;
8
+
9
+ // Exported root namespace
10
+ var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});
11
+
12
+ $root.common = (function() {
13
+
14
+ /**
15
+ * Namespace common.
16
+ * @exports common
17
+ * @namespace
18
+ */
19
+ var common = {};
20
+
21
+ common.ObjectReference = (function() {
22
+
23
+ /**
24
+ * Properties of an ObjectReference.
25
+ * @memberof common
26
+ * @interface IObjectReference
27
+ * @property {string|null} [objType] ObjectReference objType
28
+ * @property {Array.<string>|null} [path] ObjectReference path
29
+ */
30
+
31
+ /**
32
+ * Constructs a new ObjectReference.
33
+ * @memberof common
34
+ * @classdesc Represents an ObjectReference.
35
+ * @implements IObjectReference
36
+ * @constructor
37
+ * @param {common.IObjectReference=} [properties] Properties to set
38
+ */
39
+ function ObjectReference(properties) {
40
+ this.path = [];
41
+ if (properties)
42
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
43
+ if (properties[keys[i]] != null)
44
+ this[keys[i]] = properties[keys[i]];
45
+ }
46
+
47
+ /**
48
+ * ObjectReference objType.
49
+ * @member {string} objType
50
+ * @memberof common.ObjectReference
51
+ * @instance
52
+ */
53
+ ObjectReference.prototype.objType = "";
54
+
55
+ /**
56
+ * ObjectReference path.
57
+ * @member {Array.<string>} path
58
+ * @memberof common.ObjectReference
59
+ * @instance
60
+ */
61
+ ObjectReference.prototype.path = $util.emptyArray;
62
+
63
+ /**
64
+ * Creates a new ObjectReference instance using the specified properties.
65
+ * @function create
66
+ * @memberof common.ObjectReference
67
+ * @static
68
+ * @param {common.IObjectReference=} [properties] Properties to set
69
+ * @returns {common.ObjectReference} ObjectReference instance
70
+ */
71
+ ObjectReference.create = function create(properties) {
72
+ return new ObjectReference(properties);
73
+ };
74
+
75
+ /**
76
+ * Encodes the specified ObjectReference message. Does not implicitly {@link common.ObjectReference.verify|verify} messages.
77
+ * @function encode
78
+ * @memberof common.ObjectReference
79
+ * @static
80
+ * @param {common.IObjectReference} message ObjectReference message or plain object to encode
81
+ * @param {$protobuf.Writer} [writer] Writer to encode to
82
+ * @returns {$protobuf.Writer} Writer
83
+ */
84
+ ObjectReference.encode = function encode(message, writer) {
85
+ if (!writer)
86
+ writer = $Writer.create();
87
+ if (message.objType != null && Object.hasOwnProperty.call(message, "objType"))
88
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.objType);
89
+ if (message.path != null && message.path.length)
90
+ for (var i = 0; i < message.path.length; ++i)
91
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.path[i]);
92
+ return writer;
93
+ };
94
+
95
+ /**
96
+ * Encodes the specified ObjectReference message, length delimited. Does not implicitly {@link common.ObjectReference.verify|verify} messages.
97
+ * @function encodeDelimited
98
+ * @memberof common.ObjectReference
99
+ * @static
100
+ * @param {common.IObjectReference} message ObjectReference message or plain object to encode
101
+ * @param {$protobuf.Writer} [writer] Writer to encode to
102
+ * @returns {$protobuf.Writer} Writer
103
+ */
104
+ ObjectReference.encodeDelimited = function encodeDelimited(message, writer) {
105
+ return this.encode(message, writer).ldelim();
106
+ };
107
+
108
+ /**
109
+ * Decodes an ObjectReference message from the specified reader or buffer.
110
+ * @function decode
111
+ * @memberof common.ObjectReference
112
+ * @static
113
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
114
+ * @param {number} [length] Message length if known beforehand
115
+ * @returns {common.ObjectReference} ObjectReference
116
+ * @throws {Error} If the payload is not a reader or valid buffer
117
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
118
+ */
119
+ ObjectReference.decode = function decode(reader, length) {
120
+ if (!(reader instanceof $Reader))
121
+ reader = $Reader.create(reader);
122
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.common.ObjectReference();
123
+ while (reader.pos < end) {
124
+ var tag = reader.uint32();
125
+ switch (tag >>> 3) {
126
+ case 1:
127
+ message.objType = reader.string();
128
+ break;
129
+ case 2:
130
+ if (!(message.path && message.path.length))
131
+ message.path = [];
132
+ message.path.push(reader.string());
133
+ break;
134
+ default:
135
+ reader.skipType(tag & 7);
136
+ break;
137
+ }
138
+ }
139
+ return message;
140
+ };
141
+
142
+ /**
143
+ * Decodes an ObjectReference message from the specified reader or buffer, length delimited.
144
+ * @function decodeDelimited
145
+ * @memberof common.ObjectReference
146
+ * @static
147
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
148
+ * @returns {common.ObjectReference} ObjectReference
149
+ * @throws {Error} If the payload is not a reader or valid buffer
150
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
151
+ */
152
+ ObjectReference.decodeDelimited = function decodeDelimited(reader) {
153
+ if (!(reader instanceof $Reader))
154
+ reader = new $Reader(reader);
155
+ return this.decode(reader, reader.uint32());
156
+ };
157
+
158
+ /**
159
+ * Verifies an ObjectReference message.
160
+ * @function verify
161
+ * @memberof common.ObjectReference
162
+ * @static
163
+ * @param {Object.<string,*>} message Plain object to verify
164
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
165
+ */
166
+ ObjectReference.verify = function verify(message) {
167
+ if (typeof message !== "object" || message === null)
168
+ return "object expected";
169
+ if (message.objType != null && message.hasOwnProperty("objType"))
170
+ if (!$util.isString(message.objType))
171
+ return "objType: string expected";
172
+ if (message.path != null && message.hasOwnProperty("path")) {
173
+ if (!Array.isArray(message.path))
174
+ return "path: array expected";
175
+ for (var i = 0; i < message.path.length; ++i)
176
+ if (!$util.isString(message.path[i]))
177
+ return "path: string[] expected";
178
+ }
179
+ return null;
180
+ };
181
+
182
+ /**
183
+ * Creates an ObjectReference message from a plain object. Also converts values to their respective internal types.
184
+ * @function fromObject
185
+ * @memberof common.ObjectReference
186
+ * @static
187
+ * @param {Object.<string,*>} object Plain object
188
+ * @returns {common.ObjectReference} ObjectReference
189
+ */
190
+ ObjectReference.fromObject = function fromObject(object) {
191
+ if (object instanceof $root.common.ObjectReference)
192
+ return object;
193
+ var message = new $root.common.ObjectReference();
194
+ if (object.objType != null)
195
+ message.objType = String(object.objType);
196
+ if (object.path) {
197
+ if (!Array.isArray(object.path))
198
+ throw TypeError(".common.ObjectReference.path: array expected");
199
+ message.path = [];
200
+ for (var i = 0; i < object.path.length; ++i)
201
+ message.path[i] = String(object.path[i]);
202
+ }
203
+ return message;
204
+ };
205
+
206
+ /**
207
+ * Creates a plain object from an ObjectReference message. Also converts values to other types if specified.
208
+ * @function toObject
209
+ * @memberof common.ObjectReference
210
+ * @static
211
+ * @param {common.ObjectReference} message ObjectReference
212
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
213
+ * @returns {Object.<string,*>} Plain object
214
+ */
215
+ ObjectReference.toObject = function toObject(message, options) {
216
+ if (!options)
217
+ options = {};
218
+ var object = {};
219
+ if (options.arrays || options.defaults)
220
+ object.path = [];
221
+ if (options.defaults)
222
+ object.objType = "";
223
+ if (message.objType != null && message.hasOwnProperty("objType"))
224
+ object.objType = message.objType;
225
+ if (message.path && message.path.length) {
226
+ object.path = [];
227
+ for (var j = 0; j < message.path.length; ++j)
228
+ object.path[j] = message.path[j];
229
+ }
230
+ return object;
231
+ };
232
+
233
+ /**
234
+ * Converts this ObjectReference to JSON.
235
+ * @function toJSON
236
+ * @memberof common.ObjectReference
237
+ * @instance
238
+ * @returns {Object.<string,*>} JSON object
239
+ */
240
+ ObjectReference.prototype.toJSON = function toJSON() {
241
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
242
+ };
243
+
244
+ return ObjectReference;
245
+ })();
246
+
247
+ common.BooleanValue = (function() {
248
+
249
+ /**
250
+ * Properties of a BooleanValue.
251
+ * @memberof common
252
+ * @interface IBooleanValue
253
+ * @property {boolean|null} [value] BooleanValue value
254
+ */
255
+
256
+ /**
257
+ * Constructs a new BooleanValue.
258
+ * @memberof common
259
+ * @classdesc Represents a BooleanValue.
260
+ * @implements IBooleanValue
261
+ * @constructor
262
+ * @param {common.IBooleanValue=} [properties] Properties to set
263
+ */
264
+ function BooleanValue(properties) {
265
+ if (properties)
266
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
267
+ if (properties[keys[i]] != null)
268
+ this[keys[i]] = properties[keys[i]];
269
+ }
270
+
271
+ /**
272
+ * BooleanValue value.
273
+ * @member {boolean} value
274
+ * @memberof common.BooleanValue
275
+ * @instance
276
+ */
277
+ BooleanValue.prototype.value = false;
278
+
279
+ /**
280
+ * Creates a new BooleanValue instance using the specified properties.
281
+ * @function create
282
+ * @memberof common.BooleanValue
283
+ * @static
284
+ * @param {common.IBooleanValue=} [properties] Properties to set
285
+ * @returns {common.BooleanValue} BooleanValue instance
286
+ */
287
+ BooleanValue.create = function create(properties) {
288
+ return new BooleanValue(properties);
289
+ };
290
+
291
+ /**
292
+ * Encodes the specified BooleanValue message. Does not implicitly {@link common.BooleanValue.verify|verify} messages.
293
+ * @function encode
294
+ * @memberof common.BooleanValue
295
+ * @static
296
+ * @param {common.IBooleanValue} message BooleanValue message or plain object to encode
297
+ * @param {$protobuf.Writer} [writer] Writer to encode to
298
+ * @returns {$protobuf.Writer} Writer
299
+ */
300
+ BooleanValue.encode = function encode(message, writer) {
301
+ if (!writer)
302
+ writer = $Writer.create();
303
+ if (message.value != null && Object.hasOwnProperty.call(message, "value"))
304
+ writer.uint32(/* id 1, wireType 0 =*/8).bool(message.value);
305
+ return writer;
306
+ };
307
+
308
+ /**
309
+ * Encodes the specified BooleanValue message, length delimited. Does not implicitly {@link common.BooleanValue.verify|verify} messages.
310
+ * @function encodeDelimited
311
+ * @memberof common.BooleanValue
312
+ * @static
313
+ * @param {common.IBooleanValue} message BooleanValue message or plain object to encode
314
+ * @param {$protobuf.Writer} [writer] Writer to encode to
315
+ * @returns {$protobuf.Writer} Writer
316
+ */
317
+ BooleanValue.encodeDelimited = function encodeDelimited(message, writer) {
318
+ return this.encode(message, writer).ldelim();
319
+ };
320
+
321
+ /**
322
+ * Decodes a BooleanValue message from the specified reader or buffer.
323
+ * @function decode
324
+ * @memberof common.BooleanValue
325
+ * @static
326
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
327
+ * @param {number} [length] Message length if known beforehand
328
+ * @returns {common.BooleanValue} BooleanValue
329
+ * @throws {Error} If the payload is not a reader or valid buffer
330
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
331
+ */
332
+ BooleanValue.decode = function decode(reader, length) {
333
+ if (!(reader instanceof $Reader))
334
+ reader = $Reader.create(reader);
335
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.common.BooleanValue();
336
+ while (reader.pos < end) {
337
+ var tag = reader.uint32();
338
+ switch (tag >>> 3) {
339
+ case 1:
340
+ message.value = reader.bool();
341
+ break;
342
+ default:
343
+ reader.skipType(tag & 7);
344
+ break;
345
+ }
346
+ }
347
+ return message;
348
+ };
349
+
350
+ /**
351
+ * Decodes a BooleanValue message from the specified reader or buffer, length delimited.
352
+ * @function decodeDelimited
353
+ * @memberof common.BooleanValue
354
+ * @static
355
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
356
+ * @returns {common.BooleanValue} BooleanValue
357
+ * @throws {Error} If the payload is not a reader or valid buffer
358
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
359
+ */
360
+ BooleanValue.decodeDelimited = function decodeDelimited(reader) {
361
+ if (!(reader instanceof $Reader))
362
+ reader = new $Reader(reader);
363
+ return this.decode(reader, reader.uint32());
364
+ };
365
+
366
+ /**
367
+ * Verifies a BooleanValue message.
368
+ * @function verify
369
+ * @memberof common.BooleanValue
370
+ * @static
371
+ * @param {Object.<string,*>} message Plain object to verify
372
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
373
+ */
374
+ BooleanValue.verify = function verify(message) {
375
+ if (typeof message !== "object" || message === null)
376
+ return "object expected";
377
+ if (message.value != null && message.hasOwnProperty("value"))
378
+ if (typeof message.value !== "boolean")
379
+ return "value: boolean expected";
380
+ return null;
381
+ };
382
+
383
+ /**
384
+ * Creates a BooleanValue message from a plain object. Also converts values to their respective internal types.
385
+ * @function fromObject
386
+ * @memberof common.BooleanValue
387
+ * @static
388
+ * @param {Object.<string,*>} object Plain object
389
+ * @returns {common.BooleanValue} BooleanValue
390
+ */
391
+ BooleanValue.fromObject = function fromObject(object) {
392
+ if (object instanceof $root.common.BooleanValue)
393
+ return object;
394
+ var message = new $root.common.BooleanValue();
395
+ if (object.value != null)
396
+ message.value = Boolean(object.value);
397
+ return message;
398
+ };
399
+
400
+ /**
401
+ * Creates a plain object from a BooleanValue message. Also converts values to other types if specified.
402
+ * @function toObject
403
+ * @memberof common.BooleanValue
404
+ * @static
405
+ * @param {common.BooleanValue} message BooleanValue
406
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
407
+ * @returns {Object.<string,*>} Plain object
408
+ */
409
+ BooleanValue.toObject = function toObject(message, options) {
410
+ if (!options)
411
+ options = {};
412
+ var object = {};
413
+ if (options.defaults)
414
+ object.value = false;
415
+ if (message.value != null && message.hasOwnProperty("value"))
416
+ object.value = message.value;
417
+ return object;
418
+ };
419
+
420
+ /**
421
+ * Converts this BooleanValue to JSON.
422
+ * @function toJSON
423
+ * @memberof common.BooleanValue
424
+ * @instance
425
+ * @returns {Object.<string,*>} JSON object
426
+ */
427
+ BooleanValue.prototype.toJSON = function toJSON() {
428
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
429
+ };
430
+
431
+ return BooleanValue;
432
+ })();
433
+
434
+ common.StringArrayValue = (function() {
435
+
436
+ /**
437
+ * Properties of a StringArrayValue.
438
+ * @memberof common
439
+ * @interface IStringArrayValue
440
+ * @property {Array.<string>|null} [values] StringArrayValue values
441
+ */
442
+
443
+ /**
444
+ * Constructs a new StringArrayValue.
445
+ * @memberof common
446
+ * @classdesc Represents a StringArrayValue.
447
+ * @implements IStringArrayValue
448
+ * @constructor
449
+ * @param {common.IStringArrayValue=} [properties] Properties to set
450
+ */
451
+ function StringArrayValue(properties) {
452
+ this.values = [];
453
+ if (properties)
454
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
455
+ if (properties[keys[i]] != null)
456
+ this[keys[i]] = properties[keys[i]];
457
+ }
458
+
459
+ /**
460
+ * StringArrayValue values.
461
+ * @member {Array.<string>} values
462
+ * @memberof common.StringArrayValue
463
+ * @instance
464
+ */
465
+ StringArrayValue.prototype.values = $util.emptyArray;
466
+
467
+ /**
468
+ * Creates a new StringArrayValue instance using the specified properties.
469
+ * @function create
470
+ * @memberof common.StringArrayValue
471
+ * @static
472
+ * @param {common.IStringArrayValue=} [properties] Properties to set
473
+ * @returns {common.StringArrayValue} StringArrayValue instance
474
+ */
475
+ StringArrayValue.create = function create(properties) {
476
+ return new StringArrayValue(properties);
477
+ };
478
+
479
+ /**
480
+ * Encodes the specified StringArrayValue message. Does not implicitly {@link common.StringArrayValue.verify|verify} messages.
481
+ * @function encode
482
+ * @memberof common.StringArrayValue
483
+ * @static
484
+ * @param {common.IStringArrayValue} message StringArrayValue message or plain object to encode
485
+ * @param {$protobuf.Writer} [writer] Writer to encode to
486
+ * @returns {$protobuf.Writer} Writer
487
+ */
488
+ StringArrayValue.encode = function encode(message, writer) {
489
+ if (!writer)
490
+ writer = $Writer.create();
491
+ if (message.values != null && message.values.length)
492
+ for (var i = 0; i < message.values.length; ++i)
493
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.values[i]);
494
+ return writer;
495
+ };
496
+
497
+ /**
498
+ * Encodes the specified StringArrayValue message, length delimited. Does not implicitly {@link common.StringArrayValue.verify|verify} messages.
499
+ * @function encodeDelimited
500
+ * @memberof common.StringArrayValue
501
+ * @static
502
+ * @param {common.IStringArrayValue} message StringArrayValue message or plain object to encode
503
+ * @param {$protobuf.Writer} [writer] Writer to encode to
504
+ * @returns {$protobuf.Writer} Writer
505
+ */
506
+ StringArrayValue.encodeDelimited = function encodeDelimited(message, writer) {
507
+ return this.encode(message, writer).ldelim();
508
+ };
509
+
510
+ /**
511
+ * Decodes a StringArrayValue message from the specified reader or buffer.
512
+ * @function decode
513
+ * @memberof common.StringArrayValue
514
+ * @static
515
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
516
+ * @param {number} [length] Message length if known beforehand
517
+ * @returns {common.StringArrayValue} StringArrayValue
518
+ * @throws {Error} If the payload is not a reader or valid buffer
519
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
520
+ */
521
+ StringArrayValue.decode = function decode(reader, length) {
522
+ if (!(reader instanceof $Reader))
523
+ reader = $Reader.create(reader);
524
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.common.StringArrayValue();
525
+ while (reader.pos < end) {
526
+ var tag = reader.uint32();
527
+ switch (tag >>> 3) {
528
+ case 1:
529
+ if (!(message.values && message.values.length))
530
+ message.values = [];
531
+ message.values.push(reader.string());
532
+ break;
533
+ default:
534
+ reader.skipType(tag & 7);
535
+ break;
536
+ }
537
+ }
538
+ return message;
539
+ };
540
+
541
+ /**
542
+ * Decodes a StringArrayValue message from the specified reader or buffer, length delimited.
543
+ * @function decodeDelimited
544
+ * @memberof common.StringArrayValue
545
+ * @static
546
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
547
+ * @returns {common.StringArrayValue} StringArrayValue
548
+ * @throws {Error} If the payload is not a reader or valid buffer
549
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
550
+ */
551
+ StringArrayValue.decodeDelimited = function decodeDelimited(reader) {
552
+ if (!(reader instanceof $Reader))
553
+ reader = new $Reader(reader);
554
+ return this.decode(reader, reader.uint32());
555
+ };
556
+
557
+ /**
558
+ * Verifies a StringArrayValue message.
559
+ * @function verify
560
+ * @memberof common.StringArrayValue
561
+ * @static
562
+ * @param {Object.<string,*>} message Plain object to verify
563
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
564
+ */
565
+ StringArrayValue.verify = function verify(message) {
566
+ if (typeof message !== "object" || message === null)
567
+ return "object expected";
568
+ if (message.values != null && message.hasOwnProperty("values")) {
569
+ if (!Array.isArray(message.values))
570
+ return "values: array expected";
571
+ for (var i = 0; i < message.values.length; ++i)
572
+ if (!$util.isString(message.values[i]))
573
+ return "values: string[] expected";
574
+ }
575
+ return null;
576
+ };
577
+
578
+ /**
579
+ * Creates a StringArrayValue message from a plain object. Also converts values to their respective internal types.
580
+ * @function fromObject
581
+ * @memberof common.StringArrayValue
582
+ * @static
583
+ * @param {Object.<string,*>} object Plain object
584
+ * @returns {common.StringArrayValue} StringArrayValue
585
+ */
586
+ StringArrayValue.fromObject = function fromObject(object) {
587
+ if (object instanceof $root.common.StringArrayValue)
588
+ return object;
589
+ var message = new $root.common.StringArrayValue();
590
+ if (object.values) {
591
+ if (!Array.isArray(object.values))
592
+ throw TypeError(".common.StringArrayValue.values: array expected");
593
+ message.values = [];
594
+ for (var i = 0; i < object.values.length; ++i)
595
+ message.values[i] = String(object.values[i]);
596
+ }
597
+ return message;
598
+ };
599
+
600
+ /**
601
+ * Creates a plain object from a StringArrayValue message. Also converts values to other types if specified.
602
+ * @function toObject
603
+ * @memberof common.StringArrayValue
604
+ * @static
605
+ * @param {common.StringArrayValue} message StringArrayValue
606
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
607
+ * @returns {Object.<string,*>} Plain object
608
+ */
609
+ StringArrayValue.toObject = function toObject(message, options) {
610
+ if (!options)
611
+ options = {};
612
+ var object = {};
613
+ if (options.arrays || options.defaults)
614
+ object.values = [];
615
+ if (message.values && message.values.length) {
616
+ object.values = [];
617
+ for (var j = 0; j < message.values.length; ++j)
618
+ object.values[j] = message.values[j];
619
+ }
620
+ return object;
621
+ };
622
+
623
+ /**
624
+ * Converts this StringArrayValue to JSON.
625
+ * @function toJSON
626
+ * @memberof common.StringArrayValue
627
+ * @instance
628
+ * @returns {Object.<string,*>} JSON object
629
+ */
630
+ StringArrayValue.prototype.toJSON = function toJSON() {
631
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
632
+ };
633
+
634
+ return StringArrayValue;
635
+ })();
636
+
637
+ common.UInt64Value = (function() {
638
+
639
+ /**
640
+ * Properties of a UInt64Value.
641
+ * @memberof common
642
+ * @interface IUInt64Value
643
+ * @property {number|Long|null} [value] UInt64Value value
644
+ */
645
+
646
+ /**
647
+ * Constructs a new UInt64Value.
648
+ * @memberof common
649
+ * @classdesc Represents a UInt64Value.
650
+ * @implements IUInt64Value
651
+ * @constructor
652
+ * @param {common.IUInt64Value=} [properties] Properties to set
653
+ */
654
+ function UInt64Value(properties) {
655
+ if (properties)
656
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
657
+ if (properties[keys[i]] != null)
658
+ this[keys[i]] = properties[keys[i]];
659
+ }
660
+
661
+ /**
662
+ * UInt64Value value.
663
+ * @member {number|Long} value
664
+ * @memberof common.UInt64Value
665
+ * @instance
666
+ */
667
+ UInt64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
668
+
669
+ /**
670
+ * Creates a new UInt64Value instance using the specified properties.
671
+ * @function create
672
+ * @memberof common.UInt64Value
673
+ * @static
674
+ * @param {common.IUInt64Value=} [properties] Properties to set
675
+ * @returns {common.UInt64Value} UInt64Value instance
676
+ */
677
+ UInt64Value.create = function create(properties) {
678
+ return new UInt64Value(properties);
679
+ };
680
+
681
+ /**
682
+ * Encodes the specified UInt64Value message. Does not implicitly {@link common.UInt64Value.verify|verify} messages.
683
+ * @function encode
684
+ * @memberof common.UInt64Value
685
+ * @static
686
+ * @param {common.IUInt64Value} message UInt64Value message or plain object to encode
687
+ * @param {$protobuf.Writer} [writer] Writer to encode to
688
+ * @returns {$protobuf.Writer} Writer
689
+ */
690
+ UInt64Value.encode = function encode(message, writer) {
691
+ if (!writer)
692
+ writer = $Writer.create();
693
+ if (message.value != null && Object.hasOwnProperty.call(message, "value"))
694
+ writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.value);
695
+ return writer;
696
+ };
697
+
698
+ /**
699
+ * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link common.UInt64Value.verify|verify} messages.
700
+ * @function encodeDelimited
701
+ * @memberof common.UInt64Value
702
+ * @static
703
+ * @param {common.IUInt64Value} message UInt64Value message or plain object to encode
704
+ * @param {$protobuf.Writer} [writer] Writer to encode to
705
+ * @returns {$protobuf.Writer} Writer
706
+ */
707
+ UInt64Value.encodeDelimited = function encodeDelimited(message, writer) {
708
+ return this.encode(message, writer).ldelim();
709
+ };
710
+
711
+ /**
712
+ * Decodes a UInt64Value message from the specified reader or buffer.
713
+ * @function decode
714
+ * @memberof common.UInt64Value
715
+ * @static
716
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
717
+ * @param {number} [length] Message length if known beforehand
718
+ * @returns {common.UInt64Value} UInt64Value
719
+ * @throws {Error} If the payload is not a reader or valid buffer
720
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
721
+ */
722
+ UInt64Value.decode = function decode(reader, length) {
723
+ if (!(reader instanceof $Reader))
724
+ reader = $Reader.create(reader);
725
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.common.UInt64Value();
726
+ while (reader.pos < end) {
727
+ var tag = reader.uint32();
728
+ switch (tag >>> 3) {
729
+ case 1:
730
+ message.value = reader.uint64();
731
+ break;
732
+ default:
733
+ reader.skipType(tag & 7);
734
+ break;
735
+ }
736
+ }
737
+ return message;
738
+ };
739
+
740
+ /**
741
+ * Decodes a UInt64Value message from the specified reader or buffer, length delimited.
742
+ * @function decodeDelimited
743
+ * @memberof common.UInt64Value
744
+ * @static
745
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
746
+ * @returns {common.UInt64Value} UInt64Value
747
+ * @throws {Error} If the payload is not a reader or valid buffer
748
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
749
+ */
750
+ UInt64Value.decodeDelimited = function decodeDelimited(reader) {
751
+ if (!(reader instanceof $Reader))
752
+ reader = new $Reader(reader);
753
+ return this.decode(reader, reader.uint32());
754
+ };
755
+
756
+ /**
757
+ * Verifies a UInt64Value message.
758
+ * @function verify
759
+ * @memberof common.UInt64Value
760
+ * @static
761
+ * @param {Object.<string,*>} message Plain object to verify
762
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
763
+ */
764
+ UInt64Value.verify = function verify(message) {
765
+ if (typeof message !== "object" || message === null)
766
+ return "object expected";
767
+ if (message.value != null && message.hasOwnProperty("value"))
768
+ if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high)))
769
+ return "value: integer|Long expected";
770
+ return null;
771
+ };
772
+
773
+ /**
774
+ * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types.
775
+ * @function fromObject
776
+ * @memberof common.UInt64Value
777
+ * @static
778
+ * @param {Object.<string,*>} object Plain object
779
+ * @returns {common.UInt64Value} UInt64Value
780
+ */
781
+ UInt64Value.fromObject = function fromObject(object) {
782
+ if (object instanceof $root.common.UInt64Value)
783
+ return object;
784
+ var message = new $root.common.UInt64Value();
785
+ if (object.value != null)
786
+ if ($util.Long)
787
+ (message.value = $util.Long.fromValue(object.value)).unsigned = true;
788
+ else if (typeof object.value === "string")
789
+ message.value = parseInt(object.value, 10);
790
+ else if (typeof object.value === "number")
791
+ message.value = object.value;
792
+ else if (typeof object.value === "object")
793
+ message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(true);
794
+ return message;
795
+ };
796
+
797
+ /**
798
+ * Creates a plain object from a UInt64Value message. Also converts values to other types if specified.
799
+ * @function toObject
800
+ * @memberof common.UInt64Value
801
+ * @static
802
+ * @param {common.UInt64Value} message UInt64Value
803
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
804
+ * @returns {Object.<string,*>} Plain object
805
+ */
806
+ UInt64Value.toObject = function toObject(message, options) {
807
+ if (!options)
808
+ options = {};
809
+ var object = {};
810
+ if (options.defaults)
811
+ if ($util.Long) {
812
+ var long = new $util.Long(0, 0, true);
813
+ object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
814
+ } else
815
+ object.value = options.longs === String ? "0" : 0;
816
+ if (message.value != null && message.hasOwnProperty("value"))
817
+ if (typeof message.value === "number")
818
+ object.value = options.longs === String ? String(message.value) : message.value;
819
+ else
820
+ 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;
821
+ return object;
822
+ };
823
+
824
+ /**
825
+ * Converts this UInt64Value to JSON.
826
+ * @function toJSON
827
+ * @memberof common.UInt64Value
828
+ * @instance
829
+ * @returns {Object.<string,*>} JSON object
830
+ */
831
+ UInt64Value.prototype.toJSON = function toJSON() {
832
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
833
+ };
834
+
835
+ return UInt64Value;
836
+ })();
837
+
838
+ common.UInt32Value = (function() {
839
+
840
+ /**
841
+ * Properties of a UInt32Value.
842
+ * @memberof common
843
+ * @interface IUInt32Value
844
+ * @property {number|null} [value] UInt32Value value
845
+ */
846
+
847
+ /**
848
+ * Constructs a new UInt32Value.
849
+ * @memberof common
850
+ * @classdesc Represents a UInt32Value.
851
+ * @implements IUInt32Value
852
+ * @constructor
853
+ * @param {common.IUInt32Value=} [properties] Properties to set
854
+ */
855
+ function UInt32Value(properties) {
856
+ if (properties)
857
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
858
+ if (properties[keys[i]] != null)
859
+ this[keys[i]] = properties[keys[i]];
860
+ }
861
+
862
+ /**
863
+ * UInt32Value value.
864
+ * @member {number} value
865
+ * @memberof common.UInt32Value
866
+ * @instance
867
+ */
868
+ UInt32Value.prototype.value = 0;
869
+
870
+ /**
871
+ * Creates a new UInt32Value instance using the specified properties.
872
+ * @function create
873
+ * @memberof common.UInt32Value
874
+ * @static
875
+ * @param {common.IUInt32Value=} [properties] Properties to set
876
+ * @returns {common.UInt32Value} UInt32Value instance
877
+ */
878
+ UInt32Value.create = function create(properties) {
879
+ return new UInt32Value(properties);
880
+ };
881
+
882
+ /**
883
+ * Encodes the specified UInt32Value message. Does not implicitly {@link common.UInt32Value.verify|verify} messages.
884
+ * @function encode
885
+ * @memberof common.UInt32Value
886
+ * @static
887
+ * @param {common.IUInt32Value} message UInt32Value message or plain object to encode
888
+ * @param {$protobuf.Writer} [writer] Writer to encode to
889
+ * @returns {$protobuf.Writer} Writer
890
+ */
891
+ UInt32Value.encode = function encode(message, writer) {
892
+ if (!writer)
893
+ writer = $Writer.create();
894
+ if (message.value != null && Object.hasOwnProperty.call(message, "value"))
895
+ writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.value);
896
+ return writer;
897
+ };
898
+
899
+ /**
900
+ * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link common.UInt32Value.verify|verify} messages.
901
+ * @function encodeDelimited
902
+ * @memberof common.UInt32Value
903
+ * @static
904
+ * @param {common.IUInt32Value} message UInt32Value message or plain object to encode
905
+ * @param {$protobuf.Writer} [writer] Writer to encode to
906
+ * @returns {$protobuf.Writer} Writer
907
+ */
908
+ UInt32Value.encodeDelimited = function encodeDelimited(message, writer) {
909
+ return this.encode(message, writer).ldelim();
910
+ };
911
+
912
+ /**
913
+ * Decodes a UInt32Value message from the specified reader or buffer.
914
+ * @function decode
915
+ * @memberof common.UInt32Value
916
+ * @static
917
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
918
+ * @param {number} [length] Message length if known beforehand
919
+ * @returns {common.UInt32Value} UInt32Value
920
+ * @throws {Error} If the payload is not a reader or valid buffer
921
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
922
+ */
923
+ UInt32Value.decode = function decode(reader, length) {
924
+ if (!(reader instanceof $Reader))
925
+ reader = $Reader.create(reader);
926
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.common.UInt32Value();
927
+ while (reader.pos < end) {
928
+ var tag = reader.uint32();
929
+ switch (tag >>> 3) {
930
+ case 1:
931
+ message.value = reader.uint32();
932
+ break;
933
+ default:
934
+ reader.skipType(tag & 7);
935
+ break;
936
+ }
937
+ }
938
+ return message;
939
+ };
940
+
941
+ /**
942
+ * Decodes a UInt32Value message from the specified reader or buffer, length delimited.
943
+ * @function decodeDelimited
944
+ * @memberof common.UInt32Value
945
+ * @static
946
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
947
+ * @returns {common.UInt32Value} UInt32Value
948
+ * @throws {Error} If the payload is not a reader or valid buffer
949
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
950
+ */
951
+ UInt32Value.decodeDelimited = function decodeDelimited(reader) {
952
+ if (!(reader instanceof $Reader))
953
+ reader = new $Reader(reader);
954
+ return this.decode(reader, reader.uint32());
955
+ };
956
+
957
+ /**
958
+ * Verifies a UInt32Value message.
959
+ * @function verify
960
+ * @memberof common.UInt32Value
961
+ * @static
962
+ * @param {Object.<string,*>} message Plain object to verify
963
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
964
+ */
965
+ UInt32Value.verify = function verify(message) {
966
+ if (typeof message !== "object" || message === null)
967
+ return "object expected";
968
+ if (message.value != null && message.hasOwnProperty("value"))
969
+ if (!$util.isInteger(message.value))
970
+ return "value: integer expected";
971
+ return null;
972
+ };
973
+
974
+ /**
975
+ * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types.
976
+ * @function fromObject
977
+ * @memberof common.UInt32Value
978
+ * @static
979
+ * @param {Object.<string,*>} object Plain object
980
+ * @returns {common.UInt32Value} UInt32Value
981
+ */
982
+ UInt32Value.fromObject = function fromObject(object) {
983
+ if (object instanceof $root.common.UInt32Value)
984
+ return object;
985
+ var message = new $root.common.UInt32Value();
986
+ if (object.value != null)
987
+ message.value = object.value >>> 0;
988
+ return message;
989
+ };
990
+
991
+ /**
992
+ * Creates a plain object from a UInt32Value message. Also converts values to other types if specified.
993
+ * @function toObject
994
+ * @memberof common.UInt32Value
995
+ * @static
996
+ * @param {common.UInt32Value} message UInt32Value
997
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
998
+ * @returns {Object.<string,*>} Plain object
999
+ */
1000
+ UInt32Value.toObject = function toObject(message, options) {
1001
+ if (!options)
1002
+ options = {};
1003
+ var object = {};
1004
+ if (options.defaults)
1005
+ object.value = 0;
1006
+ if (message.value != null && message.hasOwnProperty("value"))
1007
+ object.value = message.value;
1008
+ return object;
1009
+ };
1010
+
1011
+ /**
1012
+ * Converts this UInt32Value to JSON.
1013
+ * @function toJSON
1014
+ * @memberof common.UInt32Value
1015
+ * @instance
1016
+ * @returns {Object.<string,*>} JSON object
1017
+ */
1018
+ UInt32Value.prototype.toJSON = function toJSON() {
1019
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1020
+ };
1021
+
1022
+ return UInt32Value;
1023
+ })();
1024
+
1025
+ common.StringValue = (function() {
1026
+
1027
+ /**
1028
+ * Properties of a StringValue.
1029
+ * @memberof common
1030
+ * @interface IStringValue
1031
+ * @property {string|null} [value] StringValue value
1032
+ */
1033
+
1034
+ /**
1035
+ * Constructs a new StringValue.
1036
+ * @memberof common
1037
+ * @classdesc Represents a StringValue.
1038
+ * @implements IStringValue
1039
+ * @constructor
1040
+ * @param {common.IStringValue=} [properties] Properties to set
1041
+ */
1042
+ function StringValue(properties) {
1043
+ if (properties)
1044
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
1045
+ if (properties[keys[i]] != null)
1046
+ this[keys[i]] = properties[keys[i]];
1047
+ }
1048
+
1049
+ /**
1050
+ * StringValue value.
1051
+ * @member {string} value
1052
+ * @memberof common.StringValue
1053
+ * @instance
1054
+ */
1055
+ StringValue.prototype.value = "";
1056
+
1057
+ /**
1058
+ * Creates a new StringValue instance using the specified properties.
1059
+ * @function create
1060
+ * @memberof common.StringValue
1061
+ * @static
1062
+ * @param {common.IStringValue=} [properties] Properties to set
1063
+ * @returns {common.StringValue} StringValue instance
1064
+ */
1065
+ StringValue.create = function create(properties) {
1066
+ return new StringValue(properties);
1067
+ };
1068
+
1069
+ /**
1070
+ * Encodes the specified StringValue message. Does not implicitly {@link common.StringValue.verify|verify} messages.
1071
+ * @function encode
1072
+ * @memberof common.StringValue
1073
+ * @static
1074
+ * @param {common.IStringValue} message StringValue message or plain object to encode
1075
+ * @param {$protobuf.Writer} [writer] Writer to encode to
1076
+ * @returns {$protobuf.Writer} Writer
1077
+ */
1078
+ StringValue.encode = function encode(message, writer) {
1079
+ if (!writer)
1080
+ writer = $Writer.create();
1081
+ if (message.value != null && Object.hasOwnProperty.call(message, "value"))
1082
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.value);
1083
+ return writer;
1084
+ };
1085
+
1086
+ /**
1087
+ * Encodes the specified StringValue message, length delimited. Does not implicitly {@link common.StringValue.verify|verify} messages.
1088
+ * @function encodeDelimited
1089
+ * @memberof common.StringValue
1090
+ * @static
1091
+ * @param {common.IStringValue} message StringValue message or plain object to encode
1092
+ * @param {$protobuf.Writer} [writer] Writer to encode to
1093
+ * @returns {$protobuf.Writer} Writer
1094
+ */
1095
+ StringValue.encodeDelimited = function encodeDelimited(message, writer) {
1096
+ return this.encode(message, writer).ldelim();
1097
+ };
1098
+
1099
+ /**
1100
+ * Decodes a StringValue message from the specified reader or buffer.
1101
+ * @function decode
1102
+ * @memberof common.StringValue
1103
+ * @static
1104
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1105
+ * @param {number} [length] Message length if known beforehand
1106
+ * @returns {common.StringValue} StringValue
1107
+ * @throws {Error} If the payload is not a reader or valid buffer
1108
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1109
+ */
1110
+ StringValue.decode = function decode(reader, length) {
1111
+ if (!(reader instanceof $Reader))
1112
+ reader = $Reader.create(reader);
1113
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.common.StringValue();
1114
+ while (reader.pos < end) {
1115
+ var tag = reader.uint32();
1116
+ switch (tag >>> 3) {
1117
+ case 1:
1118
+ message.value = reader.string();
1119
+ break;
1120
+ default:
1121
+ reader.skipType(tag & 7);
1122
+ break;
1123
+ }
1124
+ }
1125
+ return message;
1126
+ };
1127
+
1128
+ /**
1129
+ * Decodes a StringValue message from the specified reader or buffer, length delimited.
1130
+ * @function decodeDelimited
1131
+ * @memberof common.StringValue
1132
+ * @static
1133
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1134
+ * @returns {common.StringValue} StringValue
1135
+ * @throws {Error} If the payload is not a reader or valid buffer
1136
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1137
+ */
1138
+ StringValue.decodeDelimited = function decodeDelimited(reader) {
1139
+ if (!(reader instanceof $Reader))
1140
+ reader = new $Reader(reader);
1141
+ return this.decode(reader, reader.uint32());
1142
+ };
1143
+
1144
+ /**
1145
+ * Verifies a StringValue message.
1146
+ * @function verify
1147
+ * @memberof common.StringValue
1148
+ * @static
1149
+ * @param {Object.<string,*>} message Plain object to verify
1150
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
1151
+ */
1152
+ StringValue.verify = function verify(message) {
1153
+ if (typeof message !== "object" || message === null)
1154
+ return "object expected";
1155
+ if (message.value != null && message.hasOwnProperty("value"))
1156
+ if (!$util.isString(message.value))
1157
+ return "value: string expected";
1158
+ return null;
1159
+ };
1160
+
1161
+ /**
1162
+ * Creates a StringValue message from a plain object. Also converts values to their respective internal types.
1163
+ * @function fromObject
1164
+ * @memberof common.StringValue
1165
+ * @static
1166
+ * @param {Object.<string,*>} object Plain object
1167
+ * @returns {common.StringValue} StringValue
1168
+ */
1169
+ StringValue.fromObject = function fromObject(object) {
1170
+ if (object instanceof $root.common.StringValue)
1171
+ return object;
1172
+ var message = new $root.common.StringValue();
1173
+ if (object.value != null)
1174
+ message.value = String(object.value);
1175
+ return message;
1176
+ };
1177
+
1178
+ /**
1179
+ * Creates a plain object from a StringValue message. Also converts values to other types if specified.
1180
+ * @function toObject
1181
+ * @memberof common.StringValue
1182
+ * @static
1183
+ * @param {common.StringValue} message StringValue
1184
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
1185
+ * @returns {Object.<string,*>} Plain object
1186
+ */
1187
+ StringValue.toObject = function toObject(message, options) {
1188
+ if (!options)
1189
+ options = {};
1190
+ var object = {};
1191
+ if (options.defaults)
1192
+ object.value = "";
1193
+ if (message.value != null && message.hasOwnProperty("value"))
1194
+ object.value = message.value;
1195
+ return object;
1196
+ };
1197
+
1198
+ /**
1199
+ * Converts this StringValue to JSON.
1200
+ * @function toJSON
1201
+ * @memberof common.StringValue
1202
+ * @instance
1203
+ * @returns {Object.<string,*>} JSON object
1204
+ */
1205
+ StringValue.prototype.toJSON = function toJSON() {
1206
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1207
+ };
1208
+
1209
+ return StringValue;
1210
+ })();
1211
+
1212
+ common.BytesValue = (function() {
1213
+
1214
+ /**
1215
+ * Properties of a BytesValue.
1216
+ * @memberof common
1217
+ * @interface IBytesValue
1218
+ * @property {Uint8Array|null} [value] BytesValue value
1219
+ */
1220
+
1221
+ /**
1222
+ * Constructs a new BytesValue.
1223
+ * @memberof common
1224
+ * @classdesc Represents a BytesValue.
1225
+ * @implements IBytesValue
1226
+ * @constructor
1227
+ * @param {common.IBytesValue=} [properties] Properties to set
1228
+ */
1229
+ function BytesValue(properties) {
1230
+ if (properties)
1231
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
1232
+ if (properties[keys[i]] != null)
1233
+ this[keys[i]] = properties[keys[i]];
1234
+ }
1235
+
1236
+ /**
1237
+ * BytesValue value.
1238
+ * @member {Uint8Array} value
1239
+ * @memberof common.BytesValue
1240
+ * @instance
1241
+ */
1242
+ BytesValue.prototype.value = $util.newBuffer([]);
1243
+
1244
+ /**
1245
+ * Creates a new BytesValue instance using the specified properties.
1246
+ * @function create
1247
+ * @memberof common.BytesValue
1248
+ * @static
1249
+ * @param {common.IBytesValue=} [properties] Properties to set
1250
+ * @returns {common.BytesValue} BytesValue instance
1251
+ */
1252
+ BytesValue.create = function create(properties) {
1253
+ return new BytesValue(properties);
1254
+ };
1255
+
1256
+ /**
1257
+ * Encodes the specified BytesValue message. Does not implicitly {@link common.BytesValue.verify|verify} messages.
1258
+ * @function encode
1259
+ * @memberof common.BytesValue
1260
+ * @static
1261
+ * @param {common.IBytesValue} message BytesValue message or plain object to encode
1262
+ * @param {$protobuf.Writer} [writer] Writer to encode to
1263
+ * @returns {$protobuf.Writer} Writer
1264
+ */
1265
+ BytesValue.encode = function encode(message, writer) {
1266
+ if (!writer)
1267
+ writer = $Writer.create();
1268
+ if (message.value != null && Object.hasOwnProperty.call(message, "value"))
1269
+ writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.value);
1270
+ return writer;
1271
+ };
1272
+
1273
+ /**
1274
+ * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link common.BytesValue.verify|verify} messages.
1275
+ * @function encodeDelimited
1276
+ * @memberof common.BytesValue
1277
+ * @static
1278
+ * @param {common.IBytesValue} message BytesValue message or plain object to encode
1279
+ * @param {$protobuf.Writer} [writer] Writer to encode to
1280
+ * @returns {$protobuf.Writer} Writer
1281
+ */
1282
+ BytesValue.encodeDelimited = function encodeDelimited(message, writer) {
1283
+ return this.encode(message, writer).ldelim();
1284
+ };
1285
+
1286
+ /**
1287
+ * Decodes a BytesValue message from the specified reader or buffer.
1288
+ * @function decode
1289
+ * @memberof common.BytesValue
1290
+ * @static
1291
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1292
+ * @param {number} [length] Message length if known beforehand
1293
+ * @returns {common.BytesValue} BytesValue
1294
+ * @throws {Error} If the payload is not a reader or valid buffer
1295
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1296
+ */
1297
+ BytesValue.decode = function decode(reader, length) {
1298
+ if (!(reader instanceof $Reader))
1299
+ reader = $Reader.create(reader);
1300
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.common.BytesValue();
1301
+ while (reader.pos < end) {
1302
+ var tag = reader.uint32();
1303
+ switch (tag >>> 3) {
1304
+ case 1:
1305
+ message.value = reader.bytes();
1306
+ break;
1307
+ default:
1308
+ reader.skipType(tag & 7);
1309
+ break;
1310
+ }
1311
+ }
1312
+ return message;
1313
+ };
1314
+
1315
+ /**
1316
+ * Decodes a BytesValue message from the specified reader or buffer, length delimited.
1317
+ * @function decodeDelimited
1318
+ * @memberof common.BytesValue
1319
+ * @static
1320
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1321
+ * @returns {common.BytesValue} BytesValue
1322
+ * @throws {Error} If the payload is not a reader or valid buffer
1323
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1324
+ */
1325
+ BytesValue.decodeDelimited = function decodeDelimited(reader) {
1326
+ if (!(reader instanceof $Reader))
1327
+ reader = new $Reader(reader);
1328
+ return this.decode(reader, reader.uint32());
1329
+ };
1330
+
1331
+ /**
1332
+ * Verifies a BytesValue message.
1333
+ * @function verify
1334
+ * @memberof common.BytesValue
1335
+ * @static
1336
+ * @param {Object.<string,*>} message Plain object to verify
1337
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
1338
+ */
1339
+ BytesValue.verify = function verify(message) {
1340
+ if (typeof message !== "object" || message === null)
1341
+ return "object expected";
1342
+ if (message.value != null && message.hasOwnProperty("value"))
1343
+ if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value)))
1344
+ return "value: buffer expected";
1345
+ return null;
1346
+ };
1347
+
1348
+ /**
1349
+ * Creates a BytesValue message from a plain object. Also converts values to their respective internal types.
1350
+ * @function fromObject
1351
+ * @memberof common.BytesValue
1352
+ * @static
1353
+ * @param {Object.<string,*>} object Plain object
1354
+ * @returns {common.BytesValue} BytesValue
1355
+ */
1356
+ BytesValue.fromObject = function fromObject(object) {
1357
+ if (object instanceof $root.common.BytesValue)
1358
+ return object;
1359
+ var message = new $root.common.BytesValue();
1360
+ if (object.value != null)
1361
+ if (typeof object.value === "string")
1362
+ $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0);
1363
+ else if (object.value.length)
1364
+ message.value = object.value;
1365
+ return message;
1366
+ };
1367
+
1368
+ /**
1369
+ * Creates a plain object from a BytesValue message. Also converts values to other types if specified.
1370
+ * @function toObject
1371
+ * @memberof common.BytesValue
1372
+ * @static
1373
+ * @param {common.BytesValue} message BytesValue
1374
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
1375
+ * @returns {Object.<string,*>} Plain object
1376
+ */
1377
+ BytesValue.toObject = function toObject(message, options) {
1378
+ if (!options)
1379
+ options = {};
1380
+ var object = {};
1381
+ if (options.defaults)
1382
+ if (options.bytes === String)
1383
+ object.value = "";
1384
+ else {
1385
+ object.value = [];
1386
+ if (options.bytes !== Array)
1387
+ object.value = $util.newBuffer(object.value);
1388
+ }
1389
+ if (message.value != null && message.hasOwnProperty("value"))
1390
+ 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;
1391
+ return object;
1392
+ };
1393
+
1394
+ /**
1395
+ * Converts this BytesValue to JSON.
1396
+ * @function toJSON
1397
+ * @memberof common.BytesValue
1398
+ * @instance
1399
+ * @returns {Object.<string,*>} JSON object
1400
+ */
1401
+ BytesValue.prototype.toJSON = function toJSON() {
1402
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1403
+ };
1404
+
1405
+ return BytesValue;
1406
+ })();
1407
+
1408
+ common.ErrorValue = (function() {
1409
+
1410
+ /**
1411
+ * Properties of an ErrorValue.
1412
+ * @memberof common
1413
+ * @interface IErrorValue
1414
+ * @property {string|null} [runtimeExcJson] ErrorValue runtimeExcJson
1415
+ * @property {string|null} [err] ErrorValue err
1416
+ */
1417
+
1418
+ /**
1419
+ * Constructs a new ErrorValue.
1420
+ * @memberof common
1421
+ * @classdesc Represents an ErrorValue.
1422
+ * @implements IErrorValue
1423
+ * @constructor
1424
+ * @param {common.IErrorValue=} [properties] Properties to set
1425
+ */
1426
+ function ErrorValue(properties) {
1427
+ if (properties)
1428
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
1429
+ if (properties[keys[i]] != null)
1430
+ this[keys[i]] = properties[keys[i]];
1431
+ }
1432
+
1433
+ /**
1434
+ * ErrorValue runtimeExcJson.
1435
+ * @member {string} runtimeExcJson
1436
+ * @memberof common.ErrorValue
1437
+ * @instance
1438
+ */
1439
+ ErrorValue.prototype.runtimeExcJson = "";
1440
+
1441
+ /**
1442
+ * ErrorValue err.
1443
+ * @member {string} err
1444
+ * @memberof common.ErrorValue
1445
+ * @instance
1446
+ */
1447
+ ErrorValue.prototype.err = "";
1448
+
1449
+ /**
1450
+ * Creates a new ErrorValue instance using the specified properties.
1451
+ * @function create
1452
+ * @memberof common.ErrorValue
1453
+ * @static
1454
+ * @param {common.IErrorValue=} [properties] Properties to set
1455
+ * @returns {common.ErrorValue} ErrorValue instance
1456
+ */
1457
+ ErrorValue.create = function create(properties) {
1458
+ return new ErrorValue(properties);
1459
+ };
1460
+
1461
+ /**
1462
+ * Encodes the specified ErrorValue message. Does not implicitly {@link common.ErrorValue.verify|verify} messages.
1463
+ * @function encode
1464
+ * @memberof common.ErrorValue
1465
+ * @static
1466
+ * @param {common.IErrorValue} message ErrorValue message or plain object to encode
1467
+ * @param {$protobuf.Writer} [writer] Writer to encode to
1468
+ * @returns {$protobuf.Writer} Writer
1469
+ */
1470
+ ErrorValue.encode = function encode(message, writer) {
1471
+ if (!writer)
1472
+ writer = $Writer.create();
1473
+ if (message.runtimeExcJson != null && Object.hasOwnProperty.call(message, "runtimeExcJson"))
1474
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.runtimeExcJson);
1475
+ if (message.err != null && Object.hasOwnProperty.call(message, "err"))
1476
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.err);
1477
+ return writer;
1478
+ };
1479
+
1480
+ /**
1481
+ * Encodes the specified ErrorValue message, length delimited. Does not implicitly {@link common.ErrorValue.verify|verify} messages.
1482
+ * @function encodeDelimited
1483
+ * @memberof common.ErrorValue
1484
+ * @static
1485
+ * @param {common.IErrorValue} message ErrorValue message or plain object to encode
1486
+ * @param {$protobuf.Writer} [writer] Writer to encode to
1487
+ * @returns {$protobuf.Writer} Writer
1488
+ */
1489
+ ErrorValue.encodeDelimited = function encodeDelimited(message, writer) {
1490
+ return this.encode(message, writer).ldelim();
1491
+ };
1492
+
1493
+ /**
1494
+ * Decodes an ErrorValue message from the specified reader or buffer.
1495
+ * @function decode
1496
+ * @memberof common.ErrorValue
1497
+ * @static
1498
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1499
+ * @param {number} [length] Message length if known beforehand
1500
+ * @returns {common.ErrorValue} ErrorValue
1501
+ * @throws {Error} If the payload is not a reader or valid buffer
1502
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1503
+ */
1504
+ ErrorValue.decode = function decode(reader, length) {
1505
+ if (!(reader instanceof $Reader))
1506
+ reader = $Reader.create(reader);
1507
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.common.ErrorValue();
1508
+ while (reader.pos < end) {
1509
+ var tag = reader.uint32();
1510
+ switch (tag >>> 3) {
1511
+ case 1:
1512
+ message.runtimeExcJson = reader.string();
1513
+ break;
1514
+ case 2:
1515
+ message.err = reader.string();
1516
+ break;
1517
+ default:
1518
+ reader.skipType(tag & 7);
1519
+ break;
1520
+ }
1521
+ }
1522
+ return message;
1523
+ };
1524
+
1525
+ /**
1526
+ * Decodes an ErrorValue message from the specified reader or buffer, length delimited.
1527
+ * @function decodeDelimited
1528
+ * @memberof common.ErrorValue
1529
+ * @static
1530
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1531
+ * @returns {common.ErrorValue} ErrorValue
1532
+ * @throws {Error} If the payload is not a reader or valid buffer
1533
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1534
+ */
1535
+ ErrorValue.decodeDelimited = function decodeDelimited(reader) {
1536
+ if (!(reader instanceof $Reader))
1537
+ reader = new $Reader(reader);
1538
+ return this.decode(reader, reader.uint32());
1539
+ };
1540
+
1541
+ /**
1542
+ * Verifies an ErrorValue message.
1543
+ * @function verify
1544
+ * @memberof common.ErrorValue
1545
+ * @static
1546
+ * @param {Object.<string,*>} message Plain object to verify
1547
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
1548
+ */
1549
+ ErrorValue.verify = function verify(message) {
1550
+ if (typeof message !== "object" || message === null)
1551
+ return "object expected";
1552
+ if (message.runtimeExcJson != null && message.hasOwnProperty("runtimeExcJson"))
1553
+ if (!$util.isString(message.runtimeExcJson))
1554
+ return "runtimeExcJson: string expected";
1555
+ if (message.err != null && message.hasOwnProperty("err"))
1556
+ if (!$util.isString(message.err))
1557
+ return "err: string expected";
1558
+ return null;
1559
+ };
1560
+
1561
+ /**
1562
+ * Creates an ErrorValue message from a plain object. Also converts values to their respective internal types.
1563
+ * @function fromObject
1564
+ * @memberof common.ErrorValue
1565
+ * @static
1566
+ * @param {Object.<string,*>} object Plain object
1567
+ * @returns {common.ErrorValue} ErrorValue
1568
+ */
1569
+ ErrorValue.fromObject = function fromObject(object) {
1570
+ if (object instanceof $root.common.ErrorValue)
1571
+ return object;
1572
+ var message = new $root.common.ErrorValue();
1573
+ if (object.runtimeExcJson != null)
1574
+ message.runtimeExcJson = String(object.runtimeExcJson);
1575
+ if (object.err != null)
1576
+ message.err = String(object.err);
1577
+ return message;
1578
+ };
1579
+
1580
+ /**
1581
+ * Creates a plain object from an ErrorValue message. Also converts values to other types if specified.
1582
+ * @function toObject
1583
+ * @memberof common.ErrorValue
1584
+ * @static
1585
+ * @param {common.ErrorValue} message ErrorValue
1586
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
1587
+ * @returns {Object.<string,*>} Plain object
1588
+ */
1589
+ ErrorValue.toObject = function toObject(message, options) {
1590
+ if (!options)
1591
+ options = {};
1592
+ var object = {};
1593
+ if (options.defaults) {
1594
+ object.runtimeExcJson = "";
1595
+ object.err = "";
1596
+ }
1597
+ if (message.runtimeExcJson != null && message.hasOwnProperty("runtimeExcJson"))
1598
+ object.runtimeExcJson = message.runtimeExcJson;
1599
+ if (message.err != null && message.hasOwnProperty("err"))
1600
+ object.err = message.err;
1601
+ return object;
1602
+ };
1603
+
1604
+ /**
1605
+ * Converts this ErrorValue to JSON.
1606
+ * @function toJSON
1607
+ * @memberof common.ErrorValue
1608
+ * @instance
1609
+ * @returns {Object.<string,*>} JSON object
1610
+ */
1611
+ ErrorValue.prototype.toJSON = function toJSON() {
1612
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1613
+ };
1614
+
1615
+ return ErrorValue;
1616
+ })();
1617
+
1618
+ common.AnyValue = (function() {
1619
+
1620
+ /**
1621
+ * Properties of an AnyValue.
1622
+ * @memberof common
1623
+ * @interface IAnyValue
1624
+ * @property {string|null} [type] AnyValue type
1625
+ * @property {common.IStringValue|null} [json] AnyValue json
1626
+ * @property {common.IBytesValue|null} [bytes] AnyValue bytes
1627
+ */
1628
+
1629
+ /**
1630
+ * Constructs a new AnyValue.
1631
+ * @memberof common
1632
+ * @classdesc Represents an AnyValue.
1633
+ * @implements IAnyValue
1634
+ * @constructor
1635
+ * @param {common.IAnyValue=} [properties] Properties to set
1636
+ */
1637
+ function AnyValue(properties) {
1638
+ if (properties)
1639
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
1640
+ if (properties[keys[i]] != null)
1641
+ this[keys[i]] = properties[keys[i]];
1642
+ }
1643
+
1644
+ /**
1645
+ * AnyValue type.
1646
+ * @member {string} type
1647
+ * @memberof common.AnyValue
1648
+ * @instance
1649
+ */
1650
+ AnyValue.prototype.type = "";
1651
+
1652
+ /**
1653
+ * AnyValue json.
1654
+ * @member {common.IStringValue|null|undefined} json
1655
+ * @memberof common.AnyValue
1656
+ * @instance
1657
+ */
1658
+ AnyValue.prototype.json = null;
1659
+
1660
+ /**
1661
+ * AnyValue bytes.
1662
+ * @member {common.IBytesValue|null|undefined} bytes
1663
+ * @memberof common.AnyValue
1664
+ * @instance
1665
+ */
1666
+ AnyValue.prototype.bytes = null;
1667
+
1668
+ /**
1669
+ * Creates a new AnyValue instance using the specified properties.
1670
+ * @function create
1671
+ * @memberof common.AnyValue
1672
+ * @static
1673
+ * @param {common.IAnyValue=} [properties] Properties to set
1674
+ * @returns {common.AnyValue} AnyValue instance
1675
+ */
1676
+ AnyValue.create = function create(properties) {
1677
+ return new AnyValue(properties);
1678
+ };
1679
+
1680
+ /**
1681
+ * Encodes the specified AnyValue message. Does not implicitly {@link common.AnyValue.verify|verify} messages.
1682
+ * @function encode
1683
+ * @memberof common.AnyValue
1684
+ * @static
1685
+ * @param {common.IAnyValue} message AnyValue message or plain object to encode
1686
+ * @param {$protobuf.Writer} [writer] Writer to encode to
1687
+ * @returns {$protobuf.Writer} Writer
1688
+ */
1689
+ AnyValue.encode = function encode(message, writer) {
1690
+ if (!writer)
1691
+ writer = $Writer.create();
1692
+ if (message.type != null && Object.hasOwnProperty.call(message, "type"))
1693
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.type);
1694
+ if (message.json != null && Object.hasOwnProperty.call(message, "json"))
1695
+ $root.common.StringValue.encode(message.json, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
1696
+ if (message.bytes != null && Object.hasOwnProperty.call(message, "bytes"))
1697
+ $root.common.BytesValue.encode(message.bytes, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
1698
+ return writer;
1699
+ };
1700
+
1701
+ /**
1702
+ * Encodes the specified AnyValue message, length delimited. Does not implicitly {@link common.AnyValue.verify|verify} messages.
1703
+ * @function encodeDelimited
1704
+ * @memberof common.AnyValue
1705
+ * @static
1706
+ * @param {common.IAnyValue} message AnyValue message or plain object to encode
1707
+ * @param {$protobuf.Writer} [writer] Writer to encode to
1708
+ * @returns {$protobuf.Writer} Writer
1709
+ */
1710
+ AnyValue.encodeDelimited = function encodeDelimited(message, writer) {
1711
+ return this.encode(message, writer).ldelim();
1712
+ };
1713
+
1714
+ /**
1715
+ * Decodes an AnyValue message from the specified reader or buffer.
1716
+ * @function decode
1717
+ * @memberof common.AnyValue
1718
+ * @static
1719
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1720
+ * @param {number} [length] Message length if known beforehand
1721
+ * @returns {common.AnyValue} AnyValue
1722
+ * @throws {Error} If the payload is not a reader or valid buffer
1723
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1724
+ */
1725
+ AnyValue.decode = function decode(reader, length) {
1726
+ if (!(reader instanceof $Reader))
1727
+ reader = $Reader.create(reader);
1728
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.common.AnyValue();
1729
+ while (reader.pos < end) {
1730
+ var tag = reader.uint32();
1731
+ switch (tag >>> 3) {
1732
+ case 1:
1733
+ message.type = reader.string();
1734
+ break;
1735
+ case 2:
1736
+ message.json = $root.common.StringValue.decode(reader, reader.uint32());
1737
+ break;
1738
+ case 3:
1739
+ message.bytes = $root.common.BytesValue.decode(reader, reader.uint32());
1740
+ break;
1741
+ default:
1742
+ reader.skipType(tag & 7);
1743
+ break;
1744
+ }
1745
+ }
1746
+ return message;
1747
+ };
1748
+
1749
+ /**
1750
+ * Decodes an AnyValue message from the specified reader or buffer, length delimited.
1751
+ * @function decodeDelimited
1752
+ * @memberof common.AnyValue
1753
+ * @static
1754
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1755
+ * @returns {common.AnyValue} AnyValue
1756
+ * @throws {Error} If the payload is not a reader or valid buffer
1757
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1758
+ */
1759
+ AnyValue.decodeDelimited = function decodeDelimited(reader) {
1760
+ if (!(reader instanceof $Reader))
1761
+ reader = new $Reader(reader);
1762
+ return this.decode(reader, reader.uint32());
1763
+ };
1764
+
1765
+ /**
1766
+ * Verifies an AnyValue message.
1767
+ * @function verify
1768
+ * @memberof common.AnyValue
1769
+ * @static
1770
+ * @param {Object.<string,*>} message Plain object to verify
1771
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
1772
+ */
1773
+ AnyValue.verify = function verify(message) {
1774
+ if (typeof message !== "object" || message === null)
1775
+ return "object expected";
1776
+ if (message.type != null && message.hasOwnProperty("type"))
1777
+ if (!$util.isString(message.type))
1778
+ return "type: string expected";
1779
+ if (message.json != null && message.hasOwnProperty("json")) {
1780
+ var error = $root.common.StringValue.verify(message.json);
1781
+ if (error)
1782
+ return "json." + error;
1783
+ }
1784
+ if (message.bytes != null && message.hasOwnProperty("bytes")) {
1785
+ var error = $root.common.BytesValue.verify(message.bytes);
1786
+ if (error)
1787
+ return "bytes." + error;
1788
+ }
1789
+ return null;
1790
+ };
1791
+
1792
+ /**
1793
+ * Creates an AnyValue message from a plain object. Also converts values to their respective internal types.
1794
+ * @function fromObject
1795
+ * @memberof common.AnyValue
1796
+ * @static
1797
+ * @param {Object.<string,*>} object Plain object
1798
+ * @returns {common.AnyValue} AnyValue
1799
+ */
1800
+ AnyValue.fromObject = function fromObject(object) {
1801
+ if (object instanceof $root.common.AnyValue)
1802
+ return object;
1803
+ var message = new $root.common.AnyValue();
1804
+ if (object.type != null)
1805
+ message.type = String(object.type);
1806
+ if (object.json != null) {
1807
+ if (typeof object.json !== "object")
1808
+ throw TypeError(".common.AnyValue.json: object expected");
1809
+ message.json = $root.common.StringValue.fromObject(object.json);
1810
+ }
1811
+ if (object.bytes != null) {
1812
+ if (typeof object.bytes !== "object")
1813
+ throw TypeError(".common.AnyValue.bytes: object expected");
1814
+ message.bytes = $root.common.BytesValue.fromObject(object.bytes);
1815
+ }
1816
+ return message;
1817
+ };
1818
+
1819
+ /**
1820
+ * Creates a plain object from an AnyValue message. Also converts values to other types if specified.
1821
+ * @function toObject
1822
+ * @memberof common.AnyValue
1823
+ * @static
1824
+ * @param {common.AnyValue} message AnyValue
1825
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
1826
+ * @returns {Object.<string,*>} Plain object
1827
+ */
1828
+ AnyValue.toObject = function toObject(message, options) {
1829
+ if (!options)
1830
+ options = {};
1831
+ var object = {};
1832
+ if (options.defaults) {
1833
+ object.type = "";
1834
+ object.json = null;
1835
+ object.bytes = null;
1836
+ }
1837
+ if (message.type != null && message.hasOwnProperty("type"))
1838
+ object.type = message.type;
1839
+ if (message.json != null && message.hasOwnProperty("json"))
1840
+ object.json = $root.common.StringValue.toObject(message.json, options);
1841
+ if (message.bytes != null && message.hasOwnProperty("bytes"))
1842
+ object.bytes = $root.common.BytesValue.toObject(message.bytes, options);
1843
+ return object;
1844
+ };
1845
+
1846
+ /**
1847
+ * Converts this AnyValue to JSON.
1848
+ * @function toJSON
1849
+ * @memberof common.AnyValue
1850
+ * @instance
1851
+ * @returns {Object.<string,*>} JSON object
1852
+ */
1853
+ AnyValue.prototype.toJSON = function toJSON() {
1854
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1855
+ };
1856
+
1857
+ return AnyValue;
1858
+ })();
1859
+
1860
+ return common;
1861
+ })();
1862
+
1863
+ module.exports = $root;