Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / legacy-libs / grpc-gcp / build / src / generated / grpc_gcp.js
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.grpc = (function() {
13
14     /**
15      * Namespace grpc.
16      * @exports grpc
17      * @namespace
18      */
19     var grpc = {};
20
21     grpc.gcp = (function() {
22
23         /**
24          * Namespace gcp.
25          * @memberof grpc
26          * @namespace
27          */
28         var gcp = {};
29
30         gcp.ApiConfig = (function() {
31
32             /**
33              * Properties of an ApiConfig.
34              * @memberof grpc.gcp
35              * @interface IApiConfig
36              * @property {grpc.gcp.IChannelPoolConfig|null} [channelPool] ApiConfig channelPool
37              * @property {Array.<grpc.gcp.IMethodConfig>|null} [method] ApiConfig method
38              */
39
40             /**
41              * Constructs a new ApiConfig.
42              * @memberof grpc.gcp
43              * @classdesc Represents an ApiConfig.
44              * @implements IApiConfig
45              * @constructor
46              * @param {grpc.gcp.IApiConfig=} [properties] Properties to set
47              */
48             function ApiConfig(properties) {
49                 this.method = [];
50                 if (properties)
51                     for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
52                         if (properties[keys[i]] != null)
53                             this[keys[i]] = properties[keys[i]];
54             }
55
56             /**
57              * ApiConfig channelPool.
58              * @member {grpc.gcp.IChannelPoolConfig|null|undefined} channelPool
59              * @memberof grpc.gcp.ApiConfig
60              * @instance
61              */
62             ApiConfig.prototype.channelPool = null;
63
64             /**
65              * ApiConfig method.
66              * @member {Array.<grpc.gcp.IMethodConfig>} method
67              * @memberof grpc.gcp.ApiConfig
68              * @instance
69              */
70             ApiConfig.prototype.method = $util.emptyArray;
71
72             /**
73              * Creates a new ApiConfig instance using the specified properties.
74              * @function create
75              * @memberof grpc.gcp.ApiConfig
76              * @static
77              * @param {grpc.gcp.IApiConfig=} [properties] Properties to set
78              * @returns {grpc.gcp.ApiConfig} ApiConfig instance
79              */
80             ApiConfig.create = function create(properties) {
81                 return new ApiConfig(properties);
82             };
83
84             /**
85              * Encodes the specified ApiConfig message. Does not implicitly {@link grpc.gcp.ApiConfig.verify|verify} messages.
86              * @function encode
87              * @memberof grpc.gcp.ApiConfig
88              * @static
89              * @param {grpc.gcp.IApiConfig} message ApiConfig message or plain object to encode
90              * @param {$protobuf.Writer} [writer] Writer to encode to
91              * @returns {$protobuf.Writer} Writer
92              */
93             ApiConfig.encode = function encode(message, writer) {
94                 if (!writer)
95                     writer = $Writer.create();
96                 if (message.channelPool != null && message.hasOwnProperty("channelPool"))
97                     $root.grpc.gcp.ChannelPoolConfig.encode(message.channelPool, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
98                 if (message.method != null && message.method.length)
99                     for (var i = 0; i < message.method.length; ++i)
100                         $root.grpc.gcp.MethodConfig.encode(message.method[i], writer.uint32(/* id 1001, wireType 2 =*/8010).fork()).ldelim();
101                 return writer;
102             };
103
104             /**
105              * Encodes the specified ApiConfig message, length delimited. Does not implicitly {@link grpc.gcp.ApiConfig.verify|verify} messages.
106              * @function encodeDelimited
107              * @memberof grpc.gcp.ApiConfig
108              * @static
109              * @param {grpc.gcp.IApiConfig} message ApiConfig message or plain object to encode
110              * @param {$protobuf.Writer} [writer] Writer to encode to
111              * @returns {$protobuf.Writer} Writer
112              */
113             ApiConfig.encodeDelimited = function encodeDelimited(message, writer) {
114                 return this.encode(message, writer).ldelim();
115             };
116
117             /**
118              * Decodes an ApiConfig message from the specified reader or buffer.
119              * @function decode
120              * @memberof grpc.gcp.ApiConfig
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 {grpc.gcp.ApiConfig} ApiConfig
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             ApiConfig.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.grpc.gcp.ApiConfig();
132                 while (reader.pos < end) {
133                     var tag = reader.uint32();
134                     switch (tag >>> 3) {
135                     case 2:
136                         message.channelPool = $root.grpc.gcp.ChannelPoolConfig.decode(reader, reader.uint32());
137                         break;
138                     case 1001:
139                         if (!(message.method && message.method.length))
140                             message.method = [];
141                         message.method.push($root.grpc.gcp.MethodConfig.decode(reader, reader.uint32()));
142                         break;
143                     default:
144                         reader.skipType(tag & 7);
145                         break;
146                     }
147                 }
148                 return message;
149             };
150
151             /**
152              * Decodes an ApiConfig message from the specified reader or buffer, length delimited.
153              * @function decodeDelimited
154              * @memberof grpc.gcp.ApiConfig
155              * @static
156              * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
157              * @returns {grpc.gcp.ApiConfig} ApiConfig
158              * @throws {Error} If the payload is not a reader or valid buffer
159              * @throws {$protobuf.util.ProtocolError} If required fields are missing
160              */
161             ApiConfig.decodeDelimited = function decodeDelimited(reader) {
162                 if (!(reader instanceof $Reader))
163                     reader = new $Reader(reader);
164                 return this.decode(reader, reader.uint32());
165             };
166
167             /**
168              * Verifies an ApiConfig message.
169              * @function verify
170              * @memberof grpc.gcp.ApiConfig
171              * @static
172              * @param {Object.<string,*>} message Plain object to verify
173              * @returns {string|null} `null` if valid, otherwise the reason why it is not
174              */
175             ApiConfig.verify = function verify(message) {
176                 if (typeof message !== "object" || message === null)
177                     return "object expected";
178                 if (message.channelPool != null && message.hasOwnProperty("channelPool")) {
179                     var error = $root.grpc.gcp.ChannelPoolConfig.verify(message.channelPool);
180                     if (error)
181                         return "channelPool." + error;
182                 }
183                 if (message.method != null && message.hasOwnProperty("method")) {
184                     if (!Array.isArray(message.method))
185                         return "method: array expected";
186                     for (var i = 0; i < message.method.length; ++i) {
187                         var error = $root.grpc.gcp.MethodConfig.verify(message.method[i]);
188                         if (error)
189                             return "method." + error;
190                     }
191                 }
192                 return null;
193             };
194
195             /**
196              * Creates an ApiConfig message from a plain object. Also converts values to their respective internal types.
197              * @function fromObject
198              * @memberof grpc.gcp.ApiConfig
199              * @static
200              * @param {Object.<string,*>} object Plain object
201              * @returns {grpc.gcp.ApiConfig} ApiConfig
202              */
203             ApiConfig.fromObject = function fromObject(object) {
204                 if (object instanceof $root.grpc.gcp.ApiConfig)
205                     return object;
206                 var message = new $root.grpc.gcp.ApiConfig();
207                 if (object.channelPool != null) {
208                     if (typeof object.channelPool !== "object")
209                         throw TypeError(".grpc.gcp.ApiConfig.channelPool: object expected");
210                     message.channelPool = $root.grpc.gcp.ChannelPoolConfig.fromObject(object.channelPool);
211                 }
212                 if (object.method) {
213                     if (!Array.isArray(object.method))
214                         throw TypeError(".grpc.gcp.ApiConfig.method: array expected");
215                     message.method = [];
216                     for (var i = 0; i < object.method.length; ++i) {
217                         if (typeof object.method[i] !== "object")
218                             throw TypeError(".grpc.gcp.ApiConfig.method: object expected");
219                         message.method[i] = $root.grpc.gcp.MethodConfig.fromObject(object.method[i]);
220                     }
221                 }
222                 return message;
223             };
224
225             /**
226              * Creates a plain object from an ApiConfig message. Also converts values to other types if specified.
227              * @function toObject
228              * @memberof grpc.gcp.ApiConfig
229              * @static
230              * @param {grpc.gcp.ApiConfig} message ApiConfig
231              * @param {$protobuf.IConversionOptions} [options] Conversion options
232              * @returns {Object.<string,*>} Plain object
233              */
234             ApiConfig.toObject = function toObject(message, options) {
235                 if (!options)
236                     options = {};
237                 var object = {};
238                 if (options.arrays || options.defaults)
239                     object.method = [];
240                 if (options.defaults)
241                     object.channelPool = null;
242                 if (message.channelPool != null && message.hasOwnProperty("channelPool"))
243                     object.channelPool = $root.grpc.gcp.ChannelPoolConfig.toObject(message.channelPool, options);
244                 if (message.method && message.method.length) {
245                     object.method = [];
246                     for (var j = 0; j < message.method.length; ++j)
247                         object.method[j] = $root.grpc.gcp.MethodConfig.toObject(message.method[j], options);
248                 }
249                 return object;
250             };
251
252             /**
253              * Converts this ApiConfig to JSON.
254              * @function toJSON
255              * @memberof grpc.gcp.ApiConfig
256              * @instance
257              * @returns {Object.<string,*>} JSON object
258              */
259             ApiConfig.prototype.toJSON = function toJSON() {
260                 return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
261             };
262
263             return ApiConfig;
264         })();
265
266         gcp.ChannelPoolConfig = (function() {
267
268             /**
269              * Properties of a ChannelPoolConfig.
270              * @memberof grpc.gcp
271              * @interface IChannelPoolConfig
272              * @property {number|null} [maxSize] ChannelPoolConfig maxSize
273              * @property {number|Long|null} [idleTimeout] ChannelPoolConfig idleTimeout
274              * @property {number|null} [maxConcurrentStreamsLowWatermark] ChannelPoolConfig maxConcurrentStreamsLowWatermark
275              */
276
277             /**
278              * Constructs a new ChannelPoolConfig.
279              * @memberof grpc.gcp
280              * @classdesc Represents a ChannelPoolConfig.
281              * @implements IChannelPoolConfig
282              * @constructor
283              * @param {grpc.gcp.IChannelPoolConfig=} [properties] Properties to set
284              */
285             function ChannelPoolConfig(properties) {
286                 if (properties)
287                     for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
288                         if (properties[keys[i]] != null)
289                             this[keys[i]] = properties[keys[i]];
290             }
291
292             /**
293              * ChannelPoolConfig maxSize.
294              * @member {number} maxSize
295              * @memberof grpc.gcp.ChannelPoolConfig
296              * @instance
297              */
298             ChannelPoolConfig.prototype.maxSize = 0;
299
300             /**
301              * ChannelPoolConfig idleTimeout.
302              * @member {number|Long} idleTimeout
303              * @memberof grpc.gcp.ChannelPoolConfig
304              * @instance
305              */
306             ChannelPoolConfig.prototype.idleTimeout = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
307
308             /**
309              * ChannelPoolConfig maxConcurrentStreamsLowWatermark.
310              * @member {number} maxConcurrentStreamsLowWatermark
311              * @memberof grpc.gcp.ChannelPoolConfig
312              * @instance
313              */
314             ChannelPoolConfig.prototype.maxConcurrentStreamsLowWatermark = 0;
315
316             /**
317              * Creates a new ChannelPoolConfig instance using the specified properties.
318              * @function create
319              * @memberof grpc.gcp.ChannelPoolConfig
320              * @static
321              * @param {grpc.gcp.IChannelPoolConfig=} [properties] Properties to set
322              * @returns {grpc.gcp.ChannelPoolConfig} ChannelPoolConfig instance
323              */
324             ChannelPoolConfig.create = function create(properties) {
325                 return new ChannelPoolConfig(properties);
326             };
327
328             /**
329              * Encodes the specified ChannelPoolConfig message. Does not implicitly {@link grpc.gcp.ChannelPoolConfig.verify|verify} messages.
330              * @function encode
331              * @memberof grpc.gcp.ChannelPoolConfig
332              * @static
333              * @param {grpc.gcp.IChannelPoolConfig} message ChannelPoolConfig message or plain object to encode
334              * @param {$protobuf.Writer} [writer] Writer to encode to
335              * @returns {$protobuf.Writer} Writer
336              */
337             ChannelPoolConfig.encode = function encode(message, writer) {
338                 if (!writer)
339                     writer = $Writer.create();
340                 if (message.maxSize != null && message.hasOwnProperty("maxSize"))
341                     writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.maxSize);
342                 if (message.idleTimeout != null && message.hasOwnProperty("idleTimeout"))
343                     writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.idleTimeout);
344                 if (message.maxConcurrentStreamsLowWatermark != null && message.hasOwnProperty("maxConcurrentStreamsLowWatermark"))
345                     writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.maxConcurrentStreamsLowWatermark);
346                 return writer;
347             };
348
349             /**
350              * Encodes the specified ChannelPoolConfig message, length delimited. Does not implicitly {@link grpc.gcp.ChannelPoolConfig.verify|verify} messages.
351              * @function encodeDelimited
352              * @memberof grpc.gcp.ChannelPoolConfig
353              * @static
354              * @param {grpc.gcp.IChannelPoolConfig} message ChannelPoolConfig message or plain object to encode
355              * @param {$protobuf.Writer} [writer] Writer to encode to
356              * @returns {$protobuf.Writer} Writer
357              */
358             ChannelPoolConfig.encodeDelimited = function encodeDelimited(message, writer) {
359                 return this.encode(message, writer).ldelim();
360             };
361
362             /**
363              * Decodes a ChannelPoolConfig message from the specified reader or buffer.
364              * @function decode
365              * @memberof grpc.gcp.ChannelPoolConfig
366              * @static
367              * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
368              * @param {number} [length] Message length if known beforehand
369              * @returns {grpc.gcp.ChannelPoolConfig} ChannelPoolConfig
370              * @throws {Error} If the payload is not a reader or valid buffer
371              * @throws {$protobuf.util.ProtocolError} If required fields are missing
372              */
373             ChannelPoolConfig.decode = function decode(reader, length) {
374                 if (!(reader instanceof $Reader))
375                     reader = $Reader.create(reader);
376                 var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grpc.gcp.ChannelPoolConfig();
377                 while (reader.pos < end) {
378                     var tag = reader.uint32();
379                     switch (tag >>> 3) {
380                     case 1:
381                         message.maxSize = reader.uint32();
382                         break;
383                     case 2:
384                         message.idleTimeout = reader.uint64();
385                         break;
386                     case 3:
387                         message.maxConcurrentStreamsLowWatermark = reader.uint32();
388                         break;
389                     default:
390                         reader.skipType(tag & 7);
391                         break;
392                     }
393                 }
394                 return message;
395             };
396
397             /**
398              * Decodes a ChannelPoolConfig message from the specified reader or buffer, length delimited.
399              * @function decodeDelimited
400              * @memberof grpc.gcp.ChannelPoolConfig
401              * @static
402              * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
403              * @returns {grpc.gcp.ChannelPoolConfig} ChannelPoolConfig
404              * @throws {Error} If the payload is not a reader or valid buffer
405              * @throws {$protobuf.util.ProtocolError} If required fields are missing
406              */
407             ChannelPoolConfig.decodeDelimited = function decodeDelimited(reader) {
408                 if (!(reader instanceof $Reader))
409                     reader = new $Reader(reader);
410                 return this.decode(reader, reader.uint32());
411             };
412
413             /**
414              * Verifies a ChannelPoolConfig message.
415              * @function verify
416              * @memberof grpc.gcp.ChannelPoolConfig
417              * @static
418              * @param {Object.<string,*>} message Plain object to verify
419              * @returns {string|null} `null` if valid, otherwise the reason why it is not
420              */
421             ChannelPoolConfig.verify = function verify(message) {
422                 if (typeof message !== "object" || message === null)
423                     return "object expected";
424                 if (message.maxSize != null && message.hasOwnProperty("maxSize"))
425                     if (!$util.isInteger(message.maxSize))
426                         return "maxSize: integer expected";
427                 if (message.idleTimeout != null && message.hasOwnProperty("idleTimeout"))
428                     if (!$util.isInteger(message.idleTimeout) && !(message.idleTimeout && $util.isInteger(message.idleTimeout.low) && $util.isInteger(message.idleTimeout.high)))
429                         return "idleTimeout: integer|Long expected";
430                 if (message.maxConcurrentStreamsLowWatermark != null && message.hasOwnProperty("maxConcurrentStreamsLowWatermark"))
431                     if (!$util.isInteger(message.maxConcurrentStreamsLowWatermark))
432                         return "maxConcurrentStreamsLowWatermark: integer expected";
433                 return null;
434             };
435
436             /**
437              * Creates a ChannelPoolConfig message from a plain object. Also converts values to their respective internal types.
438              * @function fromObject
439              * @memberof grpc.gcp.ChannelPoolConfig
440              * @static
441              * @param {Object.<string,*>} object Plain object
442              * @returns {grpc.gcp.ChannelPoolConfig} ChannelPoolConfig
443              */
444             ChannelPoolConfig.fromObject = function fromObject(object) {
445                 if (object instanceof $root.grpc.gcp.ChannelPoolConfig)
446                     return object;
447                 var message = new $root.grpc.gcp.ChannelPoolConfig();
448                 if (object.maxSize != null)
449                     message.maxSize = object.maxSize >>> 0;
450                 if (object.idleTimeout != null)
451                     if ($util.Long)
452                         (message.idleTimeout = $util.Long.fromValue(object.idleTimeout)).unsigned = true;
453                     else if (typeof object.idleTimeout === "string")
454                         message.idleTimeout = parseInt(object.idleTimeout, 10);
455                     else if (typeof object.idleTimeout === "number")
456                         message.idleTimeout = object.idleTimeout;
457                     else if (typeof object.idleTimeout === "object")
458                         message.idleTimeout = new $util.LongBits(object.idleTimeout.low >>> 0, object.idleTimeout.high >>> 0).toNumber(true);
459                 if (object.maxConcurrentStreamsLowWatermark != null)
460                     message.maxConcurrentStreamsLowWatermark = object.maxConcurrentStreamsLowWatermark >>> 0;
461                 return message;
462             };
463
464             /**
465              * Creates a plain object from a ChannelPoolConfig message. Also converts values to other types if specified.
466              * @function toObject
467              * @memberof grpc.gcp.ChannelPoolConfig
468              * @static
469              * @param {grpc.gcp.ChannelPoolConfig} message ChannelPoolConfig
470              * @param {$protobuf.IConversionOptions} [options] Conversion options
471              * @returns {Object.<string,*>} Plain object
472              */
473             ChannelPoolConfig.toObject = function toObject(message, options) {
474                 if (!options)
475                     options = {};
476                 var object = {};
477                 if (options.defaults) {
478                     object.maxSize = 0;
479                     if ($util.Long) {
480                         var long = new $util.Long(0, 0, true);
481                         object.idleTimeout = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
482                     } else
483                         object.idleTimeout = options.longs === String ? "0" : 0;
484                     object.maxConcurrentStreamsLowWatermark = 0;
485                 }
486                 if (message.maxSize != null && message.hasOwnProperty("maxSize"))
487                     object.maxSize = message.maxSize;
488                 if (message.idleTimeout != null && message.hasOwnProperty("idleTimeout"))
489                     if (typeof message.idleTimeout === "number")
490                         object.idleTimeout = options.longs === String ? String(message.idleTimeout) : message.idleTimeout;
491                     else
492                         object.idleTimeout = options.longs === String ? $util.Long.prototype.toString.call(message.idleTimeout) : options.longs === Number ? new $util.LongBits(message.idleTimeout.low >>> 0, message.idleTimeout.high >>> 0).toNumber(true) : message.idleTimeout;
493                 if (message.maxConcurrentStreamsLowWatermark != null && message.hasOwnProperty("maxConcurrentStreamsLowWatermark"))
494                     object.maxConcurrentStreamsLowWatermark = message.maxConcurrentStreamsLowWatermark;
495                 return object;
496             };
497
498             /**
499              * Converts this ChannelPoolConfig to JSON.
500              * @function toJSON
501              * @memberof grpc.gcp.ChannelPoolConfig
502              * @instance
503              * @returns {Object.<string,*>} JSON object
504              */
505             ChannelPoolConfig.prototype.toJSON = function toJSON() {
506                 return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
507             };
508
509             return ChannelPoolConfig;
510         })();
511
512         gcp.MethodConfig = (function() {
513
514             /**
515              * Properties of a MethodConfig.
516              * @memberof grpc.gcp
517              * @interface IMethodConfig
518              * @property {Array.<string>|null} [name] MethodConfig name
519              * @property {grpc.gcp.IAffinityConfig|null} [affinity] MethodConfig affinity
520              */
521
522             /**
523              * Constructs a new MethodConfig.
524              * @memberof grpc.gcp
525              * @classdesc Represents a MethodConfig.
526              * @implements IMethodConfig
527              * @constructor
528              * @param {grpc.gcp.IMethodConfig=} [properties] Properties to set
529              */
530             function MethodConfig(properties) {
531                 this.name = [];
532                 if (properties)
533                     for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
534                         if (properties[keys[i]] != null)
535                             this[keys[i]] = properties[keys[i]];
536             }
537
538             /**
539              * MethodConfig name.
540              * @member {Array.<string>} name
541              * @memberof grpc.gcp.MethodConfig
542              * @instance
543              */
544             MethodConfig.prototype.name = $util.emptyArray;
545
546             /**
547              * MethodConfig affinity.
548              * @member {grpc.gcp.IAffinityConfig|null|undefined} affinity
549              * @memberof grpc.gcp.MethodConfig
550              * @instance
551              */
552             MethodConfig.prototype.affinity = null;
553
554             /**
555              * Creates a new MethodConfig instance using the specified properties.
556              * @function create
557              * @memberof grpc.gcp.MethodConfig
558              * @static
559              * @param {grpc.gcp.IMethodConfig=} [properties] Properties to set
560              * @returns {grpc.gcp.MethodConfig} MethodConfig instance
561              */
562             MethodConfig.create = function create(properties) {
563                 return new MethodConfig(properties);
564             };
565
566             /**
567              * Encodes the specified MethodConfig message. Does not implicitly {@link grpc.gcp.MethodConfig.verify|verify} messages.
568              * @function encode
569              * @memberof grpc.gcp.MethodConfig
570              * @static
571              * @param {grpc.gcp.IMethodConfig} message MethodConfig message or plain object to encode
572              * @param {$protobuf.Writer} [writer] Writer to encode to
573              * @returns {$protobuf.Writer} Writer
574              */
575             MethodConfig.encode = function encode(message, writer) {
576                 if (!writer)
577                     writer = $Writer.create();
578                 if (message.name != null && message.name.length)
579                     for (var i = 0; i < message.name.length; ++i)
580                         writer.uint32(/* id 1, wireType 2 =*/10).string(message.name[i]);
581                 if (message.affinity != null && message.hasOwnProperty("affinity"))
582                     $root.grpc.gcp.AffinityConfig.encode(message.affinity, writer.uint32(/* id 1001, wireType 2 =*/8010).fork()).ldelim();
583                 return writer;
584             };
585
586             /**
587              * Encodes the specified MethodConfig message, length delimited. Does not implicitly {@link grpc.gcp.MethodConfig.verify|verify} messages.
588              * @function encodeDelimited
589              * @memberof grpc.gcp.MethodConfig
590              * @static
591              * @param {grpc.gcp.IMethodConfig} message MethodConfig message or plain object to encode
592              * @param {$protobuf.Writer} [writer] Writer to encode to
593              * @returns {$protobuf.Writer} Writer
594              */
595             MethodConfig.encodeDelimited = function encodeDelimited(message, writer) {
596                 return this.encode(message, writer).ldelim();
597             };
598
599             /**
600              * Decodes a MethodConfig message from the specified reader or buffer.
601              * @function decode
602              * @memberof grpc.gcp.MethodConfig
603              * @static
604              * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
605              * @param {number} [length] Message length if known beforehand
606              * @returns {grpc.gcp.MethodConfig} MethodConfig
607              * @throws {Error} If the payload is not a reader or valid buffer
608              * @throws {$protobuf.util.ProtocolError} If required fields are missing
609              */
610             MethodConfig.decode = function decode(reader, length) {
611                 if (!(reader instanceof $Reader))
612                     reader = $Reader.create(reader);
613                 var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grpc.gcp.MethodConfig();
614                 while (reader.pos < end) {
615                     var tag = reader.uint32();
616                     switch (tag >>> 3) {
617                     case 1:
618                         if (!(message.name && message.name.length))
619                             message.name = [];
620                         message.name.push(reader.string());
621                         break;
622                     case 1001:
623                         message.affinity = $root.grpc.gcp.AffinityConfig.decode(reader, reader.uint32());
624                         break;
625                     default:
626                         reader.skipType(tag & 7);
627                         break;
628                     }
629                 }
630                 return message;
631             };
632
633             /**
634              * Decodes a MethodConfig message from the specified reader or buffer, length delimited.
635              * @function decodeDelimited
636              * @memberof grpc.gcp.MethodConfig
637              * @static
638              * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
639              * @returns {grpc.gcp.MethodConfig} MethodConfig
640              * @throws {Error} If the payload is not a reader or valid buffer
641              * @throws {$protobuf.util.ProtocolError} If required fields are missing
642              */
643             MethodConfig.decodeDelimited = function decodeDelimited(reader) {
644                 if (!(reader instanceof $Reader))
645                     reader = new $Reader(reader);
646                 return this.decode(reader, reader.uint32());
647             };
648
649             /**
650              * Verifies a MethodConfig message.
651              * @function verify
652              * @memberof grpc.gcp.MethodConfig
653              * @static
654              * @param {Object.<string,*>} message Plain object to verify
655              * @returns {string|null} `null` if valid, otherwise the reason why it is not
656              */
657             MethodConfig.verify = function verify(message) {
658                 if (typeof message !== "object" || message === null)
659                     return "object expected";
660                 if (message.name != null && message.hasOwnProperty("name")) {
661                     if (!Array.isArray(message.name))
662                         return "name: array expected";
663                     for (var i = 0; i < message.name.length; ++i)
664                         if (!$util.isString(message.name[i]))
665                             return "name: string[] expected";
666                 }
667                 if (message.affinity != null && message.hasOwnProperty("affinity")) {
668                     var error = $root.grpc.gcp.AffinityConfig.verify(message.affinity);
669                     if (error)
670                         return "affinity." + error;
671                 }
672                 return null;
673             };
674
675             /**
676              * Creates a MethodConfig message from a plain object. Also converts values to their respective internal types.
677              * @function fromObject
678              * @memberof grpc.gcp.MethodConfig
679              * @static
680              * @param {Object.<string,*>} object Plain object
681              * @returns {grpc.gcp.MethodConfig} MethodConfig
682              */
683             MethodConfig.fromObject = function fromObject(object) {
684                 if (object instanceof $root.grpc.gcp.MethodConfig)
685                     return object;
686                 var message = new $root.grpc.gcp.MethodConfig();
687                 if (object.name) {
688                     if (!Array.isArray(object.name))
689                         throw TypeError(".grpc.gcp.MethodConfig.name: array expected");
690                     message.name = [];
691                     for (var i = 0; i < object.name.length; ++i)
692                         message.name[i] = String(object.name[i]);
693                 }
694                 if (object.affinity != null) {
695                     if (typeof object.affinity !== "object")
696                         throw TypeError(".grpc.gcp.MethodConfig.affinity: object expected");
697                     message.affinity = $root.grpc.gcp.AffinityConfig.fromObject(object.affinity);
698                 }
699                 return message;
700             };
701
702             /**
703              * Creates a plain object from a MethodConfig message. Also converts values to other types if specified.
704              * @function toObject
705              * @memberof grpc.gcp.MethodConfig
706              * @static
707              * @param {grpc.gcp.MethodConfig} message MethodConfig
708              * @param {$protobuf.IConversionOptions} [options] Conversion options
709              * @returns {Object.<string,*>} Plain object
710              */
711             MethodConfig.toObject = function toObject(message, options) {
712                 if (!options)
713                     options = {};
714                 var object = {};
715                 if (options.arrays || options.defaults)
716                     object.name = [];
717                 if (options.defaults)
718                     object.affinity = null;
719                 if (message.name && message.name.length) {
720                     object.name = [];
721                     for (var j = 0; j < message.name.length; ++j)
722                         object.name[j] = message.name[j];
723                 }
724                 if (message.affinity != null && message.hasOwnProperty("affinity"))
725                     object.affinity = $root.grpc.gcp.AffinityConfig.toObject(message.affinity, options);
726                 return object;
727             };
728
729             /**
730              * Converts this MethodConfig to JSON.
731              * @function toJSON
732              * @memberof grpc.gcp.MethodConfig
733              * @instance
734              * @returns {Object.<string,*>} JSON object
735              */
736             MethodConfig.prototype.toJSON = function toJSON() {
737                 return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
738             };
739
740             return MethodConfig;
741         })();
742
743         gcp.AffinityConfig = (function() {
744
745             /**
746              * Properties of an AffinityConfig.
747              * @memberof grpc.gcp
748              * @interface IAffinityConfig
749              * @property {grpc.gcp.AffinityConfig.Command|null} [command] AffinityConfig command
750              * @property {string|null} [affinityKey] AffinityConfig affinityKey
751              */
752
753             /**
754              * Constructs a new AffinityConfig.
755              * @memberof grpc.gcp
756              * @classdesc Represents an AffinityConfig.
757              * @implements IAffinityConfig
758              * @constructor
759              * @param {grpc.gcp.IAffinityConfig=} [properties] Properties to set
760              */
761             function AffinityConfig(properties) {
762                 if (properties)
763                     for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
764                         if (properties[keys[i]] != null)
765                             this[keys[i]] = properties[keys[i]];
766             }
767
768             /**
769              * AffinityConfig command.
770              * @member {grpc.gcp.AffinityConfig.Command} command
771              * @memberof grpc.gcp.AffinityConfig
772              * @instance
773              */
774             AffinityConfig.prototype.command = 0;
775
776             /**
777              * AffinityConfig affinityKey.
778              * @member {string} affinityKey
779              * @memberof grpc.gcp.AffinityConfig
780              * @instance
781              */
782             AffinityConfig.prototype.affinityKey = "";
783
784             /**
785              * Creates a new AffinityConfig instance using the specified properties.
786              * @function create
787              * @memberof grpc.gcp.AffinityConfig
788              * @static
789              * @param {grpc.gcp.IAffinityConfig=} [properties] Properties to set
790              * @returns {grpc.gcp.AffinityConfig} AffinityConfig instance
791              */
792             AffinityConfig.create = function create(properties) {
793                 return new AffinityConfig(properties);
794             };
795
796             /**
797              * Encodes the specified AffinityConfig message. Does not implicitly {@link grpc.gcp.AffinityConfig.verify|verify} messages.
798              * @function encode
799              * @memberof grpc.gcp.AffinityConfig
800              * @static
801              * @param {grpc.gcp.IAffinityConfig} message AffinityConfig message or plain object to encode
802              * @param {$protobuf.Writer} [writer] Writer to encode to
803              * @returns {$protobuf.Writer} Writer
804              */
805             AffinityConfig.encode = function encode(message, writer) {
806                 if (!writer)
807                     writer = $Writer.create();
808                 if (message.command != null && message.hasOwnProperty("command"))
809                     writer.uint32(/* id 2, wireType 0 =*/16).int32(message.command);
810                 if (message.affinityKey != null && message.hasOwnProperty("affinityKey"))
811                     writer.uint32(/* id 3, wireType 2 =*/26).string(message.affinityKey);
812                 return writer;
813             };
814
815             /**
816              * Encodes the specified AffinityConfig message, length delimited. Does not implicitly {@link grpc.gcp.AffinityConfig.verify|verify} messages.
817              * @function encodeDelimited
818              * @memberof grpc.gcp.AffinityConfig
819              * @static
820              * @param {grpc.gcp.IAffinityConfig} message AffinityConfig message or plain object to encode
821              * @param {$protobuf.Writer} [writer] Writer to encode to
822              * @returns {$protobuf.Writer} Writer
823              */
824             AffinityConfig.encodeDelimited = function encodeDelimited(message, writer) {
825                 return this.encode(message, writer).ldelim();
826             };
827
828             /**
829              * Decodes an AffinityConfig message from the specified reader or buffer.
830              * @function decode
831              * @memberof grpc.gcp.AffinityConfig
832              * @static
833              * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
834              * @param {number} [length] Message length if known beforehand
835              * @returns {grpc.gcp.AffinityConfig} AffinityConfig
836              * @throws {Error} If the payload is not a reader or valid buffer
837              * @throws {$protobuf.util.ProtocolError} If required fields are missing
838              */
839             AffinityConfig.decode = function decode(reader, length) {
840                 if (!(reader instanceof $Reader))
841                     reader = $Reader.create(reader);
842                 var end = length === undefined ? reader.len : reader.pos + length, message = new $root.grpc.gcp.AffinityConfig();
843                 while (reader.pos < end) {
844                     var tag = reader.uint32();
845                     switch (tag >>> 3) {
846                     case 2:
847                         message.command = reader.int32();
848                         break;
849                     case 3:
850                         message.affinityKey = reader.string();
851                         break;
852                     default:
853                         reader.skipType(tag & 7);
854                         break;
855                     }
856                 }
857                 return message;
858             };
859
860             /**
861              * Decodes an AffinityConfig message from the specified reader or buffer, length delimited.
862              * @function decodeDelimited
863              * @memberof grpc.gcp.AffinityConfig
864              * @static
865              * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
866              * @returns {grpc.gcp.AffinityConfig} AffinityConfig
867              * @throws {Error} If the payload is not a reader or valid buffer
868              * @throws {$protobuf.util.ProtocolError} If required fields are missing
869              */
870             AffinityConfig.decodeDelimited = function decodeDelimited(reader) {
871                 if (!(reader instanceof $Reader))
872                     reader = new $Reader(reader);
873                 return this.decode(reader, reader.uint32());
874             };
875
876             /**
877              * Verifies an AffinityConfig message.
878              * @function verify
879              * @memberof grpc.gcp.AffinityConfig
880              * @static
881              * @param {Object.<string,*>} message Plain object to verify
882              * @returns {string|null} `null` if valid, otherwise the reason why it is not
883              */
884             AffinityConfig.verify = function verify(message) {
885                 if (typeof message !== "object" || message === null)
886                     return "object expected";
887                 if (message.command != null && message.hasOwnProperty("command"))
888                     switch (message.command) {
889                     default:
890                         return "command: enum value expected";
891                     case 0:
892                     case 1:
893                     case 2:
894                         break;
895                     }
896                 if (message.affinityKey != null && message.hasOwnProperty("affinityKey"))
897                     if (!$util.isString(message.affinityKey))
898                         return "affinityKey: string expected";
899                 return null;
900             };
901
902             /**
903              * Creates an AffinityConfig message from a plain object. Also converts values to their respective internal types.
904              * @function fromObject
905              * @memberof grpc.gcp.AffinityConfig
906              * @static
907              * @param {Object.<string,*>} object Plain object
908              * @returns {grpc.gcp.AffinityConfig} AffinityConfig
909              */
910             AffinityConfig.fromObject = function fromObject(object) {
911                 if (object instanceof $root.grpc.gcp.AffinityConfig)
912                     return object;
913                 var message = new $root.grpc.gcp.AffinityConfig();
914                 switch (object.command) {
915                 case "BOUND":
916                 case 0:
917                     message.command = 0;
918                     break;
919                 case "BIND":
920                 case 1:
921                     message.command = 1;
922                     break;
923                 case "UNBIND":
924                 case 2:
925                     message.command = 2;
926                     break;
927                 }
928                 if (object.affinityKey != null)
929                     message.affinityKey = String(object.affinityKey);
930                 return message;
931             };
932
933             /**
934              * Creates a plain object from an AffinityConfig message. Also converts values to other types if specified.
935              * @function toObject
936              * @memberof grpc.gcp.AffinityConfig
937              * @static
938              * @param {grpc.gcp.AffinityConfig} message AffinityConfig
939              * @param {$protobuf.IConversionOptions} [options] Conversion options
940              * @returns {Object.<string,*>} Plain object
941              */
942             AffinityConfig.toObject = function toObject(message, options) {
943                 if (!options)
944                     options = {};
945                 var object = {};
946                 if (options.defaults) {
947                     object.command = options.enums === String ? "BOUND" : 0;
948                     object.affinityKey = "";
949                 }
950                 if (message.command != null && message.hasOwnProperty("command"))
951                     object.command = options.enums === String ? $root.grpc.gcp.AffinityConfig.Command[message.command] : message.command;
952                 if (message.affinityKey != null && message.hasOwnProperty("affinityKey"))
953                     object.affinityKey = message.affinityKey;
954                 return object;
955             };
956
957             /**
958              * Converts this AffinityConfig to JSON.
959              * @function toJSON
960              * @memberof grpc.gcp.AffinityConfig
961              * @instance
962              * @returns {Object.<string,*>} JSON object
963              */
964             AffinityConfig.prototype.toJSON = function toJSON() {
965                 return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
966             };
967
968             /**
969              * Command enum.
970              * @name grpc.gcp.AffinityConfig.Command
971              * @enum {string}
972              * @property {number} BOUND=0 BOUND value
973              * @property {number} BIND=1 BIND value
974              * @property {number} UNBIND=2 UNBIND value
975              */
976             AffinityConfig.Command = (function() {
977                 var valuesById = {}, values = Object.create(valuesById);
978                 values[valuesById[0] = "BOUND"] = 0;
979                 values[valuesById[1] = "BIND"] = 1;
980                 values[valuesById[2] = "UNBIND"] = 2;
981                 return values;
982             })();
983
984             return AffinityConfig;
985         })();
986
987         return gcp;
988     })();
989
990     return grpc;
991 })();
992
993 module.exports = $root;