12353 lines
656 KiB
JavaScript
12353 lines
656 KiB
JavaScript
/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/
|
|
(function(global, factory) { /* global define, require, module */
|
|
|
|
/* AMD */ if (typeof define === 'function' && define.amd)
|
|
define(["protobufjs/minimal"], factory);
|
|
|
|
/* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports)
|
|
module.exports = factory(require("protobufjs/minimal"));
|
|
|
|
})(this, function($protobuf) {
|
|
"use strict";
|
|
|
|
// Common aliases
|
|
var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;
|
|
|
|
// Exported root namespace
|
|
var $root = $protobuf.roots.operations_protos || ($protobuf.roots.operations_protos = {});
|
|
|
|
$root.google = (function() {
|
|
|
|
/**
|
|
* Namespace google.
|
|
* @exports google
|
|
* @namespace
|
|
*/
|
|
var google = {};
|
|
|
|
google.longrunning = (function() {
|
|
|
|
/**
|
|
* Namespace longrunning.
|
|
* @memberof google
|
|
* @namespace
|
|
*/
|
|
var longrunning = {};
|
|
|
|
longrunning.Operations = (function() {
|
|
|
|
/**
|
|
* Constructs a new Operations service.
|
|
* @memberof google.longrunning
|
|
* @classdesc Represents an Operations
|
|
* @extends $protobuf.rpc.Service
|
|
* @constructor
|
|
* @param {$protobuf.RPCImpl} rpcImpl RPC implementation
|
|
* @param {boolean} [requestDelimited=false] Whether requests are length-delimited
|
|
* @param {boolean} [responseDelimited=false] Whether responses are length-delimited
|
|
*/
|
|
function Operations(rpcImpl, requestDelimited, responseDelimited) {
|
|
$protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited);
|
|
}
|
|
|
|
(Operations.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Operations;
|
|
|
|
/**
|
|
* Creates new Operations service using the specified rpc implementation.
|
|
* @function create
|
|
* @memberof google.longrunning.Operations
|
|
* @static
|
|
* @param {$protobuf.RPCImpl} rpcImpl RPC implementation
|
|
* @param {boolean} [requestDelimited=false] Whether requests are length-delimited
|
|
* @param {boolean} [responseDelimited=false] Whether responses are length-delimited
|
|
* @returns {Operations} RPC service. Useful where requests and/or responses are streamed.
|
|
*/
|
|
Operations.create = function create(rpcImpl, requestDelimited, responseDelimited) {
|
|
return new this(rpcImpl, requestDelimited, responseDelimited);
|
|
};
|
|
|
|
/**
|
|
* Callback as used by {@link google.longrunning.Operations#listOperations}.
|
|
* @memberof google.longrunning.Operations
|
|
* @typedef ListOperationsCallback
|
|
* @type {function}
|
|
* @param {Error|null} error Error, if any
|
|
* @param {google.longrunning.ListOperationsResponse} [response] ListOperationsResponse
|
|
*/
|
|
|
|
/**
|
|
* Calls ListOperations.
|
|
* @function listOperations
|
|
* @memberof google.longrunning.Operations
|
|
* @instance
|
|
* @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object
|
|
* @param {google.longrunning.Operations.ListOperationsCallback} callback Node-style callback called with the error, if any, and ListOperationsResponse
|
|
* @returns {undefined}
|
|
* @variation 1
|
|
*/
|
|
Object.defineProperty(Operations.prototype.listOperations = function listOperations(request, callback) {
|
|
return this.rpcCall(listOperations, $root.google.longrunning.ListOperationsRequest, $root.google.longrunning.ListOperationsResponse, request, callback);
|
|
}, "name", { value: "ListOperations" });
|
|
|
|
/**
|
|
* Calls ListOperations.
|
|
* @function listOperations
|
|
* @memberof google.longrunning.Operations
|
|
* @instance
|
|
* @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object
|
|
* @returns {Promise<google.longrunning.ListOperationsResponse>} Promise
|
|
* @variation 2
|
|
*/
|
|
|
|
/**
|
|
* Callback as used by {@link google.longrunning.Operations#getOperation}.
|
|
* @memberof google.longrunning.Operations
|
|
* @typedef GetOperationCallback
|
|
* @type {function}
|
|
* @param {Error|null} error Error, if any
|
|
* @param {google.longrunning.Operation} [response] Operation
|
|
*/
|
|
|
|
/**
|
|
* Calls GetOperation.
|
|
* @function getOperation
|
|
* @memberof google.longrunning.Operations
|
|
* @instance
|
|
* @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object
|
|
* @param {google.longrunning.Operations.GetOperationCallback} callback Node-style callback called with the error, if any, and Operation
|
|
* @returns {undefined}
|
|
* @variation 1
|
|
*/
|
|
Object.defineProperty(Operations.prototype.getOperation = function getOperation(request, callback) {
|
|
return this.rpcCall(getOperation, $root.google.longrunning.GetOperationRequest, $root.google.longrunning.Operation, request, callback);
|
|
}, "name", { value: "GetOperation" });
|
|
|
|
/**
|
|
* Calls GetOperation.
|
|
* @function getOperation
|
|
* @memberof google.longrunning.Operations
|
|
* @instance
|
|
* @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object
|
|
* @returns {Promise<google.longrunning.Operation>} Promise
|
|
* @variation 2
|
|
*/
|
|
|
|
/**
|
|
* Callback as used by {@link google.longrunning.Operations#deleteOperation}.
|
|
* @memberof google.longrunning.Operations
|
|
* @typedef DeleteOperationCallback
|
|
* @type {function}
|
|
* @param {Error|null} error Error, if any
|
|
* @param {google.protobuf.Empty} [response] Empty
|
|
*/
|
|
|
|
/**
|
|
* Calls DeleteOperation.
|
|
* @function deleteOperation
|
|
* @memberof google.longrunning.Operations
|
|
* @instance
|
|
* @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object
|
|
* @param {google.longrunning.Operations.DeleteOperationCallback} callback Node-style callback called with the error, if any, and Empty
|
|
* @returns {undefined}
|
|
* @variation 1
|
|
*/
|
|
Object.defineProperty(Operations.prototype.deleteOperation = function deleteOperation(request, callback) {
|
|
return this.rpcCall(deleteOperation, $root.google.longrunning.DeleteOperationRequest, $root.google.protobuf.Empty, request, callback);
|
|
}, "name", { value: "DeleteOperation" });
|
|
|
|
/**
|
|
* Calls DeleteOperation.
|
|
* @function deleteOperation
|
|
* @memberof google.longrunning.Operations
|
|
* @instance
|
|
* @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object
|
|
* @returns {Promise<google.protobuf.Empty>} Promise
|
|
* @variation 2
|
|
*/
|
|
|
|
/**
|
|
* Callback as used by {@link google.longrunning.Operations#cancelOperation}.
|
|
* @memberof google.longrunning.Operations
|
|
* @typedef CancelOperationCallback
|
|
* @type {function}
|
|
* @param {Error|null} error Error, if any
|
|
* @param {google.protobuf.Empty} [response] Empty
|
|
*/
|
|
|
|
/**
|
|
* Calls CancelOperation.
|
|
* @function cancelOperation
|
|
* @memberof google.longrunning.Operations
|
|
* @instance
|
|
* @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object
|
|
* @param {google.longrunning.Operations.CancelOperationCallback} callback Node-style callback called with the error, if any, and Empty
|
|
* @returns {undefined}
|
|
* @variation 1
|
|
*/
|
|
Object.defineProperty(Operations.prototype.cancelOperation = function cancelOperation(request, callback) {
|
|
return this.rpcCall(cancelOperation, $root.google.longrunning.CancelOperationRequest, $root.google.protobuf.Empty, request, callback);
|
|
}, "name", { value: "CancelOperation" });
|
|
|
|
/**
|
|
* Calls CancelOperation.
|
|
* @function cancelOperation
|
|
* @memberof google.longrunning.Operations
|
|
* @instance
|
|
* @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object
|
|
* @returns {Promise<google.protobuf.Empty>} Promise
|
|
* @variation 2
|
|
*/
|
|
|
|
/**
|
|
* Callback as used by {@link google.longrunning.Operations#waitOperation}.
|
|
* @memberof google.longrunning.Operations
|
|
* @typedef WaitOperationCallback
|
|
* @type {function}
|
|
* @param {Error|null} error Error, if any
|
|
* @param {google.longrunning.Operation} [response] Operation
|
|
*/
|
|
|
|
/**
|
|
* Calls WaitOperation.
|
|
* @function waitOperation
|
|
* @memberof google.longrunning.Operations
|
|
* @instance
|
|
* @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object
|
|
* @param {google.longrunning.Operations.WaitOperationCallback} callback Node-style callback called with the error, if any, and Operation
|
|
* @returns {undefined}
|
|
* @variation 1
|
|
*/
|
|
Object.defineProperty(Operations.prototype.waitOperation = function waitOperation(request, callback) {
|
|
return this.rpcCall(waitOperation, $root.google.longrunning.WaitOperationRequest, $root.google.longrunning.Operation, request, callback);
|
|
}, "name", { value: "WaitOperation" });
|
|
|
|
/**
|
|
* Calls WaitOperation.
|
|
* @function waitOperation
|
|
* @memberof google.longrunning.Operations
|
|
* @instance
|
|
* @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object
|
|
* @returns {Promise<google.longrunning.Operation>} Promise
|
|
* @variation 2
|
|
*/
|
|
|
|
return Operations;
|
|
})();
|
|
|
|
longrunning.Operation = (function() {
|
|
|
|
/**
|
|
* Properties of an Operation.
|
|
* @memberof google.longrunning
|
|
* @interface IOperation
|
|
* @property {string|null} [name] Operation name
|
|
* @property {google.protobuf.IAny|null} [metadata] Operation metadata
|
|
* @property {boolean|null} [done] Operation done
|
|
* @property {google.rpc.IStatus|null} [error] Operation error
|
|
* @property {google.protobuf.IAny|null} [response] Operation response
|
|
*/
|
|
|
|
/**
|
|
* Constructs a new Operation.
|
|
* @memberof google.longrunning
|
|
* @classdesc Represents an Operation.
|
|
* @implements IOperation
|
|
* @constructor
|
|
* @param {google.longrunning.IOperation=} [properties] Properties to set
|
|
*/
|
|
function Operation(properties) {
|
|
if (properties)
|
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
if (properties[keys[i]] != null)
|
|
this[keys[i]] = properties[keys[i]];
|
|
}
|
|
|
|
/**
|
|
* Operation name.
|
|
* @member {string} name
|
|
* @memberof google.longrunning.Operation
|
|
* @instance
|
|
*/
|
|
Operation.prototype.name = "";
|
|
|
|
/**
|
|
* Operation metadata.
|
|
* @member {google.protobuf.IAny|null|undefined} metadata
|
|
* @memberof google.longrunning.Operation
|
|
* @instance
|
|
*/
|
|
Operation.prototype.metadata = null;
|
|
|
|
/**
|
|
* Operation done.
|
|
* @member {boolean} done
|
|
* @memberof google.longrunning.Operation
|
|
* @instance
|
|
*/
|
|
Operation.prototype.done = false;
|
|
|
|
/**
|
|
* Operation error.
|
|
* @member {google.rpc.IStatus|null|undefined} error
|
|
* @memberof google.longrunning.Operation
|
|
* @instance
|
|
*/
|
|
Operation.prototype.error = null;
|
|
|
|
/**
|
|
* Operation response.
|
|
* @member {google.protobuf.IAny|null|undefined} response
|
|
* @memberof google.longrunning.Operation
|
|
* @instance
|
|
*/
|
|
Operation.prototype.response = null;
|
|
|
|
// OneOf field names bound to virtual getters and setters
|
|
var $oneOfFields;
|
|
|
|
/**
|
|
* Operation result.
|
|
* @member {"error"|"response"|undefined} result
|
|
* @memberof google.longrunning.Operation
|
|
* @instance
|
|
*/
|
|
Object.defineProperty(Operation.prototype, "result", {
|
|
get: $util.oneOfGetter($oneOfFields = ["error", "response"]),
|
|
set: $util.oneOfSetter($oneOfFields)
|
|
});
|
|
|
|
/**
|
|
* Creates a new Operation instance using the specified properties.
|
|
* @function create
|
|
* @memberof google.longrunning.Operation
|
|
* @static
|
|
* @param {google.longrunning.IOperation=} [properties] Properties to set
|
|
* @returns {google.longrunning.Operation} Operation instance
|
|
*/
|
|
Operation.create = function create(properties) {
|
|
return new Operation(properties);
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages.
|
|
* @function encode
|
|
* @memberof google.longrunning.Operation
|
|
* @static
|
|
* @param {google.longrunning.IOperation} message Operation message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
Operation.encode = function encode(message, writer) {
|
|
if (!writer)
|
|
writer = $Writer.create();
|
|
if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
|
writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
|
if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata"))
|
|
$root.google.protobuf.Any.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
if (message.done != null && Object.hasOwnProperty.call(message, "done"))
|
|
writer.uint32(/* id 3, wireType 0 =*/24).bool(message.done);
|
|
if (message.error != null && Object.hasOwnProperty.call(message, "error"))
|
|
$root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
|
if (message.response != null && Object.hasOwnProperty.call(message, "response"))
|
|
$root.google.protobuf.Any.encode(message.response, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
|
|
return writer;
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages.
|
|
* @function encodeDelimited
|
|
* @memberof google.longrunning.Operation
|
|
* @static
|
|
* @param {google.longrunning.IOperation} message Operation message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
Operation.encodeDelimited = function encodeDelimited(message, writer) {
|
|
return this.encode(message, writer).ldelim();
|
|
};
|
|
|
|
/**
|
|
* Decodes an Operation message from the specified reader or buffer.
|
|
* @function decode
|
|
* @memberof google.longrunning.Operation
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @param {number} [length] Message length if known beforehand
|
|
* @returns {google.longrunning.Operation} Operation
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
Operation.decode = function decode(reader, length) {
|
|
if (!(reader instanceof $Reader))
|
|
reader = $Reader.create(reader);
|
|
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.Operation();
|
|
while (reader.pos < end) {
|
|
var tag = reader.uint32();
|
|
switch (tag >>> 3) {
|
|
case 1:
|
|
message.name = reader.string();
|
|
break;
|
|
case 2:
|
|
message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32());
|
|
break;
|
|
case 3:
|
|
message.done = reader.bool();
|
|
break;
|
|
case 4:
|
|
message.error = $root.google.rpc.Status.decode(reader, reader.uint32());
|
|
break;
|
|
case 5:
|
|
message.response = $root.google.protobuf.Any.decode(reader, reader.uint32());
|
|
break;
|
|
default:
|
|
reader.skipType(tag & 7);
|
|
break;
|
|
}
|
|
}
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Decodes an Operation message from the specified reader or buffer, length delimited.
|
|
* @function decodeDelimited
|
|
* @memberof google.longrunning.Operation
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @returns {google.longrunning.Operation} Operation
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
Operation.decodeDelimited = function decodeDelimited(reader) {
|
|
if (!(reader instanceof $Reader))
|
|
reader = new $Reader(reader);
|
|
return this.decode(reader, reader.uint32());
|
|
};
|
|
|
|
/**
|
|
* Verifies an Operation message.
|
|
* @function verify
|
|
* @memberof google.longrunning.Operation
|
|
* @static
|
|
* @param {Object.<string,*>} message Plain object to verify
|
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
*/
|
|
Operation.verify = function verify(message) {
|
|
if (typeof message !== "object" || message === null)
|
|
return "object expected";
|
|
var properties = {};
|
|
if (message.name != null && message.hasOwnProperty("name"))
|
|
if (!$util.isString(message.name))
|
|
return "name: string expected";
|
|
if (message.metadata != null && message.hasOwnProperty("metadata")) {
|
|
var error = $root.google.protobuf.Any.verify(message.metadata);
|
|
if (error)
|
|
return "metadata." + error;
|
|
}
|
|
if (message.done != null && message.hasOwnProperty("done"))
|
|
if (typeof message.done !== "boolean")
|
|
return "done: boolean expected";
|
|
if (message.error != null && message.hasOwnProperty("error")) {
|
|
properties.result = 1;
|
|
{
|
|
var error = $root.google.rpc.Status.verify(message.error);
|
|
if (error)
|
|
return "error." + error;
|
|
}
|
|
}
|
|
if (message.response != null && message.hasOwnProperty("response")) {
|
|
if (properties.result === 1)
|
|
return "result: multiple values";
|
|
properties.result = 1;
|
|
{
|
|
var error = $root.google.protobuf.Any.verify(message.response);
|
|
if (error)
|
|
return "response." + error;
|
|
}
|
|
}
|
|
return null;
|
|
};
|
|
|
|
/**
|
|
* Creates an Operation message from a plain object. Also converts values to their respective internal types.
|
|
* @function fromObject
|
|
* @memberof google.longrunning.Operation
|
|
* @static
|
|
* @param {Object.<string,*>} object Plain object
|
|
* @returns {google.longrunning.Operation} Operation
|
|
*/
|
|
Operation.fromObject = function fromObject(object) {
|
|
if (object instanceof $root.google.longrunning.Operation)
|
|
return object;
|
|
var message = new $root.google.longrunning.Operation();
|
|
if (object.name != null)
|
|
message.name = String(object.name);
|
|
if (object.metadata != null) {
|
|
if (typeof object.metadata !== "object")
|
|
throw TypeError(".google.longrunning.Operation.metadata: object expected");
|
|
message.metadata = $root.google.protobuf.Any.fromObject(object.metadata);
|
|
}
|
|
if (object.done != null)
|
|
message.done = Boolean(object.done);
|
|
if (object.error != null) {
|
|
if (typeof object.error !== "object")
|
|
throw TypeError(".google.longrunning.Operation.error: object expected");
|
|
message.error = $root.google.rpc.Status.fromObject(object.error);
|
|
}
|
|
if (object.response != null) {
|
|
if (typeof object.response !== "object")
|
|
throw TypeError(".google.longrunning.Operation.response: object expected");
|
|
message.response = $root.google.protobuf.Any.fromObject(object.response);
|
|
}
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Creates a plain object from an Operation message. Also converts values to other types if specified.
|
|
* @function toObject
|
|
* @memberof google.longrunning.Operation
|
|
* @static
|
|
* @param {google.longrunning.Operation} message Operation
|
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
* @returns {Object.<string,*>} Plain object
|
|
*/
|
|
Operation.toObject = function toObject(message, options) {
|
|
if (!options)
|
|
options = {};
|
|
var object = {};
|
|
if (options.defaults) {
|
|
object.name = "";
|
|
object.metadata = null;
|
|
object.done = false;
|
|
}
|
|
if (message.name != null && message.hasOwnProperty("name"))
|
|
object.name = message.name;
|
|
if (message.metadata != null && message.hasOwnProperty("metadata"))
|
|
object.metadata = $root.google.protobuf.Any.toObject(message.metadata, options);
|
|
if (message.done != null && message.hasOwnProperty("done"))
|
|
object.done = message.done;
|
|
if (message.error != null && message.hasOwnProperty("error")) {
|
|
object.error = $root.google.rpc.Status.toObject(message.error, options);
|
|
if (options.oneofs)
|
|
object.result = "error";
|
|
}
|
|
if (message.response != null && message.hasOwnProperty("response")) {
|
|
object.response = $root.google.protobuf.Any.toObject(message.response, options);
|
|
if (options.oneofs)
|
|
object.result = "response";
|
|
}
|
|
return object;
|
|
};
|
|
|
|
/**
|
|
* Converts this Operation to JSON.
|
|
* @function toJSON
|
|
* @memberof google.longrunning.Operation
|
|
* @instance
|
|
* @returns {Object.<string,*>} JSON object
|
|
*/
|
|
Operation.prototype.toJSON = function toJSON() {
|
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
};
|
|
|
|
return Operation;
|
|
})();
|
|
|
|
longrunning.GetOperationRequest = (function() {
|
|
|
|
/**
|
|
* Properties of a GetOperationRequest.
|
|
* @memberof google.longrunning
|
|
* @interface IGetOperationRequest
|
|
* @property {string|null} [name] GetOperationRequest name
|
|
*/
|
|
|
|
/**
|
|
* Constructs a new GetOperationRequest.
|
|
* @memberof google.longrunning
|
|
* @classdesc Represents a GetOperationRequest.
|
|
* @implements IGetOperationRequest
|
|
* @constructor
|
|
* @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set
|
|
*/
|
|
function GetOperationRequest(properties) {
|
|
if (properties)
|
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
if (properties[keys[i]] != null)
|
|
this[keys[i]] = properties[keys[i]];
|
|
}
|
|
|
|
/**
|
|
* GetOperationRequest name.
|
|
* @member {string} name
|
|
* @memberof google.longrunning.GetOperationRequest
|
|
* @instance
|
|
*/
|
|
GetOperationRequest.prototype.name = "";
|
|
|
|
/**
|
|
* Creates a new GetOperationRequest instance using the specified properties.
|
|
* @function create
|
|
* @memberof google.longrunning.GetOperationRequest
|
|
* @static
|
|
* @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set
|
|
* @returns {google.longrunning.GetOperationRequest} GetOperationRequest instance
|
|
*/
|
|
GetOperationRequest.create = function create(properties) {
|
|
return new GetOperationRequest(properties);
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages.
|
|
* @function encode
|
|
* @memberof google.longrunning.GetOperationRequest
|
|
* @static
|
|
* @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
GetOperationRequest.encode = function encode(message, writer) {
|
|
if (!writer)
|
|
writer = $Writer.create();
|
|
if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
|
writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
|
return writer;
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages.
|
|
* @function encodeDelimited
|
|
* @memberof google.longrunning.GetOperationRequest
|
|
* @static
|
|
* @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
|
return this.encode(message, writer).ldelim();
|
|
};
|
|
|
|
/**
|
|
* Decodes a GetOperationRequest message from the specified reader or buffer.
|
|
* @function decode
|
|
* @memberof google.longrunning.GetOperationRequest
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @param {number} [length] Message length if known beforehand
|
|
* @returns {google.longrunning.GetOperationRequest} GetOperationRequest
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
GetOperationRequest.decode = function decode(reader, length) {
|
|
if (!(reader instanceof $Reader))
|
|
reader = $Reader.create(reader);
|
|
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.GetOperationRequest();
|
|
while (reader.pos < end) {
|
|
var tag = reader.uint32();
|
|
switch (tag >>> 3) {
|
|
case 1:
|
|
message.name = reader.string();
|
|
break;
|
|
default:
|
|
reader.skipType(tag & 7);
|
|
break;
|
|
}
|
|
}
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Decodes a GetOperationRequest message from the specified reader or buffer, length delimited.
|
|
* @function decodeDelimited
|
|
* @memberof google.longrunning.GetOperationRequest
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @returns {google.longrunning.GetOperationRequest} GetOperationRequest
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
GetOperationRequest.decodeDelimited = function decodeDelimited(reader) {
|
|
if (!(reader instanceof $Reader))
|
|
reader = new $Reader(reader);
|
|
return this.decode(reader, reader.uint32());
|
|
};
|
|
|
|
/**
|
|
* Verifies a GetOperationRequest message.
|
|
* @function verify
|
|
* @memberof google.longrunning.GetOperationRequest
|
|
* @static
|
|
* @param {Object.<string,*>} message Plain object to verify
|
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
*/
|
|
GetOperationRequest.verify = function verify(message) {
|
|
if (typeof message !== "object" || message === null)
|
|
return "object expected";
|
|
if (message.name != null && message.hasOwnProperty("name"))
|
|
if (!$util.isString(message.name))
|
|
return "name: string expected";
|
|
return null;
|
|
};
|
|
|
|
/**
|
|
* Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types.
|
|
* @function fromObject
|
|
* @memberof google.longrunning.GetOperationRequest
|
|
* @static
|
|
* @param {Object.<string,*>} object Plain object
|
|
* @returns {google.longrunning.GetOperationRequest} GetOperationRequest
|
|
*/
|
|
GetOperationRequest.fromObject = function fromObject(object) {
|
|
if (object instanceof $root.google.longrunning.GetOperationRequest)
|
|
return object;
|
|
var message = new $root.google.longrunning.GetOperationRequest();
|
|
if (object.name != null)
|
|
message.name = String(object.name);
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified.
|
|
* @function toObject
|
|
* @memberof google.longrunning.GetOperationRequest
|
|
* @static
|
|
* @param {google.longrunning.GetOperationRequest} message GetOperationRequest
|
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
* @returns {Object.<string,*>} Plain object
|
|
*/
|
|
GetOperationRequest.toObject = function toObject(message, options) {
|
|
if (!options)
|
|
options = {};
|
|
var object = {};
|
|
if (options.defaults)
|
|
object.name = "";
|
|
if (message.name != null && message.hasOwnProperty("name"))
|
|
object.name = message.name;
|
|
return object;
|
|
};
|
|
|
|
/**
|
|
* Converts this GetOperationRequest to JSON.
|
|
* @function toJSON
|
|
* @memberof google.longrunning.GetOperationRequest
|
|
* @instance
|
|
* @returns {Object.<string,*>} JSON object
|
|
*/
|
|
GetOperationRequest.prototype.toJSON = function toJSON() {
|
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
};
|
|
|
|
return GetOperationRequest;
|
|
})();
|
|
|
|
longrunning.ListOperationsRequest = (function() {
|
|
|
|
/**
|
|
* Properties of a ListOperationsRequest.
|
|
* @memberof google.longrunning
|
|
* @interface IListOperationsRequest
|
|
* @property {string|null} [name] ListOperationsRequest name
|
|
* @property {string|null} [filter] ListOperationsRequest filter
|
|
* @property {number|null} [pageSize] ListOperationsRequest pageSize
|
|
* @property {string|null} [pageToken] ListOperationsRequest pageToken
|
|
*/
|
|
|
|
/**
|
|
* Constructs a new ListOperationsRequest.
|
|
* @memberof google.longrunning
|
|
* @classdesc Represents a ListOperationsRequest.
|
|
* @implements IListOperationsRequest
|
|
* @constructor
|
|
* @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set
|
|
*/
|
|
function ListOperationsRequest(properties) {
|
|
if (properties)
|
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
if (properties[keys[i]] != null)
|
|
this[keys[i]] = properties[keys[i]];
|
|
}
|
|
|
|
/**
|
|
* ListOperationsRequest name.
|
|
* @member {string} name
|
|
* @memberof google.longrunning.ListOperationsRequest
|
|
* @instance
|
|
*/
|
|
ListOperationsRequest.prototype.name = "";
|
|
|
|
/**
|
|
* ListOperationsRequest filter.
|
|
* @member {string} filter
|
|
* @memberof google.longrunning.ListOperationsRequest
|
|
* @instance
|
|
*/
|
|
ListOperationsRequest.prototype.filter = "";
|
|
|
|
/**
|
|
* ListOperationsRequest pageSize.
|
|
* @member {number} pageSize
|
|
* @memberof google.longrunning.ListOperationsRequest
|
|
* @instance
|
|
*/
|
|
ListOperationsRequest.prototype.pageSize = 0;
|
|
|
|
/**
|
|
* ListOperationsRequest pageToken.
|
|
* @member {string} pageToken
|
|
* @memberof google.longrunning.ListOperationsRequest
|
|
* @instance
|
|
*/
|
|
ListOperationsRequest.prototype.pageToken = "";
|
|
|
|
/**
|
|
* Creates a new ListOperationsRequest instance using the specified properties.
|
|
* @function create
|
|
* @memberof google.longrunning.ListOperationsRequest
|
|
* @static
|
|
* @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set
|
|
* @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest instance
|
|
*/
|
|
ListOperationsRequest.create = function create(properties) {
|
|
return new ListOperationsRequest(properties);
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages.
|
|
* @function encode
|
|
* @memberof google.longrunning.ListOperationsRequest
|
|
* @static
|
|
* @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
ListOperationsRequest.encode = function encode(message, writer) {
|
|
if (!writer)
|
|
writer = $Writer.create();
|
|
if (message.filter != null && Object.hasOwnProperty.call(message, "filter"))
|
|
writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter);
|
|
if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize"))
|
|
writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize);
|
|
if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken"))
|
|
writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken);
|
|
if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
|
writer.uint32(/* id 4, wireType 2 =*/34).string(message.name);
|
|
return writer;
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages.
|
|
* @function encodeDelimited
|
|
* @memberof google.longrunning.ListOperationsRequest
|
|
* @static
|
|
* @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
ListOperationsRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
|
return this.encode(message, writer).ldelim();
|
|
};
|
|
|
|
/**
|
|
* Decodes a ListOperationsRequest message from the specified reader or buffer.
|
|
* @function decode
|
|
* @memberof google.longrunning.ListOperationsRequest
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @param {number} [length] Message length if known beforehand
|
|
* @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
ListOperationsRequest.decode = function decode(reader, length) {
|
|
if (!(reader instanceof $Reader))
|
|
reader = $Reader.create(reader);
|
|
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsRequest();
|
|
while (reader.pos < end) {
|
|
var tag = reader.uint32();
|
|
switch (tag >>> 3) {
|
|
case 4:
|
|
message.name = reader.string();
|
|
break;
|
|
case 1:
|
|
message.filter = reader.string();
|
|
break;
|
|
case 2:
|
|
message.pageSize = reader.int32();
|
|
break;
|
|
case 3:
|
|
message.pageToken = reader.string();
|
|
break;
|
|
default:
|
|
reader.skipType(tag & 7);
|
|
break;
|
|
}
|
|
}
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited.
|
|
* @function decodeDelimited
|
|
* @memberof google.longrunning.ListOperationsRequest
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
ListOperationsRequest.decodeDelimited = function decodeDelimited(reader) {
|
|
if (!(reader instanceof $Reader))
|
|
reader = new $Reader(reader);
|
|
return this.decode(reader, reader.uint32());
|
|
};
|
|
|
|
/**
|
|
* Verifies a ListOperationsRequest message.
|
|
* @function verify
|
|
* @memberof google.longrunning.ListOperationsRequest
|
|
* @static
|
|
* @param {Object.<string,*>} message Plain object to verify
|
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
*/
|
|
ListOperationsRequest.verify = function verify(message) {
|
|
if (typeof message !== "object" || message === null)
|
|
return "object expected";
|
|
if (message.name != null && message.hasOwnProperty("name"))
|
|
if (!$util.isString(message.name))
|
|
return "name: string expected";
|
|
if (message.filter != null && message.hasOwnProperty("filter"))
|
|
if (!$util.isString(message.filter))
|
|
return "filter: string expected";
|
|
if (message.pageSize != null && message.hasOwnProperty("pageSize"))
|
|
if (!$util.isInteger(message.pageSize))
|
|
return "pageSize: integer expected";
|
|
if (message.pageToken != null && message.hasOwnProperty("pageToken"))
|
|
if (!$util.isString(message.pageToken))
|
|
return "pageToken: string expected";
|
|
return null;
|
|
};
|
|
|
|
/**
|
|
* Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types.
|
|
* @function fromObject
|
|
* @memberof google.longrunning.ListOperationsRequest
|
|
* @static
|
|
* @param {Object.<string,*>} object Plain object
|
|
* @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest
|
|
*/
|
|
ListOperationsRequest.fromObject = function fromObject(object) {
|
|
if (object instanceof $root.google.longrunning.ListOperationsRequest)
|
|
return object;
|
|
var message = new $root.google.longrunning.ListOperationsRequest();
|
|
if (object.name != null)
|
|
message.name = String(object.name);
|
|
if (object.filter != null)
|
|
message.filter = String(object.filter);
|
|
if (object.pageSize != null)
|
|
message.pageSize = object.pageSize | 0;
|
|
if (object.pageToken != null)
|
|
message.pageToken = String(object.pageToken);
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified.
|
|
* @function toObject
|
|
* @memberof google.longrunning.ListOperationsRequest
|
|
* @static
|
|
* @param {google.longrunning.ListOperationsRequest} message ListOperationsRequest
|
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
* @returns {Object.<string,*>} Plain object
|
|
*/
|
|
ListOperationsRequest.toObject = function toObject(message, options) {
|
|
if (!options)
|
|
options = {};
|
|
var object = {};
|
|
if (options.defaults) {
|
|
object.filter = "";
|
|
object.pageSize = 0;
|
|
object.pageToken = "";
|
|
object.name = "";
|
|
}
|
|
if (message.filter != null && message.hasOwnProperty("filter"))
|
|
object.filter = message.filter;
|
|
if (message.pageSize != null && message.hasOwnProperty("pageSize"))
|
|
object.pageSize = message.pageSize;
|
|
if (message.pageToken != null && message.hasOwnProperty("pageToken"))
|
|
object.pageToken = message.pageToken;
|
|
if (message.name != null && message.hasOwnProperty("name"))
|
|
object.name = message.name;
|
|
return object;
|
|
};
|
|
|
|
/**
|
|
* Converts this ListOperationsRequest to JSON.
|
|
* @function toJSON
|
|
* @memberof google.longrunning.ListOperationsRequest
|
|
* @instance
|
|
* @returns {Object.<string,*>} JSON object
|
|
*/
|
|
ListOperationsRequest.prototype.toJSON = function toJSON() {
|
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
};
|
|
|
|
return ListOperationsRequest;
|
|
})();
|
|
|
|
longrunning.ListOperationsResponse = (function() {
|
|
|
|
/**
|
|
* Properties of a ListOperationsResponse.
|
|
* @memberof google.longrunning
|
|
* @interface IListOperationsResponse
|
|
* @property {Array.<google.longrunning.IOperation>|null} [operations] ListOperationsResponse operations
|
|
* @property {string|null} [nextPageToken] ListOperationsResponse nextPageToken
|
|
*/
|
|
|
|
/**
|
|
* Constructs a new ListOperationsResponse.
|
|
* @memberof google.longrunning
|
|
* @classdesc Represents a ListOperationsResponse.
|
|
* @implements IListOperationsResponse
|
|
* @constructor
|
|
* @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set
|
|
*/
|
|
function ListOperationsResponse(properties) {
|
|
this.operations = [];
|
|
if (properties)
|
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
if (properties[keys[i]] != null)
|
|
this[keys[i]] = properties[keys[i]];
|
|
}
|
|
|
|
/**
|
|
* ListOperationsResponse operations.
|
|
* @member {Array.<google.longrunning.IOperation>} operations
|
|
* @memberof google.longrunning.ListOperationsResponse
|
|
* @instance
|
|
*/
|
|
ListOperationsResponse.prototype.operations = $util.emptyArray;
|
|
|
|
/**
|
|
* ListOperationsResponse nextPageToken.
|
|
* @member {string} nextPageToken
|
|
* @memberof google.longrunning.ListOperationsResponse
|
|
* @instance
|
|
*/
|
|
ListOperationsResponse.prototype.nextPageToken = "";
|
|
|
|
/**
|
|
* Creates a new ListOperationsResponse instance using the specified properties.
|
|
* @function create
|
|
* @memberof google.longrunning.ListOperationsResponse
|
|
* @static
|
|
* @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set
|
|
* @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse instance
|
|
*/
|
|
ListOperationsResponse.create = function create(properties) {
|
|
return new ListOperationsResponse(properties);
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages.
|
|
* @function encode
|
|
* @memberof google.longrunning.ListOperationsResponse
|
|
* @static
|
|
* @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
ListOperationsResponse.encode = function encode(message, writer) {
|
|
if (!writer)
|
|
writer = $Writer.create();
|
|
if (message.operations != null && message.operations.length)
|
|
for (var i = 0; i < message.operations.length; ++i)
|
|
$root.google.longrunning.Operation.encode(message.operations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken"))
|
|
writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken);
|
|
return writer;
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages.
|
|
* @function encodeDelimited
|
|
* @memberof google.longrunning.ListOperationsResponse
|
|
* @static
|
|
* @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) {
|
|
return this.encode(message, writer).ldelim();
|
|
};
|
|
|
|
/**
|
|
* Decodes a ListOperationsResponse message from the specified reader or buffer.
|
|
* @function decode
|
|
* @memberof google.longrunning.ListOperationsResponse
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @param {number} [length] Message length if known beforehand
|
|
* @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
ListOperationsResponse.decode = function decode(reader, length) {
|
|
if (!(reader instanceof $Reader))
|
|
reader = $Reader.create(reader);
|
|
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsResponse();
|
|
while (reader.pos < end) {
|
|
var tag = reader.uint32();
|
|
switch (tag >>> 3) {
|
|
case 1:
|
|
if (!(message.operations && message.operations.length))
|
|
message.operations = [];
|
|
message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32()));
|
|
break;
|
|
case 2:
|
|
message.nextPageToken = reader.string();
|
|
break;
|
|
default:
|
|
reader.skipType(tag & 7);
|
|
break;
|
|
}
|
|
}
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited.
|
|
* @function decodeDelimited
|
|
* @memberof google.longrunning.ListOperationsResponse
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
ListOperationsResponse.decodeDelimited = function decodeDelimited(reader) {
|
|
if (!(reader instanceof $Reader))
|
|
reader = new $Reader(reader);
|
|
return this.decode(reader, reader.uint32());
|
|
};
|
|
|
|
/**
|
|
* Verifies a ListOperationsResponse message.
|
|
* @function verify
|
|
* @memberof google.longrunning.ListOperationsResponse
|
|
* @static
|
|
* @param {Object.<string,*>} message Plain object to verify
|
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
*/
|
|
ListOperationsResponse.verify = function verify(message) {
|
|
if (typeof message !== "object" || message === null)
|
|
return "object expected";
|
|
if (message.operations != null && message.hasOwnProperty("operations")) {
|
|
if (!Array.isArray(message.operations))
|
|
return "operations: array expected";
|
|
for (var i = 0; i < message.operations.length; ++i) {
|
|
var error = $root.google.longrunning.Operation.verify(message.operations[i]);
|
|
if (error)
|
|
return "operations." + error;
|
|
}
|
|
}
|
|
if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
|
|
if (!$util.isString(message.nextPageToken))
|
|
return "nextPageToken: string expected";
|
|
return null;
|
|
};
|
|
|
|
/**
|
|
* Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types.
|
|
* @function fromObject
|
|
* @memberof google.longrunning.ListOperationsResponse
|
|
* @static
|
|
* @param {Object.<string,*>} object Plain object
|
|
* @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse
|
|
*/
|
|
ListOperationsResponse.fromObject = function fromObject(object) {
|
|
if (object instanceof $root.google.longrunning.ListOperationsResponse)
|
|
return object;
|
|
var message = new $root.google.longrunning.ListOperationsResponse();
|
|
if (object.operations) {
|
|
if (!Array.isArray(object.operations))
|
|
throw TypeError(".google.longrunning.ListOperationsResponse.operations: array expected");
|
|
message.operations = [];
|
|
for (var i = 0; i < object.operations.length; ++i) {
|
|
if (typeof object.operations[i] !== "object")
|
|
throw TypeError(".google.longrunning.ListOperationsResponse.operations: object expected");
|
|
message.operations[i] = $root.google.longrunning.Operation.fromObject(object.operations[i]);
|
|
}
|
|
}
|
|
if (object.nextPageToken != null)
|
|
message.nextPageToken = String(object.nextPageToken);
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified.
|
|
* @function toObject
|
|
* @memberof google.longrunning.ListOperationsResponse
|
|
* @static
|
|
* @param {google.longrunning.ListOperationsResponse} message ListOperationsResponse
|
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
* @returns {Object.<string,*>} Plain object
|
|
*/
|
|
ListOperationsResponse.toObject = function toObject(message, options) {
|
|
if (!options)
|
|
options = {};
|
|
var object = {};
|
|
if (options.arrays || options.defaults)
|
|
object.operations = [];
|
|
if (options.defaults)
|
|
object.nextPageToken = "";
|
|
if (message.operations && message.operations.length) {
|
|
object.operations = [];
|
|
for (var j = 0; j < message.operations.length; ++j)
|
|
object.operations[j] = $root.google.longrunning.Operation.toObject(message.operations[j], options);
|
|
}
|
|
if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
|
|
object.nextPageToken = message.nextPageToken;
|
|
return object;
|
|
};
|
|
|
|
/**
|
|
* Converts this ListOperationsResponse to JSON.
|
|
* @function toJSON
|
|
* @memberof google.longrunning.ListOperationsResponse
|
|
* @instance
|
|
* @returns {Object.<string,*>} JSON object
|
|
*/
|
|
ListOperationsResponse.prototype.toJSON = function toJSON() {
|
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
};
|
|
|
|
return ListOperationsResponse;
|
|
})();
|
|
|
|
longrunning.CancelOperationRequest = (function() {
|
|
|
|
/**
|
|
* Properties of a CancelOperationRequest.
|
|
* @memberof google.longrunning
|
|
* @interface ICancelOperationRequest
|
|
* @property {string|null} [name] CancelOperationRequest name
|
|
*/
|
|
|
|
/**
|
|
* Constructs a new CancelOperationRequest.
|
|
* @memberof google.longrunning
|
|
* @classdesc Represents a CancelOperationRequest.
|
|
* @implements ICancelOperationRequest
|
|
* @constructor
|
|
* @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set
|
|
*/
|
|
function CancelOperationRequest(properties) {
|
|
if (properties)
|
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
if (properties[keys[i]] != null)
|
|
this[keys[i]] = properties[keys[i]];
|
|
}
|
|
|
|
/**
|
|
* CancelOperationRequest name.
|
|
* @member {string} name
|
|
* @memberof google.longrunning.CancelOperationRequest
|
|
* @instance
|
|
*/
|
|
CancelOperationRequest.prototype.name = "";
|
|
|
|
/**
|
|
* Creates a new CancelOperationRequest instance using the specified properties.
|
|
* @function create
|
|
* @memberof google.longrunning.CancelOperationRequest
|
|
* @static
|
|
* @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set
|
|
* @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest instance
|
|
*/
|
|
CancelOperationRequest.create = function create(properties) {
|
|
return new CancelOperationRequest(properties);
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages.
|
|
* @function encode
|
|
* @memberof google.longrunning.CancelOperationRequest
|
|
* @static
|
|
* @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
CancelOperationRequest.encode = function encode(message, writer) {
|
|
if (!writer)
|
|
writer = $Writer.create();
|
|
if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
|
writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
|
return writer;
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages.
|
|
* @function encodeDelimited
|
|
* @memberof google.longrunning.CancelOperationRequest
|
|
* @static
|
|
* @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
|
return this.encode(message, writer).ldelim();
|
|
};
|
|
|
|
/**
|
|
* Decodes a CancelOperationRequest message from the specified reader or buffer.
|
|
* @function decode
|
|
* @memberof google.longrunning.CancelOperationRequest
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @param {number} [length] Message length if known beforehand
|
|
* @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
CancelOperationRequest.decode = function decode(reader, length) {
|
|
if (!(reader instanceof $Reader))
|
|
reader = $Reader.create(reader);
|
|
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.CancelOperationRequest();
|
|
while (reader.pos < end) {
|
|
var tag = reader.uint32();
|
|
switch (tag >>> 3) {
|
|
case 1:
|
|
message.name = reader.string();
|
|
break;
|
|
default:
|
|
reader.skipType(tag & 7);
|
|
break;
|
|
}
|
|
}
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited.
|
|
* @function decodeDelimited
|
|
* @memberof google.longrunning.CancelOperationRequest
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
CancelOperationRequest.decodeDelimited = function decodeDelimited(reader) {
|
|
if (!(reader instanceof $Reader))
|
|
reader = new $Reader(reader);
|
|
return this.decode(reader, reader.uint32());
|
|
};
|
|
|
|
/**
|
|
* Verifies a CancelOperationRequest message.
|
|
* @function verify
|
|
* @memberof google.longrunning.CancelOperationRequest
|
|
* @static
|
|
* @param {Object.<string,*>} message Plain object to verify
|
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
*/
|
|
CancelOperationRequest.verify = function verify(message) {
|
|
if (typeof message !== "object" || message === null)
|
|
return "object expected";
|
|
if (message.name != null && message.hasOwnProperty("name"))
|
|
if (!$util.isString(message.name))
|
|
return "name: string expected";
|
|
return null;
|
|
};
|
|
|
|
/**
|
|
* Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types.
|
|
* @function fromObject
|
|
* @memberof google.longrunning.CancelOperationRequest
|
|
* @static
|
|
* @param {Object.<string,*>} object Plain object
|
|
* @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest
|
|
*/
|
|
CancelOperationRequest.fromObject = function fromObject(object) {
|
|
if (object instanceof $root.google.longrunning.CancelOperationRequest)
|
|
return object;
|
|
var message = new $root.google.longrunning.CancelOperationRequest();
|
|
if (object.name != null)
|
|
message.name = String(object.name);
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified.
|
|
* @function toObject
|
|
* @memberof google.longrunning.CancelOperationRequest
|
|
* @static
|
|
* @param {google.longrunning.CancelOperationRequest} message CancelOperationRequest
|
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
* @returns {Object.<string,*>} Plain object
|
|
*/
|
|
CancelOperationRequest.toObject = function toObject(message, options) {
|
|
if (!options)
|
|
options = {};
|
|
var object = {};
|
|
if (options.defaults)
|
|
object.name = "";
|
|
if (message.name != null && message.hasOwnProperty("name"))
|
|
object.name = message.name;
|
|
return object;
|
|
};
|
|
|
|
/**
|
|
* Converts this CancelOperationRequest to JSON.
|
|
* @function toJSON
|
|
* @memberof google.longrunning.CancelOperationRequest
|
|
* @instance
|
|
* @returns {Object.<string,*>} JSON object
|
|
*/
|
|
CancelOperationRequest.prototype.toJSON = function toJSON() {
|
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
};
|
|
|
|
return CancelOperationRequest;
|
|
})();
|
|
|
|
longrunning.DeleteOperationRequest = (function() {
|
|
|
|
/**
|
|
* Properties of a DeleteOperationRequest.
|
|
* @memberof google.longrunning
|
|
* @interface IDeleteOperationRequest
|
|
* @property {string|null} [name] DeleteOperationRequest name
|
|
*/
|
|
|
|
/**
|
|
* Constructs a new DeleteOperationRequest.
|
|
* @memberof google.longrunning
|
|
* @classdesc Represents a DeleteOperationRequest.
|
|
* @implements IDeleteOperationRequest
|
|
* @constructor
|
|
* @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set
|
|
*/
|
|
function DeleteOperationRequest(properties) {
|
|
if (properties)
|
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
if (properties[keys[i]] != null)
|
|
this[keys[i]] = properties[keys[i]];
|
|
}
|
|
|
|
/**
|
|
* DeleteOperationRequest name.
|
|
* @member {string} name
|
|
* @memberof google.longrunning.DeleteOperationRequest
|
|
* @instance
|
|
*/
|
|
DeleteOperationRequest.prototype.name = "";
|
|
|
|
/**
|
|
* Creates a new DeleteOperationRequest instance using the specified properties.
|
|
* @function create
|
|
* @memberof google.longrunning.DeleteOperationRequest
|
|
* @static
|
|
* @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set
|
|
* @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest instance
|
|
*/
|
|
DeleteOperationRequest.create = function create(properties) {
|
|
return new DeleteOperationRequest(properties);
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages.
|
|
* @function encode
|
|
* @memberof google.longrunning.DeleteOperationRequest
|
|
* @static
|
|
* @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
DeleteOperationRequest.encode = function encode(message, writer) {
|
|
if (!writer)
|
|
writer = $Writer.create();
|
|
if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
|
writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
|
return writer;
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages.
|
|
* @function encodeDelimited
|
|
* @memberof google.longrunning.DeleteOperationRequest
|
|
* @static
|
|
* @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
DeleteOperationRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
|
return this.encode(message, writer).ldelim();
|
|
};
|
|
|
|
/**
|
|
* Decodes a DeleteOperationRequest message from the specified reader or buffer.
|
|
* @function decode
|
|
* @memberof google.longrunning.DeleteOperationRequest
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @param {number} [length] Message length if known beforehand
|
|
* @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
DeleteOperationRequest.decode = function decode(reader, length) {
|
|
if (!(reader instanceof $Reader))
|
|
reader = $Reader.create(reader);
|
|
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.DeleteOperationRequest();
|
|
while (reader.pos < end) {
|
|
var tag = reader.uint32();
|
|
switch (tag >>> 3) {
|
|
case 1:
|
|
message.name = reader.string();
|
|
break;
|
|
default:
|
|
reader.skipType(tag & 7);
|
|
break;
|
|
}
|
|
}
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited.
|
|
* @function decodeDelimited
|
|
* @memberof google.longrunning.DeleteOperationRequest
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
DeleteOperationRequest.decodeDelimited = function decodeDelimited(reader) {
|
|
if (!(reader instanceof $Reader))
|
|
reader = new $Reader(reader);
|
|
return this.decode(reader, reader.uint32());
|
|
};
|
|
|
|
/**
|
|
* Verifies a DeleteOperationRequest message.
|
|
* @function verify
|
|
* @memberof google.longrunning.DeleteOperationRequest
|
|
* @static
|
|
* @param {Object.<string,*>} message Plain object to verify
|
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
*/
|
|
DeleteOperationRequest.verify = function verify(message) {
|
|
if (typeof message !== "object" || message === null)
|
|
return "object expected";
|
|
if (message.name != null && message.hasOwnProperty("name"))
|
|
if (!$util.isString(message.name))
|
|
return "name: string expected";
|
|
return null;
|
|
};
|
|
|
|
/**
|
|
* Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types.
|
|
* @function fromObject
|
|
* @memberof google.longrunning.DeleteOperationRequest
|
|
* @static
|
|
* @param {Object.<string,*>} object Plain object
|
|
* @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest
|
|
*/
|
|
DeleteOperationRequest.fromObject = function fromObject(object) {
|
|
if (object instanceof $root.google.longrunning.DeleteOperationRequest)
|
|
return object;
|
|
var message = new $root.google.longrunning.DeleteOperationRequest();
|
|
if (object.name != null)
|
|
message.name = String(object.name);
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified.
|
|
* @function toObject
|
|
* @memberof google.longrunning.DeleteOperationRequest
|
|
* @static
|
|
* @param {google.longrunning.DeleteOperationRequest} message DeleteOperationRequest
|
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
* @returns {Object.<string,*>} Plain object
|
|
*/
|
|
DeleteOperationRequest.toObject = function toObject(message, options) {
|
|
if (!options)
|
|
options = {};
|
|
var object = {};
|
|
if (options.defaults)
|
|
object.name = "";
|
|
if (message.name != null && message.hasOwnProperty("name"))
|
|
object.name = message.name;
|
|
return object;
|
|
};
|
|
|
|
/**
|
|
* Converts this DeleteOperationRequest to JSON.
|
|
* @function toJSON
|
|
* @memberof google.longrunning.DeleteOperationRequest
|
|
* @instance
|
|
* @returns {Object.<string,*>} JSON object
|
|
*/
|
|
DeleteOperationRequest.prototype.toJSON = function toJSON() {
|
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
};
|
|
|
|
return DeleteOperationRequest;
|
|
})();
|
|
|
|
longrunning.WaitOperationRequest = (function() {
|
|
|
|
/**
|
|
* Properties of a WaitOperationRequest.
|
|
* @memberof google.longrunning
|
|
* @interface IWaitOperationRequest
|
|
* @property {string|null} [name] WaitOperationRequest name
|
|
* @property {google.protobuf.IDuration|null} [timeout] WaitOperationRequest timeout
|
|
*/
|
|
|
|
/**
|
|
* Constructs a new WaitOperationRequest.
|
|
* @memberof google.longrunning
|
|
* @classdesc Represents a WaitOperationRequest.
|
|
* @implements IWaitOperationRequest
|
|
* @constructor
|
|
* @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set
|
|
*/
|
|
function WaitOperationRequest(properties) {
|
|
if (properties)
|
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
if (properties[keys[i]] != null)
|
|
this[keys[i]] = properties[keys[i]];
|
|
}
|
|
|
|
/**
|
|
* WaitOperationRequest name.
|
|
* @member {string} name
|
|
* @memberof google.longrunning.WaitOperationRequest
|
|
* @instance
|
|
*/
|
|
WaitOperationRequest.prototype.name = "";
|
|
|
|
/**
|
|
* WaitOperationRequest timeout.
|
|
* @member {google.protobuf.IDuration|null|undefined} timeout
|
|
* @memberof google.longrunning.WaitOperationRequest
|
|
* @instance
|
|
*/
|
|
WaitOperationRequest.prototype.timeout = null;
|
|
|
|
/**
|
|
* Creates a new WaitOperationRequest instance using the specified properties.
|
|
* @function create
|
|
* @memberof google.longrunning.WaitOperationRequest
|
|
* @static
|
|
* @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set
|
|
* @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest instance
|
|
*/
|
|
WaitOperationRequest.create = function create(properties) {
|
|
return new WaitOperationRequest(properties);
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages.
|
|
* @function encode
|
|
* @memberof google.longrunning.WaitOperationRequest
|
|
* @static
|
|
* @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
WaitOperationRequest.encode = function encode(message, writer) {
|
|
if (!writer)
|
|
writer = $Writer.create();
|
|
if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
|
writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
|
if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout"))
|
|
$root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
return writer;
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages.
|
|
* @function encodeDelimited
|
|
* @memberof google.longrunning.WaitOperationRequest
|
|
* @static
|
|
* @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
WaitOperationRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
|
return this.encode(message, writer).ldelim();
|
|
};
|
|
|
|
/**
|
|
* Decodes a WaitOperationRequest message from the specified reader or buffer.
|
|
* @function decode
|
|
* @memberof google.longrunning.WaitOperationRequest
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @param {number} [length] Message length if known beforehand
|
|
* @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
WaitOperationRequest.decode = function decode(reader, length) {
|
|
if (!(reader instanceof $Reader))
|
|
reader = $Reader.create(reader);
|
|
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.WaitOperationRequest();
|
|
while (reader.pos < end) {
|
|
var tag = reader.uint32();
|
|
switch (tag >>> 3) {
|
|
case 1:
|
|
message.name = reader.string();
|
|
break;
|
|
case 2:
|
|
message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32());
|
|
break;
|
|
default:
|
|
reader.skipType(tag & 7);
|
|
break;
|
|
}
|
|
}
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited.
|
|
* @function decodeDelimited
|
|
* @memberof google.longrunning.WaitOperationRequest
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
WaitOperationRequest.decodeDelimited = function decodeDelimited(reader) {
|
|
if (!(reader instanceof $Reader))
|
|
reader = new $Reader(reader);
|
|
return this.decode(reader, reader.uint32());
|
|
};
|
|
|
|
/**
|
|
* Verifies a WaitOperationRequest message.
|
|
* @function verify
|
|
* @memberof google.longrunning.WaitOperationRequest
|
|
* @static
|
|
* @param {Object.<string,*>} message Plain object to verify
|
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
*/
|
|
WaitOperationRequest.verify = function verify(message) {
|
|
if (typeof message !== "object" || message === null)
|
|
return "object expected";
|
|
if (message.name != null && message.hasOwnProperty("name"))
|
|
if (!$util.isString(message.name))
|
|
return "name: string expected";
|
|
if (message.timeout != null && message.hasOwnProperty("timeout")) {
|
|
var error = $root.google.protobuf.Duration.verify(message.timeout);
|
|
if (error)
|
|
return "timeout." + error;
|
|
}
|
|
return null;
|
|
};
|
|
|
|
/**
|
|
* Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types.
|
|
* @function fromObject
|
|
* @memberof google.longrunning.WaitOperationRequest
|
|
* @static
|
|
* @param {Object.<string,*>} object Plain object
|
|
* @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest
|
|
*/
|
|
WaitOperationRequest.fromObject = function fromObject(object) {
|
|
if (object instanceof $root.google.longrunning.WaitOperationRequest)
|
|
return object;
|
|
var message = new $root.google.longrunning.WaitOperationRequest();
|
|
if (object.name != null)
|
|
message.name = String(object.name);
|
|
if (object.timeout != null) {
|
|
if (typeof object.timeout !== "object")
|
|
throw TypeError(".google.longrunning.WaitOperationRequest.timeout: object expected");
|
|
message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout);
|
|
}
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified.
|
|
* @function toObject
|
|
* @memberof google.longrunning.WaitOperationRequest
|
|
* @static
|
|
* @param {google.longrunning.WaitOperationRequest} message WaitOperationRequest
|
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
* @returns {Object.<string,*>} Plain object
|
|
*/
|
|
WaitOperationRequest.toObject = function toObject(message, options) {
|
|
if (!options)
|
|
options = {};
|
|
var object = {};
|
|
if (options.defaults) {
|
|
object.name = "";
|
|
object.timeout = null;
|
|
}
|
|
if (message.name != null && message.hasOwnProperty("name"))
|
|
object.name = message.name;
|
|
if (message.timeout != null && message.hasOwnProperty("timeout"))
|
|
object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options);
|
|
return object;
|
|
};
|
|
|
|
/**
|
|
* Converts this WaitOperationRequest to JSON.
|
|
* @function toJSON
|
|
* @memberof google.longrunning.WaitOperationRequest
|
|
* @instance
|
|
* @returns {Object.<string,*>} JSON object
|
|
*/
|
|
WaitOperationRequest.prototype.toJSON = function toJSON() {
|
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
};
|
|
|
|
return WaitOperationRequest;
|
|
})();
|
|
|
|
longrunning.OperationInfo = (function() {
|
|
|
|
/**
|
|
* Properties of an OperationInfo.
|
|
* @memberof google.longrunning
|
|
* @interface IOperationInfo
|
|
* @property {string|null} [responseType] OperationInfo responseType
|
|
* @property {string|null} [metadataType] OperationInfo metadataType
|
|
*/
|
|
|
|
/**
|
|
* Constructs a new OperationInfo.
|
|
* @memberof google.longrunning
|
|
* @classdesc Represents an OperationInfo.
|
|
* @implements IOperationInfo
|
|
* @constructor
|
|
* @param {google.longrunning.IOperationInfo=} [properties] Properties to set
|
|
*/
|
|
function OperationInfo(properties) {
|
|
if (properties)
|
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
if (properties[keys[i]] != null)
|
|
this[keys[i]] = properties[keys[i]];
|
|
}
|
|
|
|
/**
|
|
* OperationInfo responseType.
|
|
* @member {string} responseType
|
|
* @memberof google.longrunning.OperationInfo
|
|
* @instance
|
|
*/
|
|
OperationInfo.prototype.responseType = "";
|
|
|
|
/**
|
|
* OperationInfo metadataType.
|
|
* @member {string} metadataType
|
|
* @memberof google.longrunning.OperationInfo
|
|
* @instance
|
|
*/
|
|
OperationInfo.prototype.metadataType = "";
|
|
|
|
/**
|
|
* Creates a new OperationInfo instance using the specified properties.
|
|
* @function create
|
|
* @memberof google.longrunning.OperationInfo
|
|
* @static
|
|
* @param {google.longrunning.IOperationInfo=} [properties] Properties to set
|
|
* @returns {google.longrunning.OperationInfo} OperationInfo instance
|
|
*/
|
|
OperationInfo.create = function create(properties) {
|
|
return new OperationInfo(properties);
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages.
|
|
* @function encode
|
|
* @memberof google.longrunning.OperationInfo
|
|
* @static
|
|
* @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
OperationInfo.encode = function encode(message, writer) {
|
|
if (!writer)
|
|
writer = $Writer.create();
|
|
if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType"))
|
|
writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseType);
|
|
if (message.metadataType != null && Object.hasOwnProperty.call(message, "metadataType"))
|
|
writer.uint32(/* id 2, wireType 2 =*/18).string(message.metadataType);
|
|
return writer;
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages.
|
|
* @function encodeDelimited
|
|
* @memberof google.longrunning.OperationInfo
|
|
* @static
|
|
* @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
OperationInfo.encodeDelimited = function encodeDelimited(message, writer) {
|
|
return this.encode(message, writer).ldelim();
|
|
};
|
|
|
|
/**
|
|
* Decodes an OperationInfo message from the specified reader or buffer.
|
|
* @function decode
|
|
* @memberof google.longrunning.OperationInfo
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @param {number} [length] Message length if known beforehand
|
|
* @returns {google.longrunning.OperationInfo} OperationInfo
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
OperationInfo.decode = function decode(reader, length) {
|
|
if (!(reader instanceof $Reader))
|
|
reader = $Reader.create(reader);
|
|
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.OperationInfo();
|
|
while (reader.pos < end) {
|
|
var tag = reader.uint32();
|
|
switch (tag >>> 3) {
|
|
case 1:
|
|
message.responseType = reader.string();
|
|
break;
|
|
case 2:
|
|
message.metadataType = reader.string();
|
|
break;
|
|
default:
|
|
reader.skipType(tag & 7);
|
|
break;
|
|
}
|
|
}
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Decodes an OperationInfo message from the specified reader or buffer, length delimited.
|
|
* @function decodeDelimited
|
|
* @memberof google.longrunning.OperationInfo
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @returns {google.longrunning.OperationInfo} OperationInfo
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
OperationInfo.decodeDelimited = function decodeDelimited(reader) {
|
|
if (!(reader instanceof $Reader))
|
|
reader = new $Reader(reader);
|
|
return this.decode(reader, reader.uint32());
|
|
};
|
|
|
|
/**
|
|
* Verifies an OperationInfo message.
|
|
* @function verify
|
|
* @memberof google.longrunning.OperationInfo
|
|
* @static
|
|
* @param {Object.<string,*>} message Plain object to verify
|
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
*/
|
|
OperationInfo.verify = function verify(message) {
|
|
if (typeof message !== "object" || message === null)
|
|
return "object expected";
|
|
if (message.responseType != null && message.hasOwnProperty("responseType"))
|
|
if (!$util.isString(message.responseType))
|
|
return "responseType: string expected";
|
|
if (message.metadataType != null && message.hasOwnProperty("metadataType"))
|
|
if (!$util.isString(message.metadataType))
|
|
return "metadataType: string expected";
|
|
return null;
|
|
};
|
|
|
|
/**
|
|
* Creates an OperationInfo message from a plain object. Also converts values to their respective internal types.
|
|
* @function fromObject
|
|
* @memberof google.longrunning.OperationInfo
|
|
* @static
|
|
* @param {Object.<string,*>} object Plain object
|
|
* @returns {google.longrunning.OperationInfo} OperationInfo
|
|
*/
|
|
OperationInfo.fromObject = function fromObject(object) {
|
|
if (object instanceof $root.google.longrunning.OperationInfo)
|
|
return object;
|
|
var message = new $root.google.longrunning.OperationInfo();
|
|
if (object.responseType != null)
|
|
message.responseType = String(object.responseType);
|
|
if (object.metadataType != null)
|
|
message.metadataType = String(object.metadataType);
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Creates a plain object from an OperationInfo message. Also converts values to other types if specified.
|
|
* @function toObject
|
|
* @memberof google.longrunning.OperationInfo
|
|
* @static
|
|
* @param {google.longrunning.OperationInfo} message OperationInfo
|
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
* @returns {Object.<string,*>} Plain object
|
|
*/
|
|
OperationInfo.toObject = function toObject(message, options) {
|
|
if (!options)
|
|
options = {};
|
|
var object = {};
|
|
if (options.defaults) {
|
|
object.responseType = "";
|
|
object.metadataType = "";
|
|
}
|
|
if (message.responseType != null && message.hasOwnProperty("responseType"))
|
|
object.responseType = message.responseType;
|
|
if (message.metadataType != null && message.hasOwnProperty("metadataType"))
|
|
object.metadataType = message.metadataType;
|
|
return object;
|
|
};
|
|
|
|
/**
|
|
* Converts this OperationInfo to JSON.
|
|
* @function toJSON
|
|
* @memberof google.longrunning.OperationInfo
|
|
* @instance
|
|
* @returns {Object.<string,*>} JSON object
|
|
*/
|
|
OperationInfo.prototype.toJSON = function toJSON() {
|
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
};
|
|
|
|
return OperationInfo;
|
|
})();
|
|
|
|
return longrunning;
|
|
})();
|
|
|
|
google.api = (function() {
|
|
|
|
/**
|
|
* Namespace api.
|
|
* @memberof google
|
|
* @namespace
|
|
*/
|
|
var api = {};
|
|
|
|
api.Http = (function() {
|
|
|
|
/**
|
|
* Properties of a Http.
|
|
* @memberof google.api
|
|
* @interface IHttp
|
|
* @property {Array.<google.api.IHttpRule>|null} [rules] Http rules
|
|
* @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion
|
|
*/
|
|
|
|
/**
|
|
* Constructs a new Http.
|
|
* @memberof google.api
|
|
* @classdesc Represents a Http.
|
|
* @implements IHttp
|
|
* @constructor
|
|
* @param {google.api.IHttp=} [properties] Properties to set
|
|
*/
|
|
function Http(properties) {
|
|
this.rules = [];
|
|
if (properties)
|
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
if (properties[keys[i]] != null)
|
|
this[keys[i]] = properties[keys[i]];
|
|
}
|
|
|
|
/**
|
|
* Http rules.
|
|
* @member {Array.<google.api.IHttpRule>} rules
|
|
* @memberof google.api.Http
|
|
* @instance
|
|
*/
|
|
Http.prototype.rules = $util.emptyArray;
|
|
|
|
/**
|
|
* Http fullyDecodeReservedExpansion.
|
|
* @member {boolean} fullyDecodeReservedExpansion
|
|
* @memberof google.api.Http
|
|
* @instance
|
|
*/
|
|
Http.prototype.fullyDecodeReservedExpansion = false;
|
|
|
|
/**
|
|
* Creates a new Http instance using the specified properties.
|
|
* @function create
|
|
* @memberof google.api.Http
|
|
* @static
|
|
* @param {google.api.IHttp=} [properties] Properties to set
|
|
* @returns {google.api.Http} Http instance
|
|
*/
|
|
Http.create = function create(properties) {
|
|
return new Http(properties);
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages.
|
|
* @function encode
|
|
* @memberof google.api.Http
|
|
* @static
|
|
* @param {google.api.IHttp} message Http message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
Http.encode = function encode(message, writer) {
|
|
if (!writer)
|
|
writer = $Writer.create();
|
|
if (message.rules != null && message.rules.length)
|
|
for (var i = 0; i < message.rules.length; ++i)
|
|
$root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion"))
|
|
writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion);
|
|
return writer;
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages.
|
|
* @function encodeDelimited
|
|
* @memberof google.api.Http
|
|
* @static
|
|
* @param {google.api.IHttp} message Http message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
Http.encodeDelimited = function encodeDelimited(message, writer) {
|
|
return this.encode(message, writer).ldelim();
|
|
};
|
|
|
|
/**
|
|
* Decodes a Http message from the specified reader or buffer.
|
|
* @function decode
|
|
* @memberof google.api.Http
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @param {number} [length] Message length if known beforehand
|
|
* @returns {google.api.Http} Http
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
Http.decode = function decode(reader, length) {
|
|
if (!(reader instanceof $Reader))
|
|
reader = $Reader.create(reader);
|
|
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http();
|
|
while (reader.pos < end) {
|
|
var tag = reader.uint32();
|
|
switch (tag >>> 3) {
|
|
case 1:
|
|
if (!(message.rules && message.rules.length))
|
|
message.rules = [];
|
|
message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32()));
|
|
break;
|
|
case 2:
|
|
message.fullyDecodeReservedExpansion = reader.bool();
|
|
break;
|
|
default:
|
|
reader.skipType(tag & 7);
|
|
break;
|
|
}
|
|
}
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Decodes a Http message from the specified reader or buffer, length delimited.
|
|
* @function decodeDelimited
|
|
* @memberof google.api.Http
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @returns {google.api.Http} Http
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
Http.decodeDelimited = function decodeDelimited(reader) {
|
|
if (!(reader instanceof $Reader))
|
|
reader = new $Reader(reader);
|
|
return this.decode(reader, reader.uint32());
|
|
};
|
|
|
|
/**
|
|
* Verifies a Http message.
|
|
* @function verify
|
|
* @memberof google.api.Http
|
|
* @static
|
|
* @param {Object.<string,*>} message Plain object to verify
|
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
*/
|
|
Http.verify = function verify(message) {
|
|
if (typeof message !== "object" || message === null)
|
|
return "object expected";
|
|
if (message.rules != null && message.hasOwnProperty("rules")) {
|
|
if (!Array.isArray(message.rules))
|
|
return "rules: array expected";
|
|
for (var i = 0; i < message.rules.length; ++i) {
|
|
var error = $root.google.api.HttpRule.verify(message.rules[i]);
|
|
if (error)
|
|
return "rules." + error;
|
|
}
|
|
}
|
|
if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion"))
|
|
if (typeof message.fullyDecodeReservedExpansion !== "boolean")
|
|
return "fullyDecodeReservedExpansion: boolean expected";
|
|
return null;
|
|
};
|
|
|
|
/**
|
|
* Creates a Http message from a plain object. Also converts values to their respective internal types.
|
|
* @function fromObject
|
|
* @memberof google.api.Http
|
|
* @static
|
|
* @param {Object.<string,*>} object Plain object
|
|
* @returns {google.api.Http} Http
|
|
*/
|
|
Http.fromObject = function fromObject(object) {
|
|
if (object instanceof $root.google.api.Http)
|
|
return object;
|
|
var message = new $root.google.api.Http();
|
|
if (object.rules) {
|
|
if (!Array.isArray(object.rules))
|
|
throw TypeError(".google.api.Http.rules: array expected");
|
|
message.rules = [];
|
|
for (var i = 0; i < object.rules.length; ++i) {
|
|
if (typeof object.rules[i] !== "object")
|
|
throw TypeError(".google.api.Http.rules: object expected");
|
|
message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]);
|
|
}
|
|
}
|
|
if (object.fullyDecodeReservedExpansion != null)
|
|
message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion);
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Creates a plain object from a Http message. Also converts values to other types if specified.
|
|
* @function toObject
|
|
* @memberof google.api.Http
|
|
* @static
|
|
* @param {google.api.Http} message Http
|
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
* @returns {Object.<string,*>} Plain object
|
|
*/
|
|
Http.toObject = function toObject(message, options) {
|
|
if (!options)
|
|
options = {};
|
|
var object = {};
|
|
if (options.arrays || options.defaults)
|
|
object.rules = [];
|
|
if (options.defaults)
|
|
object.fullyDecodeReservedExpansion = false;
|
|
if (message.rules && message.rules.length) {
|
|
object.rules = [];
|
|
for (var j = 0; j < message.rules.length; ++j)
|
|
object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options);
|
|
}
|
|
if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion"))
|
|
object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion;
|
|
return object;
|
|
};
|
|
|
|
/**
|
|
* Converts this Http to JSON.
|
|
* @function toJSON
|
|
* @memberof google.api.Http
|
|
* @instance
|
|
* @returns {Object.<string,*>} JSON object
|
|
*/
|
|
Http.prototype.toJSON = function toJSON() {
|
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
};
|
|
|
|
return Http;
|
|
})();
|
|
|
|
api.HttpRule = (function() {
|
|
|
|
/**
|
|
* Properties of a HttpRule.
|
|
* @memberof google.api
|
|
* @interface IHttpRule
|
|
* @property {string|null} [selector] HttpRule selector
|
|
* @property {string|null} [get] HttpRule get
|
|
* @property {string|null} [put] HttpRule put
|
|
* @property {string|null} [post] HttpRule post
|
|
* @property {string|null} ["delete"] HttpRule delete
|
|
* @property {string|null} [patch] HttpRule patch
|
|
* @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom
|
|
* @property {string|null} [body] HttpRule body
|
|
* @property {string|null} [responseBody] HttpRule responseBody
|
|
* @property {Array.<google.api.IHttpRule>|null} [additionalBindings] HttpRule additionalBindings
|
|
*/
|
|
|
|
/**
|
|
* Constructs a new HttpRule.
|
|
* @memberof google.api
|
|
* @classdesc Represents a HttpRule.
|
|
* @implements IHttpRule
|
|
* @constructor
|
|
* @param {google.api.IHttpRule=} [properties] Properties to set
|
|
*/
|
|
function HttpRule(properties) {
|
|
this.additionalBindings = [];
|
|
if (properties)
|
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
if (properties[keys[i]] != null)
|
|
this[keys[i]] = properties[keys[i]];
|
|
}
|
|
|
|
/**
|
|
* HttpRule selector.
|
|
* @member {string} selector
|
|
* @memberof google.api.HttpRule
|
|
* @instance
|
|
*/
|
|
HttpRule.prototype.selector = "";
|
|
|
|
/**
|
|
* HttpRule get.
|
|
* @member {string} get
|
|
* @memberof google.api.HttpRule
|
|
* @instance
|
|
*/
|
|
HttpRule.prototype.get = "";
|
|
|
|
/**
|
|
* HttpRule put.
|
|
* @member {string} put
|
|
* @memberof google.api.HttpRule
|
|
* @instance
|
|
*/
|
|
HttpRule.prototype.put = "";
|
|
|
|
/**
|
|
* HttpRule post.
|
|
* @member {string} post
|
|
* @memberof google.api.HttpRule
|
|
* @instance
|
|
*/
|
|
HttpRule.prototype.post = "";
|
|
|
|
/**
|
|
* HttpRule delete.
|
|
* @member {string} delete
|
|
* @memberof google.api.HttpRule
|
|
* @instance
|
|
*/
|
|
HttpRule.prototype["delete"] = "";
|
|
|
|
/**
|
|
* HttpRule patch.
|
|
* @member {string} patch
|
|
* @memberof google.api.HttpRule
|
|
* @instance
|
|
*/
|
|
HttpRule.prototype.patch = "";
|
|
|
|
/**
|
|
* HttpRule custom.
|
|
* @member {google.api.ICustomHttpPattern|null|undefined} custom
|
|
* @memberof google.api.HttpRule
|
|
* @instance
|
|
*/
|
|
HttpRule.prototype.custom = null;
|
|
|
|
/**
|
|
* HttpRule body.
|
|
* @member {string} body
|
|
* @memberof google.api.HttpRule
|
|
* @instance
|
|
*/
|
|
HttpRule.prototype.body = "";
|
|
|
|
/**
|
|
* HttpRule responseBody.
|
|
* @member {string} responseBody
|
|
* @memberof google.api.HttpRule
|
|
* @instance
|
|
*/
|
|
HttpRule.prototype.responseBody = "";
|
|
|
|
/**
|
|
* HttpRule additionalBindings.
|
|
* @member {Array.<google.api.IHttpRule>} additionalBindings
|
|
* @memberof google.api.HttpRule
|
|
* @instance
|
|
*/
|
|
HttpRule.prototype.additionalBindings = $util.emptyArray;
|
|
|
|
// OneOf field names bound to virtual getters and setters
|
|
var $oneOfFields;
|
|
|
|
/**
|
|
* HttpRule pattern.
|
|
* @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern
|
|
* @memberof google.api.HttpRule
|
|
* @instance
|
|
*/
|
|
Object.defineProperty(HttpRule.prototype, "pattern", {
|
|
get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]),
|
|
set: $util.oneOfSetter($oneOfFields)
|
|
});
|
|
|
|
/**
|
|
* Creates a new HttpRule instance using the specified properties.
|
|
* @function create
|
|
* @memberof google.api.HttpRule
|
|
* @static
|
|
* @param {google.api.IHttpRule=} [properties] Properties to set
|
|
* @returns {google.api.HttpRule} HttpRule instance
|
|
*/
|
|
HttpRule.create = function create(properties) {
|
|
return new HttpRule(properties);
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages.
|
|
* @function encode
|
|
* @memberof google.api.HttpRule
|
|
* @static
|
|
* @param {google.api.IHttpRule} message HttpRule message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
HttpRule.encode = function encode(message, writer) {
|
|
if (!writer)
|
|
writer = $Writer.create();
|
|
if (message.selector != null && Object.hasOwnProperty.call(message, "selector"))
|
|
writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector);
|
|
if (message.get != null && Object.hasOwnProperty.call(message, "get"))
|
|
writer.uint32(/* id 2, wireType 2 =*/18).string(message.get);
|
|
if (message.put != null && Object.hasOwnProperty.call(message, "put"))
|
|
writer.uint32(/* id 3, wireType 2 =*/26).string(message.put);
|
|
if (message.post != null && Object.hasOwnProperty.call(message, "post"))
|
|
writer.uint32(/* id 4, wireType 2 =*/34).string(message.post);
|
|
if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete"))
|
|
writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]);
|
|
if (message.patch != null && Object.hasOwnProperty.call(message, "patch"))
|
|
writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch);
|
|
if (message.body != null && Object.hasOwnProperty.call(message, "body"))
|
|
writer.uint32(/* id 7, wireType 2 =*/58).string(message.body);
|
|
if (message.custom != null && Object.hasOwnProperty.call(message, "custom"))
|
|
$root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
|
|
if (message.additionalBindings != null && message.additionalBindings.length)
|
|
for (var i = 0; i < message.additionalBindings.length; ++i)
|
|
$root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
|
|
if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody"))
|
|
writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody);
|
|
return writer;
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages.
|
|
* @function encodeDelimited
|
|
* @memberof google.api.HttpRule
|
|
* @static
|
|
* @param {google.api.IHttpRule} message HttpRule message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
HttpRule.encodeDelimited = function encodeDelimited(message, writer) {
|
|
return this.encode(message, writer).ldelim();
|
|
};
|
|
|
|
/**
|
|
* Decodes a HttpRule message from the specified reader or buffer.
|
|
* @function decode
|
|
* @memberof google.api.HttpRule
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @param {number} [length] Message length if known beforehand
|
|
* @returns {google.api.HttpRule} HttpRule
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
HttpRule.decode = function decode(reader, length) {
|
|
if (!(reader instanceof $Reader))
|
|
reader = $Reader.create(reader);
|
|
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule();
|
|
while (reader.pos < end) {
|
|
var tag = reader.uint32();
|
|
switch (tag >>> 3) {
|
|
case 1:
|
|
message.selector = reader.string();
|
|
break;
|
|
case 2:
|
|
message.get = reader.string();
|
|
break;
|
|
case 3:
|
|
message.put = reader.string();
|
|
break;
|
|
case 4:
|
|
message.post = reader.string();
|
|
break;
|
|
case 5:
|
|
message["delete"] = reader.string();
|
|
break;
|
|
case 6:
|
|
message.patch = reader.string();
|
|
break;
|
|
case 8:
|
|
message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32());
|
|
break;
|
|
case 7:
|
|
message.body = reader.string();
|
|
break;
|
|
case 12:
|
|
message.responseBody = reader.string();
|
|
break;
|
|
case 11:
|
|
if (!(message.additionalBindings && message.additionalBindings.length))
|
|
message.additionalBindings = [];
|
|
message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32()));
|
|
break;
|
|
default:
|
|
reader.skipType(tag & 7);
|
|
break;
|
|
}
|
|
}
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Decodes a HttpRule message from the specified reader or buffer, length delimited.
|
|
* @function decodeDelimited
|
|
* @memberof google.api.HttpRule
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @returns {google.api.HttpRule} HttpRule
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
HttpRule.decodeDelimited = function decodeDelimited(reader) {
|
|
if (!(reader instanceof $Reader))
|
|
reader = new $Reader(reader);
|
|
return this.decode(reader, reader.uint32());
|
|
};
|
|
|
|
/**
|
|
* Verifies a HttpRule message.
|
|
* @function verify
|
|
* @memberof google.api.HttpRule
|
|
* @static
|
|
* @param {Object.<string,*>} message Plain object to verify
|
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
*/
|
|
HttpRule.verify = function verify(message) {
|
|
if (typeof message !== "object" || message === null)
|
|
return "object expected";
|
|
var properties = {};
|
|
if (message.selector != null && message.hasOwnProperty("selector"))
|
|
if (!$util.isString(message.selector))
|
|
return "selector: string expected";
|
|
if (message.get != null && message.hasOwnProperty("get")) {
|
|
properties.pattern = 1;
|
|
if (!$util.isString(message.get))
|
|
return "get: string expected";
|
|
}
|
|
if (message.put != null && message.hasOwnProperty("put")) {
|
|
if (properties.pattern === 1)
|
|
return "pattern: multiple values";
|
|
properties.pattern = 1;
|
|
if (!$util.isString(message.put))
|
|
return "put: string expected";
|
|
}
|
|
if (message.post != null && message.hasOwnProperty("post")) {
|
|
if (properties.pattern === 1)
|
|
return "pattern: multiple values";
|
|
properties.pattern = 1;
|
|
if (!$util.isString(message.post))
|
|
return "post: string expected";
|
|
}
|
|
if (message["delete"] != null && message.hasOwnProperty("delete")) {
|
|
if (properties.pattern === 1)
|
|
return "pattern: multiple values";
|
|
properties.pattern = 1;
|
|
if (!$util.isString(message["delete"]))
|
|
return "delete: string expected";
|
|
}
|
|
if (message.patch != null && message.hasOwnProperty("patch")) {
|
|
if (properties.pattern === 1)
|
|
return "pattern: multiple values";
|
|
properties.pattern = 1;
|
|
if (!$util.isString(message.patch))
|
|
return "patch: string expected";
|
|
}
|
|
if (message.custom != null && message.hasOwnProperty("custom")) {
|
|
if (properties.pattern === 1)
|
|
return "pattern: multiple values";
|
|
properties.pattern = 1;
|
|
{
|
|
var error = $root.google.api.CustomHttpPattern.verify(message.custom);
|
|
if (error)
|
|
return "custom." + error;
|
|
}
|
|
}
|
|
if (message.body != null && message.hasOwnProperty("body"))
|
|
if (!$util.isString(message.body))
|
|
return "body: string expected";
|
|
if (message.responseBody != null && message.hasOwnProperty("responseBody"))
|
|
if (!$util.isString(message.responseBody))
|
|
return "responseBody: string expected";
|
|
if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) {
|
|
if (!Array.isArray(message.additionalBindings))
|
|
return "additionalBindings: array expected";
|
|
for (var i = 0; i < message.additionalBindings.length; ++i) {
|
|
var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]);
|
|
if (error)
|
|
return "additionalBindings." + error;
|
|
}
|
|
}
|
|
return null;
|
|
};
|
|
|
|
/**
|
|
* Creates a HttpRule message from a plain object. Also converts values to their respective internal types.
|
|
* @function fromObject
|
|
* @memberof google.api.HttpRule
|
|
* @static
|
|
* @param {Object.<string,*>} object Plain object
|
|
* @returns {google.api.HttpRule} HttpRule
|
|
*/
|
|
HttpRule.fromObject = function fromObject(object) {
|
|
if (object instanceof $root.google.api.HttpRule)
|
|
return object;
|
|
var message = new $root.google.api.HttpRule();
|
|
if (object.selector != null)
|
|
message.selector = String(object.selector);
|
|
if (object.get != null)
|
|
message.get = String(object.get);
|
|
if (object.put != null)
|
|
message.put = String(object.put);
|
|
if (object.post != null)
|
|
message.post = String(object.post);
|
|
if (object["delete"] != null)
|
|
message["delete"] = String(object["delete"]);
|
|
if (object.patch != null)
|
|
message.patch = String(object.patch);
|
|
if (object.custom != null) {
|
|
if (typeof object.custom !== "object")
|
|
throw TypeError(".google.api.HttpRule.custom: object expected");
|
|
message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom);
|
|
}
|
|
if (object.body != null)
|
|
message.body = String(object.body);
|
|
if (object.responseBody != null)
|
|
message.responseBody = String(object.responseBody);
|
|
if (object.additionalBindings) {
|
|
if (!Array.isArray(object.additionalBindings))
|
|
throw TypeError(".google.api.HttpRule.additionalBindings: array expected");
|
|
message.additionalBindings = [];
|
|
for (var i = 0; i < object.additionalBindings.length; ++i) {
|
|
if (typeof object.additionalBindings[i] !== "object")
|
|
throw TypeError(".google.api.HttpRule.additionalBindings: object expected");
|
|
message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]);
|
|
}
|
|
}
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Creates a plain object from a HttpRule message. Also converts values to other types if specified.
|
|
* @function toObject
|
|
* @memberof google.api.HttpRule
|
|
* @static
|
|
* @param {google.api.HttpRule} message HttpRule
|
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
* @returns {Object.<string,*>} Plain object
|
|
*/
|
|
HttpRule.toObject = function toObject(message, options) {
|
|
if (!options)
|
|
options = {};
|
|
var object = {};
|
|
if (options.arrays || options.defaults)
|
|
object.additionalBindings = [];
|
|
if (options.defaults) {
|
|
object.selector = "";
|
|
object.body = "";
|
|
object.responseBody = "";
|
|
}
|
|
if (message.selector != null && message.hasOwnProperty("selector"))
|
|
object.selector = message.selector;
|
|
if (message.get != null && message.hasOwnProperty("get")) {
|
|
object.get = message.get;
|
|
if (options.oneofs)
|
|
object.pattern = "get";
|
|
}
|
|
if (message.put != null && message.hasOwnProperty("put")) {
|
|
object.put = message.put;
|
|
if (options.oneofs)
|
|
object.pattern = "put";
|
|
}
|
|
if (message.post != null && message.hasOwnProperty("post")) {
|
|
object.post = message.post;
|
|
if (options.oneofs)
|
|
object.pattern = "post";
|
|
}
|
|
if (message["delete"] != null && message.hasOwnProperty("delete")) {
|
|
object["delete"] = message["delete"];
|
|
if (options.oneofs)
|
|
object.pattern = "delete";
|
|
}
|
|
if (message.patch != null && message.hasOwnProperty("patch")) {
|
|
object.patch = message.patch;
|
|
if (options.oneofs)
|
|
object.pattern = "patch";
|
|
}
|
|
if (message.body != null && message.hasOwnProperty("body"))
|
|
object.body = message.body;
|
|
if (message.custom != null && message.hasOwnProperty("custom")) {
|
|
object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options);
|
|
if (options.oneofs)
|
|
object.pattern = "custom";
|
|
}
|
|
if (message.additionalBindings && message.additionalBindings.length) {
|
|
object.additionalBindings = [];
|
|
for (var j = 0; j < message.additionalBindings.length; ++j)
|
|
object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options);
|
|
}
|
|
if (message.responseBody != null && message.hasOwnProperty("responseBody"))
|
|
object.responseBody = message.responseBody;
|
|
return object;
|
|
};
|
|
|
|
/**
|
|
* Converts this HttpRule to JSON.
|
|
* @function toJSON
|
|
* @memberof google.api.HttpRule
|
|
* @instance
|
|
* @returns {Object.<string,*>} JSON object
|
|
*/
|
|
HttpRule.prototype.toJSON = function toJSON() {
|
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
};
|
|
|
|
return HttpRule;
|
|
})();
|
|
|
|
api.CustomHttpPattern = (function() {
|
|
|
|
/**
|
|
* Properties of a CustomHttpPattern.
|
|
* @memberof google.api
|
|
* @interface ICustomHttpPattern
|
|
* @property {string|null} [kind] CustomHttpPattern kind
|
|
* @property {string|null} [path] CustomHttpPattern path
|
|
*/
|
|
|
|
/**
|
|
* Constructs a new CustomHttpPattern.
|
|
* @memberof google.api
|
|
* @classdesc Represents a CustomHttpPattern.
|
|
* @implements ICustomHttpPattern
|
|
* @constructor
|
|
* @param {google.api.ICustomHttpPattern=} [properties] Properties to set
|
|
*/
|
|
function CustomHttpPattern(properties) {
|
|
if (properties)
|
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
if (properties[keys[i]] != null)
|
|
this[keys[i]] = properties[keys[i]];
|
|
}
|
|
|
|
/**
|
|
* CustomHttpPattern kind.
|
|
* @member {string} kind
|
|
* @memberof google.api.CustomHttpPattern
|
|
* @instance
|
|
*/
|
|
CustomHttpPattern.prototype.kind = "";
|
|
|
|
/**
|
|
* CustomHttpPattern path.
|
|
* @member {string} path
|
|
* @memberof google.api.CustomHttpPattern
|
|
* @instance
|
|
*/
|
|
CustomHttpPattern.prototype.path = "";
|
|
|
|
/**
|
|
* Creates a new CustomHttpPattern instance using the specified properties.
|
|
* @function create
|
|
* @memberof google.api.CustomHttpPattern
|
|
* @static
|
|
* @param {google.api.ICustomHttpPattern=} [properties] Properties to set
|
|
* @returns {google.api.CustomHttpPattern} CustomHttpPattern instance
|
|
*/
|
|
CustomHttpPattern.create = function create(properties) {
|
|
return new CustomHttpPattern(properties);
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages.
|
|
* @function encode
|
|
* @memberof google.api.CustomHttpPattern
|
|
* @static
|
|
* @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
CustomHttpPattern.encode = function encode(message, writer) {
|
|
if (!writer)
|
|
writer = $Writer.create();
|
|
if (message.kind != null && Object.hasOwnProperty.call(message, "kind"))
|
|
writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind);
|
|
if (message.path != null && Object.hasOwnProperty.call(message, "path"))
|
|
writer.uint32(/* id 2, wireType 2 =*/18).string(message.path);
|
|
return writer;
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages.
|
|
* @function encodeDelimited
|
|
* @memberof google.api.CustomHttpPattern
|
|
* @static
|
|
* @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) {
|
|
return this.encode(message, writer).ldelim();
|
|
};
|
|
|
|
/**
|
|
* Decodes a CustomHttpPattern message from the specified reader or buffer.
|
|
* @function decode
|
|
* @memberof google.api.CustomHttpPattern
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @param {number} [length] Message length if known beforehand
|
|
* @returns {google.api.CustomHttpPattern} CustomHttpPattern
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
CustomHttpPattern.decode = function decode(reader, length) {
|
|
if (!(reader instanceof $Reader))
|
|
reader = $Reader.create(reader);
|
|
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern();
|
|
while (reader.pos < end) {
|
|
var tag = reader.uint32();
|
|
switch (tag >>> 3) {
|
|
case 1:
|
|
message.kind = reader.string();
|
|
break;
|
|
case 2:
|
|
message.path = reader.string();
|
|
break;
|
|
default:
|
|
reader.skipType(tag & 7);
|
|
break;
|
|
}
|
|
}
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited.
|
|
* @function decodeDelimited
|
|
* @memberof google.api.CustomHttpPattern
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @returns {google.api.CustomHttpPattern} CustomHttpPattern
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) {
|
|
if (!(reader instanceof $Reader))
|
|
reader = new $Reader(reader);
|
|
return this.decode(reader, reader.uint32());
|
|
};
|
|
|
|
/**
|
|
* Verifies a CustomHttpPattern message.
|
|
* @function verify
|
|
* @memberof google.api.CustomHttpPattern
|
|
* @static
|
|
* @param {Object.<string,*>} message Plain object to verify
|
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
*/
|
|
CustomHttpPattern.verify = function verify(message) {
|
|
if (typeof message !== "object" || message === null)
|
|
return "object expected";
|
|
if (message.kind != null && message.hasOwnProperty("kind"))
|
|
if (!$util.isString(message.kind))
|
|
return "kind: string expected";
|
|
if (message.path != null && message.hasOwnProperty("path"))
|
|
if (!$util.isString(message.path))
|
|
return "path: string expected";
|
|
return null;
|
|
};
|
|
|
|
/**
|
|
* Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types.
|
|
* @function fromObject
|
|
* @memberof google.api.CustomHttpPattern
|
|
* @static
|
|
* @param {Object.<string,*>} object Plain object
|
|
* @returns {google.api.CustomHttpPattern} CustomHttpPattern
|
|
*/
|
|
CustomHttpPattern.fromObject = function fromObject(object) {
|
|
if (object instanceof $root.google.api.CustomHttpPattern)
|
|
return object;
|
|
var message = new $root.google.api.CustomHttpPattern();
|
|
if (object.kind != null)
|
|
message.kind = String(object.kind);
|
|
if (object.path != null)
|
|
message.path = String(object.path);
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified.
|
|
* @function toObject
|
|
* @memberof google.api.CustomHttpPattern
|
|
* @static
|
|
* @param {google.api.CustomHttpPattern} message CustomHttpPattern
|
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
* @returns {Object.<string,*>} Plain object
|
|
*/
|
|
CustomHttpPattern.toObject = function toObject(message, options) {
|
|
if (!options)
|
|
options = {};
|
|
var object = {};
|
|
if (options.defaults) {
|
|
object.kind = "";
|
|
object.path = "";
|
|
}
|
|
if (message.kind != null && message.hasOwnProperty("kind"))
|
|
object.kind = message.kind;
|
|
if (message.path != null && message.hasOwnProperty("path"))
|
|
object.path = message.path;
|
|
return object;
|
|
};
|
|
|
|
/**
|
|
* Converts this CustomHttpPattern to JSON.
|
|
* @function toJSON
|
|
* @memberof google.api.CustomHttpPattern
|
|
* @instance
|
|
* @returns {Object.<string,*>} JSON object
|
|
*/
|
|
CustomHttpPattern.prototype.toJSON = function toJSON() {
|
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
};
|
|
|
|
return CustomHttpPattern;
|
|
})();
|
|
|
|
return api;
|
|
})();
|
|
|
|
google.protobuf = (function() {
|
|
|
|
/**
|
|
* Namespace protobuf.
|
|
* @memberof google
|
|
* @namespace
|
|
*/
|
|
var protobuf = {};
|
|
|
|
protobuf.FileDescriptorSet = (function() {
|
|
|
|
/**
|
|
* Properties of a FileDescriptorSet.
|
|
* @memberof google.protobuf
|
|
* @interface IFileDescriptorSet
|
|
* @property {Array.<google.protobuf.IFileDescriptorProto>|null} [file] FileDescriptorSet file
|
|
*/
|
|
|
|
/**
|
|
* Constructs a new FileDescriptorSet.
|
|
* @memberof google.protobuf
|
|
* @classdesc Represents a FileDescriptorSet.
|
|
* @implements IFileDescriptorSet
|
|
* @constructor
|
|
* @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set
|
|
*/
|
|
function FileDescriptorSet(properties) {
|
|
this.file = [];
|
|
if (properties)
|
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
if (properties[keys[i]] != null)
|
|
this[keys[i]] = properties[keys[i]];
|
|
}
|
|
|
|
/**
|
|
* FileDescriptorSet file.
|
|
* @member {Array.<google.protobuf.IFileDescriptorProto>} file
|
|
* @memberof google.protobuf.FileDescriptorSet
|
|
* @instance
|
|
*/
|
|
FileDescriptorSet.prototype.file = $util.emptyArray;
|
|
|
|
/**
|
|
* Creates a new FileDescriptorSet instance using the specified properties.
|
|
* @function create
|
|
* @memberof google.protobuf.FileDescriptorSet
|
|
* @static
|
|
* @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set
|
|
* @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance
|
|
*/
|
|
FileDescriptorSet.create = function create(properties) {
|
|
return new FileDescriptorSet(properties);
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages.
|
|
* @function encode
|
|
* @memberof google.protobuf.FileDescriptorSet
|
|
* @static
|
|
* @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
FileDescriptorSet.encode = function encode(message, writer) {
|
|
if (!writer)
|
|
writer = $Writer.create();
|
|
if (message.file != null && message.file.length)
|
|
for (var i = 0; i < message.file.length; ++i)
|
|
$root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
return writer;
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages.
|
|
* @function encodeDelimited
|
|
* @memberof google.protobuf.FileDescriptorSet
|
|
* @static
|
|
* @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) {
|
|
return this.encode(message, writer).ldelim();
|
|
};
|
|
|
|
/**
|
|
* Decodes a FileDescriptorSet message from the specified reader or buffer.
|
|
* @function decode
|
|
* @memberof google.protobuf.FileDescriptorSet
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @param {number} [length] Message length if known beforehand
|
|
* @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
FileDescriptorSet.decode = function decode(reader, length) {
|
|
if (!(reader instanceof $Reader))
|
|
reader = $Reader.create(reader);
|
|
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet();
|
|
while (reader.pos < end) {
|
|
var tag = reader.uint32();
|
|
switch (tag >>> 3) {
|
|
case 1:
|
|
if (!(message.file && message.file.length))
|
|
message.file = [];
|
|
message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32()));
|
|
break;
|
|
default:
|
|
reader.skipType(tag & 7);
|
|
break;
|
|
}
|
|
}
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited.
|
|
* @function decodeDelimited
|
|
* @memberof google.protobuf.FileDescriptorSet
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) {
|
|
if (!(reader instanceof $Reader))
|
|
reader = new $Reader(reader);
|
|
return this.decode(reader, reader.uint32());
|
|
};
|
|
|
|
/**
|
|
* Verifies a FileDescriptorSet message.
|
|
* @function verify
|
|
* @memberof google.protobuf.FileDescriptorSet
|
|
* @static
|
|
* @param {Object.<string,*>} message Plain object to verify
|
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
*/
|
|
FileDescriptorSet.verify = function verify(message) {
|
|
if (typeof message !== "object" || message === null)
|
|
return "object expected";
|
|
if (message.file != null && message.hasOwnProperty("file")) {
|
|
if (!Array.isArray(message.file))
|
|
return "file: array expected";
|
|
for (var i = 0; i < message.file.length; ++i) {
|
|
var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]);
|
|
if (error)
|
|
return "file." + error;
|
|
}
|
|
}
|
|
return null;
|
|
};
|
|
|
|
/**
|
|
* Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types.
|
|
* @function fromObject
|
|
* @memberof google.protobuf.FileDescriptorSet
|
|
* @static
|
|
* @param {Object.<string,*>} object Plain object
|
|
* @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet
|
|
*/
|
|
FileDescriptorSet.fromObject = function fromObject(object) {
|
|
if (object instanceof $root.google.protobuf.FileDescriptorSet)
|
|
return object;
|
|
var message = new $root.google.protobuf.FileDescriptorSet();
|
|
if (object.file) {
|
|
if (!Array.isArray(object.file))
|
|
throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected");
|
|
message.file = [];
|
|
for (var i = 0; i < object.file.length; ++i) {
|
|
if (typeof object.file[i] !== "object")
|
|
throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected");
|
|
message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]);
|
|
}
|
|
}
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified.
|
|
* @function toObject
|
|
* @memberof google.protobuf.FileDescriptorSet
|
|
* @static
|
|
* @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet
|
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
* @returns {Object.<string,*>} Plain object
|
|
*/
|
|
FileDescriptorSet.toObject = function toObject(message, options) {
|
|
if (!options)
|
|
options = {};
|
|
var object = {};
|
|
if (options.arrays || options.defaults)
|
|
object.file = [];
|
|
if (message.file && message.file.length) {
|
|
object.file = [];
|
|
for (var j = 0; j < message.file.length; ++j)
|
|
object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options);
|
|
}
|
|
return object;
|
|
};
|
|
|
|
/**
|
|
* Converts this FileDescriptorSet to JSON.
|
|
* @function toJSON
|
|
* @memberof google.protobuf.FileDescriptorSet
|
|
* @instance
|
|
* @returns {Object.<string,*>} JSON object
|
|
*/
|
|
FileDescriptorSet.prototype.toJSON = function toJSON() {
|
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
};
|
|
|
|
return FileDescriptorSet;
|
|
})();
|
|
|
|
protobuf.FileDescriptorProto = (function() {
|
|
|
|
/**
|
|
* Properties of a FileDescriptorProto.
|
|
* @memberof google.protobuf
|
|
* @interface IFileDescriptorProto
|
|
* @property {string|null} [name] FileDescriptorProto name
|
|
* @property {string|null} ["package"] FileDescriptorProto package
|
|
* @property {Array.<string>|null} [dependency] FileDescriptorProto dependency
|
|
* @property {Array.<number>|null} [publicDependency] FileDescriptorProto publicDependency
|
|
* @property {Array.<number>|null} [weakDependency] FileDescriptorProto weakDependency
|
|
* @property {Array.<google.protobuf.IDescriptorProto>|null} [messageType] FileDescriptorProto messageType
|
|
* @property {Array.<google.protobuf.IEnumDescriptorProto>|null} [enumType] FileDescriptorProto enumType
|
|
* @property {Array.<google.protobuf.IServiceDescriptorProto>|null} [service] FileDescriptorProto service
|
|
* @property {Array.<google.protobuf.IFieldDescriptorProto>|null} [extension] FileDescriptorProto extension
|
|
* @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options
|
|
* @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo
|
|
* @property {string|null} [syntax] FileDescriptorProto syntax
|
|
*/
|
|
|
|
/**
|
|
* Constructs a new FileDescriptorProto.
|
|
* @memberof google.protobuf
|
|
* @classdesc Represents a FileDescriptorProto.
|
|
* @implements IFileDescriptorProto
|
|
* @constructor
|
|
* @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set
|
|
*/
|
|
function FileDescriptorProto(properties) {
|
|
this.dependency = [];
|
|
this.publicDependency = [];
|
|
this.weakDependency = [];
|
|
this.messageType = [];
|
|
this.enumType = [];
|
|
this.service = [];
|
|
this.extension = [];
|
|
if (properties)
|
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
if (properties[keys[i]] != null)
|
|
this[keys[i]] = properties[keys[i]];
|
|
}
|
|
|
|
/**
|
|
* FileDescriptorProto name.
|
|
* @member {string} name
|
|
* @memberof google.protobuf.FileDescriptorProto
|
|
* @instance
|
|
*/
|
|
FileDescriptorProto.prototype.name = "";
|
|
|
|
/**
|
|
* FileDescriptorProto package.
|
|
* @member {string} package
|
|
* @memberof google.protobuf.FileDescriptorProto
|
|
* @instance
|
|
*/
|
|
FileDescriptorProto.prototype["package"] = "";
|
|
|
|
/**
|
|
* FileDescriptorProto dependency.
|
|
* @member {Array.<string>} dependency
|
|
* @memberof google.protobuf.FileDescriptorProto
|
|
* @instance
|
|
*/
|
|
FileDescriptorProto.prototype.dependency = $util.emptyArray;
|
|
|
|
/**
|
|
* FileDescriptorProto publicDependency.
|
|
* @member {Array.<number>} publicDependency
|
|
* @memberof google.protobuf.FileDescriptorProto
|
|
* @instance
|
|
*/
|
|
FileDescriptorProto.prototype.publicDependency = $util.emptyArray;
|
|
|
|
/**
|
|
* FileDescriptorProto weakDependency.
|
|
* @member {Array.<number>} weakDependency
|
|
* @memberof google.protobuf.FileDescriptorProto
|
|
* @instance
|
|
*/
|
|
FileDescriptorProto.prototype.weakDependency = $util.emptyArray;
|
|
|
|
/**
|
|
* FileDescriptorProto messageType.
|
|
* @member {Array.<google.protobuf.IDescriptorProto>} messageType
|
|
* @memberof google.protobuf.FileDescriptorProto
|
|
* @instance
|
|
*/
|
|
FileDescriptorProto.prototype.messageType = $util.emptyArray;
|
|
|
|
/**
|
|
* FileDescriptorProto enumType.
|
|
* @member {Array.<google.protobuf.IEnumDescriptorProto>} enumType
|
|
* @memberof google.protobuf.FileDescriptorProto
|
|
* @instance
|
|
*/
|
|
FileDescriptorProto.prototype.enumType = $util.emptyArray;
|
|
|
|
/**
|
|
* FileDescriptorProto service.
|
|
* @member {Array.<google.protobuf.IServiceDescriptorProto>} service
|
|
* @memberof google.protobuf.FileDescriptorProto
|
|
* @instance
|
|
*/
|
|
FileDescriptorProto.prototype.service = $util.emptyArray;
|
|
|
|
/**
|
|
* FileDescriptorProto extension.
|
|
* @member {Array.<google.protobuf.IFieldDescriptorProto>} extension
|
|
* @memberof google.protobuf.FileDescriptorProto
|
|
* @instance
|
|
*/
|
|
FileDescriptorProto.prototype.extension = $util.emptyArray;
|
|
|
|
/**
|
|
* FileDescriptorProto options.
|
|
* @member {google.protobuf.IFileOptions|null|undefined} options
|
|
* @memberof google.protobuf.FileDescriptorProto
|
|
* @instance
|
|
*/
|
|
FileDescriptorProto.prototype.options = null;
|
|
|
|
/**
|
|
* FileDescriptorProto sourceCodeInfo.
|
|
* @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo
|
|
* @memberof google.protobuf.FileDescriptorProto
|
|
* @instance
|
|
*/
|
|
FileDescriptorProto.prototype.sourceCodeInfo = null;
|
|
|
|
/**
|
|
* FileDescriptorProto syntax.
|
|
* @member {string} syntax
|
|
* @memberof google.protobuf.FileDescriptorProto
|
|
* @instance
|
|
*/
|
|
FileDescriptorProto.prototype.syntax = "";
|
|
|
|
/**
|
|
* Creates a new FileDescriptorProto instance using the specified properties.
|
|
* @function create
|
|
* @memberof google.protobuf.FileDescriptorProto
|
|
* @static
|
|
* @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set
|
|
* @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance
|
|
*/
|
|
FileDescriptorProto.create = function create(properties) {
|
|
return new FileDescriptorProto(properties);
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages.
|
|
* @function encode
|
|
* @memberof google.protobuf.FileDescriptorProto
|
|
* @static
|
|
* @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
FileDescriptorProto.encode = function encode(message, writer) {
|
|
if (!writer)
|
|
writer = $Writer.create();
|
|
if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
|
writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
|
if (message["package"] != null && Object.hasOwnProperty.call(message, "package"))
|
|
writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]);
|
|
if (message.dependency != null && message.dependency.length)
|
|
for (var i = 0; i < message.dependency.length; ++i)
|
|
writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]);
|
|
if (message.messageType != null && message.messageType.length)
|
|
for (var i = 0; i < message.messageType.length; ++i)
|
|
$root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
|
if (message.enumType != null && message.enumType.length)
|
|
for (var i = 0; i < message.enumType.length; ++i)
|
|
$root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
|
|
if (message.service != null && message.service.length)
|
|
for (var i = 0; i < message.service.length; ++i)
|
|
$root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
|
|
if (message.extension != null && message.extension.length)
|
|
for (var i = 0; i < message.extension.length; ++i)
|
|
$root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
|
|
if (message.options != null && Object.hasOwnProperty.call(message, "options"))
|
|
$root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
|
|
if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo"))
|
|
$root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
|
|
if (message.publicDependency != null && message.publicDependency.length)
|
|
for (var i = 0; i < message.publicDependency.length; ++i)
|
|
writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]);
|
|
if (message.weakDependency != null && message.weakDependency.length)
|
|
for (var i = 0; i < message.weakDependency.length; ++i)
|
|
writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]);
|
|
if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax"))
|
|
writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax);
|
|
return writer;
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages.
|
|
* @function encodeDelimited
|
|
* @memberof google.protobuf.FileDescriptorProto
|
|
* @static
|
|
* @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) {
|
|
return this.encode(message, writer).ldelim();
|
|
};
|
|
|
|
/**
|
|
* Decodes a FileDescriptorProto message from the specified reader or buffer.
|
|
* @function decode
|
|
* @memberof google.protobuf.FileDescriptorProto
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @param {number} [length] Message length if known beforehand
|
|
* @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
FileDescriptorProto.decode = function decode(reader, length) {
|
|
if (!(reader instanceof $Reader))
|
|
reader = $Reader.create(reader);
|
|
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto();
|
|
while (reader.pos < end) {
|
|
var tag = reader.uint32();
|
|
switch (tag >>> 3) {
|
|
case 1:
|
|
message.name = reader.string();
|
|
break;
|
|
case 2:
|
|
message["package"] = reader.string();
|
|
break;
|
|
case 3:
|
|
if (!(message.dependency && message.dependency.length))
|
|
message.dependency = [];
|
|
message.dependency.push(reader.string());
|
|
break;
|
|
case 10:
|
|
if (!(message.publicDependency && message.publicDependency.length))
|
|
message.publicDependency = [];
|
|
if ((tag & 7) === 2) {
|
|
var end2 = reader.uint32() + reader.pos;
|
|
while (reader.pos < end2)
|
|
message.publicDependency.push(reader.int32());
|
|
} else
|
|
message.publicDependency.push(reader.int32());
|
|
break;
|
|
case 11:
|
|
if (!(message.weakDependency && message.weakDependency.length))
|
|
message.weakDependency = [];
|
|
if ((tag & 7) === 2) {
|
|
var end2 = reader.uint32() + reader.pos;
|
|
while (reader.pos < end2)
|
|
message.weakDependency.push(reader.int32());
|
|
} else
|
|
message.weakDependency.push(reader.int32());
|
|
break;
|
|
case 4:
|
|
if (!(message.messageType && message.messageType.length))
|
|
message.messageType = [];
|
|
message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32()));
|
|
break;
|
|
case 5:
|
|
if (!(message.enumType && message.enumType.length))
|
|
message.enumType = [];
|
|
message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32()));
|
|
break;
|
|
case 6:
|
|
if (!(message.service && message.service.length))
|
|
message.service = [];
|
|
message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32()));
|
|
break;
|
|
case 7:
|
|
if (!(message.extension && message.extension.length))
|
|
message.extension = [];
|
|
message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32()));
|
|
break;
|
|
case 8:
|
|
message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32());
|
|
break;
|
|
case 9:
|
|
message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32());
|
|
break;
|
|
case 12:
|
|
message.syntax = reader.string();
|
|
break;
|
|
default:
|
|
reader.skipType(tag & 7);
|
|
break;
|
|
}
|
|
}
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited.
|
|
* @function decodeDelimited
|
|
* @memberof google.protobuf.FileDescriptorProto
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) {
|
|
if (!(reader instanceof $Reader))
|
|
reader = new $Reader(reader);
|
|
return this.decode(reader, reader.uint32());
|
|
};
|
|
|
|
/**
|
|
* Verifies a FileDescriptorProto message.
|
|
* @function verify
|
|
* @memberof google.protobuf.FileDescriptorProto
|
|
* @static
|
|
* @param {Object.<string,*>} message Plain object to verify
|
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
*/
|
|
FileDescriptorProto.verify = function verify(message) {
|
|
if (typeof message !== "object" || message === null)
|
|
return "object expected";
|
|
if (message.name != null && message.hasOwnProperty("name"))
|
|
if (!$util.isString(message.name))
|
|
return "name: string expected";
|
|
if (message["package"] != null && message.hasOwnProperty("package"))
|
|
if (!$util.isString(message["package"]))
|
|
return "package: string expected";
|
|
if (message.dependency != null && message.hasOwnProperty("dependency")) {
|
|
if (!Array.isArray(message.dependency))
|