core-3nweb-client-lib 0.24.0 → 0.24.3

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