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