core-3nweb-client-lib 0.30.5 → 0.31.0

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