core-3nweb-client-lib 0.22.1 → 0.24.1

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