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