UNPKG

@google-cloud/asset

Version:
836 lines (756 loc) 5.49 MB
// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. /*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("google-gax/build/src/protobuf").protobufMinimal); })(this, function($protobuf) { "use strict"; // Common aliases var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; // Exported root namespace var $root = $protobuf.roots._google_cloud_asset_protos || ($protobuf.roots._google_cloud_asset_protos = {}); $root.google = (function() { /** * Namespace google. * @exports google * @namespace */ var google = {}; google.cloud = (function() { /** * Namespace cloud. * @memberof google * @namespace */ var cloud = {}; cloud.asset = (function() { /** * Namespace asset. * @memberof google.cloud * @namespace */ var asset = {}; asset.v1 = (function() { /** * Namespace v1. * @memberof google.cloud.asset * @namespace */ var v1 = {}; v1.ResourceOwners = (function() { /** * Properties of a ResourceOwners. * @memberof google.cloud.asset.v1 * @interface IResourceOwners * @property {Array.<string>|null} [resourceOwners] ResourceOwners resourceOwners */ /** * Constructs a new ResourceOwners. * @memberof google.cloud.asset.v1 * @classdesc Represents a ResourceOwners. * @implements IResourceOwners * @constructor * @param {google.cloud.asset.v1.IResourceOwners=} [properties] Properties to set */ function ResourceOwners(properties) { this.resourceOwners = []; 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]]; } /** * ResourceOwners resourceOwners. * @member {Array.<string>} resourceOwners * @memberof google.cloud.asset.v1.ResourceOwners * @instance */ ResourceOwners.prototype.resourceOwners = $util.emptyArray; /** * Creates a new ResourceOwners instance using the specified properties. * @function create * @memberof google.cloud.asset.v1.ResourceOwners * @static * @param {google.cloud.asset.v1.IResourceOwners=} [properties] Properties to set * @returns {google.cloud.asset.v1.ResourceOwners} ResourceOwners instance */ ResourceOwners.create = function create(properties) { return new ResourceOwners(properties); }; /** * Encodes the specified ResourceOwners message. Does not implicitly {@link google.cloud.asset.v1.ResourceOwners.verify|verify} messages. * @function encode * @memberof google.cloud.asset.v1.ResourceOwners * @static * @param {google.cloud.asset.v1.IResourceOwners} message ResourceOwners message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ ResourceOwners.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.resourceOwners != null && message.resourceOwners.length) for (var i = 0; i < message.resourceOwners.length; ++i) writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceOwners[i]); return writer; }; /** * Encodes the specified ResourceOwners message, length delimited. Does not implicitly {@link google.cloud.asset.v1.ResourceOwners.verify|verify} messages. * @function encodeDelimited * @memberof google.cloud.asset.v1.ResourceOwners * @static * @param {google.cloud.asset.v1.IResourceOwners} message ResourceOwners message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ ResourceOwners.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a ResourceOwners message from the specified reader or buffer. * @function decode * @memberof google.cloud.asset.v1.ResourceOwners * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {google.cloud.asset.v1.ResourceOwners} ResourceOwners * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ ResourceOwners.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1.ResourceOwners(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { if (!(message.resourceOwners && message.resourceOwners.length)) message.resourceOwners = []; message.resourceOwners.push(reader.string()); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a ResourceOwners message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof google.cloud.asset.v1.ResourceOwners * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {google.cloud.asset.v1.ResourceOwners} ResourceOwners * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ ResourceOwners.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a ResourceOwners message. * @function verify * @memberof google.cloud.asset.v1.ResourceOwners * @static * @param {Object.<string,*>} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ ResourceOwners.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.resourceOwners != null && message.hasOwnProperty("resourceOwners")) { if (!Array.isArray(message.resourceOwners)) return "resourceOwners: array expected"; for (var i = 0; i < message.resourceOwners.length; ++i) if (!$util.isString(message.resourceOwners[i])) return "resourceOwners: string[] expected"; } return null; }; /** * Creates a ResourceOwners message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof google.cloud.asset.v1.ResourceOwners * @static * @param {Object.<string,*>} object Plain object * @returns {google.cloud.asset.v1.ResourceOwners} ResourceOwners */ ResourceOwners.fromObject = function fromObject(object) { if (object instanceof $root.google.cloud.asset.v1.ResourceOwners) return object; var message = new $root.google.cloud.asset.v1.ResourceOwners(); if (object.resourceOwners) { if (!Array.isArray(object.resourceOwners)) throw TypeError(".google.cloud.asset.v1.ResourceOwners.resourceOwners: array expected"); message.resourceOwners = []; for (var i = 0; i < object.resourceOwners.length; ++i) message.resourceOwners[i] = String(object.resourceOwners[i]); } return message; }; /** * Creates a plain object from a ResourceOwners message. Also converts values to other types if specified. * @function toObject * @memberof google.cloud.asset.v1.ResourceOwners * @static * @param {google.cloud.asset.v1.ResourceOwners} message ResourceOwners * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.<string,*>} Plain object */ ResourceOwners.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.resourceOwners = []; if (message.resourceOwners && message.resourceOwners.length) { object.resourceOwners = []; for (var j = 0; j < message.resourceOwners.length; ++j) object.resourceOwners[j] = message.resourceOwners[j]; } return object; }; /** * Converts this ResourceOwners to JSON. * @function toJSON * @memberof google.cloud.asset.v1.ResourceOwners * @instance * @returns {Object.<string,*>} JSON object */ ResourceOwners.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for ResourceOwners * @function getTypeUrl * @memberof google.cloud.asset.v1.ResourceOwners * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ ResourceOwners.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/google.cloud.asset.v1.ResourceOwners"; }; return ResourceOwners; })(); v1.AssetService = (function() { /** * Constructs a new AssetService service. * @memberof google.cloud.asset.v1 * @classdesc Represents an AssetService * @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 AssetService(rpcImpl, requestDelimited, responseDelimited) { $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } (AssetService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = AssetService; /** * Creates new AssetService service using the specified rpc implementation. * @function create * @memberof google.cloud.asset.v1.AssetService * @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 {AssetService} RPC service. Useful where requests and/or responses are streamed. */ AssetService.create = function create(rpcImpl, requestDelimited, responseDelimited) { return new this(rpcImpl, requestDelimited, responseDelimited); }; /** * Callback as used by {@link google.cloud.asset.v1.AssetService|exportAssets}. * @memberof google.cloud.asset.v1.AssetService * @typedef ExportAssetsCallback * @type {function} * @param {Error|null} error Error, if any * @param {google.longrunning.Operation} [response] Operation */ /** * Calls ExportAssets. * @function exportAssets * @memberof google.cloud.asset.v1.AssetService * @instance * @param {google.cloud.asset.v1.IExportAssetsRequest} request ExportAssetsRequest message or plain object * @param {google.cloud.asset.v1.AssetService.ExportAssetsCallback} callback Node-style callback called with the error, if any, and Operation * @returns {undefined} * @variation 1 */ Object.defineProperty(AssetService.prototype.exportAssets = function exportAssets(request, callback) { return this.rpcCall(exportAssets, $root.google.cloud.asset.v1.ExportAssetsRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "ExportAssets" }); /** * Calls ExportAssets. * @function exportAssets * @memberof google.cloud.asset.v1.AssetService * @instance * @param {google.cloud.asset.v1.IExportAssetsRequest} request ExportAssetsRequest message or plain object * @returns {Promise<google.longrunning.Operation>} Promise * @variation 2 */ /** * Callback as used by {@link google.cloud.asset.v1.AssetService|listAssets}. * @memberof google.cloud.asset.v1.AssetService * @typedef ListAssetsCallback * @type {function} * @param {Error|null} error Error, if any * @param {google.cloud.asset.v1.ListAssetsResponse} [response] ListAssetsResponse */ /** * Calls ListAssets. * @function listAssets * @memberof google.cloud.asset.v1.AssetService * @instance * @param {google.cloud.asset.v1.IListAssetsRequest} request ListAssetsRequest message or plain object * @param {google.cloud.asset.v1.AssetService.ListAssetsCallback} callback Node-style callback called with the error, if any, and ListAssetsResponse * @returns {undefined} * @variation 1 */ Object.defineProperty(AssetService.prototype.listAssets = function listAssets(request, callback) { return this.rpcCall(listAssets, $root.google.cloud.asset.v1.ListAssetsRequest, $root.google.cloud.asset.v1.ListAssetsResponse, request, callback); }, "name", { value: "ListAssets" }); /** * Calls ListAssets. * @function listAssets * @memberof google.cloud.asset.v1.AssetService * @instance * @param {google.cloud.asset.v1.IListAssetsRequest} request ListAssetsRequest message or plain object * @returns {Promise<google.cloud.asset.v1.ListAssetsResponse>} Promise * @variation 2 */ /** * Callback as used by {@link google.cloud.asset.v1.AssetService|batchGetAssetsHistory}. * @memberof google.cloud.asset.v1.AssetService * @typedef BatchGetAssetsHistoryCallback * @type {function} * @param {Error|null} error Error, if any * @param {google.cloud.asset.v1.BatchGetAssetsHistoryResponse} [response] BatchGetAssetsHistoryResponse */ /** * Calls BatchGetAssetsHistory. * @function batchGetAssetsHistory * @memberof google.cloud.asset.v1.AssetService * @instance * @param {google.cloud.asset.v1.IBatchGetAssetsHistoryRequest} request BatchGetAssetsHistoryRequest message or plain object * @param {google.cloud.asset.v1.AssetService.BatchGetAssetsHistoryCallback} callback Node-style callback called with the error, if any, and BatchGetAssetsHistoryResponse * @returns {undefined} * @variation 1 */ Object.defineProperty(AssetService.prototype.batchGetAssetsHistory = function batchGetAssetsHistory(request, callback) { return this.rpcCall(batchGetAssetsHistory, $root.google.cloud.asset.v1.BatchGetAssetsHistoryRequest, $root.google.cloud.asset.v1.BatchGetAssetsHistoryResponse, request, callback); }, "name", { value: "BatchGetAssetsHistory" }); /** * Calls BatchGetAssetsHistory. * @function batchGetAssetsHistory * @memberof google.cloud.asset.v1.AssetService * @instance * @param {google.cloud.asset.v1.IBatchGetAssetsHistoryRequest} request BatchGetAssetsHistoryRequest message or plain object * @returns {Promise<google.cloud.asset.v1.BatchGetAssetsHistoryResponse>} Promise * @variation 2 */ /** * Callback as used by {@link google.cloud.asset.v1.AssetService|createFeed}. * @memberof google.cloud.asset.v1.AssetService * @typedef CreateFeedCallback * @type {function} * @param {Error|null} error Error, if any * @param {google.cloud.asset.v1.Feed} [response] Feed */ /** * Calls CreateFeed. * @function createFeed * @memberof google.cloud.asset.v1.AssetService * @instance * @param {google.cloud.asset.v1.ICreateFeedRequest} request CreateFeedRequest message or plain object * @param {google.cloud.asset.v1.AssetService.CreateFeedCallback} callback Node-style callback called with the error, if any, and Feed * @returns {undefined} * @variation 1 */ Object.defineProperty(AssetService.prototype.createFeed = function createFeed(request, callback) { return this.rpcCall(createFeed, $root.google.cloud.asset.v1.CreateFeedRequest, $root.google.cloud.asset.v1.Feed, request, callback); }, "name", { value: "CreateFeed" }); /** * Calls CreateFeed. * @function createFeed * @memberof google.cloud.asset.v1.AssetService * @instance * @param {google.cloud.asset.v1.ICreateFeedRequest} request CreateFeedRequest message or plain object * @returns {Promise<google.cloud.asset.v1.Feed>} Promise * @variation 2 */ /** * Callback as used by {@link google.cloud.asset.v1.AssetService|getFeed}. * @memberof google.cloud.asset.v1.AssetService * @typedef GetFeedCallback * @type {function} * @param {Error|null} error Error, if any * @param {google.cloud.asset.v1.Feed} [response] Feed */ /** * Calls GetFeed. * @function getFeed * @memberof google.cloud.asset.v1.AssetService * @instance * @param {google.cloud.asset.v1.IGetFeedRequest} request GetFeedRequest message or plain object * @param {google.cloud.asset.v1.AssetService.GetFeedCallback} callback Node-style callback called with the error, if any, and Feed * @returns {undefined} * @variation 1 */ Object.defineProperty(AssetService.prototype.getFeed = function getFeed(request, callback) { return this.rpcCall(getFeed, $root.google.cloud.asset.v1.GetFeedRequest, $root.google.cloud.asset.v1.Feed, request, callback); }, "name", { value: "GetFeed" }); /** * Calls GetFeed. * @function getFeed * @memberof google.cloud.asset.v1.AssetService * @instance * @param {google.cloud.asset.v1.IGetFeedRequest} request GetFeedRequest message or plain object * @returns {Promise<google.cloud.asset.v1.Feed>} Promise * @variation 2 */ /** * Callback as used by {@link google.cloud.asset.v1.AssetService|listFeeds}. * @memberof google.cloud.asset.v1.AssetService * @typedef ListFeedsCallback * @type {function} * @param {Error|null} error Error, if any * @param {google.cloud.asset.v1.ListFeedsResponse} [response] ListFeedsResponse */ /** * Calls ListFeeds. * @function listFeeds * @memberof google.cloud.asset.v1.AssetService * @instance * @param {google.cloud.asset.v1.IListFeedsRequest} request ListFeedsRequest message or plain object * @param {google.cloud.asset.v1.AssetService.ListFeedsCallback} callback Node-style callback called with the error, if any, and ListFeedsResponse * @returns {undefined} * @variation 1 */ Object.defineProperty(AssetService.prototype.listFeeds = function listFeeds(request, callback) { return this.rpcCall(listFeeds, $root.google.cloud.asset.v1.ListFeedsRequest, $root.google.cloud.asset.v1.ListFeedsResponse, request, callback); }, "name", { value: "ListFeeds" }); /** * Calls ListFeeds. * @function listFeeds * @memberof google.cloud.asset.v1.AssetService * @instance * @param {google.cloud.asset.v1.IListFeedsRequest} request ListFeedsRequest message or plain object * @returns {Promise<google.cloud.asset.v1.ListFeedsResponse>} Promise * @variation 2 */ /** * Callback as used by {@link google.cloud.asset.v1.AssetService|updateFeed}. * @memberof google.cloud.asset.v1.AssetService * @typedef UpdateFeedCallback * @type {function} * @param {Error|null} error Error, if any * @param {google.cloud.asset.v1.Feed} [response] Feed */ /** * Calls UpdateFeed. * @function updateFeed * @memberof google.cloud.asset.v1.AssetService * @instance * @param {google.cloud.asset.v1.IUpdateFeedRequest} request UpdateFeedRequest message or plain object * @param {google.cloud.asset.v1.AssetService.UpdateFeedCallback} callback Node-style callback called with the error, if any, and Feed * @returns {undefined} * @variation 1 */ Object.defineProperty(AssetService.prototype.updateFeed = function updateFeed(request, callback) { return this.rpcCall(updateFeed, $root.google.cloud.asset.v1.UpdateFeedRequest, $root.google.cloud.asset.v1.Feed, request, callback); }, "name", { value: "UpdateFeed" }); /** * Calls UpdateFeed. * @function updateFeed * @memberof google.cloud.asset.v1.AssetService * @instance * @param {google.cloud.asset.v1.IUpdateFeedRequest} request UpdateFeedRequest message or plain object * @returns {Promise<google.cloud.asset.v1.Feed>} Promise * @variation 2 */ /** * Callback as used by {@link google.cloud.asset.v1.AssetService|deleteFeed}. * @memberof google.cloud.asset.v1.AssetService * @typedef DeleteFeedCallback * @type {function} * @param {Error|null} error Error, if any * @param {google.protobuf.Empty} [response] Empty */ /** * Calls DeleteFeed. * @function deleteFeed * @memberof google.cloud.asset.v1.AssetService * @instance * @param {google.cloud.asset.v1.IDeleteFeedRequest} request DeleteFeedRequest message or plain object * @param {google.cloud.asset.v1.AssetService.DeleteFeedCallback} callback Node-style callback called with the error, if any, and Empty * @returns {undefined} * @variation 1 */ Object.defineProperty(AssetService.prototype.deleteFeed = function deleteFeed(request, callback) { return this.rpcCall(deleteFeed, $root.google.cloud.asset.v1.DeleteFeedRequest, $root.google.protobuf.Empty, request, callback); }, "name", { value: "DeleteFeed" }); /** * Calls DeleteFeed. * @function deleteFeed * @memberof google.cloud.asset.v1.AssetService * @instance * @param {google.cloud.asset.v1.IDeleteFeedRequest} request DeleteFeedRequest message or plain object * @returns {Promise<google.protobuf.Empty>} Promise * @variation 2 */ /** * Callback as used by {@link google.cloud.asset.v1.AssetService|searchAllResources}. * @memberof google.cloud.asset.v1.AssetService * @typedef SearchAllResourcesCallback * @type {function} * @param {Error|null} error Error, if any * @param {google.cloud.asset.v1.SearchAllResourcesResponse} [response] SearchAllResourcesResponse */ /** * Calls SearchAllResources. * @function searchAllResources * @memberof google.cloud.asset.v1.AssetService * @instance * @param {google.cloud.asset.v1.ISearchAllResourcesRequest} request SearchAllResourcesRequest message or plain object * @param {google.cloud.asset.v1.AssetService.SearchAllResourcesCallback} callback Node-style callback called with the error, if any, and SearchAllResourcesResponse * @returns {undefined} * @variation 1 */ Object.defineProperty(AssetService.prototype.searchAllResources = function searchAllResources(request, callback) { return this.rpcCall(searchAllResources, $root.google.cloud.asset.v1.SearchAllResourcesRequest, $root.google.cloud.asset.v1.SearchAllResourcesResponse, request, callback); }, "name", { value: "SearchAllResources" }); /** * Calls SearchAllResources. * @function searchAllResources * @memberof google.cloud.asset.v1.AssetService * @instance * @param {google.cloud.asset.v1.ISearchAllResourcesRequest} request SearchAllResourcesRequest message or plain object * @returns {Promise<google.cloud.asset.v1.SearchAllResourcesResponse>} Promise * @variation 2 */ /** * Callback as used by {@link google.cloud.asset.v1.AssetService|searchAllIamPolicies}. * @memberof google.cloud.asset.v1.AssetService * @typedef SearchAllIamPoliciesCallback * @type {function} * @param {Error|null} error Error, if any * @param {google.cloud.asset.v1.SearchAllIamPoliciesResponse} [response] SearchAllIamPoliciesResponse */ /** * Calls SearchAllIamPolicies. * @function searchAllIamPolicies * @memberof google.cloud.asset.v1.AssetService * @instance * @param {google.cloud.asset.v1.ISearchAllIamPoliciesRequest} request SearchAllIamPoliciesRequest message or plain object * @param {google.cloud.asset.v1.AssetService.SearchAllIamPoliciesCallback} callback Node-style callback called with the error, if any, and SearchAllIamPoliciesResponse * @returns {undefined} * @variation 1 */ Object.defineProperty(AssetService.prototype.searchAllIamPolicies = function searchAllIamPolicies(request, callback) { return this.rpcCall(searchAllIamPolicies, $root.google.cloud.asset.v1.SearchAllIamPoliciesRequest, $root.google.cloud.asset.v1.SearchAllIamPoliciesResponse, request, callback); }, "name", { value: "SearchAllIamPolicies" }); /** * Calls SearchAllIamPolicies. * @function searchAllIamPolicies * @memberof google.cloud.asset.v1.AssetService * @instance * @param {google.cloud.asset.v1.ISearchAllIamPoliciesRequest} request SearchAllIamPoliciesRequest message or plain object * @returns {Promise<google.cloud.asset.v1.SearchAllIamPoliciesResponse>} Promise * @variation 2 */ /** * Callback as used by {@link google.cloud.asset.v1.AssetService|analyzeIamPolicy}. * @memberof google.cloud.asset.v1.AssetService * @typedef AnalyzeIamPolicyCallback * @type {function} * @param {Error|null} error Error, if any * @param {google.cloud.asset.v1.AnalyzeIamPolicyResponse} [response] AnalyzeIamPolicyResponse */ /** * Calls AnalyzeIamPolicy. * @function analyzeIamPolicy * @memberof google.cloud.asset.v1.AssetService * @instance * @param {google.cloud.asset.v1.IAnalyzeIamPolicyRequest} request AnalyzeIamPolicyRequest message or plain object * @param {google.cloud.asset.v1.AssetService.AnalyzeIamPolicyCallback} callback Node-style callback called with the error, if any, and AnalyzeIamPolicyResponse * @returns {undefined} * @variation 1 */ Object.defineProperty(AssetService.prototype.analyzeIamPolicy = function analyzeIamPolicy(request, callback) { return this.rpcCall(analyzeIamPolicy, $root.google.cloud.asset.v1.AnalyzeIamPolicyRequest, $root.google.cloud.asset.v1.AnalyzeIamPolicyResponse, request, callback); }, "name", { value: "AnalyzeIamPolicy" }); /** * Calls AnalyzeIamPolicy. * @function analyzeIamPolicy * @memberof google.cloud.asset.v1.AssetService * @instance * @param {google.cloud.asset.v1.IAnalyzeIamPolicyRequest} request AnalyzeIamPolicyRequest message or plain object * @returns {Promise<google.cloud.asset.v1.AnalyzeIamPolicyResponse>} Promise * @variation 2 */ /** * Callback as used by {@link google.cloud.asset.v1.AssetService|analyzeIamPolicyLongrunning}. * @memberof google.cloud.asset.v1.AssetService * @typedef AnalyzeIamPolicyLongrunningCallback * @type {function} * @param {Error|null} error Error, if any * @param {google.longrunning.Operation} [response] Operation */ /** * Calls AnalyzeIamPolicyLongrunning. * @function analyzeIamPolicyLongrunning * @memberof google.cloud.asset.v1.AssetService * @instance * @param {google.cloud.asset.v1.IAnalyzeIamPolicyLongrunningRequest} request AnalyzeIamPolicyLongrunningRequest message or plain object * @param {google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunningCallback} callback Node-style callback called with the error, if any, and Operation * @returns {undefined} * @variation 1 */ Object.defineProperty(AssetService.prototype.analyzeIamPolicyLongrunning = function analyzeIamPolicyLongrunning(request, callback) { return this.rpcCall(analyzeIamPolicyLongrunning, $root.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "AnalyzeIamPolicyLongrunning" }); /** * Calls AnalyzeIamPolicyLongrunning. * @function analyzeIamPolicyLongrunning * @memberof google.cloud.asset.v1.AssetService * @instance * @param {google.cloud.asset.v1.IAnalyzeIamPolicyLongrunningRequest} request AnalyzeIamPolicyLongrunningRequest message or plain object * @returns {Promise<google.longrunning.Operation>} Promise * @variation 2 */ /** * Callback as used by {@link google.cloud.asset.v1.AssetService|analyzeMove}. * @memberof google.cloud.asset.v1.AssetService * @typedef AnalyzeMoveCallback * @type {function} * @param {Error|null} error Error, if any * @param {google.cloud.asset.v1.AnalyzeMoveResponse} [response] AnalyzeMoveResponse */ /** * Calls AnalyzeMove. * @function analyzeMove * @memberof google.cloud.asset.v1.AssetService * @instance * @param {google.cloud.asset.v1.IAnalyzeMoveRequest} request AnalyzeMoveRequest message or plain object * @param {google.cloud.asset.v1.AssetService.AnalyzeMoveCallback} callback Node-style callback called with the error, if any, and AnalyzeMoveResponse * @returns {undefined} * @variation 1 */ Object.defineProperty(AssetService.prototype.analyzeMove = function analyzeMove(request, callback) { return this.rpcCall(analyzeMove, $root.google.cloud.asset.v1.AnalyzeMoveRequest, $root.google.cloud.asset.v1.AnalyzeMoveResponse, request, callback); }, "name", { value: "AnalyzeMove" }); /** * Calls AnalyzeMove. * @function analyzeMove * @memberof google.cloud.asset.v1.AssetService * @instance * @param {google.cloud.asset.v1.IAnalyzeMoveRequest} request AnalyzeMoveRequest message or plain object * @returns {Promise<google.cloud.asset.v1.AnalyzeMoveResponse>} Promise * @variation 2 */ /** * Callback as used by {@link google.cloud.asset.v1.AssetService|queryAssets}. * @memberof google.cloud.asset.v1.AssetService * @typedef QueryAssetsCallback * @type {function} * @param {Error|null} error Error, if any * @param {google.cloud.asset.v1.QueryAssetsResponse} [response] QueryAssetsResponse */ /** * Calls QueryAssets. * @function queryAssets * @memberof google.cloud.asset.v1.AssetService * @instance * @param {google.cloud.asset.v1.IQueryAssetsRequest} request QueryAssetsRequest message or plain object * @param {google.cloud.asset.v1.AssetService.QueryAssetsCallback} callback Node-style callback called with the error, if any, and QueryAssetsResponse * @returns {undefined} * @variation 1 */ Object.defineProperty(AssetService.prototype.queryAssets = function queryAssets(request, callback) { return this.rpcCall(queryAssets, $root.google.cloud.asset.v1.QueryAssetsRequest, $root.google.cloud.asset.v1.QueryAssetsResponse, request, callback); }, "name", { value: "QueryAssets" }); /** * Calls QueryAssets. * @function queryAssets * @memberof google.cloud.asset.v1.AssetService * @instance * @param {google.cloud.asset.v1.IQueryAssetsRequest} request QueryAssetsRequest message or plain object * @returns {Promise<google.cloud.asset.v1.QueryAssetsResponse>} Promise * @variation 2 */ /** * Callback as used by {@link google.cloud.asset.v1.AssetService|createSavedQuery}. * @memberof google.cloud.asset.v1.AssetService * @typedef CreateSavedQueryCallback * @type {function} * @param {Error|null} error Error, if any * @param {google.cloud.asset.v1.SavedQuery} [response] SavedQuery */ /** * Calls CreateSavedQuery. * @function createSavedQuery * @memberof google.cloud.asset.v1.AssetService * @instance * @param {google.cloud.asset.v1.ICreateSavedQueryRequest} request CreateSavedQueryRequest message or plain object * @param {google.cloud.asset.v1.AssetService.CreateSavedQueryCallback} callback Node-style callback called with the error, if any, and SavedQuery * @returns {undefined} * @variation 1 */ Object.defineProperty(AssetService.prototype.createSavedQuery = function createSavedQuery(request, callback) { return this.rpcCall(createSavedQuery, $root.google.cloud.asset.v1.CreateSavedQueryRequest, $root.google.cloud.asset.v1.SavedQuery, request, callback); }, "name", { value: "CreateSavedQuery" }); /** * Calls CreateSavedQuery. * @function createSavedQuery * @memberof google.cloud.asset.v1.AssetService * @instance * @param {google.cloud.asset.v1.ICreateSavedQueryRequest} request CreateSavedQueryRequest message or plain object * @returns {Promise<google.cloud.asset.v1.SavedQuery>} Promise * @variation 2 */ /** * Callback as used by {@link google.cloud.asset.v1.AssetService|getSavedQuery}. * @memberof google.cloud.asset.v1.AssetService * @typedef GetSavedQueryCallback * @type {function} * @param {Error|null} error Error, if any * @param {google.cloud.asset.v1.SavedQuery} [response] SavedQuery */ /** * Calls GetSavedQuery. * @function getSavedQuery * @memberof google.cloud.asset.v1.AssetService * @instance * @param {google.cloud.asset.v1.IGetSavedQueryRequest} request GetSavedQueryRequest message or plain object * @param {google.cloud.asset.v1.AssetService.GetSavedQueryCallback} callback Node-style callback called with the error, if any, and SavedQuery * @returns {undefined} * @variation 1 */ Object.defineProperty(AssetService.prototype.getSaved