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 | (function(global, factory) { /* global define, require, module */
|
3 |
|
4 | /* AMD */ if (typeof define === 'function' && define.amd)
|
5 | define(["protobufjs/minimal"], factory);
|
6 |
|
7 | /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports)
|
8 | module.exports = factory(require("protobufjs/minimal"));
|
9 |
|
10 | })(this, function($protobuf) {
|
11 | ;
|
12 |
|
13 | // Common aliases
|
14 | var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;
|
15 |
|
16 | // Exported root namespace
|
17 | var $root = $protobuf.roots.operations_protos || ($protobuf.roots.operations_protos = {});
|
18 |
|
19 | $root.google = (function() {
|
20 |
|
21 | /**
|
22 | * Namespace google.
|
23 | * @exports google
|
24 | * @namespace
|
25 | */
|
26 | var google = {};
|
27 |
|
28 | google.longrunning = (function() {
|
29 |
|
30 | /**
|
31 | * Namespace longrunning.
|
32 | * @memberof google
|
33 | * @namespace
|
34 | */
|
35 | var longrunning = {};
|
36 |
|
37 | longrunning.Operations = (function() {
|
38 |
|
39 | /**
|
40 | * Constructs a new Operations service.
|
41 | * @memberof google.longrunning
|
42 | * @classdesc Represents an Operations
|
43 | * @extends $protobuf.rpc.Service
|
44 | * @constructor
|
45 | * @param {$protobuf.RPCImpl} rpcImpl RPC implementation
|
46 | * @param {boolean} [requestDelimited=false] Whether requests are length-delimited
|
47 | * @param {boolean} [responseDelimited=false] Whether responses are length-delimited
|
48 | */
|
49 | function Operations(rpcImpl, requestDelimited, responseDelimited) {
|
50 | $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited);
|
51 | }
|
52 |
|
53 | (Operations.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Operations;
|
54 |
|
55 | /**
|
56 | * Creates new Operations service using the specified rpc implementation.
|
57 | * @function create
|
58 | * @memberof google.longrunning.Operations
|
59 | * @static
|
60 | * @param {$protobuf.RPCImpl} rpcImpl RPC implementation
|
61 | * @param {boolean} [requestDelimited=false] Whether requests are length-delimited
|
62 | * @param {boolean} [responseDelimited=false] Whether responses are length-delimited
|
63 | * @returns {Operations} RPC service. Useful where requests and/or responses are streamed.
|
64 | */
|
65 | Operations.create = function create(rpcImpl, requestDelimited, responseDelimited) {
|
66 | return new this(rpcImpl, requestDelimited, responseDelimited);
|
67 | };
|
68 |
|
69 | /**
|
70 | * Callback as used by {@link google.longrunning.Operations#listOperations}.
|
71 | * @memberof google.longrunning.Operations
|
72 | * @typedef ListOperationsCallback
|
73 | * @type {function}
|
74 | * @param {Error|null} error Error, if any
|
75 | * @param {google.longrunning.ListOperationsResponse} [response] ListOperationsResponse
|
76 | */
|
77 |
|
78 | /**
|
79 | * Calls ListOperations.
|
80 | * @function listOperations
|
81 | * @memberof google.longrunning.Operations
|
82 | * @instance
|
83 | * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object
|
84 | * @param {google.longrunning.Operations.ListOperationsCallback} callback Node-style callback called with the error, if any, and ListOperationsResponse
|
85 | * @returns {undefined}
|
86 | * @variation 1
|
87 | */
|
88 | Object.defineProperty(Operations.prototype.listOperations = function listOperations(request, callback) {
|
89 | return this.rpcCall(listOperations, $root.google.longrunning.ListOperationsRequest, $root.google.longrunning.ListOperationsResponse, request, callback);
|
90 | }, "name", { value: "ListOperations" });
|
91 |
|
92 | /**
|
93 | * Calls ListOperations.
|
94 | * @function listOperations
|
95 | * @memberof google.longrunning.Operations
|
96 | * @instance
|
97 | * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object
|
98 | * @returns {Promise<google.longrunning.ListOperationsResponse>} Promise
|
99 | * @variation 2
|
100 | */
|
101 |
|
102 | /**
|
103 | * Callback as used by {@link google.longrunning.Operations#getOperation}.
|
104 | * @memberof google.longrunning.Operations
|
105 | * @typedef GetOperationCallback
|
106 | * @type {function}
|
107 | * @param {Error|null} error Error, if any
|
108 | * @param {google.longrunning.Operation} [response] Operation
|
109 | */
|
110 |
|
111 | /**
|
112 | * Calls GetOperation.
|
113 | * @function getOperation
|
114 | * @memberof google.longrunning.Operations
|
115 | * @instance
|
116 | * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object
|
117 | * @param {google.longrunning.Operations.GetOperationCallback} callback Node-style callback called with the error, if any, and Operation
|
118 | * @returns {undefined}
|
119 | * @variation 1
|
120 | */
|
121 | Object.defineProperty(Operations.prototype.getOperation = function getOperation(request, callback) {
|
122 | return this.rpcCall(getOperation, $root.google.longrunning.GetOperationRequest, $root.google.longrunning.Operation, request, callback);
|
123 | }, "name", { value: "GetOperation" });
|
124 |
|
125 | /**
|
126 | * Calls GetOperation.
|
127 | * @function getOperation
|
128 | * @memberof google.longrunning.Operations
|
129 | * @instance
|
130 | * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object
|
131 | * @returns {Promise<google.longrunning.Operation>} Promise
|
132 | * @variation 2
|
133 | */
|
134 |
|
135 | /**
|
136 | * Callback as used by {@link google.longrunning.Operations#deleteOperation}.
|
137 | * @memberof google.longrunning.Operations
|
138 | * @typedef DeleteOperationCallback
|
139 | * @type {function}
|
140 | * @param {Error|null} error Error, if any
|
141 | * @param {google.protobuf.Empty} [response] Empty
|
142 | */
|
143 |
|
144 | /**
|
145 | * Calls DeleteOperation.
|
146 | * @function deleteOperation
|
147 | * @memberof google.longrunning.Operations
|
148 | * @instance
|
149 | * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object
|
150 | * @param {google.longrunning.Operations.DeleteOperationCallback} callback Node-style callback called with the error, if any, and Empty
|
151 | * @returns {undefined}
|
152 | * @variation 1
|
153 | */
|
154 | Object.defineProperty(Operations.prototype.deleteOperation = function deleteOperation(request, callback) {
|
155 | return this.rpcCall(deleteOperation, $root.google.longrunning.DeleteOperationRequest, $root.google.protobuf.Empty, request, callback);
|
156 | }, "name", { value: "DeleteOperation" });
|
157 |
|
158 | /**
|
159 | * Calls DeleteOperation.
|
160 | * @function deleteOperation
|
161 | * @memberof google.longrunning.Operations
|
162 | * @instance
|
163 | * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object
|
164 | * @returns {Promise<google.protobuf.Empty>} Promise
|
165 | * @variation 2
|
166 | */
|
167 |
|
168 | /**
|
169 | * Callback as used by {@link google.longrunning.Operations#cancelOperation}.
|
170 | * @memberof google.longrunning.Operations
|
171 | * @typedef CancelOperationCallback
|
172 | * @type {function}
|
173 | * @param {Error|null} error Error, if any
|
174 | * @param {google.protobuf.Empty} [response] Empty
|
175 | */
|
176 |
|
177 | /**
|
178 | * Calls CancelOperation.
|
179 | * @function cancelOperation
|
180 | * @memberof google.longrunning.Operations
|
181 | * @instance
|
182 | * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object
|
183 | * @param {google.longrunning.Operations.CancelOperationCallback} callback Node-style callback called with the error, if any, and Empty
|
184 | * @returns {undefined}
|
185 | * @variation 1
|
186 | */
|
187 | Object.defineProperty(Operations.prototype.cancelOperation = function cancelOperation(request, callback) {
|
188 | return this.rpcCall(cancelOperation, $root.google.longrunning.CancelOperationRequest, $root.google.protobuf.Empty, request, callback);
|
189 | }, "name", { value: "CancelOperation" });
|
190 |
|
191 | /**
|
192 | * Calls CancelOperation.
|
193 | * @function cancelOperation
|
194 | * @memberof google.longrunning.Operations
|
195 | * @instance
|
196 | * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object
|
197 | * @returns {Promise<google.protobuf.Empty>} Promise
|
198 | * @variation 2
|
199 | */
|
200 |
|
201 | /**
|
202 | * Callback as used by {@link google.longrunning.Operations#waitOperation}.
|
203 | * @memberof google.longrunning.Operations
|
204 | * @typedef WaitOperationCallback
|
205 | * @type {function}
|
206 | * @param {Error|null} error Error, if any
|
207 | * @param {google.longrunning.Operation} [response] Operation
|
208 | */
|
209 |
|
210 | /**
|
211 | * Calls WaitOperation.
|
212 | * @function waitOperation
|
213 | * @memberof google.longrunning.Operations
|
214 | * @instance
|
215 | * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object
|
216 | * @param {google.longrunning.Operations.WaitOperationCallback} callback Node-style callback called with the error, if any, and Operation
|
217 | * @returns {undefined}
|
218 | * @variation 1
|
219 | */
|
220 | Object.defineProperty(Operations.prototype.waitOperation = function waitOperation(request, callback) {
|
221 | return this.rpcCall(waitOperation, $root.google.longrunning.WaitOperationRequest, $root.google.longrunning.Operation, request, callback);
|
222 | }, "name", { value: "WaitOperation" });
|
223 |
|
224 | /**
|
225 | * Calls WaitOperation.
|
226 | * @function waitOperation
|
227 | * @memberof google.longrunning.Operations
|
228 | * @instance
|
229 | * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object
|
230 | * @returns {Promise<google.longrunning.Operation>} Promise
|
231 | * @variation 2
|
232 | */
|
233 |
|
234 | return Operations;
|
235 | })();
|
236 |
|
237 | longrunning.Operation = (function() {
|
238 |
|
239 | /**
|
240 | * Properties of an Operation.
|
241 | * @memberof google.longrunning
|
242 | * @interface IOperation
|
243 | * @property {string|null} [name] Operation name
|
244 | * @property {google.protobuf.IAny|null} [metadata] Operation metadata
|
245 | * @property {boolean|null} [done] Operation done
|
246 | * @property {google.rpc.IStatus|null} [error] Operation error
|
247 | * @property {google.protobuf.IAny|null} [response] Operation response
|
248 | */
|
249 |
|
250 | /**
|
251 | * Constructs a new Operation.
|
252 | * @memberof google.longrunning
|
253 | * @classdesc Represents an Operation.
|
254 | * @implements IOperation
|
255 | * @constructor
|
256 | * @param {google.longrunning.IOperation=} [properties] Properties to set
|
257 | */
|
258 | function Operation(properties) {
|
259 | if (properties)
|
260 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
261 | if (properties[keys[i]] != null)
|
262 | this[keys[i]] = properties[keys[i]];
|
263 | }
|
264 |
|
265 | /**
|
266 | * Operation name.
|
267 | * @member {string} name
|
268 | * @memberof google.longrunning.Operation
|
269 | * @instance
|
270 | */
|
271 | Operation.prototype.name = "";
|
272 |
|
273 | /**
|
274 | * Operation metadata.
|
275 | * @member {google.protobuf.IAny|null|undefined} metadata
|
276 | * @memberof google.longrunning.Operation
|
277 | * @instance
|
278 | */
|
279 | Operation.prototype.metadata = null;
|
280 |
|
281 | /**
|
282 | * Operation done.
|
283 | * @member {boolean} done
|
284 | * @memberof google.longrunning.Operation
|
285 | * @instance
|
286 | */
|
287 | Operation.prototype.done = false;
|
288 |
|
289 | /**
|
290 | * Operation error.
|
291 | * @member {google.rpc.IStatus|null|undefined} error
|
292 | * @memberof google.longrunning.Operation
|
293 | * @instance
|
294 | */
|
295 | Operation.prototype.error = null;
|
296 |
|
297 | /**
|
298 | * Operation response.
|
299 | * @member {google.protobuf.IAny|null|undefined} response
|
300 | * @memberof google.longrunning.Operation
|
301 | * @instance
|
302 | */
|
303 | Operation.prototype.response = null;
|
304 |
|
305 | // OneOf field names bound to virtual getters and setters
|
306 | var $oneOfFields;
|
307 |
|
308 | /**
|
309 | * Operation result.
|
310 | * @member {"error"|"response"|undefined} result
|
311 | * @memberof google.longrunning.Operation
|
312 | * @instance
|
313 | */
|
314 | Object.defineProperty(Operation.prototype, "result", {
|
315 | get: $util.oneOfGetter($oneOfFields = ["error", "response"]),
|
316 | set: $util.oneOfSetter($oneOfFields)
|
317 | });
|
318 |
|
319 | /**
|
320 | * Creates a new Operation instance using the specified properties.
|
321 | * @function create
|
322 | * @memberof google.longrunning.Operation
|
323 | * @static
|
324 | * @param {google.longrunning.IOperation=} [properties] Properties to set
|
325 | * @returns {google.longrunning.Operation} Operation instance
|
326 | */
|
327 | Operation.create = function create(properties) {
|
328 | return new Operation(properties);
|
329 | };
|
330 |
|
331 | /**
|
332 | * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages.
|
333 | * @function encode
|
334 | * @memberof google.longrunning.Operation
|
335 | * @static
|
336 | * @param {google.longrunning.IOperation} message Operation message or plain object to encode
|
337 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
338 | * @returns {$protobuf.Writer} Writer
|
339 | */
|
340 | Operation.encode = function encode(message, writer) {
|
341 | if (!writer)
|
342 | writer = $Writer.create();
|
343 | if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
344 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
345 | if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata"))
|
346 | $root.google.protobuf.Any.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
347 | if (message.done != null && Object.hasOwnProperty.call(message, "done"))
|
348 | writer.uint32(/* id 3, wireType 0 =*/24).bool(message.done);
|
349 | if (message.error != null && Object.hasOwnProperty.call(message, "error"))
|
350 | $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
351 | if (message.response != null && Object.hasOwnProperty.call(message, "response"))
|
352 | $root.google.protobuf.Any.encode(message.response, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
|
353 | return writer;
|
354 | };
|
355 |
|
356 | /**
|
357 | * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages.
|
358 | * @function encodeDelimited
|
359 | * @memberof google.longrunning.Operation
|
360 | * @static
|
361 | * @param {google.longrunning.IOperation} message Operation message or plain object to encode
|
362 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
363 | * @returns {$protobuf.Writer} Writer
|
364 | */
|
365 | Operation.encodeDelimited = function encodeDelimited(message, writer) {
|
366 | return this.encode(message, writer).ldelim();
|
367 | };
|
368 |
|
369 | /**
|
370 | * Decodes an Operation message from the specified reader or buffer.
|
371 | * @function decode
|
372 | * @memberof google.longrunning.Operation
|
373 | * @static
|
374 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
375 | * @param {number} [length] Message length if known beforehand
|
376 | * @returns {google.longrunning.Operation} Operation
|
377 | * @throws {Error} If the payload is not a reader or valid buffer
|
378 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
379 | */
|
380 | Operation.decode = function decode(reader, length) {
|
381 | if (!(reader instanceof $Reader))
|
382 | reader = $Reader.create(reader);
|
383 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.Operation();
|
384 | while (reader.pos < end) {
|
385 | var tag = reader.uint32();
|
386 | switch (tag >>> 3) {
|
387 | case 1:
|
388 | message.name = reader.string();
|
389 | break;
|
390 | case 2:
|
391 | message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32());
|
392 | break;
|
393 | case 3:
|
394 | message.done = reader.bool();
|
395 | break;
|
396 | case 4:
|
397 | message.error = $root.google.rpc.Status.decode(reader, reader.uint32());
|
398 | break;
|
399 | case 5:
|
400 | message.response = $root.google.protobuf.Any.decode(reader, reader.uint32());
|
401 | break;
|
402 | default:
|
403 | reader.skipType(tag & 7);
|
404 | break;
|
405 | }
|
406 | }
|
407 | return message;
|
408 | };
|
409 |
|
410 | /**
|
411 | * Decodes an Operation message from the specified reader or buffer, length delimited.
|
412 | * @function decodeDelimited
|
413 | * @memberof google.longrunning.Operation
|
414 | * @static
|
415 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
416 | * @returns {google.longrunning.Operation} Operation
|
417 | * @throws {Error} If the payload is not a reader or valid buffer
|
418 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
419 | */
|
420 | Operation.decodeDelimited = function decodeDelimited(reader) {
|
421 | if (!(reader instanceof $Reader))
|
422 | reader = new $Reader(reader);
|
423 | return this.decode(reader, reader.uint32());
|
424 | };
|
425 |
|
426 | /**
|
427 | * Verifies an Operation message.
|
428 | * @function verify
|
429 | * @memberof google.longrunning.Operation
|
430 | * @static
|
431 | * @param {Object.<string,*>} message Plain object to verify
|
432 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
433 | */
|
434 | Operation.verify = function verify(message) {
|
435 | if (typeof message !== "object" || message === null)
|
436 | return "object expected";
|
437 | var properties = {};
|
438 | if (message.name != null && message.hasOwnProperty("name"))
|
439 | if (!$util.isString(message.name))
|
440 | return "name: string expected";
|
441 | if (message.metadata != null && message.hasOwnProperty("metadata")) {
|
442 | var error = $root.google.protobuf.Any.verify(message.metadata);
|
443 | if (error)
|
444 | return "metadata." + error;
|
445 | }
|
446 | if (message.done != null && message.hasOwnProperty("done"))
|
447 | if (typeof message.done !== "boolean")
|
448 | return "done: boolean expected";
|
449 | if (message.error != null && message.hasOwnProperty("error")) {
|
450 | properties.result = 1;
|
451 | {
|
452 | var error = $root.google.rpc.Status.verify(message.error);
|
453 | if (error)
|
454 | return "error." + error;
|
455 | }
|
456 | }
|
457 | if (message.response != null && message.hasOwnProperty("response")) {
|
458 | if (properties.result === 1)
|
459 | return "result: multiple values";
|
460 | properties.result = 1;
|
461 | {
|
462 | var error = $root.google.protobuf.Any.verify(message.response);
|
463 | if (error)
|
464 | return "response." + error;
|
465 | }
|
466 | }
|
467 | return null;
|
468 | };
|
469 |
|
470 | /**
|
471 | * Creates an Operation message from a plain object. Also converts values to their respective internal types.
|
472 | * @function fromObject
|
473 | * @memberof google.longrunning.Operation
|
474 | * @static
|
475 | * @param {Object.<string,*>} object Plain object
|
476 | * @returns {google.longrunning.Operation} Operation
|
477 | */
|
478 | Operation.fromObject = function fromObject(object) {
|
479 | if (object instanceof $root.google.longrunning.Operation)
|
480 | return object;
|
481 | var message = new $root.google.longrunning.Operation();
|
482 | if (object.name != null)
|
483 | message.name = String(object.name);
|
484 | if (object.metadata != null) {
|
485 | if (typeof object.metadata !== "object")
|
486 | throw TypeError(".google.longrunning.Operation.metadata: object expected");
|
487 | message.metadata = $root.google.protobuf.Any.fromObject(object.metadata);
|
488 | }
|
489 | if (object.done != null)
|
490 | message.done = Boolean(object.done);
|
491 | if (object.error != null) {
|
492 | if (typeof object.error !== "object")
|
493 | throw TypeError(".google.longrunning.Operation.error: object expected");
|
494 | message.error = $root.google.rpc.Status.fromObject(object.error);
|
495 | }
|
496 | if (object.response != null) {
|
497 | if (typeof object.response !== "object")
|
498 | throw TypeError(".google.longrunning.Operation.response: object expected");
|
499 | message.response = $root.google.protobuf.Any.fromObject(object.response);
|
500 | }
|
501 | return message;
|
502 | };
|
503 |
|
504 | /**
|
505 | * Creates a plain object from an Operation message. Also converts values to other types if specified.
|
506 | * @function toObject
|
507 | * @memberof google.longrunning.Operation
|
508 | * @static
|
509 | * @param {google.longrunning.Operation} message Operation
|
510 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
511 | * @returns {Object.<string,*>} Plain object
|
512 | */
|
513 | Operation.toObject = function toObject(message, options) {
|
514 | if (!options)
|
515 | options = {};
|
516 | var object = {};
|
517 | if (options.defaults) {
|
518 | object.name = "";
|
519 | object.metadata = null;
|
520 | object.done = false;
|
521 | }
|
522 | if (message.name != null && message.hasOwnProperty("name"))
|
523 | object.name = message.name;
|
524 | if (message.metadata != null && message.hasOwnProperty("metadata"))
|
525 | object.metadata = $root.google.protobuf.Any.toObject(message.metadata, options);
|
526 | if (message.done != null && message.hasOwnProperty("done"))
|
527 | object.done = message.done;
|
528 | if (message.error != null && message.hasOwnProperty("error")) {
|
529 | object.error = $root.google.rpc.Status.toObject(message.error, options);
|
530 | if (options.oneofs)
|
531 | object.result = "error";
|
532 | }
|
533 | if (message.response != null && message.hasOwnProperty("response")) {
|
534 | object.response = $root.google.protobuf.Any.toObject(message.response, options);
|
535 | if (options.oneofs)
|
536 | object.result = "response";
|
537 | }
|
538 | return object;
|
539 | };
|
540 |
|
541 | /**
|
542 | * Converts this Operation to JSON.
|
543 | * @function toJSON
|
544 | * @memberof google.longrunning.Operation
|
545 | * @instance
|
546 | * @returns {Object.<string,*>} JSON object
|
547 | */
|
548 | Operation.prototype.toJSON = function toJSON() {
|
549 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
550 | };
|
551 |
|
552 | return Operation;
|
553 | })();
|
554 |
|
555 | longrunning.GetOperationRequest = (function() {
|
556 |
|
557 | /**
|
558 | * Properties of a GetOperationRequest.
|
559 | * @memberof google.longrunning
|
560 | * @interface IGetOperationRequest
|
561 | * @property {string|null} [name] GetOperationRequest name
|
562 | */
|
563 |
|
564 | /**
|
565 | * Constructs a new GetOperationRequest.
|
566 | * @memberof google.longrunning
|
567 | * @classdesc Represents a GetOperationRequest.
|
568 | * @implements IGetOperationRequest
|
569 | * @constructor
|
570 | * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set
|
571 | */
|
572 | function GetOperationRequest(properties) {
|
573 | if (properties)
|
574 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
575 | if (properties[keys[i]] != null)
|
576 | this[keys[i]] = properties[keys[i]];
|
577 | }
|
578 |
|
579 | /**
|
580 | * GetOperationRequest name.
|
581 | * @member {string} name
|
582 | * @memberof google.longrunning.GetOperationRequest
|
583 | * @instance
|
584 | */
|
585 | GetOperationRequest.prototype.name = "";
|
586 |
|
587 | /**
|
588 | * Creates a new GetOperationRequest instance using the specified properties.
|
589 | * @function create
|
590 | * @memberof google.longrunning.GetOperationRequest
|
591 | * @static
|
592 | * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set
|
593 | * @returns {google.longrunning.GetOperationRequest} GetOperationRequest instance
|
594 | */
|
595 | GetOperationRequest.create = function create(properties) {
|
596 | return new GetOperationRequest(properties);
|
597 | };
|
598 |
|
599 | /**
|
600 | * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages.
|
601 | * @function encode
|
602 | * @memberof google.longrunning.GetOperationRequest
|
603 | * @static
|
604 | * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode
|
605 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
606 | * @returns {$protobuf.Writer} Writer
|
607 | */
|
608 | GetOperationRequest.encode = function encode(message, writer) {
|
609 | if (!writer)
|
610 | writer = $Writer.create();
|
611 | if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
612 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
613 | return writer;
|
614 | };
|
615 |
|
616 | /**
|
617 | * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages.
|
618 | * @function encodeDelimited
|
619 | * @memberof google.longrunning.GetOperationRequest
|
620 | * @static
|
621 | * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode
|
622 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
623 | * @returns {$protobuf.Writer} Writer
|
624 | */
|
625 | GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
626 | return this.encode(message, writer).ldelim();
|
627 | };
|
628 |
|
629 | /**
|
630 | * Decodes a GetOperationRequest message from the specified reader or buffer.
|
631 | * @function decode
|
632 | * @memberof google.longrunning.GetOperationRequest
|
633 | * @static
|
634 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
635 | * @param {number} [length] Message length if known beforehand
|
636 | * @returns {google.longrunning.GetOperationRequest} GetOperationRequest
|
637 | * @throws {Error} If the payload is not a reader or valid buffer
|
638 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
639 | */
|
640 | GetOperationRequest.decode = function decode(reader, length) {
|
641 | if (!(reader instanceof $Reader))
|
642 | reader = $Reader.create(reader);
|
643 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.GetOperationRequest();
|
644 | while (reader.pos < end) {
|
645 | var tag = reader.uint32();
|
646 | switch (tag >>> 3) {
|
647 | case 1:
|
648 | message.name = reader.string();
|
649 | break;
|
650 | default:
|
651 | reader.skipType(tag & 7);
|
652 | break;
|
653 | }
|
654 | }
|
655 | return message;
|
656 | };
|
657 |
|
658 | /**
|
659 | * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited.
|
660 | * @function decodeDelimited
|
661 | * @memberof google.longrunning.GetOperationRequest
|
662 | * @static
|
663 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
664 | * @returns {google.longrunning.GetOperationRequest} GetOperationRequest
|
665 | * @throws {Error} If the payload is not a reader or valid buffer
|
666 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
667 | */
|
668 | GetOperationRequest.decodeDelimited = function decodeDelimited(reader) {
|
669 | if (!(reader instanceof $Reader))
|
670 | reader = new $Reader(reader);
|
671 | return this.decode(reader, reader.uint32());
|
672 | };
|
673 |
|
674 | /**
|
675 | * Verifies a GetOperationRequest message.
|
676 | * @function verify
|
677 | * @memberof google.longrunning.GetOperationRequest
|
678 | * @static
|
679 | * @param {Object.<string,*>} message Plain object to verify
|
680 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
681 | */
|
682 | GetOperationRequest.verify = function verify(message) {
|
683 | if (typeof message !== "object" || message === null)
|
684 | return "object expected";
|
685 | if (message.name != null && message.hasOwnProperty("name"))
|
686 | if (!$util.isString(message.name))
|
687 | return "name: string expected";
|
688 | return null;
|
689 | };
|
690 |
|
691 | /**
|
692 | * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types.
|
693 | * @function fromObject
|
694 | * @memberof google.longrunning.GetOperationRequest
|
695 | * @static
|
696 | * @param {Object.<string,*>} object Plain object
|
697 | * @returns {google.longrunning.GetOperationRequest} GetOperationRequest
|
698 | */
|
699 | GetOperationRequest.fromObject = function fromObject(object) {
|
700 | if (object instanceof $root.google.longrunning.GetOperationRequest)
|
701 | return object;
|
702 | var message = new $root.google.longrunning.GetOperationRequest();
|
703 | if (object.name != null)
|
704 | message.name = String(object.name);
|
705 | return message;
|
706 | };
|
707 |
|
708 | /**
|
709 | * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified.
|
710 | * @function toObject
|
711 | * @memberof google.longrunning.GetOperationRequest
|
712 | * @static
|
713 | * @param {google.longrunning.GetOperationRequest} message GetOperationRequest
|
714 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
715 | * @returns {Object.<string,*>} Plain object
|
716 | */
|
717 | GetOperationRequest.toObject = function toObject(message, options) {
|
718 | if (!options)
|
719 | options = {};
|
720 | var object = {};
|
721 | if (options.defaults)
|
722 | object.name = "";
|
723 | if (message.name != null && message.hasOwnProperty("name"))
|
724 | object.name = message.name;
|
725 | return object;
|
726 | };
|
727 |
|
728 | /**
|
729 | * Converts this GetOperationRequest to JSON.
|
730 | * @function toJSON
|
731 | * @memberof google.longrunning.GetOperationRequest
|
732 | * @instance
|
733 | * @returns {Object.<string,*>} JSON object
|
734 | */
|
735 | GetOperationRequest.prototype.toJSON = function toJSON() {
|
736 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
737 | };
|
738 |
|
739 | return GetOperationRequest;
|
740 | })();
|
741 |
|
742 | longrunning.ListOperationsRequest = (function() {
|
743 |
|
744 | /**
|
745 | * Properties of a ListOperationsRequest.
|
746 | * @memberof google.longrunning
|
747 | * @interface IListOperationsRequest
|
748 | * @property {string|null} [name] ListOperationsRequest name
|
749 | * @property {string|null} [filter] ListOperationsRequest filter
|
750 | * @property {number|null} [pageSize] ListOperationsRequest pageSize
|
751 | * @property {string|null} [pageToken] ListOperationsRequest pageToken
|
752 | */
|
753 |
|
754 | /**
|
755 | * Constructs a new ListOperationsRequest.
|
756 | * @memberof google.longrunning
|
757 | * @classdesc Represents a ListOperationsRequest.
|
758 | * @implements IListOperationsRequest
|
759 | * @constructor
|
760 | * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set
|
761 | */
|
762 | function ListOperationsRequest(properties) {
|
763 | if (properties)
|
764 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
765 | if (properties[keys[i]] != null)
|
766 | this[keys[i]] = properties[keys[i]];
|
767 | }
|
768 |
|
769 | /**
|
770 | * ListOperationsRequest name.
|
771 | * @member {string} name
|
772 | * @memberof google.longrunning.ListOperationsRequest
|
773 | * @instance
|
774 | */
|
775 | ListOperationsRequest.prototype.name = "";
|
776 |
|
777 | /**
|
778 | * ListOperationsRequest filter.
|
779 | * @member {string} filter
|
780 | * @memberof google.longrunning.ListOperationsRequest
|
781 | * @instance
|
782 | */
|
783 | ListOperationsRequest.prototype.filter = "";
|
784 |
|
785 | /**
|
786 | * ListOperationsRequest pageSize.
|
787 | * @member {number} pageSize
|
788 | * @memberof google.longrunning.ListOperationsRequest
|
789 | * @instance
|
790 | */
|
791 | ListOperationsRequest.prototype.pageSize = 0;
|
792 |
|
793 | /**
|
794 | * ListOperationsRequest pageToken.
|
795 | * @member {string} pageToken
|
796 | * @memberof google.longrunning.ListOperationsRequest
|
797 | * @instance
|
798 | */
|
799 | ListOperationsRequest.prototype.pageToken = "";
|
800 |
|
801 | /**
|
802 | * Creates a new ListOperationsRequest instance using the specified properties.
|
803 | * @function create
|
804 | * @memberof google.longrunning.ListOperationsRequest
|
805 | * @static
|
806 | * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set
|
807 | * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest instance
|
808 | */
|
809 | ListOperationsRequest.create = function create(properties) {
|
810 | return new ListOperationsRequest(properties);
|
811 | };
|
812 |
|
813 | /**
|
814 | * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages.
|
815 | * @function encode
|
816 | * @memberof google.longrunning.ListOperationsRequest
|
817 | * @static
|
818 | * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode
|
819 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
820 | * @returns {$protobuf.Writer} Writer
|
821 | */
|
822 | ListOperationsRequest.encode = function encode(message, writer) {
|
823 | if (!writer)
|
824 | writer = $Writer.create();
|
825 | if (message.filter != null && Object.hasOwnProperty.call(message, "filter"))
|
826 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter);
|
827 | if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize"))
|
828 | writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize);
|
829 | if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken"))
|
830 | writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken);
|
831 | if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
832 | writer.uint32(/* id 4, wireType 2 =*/34).string(message.name);
|
833 | return writer;
|
834 | };
|
835 |
|
836 | /**
|
837 | * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages.
|
838 | * @function encodeDelimited
|
839 | * @memberof google.longrunning.ListOperationsRequest
|
840 | * @static
|
841 | * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode
|
842 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
843 | * @returns {$protobuf.Writer} Writer
|
844 | */
|
845 | ListOperationsRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
846 | return this.encode(message, writer).ldelim();
|
847 | };
|
848 |
|
849 | /**
|
850 | * Decodes a ListOperationsRequest message from the specified reader or buffer.
|
851 | * @function decode
|
852 | * @memberof google.longrunning.ListOperationsRequest
|
853 | * @static
|
854 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
855 | * @param {number} [length] Message length if known beforehand
|
856 | * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest
|
857 | * @throws {Error} If the payload is not a reader or valid buffer
|
858 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
859 | */
|
860 | ListOperationsRequest.decode = function decode(reader, length) {
|
861 | if (!(reader instanceof $Reader))
|
862 | reader = $Reader.create(reader);
|
863 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsRequest();
|
864 | while (reader.pos < end) {
|
865 | var tag = reader.uint32();
|
866 | switch (tag >>> 3) {
|
867 | case 4:
|
868 | message.name = reader.string();
|
869 | break;
|
870 | case 1:
|
871 | message.filter = reader.string();
|
872 | break;
|
873 | case 2:
|
874 | message.pageSize = reader.int32();
|
875 | break;
|
876 | case 3:
|
877 | message.pageToken = reader.string();
|
878 | break;
|
879 | default:
|
880 | reader.skipType(tag & 7);
|
881 | break;
|
882 | }
|
883 | }
|
884 | return message;
|
885 | };
|
886 |
|
887 | /**
|
888 | * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited.
|
889 | * @function decodeDelimited
|
890 | * @memberof google.longrunning.ListOperationsRequest
|
891 | * @static
|
892 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
893 | * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest
|
894 | * @throws {Error} If the payload is not a reader or valid buffer
|
895 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
896 | */
|
897 | ListOperationsRequest.decodeDelimited = function decodeDelimited(reader) {
|
898 | if (!(reader instanceof $Reader))
|
899 | reader = new $Reader(reader);
|
900 | return this.decode(reader, reader.uint32());
|
901 | };
|
902 |
|
903 | /**
|
904 | * Verifies a ListOperationsRequest message.
|
905 | * @function verify
|
906 | * @memberof google.longrunning.ListOperationsRequest
|
907 | * @static
|
908 | * @param {Object.<string,*>} message Plain object to verify
|
909 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
910 | */
|
911 | ListOperationsRequest.verify = function verify(message) {
|
912 | if (typeof message !== "object" || message === null)
|
913 | return "object expected";
|
914 | if (message.name != null && message.hasOwnProperty("name"))
|
915 | if (!$util.isString(message.name))
|
916 | return "name: string expected";
|
917 | if (message.filter != null && message.hasOwnProperty("filter"))
|
918 | if (!$util.isString(message.filter))
|
919 | return "filter: string expected";
|
920 | if (message.pageSize != null && message.hasOwnProperty("pageSize"))
|
921 | if (!$util.isInteger(message.pageSize))
|
922 | return "pageSize: integer expected";
|
923 | if (message.pageToken != null && message.hasOwnProperty("pageToken"))
|
924 | if (!$util.isString(message.pageToken))
|
925 | return "pageToken: string expected";
|
926 | return null;
|
927 | };
|
928 |
|
929 | /**
|
930 | * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types.
|
931 | * @function fromObject
|
932 | * @memberof google.longrunning.ListOperationsRequest
|
933 | * @static
|
934 | * @param {Object.<string,*>} object Plain object
|
935 | * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest
|
936 | */
|
937 | ListOperationsRequest.fromObject = function fromObject(object) {
|
938 | if (object instanceof $root.google.longrunning.ListOperationsRequest)
|
939 | return object;
|
940 | var message = new $root.google.longrunning.ListOperationsRequest();
|
941 | if (object.name != null)
|
942 | message.name = String(object.name);
|
943 | if (object.filter != null)
|
944 | message.filter = String(object.filter);
|
945 | if (object.pageSize != null)
|
946 | message.pageSize = object.pageSize | 0;
|
947 | if (object.pageToken != null)
|
948 | message.pageToken = String(object.pageToken);
|
949 | return message;
|
950 | };
|
951 |
|
952 | /**
|
953 | * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified.
|
954 | * @function toObject
|
955 | * @memberof google.longrunning.ListOperationsRequest
|
956 | * @static
|
957 | * @param {google.longrunning.ListOperationsRequest} message ListOperationsRequest
|
958 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
959 | * @returns {Object.<string,*>} Plain object
|
960 | */
|
961 | ListOperationsRequest.toObject = function toObject(message, options) {
|
962 | if (!options)
|
963 | options = {};
|
964 | var object = {};
|
965 | if (options.defaults) {
|
966 | object.filter = "";
|
967 | object.pageSize = 0;
|
968 | object.pageToken = "";
|
969 | object.name = "";
|
970 | }
|
971 | if (message.filter != null && message.hasOwnProperty("filter"))
|
972 | object.filter = message.filter;
|
973 | if (message.pageSize != null && message.hasOwnProperty("pageSize"))
|
974 | object.pageSize = message.pageSize;
|
975 | if (message.pageToken != null && message.hasOwnProperty("pageToken"))
|
976 | object.pageToken = message.pageToken;
|
977 | if (message.name != null && message.hasOwnProperty("name"))
|
978 | object.name = message.name;
|
979 | return object;
|
980 | };
|
981 |
|
982 | /**
|
983 | * Converts this ListOperationsRequest to JSON.
|
984 | * @function toJSON
|
985 | * @memberof google.longrunning.ListOperationsRequest
|
986 | * @instance
|
987 | * @returns {Object.<string,*>} JSON object
|
988 | */
|
989 | ListOperationsRequest.prototype.toJSON = function toJSON() {
|
990 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
991 | };
|
992 |
|
993 | return ListOperationsRequest;
|
994 | })();
|
995 |
|
996 | longrunning.ListOperationsResponse = (function() {
|
997 |
|
998 | /**
|
999 | * Properties of a ListOperationsResponse.
|
1000 | * @memberof google.longrunning
|
1001 | * @interface IListOperationsResponse
|
1002 | * @property {Array.<google.longrunning.IOperation>|null} [operations] ListOperationsResponse operations
|
1003 | * @property {string|null} [nextPageToken] ListOperationsResponse nextPageToken
|
1004 | */
|
1005 |
|
1006 | /**
|
1007 | * Constructs a new ListOperationsResponse.
|
1008 | * @memberof google.longrunning
|
1009 | * @classdesc Represents a ListOperationsResponse.
|
1010 | * @implements IListOperationsResponse
|
1011 | * @constructor
|
1012 | * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set
|
1013 | */
|
1014 | function ListOperationsResponse(properties) {
|
1015 | this.operations = [];
|
1016 | if (properties)
|
1017 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
1018 | if (properties[keys[i]] != null)
|
1019 | this[keys[i]] = properties[keys[i]];
|
1020 | }
|
1021 |
|
1022 | /**
|
1023 | * ListOperationsResponse operations.
|
1024 | * @member {Array.<google.longrunning.IOperation>} operations
|
1025 | * @memberof google.longrunning.ListOperationsResponse
|
1026 | * @instance
|
1027 | */
|
1028 | ListOperationsResponse.prototype.operations = $util.emptyArray;
|
1029 |
|
1030 | /**
|
1031 | * ListOperationsResponse nextPageToken.
|
1032 | * @member {string} nextPageToken
|
1033 | * @memberof google.longrunning.ListOperationsResponse
|
1034 | * @instance
|
1035 | */
|
1036 | ListOperationsResponse.prototype.nextPageToken = "";
|
1037 |
|
1038 | /**
|
1039 | * Creates a new ListOperationsResponse instance using the specified properties.
|
1040 | * @function create
|
1041 | * @memberof google.longrunning.ListOperationsResponse
|
1042 | * @static
|
1043 | * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set
|
1044 | * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse instance
|
1045 | */
|
1046 | ListOperationsResponse.create = function create(properties) {
|
1047 | return new ListOperationsResponse(properties);
|
1048 | };
|
1049 |
|
1050 | /**
|
1051 | * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages.
|
1052 | * @function encode
|
1053 | * @memberof google.longrunning.ListOperationsResponse
|
1054 | * @static
|
1055 | * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode
|
1056 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
1057 | * @returns {$protobuf.Writer} Writer
|
1058 | */
|
1059 | ListOperationsResponse.encode = function encode(message, writer) {
|
1060 | if (!writer)
|
1061 | writer = $Writer.create();
|
1062 | if (message.operations != null && message.operations.length)
|
1063 | for (var i = 0; i < message.operations.length; ++i)
|
1064 | $root.google.longrunning.Operation.encode(message.operations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
1065 | if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken"))
|
1066 | writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken);
|
1067 | return writer;
|
1068 | };
|
1069 |
|
1070 | /**
|
1071 | * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages.
|
1072 | * @function encodeDelimited
|
1073 | * @memberof google.longrunning.ListOperationsResponse
|
1074 | * @static
|
1075 | * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode
|
1076 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
1077 | * @returns {$protobuf.Writer} Writer
|
1078 | */
|
1079 | ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) {
|
1080 | return this.encode(message, writer).ldelim();
|
1081 | };
|
1082 |
|
1083 | /**
|
1084 | * Decodes a ListOperationsResponse message from the specified reader or buffer.
|
1085 | * @function decode
|
1086 | * @memberof google.longrunning.ListOperationsResponse
|
1087 | * @static
|
1088 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
1089 | * @param {number} [length] Message length if known beforehand
|
1090 | * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse
|
1091 | * @throws {Error} If the payload is not a reader or valid buffer
|
1092 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
1093 | */
|
1094 | ListOperationsResponse.decode = function decode(reader, length) {
|
1095 | if (!(reader instanceof $Reader))
|
1096 | reader = $Reader.create(reader);
|
1097 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsResponse();
|
1098 | while (reader.pos < end) {
|
1099 | var tag = reader.uint32();
|
1100 | switch (tag >>> 3) {
|
1101 | case 1:
|
1102 | if (!(message.operations && message.operations.length))
|
1103 | message.operations = [];
|
1104 | message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32()));
|
1105 | break;
|
1106 | case 2:
|
1107 | message.nextPageToken = reader.string();
|
1108 | break;
|
1109 | default:
|
1110 | reader.skipType(tag & 7);
|
1111 | break;
|
1112 | }
|
1113 | }
|
1114 | return message;
|
1115 | };
|
1116 |
|
1117 | /**
|
1118 | * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited.
|
1119 | * @function decodeDelimited
|
1120 | * @memberof google.longrunning.ListOperationsResponse
|
1121 | * @static
|
1122 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
1123 | * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse
|
1124 | * @throws {Error} If the payload is not a reader or valid buffer
|
1125 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
1126 | */
|
1127 | ListOperationsResponse.decodeDelimited = function decodeDelimited(reader) {
|
1128 | if (!(reader instanceof $Reader))
|
1129 | reader = new $Reader(reader);
|
1130 | return this.decode(reader, reader.uint32());
|
1131 | };
|
1132 |
|
1133 | /**
|
1134 | * Verifies a ListOperationsResponse message.
|
1135 | * @function verify
|
1136 | * @memberof google.longrunning.ListOperationsResponse
|
1137 | * @static
|
1138 | * @param {Object.<string,*>} message Plain object to verify
|
1139 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
1140 | */
|
1141 | ListOperationsResponse.verify = function verify(message) {
|
1142 | if (typeof message !== "object" || message === null)
|
1143 | return "object expected";
|
1144 | if (message.operations != null && message.hasOwnProperty("operations")) {
|
1145 | if (!Array.isArray(message.operations))
|
1146 | return "operations: array expected";
|
1147 | for (var i = 0; i < message.operations.length; ++i) {
|
1148 | var error = $root.google.longrunning.Operation.verify(message.operations[i]);
|
1149 | if (error)
|
1150 | return "operations." + error;
|
1151 | }
|
1152 | }
|
1153 | if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
|
1154 | if (!$util.isString(message.nextPageToken))
|
1155 | return "nextPageToken: string expected";
|
1156 | return null;
|
1157 | };
|
1158 |
|
1159 | /**
|
1160 | * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types.
|
1161 | * @function fromObject
|
1162 | * @memberof google.longrunning.ListOperationsResponse
|
1163 | * @static
|
1164 | * @param {Object.<string,*>} object Plain object
|
1165 | * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse
|
1166 | */
|
1167 | ListOperationsResponse.fromObject = function fromObject(object) {
|
1168 | if (object instanceof $root.google.longrunning.ListOperationsResponse)
|
1169 | return object;
|
1170 | var message = new $root.google.longrunning.ListOperationsResponse();
|
1171 | if (object.operations) {
|
1172 | if (!Array.isArray(object.operations))
|
1173 | throw TypeError(".google.longrunning.ListOperationsResponse.operations: array expected");
|
1174 | message.operations = [];
|
1175 | for (var i = 0; i < object.operations.length; ++i) {
|
1176 | if (typeof object.operations[i] !== "object")
|
1177 | throw TypeError(".google.longrunning.ListOperationsResponse.operations: object expected");
|
1178 | message.operations[i] = $root.google.longrunning.Operation.fromObject(object.operations[i]);
|
1179 | }
|
1180 | }
|
1181 | if (object.nextPageToken != null)
|
1182 | message.nextPageToken = String(object.nextPageToken);
|
1183 | return message;
|
1184 | };
|
1185 |
|
1186 | /**
|
1187 | * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified.
|
1188 | * @function toObject
|
1189 | * @memberof google.longrunning.ListOperationsResponse
|
1190 | * @static
|
1191 | * @param {google.longrunning.ListOperationsResponse} message ListOperationsResponse
|
1192 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
1193 | * @returns {Object.<string,*>} Plain object
|
1194 | */
|
1195 | ListOperationsResponse.toObject = function toObject(message, options) {
|
1196 | if (!options)
|
1197 | options = {};
|
1198 | var object = {};
|
1199 | if (options.arrays || options.defaults)
|
1200 | object.operations = [];
|
1201 | if (options.defaults)
|
1202 | object.nextPageToken = "";
|
1203 | if (message.operations && message.operations.length) {
|
1204 | object.operations = [];
|
1205 | for (var j = 0; j < message.operations.length; ++j)
|
1206 | object.operations[j] = $root.google.longrunning.Operation.toObject(message.operations[j], options);
|
1207 | }
|
1208 | if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
|
1209 | object.nextPageToken = message.nextPageToken;
|
1210 | return object;
|
1211 | };
|
1212 |
|
1213 | /**
|
1214 | * Converts this ListOperationsResponse to JSON.
|
1215 | * @function toJSON
|
1216 | * @memberof google.longrunning.ListOperationsResponse
|
1217 | * @instance
|
1218 | * @returns {Object.<string,*>} JSON object
|
1219 | */
|
1220 | ListOperationsResponse.prototype.toJSON = function toJSON() {
|
1221 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
1222 | };
|
1223 |
|
1224 | return ListOperationsResponse;
|
1225 | })();
|
1226 |
|
1227 | longrunning.CancelOperationRequest = (function() {
|
1228 |
|
1229 | /**
|
1230 | * Properties of a CancelOperationRequest.
|
1231 | * @memberof google.longrunning
|
1232 | * @interface ICancelOperationRequest
|
1233 | * @property {string|null} [name] CancelOperationRequest name
|
1234 | */
|
1235 |
|
1236 | /**
|
1237 | * Constructs a new CancelOperationRequest.
|
1238 | * @memberof google.longrunning
|
1239 | * @classdesc Represents a CancelOperationRequest.
|
1240 | * @implements ICancelOperationRequest
|
1241 | * @constructor
|
1242 | * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set
|
1243 | */
|
1244 | function CancelOperationRequest(properties) {
|
1245 | if (properties)
|
1246 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
1247 | if (properties[keys[i]] != null)
|
1248 | this[keys[i]] = properties[keys[i]];
|
1249 | }
|
1250 |
|
1251 | /**
|
1252 | * CancelOperationRequest name.
|
1253 | * @member {string} name
|
1254 | * @memberof google.longrunning.CancelOperationRequest
|
1255 | * @instance
|
1256 | */
|
1257 | CancelOperationRequest.prototype.name = "";
|
1258 |
|
1259 | /**
|
1260 | * Creates a new CancelOperationRequest instance using the specified properties.
|
1261 | * @function create
|
1262 | * @memberof google.longrunning.CancelOperationRequest
|
1263 | * @static
|
1264 | * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set
|
1265 | * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest instance
|
1266 | */
|
1267 | CancelOperationRequest.create = function create(properties) {
|
1268 | return new CancelOperationRequest(properties);
|
1269 | };
|
1270 |
|
1271 | /**
|
1272 | * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages.
|
1273 | * @function encode
|
1274 | * @memberof google.longrunning.CancelOperationRequest
|
1275 | * @static
|
1276 | * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode
|
1277 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
1278 | * @returns {$protobuf.Writer} Writer
|
1279 | */
|
1280 | CancelOperationRequest.encode = function encode(message, writer) {
|
1281 | if (!writer)
|
1282 | writer = $Writer.create();
|
1283 | if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
1284 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
1285 | return writer;
|
1286 | };
|
1287 |
|
1288 | /**
|
1289 | * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages.
|
1290 | * @function encodeDelimited
|
1291 | * @memberof google.longrunning.CancelOperationRequest
|
1292 | * @static
|
1293 | * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode
|
1294 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
1295 | * @returns {$protobuf.Writer} Writer
|
1296 | */
|
1297 | CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
1298 | return this.encode(message, writer).ldelim();
|
1299 | };
|
1300 |
|
1301 | /**
|
1302 | * Decodes a CancelOperationRequest message from the specified reader or buffer.
|
1303 | * @function decode
|
1304 | * @memberof google.longrunning.CancelOperationRequest
|
1305 | * @static
|
1306 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
1307 | * @param {number} [length] Message length if known beforehand
|
1308 | * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest
|
1309 | * @throws {Error} If the payload is not a reader or valid buffer
|
1310 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
1311 | */
|
1312 | CancelOperationRequest.decode = function decode(reader, length) {
|
1313 | if (!(reader instanceof $Reader))
|
1314 | reader = $Reader.create(reader);
|
1315 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.CancelOperationRequest();
|
1316 | while (reader.pos < end) {
|
1317 | var tag = reader.uint32();
|
1318 | switch (tag >>> 3) {
|
1319 | case 1:
|
1320 | message.name = reader.string();
|
1321 | break;
|
1322 | default:
|
1323 | reader.skipType(tag & 7);
|
1324 | break;
|
1325 | }
|
1326 | }
|
1327 | return message;
|
1328 | };
|
1329 |
|
1330 | /**
|
1331 | * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited.
|
1332 | * @function decodeDelimited
|
1333 | * @memberof google.longrunning.CancelOperationRequest
|
1334 | * @static
|
1335 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
1336 | * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest
|
1337 | * @throws {Error} If the payload is not a reader or valid buffer
|
1338 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
1339 | */
|
1340 | CancelOperationRequest.decodeDelimited = function decodeDelimited(reader) {
|
1341 | if (!(reader instanceof $Reader))
|
1342 | reader = new $Reader(reader);
|
1343 | return this.decode(reader, reader.uint32());
|
1344 | };
|
1345 |
|
1346 | /**
|
1347 | * Verifies a CancelOperationRequest message.
|
1348 | * @function verify
|
1349 | * @memberof google.longrunning.CancelOperationRequest
|
1350 | * @static
|
1351 | * @param {Object.<string,*>} message Plain object to verify
|
1352 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
1353 | */
|
1354 | CancelOperationRequest.verify = function verify(message) {
|
1355 | if (typeof message !== "object" || message === null)
|
1356 | return "object expected";
|
1357 | if (message.name != null && message.hasOwnProperty("name"))
|
1358 | if (!$util.isString(message.name))
|
1359 | return "name: string expected";
|
1360 | return null;
|
1361 | };
|
1362 |
|
1363 | /**
|
1364 | * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types.
|
1365 | * @function fromObject
|
1366 | * @memberof google.longrunning.CancelOperationRequest
|
1367 | * @static
|
1368 | * @param {Object.<string,*>} object Plain object
|
1369 | * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest
|
1370 | */
|
1371 | CancelOperationRequest.fromObject = function fromObject(object) {
|
1372 | if (object instanceof $root.google.longrunning.CancelOperationRequest)
|
1373 | return object;
|
1374 | var message = new $root.google.longrunning.CancelOperationRequest();
|
1375 | if (object.name != null)
|
1376 | message.name = String(object.name);
|
1377 | return message;
|
1378 | };
|
1379 |
|
1380 | /**
|
1381 | * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified.
|
1382 | * @function toObject
|
1383 | * @memberof google.longrunning.CancelOperationRequest
|
1384 | * @static
|
1385 | * @param {google.longrunning.CancelOperationRequest} message CancelOperationRequest
|
1386 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
1387 | * @returns {Object.<string,*>} Plain object
|
1388 | */
|
1389 | CancelOperationRequest.toObject = function toObject(message, options) {
|
1390 | if (!options)
|
1391 | options = {};
|
1392 | var object = {};
|
1393 | if (options.defaults)
|
1394 | object.name = "";
|
1395 | if (message.name != null && message.hasOwnProperty("name"))
|
1396 | object.name = message.name;
|
1397 | return object;
|
1398 | };
|
1399 |
|
1400 | /**
|
1401 | * Converts this CancelOperationRequest to JSON.
|
1402 | * @function toJSON
|
1403 | * @memberof google.longrunning.CancelOperationRequest
|
1404 | * @instance
|
1405 | * @returns {Object.<string,*>} JSON object
|
1406 | */
|
1407 | CancelOperationRequest.prototype.toJSON = function toJSON() {
|
1408 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
1409 | };
|
1410 |
|
1411 | return CancelOperationRequest;
|
1412 | })();
|
1413 |
|
1414 | longrunning.DeleteOperationRequest = (function() {
|
1415 |
|
1416 | /**
|
1417 | * Properties of a DeleteOperationRequest.
|
1418 | * @memberof google.longrunning
|
1419 | * @interface IDeleteOperationRequest
|
1420 | * @property {string|null} [name] DeleteOperationRequest name
|
1421 | */
|
1422 |
|
1423 | /**
|
1424 | * Constructs a new DeleteOperationRequest.
|
1425 | * @memberof google.longrunning
|
1426 | * @classdesc Represents a DeleteOperationRequest.
|
1427 | * @implements IDeleteOperationRequest
|
1428 | * @constructor
|
1429 | * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set
|
1430 | */
|
1431 | function DeleteOperationRequest(properties) {
|
1432 | if (properties)
|
1433 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
1434 | if (properties[keys[i]] != null)
|
1435 | this[keys[i]] = properties[keys[i]];
|
1436 | }
|
1437 |
|
1438 | /**
|
1439 | * DeleteOperationRequest name.
|
1440 | * @member {string} name
|
1441 | * @memberof google.longrunning.DeleteOperationRequest
|
1442 | * @instance
|
1443 | */
|
1444 | DeleteOperationRequest.prototype.name = "";
|
1445 |
|
1446 | /**
|
1447 | * Creates a new DeleteOperationRequest instance using the specified properties.
|
1448 | * @function create
|
1449 | * @memberof google.longrunning.DeleteOperationRequest
|
1450 | * @static
|
1451 | * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set
|
1452 | * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest instance
|
1453 | */
|
1454 | DeleteOperationRequest.create = function create(properties) {
|
1455 | return new DeleteOperationRequest(properties);
|
1456 | };
|
1457 |
|
1458 | /**
|
1459 | * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages.
|
1460 | * @function encode
|
1461 | * @memberof google.longrunning.DeleteOperationRequest
|
1462 | * @static
|
1463 | * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode
|
1464 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
1465 | * @returns {$protobuf.Writer} Writer
|
1466 | */
|
1467 | DeleteOperationRequest.encode = function encode(message, writer) {
|
1468 | if (!writer)
|
1469 | writer = $Writer.create();
|
1470 | if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
1471 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
1472 | return writer;
|
1473 | };
|
1474 |
|
1475 | /**
|
1476 | * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages.
|
1477 | * @function encodeDelimited
|
1478 | * @memberof google.longrunning.DeleteOperationRequest
|
1479 | * @static
|
1480 | * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode
|
1481 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
1482 | * @returns {$protobuf.Writer} Writer
|
1483 | */
|
1484 | DeleteOperationRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
1485 | return this.encode(message, writer).ldelim();
|
1486 | };
|
1487 |
|
1488 | /**
|
1489 | * Decodes a DeleteOperationRequest message from the specified reader or buffer.
|
1490 | * @function decode
|
1491 | * @memberof google.longrunning.DeleteOperationRequest
|
1492 | * @static
|
1493 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
1494 | * @param {number} [length] Message length if known beforehand
|
1495 | * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest
|
1496 | * @throws {Error} If the payload is not a reader or valid buffer
|
1497 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
1498 | */
|
1499 | DeleteOperationRequest.decode = function decode(reader, length) {
|
1500 | if (!(reader instanceof $Reader))
|
1501 | reader = $Reader.create(reader);
|
1502 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.DeleteOperationRequest();
|
1503 | while (reader.pos < end) {
|
1504 | var tag = reader.uint32();
|
1505 | switch (tag >>> 3) {
|
1506 | case 1:
|
1507 | message.name = reader.string();
|
1508 | break;
|
1509 | default:
|
1510 | reader.skipType(tag & 7);
|
1511 | break;
|
1512 | }
|
1513 | }
|
1514 | return message;
|
1515 | };
|
1516 |
|
1517 | /**
|
1518 | * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited.
|
1519 | * @function decodeDelimited
|
1520 | * @memberof google.longrunning.DeleteOperationRequest
|
1521 | * @static
|
1522 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
1523 | * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest
|
1524 | * @throws {Error} If the payload is not a reader or valid buffer
|
1525 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
1526 | */
|
1527 | DeleteOperationRequest.decodeDelimited = function decodeDelimited(reader) {
|
1528 | if (!(reader instanceof $Reader))
|
1529 | reader = new $Reader(reader);
|
1530 | return this.decode(reader, reader.uint32());
|
1531 | };
|
1532 |
|
1533 | /**
|
1534 | * Verifies a DeleteOperationRequest message.
|
1535 | * @function verify
|
1536 | * @memberof google.longrunning.DeleteOperationRequest
|
1537 | * @static
|
1538 | * @param {Object.<string,*>} message Plain object to verify
|
1539 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
1540 | */
|
1541 | DeleteOperationRequest.verify = function verify(message) {
|
1542 | if (typeof message !== "object" || message === null)
|
1543 | return "object expected";
|
1544 | if (message.name != null && message.hasOwnProperty("name"))
|
1545 | if (!$util.isString(message.name))
|
1546 | return "name: string expected";
|
1547 | return null;
|
1548 | };
|
1549 |
|
1550 | /**
|
1551 | * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types.
|
1552 | * @function fromObject
|
1553 | * @memberof google.longrunning.DeleteOperationRequest
|
1554 | * @static
|
1555 | * @param {Object.<string,*>} object Plain object
|
1556 | * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest
|
1557 | */
|
1558 | DeleteOperationRequest.fromObject = function fromObject(object) {
|
1559 | if (object instanceof $root.google.longrunning.DeleteOperationRequest)
|
1560 | return object;
|
1561 | var message = new $root.google.longrunning.DeleteOperationRequest();
|
1562 | if (object.name != null)
|
1563 | message.name = String(object.name);
|
1564 | return message;
|
1565 | };
|
1566 |
|
1567 | /**
|
1568 | * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified.
|
1569 | * @function toObject
|
1570 | * @memberof google.longrunning.DeleteOperationRequest
|
1571 | * @static
|
1572 | * @param {google.longrunning.DeleteOperationRequest} message DeleteOperationRequest
|
1573 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
1574 | * @returns {Object.<string,*>} Plain object
|
1575 | */
|
1576 | DeleteOperationRequest.toObject = function toObject(message, options) {
|
1577 | if (!options)
|
1578 | options = {};
|
1579 | var object = {};
|
1580 | if (options.defaults)
|
1581 | object.name = "";
|
1582 | if (message.name != null && message.hasOwnProperty("name"))
|
1583 | object.name = message.name;
|
1584 | return object;
|
1585 | };
|
1586 |
|
1587 | /**
|
1588 | * Converts this DeleteOperationRequest to JSON.
|
1589 | * @function toJSON
|
1590 | * @memberof google.longrunning.DeleteOperationRequest
|
1591 | * @instance
|
1592 | * @returns {Object.<string,*>} JSON object
|
1593 | */
|
1594 | DeleteOperationRequest.prototype.toJSON = function toJSON() {
|
1595 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
1596 | };
|
1597 |
|
1598 | return DeleteOperationRequest;
|
1599 | })();
|
1600 |
|
1601 | longrunning.WaitOperationRequest = (function() {
|
1602 |
|
1603 | /**
|
1604 | * Properties of a WaitOperationRequest.
|
1605 | * @memberof google.longrunning
|
1606 | * @interface IWaitOperationRequest
|
1607 | * @property {string|null} [name] WaitOperationRequest name
|
1608 | * @property {google.protobuf.IDuration|null} [timeout] WaitOperationRequest timeout
|
1609 | */
|
1610 |
|
1611 | /**
|
1612 | * Constructs a new WaitOperationRequest.
|
1613 | * @memberof google.longrunning
|
1614 | * @classdesc Represents a WaitOperationRequest.
|
1615 | * @implements IWaitOperationRequest
|
1616 | * @constructor
|
1617 | * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set
|
1618 | */
|
1619 | function WaitOperationRequest(properties) {
|
1620 | if (properties)
|
1621 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
1622 | if (properties[keys[i]] != null)
|
1623 | this[keys[i]] = properties[keys[i]];
|
1624 | }
|
1625 |
|
1626 | /**
|
1627 | * WaitOperationRequest name.
|
1628 | * @member {string} name
|
1629 | * @memberof google.longrunning.WaitOperationRequest
|
1630 | * @instance
|
1631 | */
|
1632 | WaitOperationRequest.prototype.name = "";
|
1633 |
|
1634 | /**
|
1635 | * WaitOperationRequest timeout.
|
1636 | * @member {google.protobuf.IDuration|null|undefined} timeout
|
1637 | * @memberof google.longrunning.WaitOperationRequest
|
1638 | * @instance
|
1639 | */
|
1640 | WaitOperationRequest.prototype.timeout = null;
|
1641 |
|
1642 | /**
|
1643 | * Creates a new WaitOperationRequest instance using the specified properties.
|
1644 | * @function create
|
1645 | * @memberof google.longrunning.WaitOperationRequest
|
1646 | * @static
|
1647 | * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set
|
1648 | * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest instance
|
1649 | */
|
1650 | WaitOperationRequest.create = function create(properties) {
|
1651 | return new WaitOperationRequest(properties);
|
1652 | };
|
1653 |
|
1654 | /**
|
1655 | * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages.
|
1656 | * @function encode
|
1657 | * @memberof google.longrunning.WaitOperationRequest
|
1658 | * @static
|
1659 | * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode
|
1660 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
1661 | * @returns {$protobuf.Writer} Writer
|
1662 | */
|
1663 | WaitOperationRequest.encode = function encode(message, writer) {
|
1664 | if (!writer)
|
1665 | writer = $Writer.create();
|
1666 | if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
1667 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
1668 | if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout"))
|
1669 | $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
1670 | return writer;
|
1671 | };
|
1672 |
|
1673 | /**
|
1674 | * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages.
|
1675 | * @function encodeDelimited
|
1676 | * @memberof google.longrunning.WaitOperationRequest
|
1677 | * @static
|
1678 | * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode
|
1679 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
1680 | * @returns {$protobuf.Writer} Writer
|
1681 | */
|
1682 | WaitOperationRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
1683 | return this.encode(message, writer).ldelim();
|
1684 | };
|
1685 |
|
1686 | /**
|
1687 | * Decodes a WaitOperationRequest message from the specified reader or buffer.
|
1688 | * @function decode
|
1689 | * @memberof google.longrunning.WaitOperationRequest
|
1690 | * @static
|
1691 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
1692 | * @param {number} [length] Message length if known beforehand
|
1693 | * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest
|
1694 | * @throws {Error} If the payload is not a reader or valid buffer
|
1695 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
1696 | */
|
1697 | WaitOperationRequest.decode = function decode(reader, length) {
|
1698 | if (!(reader instanceof $Reader))
|
1699 | reader = $Reader.create(reader);
|
1700 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.WaitOperationRequest();
|
1701 | while (reader.pos < end) {
|
1702 | var tag = reader.uint32();
|
1703 | switch (tag >>> 3) {
|
1704 | case 1:
|
1705 | message.name = reader.string();
|
1706 | break;
|
1707 | case 2:
|
1708 | message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32());
|
1709 | break;
|
1710 | default:
|
1711 | reader.skipType(tag & 7);
|
1712 | break;
|
1713 | }
|
1714 | }
|
1715 | return message;
|
1716 | };
|
1717 |
|
1718 | /**
|
1719 | * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited.
|
1720 | * @function decodeDelimited
|
1721 | * @memberof google.longrunning.WaitOperationRequest
|
1722 | * @static
|
1723 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
1724 | * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest
|
1725 | * @throws {Error} If the payload is not a reader or valid buffer
|
1726 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
1727 | */
|
1728 | WaitOperationRequest.decodeDelimited = function decodeDelimited(reader) {
|
1729 | if (!(reader instanceof $Reader))
|
1730 | reader = new $Reader(reader);
|
1731 | return this.decode(reader, reader.uint32());
|
1732 | };
|
1733 |
|
1734 | /**
|
1735 | * Verifies a WaitOperationRequest message.
|
1736 | * @function verify
|
1737 | * @memberof google.longrunning.WaitOperationRequest
|
1738 | * @static
|
1739 | * @param {Object.<string,*>} message Plain object to verify
|
1740 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
1741 | */
|
1742 | WaitOperationRequest.verify = function verify(message) {
|
1743 | if (typeof message !== "object" || message === null)
|
1744 | return "object expected";
|
1745 | if (message.name != null && message.hasOwnProperty("name"))
|
1746 | if (!$util.isString(message.name))
|
1747 | return "name: string expected";
|
1748 | if (message.timeout != null && message.hasOwnProperty("timeout")) {
|
1749 | var error = $root.google.protobuf.Duration.verify(message.timeout);
|
1750 | if (error)
|
1751 | return "timeout." + error;
|
1752 | }
|
1753 | return null;
|
1754 | };
|
1755 |
|
1756 | /**
|
1757 | * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types.
|
1758 | * @function fromObject
|
1759 | * @memberof google.longrunning.WaitOperationRequest
|
1760 | * @static
|
1761 | * @param {Object.<string,*>} object Plain object
|
1762 | * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest
|
1763 | */
|
1764 | WaitOperationRequest.fromObject = function fromObject(object) {
|
1765 | if (object instanceof $root.google.longrunning.WaitOperationRequest)
|
1766 | return object;
|
1767 | var message = new $root.google.longrunning.WaitOperationRequest();
|
1768 | if (object.name != null)
|
1769 | message.name = String(object.name);
|
1770 | if (object.timeout != null) {
|
1771 | if (typeof object.timeout !== "object")
|
1772 | throw TypeError(".google.longrunning.WaitOperationRequest.timeout: object expected");
|
1773 | message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout);
|
1774 | }
|
1775 | return message;
|
1776 | };
|
1777 |
|
1778 | /**
|
1779 | * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified.
|
1780 | * @function toObject
|
1781 | * @memberof google.longrunning.WaitOperationRequest
|
1782 | * @static
|
1783 | * @param {google.longrunning.WaitOperationRequest} message WaitOperationRequest
|
1784 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
1785 | * @returns {Object.<string,*>} Plain object
|
1786 | */
|
1787 | WaitOperationRequest.toObject = function toObject(message, options) {
|
1788 | if (!options)
|
1789 | options = {};
|
1790 | var object = {};
|
1791 | if (options.defaults) {
|
1792 | object.name = "";
|
1793 | object.timeout = null;
|
1794 | }
|
1795 | if (message.name != null && message.hasOwnProperty("name"))
|
1796 | object.name = message.name;
|
1797 | if (message.timeout != null && message.hasOwnProperty("timeout"))
|
1798 | object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options);
|
1799 | return object;
|
1800 | };
|
1801 |
|
1802 | /**
|
1803 | * Converts this WaitOperationRequest to JSON.
|
1804 | * @function toJSON
|
1805 | * @memberof google.longrunning.WaitOperationRequest
|
1806 | * @instance
|
1807 | * @returns {Object.<string,*>} JSON object
|
1808 | */
|
1809 | WaitOperationRequest.prototype.toJSON = function toJSON() {
|
1810 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
1811 | };
|
1812 |
|
1813 | return WaitOperationRequest;
|
1814 | })();
|
1815 |
|
1816 | longrunning.OperationInfo = (function() {
|
1817 |
|
1818 | /**
|
1819 | * Properties of an OperationInfo.
|
1820 | * @memberof google.longrunning
|
1821 | * @interface IOperationInfo
|
1822 | * @property {string|null} [responseType] OperationInfo responseType
|
1823 | * @property {string|null} [metadataType] OperationInfo metadataType
|
1824 | */
|
1825 |
|
1826 | /**
|
1827 | * Constructs a new OperationInfo.
|
1828 | * @memberof google.longrunning
|
1829 | * @classdesc Represents an OperationInfo.
|
1830 | * @implements IOperationInfo
|
1831 | * @constructor
|
1832 | * @param {google.longrunning.IOperationInfo=} [properties] Properties to set
|
1833 | */
|
1834 | function OperationInfo(properties) {
|
1835 | if (properties)
|
1836 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
1837 | if (properties[keys[i]] != null)
|
1838 | this[keys[i]] = properties[keys[i]];
|
1839 | }
|
1840 |
|
1841 | /**
|
1842 | * OperationInfo responseType.
|
1843 | * @member {string} responseType
|
1844 | * @memberof google.longrunning.OperationInfo
|
1845 | * @instance
|
1846 | */
|
1847 | OperationInfo.prototype.responseType = "";
|
1848 |
|
1849 | /**
|
1850 | * OperationInfo metadataType.
|
1851 | * @member {string} metadataType
|
1852 | * @memberof google.longrunning.OperationInfo
|
1853 | * @instance
|
1854 | */
|
1855 | OperationInfo.prototype.metadataType = "";
|
1856 |
|
1857 | /**
|
1858 | * Creates a new OperationInfo instance using the specified properties.
|
1859 | * @function create
|
1860 | * @memberof google.longrunning.OperationInfo
|
1861 | * @static
|
1862 | * @param {google.longrunning.IOperationInfo=} [properties] Properties to set
|
1863 | * @returns {google.longrunning.OperationInfo} OperationInfo instance
|
1864 | */
|
1865 | OperationInfo.create = function create(properties) {
|
1866 | return new OperationInfo(properties);
|
1867 | };
|
1868 |
|
1869 | /**
|
1870 | * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages.
|
1871 | * @function encode
|
1872 | * @memberof google.longrunning.OperationInfo
|
1873 | * @static
|
1874 | * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode
|
1875 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
1876 | * @returns {$protobuf.Writer} Writer
|
1877 | */
|
1878 | OperationInfo.encode = function encode(message, writer) {
|
1879 | if (!writer)
|
1880 | writer = $Writer.create();
|
1881 | if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType"))
|
1882 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseType);
|
1883 | if (message.metadataType != null && Object.hasOwnProperty.call(message, "metadataType"))
|
1884 | writer.uint32(/* id 2, wireType 2 =*/18).string(message.metadataType);
|
1885 | return writer;
|
1886 | };
|
1887 |
|
1888 | /**
|
1889 | * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages.
|
1890 | * @function encodeDelimited
|
1891 | * @memberof google.longrunning.OperationInfo
|
1892 | * @static
|
1893 | * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode
|
1894 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
1895 | * @returns {$protobuf.Writer} Writer
|
1896 | */
|
1897 | OperationInfo.encodeDelimited = function encodeDelimited(message, writer) {
|
1898 | return this.encode(message, writer).ldelim();
|
1899 | };
|
1900 |
|
1901 | /**
|
1902 | * Decodes an OperationInfo message from the specified reader or buffer.
|
1903 | * @function decode
|
1904 | * @memberof google.longrunning.OperationInfo
|
1905 | * @static
|
1906 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
1907 | * @param {number} [length] Message length if known beforehand
|
1908 | * @returns {google.longrunning.OperationInfo} OperationInfo
|
1909 | * @throws {Error} If the payload is not a reader or valid buffer
|
1910 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
1911 | */
|
1912 | OperationInfo.decode = function decode(reader, length) {
|
1913 | if (!(reader instanceof $Reader))
|
1914 | reader = $Reader.create(reader);
|
1915 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.OperationInfo();
|
1916 | while (reader.pos < end) {
|
1917 | var tag = reader.uint32();
|
1918 | switch (tag >>> 3) {
|
1919 | case 1:
|
1920 | message.responseType = reader.string();
|
1921 | break;
|
1922 | case 2:
|
1923 | message.metadataType = reader.string();
|
1924 | break;
|
1925 | default:
|
1926 | reader.skipType(tag & 7);
|
1927 | break;
|
1928 | }
|
1929 | }
|
1930 | return message;
|
1931 | };
|
1932 |
|
1933 | /**
|
1934 | * Decodes an OperationInfo message from the specified reader or buffer, length delimited.
|
1935 | * @function decodeDelimited
|
1936 | * @memberof google.longrunning.OperationInfo
|
1937 | * @static
|
1938 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
1939 | * @returns {google.longrunning.OperationInfo} OperationInfo
|
1940 | * @throws {Error} If the payload is not a reader or valid buffer
|
1941 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
1942 | */
|
1943 | OperationInfo.decodeDelimited = function decodeDelimited(reader) {
|
1944 | if (!(reader instanceof $Reader))
|
1945 | reader = new $Reader(reader);
|
1946 | return this.decode(reader, reader.uint32());
|
1947 | };
|
1948 |
|
1949 | /**
|
1950 | * Verifies an OperationInfo message.
|
1951 | * @function verify
|
1952 | * @memberof google.longrunning.OperationInfo
|
1953 | * @static
|
1954 | * @param {Object.<string,*>} message Plain object to verify
|
1955 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
1956 | */
|
1957 | OperationInfo.verify = function verify(message) {
|
1958 | if (typeof message !== "object" || message === null)
|
1959 | return "object expected";
|
1960 | if (message.responseType != null && message.hasOwnProperty("responseType"))
|
1961 | if (!$util.isString(message.responseType))
|
1962 | return "responseType: string expected";
|
1963 | if (message.metadataType != null && message.hasOwnProperty("metadataType"))
|
1964 | if (!$util.isString(message.metadataType))
|
1965 | return "metadataType: string expected";
|
1966 | return null;
|
1967 | };
|
1968 |
|
1969 | /**
|
1970 | * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types.
|
1971 | * @function fromObject
|
1972 | * @memberof google.longrunning.OperationInfo
|
1973 | * @static
|
1974 | * @param {Object.<string,*>} object Plain object
|
1975 | * @returns {google.longrunning.OperationInfo} OperationInfo
|
1976 | */
|
1977 | OperationInfo.fromObject = function fromObject(object) {
|
1978 | if (object instanceof $root.google.longrunning.OperationInfo)
|
1979 | return object;
|
1980 | var message = new $root.google.longrunning.OperationInfo();
|
1981 | if (object.responseType != null)
|
1982 | message.responseType = String(object.responseType);
|
1983 | if (object.metadataType != null)
|
1984 | message.metadataType = String(object.metadataType);
|
1985 | return message;
|
1986 | };
|
1987 |
|
1988 | /**
|
1989 | * Creates a plain object from an OperationInfo message. Also converts values to other types if specified.
|
1990 | * @function toObject
|
1991 | * @memberof google.longrunning.OperationInfo
|
1992 | * @static
|
1993 | * @param {google.longrunning.OperationInfo} message OperationInfo
|
1994 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
1995 | * @returns {Object.<string,*>} Plain object
|
1996 | */
|
1997 | OperationInfo.toObject = function toObject(message, options) {
|
1998 | if (!options)
|
1999 | options = {};
|
2000 | var object = {};
|
2001 | if (options.defaults) {
|
2002 | object.responseType = "";
|
2003 | object.metadataType = "";
|
2004 | }
|
2005 | if (message.responseType != null && message.hasOwnProperty("responseType"))
|
2006 | object.responseType = message.responseType;
|
2007 | if (message.metadataType != null && message.hasOwnProperty("metadataType"))
|
2008 | object.metadataType = message.metadataType;
|
2009 | return object;
|
2010 | };
|
2011 |
|
2012 | /**
|
2013 | * Converts this OperationInfo to JSON.
|
2014 | * @function toJSON
|
2015 | * @memberof google.longrunning.OperationInfo
|
2016 | * @instance
|
2017 | * @returns {Object.<string,*>} JSON object
|
2018 | */
|
2019 | OperationInfo.prototype.toJSON = function toJSON() {
|
2020 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
2021 | };
|
2022 |
|
2023 | return OperationInfo;
|
2024 | })();
|
2025 |
|
2026 | return longrunning;
|
2027 | })();
|
2028 |
|
2029 | google.api = (function() {
|
2030 |
|
2031 | /**
|
2032 | * Namespace api.
|
2033 | * @memberof google
|
2034 | * @namespace
|
2035 | */
|
2036 | var api = {};
|
2037 |
|
2038 | api.Http = (function() {
|
2039 |
|
2040 | /**
|
2041 | * Properties of a Http.
|
2042 | * @memberof google.api
|
2043 | * @interface IHttp
|
2044 | * @property {Array.<google.api.IHttpRule>|null} [rules] Http rules
|
2045 | * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion
|
2046 | */
|
2047 |
|
2048 | /**
|
2049 | * Constructs a new Http.
|
2050 | * @memberof google.api
|
2051 | * @classdesc Represents a Http.
|
2052 | * @implements IHttp
|
2053 | * @constructor
|
2054 | * @param {google.api.IHttp=} [properties] Properties to set
|
2055 | */
|
2056 | function Http(properties) {
|
2057 | this.rules = [];
|
2058 | if (properties)
|
2059 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
2060 | if (properties[keys[i]] != null)
|
2061 | this[keys[i]] = properties[keys[i]];
|
2062 | }
|
2063 |
|
2064 | /**
|
2065 | * Http rules.
|
2066 | * @member {Array.<google.api.IHttpRule>} rules
|
2067 | * @memberof google.api.Http
|
2068 | * @instance
|
2069 | */
|
2070 | Http.prototype.rules = $util.emptyArray;
|
2071 |
|
2072 | /**
|
2073 | * Http fullyDecodeReservedExpansion.
|
2074 | * @member {boolean} fullyDecodeReservedExpansion
|
2075 | * @memberof google.api.Http
|
2076 | * @instance
|
2077 | */
|
2078 | Http.prototype.fullyDecodeReservedExpansion = false;
|
2079 |
|
2080 | /**
|
2081 | * Creates a new Http instance using the specified properties.
|
2082 | * @function create
|
2083 | * @memberof google.api.Http
|
2084 | * @static
|
2085 | * @param {google.api.IHttp=} [properties] Properties to set
|
2086 | * @returns {google.api.Http} Http instance
|
2087 | */
|
2088 | Http.create = function create(properties) {
|
2089 | return new Http(properties);
|
2090 | };
|
2091 |
|
2092 | /**
|
2093 | * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages.
|
2094 | * @function encode
|
2095 | * @memberof google.api.Http
|
2096 | * @static
|
2097 | * @param {google.api.IHttp} message Http message or plain object to encode
|
2098 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
2099 | * @returns {$protobuf.Writer} Writer
|
2100 | */
|
2101 | Http.encode = function encode(message, writer) {
|
2102 | if (!writer)
|
2103 | writer = $Writer.create();
|
2104 | if (message.rules != null && message.rules.length)
|
2105 | for (var i = 0; i < message.rules.length; ++i)
|
2106 | $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
2107 | if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion"))
|
2108 | writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion);
|
2109 | return writer;
|
2110 | };
|
2111 |
|
2112 | /**
|
2113 | * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages.
|
2114 | * @function encodeDelimited
|
2115 | * @memberof google.api.Http
|
2116 | * @static
|
2117 | * @param {google.api.IHttp} message Http message or plain object to encode
|
2118 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
2119 | * @returns {$protobuf.Writer} Writer
|
2120 | */
|
2121 | Http.encodeDelimited = function encodeDelimited(message, writer) {
|
2122 | return this.encode(message, writer).ldelim();
|
2123 | };
|
2124 |
|
2125 | /**
|
2126 | * Decodes a Http message from the specified reader or buffer.
|
2127 | * @function decode
|
2128 | * @memberof google.api.Http
|
2129 | * @static
|
2130 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
2131 | * @param {number} [length] Message length if known beforehand
|
2132 | * @returns {google.api.Http} Http
|
2133 | * @throws {Error} If the payload is not a reader or valid buffer
|
2134 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
2135 | */
|
2136 | Http.decode = function decode(reader, length) {
|
2137 | if (!(reader instanceof $Reader))
|
2138 | reader = $Reader.create(reader);
|
2139 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http();
|
2140 | while (reader.pos < end) {
|
2141 | var tag = reader.uint32();
|
2142 | switch (tag >>> 3) {
|
2143 | case 1:
|
2144 | if (!(message.rules && message.rules.length))
|
2145 | message.rules = [];
|
2146 | message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32()));
|
2147 | break;
|
2148 | case 2:
|
2149 | message.fullyDecodeReservedExpansion = reader.bool();
|
2150 | break;
|
2151 | default:
|
2152 | reader.skipType(tag & 7);
|
2153 | break;
|
2154 | }
|
2155 | }
|
2156 | return message;
|
2157 | };
|
2158 |
|
2159 | /**
|
2160 | * Decodes a Http message from the specified reader or buffer, length delimited.
|
2161 | * @function decodeDelimited
|
2162 | * @memberof google.api.Http
|
2163 | * @static
|
2164 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
2165 | * @returns {google.api.Http} Http
|
2166 | * @throws {Error} If the payload is not a reader or valid buffer
|
2167 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
2168 | */
|
2169 | Http.decodeDelimited = function decodeDelimited(reader) {
|
2170 | if (!(reader instanceof $Reader))
|
2171 | reader = new $Reader(reader);
|
2172 | return this.decode(reader, reader.uint32());
|
2173 | };
|
2174 |
|
2175 | /**
|
2176 | * Verifies a Http message.
|
2177 | * @function verify
|
2178 | * @memberof google.api.Http
|
2179 | * @static
|
2180 | * @param {Object.<string,*>} message Plain object to verify
|
2181 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
2182 | */
|
2183 | Http.verify = function verify(message) {
|
2184 | if (typeof message !== "object" || message === null)
|
2185 | return "object expected";
|
2186 | if (message.rules != null && message.hasOwnProperty("rules")) {
|
2187 | if (!Array.isArray(message.rules))
|
2188 | return "rules: array expected";
|
2189 | for (var i = 0; i < message.rules.length; ++i) {
|
2190 | var error = $root.google.api.HttpRule.verify(message.rules[i]);
|
2191 | if (error)
|
2192 | return "rules." + error;
|
2193 | }
|
2194 | }
|
2195 | if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion"))
|
2196 | if (typeof message.fullyDecodeReservedExpansion !== "boolean")
|
2197 | return "fullyDecodeReservedExpansion: boolean expected";
|
2198 | return null;
|
2199 | };
|
2200 |
|
2201 | /**
|
2202 | * Creates a Http message from a plain object. Also converts values to their respective internal types.
|
2203 | * @function fromObject
|
2204 | * @memberof google.api.Http
|
2205 | * @static
|
2206 | * @param {Object.<string,*>} object Plain object
|
2207 | * @returns {google.api.Http} Http
|
2208 | */
|
2209 | Http.fromObject = function fromObject(object) {
|
2210 | if (object instanceof $root.google.api.Http)
|
2211 | return object;
|
2212 | var message = new $root.google.api.Http();
|
2213 | if (object.rules) {
|
2214 | if (!Array.isArray(object.rules))
|
2215 | throw TypeError(".google.api.Http.rules: array expected");
|
2216 | message.rules = [];
|
2217 | for (var i = 0; i < object.rules.length; ++i) {
|
2218 | if (typeof object.rules[i] !== "object")
|
2219 | throw TypeError(".google.api.Http.rules: object expected");
|
2220 | message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]);
|
2221 | }
|
2222 | }
|
2223 | if (object.fullyDecodeReservedExpansion != null)
|
2224 | message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion);
|
2225 | return message;
|
2226 | };
|
2227 |
|
2228 | /**
|
2229 | * Creates a plain object from a Http message. Also converts values to other types if specified.
|
2230 | * @function toObject
|
2231 | * @memberof google.api.Http
|
2232 | * @static
|
2233 | * @param {google.api.Http} message Http
|
2234 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
2235 | * @returns {Object.<string,*>} Plain object
|
2236 | */
|
2237 | Http.toObject = function toObject(message, options) {
|
2238 | if (!options)
|
2239 | options = {};
|
2240 | var object = {};
|
2241 | if (options.arrays || options.defaults)
|
2242 | object.rules = [];
|
2243 | if (options.defaults)
|
2244 | object.fullyDecodeReservedExpansion = false;
|
2245 | if (message.rules && message.rules.length) {
|
2246 | object.rules = [];
|
2247 | for (var j = 0; j < message.rules.length; ++j)
|
2248 | object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options);
|
2249 | }
|
2250 | if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion"))
|
2251 | object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion;
|
2252 | return object;
|
2253 | };
|
2254 |
|
2255 | /**
|
2256 | * Converts this Http to JSON.
|
2257 | * @function toJSON
|
2258 | * @memberof google.api.Http
|
2259 | * @instance
|
2260 | * @returns {Object.<string,*>} JSON object
|
2261 | */
|
2262 | Http.prototype.toJSON = function toJSON() {
|
2263 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
2264 | };
|
2265 |
|
2266 | return Http;
|
2267 | })();
|
2268 |
|
2269 | api.HttpRule = (function() {
|
2270 |
|
2271 | /**
|
2272 | * Properties of a HttpRule.
|
2273 | * @memberof google.api
|
2274 | * @interface IHttpRule
|
2275 | * @property {string|null} [selector] HttpRule selector
|
2276 | * @property {string|null} [get] HttpRule get
|
2277 | * @property {string|null} [put] HttpRule put
|
2278 | * @property {string|null} [post] HttpRule post
|
2279 | * @property {string|null} ["delete"] HttpRule delete
|
2280 | * @property {string|null} [patch] HttpRule patch
|
2281 | * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom
|
2282 | * @property {string|null} [body] HttpRule body
|
2283 | * @property {string|null} [responseBody] HttpRule responseBody
|
2284 | * @property {Array.<google.api.IHttpRule>|null} [additionalBindings] HttpRule additionalBindings
|
2285 | */
|
2286 |
|
2287 | /**
|
2288 | * Constructs a new HttpRule.
|
2289 | * @memberof google.api
|
2290 | * @classdesc Represents a HttpRule.
|
2291 | * @implements IHttpRule
|
2292 | * @constructor
|
2293 | * @param {google.api.IHttpRule=} [properties] Properties to set
|
2294 | */
|
2295 | function HttpRule(properties) {
|
2296 | this.additionalBindings = [];
|
2297 | if (properties)
|
2298 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
2299 | if (properties[keys[i]] != null)
|
2300 | this[keys[i]] = properties[keys[i]];
|
2301 | }
|
2302 |
|
2303 | /**
|
2304 | * HttpRule selector.
|
2305 | * @member {string} selector
|
2306 | * @memberof google.api.HttpRule
|
2307 | * @instance
|
2308 | */
|
2309 | HttpRule.prototype.selector = "";
|
2310 |
|
2311 | /**
|
2312 | * HttpRule get.
|
2313 | * @member {string} get
|
2314 | * @memberof google.api.HttpRule
|
2315 | * @instance
|
2316 | */
|
2317 | HttpRule.prototype.get = "";
|
2318 |
|
2319 | /**
|
2320 | * HttpRule put.
|
2321 | * @member {string} put
|
2322 | * @memberof google.api.HttpRule
|
2323 | * @instance
|
2324 | */
|
2325 | HttpRule.prototype.put = "";
|
2326 |
|
2327 | /**
|
2328 | * HttpRule post.
|
2329 | * @member {string} post
|
2330 | * @memberof google.api.HttpRule
|
2331 | * @instance
|
2332 | */
|
2333 | HttpRule.prototype.post = "";
|
2334 |
|
2335 | /**
|
2336 | * HttpRule delete.
|
2337 | * @member {string} delete
|
2338 | * @memberof google.api.HttpRule
|
2339 | * @instance
|
2340 | */
|
2341 | HttpRule.prototype["delete"] = "";
|
2342 |
|
2343 | /**
|
2344 | * HttpRule patch.
|
2345 | * @member {string} patch
|
2346 | * @memberof google.api.HttpRule
|
2347 | * @instance
|
2348 | */
|
2349 | HttpRule.prototype.patch = "";
|
2350 |
|
2351 | /**
|
2352 | * HttpRule custom.
|
2353 | * @member {google.api.ICustomHttpPattern|null|undefined} custom
|
2354 | * @memberof google.api.HttpRule
|
2355 | * @instance
|
2356 | */
|
2357 | HttpRule.prototype.custom = null;
|
2358 |
|
2359 | /**
|
2360 | * HttpRule body.
|
2361 | * @member {string} body
|
2362 | * @memberof google.api.HttpRule
|
2363 | * @instance
|
2364 | */
|
2365 | HttpRule.prototype.body = "";
|
2366 |
|
2367 | /**
|
2368 | * HttpRule responseBody.
|
2369 | * @member {string} responseBody
|
2370 | * @memberof google.api.HttpRule
|
2371 | * @instance
|
2372 | */
|
2373 | HttpRule.prototype.responseBody = "";
|
2374 |
|
2375 | /**
|
2376 | * HttpRule additionalBindings.
|
2377 | * @member {Array.<google.api.IHttpRule>} additionalBindings
|
2378 | * @memberof google.api.HttpRule
|
2379 | * @instance
|
2380 | */
|
2381 | HttpRule.prototype.additionalBindings = $util.emptyArray;
|
2382 |
|
2383 | // OneOf field names bound to virtual getters and setters
|
2384 | var $oneOfFields;
|
2385 |
|
2386 | /**
|
2387 | * HttpRule pattern.
|
2388 | * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern
|
2389 | * @memberof google.api.HttpRule
|
2390 | * @instance
|
2391 | */
|
2392 | Object.defineProperty(HttpRule.prototype, "pattern", {
|
2393 | get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]),
|
2394 | set: $util.oneOfSetter($oneOfFields)
|
2395 | });
|
2396 |
|
2397 | /**
|
2398 | * Creates a new HttpRule instance using the specified properties.
|
2399 | * @function create
|
2400 | * @memberof google.api.HttpRule
|
2401 | * @static
|
2402 | * @param {google.api.IHttpRule=} [properties] Properties to set
|
2403 | * @returns {google.api.HttpRule} HttpRule instance
|
2404 | */
|
2405 | HttpRule.create = function create(properties) {
|
2406 | return new HttpRule(properties);
|
2407 | };
|
2408 |
|
2409 | /**
|
2410 | * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages.
|
2411 | * @function encode
|
2412 | * @memberof google.api.HttpRule
|
2413 | * @static
|
2414 | * @param {google.api.IHttpRule} message HttpRule message or plain object to encode
|
2415 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
2416 | * @returns {$protobuf.Writer} Writer
|
2417 | */
|
2418 | HttpRule.encode = function encode(message, writer) {
|
2419 | if (!writer)
|
2420 | writer = $Writer.create();
|
2421 | if (message.selector != null && Object.hasOwnProperty.call(message, "selector"))
|
2422 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector);
|
2423 | if (message.get != null && Object.hasOwnProperty.call(message, "get"))
|
2424 | writer.uint32(/* id 2, wireType 2 =*/18).string(message.get);
|
2425 | if (message.put != null && Object.hasOwnProperty.call(message, "put"))
|
2426 | writer.uint32(/* id 3, wireType 2 =*/26).string(message.put);
|
2427 | if (message.post != null && Object.hasOwnProperty.call(message, "post"))
|
2428 | writer.uint32(/* id 4, wireType 2 =*/34).string(message.post);
|
2429 | if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete"))
|
2430 | writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]);
|
2431 | if (message.patch != null && Object.hasOwnProperty.call(message, "patch"))
|
2432 | writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch);
|
2433 | if (message.body != null && Object.hasOwnProperty.call(message, "body"))
|
2434 | writer.uint32(/* id 7, wireType 2 =*/58).string(message.body);
|
2435 | if (message.custom != null && Object.hasOwnProperty.call(message, "custom"))
|
2436 | $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
|
2437 | if (message.additionalBindings != null && message.additionalBindings.length)
|
2438 | for (var i = 0; i < message.additionalBindings.length; ++i)
|
2439 | $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
|
2440 | if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody"))
|
2441 | writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody);
|
2442 | return writer;
|
2443 | };
|
2444 |
|
2445 | /**
|
2446 | * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages.
|
2447 | * @function encodeDelimited
|
2448 | * @memberof google.api.HttpRule
|
2449 | * @static
|
2450 | * @param {google.api.IHttpRule} message HttpRule message or plain object to encode
|
2451 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
2452 | * @returns {$protobuf.Writer} Writer
|
2453 | */
|
2454 | HttpRule.encodeDelimited = function encodeDelimited(message, writer) {
|
2455 | return this.encode(message, writer).ldelim();
|
2456 | };
|
2457 |
|
2458 | /**
|
2459 | * Decodes a HttpRule message from the specified reader or buffer.
|
2460 | * @function decode
|
2461 | * @memberof google.api.HttpRule
|
2462 | * @static
|
2463 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
2464 | * @param {number} [length] Message length if known beforehand
|
2465 | * @returns {google.api.HttpRule} HttpRule
|
2466 | * @throws {Error} If the payload is not a reader or valid buffer
|
2467 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
2468 | */
|
2469 | HttpRule.decode = function decode(reader, length) {
|
2470 | if (!(reader instanceof $Reader))
|
2471 | reader = $Reader.create(reader);
|
2472 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule();
|
2473 | while (reader.pos < end) {
|
2474 | var tag = reader.uint32();
|
2475 | switch (tag >>> 3) {
|
2476 | case 1:
|
2477 | message.selector = reader.string();
|
2478 | break;
|
2479 | case 2:
|
2480 | message.get = reader.string();
|
2481 | break;
|
2482 | case 3:
|
2483 | message.put = reader.string();
|
2484 | break;
|
2485 | case 4:
|
2486 | message.post = reader.string();
|
2487 | break;
|
2488 | case 5:
|
2489 | message["delete"] = reader.string();
|
2490 | break;
|
2491 | case 6:
|
2492 | message.patch = reader.string();
|
2493 | break;
|
2494 | case 8:
|
2495 | message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32());
|
2496 | break;
|
2497 | case 7:
|
2498 | message.body = reader.string();
|
2499 | break;
|
2500 | case 12:
|
2501 | message.responseBody = reader.string();
|
2502 | break;
|
2503 | case 11:
|
2504 | if (!(message.additionalBindings && message.additionalBindings.length))
|
2505 | message.additionalBindings = [];
|
2506 | message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32()));
|
2507 | break;
|
2508 | default:
|
2509 | reader.skipType(tag & 7);
|
2510 | break;
|
2511 | }
|
2512 | }
|
2513 | return message;
|
2514 | };
|
2515 |
|
2516 | /**
|
2517 | * Decodes a HttpRule message from the specified reader or buffer, length delimited.
|
2518 | * @function decodeDelimited
|
2519 | * @memberof google.api.HttpRule
|
2520 | * @static
|
2521 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
2522 | * @returns {google.api.HttpRule} HttpRule
|
2523 | * @throws {Error} If the payload is not a reader or valid buffer
|
2524 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
2525 | */
|
2526 | HttpRule.decodeDelimited = function decodeDelimited(reader) {
|
2527 | if (!(reader instanceof $Reader))
|
2528 | reader = new $Reader(reader);
|
2529 | return this.decode(reader, reader.uint32());
|
2530 | };
|
2531 |
|
2532 | /**
|
2533 | * Verifies a HttpRule message.
|
2534 | * @function verify
|
2535 | * @memberof google.api.HttpRule
|
2536 | * @static
|
2537 | * @param {Object.<string,*>} message Plain object to verify
|
2538 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
2539 | */
|
2540 | HttpRule.verify = function verify(message) {
|
2541 | if (typeof message !== "object" || message === null)
|
2542 | return "object expected";
|
2543 | var properties = {};
|
2544 | if (message.selector != null && message.hasOwnProperty("selector"))
|
2545 | if (!$util.isString(message.selector))
|
2546 | return "selector: string expected";
|
2547 | if (message.get != null && message.hasOwnProperty("get")) {
|
2548 | properties.pattern = 1;
|
2549 | if (!$util.isString(message.get))
|
2550 | return "get: string expected";
|
2551 | }
|
2552 | if (message.put != null && message.hasOwnProperty("put")) {
|
2553 | if (properties.pattern === 1)
|
2554 | return "pattern: multiple values";
|
2555 | properties.pattern = 1;
|
2556 | if (!$util.isString(message.put))
|
2557 | return "put: string expected";
|
2558 | }
|
2559 | if (message.post != null && message.hasOwnProperty("post")) {
|
2560 | if (properties.pattern === 1)
|
2561 | return "pattern: multiple values";
|
2562 | properties.pattern = 1;
|
2563 | if (!$util.isString(message.post))
|
2564 | return "post: string expected";
|
2565 | }
|
2566 | if (message["delete"] != null && message.hasOwnProperty("delete")) {
|
2567 | if (properties.pattern === 1)
|
2568 | return "pattern: multiple values";
|
2569 | properties.pattern = 1;
|
2570 | if (!$util.isString(message["delete"]))
|
2571 | return "delete: string expected";
|
2572 | }
|
2573 | if (message.patch != null && message.hasOwnProperty("patch")) {
|
2574 | if (properties.pattern === 1)
|
2575 | return "pattern: multiple values";
|
2576 | properties.pattern = 1;
|
2577 | if (!$util.isString(message.patch))
|
2578 | return "patch: string expected";
|
2579 | }
|
2580 | if (message.custom != null && message.hasOwnProperty("custom")) {
|
2581 | if (properties.pattern === 1)
|
2582 | return "pattern: multiple values";
|
2583 | properties.pattern = 1;
|
2584 | {
|
2585 | var error = $root.google.api.CustomHttpPattern.verify(message.custom);
|
2586 | if (error)
|
2587 | return "custom." + error;
|
2588 | }
|
2589 | }
|
2590 | if (message.body != null && message.hasOwnProperty("body"))
|
2591 | if (!$util.isString(message.body))
|
2592 | return "body: string expected";
|
2593 | if (message.responseBody != null && message.hasOwnProperty("responseBody"))
|
2594 | if (!$util.isString(message.responseBody))
|
2595 | return "responseBody: string expected";
|
2596 | if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) {
|
2597 | if (!Array.isArray(message.additionalBindings))
|
2598 | return "additionalBindings: array expected";
|
2599 | for (var i = 0; i < message.additionalBindings.length; ++i) {
|
2600 | var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]);
|
2601 | if (error)
|
2602 | return "additionalBindings." + error;
|
2603 | }
|
2604 | }
|
2605 | return null;
|
2606 | };
|
2607 |
|
2608 | /**
|
2609 | * Creates a HttpRule message from a plain object. Also converts values to their respective internal types.
|
2610 | * @function fromObject
|
2611 | * @memberof google.api.HttpRule
|
2612 | * @static
|
2613 | * @param {Object.<string,*>} object Plain object
|
2614 | * @returns {google.api.HttpRule} HttpRule
|
2615 | */
|
2616 | HttpRule.fromObject = function fromObject(object) {
|
2617 | if (object instanceof $root.google.api.HttpRule)
|
2618 | return object;
|
2619 | var message = new $root.google.api.HttpRule();
|
2620 | if (object.selector != null)
|
2621 | message.selector = String(object.selector);
|
2622 | if (object.get != null)
|
2623 | message.get = String(object.get);
|
2624 | if (object.put != null)
|
2625 | message.put = String(object.put);
|
2626 | if (object.post != null)
|
2627 | message.post = String(object.post);
|
2628 | if (object["delete"] != null)
|
2629 | message["delete"] = String(object["delete"]);
|
2630 | if (object.patch != null)
|
2631 | message.patch = String(object.patch);
|
2632 | if (object.custom != null) {
|
2633 | if (typeof object.custom !== "object")
|
2634 | throw TypeError(".google.api.HttpRule.custom: object expected");
|
2635 | message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom);
|
2636 | }
|
2637 | if (object.body != null)
|
2638 | message.body = String(object.body);
|
2639 | if (object.responseBody != null)
|
2640 | message.responseBody = String(object.responseBody);
|
2641 | if (object.additionalBindings) {
|
2642 | if (!Array.isArray(object.additionalBindings))
|
2643 | throw TypeError(".google.api.HttpRule.additionalBindings: array expected");
|
2644 | message.additionalBindings = [];
|
2645 | for (var i = 0; i < object.additionalBindings.length; ++i) {
|
2646 | if (typeof object.additionalBindings[i] !== "object")
|
2647 | throw TypeError(".google.api.HttpRule.additionalBindings: object expected");
|
2648 | message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]);
|
2649 | }
|
2650 | }
|
2651 | return message;
|
2652 | };
|
2653 |
|
2654 | /**
|
2655 | * Creates a plain object from a HttpRule message. Also converts values to other types if specified.
|
2656 | * @function toObject
|
2657 | * @memberof google.api.HttpRule
|
2658 | * @static
|
2659 | * @param {google.api.HttpRule} message HttpRule
|
2660 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
2661 | * @returns {Object.<string,*>} Plain object
|
2662 | */
|
2663 | HttpRule.toObject = function toObject(message, options) {
|
2664 | if (!options)
|
2665 | options = {};
|
2666 | var object = {};
|
2667 | if (options.arrays || options.defaults)
|
2668 | object.additionalBindings = [];
|
2669 | if (options.defaults) {
|
2670 | object.selector = "";
|
2671 | object.body = "";
|
2672 | object.responseBody = "";
|
2673 | }
|
2674 | if (message.selector != null && message.hasOwnProperty("selector"))
|
2675 | object.selector = message.selector;
|
2676 | if (message.get != null && message.hasOwnProperty("get")) {
|
2677 | object.get = message.get;
|
2678 | if (options.oneofs)
|
2679 | object.pattern = "get";
|
2680 | }
|
2681 | if (message.put != null && message.hasOwnProperty("put")) {
|
2682 | object.put = message.put;
|
2683 | if (options.oneofs)
|
2684 | object.pattern = "put";
|
2685 | }
|
2686 | if (message.post != null && message.hasOwnProperty("post")) {
|
2687 | object.post = message.post;
|
2688 | if (options.oneofs)
|
2689 | object.pattern = "post";
|
2690 | }
|
2691 | if (message["delete"] != null && message.hasOwnProperty("delete")) {
|
2692 | object["delete"] = message["delete"];
|
2693 | if (options.oneofs)
|
2694 | object.pattern = "delete";
|
2695 | }
|
2696 | if (message.patch != null && message.hasOwnProperty("patch")) {
|
2697 | object.patch = message.patch;
|
2698 | if (options.oneofs)
|
2699 | object.pattern = "patch";
|
2700 | }
|
2701 | if (message.body != null && message.hasOwnProperty("body"))
|
2702 | object.body = message.body;
|
2703 | if (message.custom != null && message.hasOwnProperty("custom")) {
|
2704 | object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options);
|
2705 | if (options.oneofs)
|
2706 | object.pattern = "custom";
|
2707 | }
|
2708 | if (message.additionalBindings && message.additionalBindings.length) {
|
2709 | object.additionalBindings = [];
|
2710 | for (var j = 0; j < message.additionalBindings.length; ++j)
|
2711 | object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options);
|
2712 | }
|
2713 | if (message.responseBody != null && message.hasOwnProperty("responseBody"))
|
2714 | object.responseBody = message.responseBody;
|
2715 | return object;
|
2716 | };
|
2717 |
|
2718 | /**
|
2719 | * Converts this HttpRule to JSON.
|
2720 | * @function toJSON
|
2721 | * @memberof google.api.HttpRule
|
2722 | * @instance
|
2723 | * @returns {Object.<string,*>} JSON object
|
2724 | */
|
2725 | HttpRule.prototype.toJSON = function toJSON() {
|
2726 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
2727 | };
|
2728 |
|
2729 | return HttpRule;
|
2730 | })();
|
2731 |
|
2732 | api.CustomHttpPattern = (function() {
|
2733 |
|
2734 | /**
|
2735 | * Properties of a CustomHttpPattern.
|
2736 | * @memberof google.api
|
2737 | * @interface ICustomHttpPattern
|
2738 | * @property {string|null} [kind] CustomHttpPattern kind
|
2739 | * @property {string|null} [path] CustomHttpPattern path
|
2740 | */
|
2741 |
|
2742 | /**
|
2743 | * Constructs a new CustomHttpPattern.
|
2744 | * @memberof google.api
|
2745 | * @classdesc Represents a CustomHttpPattern.
|
2746 | * @implements ICustomHttpPattern
|
2747 | * @constructor
|
2748 | * @param {google.api.ICustomHttpPattern=} [properties] Properties to set
|
2749 | */
|
2750 | function CustomHttpPattern(properties) {
|
2751 | if (properties)
|
2752 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
2753 | if (properties[keys[i]] != null)
|
2754 | this[keys[i]] = properties[keys[i]];
|
2755 | }
|
2756 |
|
2757 | /**
|
2758 | * CustomHttpPattern kind.
|
2759 | * @member {string} kind
|
2760 | * @memberof google.api.CustomHttpPattern
|
2761 | * @instance
|
2762 | */
|
2763 | CustomHttpPattern.prototype.kind = "";
|
2764 |
|
2765 | /**
|
2766 | * CustomHttpPattern path.
|
2767 | * @member {string} path
|
2768 | * @memberof google.api.CustomHttpPattern
|
2769 | * @instance
|
2770 | */
|
2771 | CustomHttpPattern.prototype.path = "";
|
2772 |
|
2773 | /**
|
2774 | * Creates a new CustomHttpPattern instance using the specified properties.
|
2775 | * @function create
|
2776 | * @memberof google.api.CustomHttpPattern
|
2777 | * @static
|
2778 | * @param {google.api.ICustomHttpPattern=} [properties] Properties to set
|
2779 | * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance
|
2780 | */
|
2781 | CustomHttpPattern.create = function create(properties) {
|
2782 | return new CustomHttpPattern(properties);
|
2783 | };
|
2784 |
|
2785 | /**
|
2786 | * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages.
|
2787 | * @function encode
|
2788 | * @memberof google.api.CustomHttpPattern
|
2789 | * @static
|
2790 | * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode
|
2791 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
2792 | * @returns {$protobuf.Writer} Writer
|
2793 | */
|
2794 | CustomHttpPattern.encode = function encode(message, writer) {
|
2795 | if (!writer)
|
2796 | writer = $Writer.create();
|
2797 | if (message.kind != null && Object.hasOwnProperty.call(message, "kind"))
|
2798 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind);
|
2799 | if (message.path != null && Object.hasOwnProperty.call(message, "path"))
|
2800 | writer.uint32(/* id 2, wireType 2 =*/18).string(message.path);
|
2801 | return writer;
|
2802 | };
|
2803 |
|
2804 | /**
|
2805 | * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages.
|
2806 | * @function encodeDelimited
|
2807 | * @memberof google.api.CustomHttpPattern
|
2808 | * @static
|
2809 | * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode
|
2810 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
2811 | * @returns {$protobuf.Writer} Writer
|
2812 | */
|
2813 | CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) {
|
2814 | return this.encode(message, writer).ldelim();
|
2815 | };
|
2816 |
|
2817 | /**
|
2818 | * Decodes a CustomHttpPattern message from the specified reader or buffer.
|
2819 | * @function decode
|
2820 | * @memberof google.api.CustomHttpPattern
|
2821 | * @static
|
2822 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
2823 | * @param {number} [length] Message length if known beforehand
|
2824 | * @returns {google.api.CustomHttpPattern} CustomHttpPattern
|
2825 | * @throws {Error} If the payload is not a reader or valid buffer
|
2826 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
2827 | */
|
2828 | CustomHttpPattern.decode = function decode(reader, length) {
|
2829 | if (!(reader instanceof $Reader))
|
2830 | reader = $Reader.create(reader);
|
2831 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern();
|
2832 | while (reader.pos < end) {
|
2833 | var tag = reader.uint32();
|
2834 | switch (tag >>> 3) {
|
2835 | case 1:
|
2836 | message.kind = reader.string();
|
2837 | break;
|
2838 | case 2:
|
2839 | message.path = reader.string();
|
2840 | break;
|
2841 | default:
|
2842 | reader.skipType(tag & 7);
|
2843 | break;
|
2844 | }
|
2845 | }
|
2846 | return message;
|
2847 | };
|
2848 |
|
2849 | /**
|
2850 | * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited.
|
2851 | * @function decodeDelimited
|
2852 | * @memberof google.api.CustomHttpPattern
|
2853 | * @static
|
2854 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
2855 | * @returns {google.api.CustomHttpPattern} CustomHttpPattern
|
2856 | * @throws {Error} If the payload is not a reader or valid buffer
|
2857 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
2858 | */
|
2859 | CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) {
|
2860 | if (!(reader instanceof $Reader))
|
2861 | reader = new $Reader(reader);
|
2862 | return this.decode(reader, reader.uint32());
|
2863 | };
|
2864 |
|
2865 | /**
|
2866 | * Verifies a CustomHttpPattern message.
|
2867 | * @function verify
|
2868 | * @memberof google.api.CustomHttpPattern
|
2869 | * @static
|
2870 | * @param {Object.<string,*>} message Plain object to verify
|
2871 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
2872 | */
|
2873 | CustomHttpPattern.verify = function verify(message) {
|
2874 | if (typeof message !== "object" || message === null)
|
2875 | return "object expected";
|
2876 | if (message.kind != null && message.hasOwnProperty("kind"))
|
2877 | if (!$util.isString(message.kind))
|
2878 | return "kind: string expected";
|
2879 | if (message.path != null && message.hasOwnProperty("path"))
|
2880 | if (!$util.isString(message.path))
|
2881 | return "path: string expected";
|
2882 | return null;
|
2883 | };
|
2884 |
|
2885 | /**
|
2886 | * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types.
|
2887 | * @function fromObject
|
2888 | * @memberof google.api.CustomHttpPattern
|
2889 | * @static
|
2890 | * @param {Object.<string,*>} object Plain object
|
2891 | * @returns {google.api.CustomHttpPattern} CustomHttpPattern
|
2892 | */
|
2893 | CustomHttpPattern.fromObject = function fromObject(object) {
|
2894 | if (object instanceof $root.google.api.CustomHttpPattern)
|
2895 | return object;
|
2896 | var message = new $root.google.api.CustomHttpPattern();
|
2897 | if (object.kind != null)
|
2898 | message.kind = String(object.kind);
|
2899 | if (object.path != null)
|
2900 | message.path = String(object.path);
|
2901 | return message;
|
2902 | };
|
2903 |
|
2904 | /**
|
2905 | * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified.
|
2906 | * @function toObject
|
2907 | * @memberof google.api.CustomHttpPattern
|
2908 | * @static
|
2909 | * @param {google.api.CustomHttpPattern} message CustomHttpPattern
|
2910 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
2911 | * @returns {Object.<string,*>} Plain object
|
2912 | */
|
2913 | CustomHttpPattern.toObject = function toObject(message, options) {
|
2914 | if (!options)
|
2915 | options = {};
|
2916 | var object = {};
|
2917 | if (options.defaults) {
|
2918 | object.kind = "";
|
2919 | object.path = "";
|
2920 | }
|
2921 | if (message.kind != null && message.hasOwnProperty("kind"))
|
2922 | object.kind = message.kind;
|
2923 | if (message.path != null && message.hasOwnProperty("path"))
|
2924 | object.path = message.path;
|
2925 | return object;
|
2926 | };
|
2927 |
|
2928 | /**
|
2929 | * Converts this CustomHttpPattern to JSON.
|
2930 | * @function toJSON
|
2931 | * @memberof google.api.CustomHttpPattern
|
2932 | * @instance
|
2933 | * @returns {Object.<string,*>} JSON object
|
2934 | */
|
2935 | CustomHttpPattern.prototype.toJSON = function toJSON() {
|
2936 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
2937 | };
|
2938 |
|
2939 | return CustomHttpPattern;
|
2940 | })();
|
2941 |
|
2942 | return api;
|
2943 | })();
|
2944 |
|
2945 | google.protobuf = (function() {
|
2946 |
|
2947 | /**
|
2948 | * Namespace protobuf.
|
2949 | * @memberof google
|
2950 | * @namespace
|
2951 | */
|
2952 | var protobuf = {};
|
2953 |
|
2954 | protobuf.FileDescriptorSet = (function() {
|
2955 |
|
2956 | /**
|
2957 | * Properties of a FileDescriptorSet.
|
2958 | * @memberof google.protobuf
|
2959 | * @interface IFileDescriptorSet
|
2960 | * @property {Array.<google.protobuf.IFileDescriptorProto>|null} [file] FileDescriptorSet file
|
2961 | */
|
2962 |
|
2963 | /**
|
2964 | * Constructs a new FileDescriptorSet.
|
2965 | * @memberof google.protobuf
|
2966 | * @classdesc Represents a FileDescriptorSet.
|
2967 | * @implements IFileDescriptorSet
|
2968 | * @constructor
|
2969 | * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set
|
2970 | */
|
2971 | function FileDescriptorSet(properties) {
|
2972 | this.file = [];
|
2973 | if (properties)
|
2974 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
2975 | if (properties[keys[i]] != null)
|
2976 | this[keys[i]] = properties[keys[i]];
|
2977 | }
|
2978 |
|
2979 | /**
|
2980 | * FileDescriptorSet file.
|
2981 | * @member {Array.<google.protobuf.IFileDescriptorProto>} file
|
2982 | * @memberof google.protobuf.FileDescriptorSet
|
2983 | * @instance
|
2984 | */
|
2985 | FileDescriptorSet.prototype.file = $util.emptyArray;
|
2986 |
|
2987 | /**
|
2988 | * Creates a new FileDescriptorSet instance using the specified properties.
|
2989 | * @function create
|
2990 | * @memberof google.protobuf.FileDescriptorSet
|
2991 | * @static
|
2992 | * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set
|
2993 | * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance
|
2994 | */
|
2995 | FileDescriptorSet.create = function create(properties) {
|
2996 | return new FileDescriptorSet(properties);
|
2997 | };
|
2998 |
|
2999 | /**
|
3000 | * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages.
|
3001 | * @function encode
|
3002 | * @memberof google.protobuf.FileDescriptorSet
|
3003 | * @static
|
3004 | * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode
|
3005 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
3006 | * @returns {$protobuf.Writer} Writer
|
3007 | */
|
3008 | FileDescriptorSet.encode = function encode(message, writer) {
|
3009 | if (!writer)
|
3010 | writer = $Writer.create();
|
3011 | if (message.file != null && message.file.length)
|
3012 | for (var i = 0; i < message.file.length; ++i)
|
3013 | $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
3014 | return writer;
|
3015 | };
|
3016 |
|
3017 | /**
|
3018 | * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages.
|
3019 | * @function encodeDelimited
|
3020 | * @memberof google.protobuf.FileDescriptorSet
|
3021 | * @static
|
3022 | * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode
|
3023 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
3024 | * @returns {$protobuf.Writer} Writer
|
3025 | */
|
3026 | FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) {
|
3027 | return this.encode(message, writer).ldelim();
|
3028 | };
|
3029 |
|
3030 | /**
|
3031 | * Decodes a FileDescriptorSet message from the specified reader or buffer.
|
3032 | * @function decode
|
3033 | * @memberof google.protobuf.FileDescriptorSet
|
3034 | * @static
|
3035 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
3036 | * @param {number} [length] Message length if known beforehand
|
3037 | * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet
|
3038 | * @throws {Error} If the payload is not a reader or valid buffer
|
3039 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
3040 | */
|
3041 | FileDescriptorSet.decode = function decode(reader, length) {
|
3042 | if (!(reader instanceof $Reader))
|
3043 | reader = $Reader.create(reader);
|
3044 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet();
|
3045 | while (reader.pos < end) {
|
3046 | var tag = reader.uint32();
|
3047 | switch (tag >>> 3) {
|
3048 | case 1:
|
3049 | if (!(message.file && message.file.length))
|
3050 | message.file = [];
|
3051 | message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32()));
|
3052 | break;
|
3053 | default:
|
3054 | reader.skipType(tag & 7);
|
3055 | break;
|
3056 | }
|
3057 | }
|
3058 | return message;
|
3059 | };
|
3060 |
|
3061 | /**
|
3062 | * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited.
|
3063 | * @function decodeDelimited
|
3064 | * @memberof google.protobuf.FileDescriptorSet
|
3065 | * @static
|
3066 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
3067 | * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet
|
3068 | * @throws {Error} If the payload is not a reader or valid buffer
|
3069 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
3070 | */
|
3071 | FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) {
|
3072 | if (!(reader instanceof $Reader))
|
3073 | reader = new $Reader(reader);
|
3074 | return this.decode(reader, reader.uint32());
|
3075 | };
|
3076 |
|
3077 | /**
|
3078 | * Verifies a FileDescriptorSet message.
|
3079 | * @function verify
|
3080 | * @memberof google.protobuf.FileDescriptorSet
|
3081 | * @static
|
3082 | * @param {Object.<string,*>} message Plain object to verify
|
3083 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
3084 | */
|
3085 | FileDescriptorSet.verify = function verify(message) {
|
3086 | if (typeof message !== "object" || message === null)
|
3087 | return "object expected";
|
3088 | if (message.file != null && message.hasOwnProperty("file")) {
|
3089 | if (!Array.isArray(message.file))
|
3090 | return "file: array expected";
|
3091 | for (var i = 0; i < message.file.length; ++i) {
|
3092 | var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]);
|
3093 | if (error)
|
3094 | return "file." + error;
|
3095 | }
|
3096 | }
|
3097 | return null;
|
3098 | };
|
3099 |
|
3100 | /**
|
3101 | * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types.
|
3102 | * @function fromObject
|
3103 | * @memberof google.protobuf.FileDescriptorSet
|
3104 | * @static
|
3105 | * @param {Object.<string,*>} object Plain object
|
3106 | * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet
|
3107 | */
|
3108 | FileDescriptorSet.fromObject = function fromObject(object) {
|
3109 | if (object instanceof $root.google.protobuf.FileDescriptorSet)
|
3110 | return object;
|
3111 | var message = new $root.google.protobuf.FileDescriptorSet();
|
3112 | if (object.file) {
|
3113 | if (!Array.isArray(object.file))
|
3114 | throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected");
|
3115 | message.file = [];
|
3116 | for (var i = 0; i < object.file.length; ++i) {
|
3117 | if (typeof object.file[i] !== "object")
|
3118 | throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected");
|
3119 | message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]);
|
3120 | }
|
3121 | }
|
3122 | return message;
|
3123 | };
|
3124 |
|
3125 | /**
|
3126 | * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified.
|
3127 | * @function toObject
|
3128 | * @memberof google.protobuf.FileDescriptorSet
|
3129 | * @static
|
3130 | * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet
|
3131 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
3132 | * @returns {Object.<string,*>} Plain object
|
3133 | */
|
3134 | FileDescriptorSet.toObject = function toObject(message, options) {
|
3135 | if (!options)
|
3136 | options = {};
|
3137 | var object = {};
|
3138 | if (options.arrays || options.defaults)
|
3139 | object.file = [];
|
3140 | if (message.file && message.file.length) {
|
3141 | object.file = [];
|
3142 | for (var j = 0; j < message.file.length; ++j)
|
3143 | object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options);
|
3144 | }
|
3145 | return object;
|
3146 | };
|
3147 |
|
3148 | /**
|
3149 | * Converts this FileDescriptorSet to JSON.
|
3150 | * @function toJSON
|
3151 | * @memberof google.protobuf.FileDescriptorSet
|
3152 | * @instance
|
3153 | * @returns {Object.<string,*>} JSON object
|
3154 | */
|
3155 | FileDescriptorSet.prototype.toJSON = function toJSON() {
|
3156 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
3157 | };
|
3158 |
|
3159 | return FileDescriptorSet;
|
3160 | })();
|
3161 |
|
3162 | protobuf.FileDescriptorProto = (function() {
|
3163 |
|
3164 | /**
|
3165 | * Properties of a FileDescriptorProto.
|
3166 | * @memberof google.protobuf
|
3167 | * @interface IFileDescriptorProto
|
3168 | * @property {string|null} [name] FileDescriptorProto name
|
3169 | * @property {string|null} ["package"] FileDescriptorProto package
|
3170 | * @property {Array.<string>|null} [dependency] FileDescriptorProto dependency
|
3171 | * @property {Array.<number>|null} [publicDependency] FileDescriptorProto publicDependency
|
3172 | * @property {Array.<number>|null} [weakDependency] FileDescriptorProto weakDependency
|
3173 | * @property {Array.<google.protobuf.IDescriptorProto>|null} [messageType] FileDescriptorProto messageType
|
3174 | * @property {Array.<google.protobuf.IEnumDescriptorProto>|null} [enumType] FileDescriptorProto enumType
|
3175 | * @property {Array.<google.protobuf.IServiceDescriptorProto>|null} [service] FileDescriptorProto service
|
3176 | * @property {Array.<google.protobuf.IFieldDescriptorProto>|null} [extension] FileDescriptorProto extension
|
3177 | * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options
|
3178 | * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo
|
3179 | * @property {string|null} [syntax] FileDescriptorProto syntax
|
3180 | */
|
3181 |
|
3182 | /**
|
3183 | * Constructs a new FileDescriptorProto.
|
3184 | * @memberof google.protobuf
|
3185 | * @classdesc Represents a FileDescriptorProto.
|
3186 | * @implements IFileDescriptorProto
|
3187 | * @constructor
|
3188 | * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set
|
3189 | */
|
3190 | function FileDescriptorProto(properties) {
|
3191 | this.dependency = [];
|
3192 | this.publicDependency = [];
|
3193 | this.weakDependency = [];
|
3194 | this.messageType = [];
|
3195 | this.enumType = [];
|
3196 | this.service = [];
|
3197 | this.extension = [];
|
3198 | if (properties)
|
3199 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
3200 | if (properties[keys[i]] != null)
|
3201 | this[keys[i]] = properties[keys[i]];
|
3202 | }
|
3203 |
|
3204 | /**
|
3205 | * FileDescriptorProto name.
|
3206 | * @member {string} name
|
3207 | * @memberof google.protobuf.FileDescriptorProto
|
3208 | * @instance
|
3209 | */
|
3210 | FileDescriptorProto.prototype.name = "";
|
3211 |
|
3212 | /**
|
3213 | * FileDescriptorProto package.
|
3214 | * @member {string} package
|
3215 | * @memberof google.protobuf.FileDescriptorProto
|
3216 | * @instance
|
3217 | */
|
3218 | FileDescriptorProto.prototype["package"] = "";
|
3219 |
|
3220 | /**
|
3221 | * FileDescriptorProto dependency.
|
3222 | * @member {Array.<string>} dependency
|
3223 | * @memberof google.protobuf.FileDescriptorProto
|
3224 | * @instance
|
3225 | */
|
3226 | FileDescriptorProto.prototype.dependency = $util.emptyArray;
|
3227 |
|
3228 | /**
|
3229 | * FileDescriptorProto publicDependency.
|
3230 | * @member {Array.<number>} publicDependency
|
3231 | * @memberof google.protobuf.FileDescriptorProto
|
3232 | * @instance
|
3233 | */
|
3234 | FileDescriptorProto.prototype.publicDependency = $util.emptyArray;
|
3235 |
|
3236 | /**
|
3237 | * FileDescriptorProto weakDependency.
|
3238 | * @member {Array.<number>} weakDependency
|
3239 | * @memberof google.protobuf.FileDescriptorProto
|
3240 | * @instance
|
3241 | */
|
3242 | FileDescriptorProto.prototype.weakDependency = $util.emptyArray;
|
3243 |
|
3244 | /**
|
3245 | * FileDescriptorProto messageType.
|
3246 | * @member {Array.<google.protobuf.IDescriptorProto>} messageType
|
3247 | * @memberof google.protobuf.FileDescriptorProto
|
3248 | * @instance
|
3249 | */
|
3250 | FileDescriptorProto.prototype.messageType = $util.emptyArray;
|
3251 |
|
3252 | /**
|
3253 | * FileDescriptorProto enumType.
|
3254 | * @member {Array.<google.protobuf.IEnumDescriptorProto>} enumType
|
3255 | * @memberof google.protobuf.FileDescriptorProto
|
3256 | * @instance
|
3257 | */
|
3258 | FileDescriptorProto.prototype.enumType = $util.emptyArray;
|
3259 |
|
3260 | /**
|
3261 | * FileDescriptorProto service.
|
3262 | * @member {Array.<google.protobuf.IServiceDescriptorProto>} service
|
3263 | * @memberof google.protobuf.FileDescriptorProto
|
3264 | * @instance
|
3265 | */
|
3266 | FileDescriptorProto.prototype.service = $util.emptyArray;
|
3267 |
|
3268 | /**
|
3269 | * FileDescriptorProto extension.
|
3270 | * @member {Array.<google.protobuf.IFieldDescriptorProto>} extension
|
3271 | * @memberof google.protobuf.FileDescriptorProto
|
3272 | * @instance
|
3273 | */
|
3274 | FileDescriptorProto.prototype.extension = $util.emptyArray;
|
3275 |
|
3276 | /**
|
3277 | * FileDescriptorProto options.
|
3278 | * @member {google.protobuf.IFileOptions|null|undefined} options
|
3279 | * @memberof google.protobuf.FileDescriptorProto
|
3280 | * @instance
|
3281 | */
|
3282 | FileDescriptorProto.prototype.options = null;
|
3283 |
|
3284 | /**
|
3285 | * FileDescriptorProto sourceCodeInfo.
|
3286 | * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo
|
3287 | * @memberof google.protobuf.FileDescriptorProto
|
3288 | * @instance
|
3289 | */
|
3290 | FileDescriptorProto.prototype.sourceCodeInfo = null;
|
3291 |
|
3292 | /**
|
3293 | * FileDescriptorProto syntax.
|
3294 | * @member {string} syntax
|
3295 | * @memberof google.protobuf.FileDescriptorProto
|
3296 | * @instance
|
3297 | */
|
3298 | FileDescriptorProto.prototype.syntax = "";
|
3299 |
|
3300 | /**
|
3301 | * Creates a new FileDescriptorProto instance using the specified properties.
|
3302 | * @function create
|
3303 | * @memberof google.protobuf.FileDescriptorProto
|
3304 | * @static
|
3305 | * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set
|
3306 | * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance
|
3307 | */
|
3308 | FileDescriptorProto.create = function create(properties) {
|
3309 | return new FileDescriptorProto(properties);
|
3310 | };
|
3311 |
|
3312 | /**
|
3313 | * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages.
|
3314 | * @function encode
|
3315 | * @memberof google.protobuf.FileDescriptorProto
|
3316 | * @static
|
3317 | * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode
|
3318 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
3319 | * @returns {$protobuf.Writer} Writer
|
3320 | */
|
3321 | FileDescriptorProto.encode = function encode(message, writer) {
|
3322 | if (!writer)
|
3323 | writer = $Writer.create();
|
3324 | if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
3325 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
3326 | if (message["package"] != null && Object.hasOwnProperty.call(message, "package"))
|
3327 | writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]);
|
3328 | if (message.dependency != null && message.dependency.length)
|
3329 | for (var i = 0; i < message.dependency.length; ++i)
|
3330 | writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]);
|
3331 | if (message.messageType != null && message.messageType.length)
|
3332 | for (var i = 0; i < message.messageType.length; ++i)
|
3333 | $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
3334 | if (message.enumType != null && message.enumType.length)
|
3335 | for (var i = 0; i < message.enumType.length; ++i)
|
3336 | $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
|
3337 | if (message.service != null && message.service.length)
|
3338 | for (var i = 0; i < message.service.length; ++i)
|
3339 | $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
|
3340 | if (message.extension != null && message.extension.length)
|
3341 | for (var i = 0; i < message.extension.length; ++i)
|
3342 | $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
|
3343 | if (message.options != null && Object.hasOwnProperty.call(message, "options"))
|
3344 | $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
|
3345 | if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo"))
|
3346 | $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
|
3347 | if (message.publicDependency != null && message.publicDependency.length)
|
3348 | for (var i = 0; i < message.publicDependency.length; ++i)
|
3349 | writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]);
|
3350 | if (message.weakDependency != null && message.weakDependency.length)
|
3351 | for (var i = 0; i < message.weakDependency.length; ++i)
|
3352 | writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]);
|
3353 | if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax"))
|
3354 | writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax);
|
3355 | return writer;
|
3356 | };
|
3357 |
|
3358 | /**
|
3359 | * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages.
|
3360 | * @function encodeDelimited
|
3361 | * @memberof google.protobuf.FileDescriptorProto
|
3362 | * @static
|
3363 | * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode
|
3364 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
3365 | * @returns {$protobuf.Writer} Writer
|
3366 | */
|
3367 | FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) {
|
3368 | return this.encode(message, writer).ldelim();
|
3369 | };
|
3370 |
|
3371 | /**
|
3372 | * Decodes a FileDescriptorProto message from the specified reader or buffer.
|
3373 | * @function decode
|
3374 | * @memberof google.protobuf.FileDescriptorProto
|
3375 | * @static
|
3376 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
3377 | * @param {number} [length] Message length if known beforehand
|
3378 | * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto
|
3379 | * @throws {Error} If the payload is not a reader or valid buffer
|
3380 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
3381 | */
|
3382 | FileDescriptorProto.decode = function decode(reader, length) {
|
3383 | if (!(reader instanceof $Reader))
|
3384 | reader = $Reader.create(reader);
|
3385 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto();
|
3386 | while (reader.pos < end) {
|
3387 | var tag = reader.uint32();
|
3388 | switch (tag >>> 3) {
|
3389 | case 1:
|
3390 | message.name = reader.string();
|
3391 | break;
|
3392 | case 2:
|
3393 | message["package"] = reader.string();
|
3394 | break;
|
3395 | case 3:
|
3396 | if (!(message.dependency && message.dependency.length))
|
3397 | message.dependency = [];
|
3398 | message.dependency.push(reader.string());
|
3399 | break;
|
3400 | case 10:
|
3401 | if (!(message.publicDependency && message.publicDependency.length))
|
3402 | message.publicDependency = [];
|
3403 | if ((tag & 7) === 2) {
|
3404 | var end2 = reader.uint32() + reader.pos;
|
3405 | while (reader.pos < end2)
|
3406 | message.publicDependency.push(reader.int32());
|
3407 | } else
|
3408 | message.publicDependency.push(reader.int32());
|
3409 | break;
|
3410 | case 11:
|
3411 | if (!(message.weakDependency && message.weakDependency.length))
|
3412 | message.weakDependency = [];
|
3413 | if ((tag & 7) === 2) {
|
3414 | var end2 = reader.uint32() + reader.pos;
|
3415 | while (reader.pos < end2)
|
3416 | message.weakDependency.push(reader.int32());
|
3417 | } else
|
3418 | message.weakDependency.push(reader.int32());
|
3419 | break;
|
3420 | case 4:
|
3421 | if (!(message.messageType && message.messageType.length))
|
3422 | message.messageType = [];
|
3423 | message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32()));
|
3424 | break;
|
3425 | case 5:
|
3426 | if (!(message.enumType && message.enumType.length))
|
3427 | message.enumType = [];
|
3428 | message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32()));
|
3429 | break;
|
3430 | case 6:
|
3431 | if (!(message.service && message.service.length))
|
3432 | message.service = [];
|
3433 | message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32()));
|
3434 | break;
|
3435 | case 7:
|
3436 | if (!(message.extension && message.extension.length))
|
3437 | message.extension = [];
|
3438 | message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32()));
|
3439 | break;
|
3440 | case 8:
|
3441 | message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32());
|
3442 | break;
|
3443 | case 9:
|
3444 | message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32());
|
3445 | break;
|
3446 | case 12:
|
3447 | message.syntax = reader.string();
|
3448 | break;
|
3449 | default:
|
3450 | reader.skipType(tag & 7);
|
3451 | break;
|
3452 | }
|
3453 | }
|
3454 | return message;
|
3455 | };
|
3456 |
|
3457 | /**
|
3458 | * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited.
|
3459 | * @function decodeDelimited
|
3460 | * @memberof google.protobuf.FileDescriptorProto
|
3461 | * @static
|
3462 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
3463 | * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto
|
3464 | * @throws {Error} If the payload is not a reader or valid buffer
|
3465 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
3466 | */
|
3467 | FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) {
|
3468 | if (!(reader instanceof $Reader))
|
3469 | reader = new $Reader(reader);
|
3470 | return this.decode(reader, reader.uint32());
|
3471 | };
|
3472 |
|
3473 | /**
|
3474 | * Verifies a FileDescriptorProto message.
|
3475 | * @function verify
|
3476 | * @memberof google.protobuf.FileDescriptorProto
|
3477 | * @static
|
3478 | * @param {Object.<string,*>} message Plain object to verify
|
3479 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
3480 | */
|
3481 | FileDescriptorProto.verify = function verify(message) {
|
3482 | if (typeof message !== "object" || message === null)
|
3483 | return "object expected";
|
3484 | if (message.name != null && message.hasOwnProperty("name"))
|
3485 | if (!$util.isString(message.name))
|
3486 | return "name: string expected";
|
3487 | if (message["package"] != null && message.hasOwnProperty("package"))
|
3488 | if (!$util.isString(message["package"]))
|
3489 | return "package: string expected";
|
3490 | if (message.dependency != null && message.hasOwnProperty("dependency")) {
|
3491 | if (!Array.isArray(message.dependency))
|
3492 | return "dependency: array expected";
|
3493 | for (var i = 0; i < message.dependency.length; ++i)
|
3494 | if (!$util.isString(message.dependency[i]))
|
3495 | return "dependency: string[] expected";
|
3496 | }
|
3497 | if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) {
|
3498 | if (!Array.isArray(message.publicDependency))
|
3499 | return "publicDependency: array expected";
|
3500 | for (var i = 0; i < message.publicDependency.length; ++i)
|
3501 | if (!$util.isInteger(message.publicDependency[i]))
|
3502 | return "publicDependency: integer[] expected";
|
3503 | }
|
3504 | if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) {
|
3505 | if (!Array.isArray(message.weakDependency))
|
3506 | return "weakDependency: array expected";
|
3507 | for (var i = 0; i < message.weakDependency.length; ++i)
|
3508 | if (!$util.isInteger(message.weakDependency[i]))
|
3509 | return "weakDependency: integer[] expected";
|
3510 | }
|
3511 | if (message.messageType != null && message.hasOwnProperty("messageType")) {
|
3512 | if (!Array.isArray(message.messageType))
|
3513 | return "messageType: array expected";
|
3514 | for (var i = 0; i < message.messageType.length; ++i) {
|
3515 | var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]);
|
3516 | if (error)
|
3517 | return "messageType." + error;
|
3518 | }
|
3519 | }
|
3520 | if (message.enumType != null && message.hasOwnProperty("enumType")) {
|
3521 | if (!Array.isArray(message.enumType))
|
3522 | return "enumType: array expected";
|
3523 | for (var i = 0; i < message.enumType.length; ++i) {
|
3524 | var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]);
|
3525 | if (error)
|
3526 | return "enumType." + error;
|
3527 | }
|
3528 | }
|
3529 | if (message.service != null && message.hasOwnProperty("service")) {
|
3530 | if (!Array.isArray(message.service))
|
3531 | return "service: array expected";
|
3532 | for (var i = 0; i < message.service.length; ++i) {
|
3533 | var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]);
|
3534 | if (error)
|
3535 | return "service." + error;
|
3536 | }
|
3537 | }
|
3538 | if (message.extension != null && message.hasOwnProperty("extension")) {
|
3539 | if (!Array.isArray(message.extension))
|
3540 | return "extension: array expected";
|
3541 | for (var i = 0; i < message.extension.length; ++i) {
|
3542 | var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]);
|
3543 | if (error)
|
3544 | return "extension." + error;
|
3545 | }
|
3546 | }
|
3547 | if (message.options != null && message.hasOwnProperty("options")) {
|
3548 | var error = $root.google.protobuf.FileOptions.verify(message.options);
|
3549 | if (error)
|
3550 | return "options." + error;
|
3551 | }
|
3552 | if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) {
|
3553 | var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo);
|
3554 | if (error)
|
3555 | return "sourceCodeInfo." + error;
|
3556 | }
|
3557 | if (message.syntax != null && message.hasOwnProperty("syntax"))
|
3558 | if (!$util.isString(message.syntax))
|
3559 | return "syntax: string expected";
|
3560 | return null;
|
3561 | };
|
3562 |
|
3563 | /**
|
3564 | * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types.
|
3565 | * @function fromObject
|
3566 | * @memberof google.protobuf.FileDescriptorProto
|
3567 | * @static
|
3568 | * @param {Object.<string,*>} object Plain object
|
3569 | * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto
|
3570 | */
|
3571 | FileDescriptorProto.fromObject = function fromObject(object) {
|
3572 | if (object instanceof $root.google.protobuf.FileDescriptorProto)
|
3573 | return object;
|
3574 | var message = new $root.google.protobuf.FileDescriptorProto();
|
3575 | if (object.name != null)
|
3576 | message.name = String(object.name);
|
3577 | if (object["package"] != null)
|
3578 | message["package"] = String(object["package"]);
|
3579 | if (object.dependency) {
|
3580 | if (!Array.isArray(object.dependency))
|
3581 | throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected");
|
3582 | message.dependency = [];
|
3583 | for (var i = 0; i < object.dependency.length; ++i)
|
3584 | message.dependency[i] = String(object.dependency[i]);
|
3585 | }
|
3586 | if (object.publicDependency) {
|
3587 | if (!Array.isArray(object.publicDependency))
|
3588 | throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected");
|
3589 | message.publicDependency = [];
|
3590 | for (var i = 0; i < object.publicDependency.length; ++i)
|
3591 | message.publicDependency[i] = object.publicDependency[i] | 0;
|
3592 | }
|
3593 | if (object.weakDependency) {
|
3594 | if (!Array.isArray(object.weakDependency))
|
3595 | throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected");
|
3596 | message.weakDependency = [];
|
3597 | for (var i = 0; i < object.weakDependency.length; ++i)
|
3598 | message.weakDependency[i] = object.weakDependency[i] | 0;
|
3599 | }
|
3600 | if (object.messageType) {
|
3601 | if (!Array.isArray(object.messageType))
|
3602 | throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected");
|
3603 | message.messageType = [];
|
3604 | for (var i = 0; i < object.messageType.length; ++i) {
|
3605 | if (typeof object.messageType[i] !== "object")
|
3606 | throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected");
|
3607 | message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]);
|
3608 | }
|
3609 | }
|
3610 | if (object.enumType) {
|
3611 | if (!Array.isArray(object.enumType))
|
3612 | throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected");
|
3613 | message.enumType = [];
|
3614 | for (var i = 0; i < object.enumType.length; ++i) {
|
3615 | if (typeof object.enumType[i] !== "object")
|
3616 | throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected");
|
3617 | message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]);
|
3618 | }
|
3619 | }
|
3620 | if (object.service) {
|
3621 | if (!Array.isArray(object.service))
|
3622 | throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected");
|
3623 | message.service = [];
|
3624 | for (var i = 0; i < object.service.length; ++i) {
|
3625 | if (typeof object.service[i] !== "object")
|
3626 | throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected");
|
3627 | message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]);
|
3628 | }
|
3629 | }
|
3630 | if (object.extension) {
|
3631 | if (!Array.isArray(object.extension))
|
3632 | throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected");
|
3633 | message.extension = [];
|
3634 | for (var i = 0; i < object.extension.length; ++i) {
|
3635 | if (typeof object.extension[i] !== "object")
|
3636 | throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected");
|
3637 | message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]);
|
3638 | }
|
3639 | }
|
3640 | if (object.options != null) {
|
3641 | if (typeof object.options !== "object")
|
3642 | throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected");
|
3643 | message.options = $root.google.protobuf.FileOptions.fromObject(object.options);
|
3644 | }
|
3645 | if (object.sourceCodeInfo != null) {
|
3646 | if (typeof object.sourceCodeInfo !== "object")
|
3647 | throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected");
|
3648 | message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo);
|
3649 | }
|
3650 | if (object.syntax != null)
|
3651 | message.syntax = String(object.syntax);
|
3652 | return message;
|
3653 | };
|
3654 |
|
3655 | /**
|
3656 | * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified.
|
3657 | * @function toObject
|
3658 | * @memberof google.protobuf.FileDescriptorProto
|
3659 | * @static
|
3660 | * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto
|
3661 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
3662 | * @returns {Object.<string,*>} Plain object
|
3663 | */
|
3664 | FileDescriptorProto.toObject = function toObject(message, options) {
|
3665 | if (!options)
|
3666 | options = {};
|
3667 | var object = {};
|
3668 | if (options.arrays || options.defaults) {
|
3669 | object.dependency = [];
|
3670 | object.messageType = [];
|
3671 | object.enumType = [];
|
3672 | object.service = [];
|
3673 | object.extension = [];
|
3674 | object.publicDependency = [];
|
3675 | object.weakDependency = [];
|
3676 | }
|
3677 | if (options.defaults) {
|
3678 | object.name = "";
|
3679 | object["package"] = "";
|
3680 | object.options = null;
|
3681 | object.sourceCodeInfo = null;
|
3682 | object.syntax = "";
|
3683 | }
|
3684 | if (message.name != null && message.hasOwnProperty("name"))
|
3685 | object.name = message.name;
|
3686 | if (message["package"] != null && message.hasOwnProperty("package"))
|
3687 | object["package"] = message["package"];
|
3688 | if (message.dependency && message.dependency.length) {
|
3689 | object.dependency = [];
|
3690 | for (var j = 0; j < message.dependency.length; ++j)
|
3691 | object.dependency[j] = message.dependency[j];
|
3692 | }
|
3693 | if (message.messageType && message.messageType.length) {
|
3694 | object.messageType = [];
|
3695 | for (var j = 0; j < message.messageType.length; ++j)
|
3696 | object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options);
|
3697 | }
|
3698 | if (message.enumType && message.enumType.length) {
|
3699 | object.enumType = [];
|
3700 | for (var j = 0; j < message.enumType.length; ++j)
|
3701 | object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options);
|
3702 | }
|
3703 | if (message.service && message.service.length) {
|
3704 | object.service = [];
|
3705 | for (var j = 0; j < message.service.length; ++j)
|
3706 | object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options);
|
3707 | }
|
3708 | if (message.extension && message.extension.length) {
|
3709 | object.extension = [];
|
3710 | for (var j = 0; j < message.extension.length; ++j)
|
3711 | object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options);
|
3712 | }
|
3713 | if (message.options != null && message.hasOwnProperty("options"))
|
3714 | object.options = $root.google.protobuf.FileOptions.toObject(message.options, options);
|
3715 | if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo"))
|
3716 | object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options);
|
3717 | if (message.publicDependency && message.publicDependency.length) {
|
3718 | object.publicDependency = [];
|
3719 | for (var j = 0; j < message.publicDependency.length; ++j)
|
3720 | object.publicDependency[j] = message.publicDependency[j];
|
3721 | }
|
3722 | if (message.weakDependency && message.weakDependency.length) {
|
3723 | object.weakDependency = [];
|
3724 | for (var j = 0; j < message.weakDependency.length; ++j)
|
3725 | object.weakDependency[j] = message.weakDependency[j];
|
3726 | }
|
3727 | if (message.syntax != null && message.hasOwnProperty("syntax"))
|
3728 | object.syntax = message.syntax;
|
3729 | return object;
|
3730 | };
|
3731 |
|
3732 | /**
|
3733 | * Converts this FileDescriptorProto to JSON.
|
3734 | * @function toJSON
|
3735 | * @memberof google.protobuf.FileDescriptorProto
|
3736 | * @instance
|
3737 | * @returns {Object.<string,*>} JSON object
|
3738 | */
|
3739 | FileDescriptorProto.prototype.toJSON = function toJSON() {
|
3740 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
3741 | };
|
3742 |
|
3743 | return FileDescriptorProto;
|
3744 | })();
|
3745 |
|
3746 | protobuf.DescriptorProto = (function() {
|
3747 |
|
3748 | /**
|
3749 | * Properties of a DescriptorProto.
|
3750 | * @memberof google.protobuf
|
3751 | * @interface IDescriptorProto
|
3752 | * @property {string|null} [name] DescriptorProto name
|
3753 | * @property {Array.<google.protobuf.IFieldDescriptorProto>|null} [field] DescriptorProto field
|
3754 | * @property {Array.<google.protobuf.IFieldDescriptorProto>|null} [extension] DescriptorProto extension
|
3755 | * @property {Array.<google.protobuf.IDescriptorProto>|null} [nestedType] DescriptorProto nestedType
|
3756 | * @property {Array.<google.protobuf.IEnumDescriptorProto>|null} [enumType] DescriptorProto enumType
|
3757 | * @property {Array.<google.protobuf.DescriptorProto.IExtensionRange>|null} [extensionRange] DescriptorProto extensionRange
|
3758 | * @property {Array.<google.protobuf.IOneofDescriptorProto>|null} [oneofDecl] DescriptorProto oneofDecl
|
3759 | * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options
|
3760 | * @property {Array.<google.protobuf.DescriptorProto.IReservedRange>|null} [reservedRange] DescriptorProto reservedRange
|
3761 | * @property {Array.<string>|null} [reservedName] DescriptorProto reservedName
|
3762 | */
|
3763 |
|
3764 | /**
|
3765 | * Constructs a new DescriptorProto.
|
3766 | * @memberof google.protobuf
|
3767 | * @classdesc Represents a DescriptorProto.
|
3768 | * @implements IDescriptorProto
|
3769 | * @constructor
|
3770 | * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set
|
3771 | */
|
3772 | function DescriptorProto(properties) {
|
3773 | this.field = [];
|
3774 | this.extension = [];
|
3775 | this.nestedType = [];
|
3776 | this.enumType = [];
|
3777 | this.extensionRange = [];
|
3778 | this.oneofDecl = [];
|
3779 | this.reservedRange = [];
|
3780 | this.reservedName = [];
|
3781 | if (properties)
|
3782 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
3783 | if (properties[keys[i]] != null)
|
3784 | this[keys[i]] = properties[keys[i]];
|
3785 | }
|
3786 |
|
3787 | /**
|
3788 | * DescriptorProto name.
|
3789 | * @member {string} name
|
3790 | * @memberof google.protobuf.DescriptorProto
|
3791 | * @instance
|
3792 | */
|
3793 | DescriptorProto.prototype.name = "";
|
3794 |
|
3795 | /**
|
3796 | * DescriptorProto field.
|
3797 | * @member {Array.<google.protobuf.IFieldDescriptorProto>} field
|
3798 | * @memberof google.protobuf.DescriptorProto
|
3799 | * @instance
|
3800 | */
|
3801 | DescriptorProto.prototype.field = $util.emptyArray;
|
3802 |
|
3803 | /**
|
3804 | * DescriptorProto extension.
|
3805 | * @member {Array.<google.protobuf.IFieldDescriptorProto>} extension
|
3806 | * @memberof google.protobuf.DescriptorProto
|
3807 | * @instance
|
3808 | */
|
3809 | DescriptorProto.prototype.extension = $util.emptyArray;
|
3810 |
|
3811 | /**
|
3812 | * DescriptorProto nestedType.
|
3813 | * @member {Array.<google.protobuf.IDescriptorProto>} nestedType
|
3814 | * @memberof google.protobuf.DescriptorProto
|
3815 | * @instance
|
3816 | */
|
3817 | DescriptorProto.prototype.nestedType = $util.emptyArray;
|
3818 |
|
3819 | /**
|
3820 | * DescriptorProto enumType.
|
3821 | * @member {Array.<google.protobuf.IEnumDescriptorProto>} enumType
|
3822 | * @memberof google.protobuf.DescriptorProto
|
3823 | * @instance
|
3824 | */
|
3825 | DescriptorProto.prototype.enumType = $util.emptyArray;
|
3826 |
|
3827 | /**
|
3828 | * DescriptorProto extensionRange.
|
3829 | * @member {Array.<google.protobuf.DescriptorProto.IExtensionRange>} extensionRange
|
3830 | * @memberof google.protobuf.DescriptorProto
|
3831 | * @instance
|
3832 | */
|
3833 | DescriptorProto.prototype.extensionRange = $util.emptyArray;
|
3834 |
|
3835 | /**
|
3836 | * DescriptorProto oneofDecl.
|
3837 | * @member {Array.<google.protobuf.IOneofDescriptorProto>} oneofDecl
|
3838 | * @memberof google.protobuf.DescriptorProto
|
3839 | * @instance
|
3840 | */
|
3841 | DescriptorProto.prototype.oneofDecl = $util.emptyArray;
|
3842 |
|
3843 | /**
|
3844 | * DescriptorProto options.
|
3845 | * @member {google.protobuf.IMessageOptions|null|undefined} options
|
3846 | * @memberof google.protobuf.DescriptorProto
|
3847 | * @instance
|
3848 | */
|
3849 | DescriptorProto.prototype.options = null;
|
3850 |
|
3851 | /**
|
3852 | * DescriptorProto reservedRange.
|
3853 | * @member {Array.<google.protobuf.DescriptorProto.IReservedRange>} reservedRange
|
3854 | * @memberof google.protobuf.DescriptorProto
|
3855 | * @instance
|
3856 | */
|
3857 | DescriptorProto.prototype.reservedRange = $util.emptyArray;
|
3858 |
|
3859 | /**
|
3860 | * DescriptorProto reservedName.
|
3861 | * @member {Array.<string>} reservedName
|
3862 | * @memberof google.protobuf.DescriptorProto
|
3863 | * @instance
|
3864 | */
|
3865 | DescriptorProto.prototype.reservedName = $util.emptyArray;
|
3866 |
|
3867 | /**
|
3868 | * Creates a new DescriptorProto instance using the specified properties.
|
3869 | * @function create
|
3870 | * @memberof google.protobuf.DescriptorProto
|
3871 | * @static
|
3872 | * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set
|
3873 | * @returns {google.protobuf.DescriptorProto} DescriptorProto instance
|
3874 | */
|
3875 | DescriptorProto.create = function create(properties) {
|
3876 | return new DescriptorProto(properties);
|
3877 | };
|
3878 |
|
3879 | /**
|
3880 | * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages.
|
3881 | * @function encode
|
3882 | * @memberof google.protobuf.DescriptorProto
|
3883 | * @static
|
3884 | * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode
|
3885 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
3886 | * @returns {$protobuf.Writer} Writer
|
3887 | */
|
3888 | DescriptorProto.encode = function encode(message, writer) {
|
3889 | if (!writer)
|
3890 | writer = $Writer.create();
|
3891 | if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
3892 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
3893 | if (message.field != null && message.field.length)
|
3894 | for (var i = 0; i < message.field.length; ++i)
|
3895 | $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
3896 | if (message.nestedType != null && message.nestedType.length)
|
3897 | for (var i = 0; i < message.nestedType.length; ++i)
|
3898 | $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
3899 | if (message.enumType != null && message.enumType.length)
|
3900 | for (var i = 0; i < message.enumType.length; ++i)
|
3901 | $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
3902 | if (message.extensionRange != null && message.extensionRange.length)
|
3903 | for (var i = 0; i < message.extensionRange.length; ++i)
|
3904 | $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
|
3905 | if (message.extension != null && message.extension.length)
|
3906 | for (var i = 0; i < message.extension.length; ++i)
|
3907 | $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
|
3908 | if (message.options != null && Object.hasOwnProperty.call(message, "options"))
|
3909 | $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
|
3910 | if (message.oneofDecl != null && message.oneofDecl.length)
|
3911 | for (var i = 0; i < message.oneofDecl.length; ++i)
|
3912 | $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
|
3913 | if (message.reservedRange != null && message.reservedRange.length)
|
3914 | for (var i = 0; i < message.reservedRange.length; ++i)
|
3915 | $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
|
3916 | if (message.reservedName != null && message.reservedName.length)
|
3917 | for (var i = 0; i < message.reservedName.length; ++i)
|
3918 | writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]);
|
3919 | return writer;
|
3920 | };
|
3921 |
|
3922 | /**
|
3923 | * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages.
|
3924 | * @function encodeDelimited
|
3925 | * @memberof google.protobuf.DescriptorProto
|
3926 | * @static
|
3927 | * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode
|
3928 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
3929 | * @returns {$protobuf.Writer} Writer
|
3930 | */
|
3931 | DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) {
|
3932 | return this.encode(message, writer).ldelim();
|
3933 | };
|
3934 |
|
3935 | /**
|
3936 | * Decodes a DescriptorProto message from the specified reader or buffer.
|
3937 | * @function decode
|
3938 | * @memberof google.protobuf.DescriptorProto
|
3939 | * @static
|
3940 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
3941 | * @param {number} [length] Message length if known beforehand
|
3942 | * @returns {google.protobuf.DescriptorProto} DescriptorProto
|
3943 | * @throws {Error} If the payload is not a reader or valid buffer
|
3944 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
3945 | */
|
3946 | DescriptorProto.decode = function decode(reader, length) {
|
3947 | if (!(reader instanceof $Reader))
|
3948 | reader = $Reader.create(reader);
|
3949 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto();
|
3950 | while (reader.pos < end) {
|
3951 | var tag = reader.uint32();
|
3952 | switch (tag >>> 3) {
|
3953 | case 1:
|
3954 | message.name = reader.string();
|
3955 | break;
|
3956 | case 2:
|
3957 | if (!(message.field && message.field.length))
|
3958 | message.field = [];
|
3959 | message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32()));
|
3960 | break;
|
3961 | case 6:
|
3962 | if (!(message.extension && message.extension.length))
|
3963 | message.extension = [];
|
3964 | message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32()));
|
3965 | break;
|
3966 | case 3:
|
3967 | if (!(message.nestedType && message.nestedType.length))
|
3968 | message.nestedType = [];
|
3969 | message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32()));
|
3970 | break;
|
3971 | case 4:
|
3972 | if (!(message.enumType && message.enumType.length))
|
3973 | message.enumType = [];
|
3974 | message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32()));
|
3975 | break;
|
3976 | case 5:
|
3977 | if (!(message.extensionRange && message.extensionRange.length))
|
3978 | message.extensionRange = [];
|
3979 | message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32()));
|
3980 | break;
|
3981 | case 8:
|
3982 | if (!(message.oneofDecl && message.oneofDecl.length))
|
3983 | message.oneofDecl = [];
|
3984 | message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32()));
|
3985 | break;
|
3986 | case 7:
|
3987 | message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32());
|
3988 | break;
|
3989 | case 9:
|
3990 | if (!(message.reservedRange && message.reservedRange.length))
|
3991 | message.reservedRange = [];
|
3992 | message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32()));
|
3993 | break;
|
3994 | case 10:
|
3995 | if (!(message.reservedName && message.reservedName.length))
|
3996 | message.reservedName = [];
|
3997 | message.reservedName.push(reader.string());
|
3998 | break;
|
3999 | default:
|
4000 | reader.skipType(tag & 7);
|
4001 | break;
|
4002 | }
|
4003 | }
|
4004 | return message;
|
4005 | };
|
4006 |
|
4007 | /**
|
4008 | * Decodes a DescriptorProto message from the specified reader or buffer, length delimited.
|
4009 | * @function decodeDelimited
|
4010 | * @memberof google.protobuf.DescriptorProto
|
4011 | * @static
|
4012 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
4013 | * @returns {google.protobuf.DescriptorProto} DescriptorProto
|
4014 | * @throws {Error} If the payload is not a reader or valid buffer
|
4015 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
4016 | */
|
4017 | DescriptorProto.decodeDelimited = function decodeDelimited(reader) {
|
4018 | if (!(reader instanceof $Reader))
|
4019 | reader = new $Reader(reader);
|
4020 | return this.decode(reader, reader.uint32());
|
4021 | };
|
4022 |
|
4023 | /**
|
4024 | * Verifies a DescriptorProto message.
|
4025 | * @function verify
|
4026 | * @memberof google.protobuf.DescriptorProto
|
4027 | * @static
|
4028 | * @param {Object.<string,*>} message Plain object to verify
|
4029 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
4030 | */
|
4031 | DescriptorProto.verify = function verify(message) {
|
4032 | if (typeof message !== "object" || message === null)
|
4033 | return "object expected";
|
4034 | if (message.name != null && message.hasOwnProperty("name"))
|
4035 | if (!$util.isString(message.name))
|
4036 | return "name: string expected";
|
4037 | if (message.field != null && message.hasOwnProperty("field")) {
|
4038 | if (!Array.isArray(message.field))
|
4039 | return "field: array expected";
|
4040 | for (var i = 0; i < message.field.length; ++i) {
|
4041 | var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]);
|
4042 | if (error)
|
4043 | return "field." + error;
|
4044 | }
|
4045 | }
|
4046 | if (message.extension != null && message.hasOwnProperty("extension")) {
|
4047 | if (!Array.isArray(message.extension))
|
4048 | return "extension: array expected";
|
4049 | for (var i = 0; i < message.extension.length; ++i) {
|
4050 | var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]);
|
4051 | if (error)
|
4052 | return "extension." + error;
|
4053 | }
|
4054 | }
|
4055 | if (message.nestedType != null && message.hasOwnProperty("nestedType")) {
|
4056 | if (!Array.isArray(message.nestedType))
|
4057 | return "nestedType: array expected";
|
4058 | for (var i = 0; i < message.nestedType.length; ++i) {
|
4059 | var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]);
|
4060 | if (error)
|
4061 | return "nestedType." + error;
|
4062 | }
|
4063 | }
|
4064 | if (message.enumType != null && message.hasOwnProperty("enumType")) {
|
4065 | if (!Array.isArray(message.enumType))
|
4066 | return "enumType: array expected";
|
4067 | for (var i = 0; i < message.enumType.length; ++i) {
|
4068 | var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]);
|
4069 | if (error)
|
4070 | return "enumType." + error;
|
4071 | }
|
4072 | }
|
4073 | if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) {
|
4074 | if (!Array.isArray(message.extensionRange))
|
4075 | return "extensionRange: array expected";
|
4076 | for (var i = 0; i < message.extensionRange.length; ++i) {
|
4077 | var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]);
|
4078 | if (error)
|
4079 | return "extensionRange." + error;
|
4080 | }
|
4081 | }
|
4082 | if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) {
|
4083 | if (!Array.isArray(message.oneofDecl))
|
4084 | return "oneofDecl: array expected";
|
4085 | for (var i = 0; i < message.oneofDecl.length; ++i) {
|
4086 | var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]);
|
4087 | if (error)
|
4088 | return "oneofDecl." + error;
|
4089 | }
|
4090 | }
|
4091 | if (message.options != null && message.hasOwnProperty("options")) {
|
4092 | var error = $root.google.protobuf.MessageOptions.verify(message.options);
|
4093 | if (error)
|
4094 | return "options." + error;
|
4095 | }
|
4096 | if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) {
|
4097 | if (!Array.isArray(message.reservedRange))
|
4098 | return "reservedRange: array expected";
|
4099 | for (var i = 0; i < message.reservedRange.length; ++i) {
|
4100 | var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]);
|
4101 | if (error)
|
4102 | return "reservedRange." + error;
|
4103 | }
|
4104 | }
|
4105 | if (message.reservedName != null && message.hasOwnProperty("reservedName")) {
|
4106 | if (!Array.isArray(message.reservedName))
|
4107 | return "reservedName: array expected";
|
4108 | for (var i = 0; i < message.reservedName.length; ++i)
|
4109 | if (!$util.isString(message.reservedName[i]))
|
4110 | return "reservedName: string[] expected";
|
4111 | }
|
4112 | return null;
|
4113 | };
|
4114 |
|
4115 | /**
|
4116 | * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types.
|
4117 | * @function fromObject
|
4118 | * @memberof google.protobuf.DescriptorProto
|
4119 | * @static
|
4120 | * @param {Object.<string,*>} object Plain object
|
4121 | * @returns {google.protobuf.DescriptorProto} DescriptorProto
|
4122 | */
|
4123 | DescriptorProto.fromObject = function fromObject(object) {
|
4124 | if (object instanceof $root.google.protobuf.DescriptorProto)
|
4125 | return object;
|
4126 | var message = new $root.google.protobuf.DescriptorProto();
|
4127 | if (object.name != null)
|
4128 | message.name = String(object.name);
|
4129 | if (object.field) {
|
4130 | if (!Array.isArray(object.field))
|
4131 | throw TypeError(".google.protobuf.DescriptorProto.field: array expected");
|
4132 | message.field = [];
|
4133 | for (var i = 0; i < object.field.length; ++i) {
|
4134 | if (typeof object.field[i] !== "object")
|
4135 | throw TypeError(".google.protobuf.DescriptorProto.field: object expected");
|
4136 | message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]);
|
4137 | }
|
4138 | }
|
4139 | if (object.extension) {
|
4140 | if (!Array.isArray(object.extension))
|
4141 | throw TypeError(".google.protobuf.DescriptorProto.extension: array expected");
|
4142 | message.extension = [];
|
4143 | for (var i = 0; i < object.extension.length; ++i) {
|
4144 | if (typeof object.extension[i] !== "object")
|
4145 | throw TypeError(".google.protobuf.DescriptorProto.extension: object expected");
|
4146 | message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]);
|
4147 | }
|
4148 | }
|
4149 | if (object.nestedType) {
|
4150 | if (!Array.isArray(object.nestedType))
|
4151 | throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected");
|
4152 | message.nestedType = [];
|
4153 | for (var i = 0; i < object.nestedType.length; ++i) {
|
4154 | if (typeof object.nestedType[i] !== "object")
|
4155 | throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected");
|
4156 | message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]);
|
4157 | }
|
4158 | }
|
4159 | if (object.enumType) {
|
4160 | if (!Array.isArray(object.enumType))
|
4161 | throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected");
|
4162 | message.enumType = [];
|
4163 | for (var i = 0; i < object.enumType.length; ++i) {
|
4164 | if (typeof object.enumType[i] !== "object")
|
4165 | throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected");
|
4166 | message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]);
|
4167 | }
|
4168 | }
|
4169 | if (object.extensionRange) {
|
4170 | if (!Array.isArray(object.extensionRange))
|
4171 | throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected");
|
4172 | message.extensionRange = [];
|
4173 | for (var i = 0; i < object.extensionRange.length; ++i) {
|
4174 | if (typeof object.extensionRange[i] !== "object")
|
4175 | throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected");
|
4176 | message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]);
|
4177 | }
|
4178 | }
|
4179 | if (object.oneofDecl) {
|
4180 | if (!Array.isArray(object.oneofDecl))
|
4181 | throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected");
|
4182 | message.oneofDecl = [];
|
4183 | for (var i = 0; i < object.oneofDecl.length; ++i) {
|
4184 | if (typeof object.oneofDecl[i] !== "object")
|
4185 | throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected");
|
4186 | message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]);
|
4187 | }
|
4188 | }
|
4189 | if (object.options != null) {
|
4190 | if (typeof object.options !== "object")
|
4191 | throw TypeError(".google.protobuf.DescriptorProto.options: object expected");
|
4192 | message.options = $root.google.protobuf.MessageOptions.fromObject(object.options);
|
4193 | }
|
4194 | if (object.reservedRange) {
|
4195 | if (!Array.isArray(object.reservedRange))
|
4196 | throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected");
|
4197 | message.reservedRange = [];
|
4198 | for (var i = 0; i < object.reservedRange.length; ++i) {
|
4199 | if (typeof object.reservedRange[i] !== "object")
|
4200 | throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected");
|
4201 | message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]);
|
4202 | }
|
4203 | }
|
4204 | if (object.reservedName) {
|
4205 | if (!Array.isArray(object.reservedName))
|
4206 | throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected");
|
4207 | message.reservedName = [];
|
4208 | for (var i = 0; i < object.reservedName.length; ++i)
|
4209 | message.reservedName[i] = String(object.reservedName[i]);
|
4210 | }
|
4211 | return message;
|
4212 | };
|
4213 |
|
4214 | /**
|
4215 | * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified.
|
4216 | * @function toObject
|
4217 | * @memberof google.protobuf.DescriptorProto
|
4218 | * @static
|
4219 | * @param {google.protobuf.DescriptorProto} message DescriptorProto
|
4220 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
4221 | * @returns {Object.<string,*>} Plain object
|
4222 | */
|
4223 | DescriptorProto.toObject = function toObject(message, options) {
|
4224 | if (!options)
|
4225 | options = {};
|
4226 | var object = {};
|
4227 | if (options.arrays || options.defaults) {
|
4228 | object.field = [];
|
4229 | object.nestedType = [];
|
4230 | object.enumType = [];
|
4231 | object.extensionRange = [];
|
4232 | object.extension = [];
|
4233 | object.oneofDecl = [];
|
4234 | object.reservedRange = [];
|
4235 | object.reservedName = [];
|
4236 | }
|
4237 | if (options.defaults) {
|
4238 | object.name = "";
|
4239 | object.options = null;
|
4240 | }
|
4241 | if (message.name != null && message.hasOwnProperty("name"))
|
4242 | object.name = message.name;
|
4243 | if (message.field && message.field.length) {
|
4244 | object.field = [];
|
4245 | for (var j = 0; j < message.field.length; ++j)
|
4246 | object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options);
|
4247 | }
|
4248 | if (message.nestedType && message.nestedType.length) {
|
4249 | object.nestedType = [];
|
4250 | for (var j = 0; j < message.nestedType.length; ++j)
|
4251 | object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options);
|
4252 | }
|
4253 | if (message.enumType && message.enumType.length) {
|
4254 | object.enumType = [];
|
4255 | for (var j = 0; j < message.enumType.length; ++j)
|
4256 | object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options);
|
4257 | }
|
4258 | if (message.extensionRange && message.extensionRange.length) {
|
4259 | object.extensionRange = [];
|
4260 | for (var j = 0; j < message.extensionRange.length; ++j)
|
4261 | object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options);
|
4262 | }
|
4263 | if (message.extension && message.extension.length) {
|
4264 | object.extension = [];
|
4265 | for (var j = 0; j < message.extension.length; ++j)
|
4266 | object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options);
|
4267 | }
|
4268 | if (message.options != null && message.hasOwnProperty("options"))
|
4269 | object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options);
|
4270 | if (message.oneofDecl && message.oneofDecl.length) {
|
4271 | object.oneofDecl = [];
|
4272 | for (var j = 0; j < message.oneofDecl.length; ++j)
|
4273 | object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options);
|
4274 | }
|
4275 | if (message.reservedRange && message.reservedRange.length) {
|
4276 | object.reservedRange = [];
|
4277 | for (var j = 0; j < message.reservedRange.length; ++j)
|
4278 | object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options);
|
4279 | }
|
4280 | if (message.reservedName && message.reservedName.length) {
|
4281 | object.reservedName = [];
|
4282 | for (var j = 0; j < message.reservedName.length; ++j)
|
4283 | object.reservedName[j] = message.reservedName[j];
|
4284 | }
|
4285 | return object;
|
4286 | };
|
4287 |
|
4288 | /**
|
4289 | * Converts this DescriptorProto to JSON.
|
4290 | * @function toJSON
|
4291 | * @memberof google.protobuf.DescriptorProto
|
4292 | * @instance
|
4293 | * @returns {Object.<string,*>} JSON object
|
4294 | */
|
4295 | DescriptorProto.prototype.toJSON = function toJSON() {
|
4296 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
4297 | };
|
4298 |
|
4299 | DescriptorProto.ExtensionRange = (function() {
|
4300 |
|
4301 | /**
|
4302 | * Properties of an ExtensionRange.
|
4303 | * @memberof google.protobuf.DescriptorProto
|
4304 | * @interface IExtensionRange
|
4305 | * @property {number|null} [start] ExtensionRange start
|
4306 | * @property {number|null} [end] ExtensionRange end
|
4307 | * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options
|
4308 | */
|
4309 |
|
4310 | /**
|
4311 | * Constructs a new ExtensionRange.
|
4312 | * @memberof google.protobuf.DescriptorProto
|
4313 | * @classdesc Represents an ExtensionRange.
|
4314 | * @implements IExtensionRange
|
4315 | * @constructor
|
4316 | * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set
|
4317 | */
|
4318 | function ExtensionRange(properties) {
|
4319 | if (properties)
|
4320 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
4321 | if (properties[keys[i]] != null)
|
4322 | this[keys[i]] = properties[keys[i]];
|
4323 | }
|
4324 |
|
4325 | /**
|
4326 | * ExtensionRange start.
|
4327 | * @member {number} start
|
4328 | * @memberof google.protobuf.DescriptorProto.ExtensionRange
|
4329 | * @instance
|
4330 | */
|
4331 | ExtensionRange.prototype.start = 0;
|
4332 |
|
4333 | /**
|
4334 | * ExtensionRange end.
|
4335 | * @member {number} end
|
4336 | * @memberof google.protobuf.DescriptorProto.ExtensionRange
|
4337 | * @instance
|
4338 | */
|
4339 | ExtensionRange.prototype.end = 0;
|
4340 |
|
4341 | /**
|
4342 | * ExtensionRange options.
|
4343 | * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options
|
4344 | * @memberof google.protobuf.DescriptorProto.ExtensionRange
|
4345 | * @instance
|
4346 | */
|
4347 | ExtensionRange.prototype.options = null;
|
4348 |
|
4349 | /**
|
4350 | * Creates a new ExtensionRange instance using the specified properties.
|
4351 | * @function create
|
4352 | * @memberof google.protobuf.DescriptorProto.ExtensionRange
|
4353 | * @static
|
4354 | * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set
|
4355 | * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance
|
4356 | */
|
4357 | ExtensionRange.create = function create(properties) {
|
4358 | return new ExtensionRange(properties);
|
4359 | };
|
4360 |
|
4361 | /**
|
4362 | * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages.
|
4363 | * @function encode
|
4364 | * @memberof google.protobuf.DescriptorProto.ExtensionRange
|
4365 | * @static
|
4366 | * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode
|
4367 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
4368 | * @returns {$protobuf.Writer} Writer
|
4369 | */
|
4370 | ExtensionRange.encode = function encode(message, writer) {
|
4371 | if (!writer)
|
4372 | writer = $Writer.create();
|
4373 | if (message.start != null && Object.hasOwnProperty.call(message, "start"))
|
4374 | writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start);
|
4375 | if (message.end != null && Object.hasOwnProperty.call(message, "end"))
|
4376 | writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end);
|
4377 | if (message.options != null && Object.hasOwnProperty.call(message, "options"))
|
4378 | $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
4379 | return writer;
|
4380 | };
|
4381 |
|
4382 | /**
|
4383 | * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages.
|
4384 | * @function encodeDelimited
|
4385 | * @memberof google.protobuf.DescriptorProto.ExtensionRange
|
4386 | * @static
|
4387 | * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode
|
4388 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
4389 | * @returns {$protobuf.Writer} Writer
|
4390 | */
|
4391 | ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) {
|
4392 | return this.encode(message, writer).ldelim();
|
4393 | };
|
4394 |
|
4395 | /**
|
4396 | * Decodes an ExtensionRange message from the specified reader or buffer.
|
4397 | * @function decode
|
4398 | * @memberof google.protobuf.DescriptorProto.ExtensionRange
|
4399 | * @static
|
4400 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
4401 | * @param {number} [length] Message length if known beforehand
|
4402 | * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange
|
4403 | * @throws {Error} If the payload is not a reader or valid buffer
|
4404 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
4405 | */
|
4406 | ExtensionRange.decode = function decode(reader, length) {
|
4407 | if (!(reader instanceof $Reader))
|
4408 | reader = $Reader.create(reader);
|
4409 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange();
|
4410 | while (reader.pos < end) {
|
4411 | var tag = reader.uint32();
|
4412 | switch (tag >>> 3) {
|
4413 | case 1:
|
4414 | message.start = reader.int32();
|
4415 | break;
|
4416 | case 2:
|
4417 | message.end = reader.int32();
|
4418 | break;
|
4419 | case 3:
|
4420 | message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32());
|
4421 | break;
|
4422 | default:
|
4423 | reader.skipType(tag & 7);
|
4424 | break;
|
4425 | }
|
4426 | }
|
4427 | return message;
|
4428 | };
|
4429 |
|
4430 | /**
|
4431 | * Decodes an ExtensionRange message from the specified reader or buffer, length delimited.
|
4432 | * @function decodeDelimited
|
4433 | * @memberof google.protobuf.DescriptorProto.ExtensionRange
|
4434 | * @static
|
4435 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
4436 | * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange
|
4437 | * @throws {Error} If the payload is not a reader or valid buffer
|
4438 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
4439 | */
|
4440 | ExtensionRange.decodeDelimited = function decodeDelimited(reader) {
|
4441 | if (!(reader instanceof $Reader))
|
4442 | reader = new $Reader(reader);
|
4443 | return this.decode(reader, reader.uint32());
|
4444 | };
|
4445 |
|
4446 | /**
|
4447 | * Verifies an ExtensionRange message.
|
4448 | * @function verify
|
4449 | * @memberof google.protobuf.DescriptorProto.ExtensionRange
|
4450 | * @static
|
4451 | * @param {Object.<string,*>} message Plain object to verify
|
4452 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
4453 | */
|
4454 | ExtensionRange.verify = function verify(message) {
|
4455 | if (typeof message !== "object" || message === null)
|
4456 | return "object expected";
|
4457 | if (message.start != null && message.hasOwnProperty("start"))
|
4458 | if (!$util.isInteger(message.start))
|
4459 | return "start: integer expected";
|
4460 | if (message.end != null && message.hasOwnProperty("end"))
|
4461 | if (!$util.isInteger(message.end))
|
4462 | return "end: integer expected";
|
4463 | if (message.options != null && message.hasOwnProperty("options")) {
|
4464 | var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options);
|
4465 | if (error)
|
4466 | return "options." + error;
|
4467 | }
|
4468 | return null;
|
4469 | };
|
4470 |
|
4471 | /**
|
4472 | * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types.
|
4473 | * @function fromObject
|
4474 | * @memberof google.protobuf.DescriptorProto.ExtensionRange
|
4475 | * @static
|
4476 | * @param {Object.<string,*>} object Plain object
|
4477 | * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange
|
4478 | */
|
4479 | ExtensionRange.fromObject = function fromObject(object) {
|
4480 | if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange)
|
4481 | return object;
|
4482 | var message = new $root.google.protobuf.DescriptorProto.ExtensionRange();
|
4483 | if (object.start != null)
|
4484 | message.start = object.start | 0;
|
4485 | if (object.end != null)
|
4486 | message.end = object.end | 0;
|
4487 | if (object.options != null) {
|
4488 | if (typeof object.options !== "object")
|
4489 | throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected");
|
4490 | message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options);
|
4491 | }
|
4492 | return message;
|
4493 | };
|
4494 |
|
4495 | /**
|
4496 | * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified.
|
4497 | * @function toObject
|
4498 | * @memberof google.protobuf.DescriptorProto.ExtensionRange
|
4499 | * @static
|
4500 | * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange
|
4501 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
4502 | * @returns {Object.<string,*>} Plain object
|
4503 | */
|
4504 | ExtensionRange.toObject = function toObject(message, options) {
|
4505 | if (!options)
|
4506 | options = {};
|
4507 | var object = {};
|
4508 | if (options.defaults) {
|
4509 | object.start = 0;
|
4510 | object.end = 0;
|
4511 | object.options = null;
|
4512 | }
|
4513 | if (message.start != null && message.hasOwnProperty("start"))
|
4514 | object.start = message.start;
|
4515 | if (message.end != null && message.hasOwnProperty("end"))
|
4516 | object.end = message.end;
|
4517 | if (message.options != null && message.hasOwnProperty("options"))
|
4518 | object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options);
|
4519 | return object;
|
4520 | };
|
4521 |
|
4522 | /**
|
4523 | * Converts this ExtensionRange to JSON.
|
4524 | * @function toJSON
|
4525 | * @memberof google.protobuf.DescriptorProto.ExtensionRange
|
4526 | * @instance
|
4527 | * @returns {Object.<string,*>} JSON object
|
4528 | */
|
4529 | ExtensionRange.prototype.toJSON = function toJSON() {
|
4530 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
4531 | };
|
4532 |
|
4533 | return ExtensionRange;
|
4534 | })();
|
4535 |
|
4536 | DescriptorProto.ReservedRange = (function() {
|
4537 |
|
4538 | /**
|
4539 | * Properties of a ReservedRange.
|
4540 | * @memberof google.protobuf.DescriptorProto
|
4541 | * @interface IReservedRange
|
4542 | * @property {number|null} [start] ReservedRange start
|
4543 | * @property {number|null} [end] ReservedRange end
|
4544 | */
|
4545 |
|
4546 | /**
|
4547 | * Constructs a new ReservedRange.
|
4548 | * @memberof google.protobuf.DescriptorProto
|
4549 | * @classdesc Represents a ReservedRange.
|
4550 | * @implements IReservedRange
|
4551 | * @constructor
|
4552 | * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set
|
4553 | */
|
4554 | function ReservedRange(properties) {
|
4555 | if (properties)
|
4556 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
4557 | if (properties[keys[i]] != null)
|
4558 | this[keys[i]] = properties[keys[i]];
|
4559 | }
|
4560 |
|
4561 | /**
|
4562 | * ReservedRange start.
|
4563 | * @member {number} start
|
4564 | * @memberof google.protobuf.DescriptorProto.ReservedRange
|
4565 | * @instance
|
4566 | */
|
4567 | ReservedRange.prototype.start = 0;
|
4568 |
|
4569 | /**
|
4570 | * ReservedRange end.
|
4571 | * @member {number} end
|
4572 | * @memberof google.protobuf.DescriptorProto.ReservedRange
|
4573 | * @instance
|
4574 | */
|
4575 | ReservedRange.prototype.end = 0;
|
4576 |
|
4577 | /**
|
4578 | * Creates a new ReservedRange instance using the specified properties.
|
4579 | * @function create
|
4580 | * @memberof google.protobuf.DescriptorProto.ReservedRange
|
4581 | * @static
|
4582 | * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set
|
4583 | * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance
|
4584 | */
|
4585 | ReservedRange.create = function create(properties) {
|
4586 | return new ReservedRange(properties);
|
4587 | };
|
4588 |
|
4589 | /**
|
4590 | * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages.
|
4591 | * @function encode
|
4592 | * @memberof google.protobuf.DescriptorProto.ReservedRange
|
4593 | * @static
|
4594 | * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode
|
4595 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
4596 | * @returns {$protobuf.Writer} Writer
|
4597 | */
|
4598 | ReservedRange.encode = function encode(message, writer) {
|
4599 | if (!writer)
|
4600 | writer = $Writer.create();
|
4601 | if (message.start != null && Object.hasOwnProperty.call(message, "start"))
|
4602 | writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start);
|
4603 | if (message.end != null && Object.hasOwnProperty.call(message, "end"))
|
4604 | writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end);
|
4605 | return writer;
|
4606 | };
|
4607 |
|
4608 | /**
|
4609 | * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages.
|
4610 | * @function encodeDelimited
|
4611 | * @memberof google.protobuf.DescriptorProto.ReservedRange
|
4612 | * @static
|
4613 | * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode
|
4614 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
4615 | * @returns {$protobuf.Writer} Writer
|
4616 | */
|
4617 | ReservedRange.encodeDelimited = function encodeDelimited(message, writer) {
|
4618 | return this.encode(message, writer).ldelim();
|
4619 | };
|
4620 |
|
4621 | /**
|
4622 | * Decodes a ReservedRange message from the specified reader or buffer.
|
4623 | * @function decode
|
4624 | * @memberof google.protobuf.DescriptorProto.ReservedRange
|
4625 | * @static
|
4626 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
4627 | * @param {number} [length] Message length if known beforehand
|
4628 | * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange
|
4629 | * @throws {Error} If the payload is not a reader or valid buffer
|
4630 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
4631 | */
|
4632 | ReservedRange.decode = function decode(reader, length) {
|
4633 | if (!(reader instanceof $Reader))
|
4634 | reader = $Reader.create(reader);
|
4635 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange();
|
4636 | while (reader.pos < end) {
|
4637 | var tag = reader.uint32();
|
4638 | switch (tag >>> 3) {
|
4639 | case 1:
|
4640 | message.start = reader.int32();
|
4641 | break;
|
4642 | case 2:
|
4643 | message.end = reader.int32();
|
4644 | break;
|
4645 | default:
|
4646 | reader.skipType(tag & 7);
|
4647 | break;
|
4648 | }
|
4649 | }
|
4650 | return message;
|
4651 | };
|
4652 |
|
4653 | /**
|
4654 | * Decodes a ReservedRange message from the specified reader or buffer, length delimited.
|
4655 | * @function decodeDelimited
|
4656 | * @memberof google.protobuf.DescriptorProto.ReservedRange
|
4657 | * @static
|
4658 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
4659 | * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange
|
4660 | * @throws {Error} If the payload is not a reader or valid buffer
|
4661 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
4662 | */
|
4663 | ReservedRange.decodeDelimited = function decodeDelimited(reader) {
|
4664 | if (!(reader instanceof $Reader))
|
4665 | reader = new $Reader(reader);
|
4666 | return this.decode(reader, reader.uint32());
|
4667 | };
|
4668 |
|
4669 | /**
|
4670 | * Verifies a ReservedRange message.
|
4671 | * @function verify
|
4672 | * @memberof google.protobuf.DescriptorProto.ReservedRange
|
4673 | * @static
|
4674 | * @param {Object.<string,*>} message Plain object to verify
|
4675 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
4676 | */
|
4677 | ReservedRange.verify = function verify(message) {
|
4678 | if (typeof message !== "object" || message === null)
|
4679 | return "object expected";
|
4680 | if (message.start != null && message.hasOwnProperty("start"))
|
4681 | if (!$util.isInteger(message.start))
|
4682 | return "start: integer expected";
|
4683 | if (message.end != null && message.hasOwnProperty("end"))
|
4684 | if (!$util.isInteger(message.end))
|
4685 | return "end: integer expected";
|
4686 | return null;
|
4687 | };
|
4688 |
|
4689 | /**
|
4690 | * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types.
|
4691 | * @function fromObject
|
4692 | * @memberof google.protobuf.DescriptorProto.ReservedRange
|
4693 | * @static
|
4694 | * @param {Object.<string,*>} object Plain object
|
4695 | * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange
|
4696 | */
|
4697 | ReservedRange.fromObject = function fromObject(object) {
|
4698 | if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange)
|
4699 | return object;
|
4700 | var message = new $root.google.protobuf.DescriptorProto.ReservedRange();
|
4701 | if (object.start != null)
|
4702 | message.start = object.start | 0;
|
4703 | if (object.end != null)
|
4704 | message.end = object.end | 0;
|
4705 | return message;
|
4706 | };
|
4707 |
|
4708 | /**
|
4709 | * Creates a plain object from a ReservedRange message. Also converts values to other types if specified.
|
4710 | * @function toObject
|
4711 | * @memberof google.protobuf.DescriptorProto.ReservedRange
|
4712 | * @static
|
4713 | * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange
|
4714 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
4715 | * @returns {Object.<string,*>} Plain object
|
4716 | */
|
4717 | ReservedRange.toObject = function toObject(message, options) {
|
4718 | if (!options)
|
4719 | options = {};
|
4720 | var object = {};
|
4721 | if (options.defaults) {
|
4722 | object.start = 0;
|
4723 | object.end = 0;
|
4724 | }
|
4725 | if (message.start != null && message.hasOwnProperty("start"))
|
4726 | object.start = message.start;
|
4727 | if (message.end != null && message.hasOwnProperty("end"))
|
4728 | object.end = message.end;
|
4729 | return object;
|
4730 | };
|
4731 |
|
4732 | /**
|
4733 | * Converts this ReservedRange to JSON.
|
4734 | * @function toJSON
|
4735 | * @memberof google.protobuf.DescriptorProto.ReservedRange
|
4736 | * @instance
|
4737 | * @returns {Object.<string,*>} JSON object
|
4738 | */
|
4739 | ReservedRange.prototype.toJSON = function toJSON() {
|
4740 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
4741 | };
|
4742 |
|
4743 | return ReservedRange;
|
4744 | })();
|
4745 |
|
4746 | return DescriptorProto;
|
4747 | })();
|
4748 |
|
4749 | protobuf.ExtensionRangeOptions = (function() {
|
4750 |
|
4751 | /**
|
4752 | * Properties of an ExtensionRangeOptions.
|
4753 | * @memberof google.protobuf
|
4754 | * @interface IExtensionRangeOptions
|
4755 | * @property {Array.<google.protobuf.IUninterpretedOption>|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption
|
4756 | */
|
4757 |
|
4758 | /**
|
4759 | * Constructs a new ExtensionRangeOptions.
|
4760 | * @memberof google.protobuf
|
4761 | * @classdesc Represents an ExtensionRangeOptions.
|
4762 | * @implements IExtensionRangeOptions
|
4763 | * @constructor
|
4764 | * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set
|
4765 | */
|
4766 | function ExtensionRangeOptions(properties) {
|
4767 | this.uninterpretedOption = [];
|
4768 | if (properties)
|
4769 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
4770 | if (properties[keys[i]] != null)
|
4771 | this[keys[i]] = properties[keys[i]];
|
4772 | }
|
4773 |
|
4774 | /**
|
4775 | * ExtensionRangeOptions uninterpretedOption.
|
4776 | * @member {Array.<google.protobuf.IUninterpretedOption>} uninterpretedOption
|
4777 | * @memberof google.protobuf.ExtensionRangeOptions
|
4778 | * @instance
|
4779 | */
|
4780 | ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray;
|
4781 |
|
4782 | /**
|
4783 | * Creates a new ExtensionRangeOptions instance using the specified properties.
|
4784 | * @function create
|
4785 | * @memberof google.protobuf.ExtensionRangeOptions
|
4786 | * @static
|
4787 | * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set
|
4788 | * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance
|
4789 | */
|
4790 | ExtensionRangeOptions.create = function create(properties) {
|
4791 | return new ExtensionRangeOptions(properties);
|
4792 | };
|
4793 |
|
4794 | /**
|
4795 | * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages.
|
4796 | * @function encode
|
4797 | * @memberof google.protobuf.ExtensionRangeOptions
|
4798 | * @static
|
4799 | * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode
|
4800 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
4801 | * @returns {$protobuf.Writer} Writer
|
4802 | */
|
4803 | ExtensionRangeOptions.encode = function encode(message, writer) {
|
4804 | if (!writer)
|
4805 | writer = $Writer.create();
|
4806 | if (message.uninterpretedOption != null && message.uninterpretedOption.length)
|
4807 | for (var i = 0; i < message.uninterpretedOption.length; ++i)
|
4808 | $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim();
|
4809 | return writer;
|
4810 | };
|
4811 |
|
4812 | /**
|
4813 | * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages.
|
4814 | * @function encodeDelimited
|
4815 | * @memberof google.protobuf.ExtensionRangeOptions
|
4816 | * @static
|
4817 | * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode
|
4818 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
4819 | * @returns {$protobuf.Writer} Writer
|
4820 | */
|
4821 | ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) {
|
4822 | return this.encode(message, writer).ldelim();
|
4823 | };
|
4824 |
|
4825 | /**
|
4826 | * Decodes an ExtensionRangeOptions message from the specified reader or buffer.
|
4827 | * @function decode
|
4828 | * @memberof google.protobuf.ExtensionRangeOptions
|
4829 | * @static
|
4830 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
4831 | * @param {number} [length] Message length if known beforehand
|
4832 | * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions
|
4833 | * @throws {Error} If the payload is not a reader or valid buffer
|
4834 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
4835 | */
|
4836 | ExtensionRangeOptions.decode = function decode(reader, length) {
|
4837 | if (!(reader instanceof $Reader))
|
4838 | reader = $Reader.create(reader);
|
4839 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions();
|
4840 | while (reader.pos < end) {
|
4841 | var tag = reader.uint32();
|
4842 | switch (tag >>> 3) {
|
4843 | case 999:
|
4844 | if (!(message.uninterpretedOption && message.uninterpretedOption.length))
|
4845 | message.uninterpretedOption = [];
|
4846 | message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32()));
|
4847 | break;
|
4848 | default:
|
4849 | reader.skipType(tag & 7);
|
4850 | break;
|
4851 | }
|
4852 | }
|
4853 | return message;
|
4854 | };
|
4855 |
|
4856 | /**
|
4857 | * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited.
|
4858 | * @function decodeDelimited
|
4859 | * @memberof google.protobuf.ExtensionRangeOptions
|
4860 | * @static
|
4861 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
4862 | * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions
|
4863 | * @throws {Error} If the payload is not a reader or valid buffer
|
4864 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
4865 | */
|
4866 | ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) {
|
4867 | if (!(reader instanceof $Reader))
|
4868 | reader = new $Reader(reader);
|
4869 | return this.decode(reader, reader.uint32());
|
4870 | };
|
4871 |
|
4872 | /**
|
4873 | * Verifies an ExtensionRangeOptions message.
|
4874 | * @function verify
|
4875 | * @memberof google.protobuf.ExtensionRangeOptions
|
4876 | * @static
|
4877 | * @param {Object.<string,*>} message Plain object to verify
|
4878 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
4879 | */
|
4880 | ExtensionRangeOptions.verify = function verify(message) {
|
4881 | if (typeof message !== "object" || message === null)
|
4882 | return "object expected";
|
4883 | if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) {
|
4884 | if (!Array.isArray(message.uninterpretedOption))
|
4885 | return "uninterpretedOption: array expected";
|
4886 | for (var i = 0; i < message.uninterpretedOption.length; ++i) {
|
4887 | var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]);
|
4888 | if (error)
|
4889 | return "uninterpretedOption." + error;
|
4890 | }
|
4891 | }
|
4892 | return null;
|
4893 | };
|
4894 |
|
4895 | /**
|
4896 | * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types.
|
4897 | * @function fromObject
|
4898 | * @memberof google.protobuf.ExtensionRangeOptions
|
4899 | * @static
|
4900 | * @param {Object.<string,*>} object Plain object
|
4901 | * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions
|
4902 | */
|
4903 | ExtensionRangeOptions.fromObject = function fromObject(object) {
|
4904 | if (object instanceof $root.google.protobuf.ExtensionRangeOptions)
|
4905 | return object;
|
4906 | var message = new $root.google.protobuf.ExtensionRangeOptions();
|
4907 | if (object.uninterpretedOption) {
|
4908 | if (!Array.isArray(object.uninterpretedOption))
|
4909 | throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected");
|
4910 | message.uninterpretedOption = [];
|
4911 | for (var i = 0; i < object.uninterpretedOption.length; ++i) {
|
4912 | if (typeof object.uninterpretedOption[i] !== "object")
|
4913 | throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected");
|
4914 | message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]);
|
4915 | }
|
4916 | }
|
4917 | return message;
|
4918 | };
|
4919 |
|
4920 | /**
|
4921 | * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified.
|
4922 | * @function toObject
|
4923 | * @memberof google.protobuf.ExtensionRangeOptions
|
4924 | * @static
|
4925 | * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions
|
4926 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
4927 | * @returns {Object.<string,*>} Plain object
|
4928 | */
|
4929 | ExtensionRangeOptions.toObject = function toObject(message, options) {
|
4930 | if (!options)
|
4931 | options = {};
|
4932 | var object = {};
|
4933 | if (options.arrays || options.defaults)
|
4934 | object.uninterpretedOption = [];
|
4935 | if (message.uninterpretedOption && message.uninterpretedOption.length) {
|
4936 | object.uninterpretedOption = [];
|
4937 | for (var j = 0; j < message.uninterpretedOption.length; ++j)
|
4938 | object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options);
|
4939 | }
|
4940 | return object;
|
4941 | };
|
4942 |
|
4943 | /**
|
4944 | * Converts this ExtensionRangeOptions to JSON.
|
4945 | * @function toJSON
|
4946 | * @memberof google.protobuf.ExtensionRangeOptions
|
4947 | * @instance
|
4948 | * @returns {Object.<string,*>} JSON object
|
4949 | */
|
4950 | ExtensionRangeOptions.prototype.toJSON = function toJSON() {
|
4951 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
4952 | };
|
4953 |
|
4954 | return ExtensionRangeOptions;
|
4955 | })();
|
4956 |
|
4957 | protobuf.FieldDescriptorProto = (function() {
|
4958 |
|
4959 | /**
|
4960 | * Properties of a FieldDescriptorProto.
|
4961 | * @memberof google.protobuf
|
4962 | * @interface IFieldDescriptorProto
|
4963 | * @property {string|null} [name] FieldDescriptorProto name
|
4964 | * @property {number|null} [number] FieldDescriptorProto number
|
4965 | * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label
|
4966 | * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type
|
4967 | * @property {string|null} [typeName] FieldDescriptorProto typeName
|
4968 | * @property {string|null} [extendee] FieldDescriptorProto extendee
|
4969 | * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue
|
4970 | * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex
|
4971 | * @property {string|null} [jsonName] FieldDescriptorProto jsonName
|
4972 | * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options
|
4973 | * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional
|
4974 | */
|
4975 |
|
4976 | /**
|
4977 | * Constructs a new FieldDescriptorProto.
|
4978 | * @memberof google.protobuf
|
4979 | * @classdesc Represents a FieldDescriptorProto.
|
4980 | * @implements IFieldDescriptorProto
|
4981 | * @constructor
|
4982 | * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set
|
4983 | */
|
4984 | function FieldDescriptorProto(properties) {
|
4985 | if (properties)
|
4986 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
4987 | if (properties[keys[i]] != null)
|
4988 | this[keys[i]] = properties[keys[i]];
|
4989 | }
|
4990 |
|
4991 | /**
|
4992 | * FieldDescriptorProto name.
|
4993 | * @member {string} name
|
4994 | * @memberof google.protobuf.FieldDescriptorProto
|
4995 | * @instance
|
4996 | */
|
4997 | FieldDescriptorProto.prototype.name = "";
|
4998 |
|
4999 | /**
|
5000 | * FieldDescriptorProto number.
|
5001 | * @member {number} number
|
5002 | * @memberof google.protobuf.FieldDescriptorProto
|
5003 | * @instance
|
5004 | */
|
5005 | FieldDescriptorProto.prototype.number = 0;
|
5006 |
|
5007 | /**
|
5008 | * FieldDescriptorProto label.
|
5009 | * @member {google.protobuf.FieldDescriptorProto.Label} label
|
5010 | * @memberof google.protobuf.FieldDescriptorProto
|
5011 | * @instance
|
5012 | */
|
5013 | FieldDescriptorProto.prototype.label = 1;
|
5014 |
|
5015 | /**
|
5016 | * FieldDescriptorProto type.
|
5017 | * @member {google.protobuf.FieldDescriptorProto.Type} type
|
5018 | * @memberof google.protobuf.FieldDescriptorProto
|
5019 | * @instance
|
5020 | */
|
5021 | FieldDescriptorProto.prototype.type = 1;
|
5022 |
|
5023 | /**
|
5024 | * FieldDescriptorProto typeName.
|
5025 | * @member {string} typeName
|
5026 | * @memberof google.protobuf.FieldDescriptorProto
|
5027 | * @instance
|
5028 | */
|
5029 | FieldDescriptorProto.prototype.typeName = "";
|
5030 |
|
5031 | /**
|
5032 | * FieldDescriptorProto extendee.
|
5033 | * @member {string} extendee
|
5034 | * @memberof google.protobuf.FieldDescriptorProto
|
5035 | * @instance
|
5036 | */
|
5037 | FieldDescriptorProto.prototype.extendee = "";
|
5038 |
|
5039 | /**
|
5040 | * FieldDescriptorProto defaultValue.
|
5041 | * @member {string} defaultValue
|
5042 | * @memberof google.protobuf.FieldDescriptorProto
|
5043 | * @instance
|
5044 | */
|
5045 | FieldDescriptorProto.prototype.defaultValue = "";
|
5046 |
|
5047 | /**
|
5048 | * FieldDescriptorProto oneofIndex.
|
5049 | * @member {number} oneofIndex
|
5050 | * @memberof google.protobuf.FieldDescriptorProto
|
5051 | * @instance
|
5052 | */
|
5053 | FieldDescriptorProto.prototype.oneofIndex = 0;
|
5054 |
|
5055 | /**
|
5056 | * FieldDescriptorProto jsonName.
|
5057 | * @member {string} jsonName
|
5058 | * @memberof google.protobuf.FieldDescriptorProto
|
5059 | * @instance
|
5060 | */
|
5061 | FieldDescriptorProto.prototype.jsonName = "";
|
5062 |
|
5063 | /**
|
5064 | * FieldDescriptorProto options.
|
5065 | * @member {google.protobuf.IFieldOptions|null|undefined} options
|
5066 | * @memberof google.protobuf.FieldDescriptorProto
|
5067 | * @instance
|
5068 | */
|
5069 | FieldDescriptorProto.prototype.options = null;
|
5070 |
|
5071 | /**
|
5072 | * FieldDescriptorProto proto3Optional.
|
5073 | * @member {boolean} proto3Optional
|
5074 | * @memberof google.protobuf.FieldDescriptorProto
|
5075 | * @instance
|
5076 | */
|
5077 | FieldDescriptorProto.prototype.proto3Optional = false;
|
5078 |
|
5079 | /**
|
5080 | * Creates a new FieldDescriptorProto instance using the specified properties.
|
5081 | * @function create
|
5082 | * @memberof google.protobuf.FieldDescriptorProto
|
5083 | * @static
|
5084 | * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set
|
5085 | * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance
|
5086 | */
|
5087 | FieldDescriptorProto.create = function create(properties) {
|
5088 | return new FieldDescriptorProto(properties);
|
5089 | };
|
5090 |
|
5091 | /**
|
5092 | * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages.
|
5093 | * @function encode
|
5094 | * @memberof google.protobuf.FieldDescriptorProto
|
5095 | * @static
|
5096 | * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode
|
5097 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
5098 | * @returns {$protobuf.Writer} Writer
|
5099 | */
|
5100 | FieldDescriptorProto.encode = function encode(message, writer) {
|
5101 | if (!writer)
|
5102 | writer = $Writer.create();
|
5103 | if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
5104 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
5105 | if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee"))
|
5106 | writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee);
|
5107 | if (message.number != null && Object.hasOwnProperty.call(message, "number"))
|
5108 | writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number);
|
5109 | if (message.label != null && Object.hasOwnProperty.call(message, "label"))
|
5110 | writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label);
|
5111 | if (message.type != null && Object.hasOwnProperty.call(message, "type"))
|
5112 | writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type);
|
5113 | if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName"))
|
5114 | writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName);
|
5115 | if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue"))
|
5116 | writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue);
|
5117 | if (message.options != null && Object.hasOwnProperty.call(message, "options"))
|
5118 | $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
|
5119 | if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex"))
|
5120 | writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex);
|
5121 | if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName"))
|
5122 | writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName);
|
5123 | if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional"))
|
5124 | writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional);
|
5125 | return writer;
|
5126 | };
|
5127 |
|
5128 | /**
|
5129 | * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages.
|
5130 | * @function encodeDelimited
|
5131 | * @memberof google.protobuf.FieldDescriptorProto
|
5132 | * @static
|
5133 | * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode
|
5134 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
5135 | * @returns {$protobuf.Writer} Writer
|
5136 | */
|
5137 | FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) {
|
5138 | return this.encode(message, writer).ldelim();
|
5139 | };
|
5140 |
|
5141 | /**
|
5142 | * Decodes a FieldDescriptorProto message from the specified reader or buffer.
|
5143 | * @function decode
|
5144 | * @memberof google.protobuf.FieldDescriptorProto
|
5145 | * @static
|
5146 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
5147 | * @param {number} [length] Message length if known beforehand
|
5148 | * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto
|
5149 | * @throws {Error} If the payload is not a reader or valid buffer
|
5150 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
5151 | */
|
5152 | FieldDescriptorProto.decode = function decode(reader, length) {
|
5153 | if (!(reader instanceof $Reader))
|
5154 | reader = $Reader.create(reader);
|
5155 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto();
|
5156 | while (reader.pos < end) {
|
5157 | var tag = reader.uint32();
|
5158 | switch (tag >>> 3) {
|
5159 | case 1:
|
5160 | message.name = reader.string();
|
5161 | break;
|
5162 | case 3:
|
5163 | message.number = reader.int32();
|
5164 | break;
|
5165 | case 4:
|
5166 | message.label = reader.int32();
|
5167 | break;
|
5168 | case 5:
|
5169 | message.type = reader.int32();
|
5170 | break;
|
5171 | case 6:
|
5172 | message.typeName = reader.string();
|
5173 | break;
|
5174 | case 2:
|
5175 | message.extendee = reader.string();
|
5176 | break;
|
5177 | case 7:
|
5178 | message.defaultValue = reader.string();
|
5179 | break;
|
5180 | case 9:
|
5181 | message.oneofIndex = reader.int32();
|
5182 | break;
|
5183 | case 10:
|
5184 | message.jsonName = reader.string();
|
5185 | break;
|
5186 | case 8:
|
5187 | message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32());
|
5188 | break;
|
5189 | case 17:
|
5190 | message.proto3Optional = reader.bool();
|
5191 | break;
|
5192 | default:
|
5193 | reader.skipType(tag & 7);
|
5194 | break;
|
5195 | }
|
5196 | }
|
5197 | return message;
|
5198 | };
|
5199 |
|
5200 | /**
|
5201 | * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited.
|
5202 | * @function decodeDelimited
|
5203 | * @memberof google.protobuf.FieldDescriptorProto
|
5204 | * @static
|
5205 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
5206 | * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto
|
5207 | * @throws {Error} If the payload is not a reader or valid buffer
|
5208 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
5209 | */
|
5210 | FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) {
|
5211 | if (!(reader instanceof $Reader))
|
5212 | reader = new $Reader(reader);
|
5213 | return this.decode(reader, reader.uint32());
|
5214 | };
|
5215 |
|
5216 | /**
|
5217 | * Verifies a FieldDescriptorProto message.
|
5218 | * @function verify
|
5219 | * @memberof google.protobuf.FieldDescriptorProto
|
5220 | * @static
|
5221 | * @param {Object.<string,*>} message Plain object to verify
|
5222 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
5223 | */
|
5224 | FieldDescriptorProto.verify = function verify(message) {
|
5225 | if (typeof message !== "object" || message === null)
|
5226 | return "object expected";
|
5227 | if (message.name != null && message.hasOwnProperty("name"))
|
5228 | if (!$util.isString(message.name))
|
5229 | return "name: string expected";
|
5230 | if (message.number != null && message.hasOwnProperty("number"))
|
5231 | if (!$util.isInteger(message.number))
|
5232 | return "number: integer expected";
|
5233 | if (message.label != null && message.hasOwnProperty("label"))
|
5234 | switch (message.label) {
|
5235 | default:
|
5236 | return "label: enum value expected";
|
5237 | case 1:
|
5238 | case 2:
|
5239 | case 3:
|
5240 | break;
|
5241 | }
|
5242 | if (message.type != null && message.hasOwnProperty("type"))
|
5243 | switch (message.type) {
|
5244 | default:
|
5245 | return "type: enum value expected";
|
5246 | case 1:
|
5247 | case 2:
|
5248 | case 3:
|
5249 | case 4:
|
5250 | case 5:
|
5251 | case 6:
|
5252 | case 7:
|
5253 | case 8:
|
5254 | case 9:
|
5255 | case 10:
|
5256 | case 11:
|
5257 | case 12:
|
5258 | case 13:
|
5259 | case 14:
|
5260 | case 15:
|
5261 | case 16:
|
5262 | case 17:
|
5263 | case 18:
|
5264 | break;
|
5265 | }
|
5266 | if (message.typeName != null && message.hasOwnProperty("typeName"))
|
5267 | if (!$util.isString(message.typeName))
|
5268 | return "typeName: string expected";
|
5269 | if (message.extendee != null && message.hasOwnProperty("extendee"))
|
5270 | if (!$util.isString(message.extendee))
|
5271 | return "extendee: string expected";
|
5272 | if (message.defaultValue != null && message.hasOwnProperty("defaultValue"))
|
5273 | if (!$util.isString(message.defaultValue))
|
5274 | return "defaultValue: string expected";
|
5275 | if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex"))
|
5276 | if (!$util.isInteger(message.oneofIndex))
|
5277 | return "oneofIndex: integer expected";
|
5278 | if (message.jsonName != null && message.hasOwnProperty("jsonName"))
|
5279 | if (!$util.isString(message.jsonName))
|
5280 | return "jsonName: string expected";
|
5281 | if (message.options != null && message.hasOwnProperty("options")) {
|
5282 | var error = $root.google.protobuf.FieldOptions.verify(message.options);
|
5283 | if (error)
|
5284 | return "options." + error;
|
5285 | }
|
5286 | if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional"))
|
5287 | if (typeof message.proto3Optional !== "boolean")
|
5288 | return "proto3Optional: boolean expected";
|
5289 | return null;
|
5290 | };
|
5291 |
|
5292 | /**
|
5293 | * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types.
|
5294 | * @function fromObject
|
5295 | * @memberof google.protobuf.FieldDescriptorProto
|
5296 | * @static
|
5297 | * @param {Object.<string,*>} object Plain object
|
5298 | * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto
|
5299 | */
|
5300 | FieldDescriptorProto.fromObject = function fromObject(object) {
|
5301 | if (object instanceof $root.google.protobuf.FieldDescriptorProto)
|
5302 | return object;
|
5303 | var message = new $root.google.protobuf.FieldDescriptorProto();
|
5304 | if (object.name != null)
|
5305 | message.name = String(object.name);
|
5306 | if (object.number != null)
|
5307 | message.number = object.number | 0;
|
5308 | switch (object.label) {
|
5309 | case "LABEL_OPTIONAL":
|
5310 | case 1:
|
5311 | message.label = 1;
|
5312 | break;
|
5313 | case "LABEL_REQUIRED":
|
5314 | case 2:
|
5315 | message.label = 2;
|
5316 | break;
|
5317 | case "LABEL_REPEATED":
|
5318 | case 3:
|
5319 | message.label = 3;
|
5320 | break;
|
5321 | }
|
5322 | switch (object.type) {
|
5323 | case "TYPE_DOUBLE":
|
5324 | case 1:
|
5325 | message.type = 1;
|
5326 | break;
|
5327 | case "TYPE_FLOAT":
|
5328 | case 2:
|
5329 | message.type = 2;
|
5330 | break;
|
5331 | case "TYPE_INT64":
|
5332 | case 3:
|
5333 | message.type = 3;
|
5334 | break;
|
5335 | case "TYPE_UINT64":
|
5336 | case 4:
|
5337 | message.type = 4;
|
5338 | break;
|
5339 | case "TYPE_INT32":
|
5340 | case 5:
|
5341 | message.type = 5;
|
5342 | break;
|
5343 | case "TYPE_FIXED64":
|
5344 | case 6:
|
5345 | message.type = 6;
|
5346 | break;
|
5347 | case "TYPE_FIXED32":
|
5348 | case 7:
|
5349 | message.type = 7;
|
5350 | break;
|
5351 | case "TYPE_BOOL":
|
5352 | case 8:
|
5353 | message.type = 8;
|
5354 | break;
|
5355 | case "TYPE_STRING":
|
5356 | case 9:
|
5357 | message.type = 9;
|
5358 | break;
|
5359 | case "TYPE_GROUP":
|
5360 | case 10:
|
5361 | message.type = 10;
|
5362 | break;
|
5363 | case "TYPE_MESSAGE":
|
5364 | case 11:
|
5365 | message.type = 11;
|
5366 | break;
|
5367 | case "TYPE_BYTES":
|
5368 | case 12:
|
5369 | message.type = 12;
|
5370 | break;
|
5371 | case "TYPE_UINT32":
|
5372 | case 13:
|
5373 | message.type = 13;
|
5374 | break;
|
5375 | case "TYPE_ENUM":
|
5376 | case 14:
|
5377 | message.type = 14;
|
5378 | break;
|
5379 | case "TYPE_SFIXED32":
|
5380 | case 15:
|
5381 | message.type = 15;
|
5382 | break;
|
5383 | case "TYPE_SFIXED64":
|
5384 | case 16:
|
5385 | message.type = 16;
|
5386 | break;
|
5387 | case "TYPE_SINT32":
|
5388 | case 17:
|
5389 | message.type = 17;
|
5390 | break;
|
5391 | case "TYPE_SINT64":
|
5392 | case 18:
|
5393 | message.type = 18;
|
5394 | break;
|
5395 | }
|
5396 | if (object.typeName != null)
|
5397 | message.typeName = String(object.typeName);
|
5398 | if (object.extendee != null)
|
5399 | message.extendee = String(object.extendee);
|
5400 | if (object.defaultValue != null)
|
5401 | message.defaultValue = String(object.defaultValue);
|
5402 | if (object.oneofIndex != null)
|
5403 | message.oneofIndex = object.oneofIndex | 0;
|
5404 | if (object.jsonName != null)
|
5405 | message.jsonName = String(object.jsonName);
|
5406 | if (object.options != null) {
|
5407 | if (typeof object.options !== "object")
|
5408 | throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected");
|
5409 | message.options = $root.google.protobuf.FieldOptions.fromObject(object.options);
|
5410 | }
|
5411 | if (object.proto3Optional != null)
|
5412 | message.proto3Optional = Boolean(object.proto3Optional);
|
5413 | return message;
|
5414 | };
|
5415 |
|
5416 | /**
|
5417 | * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified.
|
5418 | * @function toObject
|
5419 | * @memberof google.protobuf.FieldDescriptorProto
|
5420 | * @static
|
5421 | * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto
|
5422 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
5423 | * @returns {Object.<string,*>} Plain object
|
5424 | */
|
5425 | FieldDescriptorProto.toObject = function toObject(message, options) {
|
5426 | if (!options)
|
5427 | options = {};
|
5428 | var object = {};
|
5429 | if (options.defaults) {
|
5430 | object.name = "";
|
5431 | object.extendee = "";
|
5432 | object.number = 0;
|
5433 | object.label = options.enums === String ? "LABEL_OPTIONAL" : 1;
|
5434 | object.type = options.enums === String ? "TYPE_DOUBLE" : 1;
|
5435 | object.typeName = "";
|
5436 | object.defaultValue = "";
|
5437 | object.options = null;
|
5438 | object.oneofIndex = 0;
|
5439 | object.jsonName = "";
|
5440 | object.proto3Optional = false;
|
5441 | }
|
5442 | if (message.name != null && message.hasOwnProperty("name"))
|
5443 | object.name = message.name;
|
5444 | if (message.extendee != null && message.hasOwnProperty("extendee"))
|
5445 | object.extendee = message.extendee;
|
5446 | if (message.number != null && message.hasOwnProperty("number"))
|
5447 | object.number = message.number;
|
5448 | if (message.label != null && message.hasOwnProperty("label"))
|
5449 | object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label;
|
5450 | if (message.type != null && message.hasOwnProperty("type"))
|
5451 | object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type;
|
5452 | if (message.typeName != null && message.hasOwnProperty("typeName"))
|
5453 | object.typeName = message.typeName;
|
5454 | if (message.defaultValue != null && message.hasOwnProperty("defaultValue"))
|
5455 | object.defaultValue = message.defaultValue;
|
5456 | if (message.options != null && message.hasOwnProperty("options"))
|
5457 | object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options);
|
5458 | if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex"))
|
5459 | object.oneofIndex = message.oneofIndex;
|
5460 | if (message.jsonName != null && message.hasOwnProperty("jsonName"))
|
5461 | object.jsonName = message.jsonName;
|
5462 | if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional"))
|
5463 | object.proto3Optional = message.proto3Optional;
|
5464 | return object;
|
5465 | };
|
5466 |
|
5467 | /**
|
5468 | * Converts this FieldDescriptorProto to JSON.
|
5469 | * @function toJSON
|
5470 | * @memberof google.protobuf.FieldDescriptorProto
|
5471 | * @instance
|
5472 | * @returns {Object.<string,*>} JSON object
|
5473 | */
|
5474 | FieldDescriptorProto.prototype.toJSON = function toJSON() {
|
5475 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
5476 | };
|
5477 |
|
5478 | /**
|
5479 | * Type enum.
|
5480 | * @name google.protobuf.FieldDescriptorProto.Type
|
5481 | * @enum {number}
|
5482 | * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value
|
5483 | * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value
|
5484 | * @property {number} TYPE_INT64=3 TYPE_INT64 value
|
5485 | * @property {number} TYPE_UINT64=4 TYPE_UINT64 value
|
5486 | * @property {number} TYPE_INT32=5 TYPE_INT32 value
|
5487 | * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value
|
5488 | * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value
|
5489 | * @property {number} TYPE_BOOL=8 TYPE_BOOL value
|
5490 | * @property {number} TYPE_STRING=9 TYPE_STRING value
|
5491 | * @property {number} TYPE_GROUP=10 TYPE_GROUP value
|
5492 | * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value
|
5493 | * @property {number} TYPE_BYTES=12 TYPE_BYTES value
|
5494 | * @property {number} TYPE_UINT32=13 TYPE_UINT32 value
|
5495 | * @property {number} TYPE_ENUM=14 TYPE_ENUM value
|
5496 | * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value
|
5497 | * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value
|
5498 | * @property {number} TYPE_SINT32=17 TYPE_SINT32 value
|
5499 | * @property {number} TYPE_SINT64=18 TYPE_SINT64 value
|
5500 | */
|
5501 | FieldDescriptorProto.Type = (function() {
|
5502 | var valuesById = {}, values = Object.create(valuesById);
|
5503 | values[valuesById[1] = "TYPE_DOUBLE"] = 1;
|
5504 | values[valuesById[2] = "TYPE_FLOAT"] = 2;
|
5505 | values[valuesById[3] = "TYPE_INT64"] = 3;
|
5506 | values[valuesById[4] = "TYPE_UINT64"] = 4;
|
5507 | values[valuesById[5] = "TYPE_INT32"] = 5;
|
5508 | values[valuesById[6] = "TYPE_FIXED64"] = 6;
|
5509 | values[valuesById[7] = "TYPE_FIXED32"] = 7;
|
5510 | values[valuesById[8] = "TYPE_BOOL"] = 8;
|
5511 | values[valuesById[9] = "TYPE_STRING"] = 9;
|
5512 | values[valuesById[10] = "TYPE_GROUP"] = 10;
|
5513 | values[valuesById[11] = "TYPE_MESSAGE"] = 11;
|
5514 | values[valuesById[12] = "TYPE_BYTES"] = 12;
|
5515 | values[valuesById[13] = "TYPE_UINT32"] = 13;
|
5516 | values[valuesById[14] = "TYPE_ENUM"] = 14;
|
5517 | values[valuesById[15] = "TYPE_SFIXED32"] = 15;
|
5518 | values[valuesById[16] = "TYPE_SFIXED64"] = 16;
|
5519 | values[valuesById[17] = "TYPE_SINT32"] = 17;
|
5520 | values[valuesById[18] = "TYPE_SINT64"] = 18;
|
5521 | return values;
|
5522 | })();
|
5523 |
|
5524 | /**
|
5525 | * Label enum.
|
5526 | * @name google.protobuf.FieldDescriptorProto.Label
|
5527 | * @enum {number}
|
5528 | * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value
|
5529 | * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value
|
5530 | * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value
|
5531 | */
|
5532 | FieldDescriptorProto.Label = (function() {
|
5533 | var valuesById = {}, values = Object.create(valuesById);
|
5534 | values[valuesById[1] = "LABEL_OPTIONAL"] = 1;
|
5535 | values[valuesById[2] = "LABEL_REQUIRED"] = 2;
|
5536 | values[valuesById[3] = "LABEL_REPEATED"] = 3;
|
5537 | return values;
|
5538 | })();
|
5539 |
|
5540 | return FieldDescriptorProto;
|
5541 | })();
|
5542 |
|
5543 | protobuf.OneofDescriptorProto = (function() {
|
5544 |
|
5545 | /**
|
5546 | * Properties of an OneofDescriptorProto.
|
5547 | * @memberof google.protobuf
|
5548 | * @interface IOneofDescriptorProto
|
5549 | * @property {string|null} [name] OneofDescriptorProto name
|
5550 | * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options
|
5551 | */
|
5552 |
|
5553 | /**
|
5554 | * Constructs a new OneofDescriptorProto.
|
5555 | * @memberof google.protobuf
|
5556 | * @classdesc Represents an OneofDescriptorProto.
|
5557 | * @implements IOneofDescriptorProto
|
5558 | * @constructor
|
5559 | * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set
|
5560 | */
|
5561 | function OneofDescriptorProto(properties) {
|
5562 | if (properties)
|
5563 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
5564 | if (properties[keys[i]] != null)
|
5565 | this[keys[i]] = properties[keys[i]];
|
5566 | }
|
5567 |
|
5568 | /**
|
5569 | * OneofDescriptorProto name.
|
5570 | * @member {string} name
|
5571 | * @memberof google.protobuf.OneofDescriptorProto
|
5572 | * @instance
|
5573 | */
|
5574 | OneofDescriptorProto.prototype.name = "";
|
5575 |
|
5576 | /**
|
5577 | * OneofDescriptorProto options.
|
5578 | * @member {google.protobuf.IOneofOptions|null|undefined} options
|
5579 | * @memberof google.protobuf.OneofDescriptorProto
|
5580 | * @instance
|
5581 | */
|
5582 | OneofDescriptorProto.prototype.options = null;
|
5583 |
|
5584 | /**
|
5585 | * Creates a new OneofDescriptorProto instance using the specified properties.
|
5586 | * @function create
|
5587 | * @memberof google.protobuf.OneofDescriptorProto
|
5588 | * @static
|
5589 | * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set
|
5590 | * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance
|
5591 | */
|
5592 | OneofDescriptorProto.create = function create(properties) {
|
5593 | return new OneofDescriptorProto(properties);
|
5594 | };
|
5595 |
|
5596 | /**
|
5597 | * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages.
|
5598 | * @function encode
|
5599 | * @memberof google.protobuf.OneofDescriptorProto
|
5600 | * @static
|
5601 | * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode
|
5602 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
5603 | * @returns {$protobuf.Writer} Writer
|
5604 | */
|
5605 | OneofDescriptorProto.encode = function encode(message, writer) {
|
5606 | if (!writer)
|
5607 | writer = $Writer.create();
|
5608 | if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
5609 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
5610 | if (message.options != null && Object.hasOwnProperty.call(message, "options"))
|
5611 | $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
5612 | return writer;
|
5613 | };
|
5614 |
|
5615 | /**
|
5616 | * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages.
|
5617 | * @function encodeDelimited
|
5618 | * @memberof google.protobuf.OneofDescriptorProto
|
5619 | * @static
|
5620 | * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode
|
5621 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
5622 | * @returns {$protobuf.Writer} Writer
|
5623 | */
|
5624 | OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) {
|
5625 | return this.encode(message, writer).ldelim();
|
5626 | };
|
5627 |
|
5628 | /**
|
5629 | * Decodes an OneofDescriptorProto message from the specified reader or buffer.
|
5630 | * @function decode
|
5631 | * @memberof google.protobuf.OneofDescriptorProto
|
5632 | * @static
|
5633 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
5634 | * @param {number} [length] Message length if known beforehand
|
5635 | * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto
|
5636 | * @throws {Error} If the payload is not a reader or valid buffer
|
5637 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
5638 | */
|
5639 | OneofDescriptorProto.decode = function decode(reader, length) {
|
5640 | if (!(reader instanceof $Reader))
|
5641 | reader = $Reader.create(reader);
|
5642 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto();
|
5643 | while (reader.pos < end) {
|
5644 | var tag = reader.uint32();
|
5645 | switch (tag >>> 3) {
|
5646 | case 1:
|
5647 | message.name = reader.string();
|
5648 | break;
|
5649 | case 2:
|
5650 | message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32());
|
5651 | break;
|
5652 | default:
|
5653 | reader.skipType(tag & 7);
|
5654 | break;
|
5655 | }
|
5656 | }
|
5657 | return message;
|
5658 | };
|
5659 |
|
5660 | /**
|
5661 | * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited.
|
5662 | * @function decodeDelimited
|
5663 | * @memberof google.protobuf.OneofDescriptorProto
|
5664 | * @static
|
5665 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
5666 | * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto
|
5667 | * @throws {Error} If the payload is not a reader or valid buffer
|
5668 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
5669 | */
|
5670 | OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) {
|
5671 | if (!(reader instanceof $Reader))
|
5672 | reader = new $Reader(reader);
|
5673 | return this.decode(reader, reader.uint32());
|
5674 | };
|
5675 |
|
5676 | /**
|
5677 | * Verifies an OneofDescriptorProto message.
|
5678 | * @function verify
|
5679 | * @memberof google.protobuf.OneofDescriptorProto
|
5680 | * @static
|
5681 | * @param {Object.<string,*>} message Plain object to verify
|
5682 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
5683 | */
|
5684 | OneofDescriptorProto.verify = function verify(message) {
|
5685 | if (typeof message !== "object" || message === null)
|
5686 | return "object expected";
|
5687 | if (message.name != null && message.hasOwnProperty("name"))
|
5688 | if (!$util.isString(message.name))
|
5689 | return "name: string expected";
|
5690 | if (message.options != null && message.hasOwnProperty("options")) {
|
5691 | var error = $root.google.protobuf.OneofOptions.verify(message.options);
|
5692 | if (error)
|
5693 | return "options." + error;
|
5694 | }
|
5695 | return null;
|
5696 | };
|
5697 |
|
5698 | /**
|
5699 | * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types.
|
5700 | * @function fromObject
|
5701 | * @memberof google.protobuf.OneofDescriptorProto
|
5702 | * @static
|
5703 | * @param {Object.<string,*>} object Plain object
|
5704 | * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto
|
5705 | */
|
5706 | OneofDescriptorProto.fromObject = function fromObject(object) {
|
5707 | if (object instanceof $root.google.protobuf.OneofDescriptorProto)
|
5708 | return object;
|
5709 | var message = new $root.google.protobuf.OneofDescriptorProto();
|
5710 | if (object.name != null)
|
5711 | message.name = String(object.name);
|
5712 | if (object.options != null) {
|
5713 | if (typeof object.options !== "object")
|
5714 | throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected");
|
5715 | message.options = $root.google.protobuf.OneofOptions.fromObject(object.options);
|
5716 | }
|
5717 | return message;
|
5718 | };
|
5719 |
|
5720 | /**
|
5721 | * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified.
|
5722 | * @function toObject
|
5723 | * @memberof google.protobuf.OneofDescriptorProto
|
5724 | * @static
|
5725 | * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto
|
5726 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
5727 | * @returns {Object.<string,*>} Plain object
|
5728 | */
|
5729 | OneofDescriptorProto.toObject = function toObject(message, options) {
|
5730 | if (!options)
|
5731 | options = {};
|
5732 | var object = {};
|
5733 | if (options.defaults) {
|
5734 | object.name = "";
|
5735 | object.options = null;
|
5736 | }
|
5737 | if (message.name != null && message.hasOwnProperty("name"))
|
5738 | object.name = message.name;
|
5739 | if (message.options != null && message.hasOwnProperty("options"))
|
5740 | object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options);
|
5741 | return object;
|
5742 | };
|
5743 |
|
5744 | /**
|
5745 | * Converts this OneofDescriptorProto to JSON.
|
5746 | * @function toJSON
|
5747 | * @memberof google.protobuf.OneofDescriptorProto
|
5748 | * @instance
|
5749 | * @returns {Object.<string,*>} JSON object
|
5750 | */
|
5751 | OneofDescriptorProto.prototype.toJSON = function toJSON() {
|
5752 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
5753 | };
|
5754 |
|
5755 | return OneofDescriptorProto;
|
5756 | })();
|
5757 |
|
5758 | protobuf.EnumDescriptorProto = (function() {
|
5759 |
|
5760 | /**
|
5761 | * Properties of an EnumDescriptorProto.
|
5762 | * @memberof google.protobuf
|
5763 | * @interface IEnumDescriptorProto
|
5764 | * @property {string|null} [name] EnumDescriptorProto name
|
5765 | * @property {Array.<google.protobuf.IEnumValueDescriptorProto>|null} [value] EnumDescriptorProto value
|
5766 | * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options
|
5767 | * @property {Array.<google.protobuf.EnumDescriptorProto.IEnumReservedRange>|null} [reservedRange] EnumDescriptorProto reservedRange
|
5768 | * @property {Array.<string>|null} [reservedName] EnumDescriptorProto reservedName
|
5769 | */
|
5770 |
|
5771 | /**
|
5772 | * Constructs a new EnumDescriptorProto.
|
5773 | * @memberof google.protobuf
|
5774 | * @classdesc Represents an EnumDescriptorProto.
|
5775 | * @implements IEnumDescriptorProto
|
5776 | * @constructor
|
5777 | * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set
|
5778 | */
|
5779 | function EnumDescriptorProto(properties) {
|
5780 | this.value = [];
|
5781 | this.reservedRange = [];
|
5782 | this.reservedName = [];
|
5783 | if (properties)
|
5784 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
5785 | if (properties[keys[i]] != null)
|
5786 | this[keys[i]] = properties[keys[i]];
|
5787 | }
|
5788 |
|
5789 | /**
|
5790 | * EnumDescriptorProto name.
|
5791 | * @member {string} name
|
5792 | * @memberof google.protobuf.EnumDescriptorProto
|
5793 | * @instance
|
5794 | */
|
5795 | EnumDescriptorProto.prototype.name = "";
|
5796 |
|
5797 | /**
|
5798 | * EnumDescriptorProto value.
|
5799 | * @member {Array.<google.protobuf.IEnumValueDescriptorProto>} value
|
5800 | * @memberof google.protobuf.EnumDescriptorProto
|
5801 | * @instance
|
5802 | */
|
5803 | EnumDescriptorProto.prototype.value = $util.emptyArray;
|
5804 |
|
5805 | /**
|
5806 | * EnumDescriptorProto options.
|
5807 | * @member {google.protobuf.IEnumOptions|null|undefined} options
|
5808 | * @memberof google.protobuf.EnumDescriptorProto
|
5809 | * @instance
|
5810 | */
|
5811 | EnumDescriptorProto.prototype.options = null;
|
5812 |
|
5813 | /**
|
5814 | * EnumDescriptorProto reservedRange.
|
5815 | * @member {Array.<google.protobuf.EnumDescriptorProto.IEnumReservedRange>} reservedRange
|
5816 | * @memberof google.protobuf.EnumDescriptorProto
|
5817 | * @instance
|
5818 | */
|
5819 | EnumDescriptorProto.prototype.reservedRange = $util.emptyArray;
|
5820 |
|
5821 | /**
|
5822 | * EnumDescriptorProto reservedName.
|
5823 | * @member {Array.<string>} reservedName
|
5824 | * @memberof google.protobuf.EnumDescriptorProto
|
5825 | * @instance
|
5826 | */
|
5827 | EnumDescriptorProto.prototype.reservedName = $util.emptyArray;
|
5828 |
|
5829 | /**
|
5830 | * Creates a new EnumDescriptorProto instance using the specified properties.
|
5831 | * @function create
|
5832 | * @memberof google.protobuf.EnumDescriptorProto
|
5833 | * @static
|
5834 | * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set
|
5835 | * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance
|
5836 | */
|
5837 | EnumDescriptorProto.create = function create(properties) {
|
5838 | return new EnumDescriptorProto(properties);
|
5839 | };
|
5840 |
|
5841 | /**
|
5842 | * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages.
|
5843 | * @function encode
|
5844 | * @memberof google.protobuf.EnumDescriptorProto
|
5845 | * @static
|
5846 | * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode
|
5847 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
5848 | * @returns {$protobuf.Writer} Writer
|
5849 | */
|
5850 | EnumDescriptorProto.encode = function encode(message, writer) {
|
5851 | if (!writer)
|
5852 | writer = $Writer.create();
|
5853 | if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
5854 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
5855 | if (message.value != null && message.value.length)
|
5856 | for (var i = 0; i < message.value.length; ++i)
|
5857 | $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
5858 | if (message.options != null && Object.hasOwnProperty.call(message, "options"))
|
5859 | $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
5860 | if (message.reservedRange != null && message.reservedRange.length)
|
5861 | for (var i = 0; i < message.reservedRange.length; ++i)
|
5862 | $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
5863 | if (message.reservedName != null && message.reservedName.length)
|
5864 | for (var i = 0; i < message.reservedName.length; ++i)
|
5865 | writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]);
|
5866 | return writer;
|
5867 | };
|
5868 |
|
5869 | /**
|
5870 | * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages.
|
5871 | * @function encodeDelimited
|
5872 | * @memberof google.protobuf.EnumDescriptorProto
|
5873 | * @static
|
5874 | * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode
|
5875 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
5876 | * @returns {$protobuf.Writer} Writer
|
5877 | */
|
5878 | EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) {
|
5879 | return this.encode(message, writer).ldelim();
|
5880 | };
|
5881 |
|
5882 | /**
|
5883 | * Decodes an EnumDescriptorProto message from the specified reader or buffer.
|
5884 | * @function decode
|
5885 | * @memberof google.protobuf.EnumDescriptorProto
|
5886 | * @static
|
5887 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
5888 | * @param {number} [length] Message length if known beforehand
|
5889 | * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto
|
5890 | * @throws {Error} If the payload is not a reader or valid buffer
|
5891 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
5892 | */
|
5893 | EnumDescriptorProto.decode = function decode(reader, length) {
|
5894 | if (!(reader instanceof $Reader))
|
5895 | reader = $Reader.create(reader);
|
5896 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto();
|
5897 | while (reader.pos < end) {
|
5898 | var tag = reader.uint32();
|
5899 | switch (tag >>> 3) {
|
5900 | case 1:
|
5901 | message.name = reader.string();
|
5902 | break;
|
5903 | case 2:
|
5904 | if (!(message.value && message.value.length))
|
5905 | message.value = [];
|
5906 | message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32()));
|
5907 | break;
|
5908 | case 3:
|
5909 | message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32());
|
5910 | break;
|
5911 | case 4:
|
5912 | if (!(message.reservedRange && message.reservedRange.length))
|
5913 | message.reservedRange = [];
|
5914 | message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32()));
|
5915 | break;
|
5916 | case 5:
|
5917 | if (!(message.reservedName && message.reservedName.length))
|
5918 | message.reservedName = [];
|
5919 | message.reservedName.push(reader.string());
|
5920 | break;
|
5921 | default:
|
5922 | reader.skipType(tag & 7);
|
5923 | break;
|
5924 | }
|
5925 | }
|
5926 | return message;
|
5927 | };
|
5928 |
|
5929 | /**
|
5930 | * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited.
|
5931 | * @function decodeDelimited
|
5932 | * @memberof google.protobuf.EnumDescriptorProto
|
5933 | * @static
|
5934 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
5935 | * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto
|
5936 | * @throws {Error} If the payload is not a reader or valid buffer
|
5937 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
5938 | */
|
5939 | EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) {
|
5940 | if (!(reader instanceof $Reader))
|
5941 | reader = new $Reader(reader);
|
5942 | return this.decode(reader, reader.uint32());
|
5943 | };
|
5944 |
|
5945 | /**
|
5946 | * Verifies an EnumDescriptorProto message.
|
5947 | * @function verify
|
5948 | * @memberof google.protobuf.EnumDescriptorProto
|
5949 | * @static
|
5950 | * @param {Object.<string,*>} message Plain object to verify
|
5951 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
5952 | */
|
5953 | EnumDescriptorProto.verify = function verify(message) {
|
5954 | if (typeof message !== "object" || message === null)
|
5955 | return "object expected";
|
5956 | if (message.name != null && message.hasOwnProperty("name"))
|
5957 | if (!$util.isString(message.name))
|
5958 | return "name: string expected";
|
5959 | if (message.value != null && message.hasOwnProperty("value")) {
|
5960 | if (!Array.isArray(message.value))
|
5961 | return "value: array expected";
|
5962 | for (var i = 0; i < message.value.length; ++i) {
|
5963 | var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]);
|
5964 | if (error)
|
5965 | return "value." + error;
|
5966 | }
|
5967 | }
|
5968 | if (message.options != null && message.hasOwnProperty("options")) {
|
5969 | var error = $root.google.protobuf.EnumOptions.verify(message.options);
|
5970 | if (error)
|
5971 | return "options." + error;
|
5972 | }
|
5973 | if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) {
|
5974 | if (!Array.isArray(message.reservedRange))
|
5975 | return "reservedRange: array expected";
|
5976 | for (var i = 0; i < message.reservedRange.length; ++i) {
|
5977 | var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]);
|
5978 | if (error)
|
5979 | return "reservedRange." + error;
|
5980 | }
|
5981 | }
|
5982 | if (message.reservedName != null && message.hasOwnProperty("reservedName")) {
|
5983 | if (!Array.isArray(message.reservedName))
|
5984 | return "reservedName: array expected";
|
5985 | for (var i = 0; i < message.reservedName.length; ++i)
|
5986 | if (!$util.isString(message.reservedName[i]))
|
5987 | return "reservedName: string[] expected";
|
5988 | }
|
5989 | return null;
|
5990 | };
|
5991 |
|
5992 | /**
|
5993 | * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types.
|
5994 | * @function fromObject
|
5995 | * @memberof google.protobuf.EnumDescriptorProto
|
5996 | * @static
|
5997 | * @param {Object.<string,*>} object Plain object
|
5998 | * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto
|
5999 | */
|
6000 | EnumDescriptorProto.fromObject = function fromObject(object) {
|
6001 | if (object instanceof $root.google.protobuf.EnumDescriptorProto)
|
6002 | return object;
|
6003 | var message = new $root.google.protobuf.EnumDescriptorProto();
|
6004 | if (object.name != null)
|
6005 | message.name = String(object.name);
|
6006 | if (object.value) {
|
6007 | if (!Array.isArray(object.value))
|
6008 | throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected");
|
6009 | message.value = [];
|
6010 | for (var i = 0; i < object.value.length; ++i) {
|
6011 | if (typeof object.value[i] !== "object")
|
6012 | throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected");
|
6013 | message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]);
|
6014 | }
|
6015 | }
|
6016 | if (object.options != null) {
|
6017 | if (typeof object.options !== "object")
|
6018 | throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected");
|
6019 | message.options = $root.google.protobuf.EnumOptions.fromObject(object.options);
|
6020 | }
|
6021 | if (object.reservedRange) {
|
6022 | if (!Array.isArray(object.reservedRange))
|
6023 | throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected");
|
6024 | message.reservedRange = [];
|
6025 | for (var i = 0; i < object.reservedRange.length; ++i) {
|
6026 | if (typeof object.reservedRange[i] !== "object")
|
6027 | throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected");
|
6028 | message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]);
|
6029 | }
|
6030 | }
|
6031 | if (object.reservedName) {
|
6032 | if (!Array.isArray(object.reservedName))
|
6033 | throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected");
|
6034 | message.reservedName = [];
|
6035 | for (var i = 0; i < object.reservedName.length; ++i)
|
6036 | message.reservedName[i] = String(object.reservedName[i]);
|
6037 | }
|
6038 | return message;
|
6039 | };
|
6040 |
|
6041 | /**
|
6042 | * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified.
|
6043 | * @function toObject
|
6044 | * @memberof google.protobuf.EnumDescriptorProto
|
6045 | * @static
|
6046 | * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto
|
6047 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
6048 | * @returns {Object.<string,*>} Plain object
|
6049 | */
|
6050 | EnumDescriptorProto.toObject = function toObject(message, options) {
|
6051 | if (!options)
|
6052 | options = {};
|
6053 | var object = {};
|
6054 | if (options.arrays || options.defaults) {
|
6055 | object.value = [];
|
6056 | object.reservedRange = [];
|
6057 | object.reservedName = [];
|
6058 | }
|
6059 | if (options.defaults) {
|
6060 | object.name = "";
|
6061 | object.options = null;
|
6062 | }
|
6063 | if (message.name != null && message.hasOwnProperty("name"))
|
6064 | object.name = message.name;
|
6065 | if (message.value && message.value.length) {
|
6066 | object.value = [];
|
6067 | for (var j = 0; j < message.value.length; ++j)
|
6068 | object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options);
|
6069 | }
|
6070 | if (message.options != null && message.hasOwnProperty("options"))
|
6071 | object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options);
|
6072 | if (message.reservedRange && message.reservedRange.length) {
|
6073 | object.reservedRange = [];
|
6074 | for (var j = 0; j < message.reservedRange.length; ++j)
|
6075 | object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options);
|
6076 | }
|
6077 | if (message.reservedName && message.reservedName.length) {
|
6078 | object.reservedName = [];
|
6079 | for (var j = 0; j < message.reservedName.length; ++j)
|
6080 | object.reservedName[j] = message.reservedName[j];
|
6081 | }
|
6082 | return object;
|
6083 | };
|
6084 |
|
6085 | /**
|
6086 | * Converts this EnumDescriptorProto to JSON.
|
6087 | * @function toJSON
|
6088 | * @memberof google.protobuf.EnumDescriptorProto
|
6089 | * @instance
|
6090 | * @returns {Object.<string,*>} JSON object
|
6091 | */
|
6092 | EnumDescriptorProto.prototype.toJSON = function toJSON() {
|
6093 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
6094 | };
|
6095 |
|
6096 | EnumDescriptorProto.EnumReservedRange = (function() {
|
6097 |
|
6098 | /**
|
6099 | * Properties of an EnumReservedRange.
|
6100 | * @memberof google.protobuf.EnumDescriptorProto
|
6101 | * @interface IEnumReservedRange
|
6102 | * @property {number|null} [start] EnumReservedRange start
|
6103 | * @property {number|null} [end] EnumReservedRange end
|
6104 | */
|
6105 |
|
6106 | /**
|
6107 | * Constructs a new EnumReservedRange.
|
6108 | * @memberof google.protobuf.EnumDescriptorProto
|
6109 | * @classdesc Represents an EnumReservedRange.
|
6110 | * @implements IEnumReservedRange
|
6111 | * @constructor
|
6112 | * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set
|
6113 | */
|
6114 | function EnumReservedRange(properties) {
|
6115 | if (properties)
|
6116 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
6117 | if (properties[keys[i]] != null)
|
6118 | this[keys[i]] = properties[keys[i]];
|
6119 | }
|
6120 |
|
6121 | /**
|
6122 | * EnumReservedRange start.
|
6123 | * @member {number} start
|
6124 | * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange
|
6125 | * @instance
|
6126 | */
|
6127 | EnumReservedRange.prototype.start = 0;
|
6128 |
|
6129 | /**
|
6130 | * EnumReservedRange end.
|
6131 | * @member {number} end
|
6132 | * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange
|
6133 | * @instance
|
6134 | */
|
6135 | EnumReservedRange.prototype.end = 0;
|
6136 |
|
6137 | /**
|
6138 | * Creates a new EnumReservedRange instance using the specified properties.
|
6139 | * @function create
|
6140 | * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange
|
6141 | * @static
|
6142 | * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set
|
6143 | * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance
|
6144 | */
|
6145 | EnumReservedRange.create = function create(properties) {
|
6146 | return new EnumReservedRange(properties);
|
6147 | };
|
6148 |
|
6149 | /**
|
6150 | * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages.
|
6151 | * @function encode
|
6152 | * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange
|
6153 | * @static
|
6154 | * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode
|
6155 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
6156 | * @returns {$protobuf.Writer} Writer
|
6157 | */
|
6158 | EnumReservedRange.encode = function encode(message, writer) {
|
6159 | if (!writer)
|
6160 | writer = $Writer.create();
|
6161 | if (message.start != null && Object.hasOwnProperty.call(message, "start"))
|
6162 | writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start);
|
6163 | if (message.end != null && Object.hasOwnProperty.call(message, "end"))
|
6164 | writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end);
|
6165 | return writer;
|
6166 | };
|
6167 |
|
6168 | /**
|
6169 | * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages.
|
6170 | * @function encodeDelimited
|
6171 | * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange
|
6172 | * @static
|
6173 | * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode
|
6174 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
6175 | * @returns {$protobuf.Writer} Writer
|
6176 | */
|
6177 | EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) {
|
6178 | return this.encode(message, writer).ldelim();
|
6179 | };
|
6180 |
|
6181 | /**
|
6182 | * Decodes an EnumReservedRange message from the specified reader or buffer.
|
6183 | * @function decode
|
6184 | * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange
|
6185 | * @static
|
6186 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
6187 | * @param {number} [length] Message length if known beforehand
|
6188 | * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange
|
6189 | * @throws {Error} If the payload is not a reader or valid buffer
|
6190 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
6191 | */
|
6192 | EnumReservedRange.decode = function decode(reader, length) {
|
6193 | if (!(reader instanceof $Reader))
|
6194 | reader = $Reader.create(reader);
|
6195 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange();
|
6196 | while (reader.pos < end) {
|
6197 | var tag = reader.uint32();
|
6198 | switch (tag >>> 3) {
|
6199 | case 1:
|
6200 | message.start = reader.int32();
|
6201 | break;
|
6202 | case 2:
|
6203 | message.end = reader.int32();
|
6204 | break;
|
6205 | default:
|
6206 | reader.skipType(tag & 7);
|
6207 | break;
|
6208 | }
|
6209 | }
|
6210 | return message;
|
6211 | };
|
6212 |
|
6213 | /**
|
6214 | * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited.
|
6215 | * @function decodeDelimited
|
6216 | * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange
|
6217 | * @static
|
6218 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
6219 | * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange
|
6220 | * @throws {Error} If the payload is not a reader or valid buffer
|
6221 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
6222 | */
|
6223 | EnumReservedRange.decodeDelimited = function decodeDelimited(reader) {
|
6224 | if (!(reader instanceof $Reader))
|
6225 | reader = new $Reader(reader);
|
6226 | return this.decode(reader, reader.uint32());
|
6227 | };
|
6228 |
|
6229 | /**
|
6230 | * Verifies an EnumReservedRange message.
|
6231 | * @function verify
|
6232 | * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange
|
6233 | * @static
|
6234 | * @param {Object.<string,*>} message Plain object to verify
|
6235 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
6236 | */
|
6237 | EnumReservedRange.verify = function verify(message) {
|
6238 | if (typeof message !== "object" || message === null)
|
6239 | return "object expected";
|
6240 | if (message.start != null && message.hasOwnProperty("start"))
|
6241 | if (!$util.isInteger(message.start))
|
6242 | return "start: integer expected";
|
6243 | if (message.end != null && message.hasOwnProperty("end"))
|
6244 | if (!$util.isInteger(message.end))
|
6245 | return "end: integer expected";
|
6246 | return null;
|
6247 | };
|
6248 |
|
6249 | /**
|
6250 | * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types.
|
6251 | * @function fromObject
|
6252 | * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange
|
6253 | * @static
|
6254 | * @param {Object.<string,*>} object Plain object
|
6255 | * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange
|
6256 | */
|
6257 | EnumReservedRange.fromObject = function fromObject(object) {
|
6258 | if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange)
|
6259 | return object;
|
6260 | var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange();
|
6261 | if (object.start != null)
|
6262 | message.start = object.start | 0;
|
6263 | if (object.end != null)
|
6264 | message.end = object.end | 0;
|
6265 | return message;
|
6266 | };
|
6267 |
|
6268 | /**
|
6269 | * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified.
|
6270 | * @function toObject
|
6271 | * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange
|
6272 | * @static
|
6273 | * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange
|
6274 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
6275 | * @returns {Object.<string,*>} Plain object
|
6276 | */
|
6277 | EnumReservedRange.toObject = function toObject(message, options) {
|
6278 | if (!options)
|
6279 | options = {};
|
6280 | var object = {};
|
6281 | if (options.defaults) {
|
6282 | object.start = 0;
|
6283 | object.end = 0;
|
6284 | }
|
6285 | if (message.start != null && message.hasOwnProperty("start"))
|
6286 | object.start = message.start;
|
6287 | if (message.end != null && message.hasOwnProperty("end"))
|
6288 | object.end = message.end;
|
6289 | return object;
|
6290 | };
|
6291 |
|
6292 | /**
|
6293 | * Converts this EnumReservedRange to JSON.
|
6294 | * @function toJSON
|
6295 | * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange
|
6296 | * @instance
|
6297 | * @returns {Object.<string,*>} JSON object
|
6298 | */
|
6299 | EnumReservedRange.prototype.toJSON = function toJSON() {
|
6300 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
6301 | };
|
6302 |
|
6303 | return EnumReservedRange;
|
6304 | })();
|
6305 |
|
6306 | return EnumDescriptorProto;
|
6307 | })();
|
6308 |
|
6309 | protobuf.EnumValueDescriptorProto = (function() {
|
6310 |
|
6311 | /**
|
6312 | * Properties of an EnumValueDescriptorProto.
|
6313 | * @memberof google.protobuf
|
6314 | * @interface IEnumValueDescriptorProto
|
6315 | * @property {string|null} [name] EnumValueDescriptorProto name
|
6316 | * @property {number|null} [number] EnumValueDescriptorProto number
|
6317 | * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options
|
6318 | */
|
6319 |
|
6320 | /**
|
6321 | * Constructs a new EnumValueDescriptorProto.
|
6322 | * @memberof google.protobuf
|
6323 | * @classdesc Represents an EnumValueDescriptorProto.
|
6324 | * @implements IEnumValueDescriptorProto
|
6325 | * @constructor
|
6326 | * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set
|
6327 | */
|
6328 | function EnumValueDescriptorProto(properties) {
|
6329 | if (properties)
|
6330 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
6331 | if (properties[keys[i]] != null)
|
6332 | this[keys[i]] = properties[keys[i]];
|
6333 | }
|
6334 |
|
6335 | /**
|
6336 | * EnumValueDescriptorProto name.
|
6337 | * @member {string} name
|
6338 | * @memberof google.protobuf.EnumValueDescriptorProto
|
6339 | * @instance
|
6340 | */
|
6341 | EnumValueDescriptorProto.prototype.name = "";
|
6342 |
|
6343 | /**
|
6344 | * EnumValueDescriptorProto number.
|
6345 | * @member {number} number
|
6346 | * @memberof google.protobuf.EnumValueDescriptorProto
|
6347 | * @instance
|
6348 | */
|
6349 | EnumValueDescriptorProto.prototype.number = 0;
|
6350 |
|
6351 | /**
|
6352 | * EnumValueDescriptorProto options.
|
6353 | * @member {google.protobuf.IEnumValueOptions|null|undefined} options
|
6354 | * @memberof google.protobuf.EnumValueDescriptorProto
|
6355 | * @instance
|
6356 | */
|
6357 | EnumValueDescriptorProto.prototype.options = null;
|
6358 |
|
6359 | /**
|
6360 | * Creates a new EnumValueDescriptorProto instance using the specified properties.
|
6361 | * @function create
|
6362 | * @memberof google.protobuf.EnumValueDescriptorProto
|
6363 | * @static
|
6364 | * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set
|
6365 | * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance
|
6366 | */
|
6367 | EnumValueDescriptorProto.create = function create(properties) {
|
6368 | return new EnumValueDescriptorProto(properties);
|
6369 | };
|
6370 |
|
6371 | /**
|
6372 | * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages.
|
6373 | * @function encode
|
6374 | * @memberof google.protobuf.EnumValueDescriptorProto
|
6375 | * @static
|
6376 | * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode
|
6377 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
6378 | * @returns {$protobuf.Writer} Writer
|
6379 | */
|
6380 | EnumValueDescriptorProto.encode = function encode(message, writer) {
|
6381 | if (!writer)
|
6382 | writer = $Writer.create();
|
6383 | if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
6384 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
6385 | if (message.number != null && Object.hasOwnProperty.call(message, "number"))
|
6386 | writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number);
|
6387 | if (message.options != null && Object.hasOwnProperty.call(message, "options"))
|
6388 | $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
6389 | return writer;
|
6390 | };
|
6391 |
|
6392 | /**
|
6393 | * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages.
|
6394 | * @function encodeDelimited
|
6395 | * @memberof google.protobuf.EnumValueDescriptorProto
|
6396 | * @static
|
6397 | * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode
|
6398 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
6399 | * @returns {$protobuf.Writer} Writer
|
6400 | */
|
6401 | EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) {
|
6402 | return this.encode(message, writer).ldelim();
|
6403 | };
|
6404 |
|
6405 | /**
|
6406 | * Decodes an EnumValueDescriptorProto message from the specified reader or buffer.
|
6407 | * @function decode
|
6408 | * @memberof google.protobuf.EnumValueDescriptorProto
|
6409 | * @static
|
6410 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
6411 | * @param {number} [length] Message length if known beforehand
|
6412 | * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto
|
6413 | * @throws {Error} If the payload is not a reader or valid buffer
|
6414 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
6415 | */
|
6416 | EnumValueDescriptorProto.decode = function decode(reader, length) {
|
6417 | if (!(reader instanceof $Reader))
|
6418 | reader = $Reader.create(reader);
|
6419 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto();
|
6420 | while (reader.pos < end) {
|
6421 | var tag = reader.uint32();
|
6422 | switch (tag >>> 3) {
|
6423 | case 1:
|
6424 | message.name = reader.string();
|
6425 | break;
|
6426 | case 2:
|
6427 | message.number = reader.int32();
|
6428 | break;
|
6429 | case 3:
|
6430 | message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32());
|
6431 | break;
|
6432 | default:
|
6433 | reader.skipType(tag & 7);
|
6434 | break;
|
6435 | }
|
6436 | }
|
6437 | return message;
|
6438 | };
|
6439 |
|
6440 | /**
|
6441 | * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited.
|
6442 | * @function decodeDelimited
|
6443 | * @memberof google.protobuf.EnumValueDescriptorProto
|
6444 | * @static
|
6445 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
6446 | * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto
|
6447 | * @throws {Error} If the payload is not a reader or valid buffer
|
6448 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
6449 | */
|
6450 | EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) {
|
6451 | if (!(reader instanceof $Reader))
|
6452 | reader = new $Reader(reader);
|
6453 | return this.decode(reader, reader.uint32());
|
6454 | };
|
6455 |
|
6456 | /**
|
6457 | * Verifies an EnumValueDescriptorProto message.
|
6458 | * @function verify
|
6459 | * @memberof google.protobuf.EnumValueDescriptorProto
|
6460 | * @static
|
6461 | * @param {Object.<string,*>} message Plain object to verify
|
6462 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
6463 | */
|
6464 | EnumValueDescriptorProto.verify = function verify(message) {
|
6465 | if (typeof message !== "object" || message === null)
|
6466 | return "object expected";
|
6467 | if (message.name != null && message.hasOwnProperty("name"))
|
6468 | if (!$util.isString(message.name))
|
6469 | return "name: string expected";
|
6470 | if (message.number != null && message.hasOwnProperty("number"))
|
6471 | if (!$util.isInteger(message.number))
|
6472 | return "number: integer expected";
|
6473 | if (message.options != null && message.hasOwnProperty("options")) {
|
6474 | var error = $root.google.protobuf.EnumValueOptions.verify(message.options);
|
6475 | if (error)
|
6476 | return "options." + error;
|
6477 | }
|
6478 | return null;
|
6479 | };
|
6480 |
|
6481 | /**
|
6482 | * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types.
|
6483 | * @function fromObject
|
6484 | * @memberof google.protobuf.EnumValueDescriptorProto
|
6485 | * @static
|
6486 | * @param {Object.<string,*>} object Plain object
|
6487 | * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto
|
6488 | */
|
6489 | EnumValueDescriptorProto.fromObject = function fromObject(object) {
|
6490 | if (object instanceof $root.google.protobuf.EnumValueDescriptorProto)
|
6491 | return object;
|
6492 | var message = new $root.google.protobuf.EnumValueDescriptorProto();
|
6493 | if (object.name != null)
|
6494 | message.name = String(object.name);
|
6495 | if (object.number != null)
|
6496 | message.number = object.number | 0;
|
6497 | if (object.options != null) {
|
6498 | if (typeof object.options !== "object")
|
6499 | throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected");
|
6500 | message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options);
|
6501 | }
|
6502 | return message;
|
6503 | };
|
6504 |
|
6505 | /**
|
6506 | * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified.
|
6507 | * @function toObject
|
6508 | * @memberof google.protobuf.EnumValueDescriptorProto
|
6509 | * @static
|
6510 | * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto
|
6511 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
6512 | * @returns {Object.<string,*>} Plain object
|
6513 | */
|
6514 | EnumValueDescriptorProto.toObject = function toObject(message, options) {
|
6515 | if (!options)
|
6516 | options = {};
|
6517 | var object = {};
|
6518 | if (options.defaults) {
|
6519 | object.name = "";
|
6520 | object.number = 0;
|
6521 | object.options = null;
|
6522 | }
|
6523 | if (message.name != null && message.hasOwnProperty("name"))
|
6524 | object.name = message.name;
|
6525 | if (message.number != null && message.hasOwnProperty("number"))
|
6526 | object.number = message.number;
|
6527 | if (message.options != null && message.hasOwnProperty("options"))
|
6528 | object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options);
|
6529 | return object;
|
6530 | };
|
6531 |
|
6532 | /**
|
6533 | * Converts this EnumValueDescriptorProto to JSON.
|
6534 | * @function toJSON
|
6535 | * @memberof google.protobuf.EnumValueDescriptorProto
|
6536 | * @instance
|
6537 | * @returns {Object.<string,*>} JSON object
|
6538 | */
|
6539 | EnumValueDescriptorProto.prototype.toJSON = function toJSON() {
|
6540 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
6541 | };
|
6542 |
|
6543 | return EnumValueDescriptorProto;
|
6544 | })();
|
6545 |
|
6546 | protobuf.ServiceDescriptorProto = (function() {
|
6547 |
|
6548 | /**
|
6549 | * Properties of a ServiceDescriptorProto.
|
6550 | * @memberof google.protobuf
|
6551 | * @interface IServiceDescriptorProto
|
6552 | * @property {string|null} [name] ServiceDescriptorProto name
|
6553 | * @property {Array.<google.protobuf.IMethodDescriptorProto>|null} [method] ServiceDescriptorProto method
|
6554 | * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options
|
6555 | */
|
6556 |
|
6557 | /**
|
6558 | * Constructs a new ServiceDescriptorProto.
|
6559 | * @memberof google.protobuf
|
6560 | * @classdesc Represents a ServiceDescriptorProto.
|
6561 | * @implements IServiceDescriptorProto
|
6562 | * @constructor
|
6563 | * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set
|
6564 | */
|
6565 | function ServiceDescriptorProto(properties) {
|
6566 | this.method = [];
|
6567 | if (properties)
|
6568 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
6569 | if (properties[keys[i]] != null)
|
6570 | this[keys[i]] = properties[keys[i]];
|
6571 | }
|
6572 |
|
6573 | /**
|
6574 | * ServiceDescriptorProto name.
|
6575 | * @member {string} name
|
6576 | * @memberof google.protobuf.ServiceDescriptorProto
|
6577 | * @instance
|
6578 | */
|
6579 | ServiceDescriptorProto.prototype.name = "";
|
6580 |
|
6581 | /**
|
6582 | * ServiceDescriptorProto method.
|
6583 | * @member {Array.<google.protobuf.IMethodDescriptorProto>} method
|
6584 | * @memberof google.protobuf.ServiceDescriptorProto
|
6585 | * @instance
|
6586 | */
|
6587 | ServiceDescriptorProto.prototype.method = $util.emptyArray;
|
6588 |
|
6589 | /**
|
6590 | * ServiceDescriptorProto options.
|
6591 | * @member {google.protobuf.IServiceOptions|null|undefined} options
|
6592 | * @memberof google.protobuf.ServiceDescriptorProto
|
6593 | * @instance
|
6594 | */
|
6595 | ServiceDescriptorProto.prototype.options = null;
|
6596 |
|
6597 | /**
|
6598 | * Creates a new ServiceDescriptorProto instance using the specified properties.
|
6599 | * @function create
|
6600 | * @memberof google.protobuf.ServiceDescriptorProto
|
6601 | * @static
|
6602 | * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set
|
6603 | * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance
|
6604 | */
|
6605 | ServiceDescriptorProto.create = function create(properties) {
|
6606 | return new ServiceDescriptorProto(properties);
|
6607 | };
|
6608 |
|
6609 | /**
|
6610 | * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages.
|
6611 | * @function encode
|
6612 | * @memberof google.protobuf.ServiceDescriptorProto
|
6613 | * @static
|
6614 | * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode
|
6615 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
6616 | * @returns {$protobuf.Writer} Writer
|
6617 | */
|
6618 | ServiceDescriptorProto.encode = function encode(message, writer) {
|
6619 | if (!writer)
|
6620 | writer = $Writer.create();
|
6621 | if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
6622 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
6623 | if (message.method != null && message.method.length)
|
6624 | for (var i = 0; i < message.method.length; ++i)
|
6625 | $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
6626 | if (message.options != null && Object.hasOwnProperty.call(message, "options"))
|
6627 | $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
6628 | return writer;
|
6629 | };
|
6630 |
|
6631 | /**
|
6632 | * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages.
|
6633 | * @function encodeDelimited
|
6634 | * @memberof google.protobuf.ServiceDescriptorProto
|
6635 | * @static
|
6636 | * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode
|
6637 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
6638 | * @returns {$protobuf.Writer} Writer
|
6639 | */
|
6640 | ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) {
|
6641 | return this.encode(message, writer).ldelim();
|
6642 | };
|
6643 |
|
6644 | /**
|
6645 | * Decodes a ServiceDescriptorProto message from the specified reader or buffer.
|
6646 | * @function decode
|
6647 | * @memberof google.protobuf.ServiceDescriptorProto
|
6648 | * @static
|
6649 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
6650 | * @param {number} [length] Message length if known beforehand
|
6651 | * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto
|
6652 | * @throws {Error} If the payload is not a reader or valid buffer
|
6653 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
6654 | */
|
6655 | ServiceDescriptorProto.decode = function decode(reader, length) {
|
6656 | if (!(reader instanceof $Reader))
|
6657 | reader = $Reader.create(reader);
|
6658 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto();
|
6659 | while (reader.pos < end) {
|
6660 | var tag = reader.uint32();
|
6661 | switch (tag >>> 3) {
|
6662 | case 1:
|
6663 | message.name = reader.string();
|
6664 | break;
|
6665 | case 2:
|
6666 | if (!(message.method && message.method.length))
|
6667 | message.method = [];
|
6668 | message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32()));
|
6669 | break;
|
6670 | case 3:
|
6671 | message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32());
|
6672 | break;
|
6673 | default:
|
6674 | reader.skipType(tag & 7);
|
6675 | break;
|
6676 | }
|
6677 | }
|
6678 | return message;
|
6679 | };
|
6680 |
|
6681 | /**
|
6682 | * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited.
|
6683 | * @function decodeDelimited
|
6684 | * @memberof google.protobuf.ServiceDescriptorProto
|
6685 | * @static
|
6686 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
6687 | * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto
|
6688 | * @throws {Error} If the payload is not a reader or valid buffer
|
6689 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
6690 | */
|
6691 | ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) {
|
6692 | if (!(reader instanceof $Reader))
|
6693 | reader = new $Reader(reader);
|
6694 | return this.decode(reader, reader.uint32());
|
6695 | };
|
6696 |
|
6697 | /**
|
6698 | * Verifies a ServiceDescriptorProto message.
|
6699 | * @function verify
|
6700 | * @memberof google.protobuf.ServiceDescriptorProto
|
6701 | * @static
|
6702 | * @param {Object.<string,*>} message Plain object to verify
|
6703 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
6704 | */
|
6705 | ServiceDescriptorProto.verify = function verify(message) {
|
6706 | if (typeof message !== "object" || message === null)
|
6707 | return "object expected";
|
6708 | if (message.name != null && message.hasOwnProperty("name"))
|
6709 | if (!$util.isString(message.name))
|
6710 | return "name: string expected";
|
6711 | if (message.method != null && message.hasOwnProperty("method")) {
|
6712 | if (!Array.isArray(message.method))
|
6713 | return "method: array expected";
|
6714 | for (var i = 0; i < message.method.length; ++i) {
|
6715 | var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]);
|
6716 | if (error)
|
6717 | return "method." + error;
|
6718 | }
|
6719 | }
|
6720 | if (message.options != null && message.hasOwnProperty("options")) {
|
6721 | var error = $root.google.protobuf.ServiceOptions.verify(message.options);
|
6722 | if (error)
|
6723 | return "options." + error;
|
6724 | }
|
6725 | return null;
|
6726 | };
|
6727 |
|
6728 | /**
|
6729 | * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types.
|
6730 | * @function fromObject
|
6731 | * @memberof google.protobuf.ServiceDescriptorProto
|
6732 | * @static
|
6733 | * @param {Object.<string,*>} object Plain object
|
6734 | * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto
|
6735 | */
|
6736 | ServiceDescriptorProto.fromObject = function fromObject(object) {
|
6737 | if (object instanceof $root.google.protobuf.ServiceDescriptorProto)
|
6738 | return object;
|
6739 | var message = new $root.google.protobuf.ServiceDescriptorProto();
|
6740 | if (object.name != null)
|
6741 | message.name = String(object.name);
|
6742 | if (object.method) {
|
6743 | if (!Array.isArray(object.method))
|
6744 | throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected");
|
6745 | message.method = [];
|
6746 | for (var i = 0; i < object.method.length; ++i) {
|
6747 | if (typeof object.method[i] !== "object")
|
6748 | throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected");
|
6749 | message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]);
|
6750 | }
|
6751 | }
|
6752 | if (object.options != null) {
|
6753 | if (typeof object.options !== "object")
|
6754 | throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected");
|
6755 | message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options);
|
6756 | }
|
6757 | return message;
|
6758 | };
|
6759 |
|
6760 | /**
|
6761 | * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified.
|
6762 | * @function toObject
|
6763 | * @memberof google.protobuf.ServiceDescriptorProto
|
6764 | * @static
|
6765 | * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto
|
6766 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
6767 | * @returns {Object.<string,*>} Plain object
|
6768 | */
|
6769 | ServiceDescriptorProto.toObject = function toObject(message, options) {
|
6770 | if (!options)
|
6771 | options = {};
|
6772 | var object = {};
|
6773 | if (options.arrays || options.defaults)
|
6774 | object.method = [];
|
6775 | if (options.defaults) {
|
6776 | object.name = "";
|
6777 | object.options = null;
|
6778 | }
|
6779 | if (message.name != null && message.hasOwnProperty("name"))
|
6780 | object.name = message.name;
|
6781 | if (message.method && message.method.length) {
|
6782 | object.method = [];
|
6783 | for (var j = 0; j < message.method.length; ++j)
|
6784 | object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options);
|
6785 | }
|
6786 | if (message.options != null && message.hasOwnProperty("options"))
|
6787 | object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options);
|
6788 | return object;
|
6789 | };
|
6790 |
|
6791 | /**
|
6792 | * Converts this ServiceDescriptorProto to JSON.
|
6793 | * @function toJSON
|
6794 | * @memberof google.protobuf.ServiceDescriptorProto
|
6795 | * @instance
|
6796 | * @returns {Object.<string,*>} JSON object
|
6797 | */
|
6798 | ServiceDescriptorProto.prototype.toJSON = function toJSON() {
|
6799 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
6800 | };
|
6801 |
|
6802 | return ServiceDescriptorProto;
|
6803 | })();
|
6804 |
|
6805 | protobuf.MethodDescriptorProto = (function() {
|
6806 |
|
6807 | /**
|
6808 | * Properties of a MethodDescriptorProto.
|
6809 | * @memberof google.protobuf
|
6810 | * @interface IMethodDescriptorProto
|
6811 | * @property {string|null} [name] MethodDescriptorProto name
|
6812 | * @property {string|null} [inputType] MethodDescriptorProto inputType
|
6813 | * @property {string|null} [outputType] MethodDescriptorProto outputType
|
6814 | * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options
|
6815 | * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming
|
6816 | * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming
|
6817 | */
|
6818 |
|
6819 | /**
|
6820 | * Constructs a new MethodDescriptorProto.
|
6821 | * @memberof google.protobuf
|
6822 | * @classdesc Represents a MethodDescriptorProto.
|
6823 | * @implements IMethodDescriptorProto
|
6824 | * @constructor
|
6825 | * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set
|
6826 | */
|
6827 | function MethodDescriptorProto(properties) {
|
6828 | if (properties)
|
6829 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
6830 | if (properties[keys[i]] != null)
|
6831 | this[keys[i]] = properties[keys[i]];
|
6832 | }
|
6833 |
|
6834 | /**
|
6835 | * MethodDescriptorProto name.
|
6836 | * @member {string} name
|
6837 | * @memberof google.protobuf.MethodDescriptorProto
|
6838 | * @instance
|
6839 | */
|
6840 | MethodDescriptorProto.prototype.name = "";
|
6841 |
|
6842 | /**
|
6843 | * MethodDescriptorProto inputType.
|
6844 | * @member {string} inputType
|
6845 | * @memberof google.protobuf.MethodDescriptorProto
|
6846 | * @instance
|
6847 | */
|
6848 | MethodDescriptorProto.prototype.inputType = "";
|
6849 |
|
6850 | /**
|
6851 | * MethodDescriptorProto outputType.
|
6852 | * @member {string} outputType
|
6853 | * @memberof google.protobuf.MethodDescriptorProto
|
6854 | * @instance
|
6855 | */
|
6856 | MethodDescriptorProto.prototype.outputType = "";
|
6857 |
|
6858 | /**
|
6859 | * MethodDescriptorProto options.
|
6860 | * @member {google.protobuf.IMethodOptions|null|undefined} options
|
6861 | * @memberof google.protobuf.MethodDescriptorProto
|
6862 | * @instance
|
6863 | */
|
6864 | MethodDescriptorProto.prototype.options = null;
|
6865 |
|
6866 | /**
|
6867 | * MethodDescriptorProto clientStreaming.
|
6868 | * @member {boolean} clientStreaming
|
6869 | * @memberof google.protobuf.MethodDescriptorProto
|
6870 | * @instance
|
6871 | */
|
6872 | MethodDescriptorProto.prototype.clientStreaming = false;
|
6873 |
|
6874 | /**
|
6875 | * MethodDescriptorProto serverStreaming.
|
6876 | * @member {boolean} serverStreaming
|
6877 | * @memberof google.protobuf.MethodDescriptorProto
|
6878 | * @instance
|
6879 | */
|
6880 | MethodDescriptorProto.prototype.serverStreaming = false;
|
6881 |
|
6882 | /**
|
6883 | * Creates a new MethodDescriptorProto instance using the specified properties.
|
6884 | * @function create
|
6885 | * @memberof google.protobuf.MethodDescriptorProto
|
6886 | * @static
|
6887 | * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set
|
6888 | * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance
|
6889 | */
|
6890 | MethodDescriptorProto.create = function create(properties) {
|
6891 | return new MethodDescriptorProto(properties);
|
6892 | };
|
6893 |
|
6894 | /**
|
6895 | * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages.
|
6896 | * @function encode
|
6897 | * @memberof google.protobuf.MethodDescriptorProto
|
6898 | * @static
|
6899 | * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode
|
6900 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
6901 | * @returns {$protobuf.Writer} Writer
|
6902 | */
|
6903 | MethodDescriptorProto.encode = function encode(message, writer) {
|
6904 | if (!writer)
|
6905 | writer = $Writer.create();
|
6906 | if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
6907 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
6908 | if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType"))
|
6909 | writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType);
|
6910 | if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType"))
|
6911 | writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType);
|
6912 | if (message.options != null && Object.hasOwnProperty.call(message, "options"))
|
6913 | $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
6914 | if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming"))
|
6915 | writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming);
|
6916 | if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming"))
|
6917 | writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming);
|
6918 | return writer;
|
6919 | };
|
6920 |
|
6921 | /**
|
6922 | * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages.
|
6923 | * @function encodeDelimited
|
6924 | * @memberof google.protobuf.MethodDescriptorProto
|
6925 | * @static
|
6926 | * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode
|
6927 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
6928 | * @returns {$protobuf.Writer} Writer
|
6929 | */
|
6930 | MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) {
|
6931 | return this.encode(message, writer).ldelim();
|
6932 | };
|
6933 |
|
6934 | /**
|
6935 | * Decodes a MethodDescriptorProto message from the specified reader or buffer.
|
6936 | * @function decode
|
6937 | * @memberof google.protobuf.MethodDescriptorProto
|
6938 | * @static
|
6939 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
6940 | * @param {number} [length] Message length if known beforehand
|
6941 | * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto
|
6942 | * @throws {Error} If the payload is not a reader or valid buffer
|
6943 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
6944 | */
|
6945 | MethodDescriptorProto.decode = function decode(reader, length) {
|
6946 | if (!(reader instanceof $Reader))
|
6947 | reader = $Reader.create(reader);
|
6948 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto();
|
6949 | while (reader.pos < end) {
|
6950 | var tag = reader.uint32();
|
6951 | switch (tag >>> 3) {
|
6952 | case 1:
|
6953 | message.name = reader.string();
|
6954 | break;
|
6955 | case 2:
|
6956 | message.inputType = reader.string();
|
6957 | break;
|
6958 | case 3:
|
6959 | message.outputType = reader.string();
|
6960 | break;
|
6961 | case 4:
|
6962 | message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32());
|
6963 | break;
|
6964 | case 5:
|
6965 | message.clientStreaming = reader.bool();
|
6966 | break;
|
6967 | case 6:
|
6968 | message.serverStreaming = reader.bool();
|
6969 | break;
|
6970 | default:
|
6971 | reader.skipType(tag & 7);
|
6972 | break;
|
6973 | }
|
6974 | }
|
6975 | return message;
|
6976 | };
|
6977 |
|
6978 | /**
|
6979 | * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited.
|
6980 | * @function decodeDelimited
|
6981 | * @memberof google.protobuf.MethodDescriptorProto
|
6982 | * @static
|
6983 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
6984 | * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto
|
6985 | * @throws {Error} If the payload is not a reader or valid buffer
|
6986 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
6987 | */
|
6988 | MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) {
|
6989 | if (!(reader instanceof $Reader))
|
6990 | reader = new $Reader(reader);
|
6991 | return this.decode(reader, reader.uint32());
|
6992 | };
|
6993 |
|
6994 | /**
|
6995 | * Verifies a MethodDescriptorProto message.
|
6996 | * @function verify
|
6997 | * @memberof google.protobuf.MethodDescriptorProto
|
6998 | * @static
|
6999 | * @param {Object.<string,*>} message Plain object to verify
|
7000 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
7001 | */
|
7002 | MethodDescriptorProto.verify = function verify(message) {
|
7003 | if (typeof message !== "object" || message === null)
|
7004 | return "object expected";
|
7005 | if (message.name != null && message.hasOwnProperty("name"))
|
7006 | if (!$util.isString(message.name))
|
7007 | return "name: string expected";
|
7008 | if (message.inputType != null && message.hasOwnProperty("inputType"))
|
7009 | if (!$util.isString(message.inputType))
|
7010 | return "inputType: string expected";
|
7011 | if (message.outputType != null && message.hasOwnProperty("outputType"))
|
7012 | if (!$util.isString(message.outputType))
|
7013 | return "outputType: string expected";
|
7014 | if (message.options != null && message.hasOwnProperty("options")) {
|
7015 | var error = $root.google.protobuf.MethodOptions.verify(message.options);
|
7016 | if (error)
|
7017 | return "options." + error;
|
7018 | }
|
7019 | if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming"))
|
7020 | if (typeof message.clientStreaming !== "boolean")
|
7021 | return "clientStreaming: boolean expected";
|
7022 | if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming"))
|
7023 | if (typeof message.serverStreaming !== "boolean")
|
7024 | return "serverStreaming: boolean expected";
|
7025 | return null;
|
7026 | };
|
7027 |
|
7028 | /**
|
7029 | * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types.
|
7030 | * @function fromObject
|
7031 | * @memberof google.protobuf.MethodDescriptorProto
|
7032 | * @static
|
7033 | * @param {Object.<string,*>} object Plain object
|
7034 | * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto
|
7035 | */
|
7036 | MethodDescriptorProto.fromObject = function fromObject(object) {
|
7037 | if (object instanceof $root.google.protobuf.MethodDescriptorProto)
|
7038 | return object;
|
7039 | var message = new $root.google.protobuf.MethodDescriptorProto();
|
7040 | if (object.name != null)
|
7041 | message.name = String(object.name);
|
7042 | if (object.inputType != null)
|
7043 | message.inputType = String(object.inputType);
|
7044 | if (object.outputType != null)
|
7045 | message.outputType = String(object.outputType);
|
7046 | if (object.options != null) {
|
7047 | if (typeof object.options !== "object")
|
7048 | throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected");
|
7049 | message.options = $root.google.protobuf.MethodOptions.fromObject(object.options);
|
7050 | }
|
7051 | if (object.clientStreaming != null)
|
7052 | message.clientStreaming = Boolean(object.clientStreaming);
|
7053 | if (object.serverStreaming != null)
|
7054 | message.serverStreaming = Boolean(object.serverStreaming);
|
7055 | return message;
|
7056 | };
|
7057 |
|
7058 | /**
|
7059 | * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified.
|
7060 | * @function toObject
|
7061 | * @memberof google.protobuf.MethodDescriptorProto
|
7062 | * @static
|
7063 | * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto
|
7064 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
7065 | * @returns {Object.<string,*>} Plain object
|
7066 | */
|
7067 | MethodDescriptorProto.toObject = function toObject(message, options) {
|
7068 | if (!options)
|
7069 | options = {};
|
7070 | var object = {};
|
7071 | if (options.defaults) {
|
7072 | object.name = "";
|
7073 | object.inputType = "";
|
7074 | object.outputType = "";
|
7075 | object.options = null;
|
7076 | object.clientStreaming = false;
|
7077 | object.serverStreaming = false;
|
7078 | }
|
7079 | if (message.name != null && message.hasOwnProperty("name"))
|
7080 | object.name = message.name;
|
7081 | if (message.inputType != null && message.hasOwnProperty("inputType"))
|
7082 | object.inputType = message.inputType;
|
7083 | if (message.outputType != null && message.hasOwnProperty("outputType"))
|
7084 | object.outputType = message.outputType;
|
7085 | if (message.options != null && message.hasOwnProperty("options"))
|
7086 | object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options);
|
7087 | if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming"))
|
7088 | object.clientStreaming = message.clientStreaming;
|
7089 | if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming"))
|
7090 | object.serverStreaming = message.serverStreaming;
|
7091 | return object;
|
7092 | };
|
7093 |
|
7094 | /**
|
7095 | * Converts this MethodDescriptorProto to JSON.
|
7096 | * @function toJSON
|
7097 | * @memberof google.protobuf.MethodDescriptorProto
|
7098 | * @instance
|
7099 | * @returns {Object.<string,*>} JSON object
|
7100 | */
|
7101 | MethodDescriptorProto.prototype.toJSON = function toJSON() {
|
7102 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
7103 | };
|
7104 |
|
7105 | return MethodDescriptorProto;
|
7106 | })();
|
7107 |
|
7108 | protobuf.FileOptions = (function() {
|
7109 |
|
7110 | /**
|
7111 | * Properties of a FileOptions.
|
7112 | * @memberof google.protobuf
|
7113 | * @interface IFileOptions
|
7114 | * @property {string|null} [javaPackage] FileOptions javaPackage
|
7115 | * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname
|
7116 | * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles
|
7117 | * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash
|
7118 | * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8
|
7119 | * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor
|
7120 | * @property {string|null} [goPackage] FileOptions goPackage
|
7121 | * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices
|
7122 | * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices
|
7123 | * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices
|
7124 | * @property {boolean|null} [phpGenericServices] FileOptions phpGenericServices
|
7125 | * @property {boolean|null} [deprecated] FileOptions deprecated
|
7126 | * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas
|
7127 | * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix
|
7128 | * @property {string|null} [csharpNamespace] FileOptions csharpNamespace
|
7129 | * @property {string|null} [swiftPrefix] FileOptions swiftPrefix
|
7130 | * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix
|
7131 | * @property {string|null} [phpNamespace] FileOptions phpNamespace
|
7132 | * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace
|
7133 | * @property {string|null} [rubyPackage] FileOptions rubyPackage
|
7134 | * @property {Array.<google.protobuf.IUninterpretedOption>|null} [uninterpretedOption] FileOptions uninterpretedOption
|
7135 | */
|
7136 |
|
7137 | /**
|
7138 | * Constructs a new FileOptions.
|
7139 | * @memberof google.protobuf
|
7140 | * @classdesc Represents a FileOptions.
|
7141 | * @implements IFileOptions
|
7142 | * @constructor
|
7143 | * @param {google.protobuf.IFileOptions=} [properties] Properties to set
|
7144 | */
|
7145 | function FileOptions(properties) {
|
7146 | this.uninterpretedOption = [];
|
7147 | if (properties)
|
7148 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
7149 | if (properties[keys[i]] != null)
|
7150 | this[keys[i]] = properties[keys[i]];
|
7151 | }
|
7152 |
|
7153 | /**
|
7154 | * FileOptions javaPackage.
|
7155 | * @member {string} javaPackage
|
7156 | * @memberof google.protobuf.FileOptions
|
7157 | * @instance
|
7158 | */
|
7159 | FileOptions.prototype.javaPackage = "";
|
7160 |
|
7161 | /**
|
7162 | * FileOptions javaOuterClassname.
|
7163 | * @member {string} javaOuterClassname
|
7164 | * @memberof google.protobuf.FileOptions
|
7165 | * @instance
|
7166 | */
|
7167 | FileOptions.prototype.javaOuterClassname = "";
|
7168 |
|
7169 | /**
|
7170 | * FileOptions javaMultipleFiles.
|
7171 | * @member {boolean} javaMultipleFiles
|
7172 | * @memberof google.protobuf.FileOptions
|
7173 | * @instance
|
7174 | */
|
7175 | FileOptions.prototype.javaMultipleFiles = false;
|
7176 |
|
7177 | /**
|
7178 | * FileOptions javaGenerateEqualsAndHash.
|
7179 | * @member {boolean} javaGenerateEqualsAndHash
|
7180 | * @memberof google.protobuf.FileOptions
|
7181 | * @instance
|
7182 | */
|
7183 | FileOptions.prototype.javaGenerateEqualsAndHash = false;
|
7184 |
|
7185 | /**
|
7186 | * FileOptions javaStringCheckUtf8.
|
7187 | * @member {boolean} javaStringCheckUtf8
|
7188 | * @memberof google.protobuf.FileOptions
|
7189 | * @instance
|
7190 | */
|
7191 | FileOptions.prototype.javaStringCheckUtf8 = false;
|
7192 |
|
7193 | /**
|
7194 | * FileOptions optimizeFor.
|
7195 | * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor
|
7196 | * @memberof google.protobuf.FileOptions
|
7197 | * @instance
|
7198 | */
|
7199 | FileOptions.prototype.optimizeFor = 1;
|
7200 |
|
7201 | /**
|
7202 | * FileOptions goPackage.
|
7203 | * @member {string} goPackage
|
7204 | * @memberof google.protobuf.FileOptions
|
7205 | * @instance
|
7206 | */
|
7207 | FileOptions.prototype.goPackage = "";
|
7208 |
|
7209 | /**
|
7210 | * FileOptions ccGenericServices.
|
7211 | * @member {boolean} ccGenericServices
|
7212 | * @memberof google.protobuf.FileOptions
|
7213 | * @instance
|
7214 | */
|
7215 | FileOptions.prototype.ccGenericServices = false;
|
7216 |
|
7217 | /**
|
7218 | * FileOptions javaGenericServices.
|
7219 | * @member {boolean} javaGenericServices
|
7220 | * @memberof google.protobuf.FileOptions
|
7221 | * @instance
|
7222 | */
|
7223 | FileOptions.prototype.javaGenericServices = false;
|
7224 |
|
7225 | /**
|
7226 | * FileOptions pyGenericServices.
|
7227 | * @member {boolean} pyGenericServices
|
7228 | * @memberof google.protobuf.FileOptions
|
7229 | * @instance
|
7230 | */
|
7231 | FileOptions.prototype.pyGenericServices = false;
|
7232 |
|
7233 | /**
|
7234 | * FileOptions phpGenericServices.
|
7235 | * @member {boolean} phpGenericServices
|
7236 | * @memberof google.protobuf.FileOptions
|
7237 | * @instance
|
7238 | */
|
7239 | FileOptions.prototype.phpGenericServices = false;
|
7240 |
|
7241 | /**
|
7242 | * FileOptions deprecated.
|
7243 | * @member {boolean} deprecated
|
7244 | * @memberof google.protobuf.FileOptions
|
7245 | * @instance
|
7246 | */
|
7247 | FileOptions.prototype.deprecated = false;
|
7248 |
|
7249 | /**
|
7250 | * FileOptions ccEnableArenas.
|
7251 | * @member {boolean} ccEnableArenas
|
7252 | * @memberof google.protobuf.FileOptions
|
7253 | * @instance
|
7254 | */
|
7255 | FileOptions.prototype.ccEnableArenas = true;
|
7256 |
|
7257 | /**
|
7258 | * FileOptions objcClassPrefix.
|
7259 | * @member {string} objcClassPrefix
|
7260 | * @memberof google.protobuf.FileOptions
|
7261 | * @instance
|
7262 | */
|
7263 | FileOptions.prototype.objcClassPrefix = "";
|
7264 |
|
7265 | /**
|
7266 | * FileOptions csharpNamespace.
|
7267 | * @member {string} csharpNamespace
|
7268 | * @memberof google.protobuf.FileOptions
|
7269 | * @instance
|
7270 | */
|
7271 | FileOptions.prototype.csharpNamespace = "";
|
7272 |
|
7273 | /**
|
7274 | * FileOptions swiftPrefix.
|
7275 | * @member {string} swiftPrefix
|
7276 | * @memberof google.protobuf.FileOptions
|
7277 | * @instance
|
7278 | */
|
7279 | FileOptions.prototype.swiftPrefix = "";
|
7280 |
|
7281 | /**
|
7282 | * FileOptions phpClassPrefix.
|
7283 | * @member {string} phpClassPrefix
|
7284 | * @memberof google.protobuf.FileOptions
|
7285 | * @instance
|
7286 | */
|
7287 | FileOptions.prototype.phpClassPrefix = "";
|
7288 |
|
7289 | /**
|
7290 | * FileOptions phpNamespace.
|
7291 | * @member {string} phpNamespace
|
7292 | * @memberof google.protobuf.FileOptions
|
7293 | * @instance
|
7294 | */
|
7295 | FileOptions.prototype.phpNamespace = "";
|
7296 |
|
7297 | /**
|
7298 | * FileOptions phpMetadataNamespace.
|
7299 | * @member {string} phpMetadataNamespace
|
7300 | * @memberof google.protobuf.FileOptions
|
7301 | * @instance
|
7302 | */
|
7303 | FileOptions.prototype.phpMetadataNamespace = "";
|
7304 |
|
7305 | /**
|
7306 | * FileOptions rubyPackage.
|
7307 | * @member {string} rubyPackage
|
7308 | * @memberof google.protobuf.FileOptions
|
7309 | * @instance
|
7310 | */
|
7311 | FileOptions.prototype.rubyPackage = "";
|
7312 |
|
7313 | /**
|
7314 | * FileOptions uninterpretedOption.
|
7315 | * @member {Array.<google.protobuf.IUninterpretedOption>} uninterpretedOption
|
7316 | * @memberof google.protobuf.FileOptions
|
7317 | * @instance
|
7318 | */
|
7319 | FileOptions.prototype.uninterpretedOption = $util.emptyArray;
|
7320 |
|
7321 | /**
|
7322 | * Creates a new FileOptions instance using the specified properties.
|
7323 | * @function create
|
7324 | * @memberof google.protobuf.FileOptions
|
7325 | * @static
|
7326 | * @param {google.protobuf.IFileOptions=} [properties] Properties to set
|
7327 | * @returns {google.protobuf.FileOptions} FileOptions instance
|
7328 | */
|
7329 | FileOptions.create = function create(properties) {
|
7330 | return new FileOptions(properties);
|
7331 | };
|
7332 |
|
7333 | /**
|
7334 | * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages.
|
7335 | * @function encode
|
7336 | * @memberof google.protobuf.FileOptions
|
7337 | * @static
|
7338 | * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode
|
7339 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
7340 | * @returns {$protobuf.Writer} Writer
|
7341 | */
|
7342 | FileOptions.encode = function encode(message, writer) {
|
7343 | if (!writer)
|
7344 | writer = $Writer.create();
|
7345 | if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage"))
|
7346 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage);
|
7347 | if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname"))
|
7348 | writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname);
|
7349 | if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor"))
|
7350 | writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor);
|
7351 | if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles"))
|
7352 | writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles);
|
7353 | if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage"))
|
7354 | writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage);
|
7355 | if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices"))
|
7356 | writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices);
|
7357 | if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices"))
|
7358 | writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices);
|
7359 | if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices"))
|
7360 | writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices);
|
7361 | if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash"))
|
7362 | writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash);
|
7363 | if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated"))
|
7364 | writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated);
|
7365 | if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8"))
|
7366 | writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8);
|
7367 | if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas"))
|
7368 | writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas);
|
7369 | if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix"))
|
7370 | writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix);
|
7371 | if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace"))
|
7372 | writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace);
|
7373 | if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix"))
|
7374 | writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix);
|
7375 | if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix"))
|
7376 | writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix);
|
7377 | if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace"))
|
7378 | writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace);
|
7379 | if (message.phpGenericServices != null && Object.hasOwnProperty.call(message, "phpGenericServices"))
|
7380 | writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices);
|
7381 | if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace"))
|
7382 | writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace);
|
7383 | if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage"))
|
7384 | writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage);
|
7385 | if (message.uninterpretedOption != null && message.uninterpretedOption.length)
|
7386 | for (var i = 0; i < message.uninterpretedOption.length; ++i)
|
7387 | $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim();
|
7388 | return writer;
|
7389 | };
|
7390 |
|
7391 | /**
|
7392 | * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages.
|
7393 | * @function encodeDelimited
|
7394 | * @memberof google.protobuf.FileOptions
|
7395 | * @static
|
7396 | * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode
|
7397 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
7398 | * @returns {$protobuf.Writer} Writer
|
7399 | */
|
7400 | FileOptions.encodeDelimited = function encodeDelimited(message, writer) {
|
7401 | return this.encode(message, writer).ldelim();
|
7402 | };
|
7403 |
|
7404 | /**
|
7405 | * Decodes a FileOptions message from the specified reader or buffer.
|
7406 | * @function decode
|
7407 | * @memberof google.protobuf.FileOptions
|
7408 | * @static
|
7409 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
7410 | * @param {number} [length] Message length if known beforehand
|
7411 | * @returns {google.protobuf.FileOptions} FileOptions
|
7412 | * @throws {Error} If the payload is not a reader or valid buffer
|
7413 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
7414 | */
|
7415 | FileOptions.decode = function decode(reader, length) {
|
7416 | if (!(reader instanceof $Reader))
|
7417 | reader = $Reader.create(reader);
|
7418 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions();
|
7419 | while (reader.pos < end) {
|
7420 | var tag = reader.uint32();
|
7421 | switch (tag >>> 3) {
|
7422 | case 1:
|
7423 | message.javaPackage = reader.string();
|
7424 | break;
|
7425 | case 8:
|
7426 | message.javaOuterClassname = reader.string();
|
7427 | break;
|
7428 | case 10:
|
7429 | message.javaMultipleFiles = reader.bool();
|
7430 | break;
|
7431 | case 20:
|
7432 | message.javaGenerateEqualsAndHash = reader.bool();
|
7433 | break;
|
7434 | case 27:
|
7435 | message.javaStringCheckUtf8 = reader.bool();
|
7436 | break;
|
7437 | case 9:
|
7438 | message.optimizeFor = reader.int32();
|
7439 | break;
|
7440 | case 11:
|
7441 | message.goPackage = reader.string();
|
7442 | break;
|
7443 | case 16:
|
7444 | message.ccGenericServices = reader.bool();
|
7445 | break;
|
7446 | case 17:
|
7447 | message.javaGenericServices = reader.bool();
|
7448 | break;
|
7449 | case 18:
|
7450 | message.pyGenericServices = reader.bool();
|
7451 | break;
|
7452 | case 42:
|
7453 | message.phpGenericServices = reader.bool();
|
7454 | break;
|
7455 | case 23:
|
7456 | message.deprecated = reader.bool();
|
7457 | break;
|
7458 | case 31:
|
7459 | message.ccEnableArenas = reader.bool();
|
7460 | break;
|
7461 | case 36:
|
7462 | message.objcClassPrefix = reader.string();
|
7463 | break;
|
7464 | case 37:
|
7465 | message.csharpNamespace = reader.string();
|
7466 | break;
|
7467 | case 39:
|
7468 | message.swiftPrefix = reader.string();
|
7469 | break;
|
7470 | case 40:
|
7471 | message.phpClassPrefix = reader.string();
|
7472 | break;
|
7473 | case 41:
|
7474 | message.phpNamespace = reader.string();
|
7475 | break;
|
7476 | case 44:
|
7477 | message.phpMetadataNamespace = reader.string();
|
7478 | break;
|
7479 | case 45:
|
7480 | message.rubyPackage = reader.string();
|
7481 | break;
|
7482 | case 999:
|
7483 | if (!(message.uninterpretedOption && message.uninterpretedOption.length))
|
7484 | message.uninterpretedOption = [];
|
7485 | message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32()));
|
7486 | break;
|
7487 | default:
|
7488 | reader.skipType(tag & 7);
|
7489 | break;
|
7490 | }
|
7491 | }
|
7492 | return message;
|
7493 | };
|
7494 |
|
7495 | /**
|
7496 | * Decodes a FileOptions message from the specified reader or buffer, length delimited.
|
7497 | * @function decodeDelimited
|
7498 | * @memberof google.protobuf.FileOptions
|
7499 | * @static
|
7500 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
7501 | * @returns {google.protobuf.FileOptions} FileOptions
|
7502 | * @throws {Error} If the payload is not a reader or valid buffer
|
7503 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
7504 | */
|
7505 | FileOptions.decodeDelimited = function decodeDelimited(reader) {
|
7506 | if (!(reader instanceof $Reader))
|
7507 | reader = new $Reader(reader);
|
7508 | return this.decode(reader, reader.uint32());
|
7509 | };
|
7510 |
|
7511 | /**
|
7512 | * Verifies a FileOptions message.
|
7513 | * @function verify
|
7514 | * @memberof google.protobuf.FileOptions
|
7515 | * @static
|
7516 | * @param {Object.<string,*>} message Plain object to verify
|
7517 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
7518 | */
|
7519 | FileOptions.verify = function verify(message) {
|
7520 | if (typeof message !== "object" || message === null)
|
7521 | return "object expected";
|
7522 | if (message.javaPackage != null && message.hasOwnProperty("javaPackage"))
|
7523 | if (!$util.isString(message.javaPackage))
|
7524 | return "javaPackage: string expected";
|
7525 | if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname"))
|
7526 | if (!$util.isString(message.javaOuterClassname))
|
7527 | return "javaOuterClassname: string expected";
|
7528 | if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles"))
|
7529 | if (typeof message.javaMultipleFiles !== "boolean")
|
7530 | return "javaMultipleFiles: boolean expected";
|
7531 | if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash"))
|
7532 | if (typeof message.javaGenerateEqualsAndHash !== "boolean")
|
7533 | return "javaGenerateEqualsAndHash: boolean expected";
|
7534 | if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8"))
|
7535 | if (typeof message.javaStringCheckUtf8 !== "boolean")
|
7536 | return "javaStringCheckUtf8: boolean expected";
|
7537 | if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor"))
|
7538 | switch (message.optimizeFor) {
|
7539 | default:
|
7540 | return "optimizeFor: enum value expected";
|
7541 | case 1:
|
7542 | case 2:
|
7543 | case 3:
|
7544 | break;
|
7545 | }
|
7546 | if (message.goPackage != null && message.hasOwnProperty("goPackage"))
|
7547 | if (!$util.isString(message.goPackage))
|
7548 | return "goPackage: string expected";
|
7549 | if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices"))
|
7550 | if (typeof message.ccGenericServices !== "boolean")
|
7551 | return "ccGenericServices: boolean expected";
|
7552 | if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices"))
|
7553 | if (typeof message.javaGenericServices !== "boolean")
|
7554 | return "javaGenericServices: boolean expected";
|
7555 | if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices"))
|
7556 | if (typeof message.pyGenericServices !== "boolean")
|
7557 | return "pyGenericServices: boolean expected";
|
7558 | if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices"))
|
7559 | if (typeof message.phpGenericServices !== "boolean")
|
7560 | return "phpGenericServices: boolean expected";
|
7561 | if (message.deprecated != null && message.hasOwnProperty("deprecated"))
|
7562 | if (typeof message.deprecated !== "boolean")
|
7563 | return "deprecated: boolean expected";
|
7564 | if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas"))
|
7565 | if (typeof message.ccEnableArenas !== "boolean")
|
7566 | return "ccEnableArenas: boolean expected";
|
7567 | if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix"))
|
7568 | if (!$util.isString(message.objcClassPrefix))
|
7569 | return "objcClassPrefix: string expected";
|
7570 | if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace"))
|
7571 | if (!$util.isString(message.csharpNamespace))
|
7572 | return "csharpNamespace: string expected";
|
7573 | if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix"))
|
7574 | if (!$util.isString(message.swiftPrefix))
|
7575 | return "swiftPrefix: string expected";
|
7576 | if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix"))
|
7577 | if (!$util.isString(message.phpClassPrefix))
|
7578 | return "phpClassPrefix: string expected";
|
7579 | if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace"))
|
7580 | if (!$util.isString(message.phpNamespace))
|
7581 | return "phpNamespace: string expected";
|
7582 | if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace"))
|
7583 | if (!$util.isString(message.phpMetadataNamespace))
|
7584 | return "phpMetadataNamespace: string expected";
|
7585 | if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage"))
|
7586 | if (!$util.isString(message.rubyPackage))
|
7587 | return "rubyPackage: string expected";
|
7588 | if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) {
|
7589 | if (!Array.isArray(message.uninterpretedOption))
|
7590 | return "uninterpretedOption: array expected";
|
7591 | for (var i = 0; i < message.uninterpretedOption.length; ++i) {
|
7592 | var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]);
|
7593 | if (error)
|
7594 | return "uninterpretedOption." + error;
|
7595 | }
|
7596 | }
|
7597 | return null;
|
7598 | };
|
7599 |
|
7600 | /**
|
7601 | * Creates a FileOptions message from a plain object. Also converts values to their respective internal types.
|
7602 | * @function fromObject
|
7603 | * @memberof google.protobuf.FileOptions
|
7604 | * @static
|
7605 | * @param {Object.<string,*>} object Plain object
|
7606 | * @returns {google.protobuf.FileOptions} FileOptions
|
7607 | */
|
7608 | FileOptions.fromObject = function fromObject(object) {
|
7609 | if (object instanceof $root.google.protobuf.FileOptions)
|
7610 | return object;
|
7611 | var message = new $root.google.protobuf.FileOptions();
|
7612 | if (object.javaPackage != null)
|
7613 | message.javaPackage = String(object.javaPackage);
|
7614 | if (object.javaOuterClassname != null)
|
7615 | message.javaOuterClassname = String(object.javaOuterClassname);
|
7616 | if (object.javaMultipleFiles != null)
|
7617 | message.javaMultipleFiles = Boolean(object.javaMultipleFiles);
|
7618 | if (object.javaGenerateEqualsAndHash != null)
|
7619 | message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash);
|
7620 | if (object.javaStringCheckUtf8 != null)
|
7621 | message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8);
|
7622 | switch (object.optimizeFor) {
|
7623 | case "SPEED":
|
7624 | case 1:
|
7625 | message.optimizeFor = 1;
|
7626 | break;
|
7627 | case "CODE_SIZE":
|
7628 | case 2:
|
7629 | message.optimizeFor = 2;
|
7630 | break;
|
7631 | case "LITE_RUNTIME":
|
7632 | case 3:
|
7633 | message.optimizeFor = 3;
|
7634 | break;
|
7635 | }
|
7636 | if (object.goPackage != null)
|
7637 | message.goPackage = String(object.goPackage);
|
7638 | if (object.ccGenericServices != null)
|
7639 | message.ccGenericServices = Boolean(object.ccGenericServices);
|
7640 | if (object.javaGenericServices != null)
|
7641 | message.javaGenericServices = Boolean(object.javaGenericServices);
|
7642 | if (object.pyGenericServices != null)
|
7643 | message.pyGenericServices = Boolean(object.pyGenericServices);
|
7644 | if (object.phpGenericServices != null)
|
7645 | message.phpGenericServices = Boolean(object.phpGenericServices);
|
7646 | if (object.deprecated != null)
|
7647 | message.deprecated = Boolean(object.deprecated);
|
7648 | if (object.ccEnableArenas != null)
|
7649 | message.ccEnableArenas = Boolean(object.ccEnableArenas);
|
7650 | if (object.objcClassPrefix != null)
|
7651 | message.objcClassPrefix = String(object.objcClassPrefix);
|
7652 | if (object.csharpNamespace != null)
|
7653 | message.csharpNamespace = String(object.csharpNamespace);
|
7654 | if (object.swiftPrefix != null)
|
7655 | message.swiftPrefix = String(object.swiftPrefix);
|
7656 | if (object.phpClassPrefix != null)
|
7657 | message.phpClassPrefix = String(object.phpClassPrefix);
|
7658 | if (object.phpNamespace != null)
|
7659 | message.phpNamespace = String(object.phpNamespace);
|
7660 | if (object.phpMetadataNamespace != null)
|
7661 | message.phpMetadataNamespace = String(object.phpMetadataNamespace);
|
7662 | if (object.rubyPackage != null)
|
7663 | message.rubyPackage = String(object.rubyPackage);
|
7664 | if (object.uninterpretedOption) {
|
7665 | if (!Array.isArray(object.uninterpretedOption))
|
7666 | throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected");
|
7667 | message.uninterpretedOption = [];
|
7668 | for (var i = 0; i < object.uninterpretedOption.length; ++i) {
|
7669 | if (typeof object.uninterpretedOption[i] !== "object")
|
7670 | throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected");
|
7671 | message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]);
|
7672 | }
|
7673 | }
|
7674 | return message;
|
7675 | };
|
7676 |
|
7677 | /**
|
7678 | * Creates a plain object from a FileOptions message. Also converts values to other types if specified.
|
7679 | * @function toObject
|
7680 | * @memberof google.protobuf.FileOptions
|
7681 | * @static
|
7682 | * @param {google.protobuf.FileOptions} message FileOptions
|
7683 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
7684 | * @returns {Object.<string,*>} Plain object
|
7685 | */
|
7686 | FileOptions.toObject = function toObject(message, options) {
|
7687 | if (!options)
|
7688 | options = {};
|
7689 | var object = {};
|
7690 | if (options.arrays || options.defaults)
|
7691 | object.uninterpretedOption = [];
|
7692 | if (options.defaults) {
|
7693 | object.javaPackage = "";
|
7694 | object.javaOuterClassname = "";
|
7695 | object.optimizeFor = options.enums === String ? "SPEED" : 1;
|
7696 | object.javaMultipleFiles = false;
|
7697 | object.goPackage = "";
|
7698 | object.ccGenericServices = false;
|
7699 | object.javaGenericServices = false;
|
7700 | object.pyGenericServices = false;
|
7701 | object.javaGenerateEqualsAndHash = false;
|
7702 | object.deprecated = false;
|
7703 | object.javaStringCheckUtf8 = false;
|
7704 | object.ccEnableArenas = true;
|
7705 | object.objcClassPrefix = "";
|
7706 | object.csharpNamespace = "";
|
7707 | object.swiftPrefix = "";
|
7708 | object.phpClassPrefix = "";
|
7709 | object.phpNamespace = "";
|
7710 | object.phpGenericServices = false;
|
7711 | object.phpMetadataNamespace = "";
|
7712 | object.rubyPackage = "";
|
7713 | }
|
7714 | if (message.javaPackage != null && message.hasOwnProperty("javaPackage"))
|
7715 | object.javaPackage = message.javaPackage;
|
7716 | if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname"))
|
7717 | object.javaOuterClassname = message.javaOuterClassname;
|
7718 | if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor"))
|
7719 | object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor;
|
7720 | if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles"))
|
7721 | object.javaMultipleFiles = message.javaMultipleFiles;
|
7722 | if (message.goPackage != null && message.hasOwnProperty("goPackage"))
|
7723 | object.goPackage = message.goPackage;
|
7724 | if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices"))
|
7725 | object.ccGenericServices = message.ccGenericServices;
|
7726 | if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices"))
|
7727 | object.javaGenericServices = message.javaGenericServices;
|
7728 | if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices"))
|
7729 | object.pyGenericServices = message.pyGenericServices;
|
7730 | if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash"))
|
7731 | object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash;
|
7732 | if (message.deprecated != null && message.hasOwnProperty("deprecated"))
|
7733 | object.deprecated = message.deprecated;
|
7734 | if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8"))
|
7735 | object.javaStringCheckUtf8 = message.javaStringCheckUtf8;
|
7736 | if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas"))
|
7737 | object.ccEnableArenas = message.ccEnableArenas;
|
7738 | if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix"))
|
7739 | object.objcClassPrefix = message.objcClassPrefix;
|
7740 | if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace"))
|
7741 | object.csharpNamespace = message.csharpNamespace;
|
7742 | if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix"))
|
7743 | object.swiftPrefix = message.swiftPrefix;
|
7744 | if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix"))
|
7745 | object.phpClassPrefix = message.phpClassPrefix;
|
7746 | if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace"))
|
7747 | object.phpNamespace = message.phpNamespace;
|
7748 | if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices"))
|
7749 | object.phpGenericServices = message.phpGenericServices;
|
7750 | if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace"))
|
7751 | object.phpMetadataNamespace = message.phpMetadataNamespace;
|
7752 | if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage"))
|
7753 | object.rubyPackage = message.rubyPackage;
|
7754 | if (message.uninterpretedOption && message.uninterpretedOption.length) {
|
7755 | object.uninterpretedOption = [];
|
7756 | for (var j = 0; j < message.uninterpretedOption.length; ++j)
|
7757 | object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options);
|
7758 | }
|
7759 | return object;
|
7760 | };
|
7761 |
|
7762 | /**
|
7763 | * Converts this FileOptions to JSON.
|
7764 | * @function toJSON
|
7765 | * @memberof google.protobuf.FileOptions
|
7766 | * @instance
|
7767 | * @returns {Object.<string,*>} JSON object
|
7768 | */
|
7769 | FileOptions.prototype.toJSON = function toJSON() {
|
7770 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
7771 | };
|
7772 |
|
7773 | /**
|
7774 | * OptimizeMode enum.
|
7775 | * @name google.protobuf.FileOptions.OptimizeMode
|
7776 | * @enum {number}
|
7777 | * @property {number} SPEED=1 SPEED value
|
7778 | * @property {number} CODE_SIZE=2 CODE_SIZE value
|
7779 | * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value
|
7780 | */
|
7781 | FileOptions.OptimizeMode = (function() {
|
7782 | var valuesById = {}, values = Object.create(valuesById);
|
7783 | values[valuesById[1] = "SPEED"] = 1;
|
7784 | values[valuesById[2] = "CODE_SIZE"] = 2;
|
7785 | values[valuesById[3] = "LITE_RUNTIME"] = 3;
|
7786 | return values;
|
7787 | })();
|
7788 |
|
7789 | return FileOptions;
|
7790 | })();
|
7791 |
|
7792 | protobuf.MessageOptions = (function() {
|
7793 |
|
7794 | /**
|
7795 | * Properties of a MessageOptions.
|
7796 | * @memberof google.protobuf
|
7797 | * @interface IMessageOptions
|
7798 | * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat
|
7799 | * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor
|
7800 | * @property {boolean|null} [deprecated] MessageOptions deprecated
|
7801 | * @property {boolean|null} [mapEntry] MessageOptions mapEntry
|
7802 | * @property {Array.<google.protobuf.IUninterpretedOption>|null} [uninterpretedOption] MessageOptions uninterpretedOption
|
7803 | */
|
7804 |
|
7805 | /**
|
7806 | * Constructs a new MessageOptions.
|
7807 | * @memberof google.protobuf
|
7808 | * @classdesc Represents a MessageOptions.
|
7809 | * @implements IMessageOptions
|
7810 | * @constructor
|
7811 | * @param {google.protobuf.IMessageOptions=} [properties] Properties to set
|
7812 | */
|
7813 | function MessageOptions(properties) {
|
7814 | this.uninterpretedOption = [];
|
7815 | if (properties)
|
7816 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
7817 | if (properties[keys[i]] != null)
|
7818 | this[keys[i]] = properties[keys[i]];
|
7819 | }
|
7820 |
|
7821 | /**
|
7822 | * MessageOptions messageSetWireFormat.
|
7823 | * @member {boolean} messageSetWireFormat
|
7824 | * @memberof google.protobuf.MessageOptions
|
7825 | * @instance
|
7826 | */
|
7827 | MessageOptions.prototype.messageSetWireFormat = false;
|
7828 |
|
7829 | /**
|
7830 | * MessageOptions noStandardDescriptorAccessor.
|
7831 | * @member {boolean} noStandardDescriptorAccessor
|
7832 | * @memberof google.protobuf.MessageOptions
|
7833 | * @instance
|
7834 | */
|
7835 | MessageOptions.prototype.noStandardDescriptorAccessor = false;
|
7836 |
|
7837 | /**
|
7838 | * MessageOptions deprecated.
|
7839 | * @member {boolean} deprecated
|
7840 | * @memberof google.protobuf.MessageOptions
|
7841 | * @instance
|
7842 | */
|
7843 | MessageOptions.prototype.deprecated = false;
|
7844 |
|
7845 | /**
|
7846 | * MessageOptions mapEntry.
|
7847 | * @member {boolean} mapEntry
|
7848 | * @memberof google.protobuf.MessageOptions
|
7849 | * @instance
|
7850 | */
|
7851 | MessageOptions.prototype.mapEntry = false;
|
7852 |
|
7853 | /**
|
7854 | * MessageOptions uninterpretedOption.
|
7855 | * @member {Array.<google.protobuf.IUninterpretedOption>} uninterpretedOption
|
7856 | * @memberof google.protobuf.MessageOptions
|
7857 | * @instance
|
7858 | */
|
7859 | MessageOptions.prototype.uninterpretedOption = $util.emptyArray;
|
7860 |
|
7861 | /**
|
7862 | * Creates a new MessageOptions instance using the specified properties.
|
7863 | * @function create
|
7864 | * @memberof google.protobuf.MessageOptions
|
7865 | * @static
|
7866 | * @param {google.protobuf.IMessageOptions=} [properties] Properties to set
|
7867 | * @returns {google.protobuf.MessageOptions} MessageOptions instance
|
7868 | */
|
7869 | MessageOptions.create = function create(properties) {
|
7870 | return new MessageOptions(properties);
|
7871 | };
|
7872 |
|
7873 | /**
|
7874 | * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages.
|
7875 | * @function encode
|
7876 | * @memberof google.protobuf.MessageOptions
|
7877 | * @static
|
7878 | * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode
|
7879 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
7880 | * @returns {$protobuf.Writer} Writer
|
7881 | */
|
7882 | MessageOptions.encode = function encode(message, writer) {
|
7883 | if (!writer)
|
7884 | writer = $Writer.create();
|
7885 | if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat"))
|
7886 | writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat);
|
7887 | if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor"))
|
7888 | writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor);
|
7889 | if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated"))
|
7890 | writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated);
|
7891 | if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry"))
|
7892 | writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry);
|
7893 | if (message.uninterpretedOption != null && message.uninterpretedOption.length)
|
7894 | for (var i = 0; i < message.uninterpretedOption.length; ++i)
|
7895 | $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim();
|
7896 | return writer;
|
7897 | };
|
7898 |
|
7899 | /**
|
7900 | * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages.
|
7901 | * @function encodeDelimited
|
7902 | * @memberof google.protobuf.MessageOptions
|
7903 | * @static
|
7904 | * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode
|
7905 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
7906 | * @returns {$protobuf.Writer} Writer
|
7907 | */
|
7908 | MessageOptions.encodeDelimited = function encodeDelimited(message, writer) {
|
7909 | return this.encode(message, writer).ldelim();
|
7910 | };
|
7911 |
|
7912 | /**
|
7913 | * Decodes a MessageOptions message from the specified reader or buffer.
|
7914 | * @function decode
|
7915 | * @memberof google.protobuf.MessageOptions
|
7916 | * @static
|
7917 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
7918 | * @param {number} [length] Message length if known beforehand
|
7919 | * @returns {google.protobuf.MessageOptions} MessageOptions
|
7920 | * @throws {Error} If the payload is not a reader or valid buffer
|
7921 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
7922 | */
|
7923 | MessageOptions.decode = function decode(reader, length) {
|
7924 | if (!(reader instanceof $Reader))
|
7925 | reader = $Reader.create(reader);
|
7926 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions();
|
7927 | while (reader.pos < end) {
|
7928 | var tag = reader.uint32();
|
7929 | switch (tag >>> 3) {
|
7930 | case 1:
|
7931 | message.messageSetWireFormat = reader.bool();
|
7932 | break;
|
7933 | case 2:
|
7934 | message.noStandardDescriptorAccessor = reader.bool();
|
7935 | break;
|
7936 | case 3:
|
7937 | message.deprecated = reader.bool();
|
7938 | break;
|
7939 | case 7:
|
7940 | message.mapEntry = reader.bool();
|
7941 | break;
|
7942 | case 999:
|
7943 | if (!(message.uninterpretedOption && message.uninterpretedOption.length))
|
7944 | message.uninterpretedOption = [];
|
7945 | message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32()));
|
7946 | break;
|
7947 | default:
|
7948 | reader.skipType(tag & 7);
|
7949 | break;
|
7950 | }
|
7951 | }
|
7952 | return message;
|
7953 | };
|
7954 |
|
7955 | /**
|
7956 | * Decodes a MessageOptions message from the specified reader or buffer, length delimited.
|
7957 | * @function decodeDelimited
|
7958 | * @memberof google.protobuf.MessageOptions
|
7959 | * @static
|
7960 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
7961 | * @returns {google.protobuf.MessageOptions} MessageOptions
|
7962 | * @throws {Error} If the payload is not a reader or valid buffer
|
7963 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
7964 | */
|
7965 | MessageOptions.decodeDelimited = function decodeDelimited(reader) {
|
7966 | if (!(reader instanceof $Reader))
|
7967 | reader = new $Reader(reader);
|
7968 | return this.decode(reader, reader.uint32());
|
7969 | };
|
7970 |
|
7971 | /**
|
7972 | * Verifies a MessageOptions message.
|
7973 | * @function verify
|
7974 | * @memberof google.protobuf.MessageOptions
|
7975 | * @static
|
7976 | * @param {Object.<string,*>} message Plain object to verify
|
7977 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
7978 | */
|
7979 | MessageOptions.verify = function verify(message) {
|
7980 | if (typeof message !== "object" || message === null)
|
7981 | return "object expected";
|
7982 | if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat"))
|
7983 | if (typeof message.messageSetWireFormat !== "boolean")
|
7984 | return "messageSetWireFormat: boolean expected";
|
7985 | if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor"))
|
7986 | if (typeof message.noStandardDescriptorAccessor !== "boolean")
|
7987 | return "noStandardDescriptorAccessor: boolean expected";
|
7988 | if (message.deprecated != null && message.hasOwnProperty("deprecated"))
|
7989 | if (typeof message.deprecated !== "boolean")
|
7990 | return "deprecated: boolean expected";
|
7991 | if (message.mapEntry != null && message.hasOwnProperty("mapEntry"))
|
7992 | if (typeof message.mapEntry !== "boolean")
|
7993 | return "mapEntry: boolean expected";
|
7994 | if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) {
|
7995 | if (!Array.isArray(message.uninterpretedOption))
|
7996 | return "uninterpretedOption: array expected";
|
7997 | for (var i = 0; i < message.uninterpretedOption.length; ++i) {
|
7998 | var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]);
|
7999 | if (error)
|
8000 | return "uninterpretedOption." + error;
|
8001 | }
|
8002 | }
|
8003 | return null;
|
8004 | };
|
8005 |
|
8006 | /**
|
8007 | * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types.
|
8008 | * @function fromObject
|
8009 | * @memberof google.protobuf.MessageOptions
|
8010 | * @static
|
8011 | * @param {Object.<string,*>} object Plain object
|
8012 | * @returns {google.protobuf.MessageOptions} MessageOptions
|
8013 | */
|
8014 | MessageOptions.fromObject = function fromObject(object) {
|
8015 | if (object instanceof $root.google.protobuf.MessageOptions)
|
8016 | return object;
|
8017 | var message = new $root.google.protobuf.MessageOptions();
|
8018 | if (object.messageSetWireFormat != null)
|
8019 | message.messageSetWireFormat = Boolean(object.messageSetWireFormat);
|
8020 | if (object.noStandardDescriptorAccessor != null)
|
8021 | message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor);
|
8022 | if (object.deprecated != null)
|
8023 | message.deprecated = Boolean(object.deprecated);
|
8024 | if (object.mapEntry != null)
|
8025 | message.mapEntry = Boolean(object.mapEntry);
|
8026 | if (object.uninterpretedOption) {
|
8027 | if (!Array.isArray(object.uninterpretedOption))
|
8028 | throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected");
|
8029 | message.uninterpretedOption = [];
|
8030 | for (var i = 0; i < object.uninterpretedOption.length; ++i) {
|
8031 | if (typeof object.uninterpretedOption[i] !== "object")
|
8032 | throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected");
|
8033 | message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]);
|
8034 | }
|
8035 | }
|
8036 | return message;
|
8037 | };
|
8038 |
|
8039 | /**
|
8040 | * Creates a plain object from a MessageOptions message. Also converts values to other types if specified.
|
8041 | * @function toObject
|
8042 | * @memberof google.protobuf.MessageOptions
|
8043 | * @static
|
8044 | * @param {google.protobuf.MessageOptions} message MessageOptions
|
8045 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
8046 | * @returns {Object.<string,*>} Plain object
|
8047 | */
|
8048 | MessageOptions.toObject = function toObject(message, options) {
|
8049 | if (!options)
|
8050 | options = {};
|
8051 | var object = {};
|
8052 | if (options.arrays || options.defaults)
|
8053 | object.uninterpretedOption = [];
|
8054 | if (options.defaults) {
|
8055 | object.messageSetWireFormat = false;
|
8056 | object.noStandardDescriptorAccessor = false;
|
8057 | object.deprecated = false;
|
8058 | object.mapEntry = false;
|
8059 | }
|
8060 | if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat"))
|
8061 | object.messageSetWireFormat = message.messageSetWireFormat;
|
8062 | if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor"))
|
8063 | object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor;
|
8064 | if (message.deprecated != null && message.hasOwnProperty("deprecated"))
|
8065 | object.deprecated = message.deprecated;
|
8066 | if (message.mapEntry != null && message.hasOwnProperty("mapEntry"))
|
8067 | object.mapEntry = message.mapEntry;
|
8068 | if (message.uninterpretedOption && message.uninterpretedOption.length) {
|
8069 | object.uninterpretedOption = [];
|
8070 | for (var j = 0; j < message.uninterpretedOption.length; ++j)
|
8071 | object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options);
|
8072 | }
|
8073 | return object;
|
8074 | };
|
8075 |
|
8076 | /**
|
8077 | * Converts this MessageOptions to JSON.
|
8078 | * @function toJSON
|
8079 | * @memberof google.protobuf.MessageOptions
|
8080 | * @instance
|
8081 | * @returns {Object.<string,*>} JSON object
|
8082 | */
|
8083 | MessageOptions.prototype.toJSON = function toJSON() {
|
8084 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
8085 | };
|
8086 |
|
8087 | return MessageOptions;
|
8088 | })();
|
8089 |
|
8090 | protobuf.FieldOptions = (function() {
|
8091 |
|
8092 | /**
|
8093 | * Properties of a FieldOptions.
|
8094 | * @memberof google.protobuf
|
8095 | * @interface IFieldOptions
|
8096 | * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype
|
8097 | * @property {boolean|null} [packed] FieldOptions packed
|
8098 | * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype
|
8099 | * @property {boolean|null} [lazy] FieldOptions lazy
|
8100 | * @property {boolean|null} [deprecated] FieldOptions deprecated
|
8101 | * @property {boolean|null} [weak] FieldOptions weak
|
8102 | * @property {Array.<google.protobuf.IUninterpretedOption>|null} [uninterpretedOption] FieldOptions uninterpretedOption
|
8103 | */
|
8104 |
|
8105 | /**
|
8106 | * Constructs a new FieldOptions.
|
8107 | * @memberof google.protobuf
|
8108 | * @classdesc Represents a FieldOptions.
|
8109 | * @implements IFieldOptions
|
8110 | * @constructor
|
8111 | * @param {google.protobuf.IFieldOptions=} [properties] Properties to set
|
8112 | */
|
8113 | function FieldOptions(properties) {
|
8114 | this.uninterpretedOption = [];
|
8115 | if (properties)
|
8116 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
8117 | if (properties[keys[i]] != null)
|
8118 | this[keys[i]] = properties[keys[i]];
|
8119 | }
|
8120 |
|
8121 | /**
|
8122 | * FieldOptions ctype.
|
8123 | * @member {google.protobuf.FieldOptions.CType} ctype
|
8124 | * @memberof google.protobuf.FieldOptions
|
8125 | * @instance
|
8126 | */
|
8127 | FieldOptions.prototype.ctype = 0;
|
8128 |
|
8129 | /**
|
8130 | * FieldOptions packed.
|
8131 | * @member {boolean} packed
|
8132 | * @memberof google.protobuf.FieldOptions
|
8133 | * @instance
|
8134 | */
|
8135 | FieldOptions.prototype.packed = false;
|
8136 |
|
8137 | /**
|
8138 | * FieldOptions jstype.
|
8139 | * @member {google.protobuf.FieldOptions.JSType} jstype
|
8140 | * @memberof google.protobuf.FieldOptions
|
8141 | * @instance
|
8142 | */
|
8143 | FieldOptions.prototype.jstype = 0;
|
8144 |
|
8145 | /**
|
8146 | * FieldOptions lazy.
|
8147 | * @member {boolean} lazy
|
8148 | * @memberof google.protobuf.FieldOptions
|
8149 | * @instance
|
8150 | */
|
8151 | FieldOptions.prototype.lazy = false;
|
8152 |
|
8153 | /**
|
8154 | * FieldOptions deprecated.
|
8155 | * @member {boolean} deprecated
|
8156 | * @memberof google.protobuf.FieldOptions
|
8157 | * @instance
|
8158 | */
|
8159 | FieldOptions.prototype.deprecated = false;
|
8160 |
|
8161 | /**
|
8162 | * FieldOptions weak.
|
8163 | * @member {boolean} weak
|
8164 | * @memberof google.protobuf.FieldOptions
|
8165 | * @instance
|
8166 | */
|
8167 | FieldOptions.prototype.weak = false;
|
8168 |
|
8169 | /**
|
8170 | * FieldOptions uninterpretedOption.
|
8171 | * @member {Array.<google.protobuf.IUninterpretedOption>} uninterpretedOption
|
8172 | * @memberof google.protobuf.FieldOptions
|
8173 | * @instance
|
8174 | */
|
8175 | FieldOptions.prototype.uninterpretedOption = $util.emptyArray;
|
8176 |
|
8177 | /**
|
8178 | * Creates a new FieldOptions instance using the specified properties.
|
8179 | * @function create
|
8180 | * @memberof google.protobuf.FieldOptions
|
8181 | * @static
|
8182 | * @param {google.protobuf.IFieldOptions=} [properties] Properties to set
|
8183 | * @returns {google.protobuf.FieldOptions} FieldOptions instance
|
8184 | */
|
8185 | FieldOptions.create = function create(properties) {
|
8186 | return new FieldOptions(properties);
|
8187 | };
|
8188 |
|
8189 | /**
|
8190 | * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages.
|
8191 | * @function encode
|
8192 | * @memberof google.protobuf.FieldOptions
|
8193 | * @static
|
8194 | * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode
|
8195 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
8196 | * @returns {$protobuf.Writer} Writer
|
8197 | */
|
8198 | FieldOptions.encode = function encode(message, writer) {
|
8199 | if (!writer)
|
8200 | writer = $Writer.create();
|
8201 | if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype"))
|
8202 | writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype);
|
8203 | if (message.packed != null && Object.hasOwnProperty.call(message, "packed"))
|
8204 | writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed);
|
8205 | if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated"))
|
8206 | writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated);
|
8207 | if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy"))
|
8208 | writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy);
|
8209 | if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype"))
|
8210 | writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype);
|
8211 | if (message.weak != null && Object.hasOwnProperty.call(message, "weak"))
|
8212 | writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak);
|
8213 | if (message.uninterpretedOption != null && message.uninterpretedOption.length)
|
8214 | for (var i = 0; i < message.uninterpretedOption.length; ++i)
|
8215 | $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim();
|
8216 | return writer;
|
8217 | };
|
8218 |
|
8219 | /**
|
8220 | * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages.
|
8221 | * @function encodeDelimited
|
8222 | * @memberof google.protobuf.FieldOptions
|
8223 | * @static
|
8224 | * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode
|
8225 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
8226 | * @returns {$protobuf.Writer} Writer
|
8227 | */
|
8228 | FieldOptions.encodeDelimited = function encodeDelimited(message, writer) {
|
8229 | return this.encode(message, writer).ldelim();
|
8230 | };
|
8231 |
|
8232 | /**
|
8233 | * Decodes a FieldOptions message from the specified reader or buffer.
|
8234 | * @function decode
|
8235 | * @memberof google.protobuf.FieldOptions
|
8236 | * @static
|
8237 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
8238 | * @param {number} [length] Message length if known beforehand
|
8239 | * @returns {google.protobuf.FieldOptions} FieldOptions
|
8240 | * @throws {Error} If the payload is not a reader or valid buffer
|
8241 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
8242 | */
|
8243 | FieldOptions.decode = function decode(reader, length) {
|
8244 | if (!(reader instanceof $Reader))
|
8245 | reader = $Reader.create(reader);
|
8246 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions();
|
8247 | while (reader.pos < end) {
|
8248 | var tag = reader.uint32();
|
8249 | switch (tag >>> 3) {
|
8250 | case 1:
|
8251 | message.ctype = reader.int32();
|
8252 | break;
|
8253 | case 2:
|
8254 | message.packed = reader.bool();
|
8255 | break;
|
8256 | case 6:
|
8257 | message.jstype = reader.int32();
|
8258 | break;
|
8259 | case 5:
|
8260 | message.lazy = reader.bool();
|
8261 | break;
|
8262 | case 3:
|
8263 | message.deprecated = reader.bool();
|
8264 | break;
|
8265 | case 10:
|
8266 | message.weak = reader.bool();
|
8267 | break;
|
8268 | case 999:
|
8269 | if (!(message.uninterpretedOption && message.uninterpretedOption.length))
|
8270 | message.uninterpretedOption = [];
|
8271 | message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32()));
|
8272 | break;
|
8273 | default:
|
8274 | reader.skipType(tag & 7);
|
8275 | break;
|
8276 | }
|
8277 | }
|
8278 | return message;
|
8279 | };
|
8280 |
|
8281 | /**
|
8282 | * Decodes a FieldOptions message from the specified reader or buffer, length delimited.
|
8283 | * @function decodeDelimited
|
8284 | * @memberof google.protobuf.FieldOptions
|
8285 | * @static
|
8286 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
8287 | * @returns {google.protobuf.FieldOptions} FieldOptions
|
8288 | * @throws {Error} If the payload is not a reader or valid buffer
|
8289 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
8290 | */
|
8291 | FieldOptions.decodeDelimited = function decodeDelimited(reader) {
|
8292 | if (!(reader instanceof $Reader))
|
8293 | reader = new $Reader(reader);
|
8294 | return this.decode(reader, reader.uint32());
|
8295 | };
|
8296 |
|
8297 | /**
|
8298 | * Verifies a FieldOptions message.
|
8299 | * @function verify
|
8300 | * @memberof google.protobuf.FieldOptions
|
8301 | * @static
|
8302 | * @param {Object.<string,*>} message Plain object to verify
|
8303 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
8304 | */
|
8305 | FieldOptions.verify = function verify(message) {
|
8306 | if (typeof message !== "object" || message === null)
|
8307 | return "object expected";
|
8308 | if (message.ctype != null && message.hasOwnProperty("ctype"))
|
8309 | switch (message.ctype) {
|
8310 | default:
|
8311 | return "ctype: enum value expected";
|
8312 | case 0:
|
8313 | case 1:
|
8314 | case 2:
|
8315 | break;
|
8316 | }
|
8317 | if (message.packed != null && message.hasOwnProperty("packed"))
|
8318 | if (typeof message.packed !== "boolean")
|
8319 | return "packed: boolean expected";
|
8320 | if (message.jstype != null && message.hasOwnProperty("jstype"))
|
8321 | switch (message.jstype) {
|
8322 | default:
|
8323 | return "jstype: enum value expected";
|
8324 | case 0:
|
8325 | case 1:
|
8326 | case 2:
|
8327 | break;
|
8328 | }
|
8329 | if (message.lazy != null && message.hasOwnProperty("lazy"))
|
8330 | if (typeof message.lazy !== "boolean")
|
8331 | return "lazy: boolean expected";
|
8332 | if (message.deprecated != null && message.hasOwnProperty("deprecated"))
|
8333 | if (typeof message.deprecated !== "boolean")
|
8334 | return "deprecated: boolean expected";
|
8335 | if (message.weak != null && message.hasOwnProperty("weak"))
|
8336 | if (typeof message.weak !== "boolean")
|
8337 | return "weak: boolean expected";
|
8338 | if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) {
|
8339 | if (!Array.isArray(message.uninterpretedOption))
|
8340 | return "uninterpretedOption: array expected";
|
8341 | for (var i = 0; i < message.uninterpretedOption.length; ++i) {
|
8342 | var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]);
|
8343 | if (error)
|
8344 | return "uninterpretedOption." + error;
|
8345 | }
|
8346 | }
|
8347 | return null;
|
8348 | };
|
8349 |
|
8350 | /**
|
8351 | * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types.
|
8352 | * @function fromObject
|
8353 | * @memberof google.protobuf.FieldOptions
|
8354 | * @static
|
8355 | * @param {Object.<string,*>} object Plain object
|
8356 | * @returns {google.protobuf.FieldOptions} FieldOptions
|
8357 | */
|
8358 | FieldOptions.fromObject = function fromObject(object) {
|
8359 | if (object instanceof $root.google.protobuf.FieldOptions)
|
8360 | return object;
|
8361 | var message = new $root.google.protobuf.FieldOptions();
|
8362 | switch (object.ctype) {
|
8363 | case "STRING":
|
8364 | case 0:
|
8365 | message.ctype = 0;
|
8366 | break;
|
8367 | case "CORD":
|
8368 | case 1:
|
8369 | message.ctype = 1;
|
8370 | break;
|
8371 | case "STRING_PIECE":
|
8372 | case 2:
|
8373 | message.ctype = 2;
|
8374 | break;
|
8375 | }
|
8376 | if (object.packed != null)
|
8377 | message.packed = Boolean(object.packed);
|
8378 | switch (object.jstype) {
|
8379 | case "JS_NORMAL":
|
8380 | case 0:
|
8381 | message.jstype = 0;
|
8382 | break;
|
8383 | case "JS_STRING":
|
8384 | case 1:
|
8385 | message.jstype = 1;
|
8386 | break;
|
8387 | case "JS_NUMBER":
|
8388 | case 2:
|
8389 | message.jstype = 2;
|
8390 | break;
|
8391 | }
|
8392 | if (object.lazy != null)
|
8393 | message.lazy = Boolean(object.lazy);
|
8394 | if (object.deprecated != null)
|
8395 | message.deprecated = Boolean(object.deprecated);
|
8396 | if (object.weak != null)
|
8397 | message.weak = Boolean(object.weak);
|
8398 | if (object.uninterpretedOption) {
|
8399 | if (!Array.isArray(object.uninterpretedOption))
|
8400 | throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected");
|
8401 | message.uninterpretedOption = [];
|
8402 | for (var i = 0; i < object.uninterpretedOption.length; ++i) {
|
8403 | if (typeof object.uninterpretedOption[i] !== "object")
|
8404 | throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected");
|
8405 | message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]);
|
8406 | }
|
8407 | }
|
8408 | return message;
|
8409 | };
|
8410 |
|
8411 | /**
|
8412 | * Creates a plain object from a FieldOptions message. Also converts values to other types if specified.
|
8413 | * @function toObject
|
8414 | * @memberof google.protobuf.FieldOptions
|
8415 | * @static
|
8416 | * @param {google.protobuf.FieldOptions} message FieldOptions
|
8417 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
8418 | * @returns {Object.<string,*>} Plain object
|
8419 | */
|
8420 | FieldOptions.toObject = function toObject(message, options) {
|
8421 | if (!options)
|
8422 | options = {};
|
8423 | var object = {};
|
8424 | if (options.arrays || options.defaults)
|
8425 | object.uninterpretedOption = [];
|
8426 | if (options.defaults) {
|
8427 | object.ctype = options.enums === String ? "STRING" : 0;
|
8428 | object.packed = false;
|
8429 | object.deprecated = false;
|
8430 | object.lazy = false;
|
8431 | object.jstype = options.enums === String ? "JS_NORMAL" : 0;
|
8432 | object.weak = false;
|
8433 | }
|
8434 | if (message.ctype != null && message.hasOwnProperty("ctype"))
|
8435 | object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype;
|
8436 | if (message.packed != null && message.hasOwnProperty("packed"))
|
8437 | object.packed = message.packed;
|
8438 | if (message.deprecated != null && message.hasOwnProperty("deprecated"))
|
8439 | object.deprecated = message.deprecated;
|
8440 | if (message.lazy != null && message.hasOwnProperty("lazy"))
|
8441 | object.lazy = message.lazy;
|
8442 | if (message.jstype != null && message.hasOwnProperty("jstype"))
|
8443 | object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype;
|
8444 | if (message.weak != null && message.hasOwnProperty("weak"))
|
8445 | object.weak = message.weak;
|
8446 | if (message.uninterpretedOption && message.uninterpretedOption.length) {
|
8447 | object.uninterpretedOption = [];
|
8448 | for (var j = 0; j < message.uninterpretedOption.length; ++j)
|
8449 | object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options);
|
8450 | }
|
8451 | return object;
|
8452 | };
|
8453 |
|
8454 | /**
|
8455 | * Converts this FieldOptions to JSON.
|
8456 | * @function toJSON
|
8457 | * @memberof google.protobuf.FieldOptions
|
8458 | * @instance
|
8459 | * @returns {Object.<string,*>} JSON object
|
8460 | */
|
8461 | FieldOptions.prototype.toJSON = function toJSON() {
|
8462 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
8463 | };
|
8464 |
|
8465 | /**
|
8466 | * CType enum.
|
8467 | * @name google.protobuf.FieldOptions.CType
|
8468 | * @enum {number}
|
8469 | * @property {number} STRING=0 STRING value
|
8470 | * @property {number} CORD=1 CORD value
|
8471 | * @property {number} STRING_PIECE=2 STRING_PIECE value
|
8472 | */
|
8473 | FieldOptions.CType = (function() {
|
8474 | var valuesById = {}, values = Object.create(valuesById);
|
8475 | values[valuesById[0] = "STRING"] = 0;
|
8476 | values[valuesById[1] = "CORD"] = 1;
|
8477 | values[valuesById[2] = "STRING_PIECE"] = 2;
|
8478 | return values;
|
8479 | })();
|
8480 |
|
8481 | /**
|
8482 | * JSType enum.
|
8483 | * @name google.protobuf.FieldOptions.JSType
|
8484 | * @enum {number}
|
8485 | * @property {number} JS_NORMAL=0 JS_NORMAL value
|
8486 | * @property {number} JS_STRING=1 JS_STRING value
|
8487 | * @property {number} JS_NUMBER=2 JS_NUMBER value
|
8488 | */
|
8489 | FieldOptions.JSType = (function() {
|
8490 | var valuesById = {}, values = Object.create(valuesById);
|
8491 | values[valuesById[0] = "JS_NORMAL"] = 0;
|
8492 | values[valuesById[1] = "JS_STRING"] = 1;
|
8493 | values[valuesById[2] = "JS_NUMBER"] = 2;
|
8494 | return values;
|
8495 | })();
|
8496 |
|
8497 | return FieldOptions;
|
8498 | })();
|
8499 |
|
8500 | protobuf.OneofOptions = (function() {
|
8501 |
|
8502 | /**
|
8503 | * Properties of an OneofOptions.
|
8504 | * @memberof google.protobuf
|
8505 | * @interface IOneofOptions
|
8506 | * @property {Array.<google.protobuf.IUninterpretedOption>|null} [uninterpretedOption] OneofOptions uninterpretedOption
|
8507 | */
|
8508 |
|
8509 | /**
|
8510 | * Constructs a new OneofOptions.
|
8511 | * @memberof google.protobuf
|
8512 | * @classdesc Represents an OneofOptions.
|
8513 | * @implements IOneofOptions
|
8514 | * @constructor
|
8515 | * @param {google.protobuf.IOneofOptions=} [properties] Properties to set
|
8516 | */
|
8517 | function OneofOptions(properties) {
|
8518 | this.uninterpretedOption = [];
|
8519 | if (properties)
|
8520 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
8521 | if (properties[keys[i]] != null)
|
8522 | this[keys[i]] = properties[keys[i]];
|
8523 | }
|
8524 |
|
8525 | /**
|
8526 | * OneofOptions uninterpretedOption.
|
8527 | * @member {Array.<google.protobuf.IUninterpretedOption>} uninterpretedOption
|
8528 | * @memberof google.protobuf.OneofOptions
|
8529 | * @instance
|
8530 | */
|
8531 | OneofOptions.prototype.uninterpretedOption = $util.emptyArray;
|
8532 |
|
8533 | /**
|
8534 | * Creates a new OneofOptions instance using the specified properties.
|
8535 | * @function create
|
8536 | * @memberof google.protobuf.OneofOptions
|
8537 | * @static
|
8538 | * @param {google.protobuf.IOneofOptions=} [properties] Properties to set
|
8539 | * @returns {google.protobuf.OneofOptions} OneofOptions instance
|
8540 | */
|
8541 | OneofOptions.create = function create(properties) {
|
8542 | return new OneofOptions(properties);
|
8543 | };
|
8544 |
|
8545 | /**
|
8546 | * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages.
|
8547 | * @function encode
|
8548 | * @memberof google.protobuf.OneofOptions
|
8549 | * @static
|
8550 | * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode
|
8551 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
8552 | * @returns {$protobuf.Writer} Writer
|
8553 | */
|
8554 | OneofOptions.encode = function encode(message, writer) {
|
8555 | if (!writer)
|
8556 | writer = $Writer.create();
|
8557 | if (message.uninterpretedOption != null && message.uninterpretedOption.length)
|
8558 | for (var i = 0; i < message.uninterpretedOption.length; ++i)
|
8559 | $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim();
|
8560 | return writer;
|
8561 | };
|
8562 |
|
8563 | /**
|
8564 | * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages.
|
8565 | * @function encodeDelimited
|
8566 | * @memberof google.protobuf.OneofOptions
|
8567 | * @static
|
8568 | * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode
|
8569 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
8570 | * @returns {$protobuf.Writer} Writer
|
8571 | */
|
8572 | OneofOptions.encodeDelimited = function encodeDelimited(message, writer) {
|
8573 | return this.encode(message, writer).ldelim();
|
8574 | };
|
8575 |
|
8576 | /**
|
8577 | * Decodes an OneofOptions message from the specified reader or buffer.
|
8578 | * @function decode
|
8579 | * @memberof google.protobuf.OneofOptions
|
8580 | * @static
|
8581 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
8582 | * @param {number} [length] Message length if known beforehand
|
8583 | * @returns {google.protobuf.OneofOptions} OneofOptions
|
8584 | * @throws {Error} If the payload is not a reader or valid buffer
|
8585 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
8586 | */
|
8587 | OneofOptions.decode = function decode(reader, length) {
|
8588 | if (!(reader instanceof $Reader))
|
8589 | reader = $Reader.create(reader);
|
8590 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions();
|
8591 | while (reader.pos < end) {
|
8592 | var tag = reader.uint32();
|
8593 | switch (tag >>> 3) {
|
8594 | case 999:
|
8595 | if (!(message.uninterpretedOption && message.uninterpretedOption.length))
|
8596 | message.uninterpretedOption = [];
|
8597 | message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32()));
|
8598 | break;
|
8599 | default:
|
8600 | reader.skipType(tag & 7);
|
8601 | break;
|
8602 | }
|
8603 | }
|
8604 | return message;
|
8605 | };
|
8606 |
|
8607 | /**
|
8608 | * Decodes an OneofOptions message from the specified reader or buffer, length delimited.
|
8609 | * @function decodeDelimited
|
8610 | * @memberof google.protobuf.OneofOptions
|
8611 | * @static
|
8612 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
8613 | * @returns {google.protobuf.OneofOptions} OneofOptions
|
8614 | * @throws {Error} If the payload is not a reader or valid buffer
|
8615 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
8616 | */
|
8617 | OneofOptions.decodeDelimited = function decodeDelimited(reader) {
|
8618 | if (!(reader instanceof $Reader))
|
8619 | reader = new $Reader(reader);
|
8620 | return this.decode(reader, reader.uint32());
|
8621 | };
|
8622 |
|
8623 | /**
|
8624 | * Verifies an OneofOptions message.
|
8625 | * @function verify
|
8626 | * @memberof google.protobuf.OneofOptions
|
8627 | * @static
|
8628 | * @param {Object.<string,*>} message Plain object to verify
|
8629 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
8630 | */
|
8631 | OneofOptions.verify = function verify(message) {
|
8632 | if (typeof message !== "object" || message === null)
|
8633 | return "object expected";
|
8634 | if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) {
|
8635 | if (!Array.isArray(message.uninterpretedOption))
|
8636 | return "uninterpretedOption: array expected";
|
8637 | for (var i = 0; i < message.uninterpretedOption.length; ++i) {
|
8638 | var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]);
|
8639 | if (error)
|
8640 | return "uninterpretedOption." + error;
|
8641 | }
|
8642 | }
|
8643 | return null;
|
8644 | };
|
8645 |
|
8646 | /**
|
8647 | * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types.
|
8648 | * @function fromObject
|
8649 | * @memberof google.protobuf.OneofOptions
|
8650 | * @static
|
8651 | * @param {Object.<string,*>} object Plain object
|
8652 | * @returns {google.protobuf.OneofOptions} OneofOptions
|
8653 | */
|
8654 | OneofOptions.fromObject = function fromObject(object) {
|
8655 | if (object instanceof $root.google.protobuf.OneofOptions)
|
8656 | return object;
|
8657 | var message = new $root.google.protobuf.OneofOptions();
|
8658 | if (object.uninterpretedOption) {
|
8659 | if (!Array.isArray(object.uninterpretedOption))
|
8660 | throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected");
|
8661 | message.uninterpretedOption = [];
|
8662 | for (var i = 0; i < object.uninterpretedOption.length; ++i) {
|
8663 | if (typeof object.uninterpretedOption[i] !== "object")
|
8664 | throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected");
|
8665 | message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]);
|
8666 | }
|
8667 | }
|
8668 | return message;
|
8669 | };
|
8670 |
|
8671 | /**
|
8672 | * Creates a plain object from an OneofOptions message. Also converts values to other types if specified.
|
8673 | * @function toObject
|
8674 | * @memberof google.protobuf.OneofOptions
|
8675 | * @static
|
8676 | * @param {google.protobuf.OneofOptions} message OneofOptions
|
8677 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
8678 | * @returns {Object.<string,*>} Plain object
|
8679 | */
|
8680 | OneofOptions.toObject = function toObject(message, options) {
|
8681 | if (!options)
|
8682 | options = {};
|
8683 | var object = {};
|
8684 | if (options.arrays || options.defaults)
|
8685 | object.uninterpretedOption = [];
|
8686 | if (message.uninterpretedOption && message.uninterpretedOption.length) {
|
8687 | object.uninterpretedOption = [];
|
8688 | for (var j = 0; j < message.uninterpretedOption.length; ++j)
|
8689 | object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options);
|
8690 | }
|
8691 | return object;
|
8692 | };
|
8693 |
|
8694 | /**
|
8695 | * Converts this OneofOptions to JSON.
|
8696 | * @function toJSON
|
8697 | * @memberof google.protobuf.OneofOptions
|
8698 | * @instance
|
8699 | * @returns {Object.<string,*>} JSON object
|
8700 | */
|
8701 | OneofOptions.prototype.toJSON = function toJSON() {
|
8702 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
8703 | };
|
8704 |
|
8705 | return OneofOptions;
|
8706 | })();
|
8707 |
|
8708 | protobuf.EnumOptions = (function() {
|
8709 |
|
8710 | /**
|
8711 | * Properties of an EnumOptions.
|
8712 | * @memberof google.protobuf
|
8713 | * @interface IEnumOptions
|
8714 | * @property {boolean|null} [allowAlias] EnumOptions allowAlias
|
8715 | * @property {boolean|null} [deprecated] EnumOptions deprecated
|
8716 | * @property {Array.<google.protobuf.IUninterpretedOption>|null} [uninterpretedOption] EnumOptions uninterpretedOption
|
8717 | */
|
8718 |
|
8719 | /**
|
8720 | * Constructs a new EnumOptions.
|
8721 | * @memberof google.protobuf
|
8722 | * @classdesc Represents an EnumOptions.
|
8723 | * @implements IEnumOptions
|
8724 | * @constructor
|
8725 | * @param {google.protobuf.IEnumOptions=} [properties] Properties to set
|
8726 | */
|
8727 | function EnumOptions(properties) {
|
8728 | this.uninterpretedOption = [];
|
8729 | if (properties)
|
8730 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
8731 | if (properties[keys[i]] != null)
|
8732 | this[keys[i]] = properties[keys[i]];
|
8733 | }
|
8734 |
|
8735 | /**
|
8736 | * EnumOptions allowAlias.
|
8737 | * @member {boolean} allowAlias
|
8738 | * @memberof google.protobuf.EnumOptions
|
8739 | * @instance
|
8740 | */
|
8741 | EnumOptions.prototype.allowAlias = false;
|
8742 |
|
8743 | /**
|
8744 | * EnumOptions deprecated.
|
8745 | * @member {boolean} deprecated
|
8746 | * @memberof google.protobuf.EnumOptions
|
8747 | * @instance
|
8748 | */
|
8749 | EnumOptions.prototype.deprecated = false;
|
8750 |
|
8751 | /**
|
8752 | * EnumOptions uninterpretedOption.
|
8753 | * @member {Array.<google.protobuf.IUninterpretedOption>} uninterpretedOption
|
8754 | * @memberof google.protobuf.EnumOptions
|
8755 | * @instance
|
8756 | */
|
8757 | EnumOptions.prototype.uninterpretedOption = $util.emptyArray;
|
8758 |
|
8759 | /**
|
8760 | * Creates a new EnumOptions instance using the specified properties.
|
8761 | * @function create
|
8762 | * @memberof google.protobuf.EnumOptions
|
8763 | * @static
|
8764 | * @param {google.protobuf.IEnumOptions=} [properties] Properties to set
|
8765 | * @returns {google.protobuf.EnumOptions} EnumOptions instance
|
8766 | */
|
8767 | EnumOptions.create = function create(properties) {
|
8768 | return new EnumOptions(properties);
|
8769 | };
|
8770 |
|
8771 | /**
|
8772 | * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages.
|
8773 | * @function encode
|
8774 | * @memberof google.protobuf.EnumOptions
|
8775 | * @static
|
8776 | * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode
|
8777 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
8778 | * @returns {$protobuf.Writer} Writer
|
8779 | */
|
8780 | EnumOptions.encode = function encode(message, writer) {
|
8781 | if (!writer)
|
8782 | writer = $Writer.create();
|
8783 | if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias"))
|
8784 | writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias);
|
8785 | if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated"))
|
8786 | writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated);
|
8787 | if (message.uninterpretedOption != null && message.uninterpretedOption.length)
|
8788 | for (var i = 0; i < message.uninterpretedOption.length; ++i)
|
8789 | $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim();
|
8790 | return writer;
|
8791 | };
|
8792 |
|
8793 | /**
|
8794 | * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages.
|
8795 | * @function encodeDelimited
|
8796 | * @memberof google.protobuf.EnumOptions
|
8797 | * @static
|
8798 | * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode
|
8799 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
8800 | * @returns {$protobuf.Writer} Writer
|
8801 | */
|
8802 | EnumOptions.encodeDelimited = function encodeDelimited(message, writer) {
|
8803 | return this.encode(message, writer).ldelim();
|
8804 | };
|
8805 |
|
8806 | /**
|
8807 | * Decodes an EnumOptions message from the specified reader or buffer.
|
8808 | * @function decode
|
8809 | * @memberof google.protobuf.EnumOptions
|
8810 | * @static
|
8811 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
8812 | * @param {number} [length] Message length if known beforehand
|
8813 | * @returns {google.protobuf.EnumOptions} EnumOptions
|
8814 | * @throws {Error} If the payload is not a reader or valid buffer
|
8815 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
8816 | */
|
8817 | EnumOptions.decode = function decode(reader, length) {
|
8818 | if (!(reader instanceof $Reader))
|
8819 | reader = $Reader.create(reader);
|
8820 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions();
|
8821 | while (reader.pos < end) {
|
8822 | var tag = reader.uint32();
|
8823 | switch (tag >>> 3) {
|
8824 | case 2:
|
8825 | message.allowAlias = reader.bool();
|
8826 | break;
|
8827 | case 3:
|
8828 | message.deprecated = reader.bool();
|
8829 | break;
|
8830 | case 999:
|
8831 | if (!(message.uninterpretedOption && message.uninterpretedOption.length))
|
8832 | message.uninterpretedOption = [];
|
8833 | message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32()));
|
8834 | break;
|
8835 | default:
|
8836 | reader.skipType(tag & 7);
|
8837 | break;
|
8838 | }
|
8839 | }
|
8840 | return message;
|
8841 | };
|
8842 |
|
8843 | /**
|
8844 | * Decodes an EnumOptions message from the specified reader or buffer, length delimited.
|
8845 | * @function decodeDelimited
|
8846 | * @memberof google.protobuf.EnumOptions
|
8847 | * @static
|
8848 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
8849 | * @returns {google.protobuf.EnumOptions} EnumOptions
|
8850 | * @throws {Error} If the payload is not a reader or valid buffer
|
8851 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
8852 | */
|
8853 | EnumOptions.decodeDelimited = function decodeDelimited(reader) {
|
8854 | if (!(reader instanceof $Reader))
|
8855 | reader = new $Reader(reader);
|
8856 | return this.decode(reader, reader.uint32());
|
8857 | };
|
8858 |
|
8859 | /**
|
8860 | * Verifies an EnumOptions message.
|
8861 | * @function verify
|
8862 | * @memberof google.protobuf.EnumOptions
|
8863 | * @static
|
8864 | * @param {Object.<string,*>} message Plain object to verify
|
8865 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
8866 | */
|
8867 | EnumOptions.verify = function verify(message) {
|
8868 | if (typeof message !== "object" || message === null)
|
8869 | return "object expected";
|
8870 | if (message.allowAlias != null && message.hasOwnProperty("allowAlias"))
|
8871 | if (typeof message.allowAlias !== "boolean")
|
8872 | return "allowAlias: boolean expected";
|
8873 | if (message.deprecated != null && message.hasOwnProperty("deprecated"))
|
8874 | if (typeof message.deprecated !== "boolean")
|
8875 | return "deprecated: boolean expected";
|
8876 | if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) {
|
8877 | if (!Array.isArray(message.uninterpretedOption))
|
8878 | return "uninterpretedOption: array expected";
|
8879 | for (var i = 0; i < message.uninterpretedOption.length; ++i) {
|
8880 | var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]);
|
8881 | if (error)
|
8882 | return "uninterpretedOption." + error;
|
8883 | }
|
8884 | }
|
8885 | return null;
|
8886 | };
|
8887 |
|
8888 | /**
|
8889 | * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types.
|
8890 | * @function fromObject
|
8891 | * @memberof google.protobuf.EnumOptions
|
8892 | * @static
|
8893 | * @param {Object.<string,*>} object Plain object
|
8894 | * @returns {google.protobuf.EnumOptions} EnumOptions
|
8895 | */
|
8896 | EnumOptions.fromObject = function fromObject(object) {
|
8897 | if (object instanceof $root.google.protobuf.EnumOptions)
|
8898 | return object;
|
8899 | var message = new $root.google.protobuf.EnumOptions();
|
8900 | if (object.allowAlias != null)
|
8901 | message.allowAlias = Boolean(object.allowAlias);
|
8902 | if (object.deprecated != null)
|
8903 | message.deprecated = Boolean(object.deprecated);
|
8904 | if (object.uninterpretedOption) {
|
8905 | if (!Array.isArray(object.uninterpretedOption))
|
8906 | throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected");
|
8907 | message.uninterpretedOption = [];
|
8908 | for (var i = 0; i < object.uninterpretedOption.length; ++i) {
|
8909 | if (typeof object.uninterpretedOption[i] !== "object")
|
8910 | throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected");
|
8911 | message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]);
|
8912 | }
|
8913 | }
|
8914 | return message;
|
8915 | };
|
8916 |
|
8917 | /**
|
8918 | * Creates a plain object from an EnumOptions message. Also converts values to other types if specified.
|
8919 | * @function toObject
|
8920 | * @memberof google.protobuf.EnumOptions
|
8921 | * @static
|
8922 | * @param {google.protobuf.EnumOptions} message EnumOptions
|
8923 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
8924 | * @returns {Object.<string,*>} Plain object
|
8925 | */
|
8926 | EnumOptions.toObject = function toObject(message, options) {
|
8927 | if (!options)
|
8928 | options = {};
|
8929 | var object = {};
|
8930 | if (options.arrays || options.defaults)
|
8931 | object.uninterpretedOption = [];
|
8932 | if (options.defaults) {
|
8933 | object.allowAlias = false;
|
8934 | object.deprecated = false;
|
8935 | }
|
8936 | if (message.allowAlias != null && message.hasOwnProperty("allowAlias"))
|
8937 | object.allowAlias = message.allowAlias;
|
8938 | if (message.deprecated != null && message.hasOwnProperty("deprecated"))
|
8939 | object.deprecated = message.deprecated;
|
8940 | if (message.uninterpretedOption && message.uninterpretedOption.length) {
|
8941 | object.uninterpretedOption = [];
|
8942 | for (var j = 0; j < message.uninterpretedOption.length; ++j)
|
8943 | object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options);
|
8944 | }
|
8945 | return object;
|
8946 | };
|
8947 |
|
8948 | /**
|
8949 | * Converts this EnumOptions to JSON.
|
8950 | * @function toJSON
|
8951 | * @memberof google.protobuf.EnumOptions
|
8952 | * @instance
|
8953 | * @returns {Object.<string,*>} JSON object
|
8954 | */
|
8955 | EnumOptions.prototype.toJSON = function toJSON() {
|
8956 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
8957 | };
|
8958 |
|
8959 | return EnumOptions;
|
8960 | })();
|
8961 |
|
8962 | protobuf.EnumValueOptions = (function() {
|
8963 |
|
8964 | /**
|
8965 | * Properties of an EnumValueOptions.
|
8966 | * @memberof google.protobuf
|
8967 | * @interface IEnumValueOptions
|
8968 | * @property {boolean|null} [deprecated] EnumValueOptions deprecated
|
8969 | * @property {Array.<google.protobuf.IUninterpretedOption>|null} [uninterpretedOption] EnumValueOptions uninterpretedOption
|
8970 | */
|
8971 |
|
8972 | /**
|
8973 | * Constructs a new EnumValueOptions.
|
8974 | * @memberof google.protobuf
|
8975 | * @classdesc Represents an EnumValueOptions.
|
8976 | * @implements IEnumValueOptions
|
8977 | * @constructor
|
8978 | * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set
|
8979 | */
|
8980 | function EnumValueOptions(properties) {
|
8981 | this.uninterpretedOption = [];
|
8982 | if (properties)
|
8983 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
8984 | if (properties[keys[i]] != null)
|
8985 | this[keys[i]] = properties[keys[i]];
|
8986 | }
|
8987 |
|
8988 | /**
|
8989 | * EnumValueOptions deprecated.
|
8990 | * @member {boolean} deprecated
|
8991 | * @memberof google.protobuf.EnumValueOptions
|
8992 | * @instance
|
8993 | */
|
8994 | EnumValueOptions.prototype.deprecated = false;
|
8995 |
|
8996 | /**
|
8997 | * EnumValueOptions uninterpretedOption.
|
8998 | * @member {Array.<google.protobuf.IUninterpretedOption>} uninterpretedOption
|
8999 | * @memberof google.protobuf.EnumValueOptions
|
9000 | * @instance
|
9001 | */
|
9002 | EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray;
|
9003 |
|
9004 | /**
|
9005 | * Creates a new EnumValueOptions instance using the specified properties.
|
9006 | * @function create
|
9007 | * @memberof google.protobuf.EnumValueOptions
|
9008 | * @static
|
9009 | * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set
|
9010 | * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance
|
9011 | */
|
9012 | EnumValueOptions.create = function create(properties) {
|
9013 | return new EnumValueOptions(properties);
|
9014 | };
|
9015 |
|
9016 | /**
|
9017 | * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages.
|
9018 | * @function encode
|
9019 | * @memberof google.protobuf.EnumValueOptions
|
9020 | * @static
|
9021 | * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode
|
9022 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
9023 | * @returns {$protobuf.Writer} Writer
|
9024 | */
|
9025 | EnumValueOptions.encode = function encode(message, writer) {
|
9026 | if (!writer)
|
9027 | writer = $Writer.create();
|
9028 | if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated"))
|
9029 | writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated);
|
9030 | if (message.uninterpretedOption != null && message.uninterpretedOption.length)
|
9031 | for (var i = 0; i < message.uninterpretedOption.length; ++i)
|
9032 | $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim();
|
9033 | return writer;
|
9034 | };
|
9035 |
|
9036 | /**
|
9037 | * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages.
|
9038 | * @function encodeDelimited
|
9039 | * @memberof google.protobuf.EnumValueOptions
|
9040 | * @static
|
9041 | * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode
|
9042 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
9043 | * @returns {$protobuf.Writer} Writer
|
9044 | */
|
9045 | EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) {
|
9046 | return this.encode(message, writer).ldelim();
|
9047 | };
|
9048 |
|
9049 | /**
|
9050 | * Decodes an EnumValueOptions message from the specified reader or buffer.
|
9051 | * @function decode
|
9052 | * @memberof google.protobuf.EnumValueOptions
|
9053 | * @static
|
9054 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
9055 | * @param {number} [length] Message length if known beforehand
|
9056 | * @returns {google.protobuf.EnumValueOptions} EnumValueOptions
|
9057 | * @throws {Error} If the payload is not a reader or valid buffer
|
9058 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
9059 | */
|
9060 | EnumValueOptions.decode = function decode(reader, length) {
|
9061 | if (!(reader instanceof $Reader))
|
9062 | reader = $Reader.create(reader);
|
9063 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions();
|
9064 | while (reader.pos < end) {
|
9065 | var tag = reader.uint32();
|
9066 | switch (tag >>> 3) {
|
9067 | case 1:
|
9068 | message.deprecated = reader.bool();
|
9069 | break;
|
9070 | case 999:
|
9071 | if (!(message.uninterpretedOption && message.uninterpretedOption.length))
|
9072 | message.uninterpretedOption = [];
|
9073 | message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32()));
|
9074 | break;
|
9075 | default:
|
9076 | reader.skipType(tag & 7);
|
9077 | break;
|
9078 | }
|
9079 | }
|
9080 | return message;
|
9081 | };
|
9082 |
|
9083 | /**
|
9084 | * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited.
|
9085 | * @function decodeDelimited
|
9086 | * @memberof google.protobuf.EnumValueOptions
|
9087 | * @static
|
9088 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
9089 | * @returns {google.protobuf.EnumValueOptions} EnumValueOptions
|
9090 | * @throws {Error} If the payload is not a reader or valid buffer
|
9091 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
9092 | */
|
9093 | EnumValueOptions.decodeDelimited = function decodeDelimited(reader) {
|
9094 | if (!(reader instanceof $Reader))
|
9095 | reader = new $Reader(reader);
|
9096 | return this.decode(reader, reader.uint32());
|
9097 | };
|
9098 |
|
9099 | /**
|
9100 | * Verifies an EnumValueOptions message.
|
9101 | * @function verify
|
9102 | * @memberof google.protobuf.EnumValueOptions
|
9103 | * @static
|
9104 | * @param {Object.<string,*>} message Plain object to verify
|
9105 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
9106 | */
|
9107 | EnumValueOptions.verify = function verify(message) {
|
9108 | if (typeof message !== "object" || message === null)
|
9109 | return "object expected";
|
9110 | if (message.deprecated != null && message.hasOwnProperty("deprecated"))
|
9111 | if (typeof message.deprecated !== "boolean")
|
9112 | return "deprecated: boolean expected";
|
9113 | if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) {
|
9114 | if (!Array.isArray(message.uninterpretedOption))
|
9115 | return "uninterpretedOption: array expected";
|
9116 | for (var i = 0; i < message.uninterpretedOption.length; ++i) {
|
9117 | var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]);
|
9118 | if (error)
|
9119 | return "uninterpretedOption." + error;
|
9120 | }
|
9121 | }
|
9122 | return null;
|
9123 | };
|
9124 |
|
9125 | /**
|
9126 | * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types.
|
9127 | * @function fromObject
|
9128 | * @memberof google.protobuf.EnumValueOptions
|
9129 | * @static
|
9130 | * @param {Object.<string,*>} object Plain object
|
9131 | * @returns {google.protobuf.EnumValueOptions} EnumValueOptions
|
9132 | */
|
9133 | EnumValueOptions.fromObject = function fromObject(object) {
|
9134 | if (object instanceof $root.google.protobuf.EnumValueOptions)
|
9135 | return object;
|
9136 | var message = new $root.google.protobuf.EnumValueOptions();
|
9137 | if (object.deprecated != null)
|
9138 | message.deprecated = Boolean(object.deprecated);
|
9139 | if (object.uninterpretedOption) {
|
9140 | if (!Array.isArray(object.uninterpretedOption))
|
9141 | throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected");
|
9142 | message.uninterpretedOption = [];
|
9143 | for (var i = 0; i < object.uninterpretedOption.length; ++i) {
|
9144 | if (typeof object.uninterpretedOption[i] !== "object")
|
9145 | throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected");
|
9146 | message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]);
|
9147 | }
|
9148 | }
|
9149 | return message;
|
9150 | };
|
9151 |
|
9152 | /**
|
9153 | * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified.
|
9154 | * @function toObject
|
9155 | * @memberof google.protobuf.EnumValueOptions
|
9156 | * @static
|
9157 | * @param {google.protobuf.EnumValueOptions} message EnumValueOptions
|
9158 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
9159 | * @returns {Object.<string,*>} Plain object
|
9160 | */
|
9161 | EnumValueOptions.toObject = function toObject(message, options) {
|
9162 | if (!options)
|
9163 | options = {};
|
9164 | var object = {};
|
9165 | if (options.arrays || options.defaults)
|
9166 | object.uninterpretedOption = [];
|
9167 | if (options.defaults)
|
9168 | object.deprecated = false;
|
9169 | if (message.deprecated != null && message.hasOwnProperty("deprecated"))
|
9170 | object.deprecated = message.deprecated;
|
9171 | if (message.uninterpretedOption && message.uninterpretedOption.length) {
|
9172 | object.uninterpretedOption = [];
|
9173 | for (var j = 0; j < message.uninterpretedOption.length; ++j)
|
9174 | object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options);
|
9175 | }
|
9176 | return object;
|
9177 | };
|
9178 |
|
9179 | /**
|
9180 | * Converts this EnumValueOptions to JSON.
|
9181 | * @function toJSON
|
9182 | * @memberof google.protobuf.EnumValueOptions
|
9183 | * @instance
|
9184 | * @returns {Object.<string,*>} JSON object
|
9185 | */
|
9186 | EnumValueOptions.prototype.toJSON = function toJSON() {
|
9187 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
9188 | };
|
9189 |
|
9190 | return EnumValueOptions;
|
9191 | })();
|
9192 |
|
9193 | protobuf.ServiceOptions = (function() {
|
9194 |
|
9195 | /**
|
9196 | * Properties of a ServiceOptions.
|
9197 | * @memberof google.protobuf
|
9198 | * @interface IServiceOptions
|
9199 | * @property {boolean|null} [deprecated] ServiceOptions deprecated
|
9200 | * @property {Array.<google.protobuf.IUninterpretedOption>|null} [uninterpretedOption] ServiceOptions uninterpretedOption
|
9201 | * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost
|
9202 | * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes
|
9203 | */
|
9204 |
|
9205 | /**
|
9206 | * Constructs a new ServiceOptions.
|
9207 | * @memberof google.protobuf
|
9208 | * @classdesc Represents a ServiceOptions.
|
9209 | * @implements IServiceOptions
|
9210 | * @constructor
|
9211 | * @param {google.protobuf.IServiceOptions=} [properties] Properties to set
|
9212 | */
|
9213 | function ServiceOptions(properties) {
|
9214 | this.uninterpretedOption = [];
|
9215 | if (properties)
|
9216 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
9217 | if (properties[keys[i]] != null)
|
9218 | this[keys[i]] = properties[keys[i]];
|
9219 | }
|
9220 |
|
9221 | /**
|
9222 | * ServiceOptions deprecated.
|
9223 | * @member {boolean} deprecated
|
9224 | * @memberof google.protobuf.ServiceOptions
|
9225 | * @instance
|
9226 | */
|
9227 | ServiceOptions.prototype.deprecated = false;
|
9228 |
|
9229 | /**
|
9230 | * ServiceOptions uninterpretedOption.
|
9231 | * @member {Array.<google.protobuf.IUninterpretedOption>} uninterpretedOption
|
9232 | * @memberof google.protobuf.ServiceOptions
|
9233 | * @instance
|
9234 | */
|
9235 | ServiceOptions.prototype.uninterpretedOption = $util.emptyArray;
|
9236 |
|
9237 | /**
|
9238 | * ServiceOptions .google.api.defaultHost.
|
9239 | * @member {string} .google.api.defaultHost
|
9240 | * @memberof google.protobuf.ServiceOptions
|
9241 | * @instance
|
9242 | */
|
9243 | ServiceOptions.prototype[".google.api.defaultHost"] = "";
|
9244 |
|
9245 | /**
|
9246 | * ServiceOptions .google.api.oauthScopes.
|
9247 | * @member {string} .google.api.oauthScopes
|
9248 | * @memberof google.protobuf.ServiceOptions
|
9249 | * @instance
|
9250 | */
|
9251 | ServiceOptions.prototype[".google.api.oauthScopes"] = "";
|
9252 |
|
9253 | /**
|
9254 | * Creates a new ServiceOptions instance using the specified properties.
|
9255 | * @function create
|
9256 | * @memberof google.protobuf.ServiceOptions
|
9257 | * @static
|
9258 | * @param {google.protobuf.IServiceOptions=} [properties] Properties to set
|
9259 | * @returns {google.protobuf.ServiceOptions} ServiceOptions instance
|
9260 | */
|
9261 | ServiceOptions.create = function create(properties) {
|
9262 | return new ServiceOptions(properties);
|
9263 | };
|
9264 |
|
9265 | /**
|
9266 | * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages.
|
9267 | * @function encode
|
9268 | * @memberof google.protobuf.ServiceOptions
|
9269 | * @static
|
9270 | * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode
|
9271 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
9272 | * @returns {$protobuf.Writer} Writer
|
9273 | */
|
9274 | ServiceOptions.encode = function encode(message, writer) {
|
9275 | if (!writer)
|
9276 | writer = $Writer.create();
|
9277 | if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated"))
|
9278 | writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated);
|
9279 | if (message.uninterpretedOption != null && message.uninterpretedOption.length)
|
9280 | for (var i = 0; i < message.uninterpretedOption.length; ++i)
|
9281 | $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim();
|
9282 | if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost"))
|
9283 | writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]);
|
9284 | if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes"))
|
9285 | writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]);
|
9286 | return writer;
|
9287 | };
|
9288 |
|
9289 | /**
|
9290 | * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages.
|
9291 | * @function encodeDelimited
|
9292 | * @memberof google.protobuf.ServiceOptions
|
9293 | * @static
|
9294 | * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode
|
9295 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
9296 | * @returns {$protobuf.Writer} Writer
|
9297 | */
|
9298 | ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) {
|
9299 | return this.encode(message, writer).ldelim();
|
9300 | };
|
9301 |
|
9302 | /**
|
9303 | * Decodes a ServiceOptions message from the specified reader or buffer.
|
9304 | * @function decode
|
9305 | * @memberof google.protobuf.ServiceOptions
|
9306 | * @static
|
9307 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
9308 | * @param {number} [length] Message length if known beforehand
|
9309 | * @returns {google.protobuf.ServiceOptions} ServiceOptions
|
9310 | * @throws {Error} If the payload is not a reader or valid buffer
|
9311 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
9312 | */
|
9313 | ServiceOptions.decode = function decode(reader, length) {
|
9314 | if (!(reader instanceof $Reader))
|
9315 | reader = $Reader.create(reader);
|
9316 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions();
|
9317 | while (reader.pos < end) {
|
9318 | var tag = reader.uint32();
|
9319 | switch (tag >>> 3) {
|
9320 | case 33:
|
9321 | message.deprecated = reader.bool();
|
9322 | break;
|
9323 | case 999:
|
9324 | if (!(message.uninterpretedOption && message.uninterpretedOption.length))
|
9325 | message.uninterpretedOption = [];
|
9326 | message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32()));
|
9327 | break;
|
9328 | case 1049:
|
9329 | message[".google.api.defaultHost"] = reader.string();
|
9330 | break;
|
9331 | case 1050:
|
9332 | message[".google.api.oauthScopes"] = reader.string();
|
9333 | break;
|
9334 | default:
|
9335 | reader.skipType(tag & 7);
|
9336 | break;
|
9337 | }
|
9338 | }
|
9339 | return message;
|
9340 | };
|
9341 |
|
9342 | /**
|
9343 | * Decodes a ServiceOptions message from the specified reader or buffer, length delimited.
|
9344 | * @function decodeDelimited
|
9345 | * @memberof google.protobuf.ServiceOptions
|
9346 | * @static
|
9347 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
9348 | * @returns {google.protobuf.ServiceOptions} ServiceOptions
|
9349 | * @throws {Error} If the payload is not a reader or valid buffer
|
9350 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
9351 | */
|
9352 | ServiceOptions.decodeDelimited = function decodeDelimited(reader) {
|
9353 | if (!(reader instanceof $Reader))
|
9354 | reader = new $Reader(reader);
|
9355 | return this.decode(reader, reader.uint32());
|
9356 | };
|
9357 |
|
9358 | /**
|
9359 | * Verifies a ServiceOptions message.
|
9360 | * @function verify
|
9361 | * @memberof google.protobuf.ServiceOptions
|
9362 | * @static
|
9363 | * @param {Object.<string,*>} message Plain object to verify
|
9364 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
9365 | */
|
9366 | ServiceOptions.verify = function verify(message) {
|
9367 | if (typeof message !== "object" || message === null)
|
9368 | return "object expected";
|
9369 | if (message.deprecated != null && message.hasOwnProperty("deprecated"))
|
9370 | if (typeof message.deprecated !== "boolean")
|
9371 | return "deprecated: boolean expected";
|
9372 | if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) {
|
9373 | if (!Array.isArray(message.uninterpretedOption))
|
9374 | return "uninterpretedOption: array expected";
|
9375 | for (var i = 0; i < message.uninterpretedOption.length; ++i) {
|
9376 | var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]);
|
9377 | if (error)
|
9378 | return "uninterpretedOption." + error;
|
9379 | }
|
9380 | }
|
9381 | if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost"))
|
9382 | if (!$util.isString(message[".google.api.defaultHost"]))
|
9383 | return ".google.api.defaultHost: string expected";
|
9384 | if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes"))
|
9385 | if (!$util.isString(message[".google.api.oauthScopes"]))
|
9386 | return ".google.api.oauthScopes: string expected";
|
9387 | return null;
|
9388 | };
|
9389 |
|
9390 | /**
|
9391 | * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types.
|
9392 | * @function fromObject
|
9393 | * @memberof google.protobuf.ServiceOptions
|
9394 | * @static
|
9395 | * @param {Object.<string,*>} object Plain object
|
9396 | * @returns {google.protobuf.ServiceOptions} ServiceOptions
|
9397 | */
|
9398 | ServiceOptions.fromObject = function fromObject(object) {
|
9399 | if (object instanceof $root.google.protobuf.ServiceOptions)
|
9400 | return object;
|
9401 | var message = new $root.google.protobuf.ServiceOptions();
|
9402 | if (object.deprecated != null)
|
9403 | message.deprecated = Boolean(object.deprecated);
|
9404 | if (object.uninterpretedOption) {
|
9405 | if (!Array.isArray(object.uninterpretedOption))
|
9406 | throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected");
|
9407 | message.uninterpretedOption = [];
|
9408 | for (var i = 0; i < object.uninterpretedOption.length; ++i) {
|
9409 | if (typeof object.uninterpretedOption[i] !== "object")
|
9410 | throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected");
|
9411 | message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]);
|
9412 | }
|
9413 | }
|
9414 | if (object[".google.api.defaultHost"] != null)
|
9415 | message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]);
|
9416 | if (object[".google.api.oauthScopes"] != null)
|
9417 | message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]);
|
9418 | return message;
|
9419 | };
|
9420 |
|
9421 | /**
|
9422 | * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified.
|
9423 | * @function toObject
|
9424 | * @memberof google.protobuf.ServiceOptions
|
9425 | * @static
|
9426 | * @param {google.protobuf.ServiceOptions} message ServiceOptions
|
9427 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
9428 | * @returns {Object.<string,*>} Plain object
|
9429 | */
|
9430 | ServiceOptions.toObject = function toObject(message, options) {
|
9431 | if (!options)
|
9432 | options = {};
|
9433 | var object = {};
|
9434 | if (options.arrays || options.defaults)
|
9435 | object.uninterpretedOption = [];
|
9436 | if (options.defaults) {
|
9437 | object.deprecated = false;
|
9438 | object[".google.api.defaultHost"] = "";
|
9439 | object[".google.api.oauthScopes"] = "";
|
9440 | }
|
9441 | if (message.deprecated != null && message.hasOwnProperty("deprecated"))
|
9442 | object.deprecated = message.deprecated;
|
9443 | if (message.uninterpretedOption && message.uninterpretedOption.length) {
|
9444 | object.uninterpretedOption = [];
|
9445 | for (var j = 0; j < message.uninterpretedOption.length; ++j)
|
9446 | object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options);
|
9447 | }
|
9448 | if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost"))
|
9449 | object[".google.api.defaultHost"] = message[".google.api.defaultHost"];
|
9450 | if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes"))
|
9451 | object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"];
|
9452 | return object;
|
9453 | };
|
9454 |
|
9455 | /**
|
9456 | * Converts this ServiceOptions to JSON.
|
9457 | * @function toJSON
|
9458 | * @memberof google.protobuf.ServiceOptions
|
9459 | * @instance
|
9460 | * @returns {Object.<string,*>} JSON object
|
9461 | */
|
9462 | ServiceOptions.prototype.toJSON = function toJSON() {
|
9463 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
9464 | };
|
9465 |
|
9466 | return ServiceOptions;
|
9467 | })();
|
9468 |
|
9469 | protobuf.MethodOptions = (function() {
|
9470 |
|
9471 | /**
|
9472 | * Properties of a MethodOptions.
|
9473 | * @memberof google.protobuf
|
9474 | * @interface IMethodOptions
|
9475 | * @property {boolean|null} [deprecated] MethodOptions deprecated
|
9476 | * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel
|
9477 | * @property {Array.<google.protobuf.IUninterpretedOption>|null} [uninterpretedOption] MethodOptions uninterpretedOption
|
9478 | * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo
|
9479 | * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http
|
9480 | * @property {Array.<string>|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature
|
9481 | */
|
9482 |
|
9483 | /**
|
9484 | * Constructs a new MethodOptions.
|
9485 | * @memberof google.protobuf
|
9486 | * @classdesc Represents a MethodOptions.
|
9487 | * @implements IMethodOptions
|
9488 | * @constructor
|
9489 | * @param {google.protobuf.IMethodOptions=} [properties] Properties to set
|
9490 | */
|
9491 | function MethodOptions(properties) {
|
9492 | this.uninterpretedOption = [];
|
9493 | this[".google.api.methodSignature"] = [];
|
9494 | if (properties)
|
9495 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
9496 | if (properties[keys[i]] != null)
|
9497 | this[keys[i]] = properties[keys[i]];
|
9498 | }
|
9499 |
|
9500 | /**
|
9501 | * MethodOptions deprecated.
|
9502 | * @member {boolean} deprecated
|
9503 | * @memberof google.protobuf.MethodOptions
|
9504 | * @instance
|
9505 | */
|
9506 | MethodOptions.prototype.deprecated = false;
|
9507 |
|
9508 | /**
|
9509 | * MethodOptions idempotencyLevel.
|
9510 | * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel
|
9511 | * @memberof google.protobuf.MethodOptions
|
9512 | * @instance
|
9513 | */
|
9514 | MethodOptions.prototype.idempotencyLevel = 0;
|
9515 |
|
9516 | /**
|
9517 | * MethodOptions uninterpretedOption.
|
9518 | * @member {Array.<google.protobuf.IUninterpretedOption>} uninterpretedOption
|
9519 | * @memberof google.protobuf.MethodOptions
|
9520 | * @instance
|
9521 | */
|
9522 | MethodOptions.prototype.uninterpretedOption = $util.emptyArray;
|
9523 |
|
9524 | /**
|
9525 | * MethodOptions .google.longrunning.operationInfo.
|
9526 | * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo
|
9527 | * @memberof google.protobuf.MethodOptions
|
9528 | * @instance
|
9529 | */
|
9530 | MethodOptions.prototype[".google.longrunning.operationInfo"] = null;
|
9531 |
|
9532 | /**
|
9533 | * MethodOptions .google.api.http.
|
9534 | * @member {google.api.IHttpRule|null|undefined} .google.api.http
|
9535 | * @memberof google.protobuf.MethodOptions
|
9536 | * @instance
|
9537 | */
|
9538 | MethodOptions.prototype[".google.api.http"] = null;
|
9539 |
|
9540 | /**
|
9541 | * MethodOptions .google.api.methodSignature.
|
9542 | * @member {Array.<string>} .google.api.methodSignature
|
9543 | * @memberof google.protobuf.MethodOptions
|
9544 | * @instance
|
9545 | */
|
9546 | MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray;
|
9547 |
|
9548 | /**
|
9549 | * Creates a new MethodOptions instance using the specified properties.
|
9550 | * @function create
|
9551 | * @memberof google.protobuf.MethodOptions
|
9552 | * @static
|
9553 | * @param {google.protobuf.IMethodOptions=} [properties] Properties to set
|
9554 | * @returns {google.protobuf.MethodOptions} MethodOptions instance
|
9555 | */
|
9556 | MethodOptions.create = function create(properties) {
|
9557 | return new MethodOptions(properties);
|
9558 | };
|
9559 |
|
9560 | /**
|
9561 | * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages.
|
9562 | * @function encode
|
9563 | * @memberof google.protobuf.MethodOptions
|
9564 | * @static
|
9565 | * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode
|
9566 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
9567 | * @returns {$protobuf.Writer} Writer
|
9568 | */
|
9569 | MethodOptions.encode = function encode(message, writer) {
|
9570 | if (!writer)
|
9571 | writer = $Writer.create();
|
9572 | if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated"))
|
9573 | writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated);
|
9574 | if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel"))
|
9575 | writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel);
|
9576 | if (message.uninterpretedOption != null && message.uninterpretedOption.length)
|
9577 | for (var i = 0; i < message.uninterpretedOption.length; ++i)
|
9578 | $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim();
|
9579 | if (message[".google.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo"))
|
9580 | $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).fork()).ldelim();
|
9581 | if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length)
|
9582 | for (var i = 0; i < message[".google.api.methodSignature"].length; ++i)
|
9583 | writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]);
|
9584 | if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http"))
|
9585 | $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim();
|
9586 | return writer;
|
9587 | };
|
9588 |
|
9589 | /**
|
9590 | * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages.
|
9591 | * @function encodeDelimited
|
9592 | * @memberof google.protobuf.MethodOptions
|
9593 | * @static
|
9594 | * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode
|
9595 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
9596 | * @returns {$protobuf.Writer} Writer
|
9597 | */
|
9598 | MethodOptions.encodeDelimited = function encodeDelimited(message, writer) {
|
9599 | return this.encode(message, writer).ldelim();
|
9600 | };
|
9601 |
|
9602 | /**
|
9603 | * Decodes a MethodOptions message from the specified reader or buffer.
|
9604 | * @function decode
|
9605 | * @memberof google.protobuf.MethodOptions
|
9606 | * @static
|
9607 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
9608 | * @param {number} [length] Message length if known beforehand
|
9609 | * @returns {google.protobuf.MethodOptions} MethodOptions
|
9610 | * @throws {Error} If the payload is not a reader or valid buffer
|
9611 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
9612 | */
|
9613 | MethodOptions.decode = function decode(reader, length) {
|
9614 | if (!(reader instanceof $Reader))
|
9615 | reader = $Reader.create(reader);
|
9616 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions();
|
9617 | while (reader.pos < end) {
|
9618 | var tag = reader.uint32();
|
9619 | switch (tag >>> 3) {
|
9620 | case 33:
|
9621 | message.deprecated = reader.bool();
|
9622 | break;
|
9623 | case 34:
|
9624 | message.idempotencyLevel = reader.int32();
|
9625 | break;
|
9626 | case 999:
|
9627 | if (!(message.uninterpretedOption && message.uninterpretedOption.length))
|
9628 | message.uninterpretedOption = [];
|
9629 | message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32()));
|
9630 | break;
|
9631 | case 1049:
|
9632 | message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32());
|
9633 | break;
|
9634 | case 72295728:
|
9635 | message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32());
|
9636 | break;
|
9637 | case 1051:
|
9638 | if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length))
|
9639 | message[".google.api.methodSignature"] = [];
|
9640 | message[".google.api.methodSignature"].push(reader.string());
|
9641 | break;
|
9642 | default:
|
9643 | reader.skipType(tag & 7);
|
9644 | break;
|
9645 | }
|
9646 | }
|
9647 | return message;
|
9648 | };
|
9649 |
|
9650 | /**
|
9651 | * Decodes a MethodOptions message from the specified reader or buffer, length delimited.
|
9652 | * @function decodeDelimited
|
9653 | * @memberof google.protobuf.MethodOptions
|
9654 | * @static
|
9655 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
9656 | * @returns {google.protobuf.MethodOptions} MethodOptions
|
9657 | * @throws {Error} If the payload is not a reader or valid buffer
|
9658 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
9659 | */
|
9660 | MethodOptions.decodeDelimited = function decodeDelimited(reader) {
|
9661 | if (!(reader instanceof $Reader))
|
9662 | reader = new $Reader(reader);
|
9663 | return this.decode(reader, reader.uint32());
|
9664 | };
|
9665 |
|
9666 | /**
|
9667 | * Verifies a MethodOptions message.
|
9668 | * @function verify
|
9669 | * @memberof google.protobuf.MethodOptions
|
9670 | * @static
|
9671 | * @param {Object.<string,*>} message Plain object to verify
|
9672 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
9673 | */
|
9674 | MethodOptions.verify = function verify(message) {
|
9675 | if (typeof message !== "object" || message === null)
|
9676 | return "object expected";
|
9677 | if (message.deprecated != null && message.hasOwnProperty("deprecated"))
|
9678 | if (typeof message.deprecated !== "boolean")
|
9679 | return "deprecated: boolean expected";
|
9680 | if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel"))
|
9681 | switch (message.idempotencyLevel) {
|
9682 | default:
|
9683 | return "idempotencyLevel: enum value expected";
|
9684 | case 0:
|
9685 | case 1:
|
9686 | case 2:
|
9687 | break;
|
9688 | }
|
9689 | if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) {
|
9690 | if (!Array.isArray(message.uninterpretedOption))
|
9691 | return "uninterpretedOption: array expected";
|
9692 | for (var i = 0; i < message.uninterpretedOption.length; ++i) {
|
9693 | var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]);
|
9694 | if (error)
|
9695 | return "uninterpretedOption." + error;
|
9696 | }
|
9697 | }
|
9698 | if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) {
|
9699 | var error = $root.google.longrunning.OperationInfo.verify(message[".google.longrunning.operationInfo"]);
|
9700 | if (error)
|
9701 | return ".google.longrunning.operationInfo." + error;
|
9702 | }
|
9703 | if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) {
|
9704 | var error = $root.google.api.HttpRule.verify(message[".google.api.http"]);
|
9705 | if (error)
|
9706 | return ".google.api.http." + error;
|
9707 | }
|
9708 | if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) {
|
9709 | if (!Array.isArray(message[".google.api.methodSignature"]))
|
9710 | return ".google.api.methodSignature: array expected";
|
9711 | for (var i = 0; i < message[".google.api.methodSignature"].length; ++i)
|
9712 | if (!$util.isString(message[".google.api.methodSignature"][i]))
|
9713 | return ".google.api.methodSignature: string[] expected";
|
9714 | }
|
9715 | return null;
|
9716 | };
|
9717 |
|
9718 | /**
|
9719 | * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types.
|
9720 | * @function fromObject
|
9721 | * @memberof google.protobuf.MethodOptions
|
9722 | * @static
|
9723 | * @param {Object.<string,*>} object Plain object
|
9724 | * @returns {google.protobuf.MethodOptions} MethodOptions
|
9725 | */
|
9726 | MethodOptions.fromObject = function fromObject(object) {
|
9727 | if (object instanceof $root.google.protobuf.MethodOptions)
|
9728 | return object;
|
9729 | var message = new $root.google.protobuf.MethodOptions();
|
9730 | if (object.deprecated != null)
|
9731 | message.deprecated = Boolean(object.deprecated);
|
9732 | switch (object.idempotencyLevel) {
|
9733 | case "IDEMPOTENCY_UNKNOWN":
|
9734 | case 0:
|
9735 | message.idempotencyLevel = 0;
|
9736 | break;
|
9737 | case "NO_SIDE_EFFECTS":
|
9738 | case 1:
|
9739 | message.idempotencyLevel = 1;
|
9740 | break;
|
9741 | case "IDEMPOTENT":
|
9742 | case 2:
|
9743 | message.idempotencyLevel = 2;
|
9744 | break;
|
9745 | }
|
9746 | if (object.uninterpretedOption) {
|
9747 | if (!Array.isArray(object.uninterpretedOption))
|
9748 | throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected");
|
9749 | message.uninterpretedOption = [];
|
9750 | for (var i = 0; i < object.uninterpretedOption.length; ++i) {
|
9751 | if (typeof object.uninterpretedOption[i] !== "object")
|
9752 | throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected");
|
9753 | message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]);
|
9754 | }
|
9755 | }
|
9756 | if (object[".google.longrunning.operationInfo"] != null) {
|
9757 | if (typeof object[".google.longrunning.operationInfo"] !== "object")
|
9758 | throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected");
|
9759 | message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"]);
|
9760 | }
|
9761 | if (object[".google.api.http"] != null) {
|
9762 | if (typeof object[".google.api.http"] !== "object")
|
9763 | throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected");
|
9764 | message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]);
|
9765 | }
|
9766 | if (object[".google.api.methodSignature"]) {
|
9767 | if (!Array.isArray(object[".google.api.methodSignature"]))
|
9768 | throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected");
|
9769 | message[".google.api.methodSignature"] = [];
|
9770 | for (var i = 0; i < object[".google.api.methodSignature"].length; ++i)
|
9771 | message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]);
|
9772 | }
|
9773 | return message;
|
9774 | };
|
9775 |
|
9776 | /**
|
9777 | * Creates a plain object from a MethodOptions message. Also converts values to other types if specified.
|
9778 | * @function toObject
|
9779 | * @memberof google.protobuf.MethodOptions
|
9780 | * @static
|
9781 | * @param {google.protobuf.MethodOptions} message MethodOptions
|
9782 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
9783 | * @returns {Object.<string,*>} Plain object
|
9784 | */
|
9785 | MethodOptions.toObject = function toObject(message, options) {
|
9786 | if (!options)
|
9787 | options = {};
|
9788 | var object = {};
|
9789 | if (options.arrays || options.defaults) {
|
9790 | object.uninterpretedOption = [];
|
9791 | object[".google.api.methodSignature"] = [];
|
9792 | }
|
9793 | if (options.defaults) {
|
9794 | object.deprecated = false;
|
9795 | object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0;
|
9796 | object[".google.longrunning.operationInfo"] = null;
|
9797 | object[".google.api.http"] = null;
|
9798 | }
|
9799 | if (message.deprecated != null && message.hasOwnProperty("deprecated"))
|
9800 | object.deprecated = message.deprecated;
|
9801 | if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel"))
|
9802 | object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel;
|
9803 | if (message.uninterpretedOption && message.uninterpretedOption.length) {
|
9804 | object.uninterpretedOption = [];
|
9805 | for (var j = 0; j < message.uninterpretedOption.length; ++j)
|
9806 | object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options);
|
9807 | }
|
9808 | if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo"))
|
9809 | object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options);
|
9810 | if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) {
|
9811 | object[".google.api.methodSignature"] = [];
|
9812 | for (var j = 0; j < message[".google.api.methodSignature"].length; ++j)
|
9813 | object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j];
|
9814 | }
|
9815 | if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http"))
|
9816 | object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options);
|
9817 | return object;
|
9818 | };
|
9819 |
|
9820 | /**
|
9821 | * Converts this MethodOptions to JSON.
|
9822 | * @function toJSON
|
9823 | * @memberof google.protobuf.MethodOptions
|
9824 | * @instance
|
9825 | * @returns {Object.<string,*>} JSON object
|
9826 | */
|
9827 | MethodOptions.prototype.toJSON = function toJSON() {
|
9828 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
9829 | };
|
9830 |
|
9831 | /**
|
9832 | * IdempotencyLevel enum.
|
9833 | * @name google.protobuf.MethodOptions.IdempotencyLevel
|
9834 | * @enum {number}
|
9835 | * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value
|
9836 | * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value
|
9837 | * @property {number} IDEMPOTENT=2 IDEMPOTENT value
|
9838 | */
|
9839 | MethodOptions.IdempotencyLevel = (function() {
|
9840 | var valuesById = {}, values = Object.create(valuesById);
|
9841 | values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0;
|
9842 | values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1;
|
9843 | values[valuesById[2] = "IDEMPOTENT"] = 2;
|
9844 | return values;
|
9845 | })();
|
9846 |
|
9847 | return MethodOptions;
|
9848 | })();
|
9849 |
|
9850 | protobuf.UninterpretedOption = (function() {
|
9851 |
|
9852 | /**
|
9853 | * Properties of an UninterpretedOption.
|
9854 | * @memberof google.protobuf
|
9855 | * @interface IUninterpretedOption
|
9856 | * @property {Array.<google.protobuf.UninterpretedOption.INamePart>|null} [name] UninterpretedOption name
|
9857 | * @property {string|null} [identifierValue] UninterpretedOption identifierValue
|
9858 | * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue
|
9859 | * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue
|
9860 | * @property {number|null} [doubleValue] UninterpretedOption doubleValue
|
9861 | * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue
|
9862 | * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue
|
9863 | */
|
9864 |
|
9865 | /**
|
9866 | * Constructs a new UninterpretedOption.
|
9867 | * @memberof google.protobuf
|
9868 | * @classdesc Represents an UninterpretedOption.
|
9869 | * @implements IUninterpretedOption
|
9870 | * @constructor
|
9871 | * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set
|
9872 | */
|
9873 | function UninterpretedOption(properties) {
|
9874 | this.name = [];
|
9875 | if (properties)
|
9876 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
9877 | if (properties[keys[i]] != null)
|
9878 | this[keys[i]] = properties[keys[i]];
|
9879 | }
|
9880 |
|
9881 | /**
|
9882 | * UninterpretedOption name.
|
9883 | * @member {Array.<google.protobuf.UninterpretedOption.INamePart>} name
|
9884 | * @memberof google.protobuf.UninterpretedOption
|
9885 | * @instance
|
9886 | */
|
9887 | UninterpretedOption.prototype.name = $util.emptyArray;
|
9888 |
|
9889 | /**
|
9890 | * UninterpretedOption identifierValue.
|
9891 | * @member {string} identifierValue
|
9892 | * @memberof google.protobuf.UninterpretedOption
|
9893 | * @instance
|
9894 | */
|
9895 | UninterpretedOption.prototype.identifierValue = "";
|
9896 |
|
9897 | /**
|
9898 | * UninterpretedOption positiveIntValue.
|
9899 | * @member {number|Long} positiveIntValue
|
9900 | * @memberof google.protobuf.UninterpretedOption
|
9901 | * @instance
|
9902 | */
|
9903 | UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
9904 |
|
9905 | /**
|
9906 | * UninterpretedOption negativeIntValue.
|
9907 | * @member {number|Long} negativeIntValue
|
9908 | * @memberof google.protobuf.UninterpretedOption
|
9909 | * @instance
|
9910 | */
|
9911 | UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
|
9912 |
|
9913 | /**
|
9914 | * UninterpretedOption doubleValue.
|
9915 | * @member {number} doubleValue
|
9916 | * @memberof google.protobuf.UninterpretedOption
|
9917 | * @instance
|
9918 | */
|
9919 | UninterpretedOption.prototype.doubleValue = 0;
|
9920 |
|
9921 | /**
|
9922 | * UninterpretedOption stringValue.
|
9923 | * @member {Uint8Array} stringValue
|
9924 | * @memberof google.protobuf.UninterpretedOption
|
9925 | * @instance
|
9926 | */
|
9927 | UninterpretedOption.prototype.stringValue = $util.newBuffer([]);
|
9928 |
|
9929 | /**
|
9930 | * UninterpretedOption aggregateValue.
|
9931 | * @member {string} aggregateValue
|
9932 | * @memberof google.protobuf.UninterpretedOption
|
9933 | * @instance
|
9934 | */
|
9935 | UninterpretedOption.prototype.aggregateValue = "";
|
9936 |
|
9937 | /**
|
9938 | * Creates a new UninterpretedOption instance using the specified properties.
|
9939 | * @function create
|
9940 | * @memberof google.protobuf.UninterpretedOption
|
9941 | * @static
|
9942 | * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set
|
9943 | * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance
|
9944 | */
|
9945 | UninterpretedOption.create = function create(properties) {
|
9946 | return new UninterpretedOption(properties);
|
9947 | };
|
9948 |
|
9949 | /**
|
9950 | * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages.
|
9951 | * @function encode
|
9952 | * @memberof google.protobuf.UninterpretedOption
|
9953 | * @static
|
9954 | * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode
|
9955 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
9956 | * @returns {$protobuf.Writer} Writer
|
9957 | */
|
9958 | UninterpretedOption.encode = function encode(message, writer) {
|
9959 | if (!writer)
|
9960 | writer = $Writer.create();
|
9961 | if (message.name != null && message.name.length)
|
9962 | for (var i = 0; i < message.name.length; ++i)
|
9963 | $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
9964 | if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue"))
|
9965 | writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue);
|
9966 | if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue"))
|
9967 | writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue);
|
9968 | if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue"))
|
9969 | writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue);
|
9970 | if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue"))
|
9971 | writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue);
|
9972 | if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue"))
|
9973 | writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue);
|
9974 | if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue"))
|
9975 | writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue);
|
9976 | return writer;
|
9977 | };
|
9978 |
|
9979 | /**
|
9980 | * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages.
|
9981 | * @function encodeDelimited
|
9982 | * @memberof google.protobuf.UninterpretedOption
|
9983 | * @static
|
9984 | * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode
|
9985 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
9986 | * @returns {$protobuf.Writer} Writer
|
9987 | */
|
9988 | UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) {
|
9989 | return this.encode(message, writer).ldelim();
|
9990 | };
|
9991 |
|
9992 | /**
|
9993 | * Decodes an UninterpretedOption message from the specified reader or buffer.
|
9994 | * @function decode
|
9995 | * @memberof google.protobuf.UninterpretedOption
|
9996 | * @static
|
9997 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
9998 | * @param {number} [length] Message length if known beforehand
|
9999 | * @returns {google.protobuf.UninterpretedOption} UninterpretedOption
|
10000 | * @throws {Error} If the payload is not a reader or valid buffer
|
10001 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
10002 | */
|
10003 | UninterpretedOption.decode = function decode(reader, length) {
|
10004 | if (!(reader instanceof $Reader))
|
10005 | reader = $Reader.create(reader);
|
10006 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption();
|
10007 | while (reader.pos < end) {
|
10008 | var tag = reader.uint32();
|
10009 | switch (tag >>> 3) {
|
10010 | case 2:
|
10011 | if (!(message.name && message.name.length))
|
10012 | message.name = [];
|
10013 | message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32()));
|
10014 | break;
|
10015 | case 3:
|
10016 | message.identifierValue = reader.string();
|
10017 | break;
|
10018 | case 4:
|
10019 | message.positiveIntValue = reader.uint64();
|
10020 | break;
|
10021 | case 5:
|
10022 | message.negativeIntValue = reader.int64();
|
10023 | break;
|
10024 | case 6:
|
10025 | message.doubleValue = reader.double();
|
10026 | break;
|
10027 | case 7:
|
10028 | message.stringValue = reader.bytes();
|
10029 | break;
|
10030 | case 8:
|
10031 | message.aggregateValue = reader.string();
|
10032 | break;
|
10033 | default:
|
10034 | reader.skipType(tag & 7);
|
10035 | break;
|
10036 | }
|
10037 | }
|
10038 | return message;
|
10039 | };
|
10040 |
|
10041 | /**
|
10042 | * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited.
|
10043 | * @function decodeDelimited
|
10044 | * @memberof google.protobuf.UninterpretedOption
|
10045 | * @static
|
10046 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
10047 | * @returns {google.protobuf.UninterpretedOption} UninterpretedOption
|
10048 | * @throws {Error} If the payload is not a reader or valid buffer
|
10049 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
10050 | */
|
10051 | UninterpretedOption.decodeDelimited = function decodeDelimited(reader) {
|
10052 | if (!(reader instanceof $Reader))
|
10053 | reader = new $Reader(reader);
|
10054 | return this.decode(reader, reader.uint32());
|
10055 | };
|
10056 |
|
10057 | /**
|
10058 | * Verifies an UninterpretedOption message.
|
10059 | * @function verify
|
10060 | * @memberof google.protobuf.UninterpretedOption
|
10061 | * @static
|
10062 | * @param {Object.<string,*>} message Plain object to verify
|
10063 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
10064 | */
|
10065 | UninterpretedOption.verify = function verify(message) {
|
10066 | if (typeof message !== "object" || message === null)
|
10067 | return "object expected";
|
10068 | if (message.name != null && message.hasOwnProperty("name")) {
|
10069 | if (!Array.isArray(message.name))
|
10070 | return "name: array expected";
|
10071 | for (var i = 0; i < message.name.length; ++i) {
|
10072 | var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]);
|
10073 | if (error)
|
10074 | return "name." + error;
|
10075 | }
|
10076 | }
|
10077 | if (message.identifierValue != null && message.hasOwnProperty("identifierValue"))
|
10078 | if (!$util.isString(message.identifierValue))
|
10079 | return "identifierValue: string expected";
|
10080 | if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue"))
|
10081 | if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high)))
|
10082 | return "positiveIntValue: integer|Long expected";
|
10083 | if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue"))
|
10084 | if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high)))
|
10085 | return "negativeIntValue: integer|Long expected";
|
10086 | if (message.doubleValue != null && message.hasOwnProperty("doubleValue"))
|
10087 | if (typeof message.doubleValue !== "number")
|
10088 | return "doubleValue: number expected";
|
10089 | if (message.stringValue != null && message.hasOwnProperty("stringValue"))
|
10090 | if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue)))
|
10091 | return "stringValue: buffer expected";
|
10092 | if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue"))
|
10093 | if (!$util.isString(message.aggregateValue))
|
10094 | return "aggregateValue: string expected";
|
10095 | return null;
|
10096 | };
|
10097 |
|
10098 | /**
|
10099 | * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types.
|
10100 | * @function fromObject
|
10101 | * @memberof google.protobuf.UninterpretedOption
|
10102 | * @static
|
10103 | * @param {Object.<string,*>} object Plain object
|
10104 | * @returns {google.protobuf.UninterpretedOption} UninterpretedOption
|
10105 | */
|
10106 | UninterpretedOption.fromObject = function fromObject(object) {
|
10107 | if (object instanceof $root.google.protobuf.UninterpretedOption)
|
10108 | return object;
|
10109 | var message = new $root.google.protobuf.UninterpretedOption();
|
10110 | if (object.name) {
|
10111 | if (!Array.isArray(object.name))
|
10112 | throw TypeError(".google.protobuf.UninterpretedOption.name: array expected");
|
10113 | message.name = [];
|
10114 | for (var i = 0; i < object.name.length; ++i) {
|
10115 | if (typeof object.name[i] !== "object")
|
10116 | throw TypeError(".google.protobuf.UninterpretedOption.name: object expected");
|
10117 | message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]);
|
10118 | }
|
10119 | }
|
10120 | if (object.identifierValue != null)
|
10121 | message.identifierValue = String(object.identifierValue);
|
10122 | if (object.positiveIntValue != null)
|
10123 | if ($util.Long)
|
10124 | (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true;
|
10125 | else if (typeof object.positiveIntValue === "string")
|
10126 | message.positiveIntValue = parseInt(object.positiveIntValue, 10);
|
10127 | else if (typeof object.positiveIntValue === "number")
|
10128 | message.positiveIntValue = object.positiveIntValue;
|
10129 | else if (typeof object.positiveIntValue === "object")
|
10130 | message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true);
|
10131 | if (object.negativeIntValue != null)
|
10132 | if ($util.Long)
|
10133 | (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false;
|
10134 | else if (typeof object.negativeIntValue === "string")
|
10135 | message.negativeIntValue = parseInt(object.negativeIntValue, 10);
|
10136 | else if (typeof object.negativeIntValue === "number")
|
10137 | message.negativeIntValue = object.negativeIntValue;
|
10138 | else if (typeof object.negativeIntValue === "object")
|
10139 | message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber();
|
10140 | if (object.doubleValue != null)
|
10141 | message.doubleValue = Number(object.doubleValue);
|
10142 | if (object.stringValue != null)
|
10143 | if (typeof object.stringValue === "string")
|
10144 | $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0);
|
10145 | else if (object.stringValue.length)
|
10146 | message.stringValue = object.stringValue;
|
10147 | if (object.aggregateValue != null)
|
10148 | message.aggregateValue = String(object.aggregateValue);
|
10149 | return message;
|
10150 | };
|
10151 |
|
10152 | /**
|
10153 | * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified.
|
10154 | * @function toObject
|
10155 | * @memberof google.protobuf.UninterpretedOption
|
10156 | * @static
|
10157 | * @param {google.protobuf.UninterpretedOption} message UninterpretedOption
|
10158 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
10159 | * @returns {Object.<string,*>} Plain object
|
10160 | */
|
10161 | UninterpretedOption.toObject = function toObject(message, options) {
|
10162 | if (!options)
|
10163 | options = {};
|
10164 | var object = {};
|
10165 | if (options.arrays || options.defaults)
|
10166 | object.name = [];
|
10167 | if (options.defaults) {
|
10168 | object.identifierValue = "";
|
10169 | if ($util.Long) {
|
10170 | var long = new $util.Long(0, 0, true);
|
10171 | object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
10172 | } else
|
10173 | object.positiveIntValue = options.longs === String ? "0" : 0;
|
10174 | if ($util.Long) {
|
10175 | var long = new $util.Long(0, 0, false);
|
10176 | object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
10177 | } else
|
10178 | object.negativeIntValue = options.longs === String ? "0" : 0;
|
10179 | object.doubleValue = 0;
|
10180 | if (options.bytes === String)
|
10181 | object.stringValue = "";
|
10182 | else {
|
10183 | object.stringValue = [];
|
10184 | if (options.bytes !== Array)
|
10185 | object.stringValue = $util.newBuffer(object.stringValue);
|
10186 | }
|
10187 | object.aggregateValue = "";
|
10188 | }
|
10189 | if (message.name && message.name.length) {
|
10190 | object.name = [];
|
10191 | for (var j = 0; j < message.name.length; ++j)
|
10192 | object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options);
|
10193 | }
|
10194 | if (message.identifierValue != null && message.hasOwnProperty("identifierValue"))
|
10195 | object.identifierValue = message.identifierValue;
|
10196 | if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue"))
|
10197 | if (typeof message.positiveIntValue === "number")
|
10198 | object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue;
|
10199 | else
|
10200 | object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue;
|
10201 | if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue"))
|
10202 | if (typeof message.negativeIntValue === "number")
|
10203 | object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue;
|
10204 | else
|
10205 | object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue;
|
10206 | if (message.doubleValue != null && message.hasOwnProperty("doubleValue"))
|
10207 | object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue;
|
10208 | if (message.stringValue != null && message.hasOwnProperty("stringValue"))
|
10209 | object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue;
|
10210 | if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue"))
|
10211 | object.aggregateValue = message.aggregateValue;
|
10212 | return object;
|
10213 | };
|
10214 |
|
10215 | /**
|
10216 | * Converts this UninterpretedOption to JSON.
|
10217 | * @function toJSON
|
10218 | * @memberof google.protobuf.UninterpretedOption
|
10219 | * @instance
|
10220 | * @returns {Object.<string,*>} JSON object
|
10221 | */
|
10222 | UninterpretedOption.prototype.toJSON = function toJSON() {
|
10223 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
10224 | };
|
10225 |
|
10226 | UninterpretedOption.NamePart = (function() {
|
10227 |
|
10228 | /**
|
10229 | * Properties of a NamePart.
|
10230 | * @memberof google.protobuf.UninterpretedOption
|
10231 | * @interface INamePart
|
10232 | * @property {string} namePart NamePart namePart
|
10233 | * @property {boolean} isExtension NamePart isExtension
|
10234 | */
|
10235 |
|
10236 | /**
|
10237 | * Constructs a new NamePart.
|
10238 | * @memberof google.protobuf.UninterpretedOption
|
10239 | * @classdesc Represents a NamePart.
|
10240 | * @implements INamePart
|
10241 | * @constructor
|
10242 | * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set
|
10243 | */
|
10244 | function NamePart(properties) {
|
10245 | if (properties)
|
10246 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
10247 | if (properties[keys[i]] != null)
|
10248 | this[keys[i]] = properties[keys[i]];
|
10249 | }
|
10250 |
|
10251 | /**
|
10252 | * NamePart namePart.
|
10253 | * @member {string} namePart
|
10254 | * @memberof google.protobuf.UninterpretedOption.NamePart
|
10255 | * @instance
|
10256 | */
|
10257 | NamePart.prototype.namePart = "";
|
10258 |
|
10259 | /**
|
10260 | * NamePart isExtension.
|
10261 | * @member {boolean} isExtension
|
10262 | * @memberof google.protobuf.UninterpretedOption.NamePart
|
10263 | * @instance
|
10264 | */
|
10265 | NamePart.prototype.isExtension = false;
|
10266 |
|
10267 | /**
|
10268 | * Creates a new NamePart instance using the specified properties.
|
10269 | * @function create
|
10270 | * @memberof google.protobuf.UninterpretedOption.NamePart
|
10271 | * @static
|
10272 | * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set
|
10273 | * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance
|
10274 | */
|
10275 | NamePart.create = function create(properties) {
|
10276 | return new NamePart(properties);
|
10277 | };
|
10278 |
|
10279 | /**
|
10280 | * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages.
|
10281 | * @function encode
|
10282 | * @memberof google.protobuf.UninterpretedOption.NamePart
|
10283 | * @static
|
10284 | * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode
|
10285 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
10286 | * @returns {$protobuf.Writer} Writer
|
10287 | */
|
10288 | NamePart.encode = function encode(message, writer) {
|
10289 | if (!writer)
|
10290 | writer = $Writer.create();
|
10291 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart);
|
10292 | writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension);
|
10293 | return writer;
|
10294 | };
|
10295 |
|
10296 | /**
|
10297 | * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages.
|
10298 | * @function encodeDelimited
|
10299 | * @memberof google.protobuf.UninterpretedOption.NamePart
|
10300 | * @static
|
10301 | * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode
|
10302 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
10303 | * @returns {$protobuf.Writer} Writer
|
10304 | */
|
10305 | NamePart.encodeDelimited = function encodeDelimited(message, writer) {
|
10306 | return this.encode(message, writer).ldelim();
|
10307 | };
|
10308 |
|
10309 | /**
|
10310 | * Decodes a NamePart message from the specified reader or buffer.
|
10311 | * @function decode
|
10312 | * @memberof google.protobuf.UninterpretedOption.NamePart
|
10313 | * @static
|
10314 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
10315 | * @param {number} [length] Message length if known beforehand
|
10316 | * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart
|
10317 | * @throws {Error} If the payload is not a reader or valid buffer
|
10318 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
10319 | */
|
10320 | NamePart.decode = function decode(reader, length) {
|
10321 | if (!(reader instanceof $Reader))
|
10322 | reader = $Reader.create(reader);
|
10323 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart();
|
10324 | while (reader.pos < end) {
|
10325 | var tag = reader.uint32();
|
10326 | switch (tag >>> 3) {
|
10327 | case 1:
|
10328 | message.namePart = reader.string();
|
10329 | break;
|
10330 | case 2:
|
10331 | message.isExtension = reader.bool();
|
10332 | break;
|
10333 | default:
|
10334 | reader.skipType(tag & 7);
|
10335 | break;
|
10336 | }
|
10337 | }
|
10338 | if (!message.hasOwnProperty("namePart"))
|
10339 | throw $util.ProtocolError("missing required 'namePart'", { instance: message });
|
10340 | if (!message.hasOwnProperty("isExtension"))
|
10341 | throw $util.ProtocolError("missing required 'isExtension'", { instance: message });
|
10342 | return message;
|
10343 | };
|
10344 |
|
10345 | /**
|
10346 | * Decodes a NamePart message from the specified reader or buffer, length delimited.
|
10347 | * @function decodeDelimited
|
10348 | * @memberof google.protobuf.UninterpretedOption.NamePart
|
10349 | * @static
|
10350 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
10351 | * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart
|
10352 | * @throws {Error} If the payload is not a reader or valid buffer
|
10353 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
10354 | */
|
10355 | NamePart.decodeDelimited = function decodeDelimited(reader) {
|
10356 | if (!(reader instanceof $Reader))
|
10357 | reader = new $Reader(reader);
|
10358 | return this.decode(reader, reader.uint32());
|
10359 | };
|
10360 |
|
10361 | /**
|
10362 | * Verifies a NamePart message.
|
10363 | * @function verify
|
10364 | * @memberof google.protobuf.UninterpretedOption.NamePart
|
10365 | * @static
|
10366 | * @param {Object.<string,*>} message Plain object to verify
|
10367 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
10368 | */
|
10369 | NamePart.verify = function verify(message) {
|
10370 | if (typeof message !== "object" || message === null)
|
10371 | return "object expected";
|
10372 | if (!$util.isString(message.namePart))
|
10373 | return "namePart: string expected";
|
10374 | if (typeof message.isExtension !== "boolean")
|
10375 | return "isExtension: boolean expected";
|
10376 | return null;
|
10377 | };
|
10378 |
|
10379 | /**
|
10380 | * Creates a NamePart message from a plain object. Also converts values to their respective internal types.
|
10381 | * @function fromObject
|
10382 | * @memberof google.protobuf.UninterpretedOption.NamePart
|
10383 | * @static
|
10384 | * @param {Object.<string,*>} object Plain object
|
10385 | * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart
|
10386 | */
|
10387 | NamePart.fromObject = function fromObject(object) {
|
10388 | if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart)
|
10389 | return object;
|
10390 | var message = new $root.google.protobuf.UninterpretedOption.NamePart();
|
10391 | if (object.namePart != null)
|
10392 | message.namePart = String(object.namePart);
|
10393 | if (object.isExtension != null)
|
10394 | message.isExtension = Boolean(object.isExtension);
|
10395 | return message;
|
10396 | };
|
10397 |
|
10398 | /**
|
10399 | * Creates a plain object from a NamePart message. Also converts values to other types if specified.
|
10400 | * @function toObject
|
10401 | * @memberof google.protobuf.UninterpretedOption.NamePart
|
10402 | * @static
|
10403 | * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart
|
10404 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
10405 | * @returns {Object.<string,*>} Plain object
|
10406 | */
|
10407 | NamePart.toObject = function toObject(message, options) {
|
10408 | if (!options)
|
10409 | options = {};
|
10410 | var object = {};
|
10411 | if (options.defaults) {
|
10412 | object.namePart = "";
|
10413 | object.isExtension = false;
|
10414 | }
|
10415 | if (message.namePart != null && message.hasOwnProperty("namePart"))
|
10416 | object.namePart = message.namePart;
|
10417 | if (message.isExtension != null && message.hasOwnProperty("isExtension"))
|
10418 | object.isExtension = message.isExtension;
|
10419 | return object;
|
10420 | };
|
10421 |
|
10422 | /**
|
10423 | * Converts this NamePart to JSON.
|
10424 | * @function toJSON
|
10425 | * @memberof google.protobuf.UninterpretedOption.NamePart
|
10426 | * @instance
|
10427 | * @returns {Object.<string,*>} JSON object
|
10428 | */
|
10429 | NamePart.prototype.toJSON = function toJSON() {
|
10430 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
10431 | };
|
10432 |
|
10433 | return NamePart;
|
10434 | })();
|
10435 |
|
10436 | return UninterpretedOption;
|
10437 | })();
|
10438 |
|
10439 | protobuf.SourceCodeInfo = (function() {
|
10440 |
|
10441 | /**
|
10442 | * Properties of a SourceCodeInfo.
|
10443 | * @memberof google.protobuf
|
10444 | * @interface ISourceCodeInfo
|
10445 | * @property {Array.<google.protobuf.SourceCodeInfo.ILocation>|null} [location] SourceCodeInfo location
|
10446 | */
|
10447 |
|
10448 | /**
|
10449 | * Constructs a new SourceCodeInfo.
|
10450 | * @memberof google.protobuf
|
10451 | * @classdesc Represents a SourceCodeInfo.
|
10452 | * @implements ISourceCodeInfo
|
10453 | * @constructor
|
10454 | * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set
|
10455 | */
|
10456 | function SourceCodeInfo(properties) {
|
10457 | this.location = [];
|
10458 | if (properties)
|
10459 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
10460 | if (properties[keys[i]] != null)
|
10461 | this[keys[i]] = properties[keys[i]];
|
10462 | }
|
10463 |
|
10464 | /**
|
10465 | * SourceCodeInfo location.
|
10466 | * @member {Array.<google.protobuf.SourceCodeInfo.ILocation>} location
|
10467 | * @memberof google.protobuf.SourceCodeInfo
|
10468 | * @instance
|
10469 | */
|
10470 | SourceCodeInfo.prototype.location = $util.emptyArray;
|
10471 |
|
10472 | /**
|
10473 | * Creates a new SourceCodeInfo instance using the specified properties.
|
10474 | * @function create
|
10475 | * @memberof google.protobuf.SourceCodeInfo
|
10476 | * @static
|
10477 | * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set
|
10478 | * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance
|
10479 | */
|
10480 | SourceCodeInfo.create = function create(properties) {
|
10481 | return new SourceCodeInfo(properties);
|
10482 | };
|
10483 |
|
10484 | /**
|
10485 | * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages.
|
10486 | * @function encode
|
10487 | * @memberof google.protobuf.SourceCodeInfo
|
10488 | * @static
|
10489 | * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode
|
10490 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
10491 | * @returns {$protobuf.Writer} Writer
|
10492 | */
|
10493 | SourceCodeInfo.encode = function encode(message, writer) {
|
10494 | if (!writer)
|
10495 | writer = $Writer.create();
|
10496 | if (message.location != null && message.location.length)
|
10497 | for (var i = 0; i < message.location.length; ++i)
|
10498 | $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
10499 | return writer;
|
10500 | };
|
10501 |
|
10502 | /**
|
10503 | * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages.
|
10504 | * @function encodeDelimited
|
10505 | * @memberof google.protobuf.SourceCodeInfo
|
10506 | * @static
|
10507 | * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode
|
10508 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
10509 | * @returns {$protobuf.Writer} Writer
|
10510 | */
|
10511 | SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) {
|
10512 | return this.encode(message, writer).ldelim();
|
10513 | };
|
10514 |
|
10515 | /**
|
10516 | * Decodes a SourceCodeInfo message from the specified reader or buffer.
|
10517 | * @function decode
|
10518 | * @memberof google.protobuf.SourceCodeInfo
|
10519 | * @static
|
10520 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
10521 | * @param {number} [length] Message length if known beforehand
|
10522 | * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo
|
10523 | * @throws {Error} If the payload is not a reader or valid buffer
|
10524 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
10525 | */
|
10526 | SourceCodeInfo.decode = function decode(reader, length) {
|
10527 | if (!(reader instanceof $Reader))
|
10528 | reader = $Reader.create(reader);
|
10529 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo();
|
10530 | while (reader.pos < end) {
|
10531 | var tag = reader.uint32();
|
10532 | switch (tag >>> 3) {
|
10533 | case 1:
|
10534 | if (!(message.location && message.location.length))
|
10535 | message.location = [];
|
10536 | message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32()));
|
10537 | break;
|
10538 | default:
|
10539 | reader.skipType(tag & 7);
|
10540 | break;
|
10541 | }
|
10542 | }
|
10543 | return message;
|
10544 | };
|
10545 |
|
10546 | /**
|
10547 | * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited.
|
10548 | * @function decodeDelimited
|
10549 | * @memberof google.protobuf.SourceCodeInfo
|
10550 | * @static
|
10551 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
10552 | * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo
|
10553 | * @throws {Error} If the payload is not a reader or valid buffer
|
10554 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
10555 | */
|
10556 | SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) {
|
10557 | if (!(reader instanceof $Reader))
|
10558 | reader = new $Reader(reader);
|
10559 | return this.decode(reader, reader.uint32());
|
10560 | };
|
10561 |
|
10562 | /**
|
10563 | * Verifies a SourceCodeInfo message.
|
10564 | * @function verify
|
10565 | * @memberof google.protobuf.SourceCodeInfo
|
10566 | * @static
|
10567 | * @param {Object.<string,*>} message Plain object to verify
|
10568 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
10569 | */
|
10570 | SourceCodeInfo.verify = function verify(message) {
|
10571 | if (typeof message !== "object" || message === null)
|
10572 | return "object expected";
|
10573 | if (message.location != null && message.hasOwnProperty("location")) {
|
10574 | if (!Array.isArray(message.location))
|
10575 | return "location: array expected";
|
10576 | for (var i = 0; i < message.location.length; ++i) {
|
10577 | var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]);
|
10578 | if (error)
|
10579 | return "location." + error;
|
10580 | }
|
10581 | }
|
10582 | return null;
|
10583 | };
|
10584 |
|
10585 | /**
|
10586 | * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types.
|
10587 | * @function fromObject
|
10588 | * @memberof google.protobuf.SourceCodeInfo
|
10589 | * @static
|
10590 | * @param {Object.<string,*>} object Plain object
|
10591 | * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo
|
10592 | */
|
10593 | SourceCodeInfo.fromObject = function fromObject(object) {
|
10594 | if (object instanceof $root.google.protobuf.SourceCodeInfo)
|
10595 | return object;
|
10596 | var message = new $root.google.protobuf.SourceCodeInfo();
|
10597 | if (object.location) {
|
10598 | if (!Array.isArray(object.location))
|
10599 | throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected");
|
10600 | message.location = [];
|
10601 | for (var i = 0; i < object.location.length; ++i) {
|
10602 | if (typeof object.location[i] !== "object")
|
10603 | throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected");
|
10604 | message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]);
|
10605 | }
|
10606 | }
|
10607 | return message;
|
10608 | };
|
10609 |
|
10610 | /**
|
10611 | * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified.
|
10612 | * @function toObject
|
10613 | * @memberof google.protobuf.SourceCodeInfo
|
10614 | * @static
|
10615 | * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo
|
10616 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
10617 | * @returns {Object.<string,*>} Plain object
|
10618 | */
|
10619 | SourceCodeInfo.toObject = function toObject(message, options) {
|
10620 | if (!options)
|
10621 | options = {};
|
10622 | var object = {};
|
10623 | if (options.arrays || options.defaults)
|
10624 | object.location = [];
|
10625 | if (message.location && message.location.length) {
|
10626 | object.location = [];
|
10627 | for (var j = 0; j < message.location.length; ++j)
|
10628 | object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options);
|
10629 | }
|
10630 | return object;
|
10631 | };
|
10632 |
|
10633 | /**
|
10634 | * Converts this SourceCodeInfo to JSON.
|
10635 | * @function toJSON
|
10636 | * @memberof google.protobuf.SourceCodeInfo
|
10637 | * @instance
|
10638 | * @returns {Object.<string,*>} JSON object
|
10639 | */
|
10640 | SourceCodeInfo.prototype.toJSON = function toJSON() {
|
10641 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
10642 | };
|
10643 |
|
10644 | SourceCodeInfo.Location = (function() {
|
10645 |
|
10646 | /**
|
10647 | * Properties of a Location.
|
10648 | * @memberof google.protobuf.SourceCodeInfo
|
10649 | * @interface ILocation
|
10650 | * @property {Array.<number>|null} [path] Location path
|
10651 | * @property {Array.<number>|null} [span] Location span
|
10652 | * @property {string|null} [leadingComments] Location leadingComments
|
10653 | * @property {string|null} [trailingComments] Location trailingComments
|
10654 | * @property {Array.<string>|null} [leadingDetachedComments] Location leadingDetachedComments
|
10655 | */
|
10656 |
|
10657 | /**
|
10658 | * Constructs a new Location.
|
10659 | * @memberof google.protobuf.SourceCodeInfo
|
10660 | * @classdesc Represents a Location.
|
10661 | * @implements ILocation
|
10662 | * @constructor
|
10663 | * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set
|
10664 | */
|
10665 | function Location(properties) {
|
10666 | this.path = [];
|
10667 | this.span = [];
|
10668 | this.leadingDetachedComments = [];
|
10669 | if (properties)
|
10670 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
10671 | if (properties[keys[i]] != null)
|
10672 | this[keys[i]] = properties[keys[i]];
|
10673 | }
|
10674 |
|
10675 | /**
|
10676 | * Location path.
|
10677 | * @member {Array.<number>} path
|
10678 | * @memberof google.protobuf.SourceCodeInfo.Location
|
10679 | * @instance
|
10680 | */
|
10681 | Location.prototype.path = $util.emptyArray;
|
10682 |
|
10683 | /**
|
10684 | * Location span.
|
10685 | * @member {Array.<number>} span
|
10686 | * @memberof google.protobuf.SourceCodeInfo.Location
|
10687 | * @instance
|
10688 | */
|
10689 | Location.prototype.span = $util.emptyArray;
|
10690 |
|
10691 | /**
|
10692 | * Location leadingComments.
|
10693 | * @member {string} leadingComments
|
10694 | * @memberof google.protobuf.SourceCodeInfo.Location
|
10695 | * @instance
|
10696 | */
|
10697 | Location.prototype.leadingComments = "";
|
10698 |
|
10699 | /**
|
10700 | * Location trailingComments.
|
10701 | * @member {string} trailingComments
|
10702 | * @memberof google.protobuf.SourceCodeInfo.Location
|
10703 | * @instance
|
10704 | */
|
10705 | Location.prototype.trailingComments = "";
|
10706 |
|
10707 | /**
|
10708 | * Location leadingDetachedComments.
|
10709 | * @member {Array.<string>} leadingDetachedComments
|
10710 | * @memberof google.protobuf.SourceCodeInfo.Location
|
10711 | * @instance
|
10712 | */
|
10713 | Location.prototype.leadingDetachedComments = $util.emptyArray;
|
10714 |
|
10715 | /**
|
10716 | * Creates a new Location instance using the specified properties.
|
10717 | * @function create
|
10718 | * @memberof google.protobuf.SourceCodeInfo.Location
|
10719 | * @static
|
10720 | * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set
|
10721 | * @returns {google.protobuf.SourceCodeInfo.Location} Location instance
|
10722 | */
|
10723 | Location.create = function create(properties) {
|
10724 | return new Location(properties);
|
10725 | };
|
10726 |
|
10727 | /**
|
10728 | * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages.
|
10729 | * @function encode
|
10730 | * @memberof google.protobuf.SourceCodeInfo.Location
|
10731 | * @static
|
10732 | * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode
|
10733 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
10734 | * @returns {$protobuf.Writer} Writer
|
10735 | */
|
10736 | Location.encode = function encode(message, writer) {
|
10737 | if (!writer)
|
10738 | writer = $Writer.create();
|
10739 | if (message.path != null && message.path.length) {
|
10740 | writer.uint32(/* id 1, wireType 2 =*/10).fork();
|
10741 | for (var i = 0; i < message.path.length; ++i)
|
10742 | writer.int32(message.path[i]);
|
10743 | writer.ldelim();
|
10744 | }
|
10745 | if (message.span != null && message.span.length) {
|
10746 | writer.uint32(/* id 2, wireType 2 =*/18).fork();
|
10747 | for (var i = 0; i < message.span.length; ++i)
|
10748 | writer.int32(message.span[i]);
|
10749 | writer.ldelim();
|
10750 | }
|
10751 | if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments"))
|
10752 | writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments);
|
10753 | if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments"))
|
10754 | writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments);
|
10755 | if (message.leadingDetachedComments != null && message.leadingDetachedComments.length)
|
10756 | for (var i = 0; i < message.leadingDetachedComments.length; ++i)
|
10757 | writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]);
|
10758 | return writer;
|
10759 | };
|
10760 |
|
10761 | /**
|
10762 | * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages.
|
10763 | * @function encodeDelimited
|
10764 | * @memberof google.protobuf.SourceCodeInfo.Location
|
10765 | * @static
|
10766 | * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode
|
10767 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
10768 | * @returns {$protobuf.Writer} Writer
|
10769 | */
|
10770 | Location.encodeDelimited = function encodeDelimited(message, writer) {
|
10771 | return this.encode(message, writer).ldelim();
|
10772 | };
|
10773 |
|
10774 | /**
|
10775 | * Decodes a Location message from the specified reader or buffer.
|
10776 | * @function decode
|
10777 | * @memberof google.protobuf.SourceCodeInfo.Location
|
10778 | * @static
|
10779 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
10780 | * @param {number} [length] Message length if known beforehand
|
10781 | * @returns {google.protobuf.SourceCodeInfo.Location} Location
|
10782 | * @throws {Error} If the payload is not a reader or valid buffer
|
10783 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
10784 | */
|
10785 | Location.decode = function decode(reader, length) {
|
10786 | if (!(reader instanceof $Reader))
|
10787 | reader = $Reader.create(reader);
|
10788 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location();
|
10789 | while (reader.pos < end) {
|
10790 | var tag = reader.uint32();
|
10791 | switch (tag >>> 3) {
|
10792 | case 1:
|
10793 | if (!(message.path && message.path.length))
|
10794 | message.path = [];
|
10795 | if ((tag & 7) === 2) {
|
10796 | var end2 = reader.uint32() + reader.pos;
|
10797 | while (reader.pos < end2)
|
10798 | message.path.push(reader.int32());
|
10799 | } else
|
10800 | message.path.push(reader.int32());
|
10801 | break;
|
10802 | case 2:
|
10803 | if (!(message.span && message.span.length))
|
10804 | message.span = [];
|
10805 | if ((tag & 7) === 2) {
|
10806 | var end2 = reader.uint32() + reader.pos;
|
10807 | while (reader.pos < end2)
|
10808 | message.span.push(reader.int32());
|
10809 | } else
|
10810 | message.span.push(reader.int32());
|
10811 | break;
|
10812 | case 3:
|
10813 | message.leadingComments = reader.string();
|
10814 | break;
|
10815 | case 4:
|
10816 | message.trailingComments = reader.string();
|
10817 | break;
|
10818 | case 6:
|
10819 | if (!(message.leadingDetachedComments && message.leadingDetachedComments.length))
|
10820 | message.leadingDetachedComments = [];
|
10821 | message.leadingDetachedComments.push(reader.string());
|
10822 | break;
|
10823 | default:
|
10824 | reader.skipType(tag & 7);
|
10825 | break;
|
10826 | }
|
10827 | }
|
10828 | return message;
|
10829 | };
|
10830 |
|
10831 | /**
|
10832 | * Decodes a Location message from the specified reader or buffer, length delimited.
|
10833 | * @function decodeDelimited
|
10834 | * @memberof google.protobuf.SourceCodeInfo.Location
|
10835 | * @static
|
10836 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
10837 | * @returns {google.protobuf.SourceCodeInfo.Location} Location
|
10838 | * @throws {Error} If the payload is not a reader or valid buffer
|
10839 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
10840 | */
|
10841 | Location.decodeDelimited = function decodeDelimited(reader) {
|
10842 | if (!(reader instanceof $Reader))
|
10843 | reader = new $Reader(reader);
|
10844 | return this.decode(reader, reader.uint32());
|
10845 | };
|
10846 |
|
10847 | /**
|
10848 | * Verifies a Location message.
|
10849 | * @function verify
|
10850 | * @memberof google.protobuf.SourceCodeInfo.Location
|
10851 | * @static
|
10852 | * @param {Object.<string,*>} message Plain object to verify
|
10853 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
10854 | */
|
10855 | Location.verify = function verify(message) {
|
10856 | if (typeof message !== "object" || message === null)
|
10857 | return "object expected";
|
10858 | if (message.path != null && message.hasOwnProperty("path")) {
|
10859 | if (!Array.isArray(message.path))
|
10860 | return "path: array expected";
|
10861 | for (var i = 0; i < message.path.length; ++i)
|
10862 | if (!$util.isInteger(message.path[i]))
|
10863 | return "path: integer[] expected";
|
10864 | }
|
10865 | if (message.span != null && message.hasOwnProperty("span")) {
|
10866 | if (!Array.isArray(message.span))
|
10867 | return "span: array expected";
|
10868 | for (var i = 0; i < message.span.length; ++i)
|
10869 | if (!$util.isInteger(message.span[i]))
|
10870 | return "span: integer[] expected";
|
10871 | }
|
10872 | if (message.leadingComments != null && message.hasOwnProperty("leadingComments"))
|
10873 | if (!$util.isString(message.leadingComments))
|
10874 | return "leadingComments: string expected";
|
10875 | if (message.trailingComments != null && message.hasOwnProperty("trailingComments"))
|
10876 | if (!$util.isString(message.trailingComments))
|
10877 | return "trailingComments: string expected";
|
10878 | if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) {
|
10879 | if (!Array.isArray(message.leadingDetachedComments))
|
10880 | return "leadingDetachedComments: array expected";
|
10881 | for (var i = 0; i < message.leadingDetachedComments.length; ++i)
|
10882 | if (!$util.isString(message.leadingDetachedComments[i]))
|
10883 | return "leadingDetachedComments: string[] expected";
|
10884 | }
|
10885 | return null;
|
10886 | };
|
10887 |
|
10888 | /**
|
10889 | * Creates a Location message from a plain object. Also converts values to their respective internal types.
|
10890 | * @function fromObject
|
10891 | * @memberof google.protobuf.SourceCodeInfo.Location
|
10892 | * @static
|
10893 | * @param {Object.<string,*>} object Plain object
|
10894 | * @returns {google.protobuf.SourceCodeInfo.Location} Location
|
10895 | */
|
10896 | Location.fromObject = function fromObject(object) {
|
10897 | if (object instanceof $root.google.protobuf.SourceCodeInfo.Location)
|
10898 | return object;
|
10899 | var message = new $root.google.protobuf.SourceCodeInfo.Location();
|
10900 | if (object.path) {
|
10901 | if (!Array.isArray(object.path))
|
10902 | throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected");
|
10903 | message.path = [];
|
10904 | for (var i = 0; i < object.path.length; ++i)
|
10905 | message.path[i] = object.path[i] | 0;
|
10906 | }
|
10907 | if (object.span) {
|
10908 | if (!Array.isArray(object.span))
|
10909 | throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected");
|
10910 | message.span = [];
|
10911 | for (var i = 0; i < object.span.length; ++i)
|
10912 | message.span[i] = object.span[i] | 0;
|
10913 | }
|
10914 | if (object.leadingComments != null)
|
10915 | message.leadingComments = String(object.leadingComments);
|
10916 | if (object.trailingComments != null)
|
10917 | message.trailingComments = String(object.trailingComments);
|
10918 | if (object.leadingDetachedComments) {
|
10919 | if (!Array.isArray(object.leadingDetachedComments))
|
10920 | throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected");
|
10921 | message.leadingDetachedComments = [];
|
10922 | for (var i = 0; i < object.leadingDetachedComments.length; ++i)
|
10923 | message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]);
|
10924 | }
|
10925 | return message;
|
10926 | };
|
10927 |
|
10928 | /**
|
10929 | * Creates a plain object from a Location message. Also converts values to other types if specified.
|
10930 | * @function toObject
|
10931 | * @memberof google.protobuf.SourceCodeInfo.Location
|
10932 | * @static
|
10933 | * @param {google.protobuf.SourceCodeInfo.Location} message Location
|
10934 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
10935 | * @returns {Object.<string,*>} Plain object
|
10936 | */
|
10937 | Location.toObject = function toObject(message, options) {
|
10938 | if (!options)
|
10939 | options = {};
|
10940 | var object = {};
|
10941 | if (options.arrays || options.defaults) {
|
10942 | object.path = [];
|
10943 | object.span = [];
|
10944 | object.leadingDetachedComments = [];
|
10945 | }
|
10946 | if (options.defaults) {
|
10947 | object.leadingComments = "";
|
10948 | object.trailingComments = "";
|
10949 | }
|
10950 | if (message.path && message.path.length) {
|
10951 | object.path = [];
|
10952 | for (var j = 0; j < message.path.length; ++j)
|
10953 | object.path[j] = message.path[j];
|
10954 | }
|
10955 | if (message.span && message.span.length) {
|
10956 | object.span = [];
|
10957 | for (var j = 0; j < message.span.length; ++j)
|
10958 | object.span[j] = message.span[j];
|
10959 | }
|
10960 | if (message.leadingComments != null && message.hasOwnProperty("leadingComments"))
|
10961 | object.leadingComments = message.leadingComments;
|
10962 | if (message.trailingComments != null && message.hasOwnProperty("trailingComments"))
|
10963 | object.trailingComments = message.trailingComments;
|
10964 | if (message.leadingDetachedComments && message.leadingDetachedComments.length) {
|
10965 | object.leadingDetachedComments = [];
|
10966 | for (var j = 0; j < message.leadingDetachedComments.length; ++j)
|
10967 | object.leadingDetachedComments[j] = message.leadingDetachedComments[j];
|
10968 | }
|
10969 | return object;
|
10970 | };
|
10971 |
|
10972 | /**
|
10973 | * Converts this Location to JSON.
|
10974 | * @function toJSON
|
10975 | * @memberof google.protobuf.SourceCodeInfo.Location
|
10976 | * @instance
|
10977 | * @returns {Object.<string,*>} JSON object
|
10978 | */
|
10979 | Location.prototype.toJSON = function toJSON() {
|
10980 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
10981 | };
|
10982 |
|
10983 | return Location;
|
10984 | })();
|
10985 |
|
10986 | return SourceCodeInfo;
|
10987 | })();
|
10988 |
|
10989 | protobuf.GeneratedCodeInfo = (function() {
|
10990 |
|
10991 | /**
|
10992 | * Properties of a GeneratedCodeInfo.
|
10993 | * @memberof google.protobuf
|
10994 | * @interface IGeneratedCodeInfo
|
10995 | * @property {Array.<google.protobuf.GeneratedCodeInfo.IAnnotation>|null} [annotation] GeneratedCodeInfo annotation
|
10996 | */
|
10997 |
|
10998 | /**
|
10999 | * Constructs a new GeneratedCodeInfo.
|
11000 | * @memberof google.protobuf
|
11001 | * @classdesc Represents a GeneratedCodeInfo.
|
11002 | * @implements IGeneratedCodeInfo
|
11003 | * @constructor
|
11004 | * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set
|
11005 | */
|
11006 | function GeneratedCodeInfo(properties) {
|
11007 | this.annotation = [];
|
11008 | if (properties)
|
11009 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
11010 | if (properties[keys[i]] != null)
|
11011 | this[keys[i]] = properties[keys[i]];
|
11012 | }
|
11013 |
|
11014 | /**
|
11015 | * GeneratedCodeInfo annotation.
|
11016 | * @member {Array.<google.protobuf.GeneratedCodeInfo.IAnnotation>} annotation
|
11017 | * @memberof google.protobuf.GeneratedCodeInfo
|
11018 | * @instance
|
11019 | */
|
11020 | GeneratedCodeInfo.prototype.annotation = $util.emptyArray;
|
11021 |
|
11022 | /**
|
11023 | * Creates a new GeneratedCodeInfo instance using the specified properties.
|
11024 | * @function create
|
11025 | * @memberof google.protobuf.GeneratedCodeInfo
|
11026 | * @static
|
11027 | * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set
|
11028 | * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance
|
11029 | */
|
11030 | GeneratedCodeInfo.create = function create(properties) {
|
11031 | return new GeneratedCodeInfo(properties);
|
11032 | };
|
11033 |
|
11034 | /**
|
11035 | * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages.
|
11036 | * @function encode
|
11037 | * @memberof google.protobuf.GeneratedCodeInfo
|
11038 | * @static
|
11039 | * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode
|
11040 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
11041 | * @returns {$protobuf.Writer} Writer
|
11042 | */
|
11043 | GeneratedCodeInfo.encode = function encode(message, writer) {
|
11044 | if (!writer)
|
11045 | writer = $Writer.create();
|
11046 | if (message.annotation != null && message.annotation.length)
|
11047 | for (var i = 0; i < message.annotation.length; ++i)
|
11048 | $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
11049 | return writer;
|
11050 | };
|
11051 |
|
11052 | /**
|
11053 | * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages.
|
11054 | * @function encodeDelimited
|
11055 | * @memberof google.protobuf.GeneratedCodeInfo
|
11056 | * @static
|
11057 | * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode
|
11058 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
11059 | * @returns {$protobuf.Writer} Writer
|
11060 | */
|
11061 | GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) {
|
11062 | return this.encode(message, writer).ldelim();
|
11063 | };
|
11064 |
|
11065 | /**
|
11066 | * Decodes a GeneratedCodeInfo message from the specified reader or buffer.
|
11067 | * @function decode
|
11068 | * @memberof google.protobuf.GeneratedCodeInfo
|
11069 | * @static
|
11070 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
11071 | * @param {number} [length] Message length if known beforehand
|
11072 | * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo
|
11073 | * @throws {Error} If the payload is not a reader or valid buffer
|
11074 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
11075 | */
|
11076 | GeneratedCodeInfo.decode = function decode(reader, length) {
|
11077 | if (!(reader instanceof $Reader))
|
11078 | reader = $Reader.create(reader);
|
11079 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo();
|
11080 | while (reader.pos < end) {
|
11081 | var tag = reader.uint32();
|
11082 | switch (tag >>> 3) {
|
11083 | case 1:
|
11084 | if (!(message.annotation && message.annotation.length))
|
11085 | message.annotation = [];
|
11086 | message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32()));
|
11087 | break;
|
11088 | default:
|
11089 | reader.skipType(tag & 7);
|
11090 | break;
|
11091 | }
|
11092 | }
|
11093 | return message;
|
11094 | };
|
11095 |
|
11096 | /**
|
11097 | * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited.
|
11098 | * @function decodeDelimited
|
11099 | * @memberof google.protobuf.GeneratedCodeInfo
|
11100 | * @static
|
11101 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
11102 | * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo
|
11103 | * @throws {Error} If the payload is not a reader or valid buffer
|
11104 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
11105 | */
|
11106 | GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) {
|
11107 | if (!(reader instanceof $Reader))
|
11108 | reader = new $Reader(reader);
|
11109 | return this.decode(reader, reader.uint32());
|
11110 | };
|
11111 |
|
11112 | /**
|
11113 | * Verifies a GeneratedCodeInfo message.
|
11114 | * @function verify
|
11115 | * @memberof google.protobuf.GeneratedCodeInfo
|
11116 | * @static
|
11117 | * @param {Object.<string,*>} message Plain object to verify
|
11118 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
11119 | */
|
11120 | GeneratedCodeInfo.verify = function verify(message) {
|
11121 | if (typeof message !== "object" || message === null)
|
11122 | return "object expected";
|
11123 | if (message.annotation != null && message.hasOwnProperty("annotation")) {
|
11124 | if (!Array.isArray(message.annotation))
|
11125 | return "annotation: array expected";
|
11126 | for (var i = 0; i < message.annotation.length; ++i) {
|
11127 | var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]);
|
11128 | if (error)
|
11129 | return "annotation." + error;
|
11130 | }
|
11131 | }
|
11132 | return null;
|
11133 | };
|
11134 |
|
11135 | /**
|
11136 | * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types.
|
11137 | * @function fromObject
|
11138 | * @memberof google.protobuf.GeneratedCodeInfo
|
11139 | * @static
|
11140 | * @param {Object.<string,*>} object Plain object
|
11141 | * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo
|
11142 | */
|
11143 | GeneratedCodeInfo.fromObject = function fromObject(object) {
|
11144 | if (object instanceof $root.google.protobuf.GeneratedCodeInfo)
|
11145 | return object;
|
11146 | var message = new $root.google.protobuf.GeneratedCodeInfo();
|
11147 | if (object.annotation) {
|
11148 | if (!Array.isArray(object.annotation))
|
11149 | throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected");
|
11150 | message.annotation = [];
|
11151 | for (var i = 0; i < object.annotation.length; ++i) {
|
11152 | if (typeof object.annotation[i] !== "object")
|
11153 | throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected");
|
11154 | message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]);
|
11155 | }
|
11156 | }
|
11157 | return message;
|
11158 | };
|
11159 |
|
11160 | /**
|
11161 | * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified.
|
11162 | * @function toObject
|
11163 | * @memberof google.protobuf.GeneratedCodeInfo
|
11164 | * @static
|
11165 | * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo
|
11166 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
11167 | * @returns {Object.<string,*>} Plain object
|
11168 | */
|
11169 | GeneratedCodeInfo.toObject = function toObject(message, options) {
|
11170 | if (!options)
|
11171 | options = {};
|
11172 | var object = {};
|
11173 | if (options.arrays || options.defaults)
|
11174 | object.annotation = [];
|
11175 | if (message.annotation && message.annotation.length) {
|
11176 | object.annotation = [];
|
11177 | for (var j = 0; j < message.annotation.length; ++j)
|
11178 | object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options);
|
11179 | }
|
11180 | return object;
|
11181 | };
|
11182 |
|
11183 | /**
|
11184 | * Converts this GeneratedCodeInfo to JSON.
|
11185 | * @function toJSON
|
11186 | * @memberof google.protobuf.GeneratedCodeInfo
|
11187 | * @instance
|
11188 | * @returns {Object.<string,*>} JSON object
|
11189 | */
|
11190 | GeneratedCodeInfo.prototype.toJSON = function toJSON() {
|
11191 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
11192 | };
|
11193 |
|
11194 | GeneratedCodeInfo.Annotation = (function() {
|
11195 |
|
11196 | /**
|
11197 | * Properties of an Annotation.
|
11198 | * @memberof google.protobuf.GeneratedCodeInfo
|
11199 | * @interface IAnnotation
|
11200 | * @property {Array.<number>|null} [path] Annotation path
|
11201 | * @property {string|null} [sourceFile] Annotation sourceFile
|
11202 | * @property {number|null} [begin] Annotation begin
|
11203 | * @property {number|null} [end] Annotation end
|
11204 | */
|
11205 |
|
11206 | /**
|
11207 | * Constructs a new Annotation.
|
11208 | * @memberof google.protobuf.GeneratedCodeInfo
|
11209 | * @classdesc Represents an Annotation.
|
11210 | * @implements IAnnotation
|
11211 | * @constructor
|
11212 | * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set
|
11213 | */
|
11214 | function Annotation(properties) {
|
11215 | this.path = [];
|
11216 | if (properties)
|
11217 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
11218 | if (properties[keys[i]] != null)
|
11219 | this[keys[i]] = properties[keys[i]];
|
11220 | }
|
11221 |
|
11222 | /**
|
11223 | * Annotation path.
|
11224 | * @member {Array.<number>} path
|
11225 | * @memberof google.protobuf.GeneratedCodeInfo.Annotation
|
11226 | * @instance
|
11227 | */
|
11228 | Annotation.prototype.path = $util.emptyArray;
|
11229 |
|
11230 | /**
|
11231 | * Annotation sourceFile.
|
11232 | * @member {string} sourceFile
|
11233 | * @memberof google.protobuf.GeneratedCodeInfo.Annotation
|
11234 | * @instance
|
11235 | */
|
11236 | Annotation.prototype.sourceFile = "";
|
11237 |
|
11238 | /**
|
11239 | * Annotation begin.
|
11240 | * @member {number} begin
|
11241 | * @memberof google.protobuf.GeneratedCodeInfo.Annotation
|
11242 | * @instance
|
11243 | */
|
11244 | Annotation.prototype.begin = 0;
|
11245 |
|
11246 | /**
|
11247 | * Annotation end.
|
11248 | * @member {number} end
|
11249 | * @memberof google.protobuf.GeneratedCodeInfo.Annotation
|
11250 | * @instance
|
11251 | */
|
11252 | Annotation.prototype.end = 0;
|
11253 |
|
11254 | /**
|
11255 | * Creates a new Annotation instance using the specified properties.
|
11256 | * @function create
|
11257 | * @memberof google.protobuf.GeneratedCodeInfo.Annotation
|
11258 | * @static
|
11259 | * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set
|
11260 | * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance
|
11261 | */
|
11262 | Annotation.create = function create(properties) {
|
11263 | return new Annotation(properties);
|
11264 | };
|
11265 |
|
11266 | /**
|
11267 | * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages.
|
11268 | * @function encode
|
11269 | * @memberof google.protobuf.GeneratedCodeInfo.Annotation
|
11270 | * @static
|
11271 | * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode
|
11272 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
11273 | * @returns {$protobuf.Writer} Writer
|
11274 | */
|
11275 | Annotation.encode = function encode(message, writer) {
|
11276 | if (!writer)
|
11277 | writer = $Writer.create();
|
11278 | if (message.path != null && message.path.length) {
|
11279 | writer.uint32(/* id 1, wireType 2 =*/10).fork();
|
11280 | for (var i = 0; i < message.path.length; ++i)
|
11281 | writer.int32(message.path[i]);
|
11282 | writer.ldelim();
|
11283 | }
|
11284 | if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile"))
|
11285 | writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile);
|
11286 | if (message.begin != null && Object.hasOwnProperty.call(message, "begin"))
|
11287 | writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin);
|
11288 | if (message.end != null && Object.hasOwnProperty.call(message, "end"))
|
11289 | writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end);
|
11290 | return writer;
|
11291 | };
|
11292 |
|
11293 | /**
|
11294 | * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages.
|
11295 | * @function encodeDelimited
|
11296 | * @memberof google.protobuf.GeneratedCodeInfo.Annotation
|
11297 | * @static
|
11298 | * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode
|
11299 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
11300 | * @returns {$protobuf.Writer} Writer
|
11301 | */
|
11302 | Annotation.encodeDelimited = function encodeDelimited(message, writer) {
|
11303 | return this.encode(message, writer).ldelim();
|
11304 | };
|
11305 |
|
11306 | /**
|
11307 | * Decodes an Annotation message from the specified reader or buffer.
|
11308 | * @function decode
|
11309 | * @memberof google.protobuf.GeneratedCodeInfo.Annotation
|
11310 | * @static
|
11311 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
11312 | * @param {number} [length] Message length if known beforehand
|
11313 | * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation
|
11314 | * @throws {Error} If the payload is not a reader or valid buffer
|
11315 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
11316 | */
|
11317 | Annotation.decode = function decode(reader, length) {
|
11318 | if (!(reader instanceof $Reader))
|
11319 | reader = $Reader.create(reader);
|
11320 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation();
|
11321 | while (reader.pos < end) {
|
11322 | var tag = reader.uint32();
|
11323 | switch (tag >>> 3) {
|
11324 | case 1:
|
11325 | if (!(message.path && message.path.length))
|
11326 | message.path = [];
|
11327 | if ((tag & 7) === 2) {
|
11328 | var end2 = reader.uint32() + reader.pos;
|
11329 | while (reader.pos < end2)
|
11330 | message.path.push(reader.int32());
|
11331 | } else
|
11332 | message.path.push(reader.int32());
|
11333 | break;
|
11334 | case 2:
|
11335 | message.sourceFile = reader.string();
|
11336 | break;
|
11337 | case 3:
|
11338 | message.begin = reader.int32();
|
11339 | break;
|
11340 | case 4:
|
11341 | message.end = reader.int32();
|
11342 | break;
|
11343 | default:
|
11344 | reader.skipType(tag & 7);
|
11345 | break;
|
11346 | }
|
11347 | }
|
11348 | return message;
|
11349 | };
|
11350 |
|
11351 | /**
|
11352 | * Decodes an Annotation message from the specified reader or buffer, length delimited.
|
11353 | * @function decodeDelimited
|
11354 | * @memberof google.protobuf.GeneratedCodeInfo.Annotation
|
11355 | * @static
|
11356 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
11357 | * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation
|
11358 | * @throws {Error} If the payload is not a reader or valid buffer
|
11359 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
11360 | */
|
11361 | Annotation.decodeDelimited = function decodeDelimited(reader) {
|
11362 | if (!(reader instanceof $Reader))
|
11363 | reader = new $Reader(reader);
|
11364 | return this.decode(reader, reader.uint32());
|
11365 | };
|
11366 |
|
11367 | /**
|
11368 | * Verifies an Annotation message.
|
11369 | * @function verify
|
11370 | * @memberof google.protobuf.GeneratedCodeInfo.Annotation
|
11371 | * @static
|
11372 | * @param {Object.<string,*>} message Plain object to verify
|
11373 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
11374 | */
|
11375 | Annotation.verify = function verify(message) {
|
11376 | if (typeof message !== "object" || message === null)
|
11377 | return "object expected";
|
11378 | if (message.path != null && message.hasOwnProperty("path")) {
|
11379 | if (!Array.isArray(message.path))
|
11380 | return "path: array expected";
|
11381 | for (var i = 0; i < message.path.length; ++i)
|
11382 | if (!$util.isInteger(message.path[i]))
|
11383 | return "path: integer[] expected";
|
11384 | }
|
11385 | if (message.sourceFile != null && message.hasOwnProperty("sourceFile"))
|
11386 | if (!$util.isString(message.sourceFile))
|
11387 | return "sourceFile: string expected";
|
11388 | if (message.begin != null && message.hasOwnProperty("begin"))
|
11389 | if (!$util.isInteger(message.begin))
|
11390 | return "begin: integer expected";
|
11391 | if (message.end != null && message.hasOwnProperty("end"))
|
11392 | if (!$util.isInteger(message.end))
|
11393 | return "end: integer expected";
|
11394 | return null;
|
11395 | };
|
11396 |
|
11397 | /**
|
11398 | * Creates an Annotation message from a plain object. Also converts values to their respective internal types.
|
11399 | * @function fromObject
|
11400 | * @memberof google.protobuf.GeneratedCodeInfo.Annotation
|
11401 | * @static
|
11402 | * @param {Object.<string,*>} object Plain object
|
11403 | * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation
|
11404 | */
|
11405 | Annotation.fromObject = function fromObject(object) {
|
11406 | if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation)
|
11407 | return object;
|
11408 | var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation();
|
11409 | if (object.path) {
|
11410 | if (!Array.isArray(object.path))
|
11411 | throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected");
|
11412 | message.path = [];
|
11413 | for (var i = 0; i < object.path.length; ++i)
|
11414 | message.path[i] = object.path[i] | 0;
|
11415 | }
|
11416 | if (object.sourceFile != null)
|
11417 | message.sourceFile = String(object.sourceFile);
|
11418 | if (object.begin != null)
|
11419 | message.begin = object.begin | 0;
|
11420 | if (object.end != null)
|
11421 | message.end = object.end | 0;
|
11422 | return message;
|
11423 | };
|
11424 |
|
11425 | /**
|
11426 | * Creates a plain object from an Annotation message. Also converts values to other types if specified.
|
11427 | * @function toObject
|
11428 | * @memberof google.protobuf.GeneratedCodeInfo.Annotation
|
11429 | * @static
|
11430 | * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation
|
11431 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
11432 | * @returns {Object.<string,*>} Plain object
|
11433 | */
|
11434 | Annotation.toObject = function toObject(message, options) {
|
11435 | if (!options)
|
11436 | options = {};
|
11437 | var object = {};
|
11438 | if (options.arrays || options.defaults)
|
11439 | object.path = [];
|
11440 | if (options.defaults) {
|
11441 | object.sourceFile = "";
|
11442 | object.begin = 0;
|
11443 | object.end = 0;
|
11444 | }
|
11445 | if (message.path && message.path.length) {
|
11446 | object.path = [];
|
11447 | for (var j = 0; j < message.path.length; ++j)
|
11448 | object.path[j] = message.path[j];
|
11449 | }
|
11450 | if (message.sourceFile != null && message.hasOwnProperty("sourceFile"))
|
11451 | object.sourceFile = message.sourceFile;
|
11452 | if (message.begin != null && message.hasOwnProperty("begin"))
|
11453 | object.begin = message.begin;
|
11454 | if (message.end != null && message.hasOwnProperty("end"))
|
11455 | object.end = message.end;
|
11456 | return object;
|
11457 | };
|
11458 |
|
11459 | /**
|
11460 | * Converts this Annotation to JSON.
|
11461 | * @function toJSON
|
11462 | * @memberof google.protobuf.GeneratedCodeInfo.Annotation
|
11463 | * @instance
|
11464 | * @returns {Object.<string,*>} JSON object
|
11465 | */
|
11466 | Annotation.prototype.toJSON = function toJSON() {
|
11467 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
11468 | };
|
11469 |
|
11470 | return Annotation;
|
11471 | })();
|
11472 |
|
11473 | return GeneratedCodeInfo;
|
11474 | })();
|
11475 |
|
11476 | protobuf.Any = (function() {
|
11477 |
|
11478 | /**
|
11479 | * Properties of an Any.
|
11480 | * @memberof google.protobuf
|
11481 | * @interface IAny
|
11482 | * @property {string|null} [type_url] Any type_url
|
11483 | * @property {Uint8Array|null} [value] Any value
|
11484 | */
|
11485 |
|
11486 | /**
|
11487 | * Constructs a new Any.
|
11488 | * @memberof google.protobuf
|
11489 | * @classdesc Represents an Any.
|
11490 | * @implements IAny
|
11491 | * @constructor
|
11492 | * @param {google.protobuf.IAny=} [properties] Properties to set
|
11493 | */
|
11494 | function Any(properties) {
|
11495 | if (properties)
|
11496 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
11497 | if (properties[keys[i]] != null)
|
11498 | this[keys[i]] = properties[keys[i]];
|
11499 | }
|
11500 |
|
11501 | /**
|
11502 | * Any type_url.
|
11503 | * @member {string} type_url
|
11504 | * @memberof google.protobuf.Any
|
11505 | * @instance
|
11506 | */
|
11507 | Any.prototype.type_url = "";
|
11508 |
|
11509 | /**
|
11510 | * Any value.
|
11511 | * @member {Uint8Array} value
|
11512 | * @memberof google.protobuf.Any
|
11513 | * @instance
|
11514 | */
|
11515 | Any.prototype.value = $util.newBuffer([]);
|
11516 |
|
11517 | /**
|
11518 | * Creates a new Any instance using the specified properties.
|
11519 | * @function create
|
11520 | * @memberof google.protobuf.Any
|
11521 | * @static
|
11522 | * @param {google.protobuf.IAny=} [properties] Properties to set
|
11523 | * @returns {google.protobuf.Any} Any instance
|
11524 | */
|
11525 | Any.create = function create(properties) {
|
11526 | return new Any(properties);
|
11527 | };
|
11528 |
|
11529 | /**
|
11530 | * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages.
|
11531 | * @function encode
|
11532 | * @memberof google.protobuf.Any
|
11533 | * @static
|
11534 | * @param {google.protobuf.IAny} message Any message or plain object to encode
|
11535 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
11536 | * @returns {$protobuf.Writer} Writer
|
11537 | */
|
11538 | Any.encode = function encode(message, writer) {
|
11539 | if (!writer)
|
11540 | writer = $Writer.create();
|
11541 | if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url"))
|
11542 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url);
|
11543 | if (message.value != null && Object.hasOwnProperty.call(message, "value"))
|
11544 | writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value);
|
11545 | return writer;
|
11546 | };
|
11547 |
|
11548 | /**
|
11549 | * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages.
|
11550 | * @function encodeDelimited
|
11551 | * @memberof google.protobuf.Any
|
11552 | * @static
|
11553 | * @param {google.protobuf.IAny} message Any message or plain object to encode
|
11554 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
11555 | * @returns {$protobuf.Writer} Writer
|
11556 | */
|
11557 | Any.encodeDelimited = function encodeDelimited(message, writer) {
|
11558 | return this.encode(message, writer).ldelim();
|
11559 | };
|
11560 |
|
11561 | /**
|
11562 | * Decodes an Any message from the specified reader or buffer.
|
11563 | * @function decode
|
11564 | * @memberof google.protobuf.Any
|
11565 | * @static
|
11566 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
11567 | * @param {number} [length] Message length if known beforehand
|
11568 | * @returns {google.protobuf.Any} Any
|
11569 | * @throws {Error} If the payload is not a reader or valid buffer
|
11570 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
11571 | */
|
11572 | Any.decode = function decode(reader, length) {
|
11573 | if (!(reader instanceof $Reader))
|
11574 | reader = $Reader.create(reader);
|
11575 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any();
|
11576 | while (reader.pos < end) {
|
11577 | var tag = reader.uint32();
|
11578 | switch (tag >>> 3) {
|
11579 | case 1:
|
11580 | message.type_url = reader.string();
|
11581 | break;
|
11582 | case 2:
|
11583 | message.value = reader.bytes();
|
11584 | break;
|
11585 | default:
|
11586 | reader.skipType(tag & 7);
|
11587 | break;
|
11588 | }
|
11589 | }
|
11590 | return message;
|
11591 | };
|
11592 |
|
11593 | /**
|
11594 | * Decodes an Any message from the specified reader or buffer, length delimited.
|
11595 | * @function decodeDelimited
|
11596 | * @memberof google.protobuf.Any
|
11597 | * @static
|
11598 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
11599 | * @returns {google.protobuf.Any} Any
|
11600 | * @throws {Error} If the payload is not a reader or valid buffer
|
11601 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
11602 | */
|
11603 | Any.decodeDelimited = function decodeDelimited(reader) {
|
11604 | if (!(reader instanceof $Reader))
|
11605 | reader = new $Reader(reader);
|
11606 | return this.decode(reader, reader.uint32());
|
11607 | };
|
11608 |
|
11609 | /**
|
11610 | * Verifies an Any message.
|
11611 | * @function verify
|
11612 | * @memberof google.protobuf.Any
|
11613 | * @static
|
11614 | * @param {Object.<string,*>} message Plain object to verify
|
11615 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
11616 | */
|
11617 | Any.verify = function verify(message) {
|
11618 | if (typeof message !== "object" || message === null)
|
11619 | return "object expected";
|
11620 | if (message.type_url != null && message.hasOwnProperty("type_url"))
|
11621 | if (!$util.isString(message.type_url))
|
11622 | return "type_url: string expected";
|
11623 | if (message.value != null && message.hasOwnProperty("value"))
|
11624 | if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value)))
|
11625 | return "value: buffer expected";
|
11626 | return null;
|
11627 | };
|
11628 |
|
11629 | /**
|
11630 | * Creates an Any message from a plain object. Also converts values to their respective internal types.
|
11631 | * @function fromObject
|
11632 | * @memberof google.protobuf.Any
|
11633 | * @static
|
11634 | * @param {Object.<string,*>} object Plain object
|
11635 | * @returns {google.protobuf.Any} Any
|
11636 | */
|
11637 | Any.fromObject = function fromObject(object) {
|
11638 | if (object instanceof $root.google.protobuf.Any)
|
11639 | return object;
|
11640 | var message = new $root.google.protobuf.Any();
|
11641 | if (object.type_url != null)
|
11642 | message.type_url = String(object.type_url);
|
11643 | if (object.value != null)
|
11644 | if (typeof object.value === "string")
|
11645 | $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0);
|
11646 | else if (object.value.length)
|
11647 | message.value = object.value;
|
11648 | return message;
|
11649 | };
|
11650 |
|
11651 | /**
|
11652 | * Creates a plain object from an Any message. Also converts values to other types if specified.
|
11653 | * @function toObject
|
11654 | * @memberof google.protobuf.Any
|
11655 | * @static
|
11656 | * @param {google.protobuf.Any} message Any
|
11657 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
11658 | * @returns {Object.<string,*>} Plain object
|
11659 | */
|
11660 | Any.toObject = function toObject(message, options) {
|
11661 | if (!options)
|
11662 | options = {};
|
11663 | var object = {};
|
11664 | if (options.defaults) {
|
11665 | object.type_url = "";
|
11666 | if (options.bytes === String)
|
11667 | object.value = "";
|
11668 | else {
|
11669 | object.value = [];
|
11670 | if (options.bytes !== Array)
|
11671 | object.value = $util.newBuffer(object.value);
|
11672 | }
|
11673 | }
|
11674 | if (message.type_url != null && message.hasOwnProperty("type_url"))
|
11675 | object.type_url = message.type_url;
|
11676 | if (message.value != null && message.hasOwnProperty("value"))
|
11677 | 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;
|
11678 | return object;
|
11679 | };
|
11680 |
|
11681 | /**
|
11682 | * Converts this Any to JSON.
|
11683 | * @function toJSON
|
11684 | * @memberof google.protobuf.Any
|
11685 | * @instance
|
11686 | * @returns {Object.<string,*>} JSON object
|
11687 | */
|
11688 | Any.prototype.toJSON = function toJSON() {
|
11689 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
11690 | };
|
11691 |
|
11692 | return Any;
|
11693 | })();
|
11694 |
|
11695 | protobuf.Duration = (function() {
|
11696 |
|
11697 | /**
|
11698 | * Properties of a Duration.
|
11699 | * @memberof google.protobuf
|
11700 | * @interface IDuration
|
11701 | * @property {number|Long|null} [seconds] Duration seconds
|
11702 | * @property {number|null} [nanos] Duration nanos
|
11703 | */
|
11704 |
|
11705 | /**
|
11706 | * Constructs a new Duration.
|
11707 | * @memberof google.protobuf
|
11708 | * @classdesc Represents a Duration.
|
11709 | * @implements IDuration
|
11710 | * @constructor
|
11711 | * @param {google.protobuf.IDuration=} [properties] Properties to set
|
11712 | */
|
11713 | function Duration(properties) {
|
11714 | if (properties)
|
11715 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
11716 | if (properties[keys[i]] != null)
|
11717 | this[keys[i]] = properties[keys[i]];
|
11718 | }
|
11719 |
|
11720 | /**
|
11721 | * Duration seconds.
|
11722 | * @member {number|Long} seconds
|
11723 | * @memberof google.protobuf.Duration
|
11724 | * @instance
|
11725 | */
|
11726 | Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
|
11727 |
|
11728 | /**
|
11729 | * Duration nanos.
|
11730 | * @member {number} nanos
|
11731 | * @memberof google.protobuf.Duration
|
11732 | * @instance
|
11733 | */
|
11734 | Duration.prototype.nanos = 0;
|
11735 |
|
11736 | /**
|
11737 | * Creates a new Duration instance using the specified properties.
|
11738 | * @function create
|
11739 | * @memberof google.protobuf.Duration
|
11740 | * @static
|
11741 | * @param {google.protobuf.IDuration=} [properties] Properties to set
|
11742 | * @returns {google.protobuf.Duration} Duration instance
|
11743 | */
|
11744 | Duration.create = function create(properties) {
|
11745 | return new Duration(properties);
|
11746 | };
|
11747 |
|
11748 | /**
|
11749 | * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages.
|
11750 | * @function encode
|
11751 | * @memberof google.protobuf.Duration
|
11752 | * @static
|
11753 | * @param {google.protobuf.IDuration} message Duration message or plain object to encode
|
11754 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
11755 | * @returns {$protobuf.Writer} Writer
|
11756 | */
|
11757 | Duration.encode = function encode(message, writer) {
|
11758 | if (!writer)
|
11759 | writer = $Writer.create();
|
11760 | if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds"))
|
11761 | writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds);
|
11762 | if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos"))
|
11763 | writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos);
|
11764 | return writer;
|
11765 | };
|
11766 |
|
11767 | /**
|
11768 | * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages.
|
11769 | * @function encodeDelimited
|
11770 | * @memberof google.protobuf.Duration
|
11771 | * @static
|
11772 | * @param {google.protobuf.IDuration} message Duration message or plain object to encode
|
11773 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
11774 | * @returns {$protobuf.Writer} Writer
|
11775 | */
|
11776 | Duration.encodeDelimited = function encodeDelimited(message, writer) {
|
11777 | return this.encode(message, writer).ldelim();
|
11778 | };
|
11779 |
|
11780 | /**
|
11781 | * Decodes a Duration message from the specified reader or buffer.
|
11782 | * @function decode
|
11783 | * @memberof google.protobuf.Duration
|
11784 | * @static
|
11785 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
11786 | * @param {number} [length] Message length if known beforehand
|
11787 | * @returns {google.protobuf.Duration} Duration
|
11788 | * @throws {Error} If the payload is not a reader or valid buffer
|
11789 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
11790 | */
|
11791 | Duration.decode = function decode(reader, length) {
|
11792 | if (!(reader instanceof $Reader))
|
11793 | reader = $Reader.create(reader);
|
11794 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration();
|
11795 | while (reader.pos < end) {
|
11796 | var tag = reader.uint32();
|
11797 | switch (tag >>> 3) {
|
11798 | case 1:
|
11799 | message.seconds = reader.int64();
|
11800 | break;
|
11801 | case 2:
|
11802 | message.nanos = reader.int32();
|
11803 | break;
|
11804 | default:
|
11805 | reader.skipType(tag & 7);
|
11806 | break;
|
11807 | }
|
11808 | }
|
11809 | return message;
|
11810 | };
|
11811 |
|
11812 | /**
|
11813 | * Decodes a Duration message from the specified reader or buffer, length delimited.
|
11814 | * @function decodeDelimited
|
11815 | * @memberof google.protobuf.Duration
|
11816 | * @static
|
11817 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
11818 | * @returns {google.protobuf.Duration} Duration
|
11819 | * @throws {Error} If the payload is not a reader or valid buffer
|
11820 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
11821 | */
|
11822 | Duration.decodeDelimited = function decodeDelimited(reader) {
|
11823 | if (!(reader instanceof $Reader))
|
11824 | reader = new $Reader(reader);
|
11825 | return this.decode(reader, reader.uint32());
|
11826 | };
|
11827 |
|
11828 | /**
|
11829 | * Verifies a Duration message.
|
11830 | * @function verify
|
11831 | * @memberof google.protobuf.Duration
|
11832 | * @static
|
11833 | * @param {Object.<string,*>} message Plain object to verify
|
11834 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
11835 | */
|
11836 | Duration.verify = function verify(message) {
|
11837 | if (typeof message !== "object" || message === null)
|
11838 | return "object expected";
|
11839 | if (message.seconds != null && message.hasOwnProperty("seconds"))
|
11840 | if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high)))
|
11841 | return "seconds: integer|Long expected";
|
11842 | if (message.nanos != null && message.hasOwnProperty("nanos"))
|
11843 | if (!$util.isInteger(message.nanos))
|
11844 | return "nanos: integer expected";
|
11845 | return null;
|
11846 | };
|
11847 |
|
11848 | /**
|
11849 | * Creates a Duration message from a plain object. Also converts values to their respective internal types.
|
11850 | * @function fromObject
|
11851 | * @memberof google.protobuf.Duration
|
11852 | * @static
|
11853 | * @param {Object.<string,*>} object Plain object
|
11854 | * @returns {google.protobuf.Duration} Duration
|
11855 | */
|
11856 | Duration.fromObject = function fromObject(object) {
|
11857 | if (object instanceof $root.google.protobuf.Duration)
|
11858 | return object;
|
11859 | var message = new $root.google.protobuf.Duration();
|
11860 | if (object.seconds != null)
|
11861 | if ($util.Long)
|
11862 | (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false;
|
11863 | else if (typeof object.seconds === "string")
|
11864 | message.seconds = parseInt(object.seconds, 10);
|
11865 | else if (typeof object.seconds === "number")
|
11866 | message.seconds = object.seconds;
|
11867 | else if (typeof object.seconds === "object")
|
11868 | message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber();
|
11869 | if (object.nanos != null)
|
11870 | message.nanos = object.nanos | 0;
|
11871 | return message;
|
11872 | };
|
11873 |
|
11874 | /**
|
11875 | * Creates a plain object from a Duration message. Also converts values to other types if specified.
|
11876 | * @function toObject
|
11877 | * @memberof google.protobuf.Duration
|
11878 | * @static
|
11879 | * @param {google.protobuf.Duration} message Duration
|
11880 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
11881 | * @returns {Object.<string,*>} Plain object
|
11882 | */
|
11883 | Duration.toObject = function toObject(message, options) {
|
11884 | if (!options)
|
11885 | options = {};
|
11886 | var object = {};
|
11887 | if (options.defaults) {
|
11888 | if ($util.Long) {
|
11889 | var long = new $util.Long(0, 0, false);
|
11890 | object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
11891 | } else
|
11892 | object.seconds = options.longs === String ? "0" : 0;
|
11893 | object.nanos = 0;
|
11894 | }
|
11895 | if (message.seconds != null && message.hasOwnProperty("seconds"))
|
11896 | if (typeof message.seconds === "number")
|
11897 | object.seconds = options.longs === String ? String(message.seconds) : message.seconds;
|
11898 | else
|
11899 | object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds;
|
11900 | if (message.nanos != null && message.hasOwnProperty("nanos"))
|
11901 | object.nanos = message.nanos;
|
11902 | return object;
|
11903 | };
|
11904 |
|
11905 | /**
|
11906 | * Converts this Duration to JSON.
|
11907 | * @function toJSON
|
11908 | * @memberof google.protobuf.Duration
|
11909 | * @instance
|
11910 | * @returns {Object.<string,*>} JSON object
|
11911 | */
|
11912 | Duration.prototype.toJSON = function toJSON() {
|
11913 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
11914 | };
|
11915 |
|
11916 | return Duration;
|
11917 | })();
|
11918 |
|
11919 | protobuf.Empty = (function() {
|
11920 |
|
11921 | /**
|
11922 | * Properties of an Empty.
|
11923 | * @memberof google.protobuf
|
11924 | * @interface IEmpty
|
11925 | */
|
11926 |
|
11927 | /**
|
11928 | * Constructs a new Empty.
|
11929 | * @memberof google.protobuf
|
11930 | * @classdesc Represents an Empty.
|
11931 | * @implements IEmpty
|
11932 | * @constructor
|
11933 | * @param {google.protobuf.IEmpty=} [properties] Properties to set
|
11934 | */
|
11935 | function Empty(properties) {
|
11936 | if (properties)
|
11937 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
11938 | if (properties[keys[i]] != null)
|
11939 | this[keys[i]] = properties[keys[i]];
|
11940 | }
|
11941 |
|
11942 | /**
|
11943 | * Creates a new Empty instance using the specified properties.
|
11944 | * @function create
|
11945 | * @memberof google.protobuf.Empty
|
11946 | * @static
|
11947 | * @param {google.protobuf.IEmpty=} [properties] Properties to set
|
11948 | * @returns {google.protobuf.Empty} Empty instance
|
11949 | */
|
11950 | Empty.create = function create(properties) {
|
11951 | return new Empty(properties);
|
11952 | };
|
11953 |
|
11954 | /**
|
11955 | * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages.
|
11956 | * @function encode
|
11957 | * @memberof google.protobuf.Empty
|
11958 | * @static
|
11959 | * @param {google.protobuf.IEmpty} message Empty message or plain object to encode
|
11960 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
11961 | * @returns {$protobuf.Writer} Writer
|
11962 | */
|
11963 | Empty.encode = function encode(message, writer) {
|
11964 | if (!writer)
|
11965 | writer = $Writer.create();
|
11966 | return writer;
|
11967 | };
|
11968 |
|
11969 | /**
|
11970 | * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages.
|
11971 | * @function encodeDelimited
|
11972 | * @memberof google.protobuf.Empty
|
11973 | * @static
|
11974 | * @param {google.protobuf.IEmpty} message Empty message or plain object to encode
|
11975 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
11976 | * @returns {$protobuf.Writer} Writer
|
11977 | */
|
11978 | Empty.encodeDelimited = function encodeDelimited(message, writer) {
|
11979 | return this.encode(message, writer).ldelim();
|
11980 | };
|
11981 |
|
11982 | /**
|
11983 | * Decodes an Empty message from the specified reader or buffer.
|
11984 | * @function decode
|
11985 | * @memberof google.protobuf.Empty
|
11986 | * @static
|
11987 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
11988 | * @param {number} [length] Message length if known beforehand
|
11989 | * @returns {google.protobuf.Empty} Empty
|
11990 | * @throws {Error} If the payload is not a reader or valid buffer
|
11991 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
11992 | */
|
11993 | Empty.decode = function decode(reader, length) {
|
11994 | if (!(reader instanceof $Reader))
|
11995 | reader = $Reader.create(reader);
|
11996 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty();
|
11997 | while (reader.pos < end) {
|
11998 | var tag = reader.uint32();
|
11999 | switch (tag >>> 3) {
|
12000 | default:
|
12001 | reader.skipType(tag & 7);
|
12002 | break;
|
12003 | }
|
12004 | }
|
12005 | return message;
|
12006 | };
|
12007 |
|
12008 | /**
|
12009 | * Decodes an Empty message from the specified reader or buffer, length delimited.
|
12010 | * @function decodeDelimited
|
12011 | * @memberof google.protobuf.Empty
|
12012 | * @static
|
12013 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
12014 | * @returns {google.protobuf.Empty} Empty
|
12015 | * @throws {Error} If the payload is not a reader or valid buffer
|
12016 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
12017 | */
|
12018 | Empty.decodeDelimited = function decodeDelimited(reader) {
|
12019 | if (!(reader instanceof $Reader))
|
12020 | reader = new $Reader(reader);
|
12021 | return this.decode(reader, reader.uint32());
|
12022 | };
|
12023 |
|
12024 | /**
|
12025 | * Verifies an Empty message.
|
12026 | * @function verify
|
12027 | * @memberof google.protobuf.Empty
|
12028 | * @static
|
12029 | * @param {Object.<string,*>} message Plain object to verify
|
12030 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
12031 | */
|
12032 | Empty.verify = function verify(message) {
|
12033 | if (typeof message !== "object" || message === null)
|
12034 | return "object expected";
|
12035 | return null;
|
12036 | };
|
12037 |
|
12038 | /**
|
12039 | * Creates an Empty message from a plain object. Also converts values to their respective internal types.
|
12040 | * @function fromObject
|
12041 | * @memberof google.protobuf.Empty
|
12042 | * @static
|
12043 | * @param {Object.<string,*>} object Plain object
|
12044 | * @returns {google.protobuf.Empty} Empty
|
12045 | */
|
12046 | Empty.fromObject = function fromObject(object) {
|
12047 | if (object instanceof $root.google.protobuf.Empty)
|
12048 | return object;
|
12049 | return new $root.google.protobuf.Empty();
|
12050 | };
|
12051 |
|
12052 | /**
|
12053 | * Creates a plain object from an Empty message. Also converts values to other types if specified.
|
12054 | * @function toObject
|
12055 | * @memberof google.protobuf.Empty
|
12056 | * @static
|
12057 | * @param {google.protobuf.Empty} message Empty
|
12058 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
12059 | * @returns {Object.<string,*>} Plain object
|
12060 | */
|
12061 | Empty.toObject = function toObject() {
|
12062 | return {};
|
12063 | };
|
12064 |
|
12065 | /**
|
12066 | * Converts this Empty to JSON.
|
12067 | * @function toJSON
|
12068 | * @memberof google.protobuf.Empty
|
12069 | * @instance
|
12070 | * @returns {Object.<string,*>} JSON object
|
12071 | */
|
12072 | Empty.prototype.toJSON = function toJSON() {
|
12073 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
12074 | };
|
12075 |
|
12076 | return Empty;
|
12077 | })();
|
12078 |
|
12079 | return protobuf;
|
12080 | })();
|
12081 |
|
12082 | google.rpc = (function() {
|
12083 |
|
12084 | /**
|
12085 | * Namespace rpc.
|
12086 | * @memberof google
|
12087 | * @namespace
|
12088 | */
|
12089 | var rpc = {};
|
12090 |
|
12091 | rpc.Status = (function() {
|
12092 |
|
12093 | /**
|
12094 | * Properties of a Status.
|
12095 | * @memberof google.rpc
|
12096 | * @interface IStatus
|
12097 | * @property {number|null} [code] Status code
|
12098 | * @property {string|null} [message] Status message
|
12099 | * @property {Array.<google.protobuf.IAny>|null} [details] Status details
|
12100 | */
|
12101 |
|
12102 | /**
|
12103 | * Constructs a new Status.
|
12104 | * @memberof google.rpc
|
12105 | * @classdesc Represents a Status.
|
12106 | * @implements IStatus
|
12107 | * @constructor
|
12108 | * @param {google.rpc.IStatus=} [properties] Properties to set
|
12109 | */
|
12110 | function Status(properties) {
|
12111 | this.details = [];
|
12112 | if (properties)
|
12113 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
12114 | if (properties[keys[i]] != null)
|
12115 | this[keys[i]] = properties[keys[i]];
|
12116 | }
|
12117 |
|
12118 | /**
|
12119 | * Status code.
|
12120 | * @member {number} code
|
12121 | * @memberof google.rpc.Status
|
12122 | * @instance
|
12123 | */
|
12124 | Status.prototype.code = 0;
|
12125 |
|
12126 | /**
|
12127 | * Status message.
|
12128 | * @member {string} message
|
12129 | * @memberof google.rpc.Status
|
12130 | * @instance
|
12131 | */
|
12132 | Status.prototype.message = "";
|
12133 |
|
12134 | /**
|
12135 | * Status details.
|
12136 | * @member {Array.<google.protobuf.IAny>} details
|
12137 | * @memberof google.rpc.Status
|
12138 | * @instance
|
12139 | */
|
12140 | Status.prototype.details = $util.emptyArray;
|
12141 |
|
12142 | /**
|
12143 | * Creates a new Status instance using the specified properties.
|
12144 | * @function create
|
12145 | * @memberof google.rpc.Status
|
12146 | * @static
|
12147 | * @param {google.rpc.IStatus=} [properties] Properties to set
|
12148 | * @returns {google.rpc.Status} Status instance
|
12149 | */
|
12150 | Status.create = function create(properties) {
|
12151 | return new Status(properties);
|
12152 | };
|
12153 |
|
12154 | /**
|
12155 | * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages.
|
12156 | * @function encode
|
12157 | * @memberof google.rpc.Status
|
12158 | * @static
|
12159 | * @param {google.rpc.IStatus} message Status message or plain object to encode
|
12160 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
12161 | * @returns {$protobuf.Writer} Writer
|
12162 | */
|
12163 | Status.encode = function encode(message, writer) {
|
12164 | if (!writer)
|
12165 | writer = $Writer.create();
|
12166 | if (message.code != null && Object.hasOwnProperty.call(message, "code"))
|
12167 | writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code);
|
12168 | if (message.message != null && Object.hasOwnProperty.call(message, "message"))
|
12169 | writer.uint32(/* id 2, wireType 2 =*/18).string(message.message);
|
12170 | if (message.details != null && message.details.length)
|
12171 | for (var i = 0; i < message.details.length; ++i)
|
12172 | $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
12173 | return writer;
|
12174 | };
|
12175 |
|
12176 | /**
|
12177 | * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages.
|
12178 | * @function encodeDelimited
|
12179 | * @memberof google.rpc.Status
|
12180 | * @static
|
12181 | * @param {google.rpc.IStatus} message Status message or plain object to encode
|
12182 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
12183 | * @returns {$protobuf.Writer} Writer
|
12184 | */
|
12185 | Status.encodeDelimited = function encodeDelimited(message, writer) {
|
12186 | return this.encode(message, writer).ldelim();
|
12187 | };
|
12188 |
|
12189 | /**
|
12190 | * Decodes a Status message from the specified reader or buffer.
|
12191 | * @function decode
|
12192 | * @memberof google.rpc.Status
|
12193 | * @static
|
12194 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
12195 | * @param {number} [length] Message length if known beforehand
|
12196 | * @returns {google.rpc.Status} Status
|
12197 | * @throws {Error} If the payload is not a reader or valid buffer
|
12198 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
12199 | */
|
12200 | Status.decode = function decode(reader, length) {
|
12201 | if (!(reader instanceof $Reader))
|
12202 | reader = $Reader.create(reader);
|
12203 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status();
|
12204 | while (reader.pos < end) {
|
12205 | var tag = reader.uint32();
|
12206 | switch (tag >>> 3) {
|
12207 | case 1:
|
12208 | message.code = reader.int32();
|
12209 | break;
|
12210 | case 2:
|
12211 | message.message = reader.string();
|
12212 | break;
|
12213 | case 3:
|
12214 | if (!(message.details && message.details.length))
|
12215 | message.details = [];
|
12216 | message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32()));
|
12217 | break;
|
12218 | default:
|
12219 | reader.skipType(tag & 7);
|
12220 | break;
|
12221 | }
|
12222 | }
|
12223 | return message;
|
12224 | };
|
12225 |
|
12226 | /**
|
12227 | * Decodes a Status message from the specified reader or buffer, length delimited.
|
12228 | * @function decodeDelimited
|
12229 | * @memberof google.rpc.Status
|
12230 | * @static
|
12231 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
12232 | * @returns {google.rpc.Status} Status
|
12233 | * @throws {Error} If the payload is not a reader or valid buffer
|
12234 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
12235 | */
|
12236 | Status.decodeDelimited = function decodeDelimited(reader) {
|
12237 | if (!(reader instanceof $Reader))
|
12238 | reader = new $Reader(reader);
|
12239 | return this.decode(reader, reader.uint32());
|
12240 | };
|
12241 |
|
12242 | /**
|
12243 | * Verifies a Status message.
|
12244 | * @function verify
|
12245 | * @memberof google.rpc.Status
|
12246 | * @static
|
12247 | * @param {Object.<string,*>} message Plain object to verify
|
12248 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
12249 | */
|
12250 | Status.verify = function verify(message) {
|
12251 | if (typeof message !== "object" || message === null)
|
12252 | return "object expected";
|
12253 | if (message.code != null && message.hasOwnProperty("code"))
|
12254 | if (!$util.isInteger(message.code))
|
12255 | return "code: integer expected";
|
12256 | if (message.message != null && message.hasOwnProperty("message"))
|
12257 | if (!$util.isString(message.message))
|
12258 | return "message: string expected";
|
12259 | if (message.details != null && message.hasOwnProperty("details")) {
|
12260 | if (!Array.isArray(message.details))
|
12261 | return "details: array expected";
|
12262 | for (var i = 0; i < message.details.length; ++i) {
|
12263 | var error = $root.google.protobuf.Any.verify(message.details[i]);
|
12264 | if (error)
|
12265 | return "details." + error;
|
12266 | }
|
12267 | }
|
12268 | return null;
|
12269 | };
|
12270 |
|
12271 | /**
|
12272 | * Creates a Status message from a plain object. Also converts values to their respective internal types.
|
12273 | * @function fromObject
|
12274 | * @memberof google.rpc.Status
|
12275 | * @static
|
12276 | * @param {Object.<string,*>} object Plain object
|
12277 | * @returns {google.rpc.Status} Status
|
12278 | */
|
12279 | Status.fromObject = function fromObject(object) {
|
12280 | if (object instanceof $root.google.rpc.Status)
|
12281 | return object;
|
12282 | var message = new $root.google.rpc.Status();
|
12283 | if (object.code != null)
|
12284 | message.code = object.code | 0;
|
12285 | if (object.message != null)
|
12286 | message.message = String(object.message);
|
12287 | if (object.details) {
|
12288 | if (!Array.isArray(object.details))
|
12289 | throw TypeError(".google.rpc.Status.details: array expected");
|
12290 | message.details = [];
|
12291 | for (var i = 0; i < object.details.length; ++i) {
|
12292 | if (typeof object.details[i] !== "object")
|
12293 | throw TypeError(".google.rpc.Status.details: object expected");
|
12294 | message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]);
|
12295 | }
|
12296 | }
|
12297 | return message;
|
12298 | };
|
12299 |
|
12300 | /**
|
12301 | * Creates a plain object from a Status message. Also converts values to other types if specified.
|
12302 | * @function toObject
|
12303 | * @memberof google.rpc.Status
|
12304 | * @static
|
12305 | * @param {google.rpc.Status} message Status
|
12306 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
12307 | * @returns {Object.<string,*>} Plain object
|
12308 | */
|
12309 | Status.toObject = function toObject(message, options) {
|
12310 | if (!options)
|
12311 | options = {};
|
12312 | var object = {};
|
12313 | if (options.arrays || options.defaults)
|
12314 | object.details = [];
|
12315 | if (options.defaults) {
|
12316 | object.code = 0;
|
12317 | object.message = "";
|
12318 | }
|
12319 | if (message.code != null && message.hasOwnProperty("code"))
|
12320 | object.code = message.code;
|
12321 | if (message.message != null && message.hasOwnProperty("message"))
|
12322 | object.message = message.message;
|
12323 | if (message.details && message.details.length) {
|
12324 | object.details = [];
|
12325 | for (var j = 0; j < message.details.length; ++j)
|
12326 | object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options);
|
12327 | }
|
12328 | return object;
|
12329 | };
|
12330 |
|
12331 | /**
|
12332 | * Converts this Status to JSON.
|
12333 | * @function toJSON
|
12334 | * @memberof google.rpc.Status
|
12335 | * @instance
|
12336 | * @returns {Object.<string,*>} JSON object
|
12337 | */
|
12338 | Status.prototype.toJSON = function toJSON() {
|
12339 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
12340 | };
|
12341 |
|
12342 | return Status;
|
12343 | })();
|
12344 |
|
12345 | return rpc;
|
12346 | })();
|
12347 |
|
12348 | return google;
|
12349 | })();
|
12350 |
|
12351 | return $root;
|
12352 | });
|