diff --git a/packages/google-cloud-asset/linkinator.config.json b/packages/google-cloud-asset/linkinator.config.json index 29a223b6db6..0121dfa684f 100644 --- a/packages/google-cloud-asset/linkinator.config.json +++ b/packages/google-cloud-asset/linkinator.config.json @@ -6,5 +6,5 @@ "img.shields.io" ], "silent": true, - "concurrency": 10 + "concurrency": 5 } diff --git a/packages/google-cloud-asset/samples/generated/v1/asset_service.analyze_iam_policy.js b/packages/google-cloud-asset/samples/generated/v1/asset_service.analyze_iam_policy.js index 5d7f2cc17da..f36a4e9630a 100644 --- a/packages/google-cloud-asset/samples/generated/v1/asset_service.analyze_iam_policy.js +++ b/packages/google-cloud-asset/samples/generated/v1/asset_service.analyze_iam_policy.js @@ -22,10 +22,10 @@ function main(analysisQuery) { /** * Required. The request query. */ - // const analysisQuery = '' + // const analysisQuery = {} /** * Optional. Amount of time executable has to complete. See JSON representation of - * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json). + * Duration (https://developers.google.com/protocol-buffers/docs/proto3#json). * If this field is set with a value less than the RPC deadline, and the * execution of your query hasn't finished in the specified * execution timeout, you will get a response with partial result. @@ -33,7 +33,7 @@ function main(analysisQuery) { * If it's not finished until then, you will get a DEADLINE_EXCEEDED error. * Default is empty. */ - // const executionTimeout = '' + // const executionTimeout = {} // Imports the Asset library const {AssetServiceClient} = require('@google-cloud/asset').v1; @@ -41,7 +41,7 @@ function main(analysisQuery) { // Instantiates a client const assetClient = new AssetServiceClient(); - async function analyzeIamPolicy() { + async function callAnalyzeIamPolicy() { // Construct request const request = { analysisQuery, @@ -52,7 +52,7 @@ function main(analysisQuery) { console.log(response); } - analyzeIamPolicy(); + callAnalyzeIamPolicy(); // [END cloudasset_v1_generated_AssetService_AnalyzeIamPolicy_async] } diff --git a/packages/google-cloud-asset/samples/generated/v1/asset_service.analyze_iam_policy_longrunning.js b/packages/google-cloud-asset/samples/generated/v1/asset_service.analyze_iam_policy_longrunning.js index 6570bd6220d..28548a8a30f 100644 --- a/packages/google-cloud-asset/samples/generated/v1/asset_service.analyze_iam_policy_longrunning.js +++ b/packages/google-cloud-asset/samples/generated/v1/asset_service.analyze_iam_policy_longrunning.js @@ -22,11 +22,11 @@ function main(analysisQuery, outputConfig) { /** * Required. The request query. */ - // const analysisQuery = '' + // const analysisQuery = {} /** * Required. Output configuration indicating where the results will be output to. */ - // const outputConfig = '' + // const outputConfig = {} // Imports the Asset library const {AssetServiceClient} = require('@google-cloud/asset').v1; @@ -34,7 +34,7 @@ function main(analysisQuery, outputConfig) { // Instantiates a client const assetClient = new AssetServiceClient(); - async function analyzeIamPolicyLongrunning() { + async function callAnalyzeIamPolicyLongrunning() { // Construct request const request = { analysisQuery, @@ -47,7 +47,7 @@ function main(analysisQuery, outputConfig) { console.log(response); } - analyzeIamPolicyLongrunning(); + callAnalyzeIamPolicyLongrunning(); // [END cloudasset_v1_generated_AssetService_AnalyzeIamPolicyLongrunning_async] } diff --git a/packages/google-cloud-asset/samples/generated/v1/asset_service.analyze_move.js b/packages/google-cloud-asset/samples/generated/v1/asset_service.analyze_move.js index 0df32716ef5..e6ea142b34f 100644 --- a/packages/google-cloud-asset/samples/generated/v1/asset_service.analyze_move.js +++ b/packages/google-cloud-asset/samples/generated/v1/asset_service.analyze_move.js @@ -38,7 +38,7 @@ function main(resource, destinationParent) { * Analysis view indicating what information should be included in the * analysis response. If unspecified, the default view is FULL. */ - // const view = '' + // const view = {} // Imports the Asset library const {AssetServiceClient} = require('@google-cloud/asset').v1; @@ -46,7 +46,7 @@ function main(resource, destinationParent) { // Instantiates a client const assetClient = new AssetServiceClient(); - async function analyzeMove() { + async function callAnalyzeMove() { // Construct request const request = { resource, @@ -58,7 +58,7 @@ function main(resource, destinationParent) { console.log(response); } - analyzeMove(); + callAnalyzeMove(); // [END cloudasset_v1_generated_AssetService_AnalyzeMove_async] } diff --git a/packages/google-cloud-asset/samples/generated/v1/asset_service.batch_get_assets_history.js b/packages/google-cloud-asset/samples/generated/v1/asset_service.batch_get_assets_history.js index 651d1555c8e..60230130817 100644 --- a/packages/google-cloud-asset/samples/generated/v1/asset_service.batch_get_assets_history.js +++ b/packages/google-cloud-asset/samples/generated/v1/asset_service.batch_get_assets_history.js @@ -37,7 +37,7 @@ function main(parent) { /** * Optional. The content type. */ - // const contentType = '' + // const contentType = {} /** * Optional. The time window for the asset history. Both start_time and * end_time are optional and if set, it must be after the current time minus @@ -46,23 +46,23 @@ function main(parent) { * returned. The returned results contain all temporal assets whose time * window overlap with read_time_window. */ - // const readTimeWindow = '' + // const readTimeWindow = {} /** * Optional. A list of relationship types to output, for example: * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if * content_type=RELATIONSHIP. * * If specified: - * it outputs specified relationships' history on the [asset_names]. It - * returns an error if any of the [relationship_types] doesn't belong to the - * supported relationship types of the [asset_names] or if any of the - * [asset_names]'s types doesn't belong to the source types of the - * [relationship_types]. + * it outputs specified relationships' history on the asset_names. It + * returns an error if any of the relationship_types doesn't belong to the + * supported relationship types of the asset_names or if any of the + * asset_names's types doesn't belong to the source types of the + * relationship_types. * * Otherwise: - * it outputs the supported relationships' history on the [asset_names] or - * returns an error if any of the [asset_names]'s types has no relationship + * it outputs the supported relationships' history on the asset_names or + * returns an error if any of the asset_names's types has no relationship * support. - * See [Introduction to Cloud Asset - * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all + * See Introduction to Cloud Asset + * Inventory (https://cloud.google.com/asset-inventory/docs/overview) for all * supported asset types and relationship types. */ // const relationshipTypes = 'abc123' @@ -73,7 +73,7 @@ function main(parent) { // Instantiates a client const assetClient = new AssetServiceClient(); - async function batchGetAssetsHistory() { + async function callBatchGetAssetsHistory() { // Construct request const request = { parent, @@ -84,7 +84,7 @@ function main(parent) { console.log(response); } - batchGetAssetsHistory(); + callBatchGetAssetsHistory(); // [END cloudasset_v1_generated_AssetService_BatchGetAssetsHistory_async] } diff --git a/packages/google-cloud-asset/samples/generated/v1/asset_service.create_feed.js b/packages/google-cloud-asset/samples/generated/v1/asset_service.create_feed.js index 05d24467524..216f98b4f0c 100644 --- a/packages/google-cloud-asset/samples/generated/v1/asset_service.create_feed.js +++ b/packages/google-cloud-asset/samples/generated/v1/asset_service.create_feed.js @@ -39,7 +39,7 @@ function main(parent, feedId, feed) { * folders/folder_number/feeds/feed_id * organizations/organization_number/feeds/feed_id */ - // const feed = '' + // const feed = {} // Imports the Asset library const {AssetServiceClient} = require('@google-cloud/asset').v1; @@ -47,7 +47,7 @@ function main(parent, feedId, feed) { // Instantiates a client const assetClient = new AssetServiceClient(); - async function createFeed() { + async function callCreateFeed() { // Construct request const request = { parent, @@ -60,7 +60,7 @@ function main(parent, feedId, feed) { console.log(response); } - createFeed(); + callCreateFeed(); // [END cloudasset_v1_generated_AssetService_CreateFeed_async] } diff --git a/packages/google-cloud-asset/samples/generated/v1/asset_service.delete_feed.js b/packages/google-cloud-asset/samples/generated/v1/asset_service.delete_feed.js index e72349b3130..74fd1a9fa22 100644 --- a/packages/google-cloud-asset/samples/generated/v1/asset_service.delete_feed.js +++ b/packages/google-cloud-asset/samples/generated/v1/asset_service.delete_feed.js @@ -33,7 +33,7 @@ function main(name) { // Instantiates a client const assetClient = new AssetServiceClient(); - async function deleteFeed() { + async function callDeleteFeed() { // Construct request const request = { name, @@ -44,7 +44,7 @@ function main(name) { console.log(response); } - deleteFeed(); + callDeleteFeed(); // [END cloudasset_v1_generated_AssetService_DeleteFeed_async] } diff --git a/packages/google-cloud-asset/samples/generated/v1/asset_service.export_assets.js b/packages/google-cloud-asset/samples/generated/v1/asset_service.export_assets.js index ef338fd65fe..28684b3b8f6 100644 --- a/packages/google-cloud-asset/samples/generated/v1/asset_service.export_assets.js +++ b/packages/google-cloud-asset/samples/generated/v1/asset_service.export_assets.js @@ -33,7 +33,7 @@ function main(parent, outputConfig) { * data collection and indexing, there is a volatile window during which * running the same query may get different results. */ - // const readTime = '' + // const readTime = {} /** * A list of asset types to take a snapshot for. For example: * "compute.googleapis.com/Disk". @@ -42,12 +42,12 @@ function main(parent, outputConfig) { * with "compute.googleapis.com". * * ".*Instance" snapshots resources whose asset type ends with "Instance". * * ".*Instance.*" snapshots resources whose asset type contains "Instance". - * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported + * See RE2 (https://github.com/google/re2/wiki/Syntax) for all supported * regular expression syntax. If the regular expression does not match any * supported asset type, an INVALID_ARGUMENT error will be returned. * If specified, only matching assets will be returned, otherwise, it will - * snapshot all asset types. See [Introduction to Cloud Asset - * Inventory](https://cloud.google.com/asset-inventory/docs/overview) + * snapshot all asset types. See Introduction to Cloud Asset + * Inventory (https://cloud.google.com/asset-inventory/docs/overview) * for all supported asset types. */ // const assetTypes = 'abc123' @@ -55,26 +55,26 @@ function main(parent, outputConfig) { * Asset content type. If not specified, no content but the asset name will be * returned. */ - // const contentType = '' + // const contentType = {} /** * Required. Output configuration indicating where the results will be output to. */ - // const outputConfig = '' + // const outputConfig = {} /** * A list of relationship types to export, for example: * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if * content_type=RELATIONSHIP. * * If specified: * it snapshots specified relationships. It returns an error if - * any of the [relationship_types] doesn't belong to the supported - * relationship types of the [asset_types] or if any of the [asset_types] - * doesn't belong to the source types of the [relationship_types]. + * any of the relationship_types doesn't belong to the supported + * relationship types of the asset_types or if any of the asset_types + * doesn't belong to the source types of the relationship_types. * * Otherwise: - * it snapshots the supported relationships for all [asset_types] or returns - * an error if any of the [asset_types] has no relationship support. + * it snapshots the supported relationships for all asset_types or returns + * an error if any of the asset_types has no relationship support. * An unspecified asset types field means all supported asset_types. - * See [Introduction to Cloud Asset - * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all + * See Introduction to Cloud Asset + * Inventory (https://cloud.google.com/asset-inventory/docs/overview) for all * supported asset types and relationship types. */ // const relationshipTypes = 'abc123' @@ -85,7 +85,7 @@ function main(parent, outputConfig) { // Instantiates a client const assetClient = new AssetServiceClient(); - async function exportAssets() { + async function callExportAssets() { // Construct request const request = { parent, @@ -98,7 +98,7 @@ function main(parent, outputConfig) { console.log(response); } - exportAssets(); + callExportAssets(); // [END cloudasset_v1_generated_AssetService_ExportAssets_async] } diff --git a/packages/google-cloud-asset/samples/generated/v1/asset_service.get_feed.js b/packages/google-cloud-asset/samples/generated/v1/asset_service.get_feed.js index eeda3a194ac..d402cba1d04 100644 --- a/packages/google-cloud-asset/samples/generated/v1/asset_service.get_feed.js +++ b/packages/google-cloud-asset/samples/generated/v1/asset_service.get_feed.js @@ -33,7 +33,7 @@ function main(name) { // Instantiates a client const assetClient = new AssetServiceClient(); - async function getFeed() { + async function callGetFeed() { // Construct request const request = { name, @@ -44,7 +44,7 @@ function main(name) { console.log(response); } - getFeed(); + callGetFeed(); // [END cloudasset_v1_generated_AssetService_GetFeed_async] } diff --git a/packages/google-cloud-asset/samples/generated/v1/asset_service.list_assets.js b/packages/google-cloud-asset/samples/generated/v1/asset_service.list_assets.js index 84556de5da4..57410a2936d 100644 --- a/packages/google-cloud-asset/samples/generated/v1/asset_service.list_assets.js +++ b/packages/google-cloud-asset/samples/generated/v1/asset_service.list_assets.js @@ -33,7 +33,7 @@ function main(parent) { * data collection and indexing, there is a volatile window during which * running the same query may get different results. */ - // const readTime = '' + // const readTime = {} /** * A list of asset types to take a snapshot for. For example: * "compute.googleapis.com/Disk". @@ -42,12 +42,12 @@ function main(parent) { * with "compute.googleapis.com". * * ".*Instance" snapshots resources whose asset type ends with "Instance". * * ".*Instance.*" snapshots resources whose asset type contains "Instance". - * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported + * See RE2 (https://github.com/google/re2/wiki/Syntax) for all supported * regular expression syntax. If the regular expression does not match any * supported asset type, an INVALID_ARGUMENT error will be returned. * If specified, only matching assets will be returned, otherwise, it will - * snapshot all asset types. See [Introduction to Cloud Asset - * Inventory](https://cloud.google.com/asset-inventory/docs/overview) + * snapshot all asset types. See Introduction to Cloud Asset + * Inventory (https://cloud.google.com/asset-inventory/docs/overview) * for all supported asset types. */ // const assetTypes = 'abc123' @@ -55,7 +55,7 @@ function main(parent) { * Asset content type. If not specified, no content but the asset name will * be returned. */ - // const contentType = '' + // const contentType = {} /** * The maximum number of assets to be returned in a single response. Default * is 100, minimum is 1, and maximum is 1000. @@ -73,15 +73,15 @@ function main(parent) { * content_type=RELATIONSHIP. * * If specified: * it snapshots specified relationships. It returns an error if - * any of the [relationship_types] doesn't belong to the supported - * relationship types of the [asset_types] or if any of the [asset_types] - * doesn't belong to the source types of the [relationship_types]. + * any of the relationship_types doesn't belong to the supported + * relationship types of the asset_types or if any of the asset_types + * doesn't belong to the source types of the relationship_types. * * Otherwise: - * it snapshots the supported relationships for all [asset_types] or returns - * an error if any of the [asset_types] has no relationship support. + * it snapshots the supported relationships for all asset_types or returns + * an error if any of the asset_types has no relationship support. * An unspecified asset types field means all supported asset_types. - * See [Introduction to Cloud Asset - * Inventory](https://cloud.google.com/asset-inventory/docs/overview) + * See Introduction to Cloud Asset + * Inventory (https://cloud.google.com/asset-inventory/docs/overview) * for all supported asset types and relationship types. */ // const relationshipTypes = 'abc123' @@ -92,7 +92,7 @@ function main(parent) { // Instantiates a client const assetClient = new AssetServiceClient(); - async function listAssets() { + async function callListAssets() { // Construct request const request = { parent, @@ -105,7 +105,7 @@ function main(parent) { } } - listAssets(); + callListAssets(); // [END cloudasset_v1_generated_AssetService_ListAssets_async] } diff --git a/packages/google-cloud-asset/samples/generated/v1/asset_service.list_feeds.js b/packages/google-cloud-asset/samples/generated/v1/asset_service.list_feeds.js index 97476d935b1..e94a7aa304f 100644 --- a/packages/google-cloud-asset/samples/generated/v1/asset_service.list_feeds.js +++ b/packages/google-cloud-asset/samples/generated/v1/asset_service.list_feeds.js @@ -32,7 +32,7 @@ function main(parent) { // Instantiates a client const assetClient = new AssetServiceClient(); - async function listFeeds() { + async function callListFeeds() { // Construct request const request = { parent, @@ -43,7 +43,7 @@ function main(parent) { console.log(response); } - listFeeds(); + callListFeeds(); // [END cloudasset_v1_generated_AssetService_ListFeeds_async] } diff --git a/packages/google-cloud-asset/samples/generated/v1/asset_service.search_all_iam_policies.js b/packages/google-cloud-asset/samples/generated/v1/asset_service.search_all_iam_policies.js index 9b3dd1b53b1..acc4033d91f 100644 --- a/packages/google-cloud-asset/samples/generated/v1/asset_service.search_all_iam_policies.js +++ b/packages/google-cloud-asset/samples/generated/v1/asset_service.search_all_iam_policies.js @@ -23,7 +23,7 @@ function main(scope) { * Required. A scope can be a project, a folder, or an organization. The search is * limited to the IAM policies within the `scope`. The caller must be granted * the - * [`cloudasset.assets.searchAllIamPolicies`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions) + * `cloudasset.assets.searchAllIamPolicies` (https://cloud.google.com/asset-inventory/docs/access-control#required_permissions) * permission on the desired scope. * The allowed values are: * * projects/{PROJECT_ID} (e.g., "projects/foo-bar") @@ -33,15 +33,15 @@ function main(scope) { */ // const scope = 'abc123' /** - * Optional. The query statement. See [how to construct a - * query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query) + * Optional. The query statement. See how to construct a + * query (https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query) * for more information. If not specified or empty, it will search all the * IAM policies within the specified `scope`. Note that the query string is * compared against each Cloud IAM policy binding, including its members, * roles, and Cloud IAM conditions. The returned Cloud IAM policies will only * contain the bindings that match your query. To learn more about the IAM - * policy structure, see [IAM policy - * doc](https://cloud.google.com/iam/docs/policies#structure). + * policy structure, see IAM policy + * doc (https://cloud.google.com/iam/docs/policies#structure). * Examples: * * `policy:amy@gmail.com` to find IAM policy bindings that specify user * "amy@gmail.com". @@ -91,8 +91,8 @@ function main(scope) { // const pageToken = 'abc123' /** * Optional. A list of asset types that the IAM policies are attached to. If empty, it - * will search the IAM policies that are attached to all the [searchable asset - * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types). + * will search the IAM policies that are attached to all the searchable asset + * types (https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types). * Regular expressions are also supported. For example: * * "compute.googleapis.com.*" snapshots IAM policies attached to asset type * starts with "compute.googleapis.com". @@ -100,7 +100,7 @@ function main(scope) { * "Instance". * * ".*Instance.*" snapshots IAM policies attached to asset type contains * "Instance". - * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported + * See RE2 (https://github.com/google/re2/wiki/Syntax) for all supported * regular expression syntax. If the regular expression does not match any * supported asset type, an INVALID_ARGUMENT error will be returned. */ @@ -125,7 +125,7 @@ function main(scope) { // Instantiates a client const assetClient = new AssetServiceClient(); - async function searchAllIamPolicies() { + async function callSearchAllIamPolicies() { // Construct request const request = { scope, @@ -138,7 +138,7 @@ function main(scope) { } } - searchAllIamPolicies(); + callSearchAllIamPolicies(); // [END cloudasset_v1_generated_AssetService_SearchAllIamPolicies_async] } diff --git a/packages/google-cloud-asset/samples/generated/v1/asset_service.search_all_resources.js b/packages/google-cloud-asset/samples/generated/v1/asset_service.search_all_resources.js index 16c28272e40..1ec152145c9 100644 --- a/packages/google-cloud-asset/samples/generated/v1/asset_service.search_all_resources.js +++ b/packages/google-cloud-asset/samples/generated/v1/asset_service.search_all_resources.js @@ -22,7 +22,7 @@ function main(scope) { /** * Required. A scope can be a project, a folder, or an organization. The search is * limited to the resources within the `scope`. The caller must be granted the - * [`cloudasset.assets.searchAllResources`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions) + * `cloudasset.assets.searchAllResources` (https://cloud.google.com/asset-inventory/docs/access-control#required_permissions) * permission on the desired scope. * The allowed values are: * * projects/{PROJECT_ID} (e.g., "projects/foo-bar") @@ -32,8 +32,8 @@ function main(scope) { */ // const scope = 'abc123' /** - * Optional. The query statement. See [how to construct a - * query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query) + * Optional. The query statement. See how to construct a + * query (https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query) * for more information. If not specified or empty, it will search all the * resources within the specified `scope`. * Examples: @@ -74,14 +74,14 @@ function main(scope) { // const query = 'abc123' /** * Optional. A list of asset types that this request searches for. If empty, it will - * search all the [searchable asset - * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types). + * search all the searchable asset + * types (https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types). * Regular expressions are also supported. For example: * * "compute.googleapis.com.*" snapshots resources whose asset type starts * with "compute.googleapis.com". * * ".*Instance" snapshots resources whose asset type ends with "Instance". * * ".*Instance.*" snapshots resources whose asset type contains "Instance". - * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported + * See RE2 (https://github.com/google/re2/wiki/Syntax) for all supported * regular expression syntax. If the regular expression does not match any * supported asset type, an INVALID_ARGUMENT error will be returned. */ @@ -150,7 +150,7 @@ function main(scope) { * returned. * Any invalid field path will trigger INVALID_ARGUMENT error. */ - // const readMask = '' + // const readMask = {} // Imports the Asset library const {AssetServiceClient} = require('@google-cloud/asset').v1; @@ -158,7 +158,7 @@ function main(scope) { // Instantiates a client const assetClient = new AssetServiceClient(); - async function searchAllResources() { + async function callSearchAllResources() { // Construct request const request = { scope, @@ -171,7 +171,7 @@ function main(scope) { } } - searchAllResources(); + callSearchAllResources(); // [END cloudasset_v1_generated_AssetService_SearchAllResources_async] } diff --git a/packages/google-cloud-asset/samples/generated/v1/asset_service.update_feed.js b/packages/google-cloud-asset/samples/generated/v1/asset_service.update_feed.js index fc0b5b5aff4..7b8090fb5f4 100644 --- a/packages/google-cloud-asset/samples/generated/v1/asset_service.update_feed.js +++ b/packages/google-cloud-asset/samples/generated/v1/asset_service.update_feed.js @@ -26,13 +26,13 @@ function main(feed, updateMask) { * folders/folder_number/feeds/feed_id or * organizations/organization_number/feeds/feed_id. */ - // const feed = '' + // const feed = {} /** * Required. Only updates the `feed` fields indicated by this mask. * The field mask must not be empty, and it must not contain fields that * are immutable or only set by the server. */ - // const updateMask = '' + // const updateMask = {} // Imports the Asset library const {AssetServiceClient} = require('@google-cloud/asset').v1; @@ -40,7 +40,7 @@ function main(feed, updateMask) { // Instantiates a client const assetClient = new AssetServiceClient(); - async function updateFeed() { + async function callUpdateFeed() { // Construct request const request = { feed, @@ -52,7 +52,7 @@ function main(feed, updateMask) { console.log(response); } - updateFeed(); + callUpdateFeed(); // [END cloudasset_v1_generated_AssetService_UpdateFeed_async] } diff --git a/packages/google-cloud-asset/samples/generated/v1p1beta1/asset_service.search_all_iam_policies.js b/packages/google-cloud-asset/samples/generated/v1p1beta1/asset_service.search_all_iam_policies.js index ce7a4481d43..2879ca874c4 100644 --- a/packages/google-cloud-asset/samples/generated/v1p1beta1/asset_service.search_all_iam_policies.js +++ b/packages/google-cloud-asset/samples/generated/v1p1beta1/asset_service.search_all_iam_policies.js @@ -56,7 +56,7 @@ function main(scope) { // Instantiates a client const assetClient = new AssetServiceClient(); - async function searchAllIamPolicies() { + async function callSearchAllIamPolicies() { // Construct request const request = { scope, @@ -69,7 +69,7 @@ function main(scope) { } } - searchAllIamPolicies(); + callSearchAllIamPolicies(); // [END cloudasset_v1p1beta1_generated_AssetService_SearchAllIamPolicies_async] } diff --git a/packages/google-cloud-asset/samples/generated/v1p1beta1/asset_service.search_all_resources.js b/packages/google-cloud-asset/samples/generated/v1p1beta1/asset_service.search_all_resources.js index d5f28f1956c..856dcdbc27c 100644 --- a/packages/google-cloud-asset/samples/generated/v1p1beta1/asset_service.search_all_resources.js +++ b/packages/google-cloud-asset/samples/generated/v1p1beta1/asset_service.search_all_resources.js @@ -65,7 +65,7 @@ function main(scope) { // Instantiates a client const assetClient = new AssetServiceClient(); - async function searchAllResources() { + async function callSearchAllResources() { // Construct request const request = { scope, @@ -78,7 +78,7 @@ function main(scope) { } } - searchAllResources(); + callSearchAllResources(); // [END cloudasset_v1p1beta1_generated_AssetService_SearchAllResources_async] } diff --git a/packages/google-cloud-asset/samples/generated/v1p2beta1/asset_service.create_feed.js b/packages/google-cloud-asset/samples/generated/v1p2beta1/asset_service.create_feed.js index 9cae8dd8cd8..388cde9c84e 100644 --- a/packages/google-cloud-asset/samples/generated/v1p2beta1/asset_service.create_feed.js +++ b/packages/google-cloud-asset/samples/generated/v1p2beta1/asset_service.create_feed.js @@ -39,7 +39,7 @@ function main(parent, feedId, feed) { * folders/folder_number/feeds/feed_id * organizations/organization_number/feeds/feed_id */ - // const feed = '' + // const feed = {} // Imports the Asset library const {AssetServiceClient} = require('@google-cloud/asset').v1p2beta1; @@ -47,7 +47,7 @@ function main(parent, feedId, feed) { // Instantiates a client const assetClient = new AssetServiceClient(); - async function createFeed() { + async function callCreateFeed() { // Construct request const request = { parent, @@ -60,7 +60,7 @@ function main(parent, feedId, feed) { console.log(response); } - createFeed(); + callCreateFeed(); // [END cloudasset_v1p2beta1_generated_AssetService_CreateFeed_async] } diff --git a/packages/google-cloud-asset/samples/generated/v1p2beta1/asset_service.delete_feed.js b/packages/google-cloud-asset/samples/generated/v1p2beta1/asset_service.delete_feed.js index 4b8c15b0146..95368bbc74a 100644 --- a/packages/google-cloud-asset/samples/generated/v1p2beta1/asset_service.delete_feed.js +++ b/packages/google-cloud-asset/samples/generated/v1p2beta1/asset_service.delete_feed.js @@ -33,7 +33,7 @@ function main(name) { // Instantiates a client const assetClient = new AssetServiceClient(); - async function deleteFeed() { + async function callDeleteFeed() { // Construct request const request = { name, @@ -44,7 +44,7 @@ function main(name) { console.log(response); } - deleteFeed(); + callDeleteFeed(); // [END cloudasset_v1p2beta1_generated_AssetService_DeleteFeed_async] } diff --git a/packages/google-cloud-asset/samples/generated/v1p2beta1/asset_service.get_feed.js b/packages/google-cloud-asset/samples/generated/v1p2beta1/asset_service.get_feed.js index c0fdb7a9e80..e1114eb44b5 100644 --- a/packages/google-cloud-asset/samples/generated/v1p2beta1/asset_service.get_feed.js +++ b/packages/google-cloud-asset/samples/generated/v1p2beta1/asset_service.get_feed.js @@ -33,7 +33,7 @@ function main(name) { // Instantiates a client const assetClient = new AssetServiceClient(); - async function getFeed() { + async function callGetFeed() { // Construct request const request = { name, @@ -44,7 +44,7 @@ function main(name) { console.log(response); } - getFeed(); + callGetFeed(); // [END cloudasset_v1p2beta1_generated_AssetService_GetFeed_async] } diff --git a/packages/google-cloud-asset/samples/generated/v1p2beta1/asset_service.list_feeds.js b/packages/google-cloud-asset/samples/generated/v1p2beta1/asset_service.list_feeds.js index c0e67b8d0ab..de139a74f36 100644 --- a/packages/google-cloud-asset/samples/generated/v1p2beta1/asset_service.list_feeds.js +++ b/packages/google-cloud-asset/samples/generated/v1p2beta1/asset_service.list_feeds.js @@ -32,7 +32,7 @@ function main(parent) { // Instantiates a client const assetClient = new AssetServiceClient(); - async function listFeeds() { + async function callListFeeds() { // Construct request const request = { parent, @@ -43,7 +43,7 @@ function main(parent) { console.log(response); } - listFeeds(); + callListFeeds(); // [END cloudasset_v1p2beta1_generated_AssetService_ListFeeds_async] } diff --git a/packages/google-cloud-asset/samples/generated/v1p2beta1/asset_service.update_feed.js b/packages/google-cloud-asset/samples/generated/v1p2beta1/asset_service.update_feed.js index 0cfbf0c2319..9bdcd533ad6 100644 --- a/packages/google-cloud-asset/samples/generated/v1p2beta1/asset_service.update_feed.js +++ b/packages/google-cloud-asset/samples/generated/v1p2beta1/asset_service.update_feed.js @@ -26,13 +26,13 @@ function main(feed, updateMask) { * folders/folder_number/feeds/feed_id or * organizations/organization_number/feeds/feed_id. */ - // const feed = '' + // const feed = {} /** * Required. Only updates the `feed` fields indicated by this mask. * The field mask must not be empty, and it must not contain fields that * are immutable or only set by the server. */ - // const updateMask = '' + // const updateMask = {} // Imports the Asset library const {AssetServiceClient} = require('@google-cloud/asset').v1p2beta1; @@ -40,7 +40,7 @@ function main(feed, updateMask) { // Instantiates a client const assetClient = new AssetServiceClient(); - async function updateFeed() { + async function callUpdateFeed() { // Construct request const request = { feed, @@ -52,7 +52,7 @@ function main(feed, updateMask) { console.log(response); } - updateFeed(); + callUpdateFeed(); // [END cloudasset_v1p2beta1_generated_AssetService_UpdateFeed_async] } diff --git a/packages/google-cloud-asset/samples/generated/v1p4beta1/asset_service.analyze_iam_policy.js b/packages/google-cloud-asset/samples/generated/v1p4beta1/asset_service.analyze_iam_policy.js index 40f9fe5cab5..5653b6b045e 100644 --- a/packages/google-cloud-asset/samples/generated/v1p4beta1/asset_service.analyze_iam_policy.js +++ b/packages/google-cloud-asset/samples/generated/v1p4beta1/asset_service.analyze_iam_policy.js @@ -22,11 +22,11 @@ function main(analysisQuery) { /** * Required. The request query. */ - // const analysisQuery = '' + // const analysisQuery = {} /** * Optional. The request options. */ - // const options = '' + // const options = {} // Imports the Asset library const {AssetServiceClient} = require('@google-cloud/asset').v1p4beta1; @@ -34,7 +34,7 @@ function main(analysisQuery) { // Instantiates a client const assetClient = new AssetServiceClient(); - async function analyzeIamPolicy() { + async function callAnalyzeIamPolicy() { // Construct request const request = { analysisQuery, @@ -45,7 +45,7 @@ function main(analysisQuery) { console.log(response); } - analyzeIamPolicy(); + callAnalyzeIamPolicy(); // [END cloudasset_v1p4beta1_generated_AssetService_AnalyzeIamPolicy_async] } diff --git a/packages/google-cloud-asset/samples/generated/v1p4beta1/asset_service.export_iam_policy_analysis.js b/packages/google-cloud-asset/samples/generated/v1p4beta1/asset_service.export_iam_policy_analysis.js index e72fda42aca..91299962da2 100644 --- a/packages/google-cloud-asset/samples/generated/v1p4beta1/asset_service.export_iam_policy_analysis.js +++ b/packages/google-cloud-asset/samples/generated/v1p4beta1/asset_service.export_iam_policy_analysis.js @@ -22,15 +22,15 @@ function main(analysisQuery, outputConfig) { /** * Required. The request query. */ - // const analysisQuery = '' + // const analysisQuery = {} /** * Optional. The request options. */ - // const options = '' + // const options = {} /** * Required. Output configuration indicating where the results will be output to. */ - // const outputConfig = '' + // const outputConfig = {} // Imports the Asset library const {AssetServiceClient} = require('@google-cloud/asset').v1p4beta1; @@ -38,7 +38,7 @@ function main(analysisQuery, outputConfig) { // Instantiates a client const assetClient = new AssetServiceClient(); - async function exportIamPolicyAnalysis() { + async function callExportIamPolicyAnalysis() { // Construct request const request = { analysisQuery, @@ -51,7 +51,7 @@ function main(analysisQuery, outputConfig) { console.log(response); } - exportIamPolicyAnalysis(); + callExportIamPolicyAnalysis(); // [END cloudasset_v1p4beta1_generated_AssetService_ExportIamPolicyAnalysis_async] } diff --git a/packages/google-cloud-asset/samples/generated/v1p5beta1/asset_service.list_assets.js b/packages/google-cloud-asset/samples/generated/v1p5beta1/asset_service.list_assets.js index b4424c7c9b3..ba81b2f8b32 100644 --- a/packages/google-cloud-asset/samples/generated/v1p5beta1/asset_service.list_assets.js +++ b/packages/google-cloud-asset/samples/generated/v1p5beta1/asset_service.list_assets.js @@ -33,12 +33,12 @@ function main(parent) { * and indexing, there is a volatile window during which running the same * query may get different results. */ - // const readTime = '' + // const readTime = {} /** * A list of asset types of which to take a snapshot for. For example: * "compute.googleapis.com/Disk". If specified, only matching assets will be - * returned. See [Introduction to Cloud Asset - * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview) + * returned. See Introduction to Cloud Asset + * Inventory (https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview) * for all supported asset types. */ // const assetTypes = 'abc123' @@ -46,7 +46,7 @@ function main(parent) { * Asset content type. If not specified, no content but the asset name will * be returned. */ - // const contentType = '' + // const contentType = {} /** * The maximum number of assets to be returned in a single response. Default * is 100, minimum is 1, and maximum is 1000. @@ -65,7 +65,7 @@ function main(parent) { // Instantiates a client const assetClient = new AssetServiceClient(); - async function listAssets() { + async function callListAssets() { // Construct request const request = { parent, @@ -78,7 +78,7 @@ function main(parent) { } } - listAssets(); + callListAssets(); // [END cloudasset_v1p5beta1_generated_AssetService_ListAssets_async] } diff --git a/packages/google-cloud-asset/src/v1/asset_service_client.ts b/packages/google-cloud-asset/src/v1/asset_service_client.ts index 29343243d2b..0ef75755d40 100644 --- a/packages/google-cloud-asset/src/v1/asset_service_client.ts +++ b/packages/google-cloud-asset/src/v1/asset_service_client.ts @@ -400,37 +400,6 @@ export class AssetServiceClient { // ------------------- // -- Service calls -- // ------------------- - batchGetAssetsHistory( - request?: protos.google.cloud.asset.v1.IBatchGetAssetsHistoryRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.asset.v1.IBatchGetAssetsHistoryResponse, - protos.google.cloud.asset.v1.IBatchGetAssetsHistoryRequest | undefined, - {} | undefined - ] - >; - batchGetAssetsHistory( - request: protos.google.cloud.asset.v1.IBatchGetAssetsHistoryRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.asset.v1.IBatchGetAssetsHistoryResponse, - | protos.google.cloud.asset.v1.IBatchGetAssetsHistoryRequest - | null - | undefined, - {} | null | undefined - > - ): void; - batchGetAssetsHistory( - request: protos.google.cloud.asset.v1.IBatchGetAssetsHistoryRequest, - callback: Callback< - protos.google.cloud.asset.v1.IBatchGetAssetsHistoryResponse, - | protos.google.cloud.asset.v1.IBatchGetAssetsHistoryRequest - | null - | undefined, - {} | null | undefined - > - ): void; /** * Batch gets the update history of assets that overlap a time window. * For IAM_POLICY content, this API outputs history when the asset and its @@ -488,9 +457,40 @@ export class AssetServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example - * const [response] = await client.batchGetAssetsHistory(request); + * @example include:samples/generated/v1/asset_service.batch_get_assets_history.js + * region_tag:cloudasset_v1_generated_AssetService_BatchGetAssetsHistory_async */ + batchGetAssetsHistory( + request?: protos.google.cloud.asset.v1.IBatchGetAssetsHistoryRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.asset.v1.IBatchGetAssetsHistoryResponse, + protos.google.cloud.asset.v1.IBatchGetAssetsHistoryRequest | undefined, + {} | undefined + ] + >; + batchGetAssetsHistory( + request: protos.google.cloud.asset.v1.IBatchGetAssetsHistoryRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.asset.v1.IBatchGetAssetsHistoryResponse, + | protos.google.cloud.asset.v1.IBatchGetAssetsHistoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + batchGetAssetsHistory( + request: protos.google.cloud.asset.v1.IBatchGetAssetsHistoryRequest, + callback: Callback< + protos.google.cloud.asset.v1.IBatchGetAssetsHistoryResponse, + | protos.google.cloud.asset.v1.IBatchGetAssetsHistoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; batchGetAssetsHistory( request?: protos.google.cloud.asset.v1.IBatchGetAssetsHistoryRequest, optionsOrCallback?: @@ -534,33 +534,6 @@ export class AssetServiceClient { this.initialize(); return this.innerApiCalls.batchGetAssetsHistory(request, options, callback); } - createFeed( - request?: protos.google.cloud.asset.v1.ICreateFeedRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.asset.v1.IFeed, - protos.google.cloud.asset.v1.ICreateFeedRequest | undefined, - {} | undefined - ] - >; - createFeed( - request: protos.google.cloud.asset.v1.ICreateFeedRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.asset.v1.IFeed, - protos.google.cloud.asset.v1.ICreateFeedRequest | null | undefined, - {} | null | undefined - > - ): void; - createFeed( - request: protos.google.cloud.asset.v1.ICreateFeedRequest, - callback: Callback< - protos.google.cloud.asset.v1.IFeed, - protos.google.cloud.asset.v1.ICreateFeedRequest | null | undefined, - {} | null | undefined - > - ): void; /** * Creates a feed in a parent project/folder/organization to listen to its * asset updates. @@ -589,9 +562,36 @@ export class AssetServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example - * const [response] = await client.createFeed(request); + * @example include:samples/generated/v1/asset_service.create_feed.js + * region_tag:cloudasset_v1_generated_AssetService_CreateFeed_async */ + createFeed( + request?: protos.google.cloud.asset.v1.ICreateFeedRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.asset.v1.IFeed, + protos.google.cloud.asset.v1.ICreateFeedRequest | undefined, + {} | undefined + ] + >; + createFeed( + request: protos.google.cloud.asset.v1.ICreateFeedRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.asset.v1.IFeed, + protos.google.cloud.asset.v1.ICreateFeedRequest | null | undefined, + {} | null | undefined + > + ): void; + createFeed( + request: protos.google.cloud.asset.v1.ICreateFeedRequest, + callback: Callback< + protos.google.cloud.asset.v1.IFeed, + protos.google.cloud.asset.v1.ICreateFeedRequest | null | undefined, + {} | null | undefined + > + ): void; createFeed( request?: protos.google.cloud.asset.v1.ICreateFeedRequest, optionsOrCallback?: @@ -631,6 +631,26 @@ export class AssetServiceClient { this.initialize(); return this.innerApiCalls.createFeed(request, options, callback); } + /** + * Gets details about an asset feed. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the Feed and it must be in the format of: + * projects/project_number/feeds/feed_id + * folders/folder_number/feeds/feed_id + * organizations/organization_number/feeds/feed_id + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Feed]{@link google.cloud.asset.v1.Feed}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/asset_service.get_feed.js + * region_tag:cloudasset_v1_generated_AssetService_GetFeed_async + */ getFeed( request?: protos.google.cloud.asset.v1.IGetFeedRequest, options?: CallOptions @@ -658,26 +678,6 @@ export class AssetServiceClient { {} | null | undefined > ): void; - /** - * Gets details about an asset feed. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the Feed and it must be in the format of: - * projects/project_number/feeds/feed_id - * folders/folder_number/feeds/feed_id - * organizations/organization_number/feeds/feed_id - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Feed]{@link google.cloud.asset.v1.Feed}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.getFeed(request); - */ getFeed( request?: protos.google.cloud.asset.v1.IGetFeedRequest, optionsOrCallback?: @@ -717,6 +717,25 @@ export class AssetServiceClient { this.initialize(); return this.innerApiCalls.getFeed(request, options, callback); } + /** + * Lists all asset feeds in a parent project/folder/organization. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent project/folder/organization whose feeds are to be + * listed. It can only be using project/folder/organization number (such as + * "folders/12345")", or a project ID (such as "projects/my-project-id"). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [ListFeedsResponse]{@link google.cloud.asset.v1.ListFeedsResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/asset_service.list_feeds.js + * region_tag:cloudasset_v1_generated_AssetService_ListFeeds_async + */ listFeeds( request?: protos.google.cloud.asset.v1.IListFeedsRequest, options?: CallOptions @@ -744,25 +763,6 @@ export class AssetServiceClient { {} | null | undefined > ): void; - /** - * Lists all asset feeds in a parent project/folder/organization. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent project/folder/organization whose feeds are to be - * listed. It can only be using project/folder/organization number (such as - * "folders/12345")", or a project ID (such as "projects/my-project-id"). - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [ListFeedsResponse]{@link google.cloud.asset.v1.ListFeedsResponse}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.listFeeds(request); - */ listFeeds( request?: protos.google.cloud.asset.v1.IListFeedsRequest, optionsOrCallback?: @@ -802,6 +802,31 @@ export class AssetServiceClient { this.initialize(); return this.innerApiCalls.listFeeds(request, options, callback); } + /** + * Updates an asset feed configuration. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.asset.v1.Feed} request.feed + * Required. The new values of feed details. It must match an existing feed and the + * field `name` must be in the format of: + * projects/project_number/feeds/feed_id or + * folders/folder_number/feeds/feed_id or + * organizations/organization_number/feeds/feed_id. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Only updates the `feed` fields indicated by this mask. + * The field mask must not be empty, and it must not contain fields that + * are immutable or only set by the server. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Feed]{@link google.cloud.asset.v1.Feed}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/asset_service.update_feed.js + * region_tag:cloudasset_v1_generated_AssetService_UpdateFeed_async + */ updateFeed( request?: protos.google.cloud.asset.v1.IUpdateFeedRequest, options?: CallOptions @@ -829,31 +854,6 @@ export class AssetServiceClient { {} | null | undefined > ): void; - /** - * Updates an asset feed configuration. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.asset.v1.Feed} request.feed - * Required. The new values of feed details. It must match an existing feed and the - * field `name` must be in the format of: - * projects/project_number/feeds/feed_id or - * folders/folder_number/feeds/feed_id or - * organizations/organization_number/feeds/feed_id. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Only updates the `feed` fields indicated by this mask. - * The field mask must not be empty, and it must not contain fields that - * are immutable or only set by the server. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Feed]{@link google.cloud.asset.v1.Feed}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.updateFeed(request); - */ updateFeed( request?: protos.google.cloud.asset.v1.IUpdateFeedRequest, optionsOrCallback?: @@ -893,6 +893,26 @@ export class AssetServiceClient { this.initialize(); return this.innerApiCalls.updateFeed(request, options, callback); } + /** + * Deletes an asset feed. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the feed and it must be in the format of: + * projects/project_number/feeds/feed_id + * folders/folder_number/feeds/feed_id + * organizations/organization_number/feeds/feed_id + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/asset_service.delete_feed.js + * region_tag:cloudasset_v1_generated_AssetService_DeleteFeed_async + */ deleteFeed( request?: protos.google.cloud.asset.v1.IDeleteFeedRequest, options?: CallOptions @@ -920,26 +940,6 @@ export class AssetServiceClient { {} | null | undefined > ): void; - /** - * Deletes an asset feed. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the feed and it must be in the format of: - * projects/project_number/feeds/feed_id - * folders/folder_number/feeds/feed_id - * organizations/organization_number/feeds/feed_id - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.deleteFeed(request); - */ deleteFeed( request?: protos.google.cloud.asset.v1.IDeleteFeedRequest, optionsOrCallback?: @@ -979,33 +979,6 @@ export class AssetServiceClient { this.initialize(); return this.innerApiCalls.deleteFeed(request, options, callback); } - analyzeIamPolicy( - request?: protos.google.cloud.asset.v1.IAnalyzeIamPolicyRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.asset.v1.IAnalyzeIamPolicyResponse, - protos.google.cloud.asset.v1.IAnalyzeIamPolicyRequest | undefined, - {} | undefined - ] - >; - analyzeIamPolicy( - request: protos.google.cloud.asset.v1.IAnalyzeIamPolicyRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.asset.v1.IAnalyzeIamPolicyResponse, - protos.google.cloud.asset.v1.IAnalyzeIamPolicyRequest | null | undefined, - {} | null | undefined - > - ): void; - analyzeIamPolicy( - request: protos.google.cloud.asset.v1.IAnalyzeIamPolicyRequest, - callback: Callback< - protos.google.cloud.asset.v1.IAnalyzeIamPolicyResponse, - protos.google.cloud.asset.v1.IAnalyzeIamPolicyRequest | null | undefined, - {} | null | undefined - > - ): void; /** * Analyzes IAM policies to answer which identities have what accesses on * which resources. @@ -1032,9 +1005,36 @@ export class AssetServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example - * const [response] = await client.analyzeIamPolicy(request); + * @example include:samples/generated/v1/asset_service.analyze_iam_policy.js + * region_tag:cloudasset_v1_generated_AssetService_AnalyzeIamPolicy_async */ + analyzeIamPolicy( + request?: protos.google.cloud.asset.v1.IAnalyzeIamPolicyRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.asset.v1.IAnalyzeIamPolicyResponse, + protos.google.cloud.asset.v1.IAnalyzeIamPolicyRequest | undefined, + {} | undefined + ] + >; + analyzeIamPolicy( + request: protos.google.cloud.asset.v1.IAnalyzeIamPolicyRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.asset.v1.IAnalyzeIamPolicyResponse, + protos.google.cloud.asset.v1.IAnalyzeIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): void; + analyzeIamPolicy( + request: protos.google.cloud.asset.v1.IAnalyzeIamPolicyRequest, + callback: Callback< + protos.google.cloud.asset.v1.IAnalyzeIamPolicyResponse, + protos.google.cloud.asset.v1.IAnalyzeIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): void; analyzeIamPolicy( request?: protos.google.cloud.asset.v1.IAnalyzeIamPolicyRequest, optionsOrCallback?: @@ -1076,33 +1076,6 @@ export class AssetServiceClient { this.initialize(); return this.innerApiCalls.analyzeIamPolicy(request, options, callback); } - analyzeMove( - request?: protos.google.cloud.asset.v1.IAnalyzeMoveRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.asset.v1.IAnalyzeMoveResponse, - protos.google.cloud.asset.v1.IAnalyzeMoveRequest | undefined, - {} | undefined - ] - >; - analyzeMove( - request: protos.google.cloud.asset.v1.IAnalyzeMoveRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.asset.v1.IAnalyzeMoveResponse, - protos.google.cloud.asset.v1.IAnalyzeMoveRequest | null | undefined, - {} | null | undefined - > - ): void; - analyzeMove( - request: protos.google.cloud.asset.v1.IAnalyzeMoveRequest, - callback: Callback< - protos.google.cloud.asset.v1.IAnalyzeMoveResponse, - protos.google.cloud.asset.v1.IAnalyzeMoveRequest | null | undefined, - {} | null | undefined - > - ): void; /** * Analyze moving a resource to a specified destination without kicking off * the actual move. The analysis is best effort depending on the user's @@ -1133,9 +1106,36 @@ export class AssetServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example - * const [response] = await client.analyzeMove(request); + * @example include:samples/generated/v1/asset_service.analyze_move.js + * region_tag:cloudasset_v1_generated_AssetService_AnalyzeMove_async */ + analyzeMove( + request?: protos.google.cloud.asset.v1.IAnalyzeMoveRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.asset.v1.IAnalyzeMoveResponse, + protos.google.cloud.asset.v1.IAnalyzeMoveRequest | undefined, + {} | undefined + ] + >; + analyzeMove( + request: protos.google.cloud.asset.v1.IAnalyzeMoveRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.asset.v1.IAnalyzeMoveResponse, + protos.google.cloud.asset.v1.IAnalyzeMoveRequest | null | undefined, + {} | null | undefined + > + ): void; + analyzeMove( + request: protos.google.cloud.asset.v1.IAnalyzeMoveRequest, + callback: Callback< + protos.google.cloud.asset.v1.IAnalyzeMoveResponse, + protos.google.cloud.asset.v1.IAnalyzeMoveRequest | null | undefined, + {} | null | undefined + > + ): void; analyzeMove( request?: protos.google.cloud.asset.v1.IAnalyzeMoveRequest, optionsOrCallback?: @@ -1176,42 +1176,6 @@ export class AssetServiceClient { return this.innerApiCalls.analyzeMove(request, options, callback); } - exportAssets( - request?: protos.google.cloud.asset.v1.IExportAssetsRequest, - options?: CallOptions - ): Promise< - [ - LROperation< - protos.google.cloud.asset.v1.IExportAssetsResponse, - protos.google.cloud.asset.v1.IExportAssetsRequest - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined - ] - >; - exportAssets( - request: protos.google.cloud.asset.v1.IExportAssetsRequest, - options: CallOptions, - callback: Callback< - LROperation< - protos.google.cloud.asset.v1.IExportAssetsResponse, - protos.google.cloud.asset.v1.IExportAssetsRequest - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - exportAssets( - request: protos.google.cloud.asset.v1.IExportAssetsRequest, - callback: Callback< - LROperation< - protos.google.cloud.asset.v1.IExportAssetsResponse, - protos.google.cloud.asset.v1.IExportAssetsRequest - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; /** * Exports assets with time and resource types to a given Cloud Storage * location/BigQuery table. For Cloud Storage location destinations, the @@ -1286,10 +1250,45 @@ export class AssetServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const [operation] = await client.exportAssets(request); - * const [response] = await operation.promise(); + * @example include:samples/generated/v1/asset_service.export_assets.js + * region_tag:cloudasset_v1_generated_AssetService_ExportAssets_async */ + exportAssets( + request?: protos.google.cloud.asset.v1.IExportAssetsRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.asset.v1.IExportAssetsResponse, + protos.google.cloud.asset.v1.IExportAssetsRequest + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + exportAssets( + request: protos.google.cloud.asset.v1.IExportAssetsRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.asset.v1.IExportAssetsResponse, + protos.google.cloud.asset.v1.IExportAssetsRequest + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + exportAssets( + request: protos.google.cloud.asset.v1.IExportAssetsRequest, + callback: Callback< + LROperation< + protos.google.cloud.asset.v1.IExportAssetsResponse, + protos.google.cloud.asset.v1.IExportAssetsRequest + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; exportAssets( request?: protos.google.cloud.asset.v1.IExportAssetsRequest, optionsOrCallback?: @@ -1347,11 +1346,8 @@ export class AssetServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkExportAssetsProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/asset_service.export_assets.js + * region_tag:cloudasset_v1_generated_AssetService_ExportAssets_async */ async checkExportAssetsProgress( name: string @@ -1375,6 +1371,35 @@ export class AssetServiceClient { protos.google.cloud.asset.v1.ExportAssetsRequest >; } + /** + * Analyzes IAM policies asynchronously to answer which identities have what + * accesses on which resources, and writes the analysis results to a Google + * Cloud Storage or a BigQuery destination. For Cloud Storage destination, the + * output format is the JSON format that represents a + * {@link google.cloud.asset.v1.AnalyzeIamPolicyResponse|AnalyzeIamPolicyResponse}. This method implements the + * {@link google.longrunning.Operation|google.longrunning.Operation}, which allows you to track the operation + * status. We recommend intervals of at least 2 seconds with exponential + * backoff retry to poll the operation result. The metadata contains the + * metadata for the long-running operation. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.asset.v1.IamPolicyAnalysisQuery} request.analysisQuery + * Required. The request query. + * @param {google.cloud.asset.v1.IamPolicyAnalysisOutputConfig} request.outputConfig + * Required. Output configuration indicating where the results will be output to. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/asset_service.analyze_iam_policy_longrunning.js + * region_tag:cloudasset_v1_generated_AssetService_AnalyzeIamPolicyLongrunning_async + */ analyzeIamPolicyLongrunning( request?: protos.google.cloud.asset.v1.IAnalyzeIamPolicyLongrunningRequest, options?: CallOptions @@ -1411,36 +1436,6 @@ export class AssetServiceClient { {} | null | undefined > ): void; - /** - * Analyzes IAM policies asynchronously to answer which identities have what - * accesses on which resources, and writes the analysis results to a Google - * Cloud Storage or a BigQuery destination. For Cloud Storage destination, the - * output format is the JSON format that represents a - * {@link google.cloud.asset.v1.AnalyzeIamPolicyResponse|AnalyzeIamPolicyResponse}. This method implements the - * {@link google.longrunning.Operation|google.longrunning.Operation}, which allows you to track the operation - * status. We recommend intervals of at least 2 seconds with exponential - * backoff retry to poll the operation result. The metadata contains the - * metadata for the long-running operation. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.asset.v1.IamPolicyAnalysisQuery} request.analysisQuery - * Required. The request query. - * @param {google.cloud.asset.v1.IamPolicyAnalysisOutputConfig} request.outputConfig - * Required. Output configuration indicating where the results will be output to. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.analyzeIamPolicyLongrunning(request); - * const [response] = await operation.promise(); - */ analyzeIamPolicyLongrunning( request?: protos.google.cloud.asset.v1.IAnalyzeIamPolicyLongrunningRequest, optionsOrCallback?: @@ -1502,11 +1497,8 @@ export class AssetServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkAnalyzeIamPolicyLongrunningProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/asset_service.analyze_iam_policy_longrunning.js + * region_tag:cloudasset_v1_generated_AssetService_AnalyzeIamPolicyLongrunning_async */ async checkAnalyzeIamPolicyLongrunningProgress( name: string @@ -1530,33 +1522,6 @@ export class AssetServiceClient { protos.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata >; } - listAssets( - request?: protos.google.cloud.asset.v1.IListAssetsRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.asset.v1.IAsset[], - protos.google.cloud.asset.v1.IListAssetsRequest | null, - protos.google.cloud.asset.v1.IListAssetsResponse - ] - >; - listAssets( - request: protos.google.cloud.asset.v1.IListAssetsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.asset.v1.IListAssetsRequest, - protos.google.cloud.asset.v1.IListAssetsResponse | null | undefined, - protos.google.cloud.asset.v1.IAsset - > - ): void; - listAssets( - request: protos.google.cloud.asset.v1.IListAssetsRequest, - callback: PaginationCallback< - protos.google.cloud.asset.v1.IListAssetsRequest, - protos.google.cloud.asset.v1.IListAssetsResponse | null | undefined, - protos.google.cloud.asset.v1.IAsset - > - ): void; /** * Lists assets with time and resource types and returns paged results in * response. @@ -1632,6 +1597,33 @@ export class AssetServiceClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + listAssets( + request?: protos.google.cloud.asset.v1.IListAssetsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.asset.v1.IAsset[], + protos.google.cloud.asset.v1.IListAssetsRequest | null, + protos.google.cloud.asset.v1.IListAssetsResponse + ] + >; + listAssets( + request: protos.google.cloud.asset.v1.IListAssetsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.asset.v1.IListAssetsRequest, + protos.google.cloud.asset.v1.IListAssetsResponse | null | undefined, + protos.google.cloud.asset.v1.IAsset + > + ): void; + listAssets( + request: protos.google.cloud.asset.v1.IListAssetsRequest, + callback: PaginationCallback< + protos.google.cloud.asset.v1.IListAssetsRequest, + protos.google.cloud.asset.v1.IListAssetsResponse | null | undefined, + protos.google.cloud.asset.v1.IAsset + > + ): void; listAssets( request?: protos.google.cloud.asset.v1.IListAssetsRequest, optionsOrCallback?: @@ -1838,11 +1830,8 @@ export class AssetServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * const iterable = client.listAssetsAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1/asset_service.list_assets.js + * region_tag:cloudasset_v1_generated_AssetService_ListAssets_async */ listAssetsAsync( request?: protos.google.cloud.asset.v1.IListAssetsRequest, @@ -1856,7 +1845,6 @@ export class AssetServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listAssets']; const callSettings = defaultCallSettings.merge(options); this.initialize(); @@ -1866,37 +1854,6 @@ export class AssetServiceClient { callSettings ) as AsyncIterable; } - searchAllResources( - request?: protos.google.cloud.asset.v1.ISearchAllResourcesRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.asset.v1.IResourceSearchResult[], - protos.google.cloud.asset.v1.ISearchAllResourcesRequest | null, - protos.google.cloud.asset.v1.ISearchAllResourcesResponse - ] - >; - searchAllResources( - request: protos.google.cloud.asset.v1.ISearchAllResourcesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.asset.v1.ISearchAllResourcesRequest, - | protos.google.cloud.asset.v1.ISearchAllResourcesResponse - | null - | undefined, - protos.google.cloud.asset.v1.IResourceSearchResult - > - ): void; - searchAllResources( - request: protos.google.cloud.asset.v1.ISearchAllResourcesRequest, - callback: PaginationCallback< - protos.google.cloud.asset.v1.ISearchAllResourcesRequest, - | protos.google.cloud.asset.v1.ISearchAllResourcesResponse - | null - | undefined, - protos.google.cloud.asset.v1.IResourceSearchResult - > - ): void; /** * Searches all Cloud resources within the specified scope, such as a project, * folder, or organization. The caller must be granted the @@ -2048,6 +2005,37 @@ export class AssetServiceClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + searchAllResources( + request?: protos.google.cloud.asset.v1.ISearchAllResourcesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.asset.v1.IResourceSearchResult[], + protos.google.cloud.asset.v1.ISearchAllResourcesRequest | null, + protos.google.cloud.asset.v1.ISearchAllResourcesResponse + ] + >; + searchAllResources( + request: protos.google.cloud.asset.v1.ISearchAllResourcesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.asset.v1.ISearchAllResourcesRequest, + | protos.google.cloud.asset.v1.ISearchAllResourcesResponse + | null + | undefined, + protos.google.cloud.asset.v1.IResourceSearchResult + > + ): void; + searchAllResources( + request: protos.google.cloud.asset.v1.ISearchAllResourcesRequest, + callback: PaginationCallback< + protos.google.cloud.asset.v1.ISearchAllResourcesRequest, + | protos.google.cloud.asset.v1.ISearchAllResourcesResponse + | null + | undefined, + protos.google.cloud.asset.v1.IResourceSearchResult + > + ): void; searchAllResources( request?: protos.google.cloud.asset.v1.ISearchAllResourcesRequest, optionsOrCallback?: @@ -2406,11 +2394,8 @@ export class AssetServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * const iterable = client.searchAllResourcesAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1/asset_service.search_all_resources.js + * region_tag:cloudasset_v1_generated_AssetService_SearchAllResources_async */ searchAllResourcesAsync( request?: protos.google.cloud.asset.v1.ISearchAllResourcesRequest, @@ -2424,7 +2409,6 @@ export class AssetServiceClient { gax.routingHeader.fromParams({ scope: request.scope || '', }); - options = options || {}; const defaultCallSettings = this._defaults['searchAllResources']; const callSettings = defaultCallSettings.merge(options); this.initialize(); @@ -2434,37 +2418,6 @@ export class AssetServiceClient { callSettings ) as AsyncIterable; } - searchAllIamPolicies( - request?: protos.google.cloud.asset.v1.ISearchAllIamPoliciesRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.asset.v1.IIamPolicySearchResult[], - protos.google.cloud.asset.v1.ISearchAllIamPoliciesRequest | null, - protos.google.cloud.asset.v1.ISearchAllIamPoliciesResponse - ] - >; - searchAllIamPolicies( - request: protos.google.cloud.asset.v1.ISearchAllIamPoliciesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.asset.v1.ISearchAllIamPoliciesRequest, - | protos.google.cloud.asset.v1.ISearchAllIamPoliciesResponse - | null - | undefined, - protos.google.cloud.asset.v1.IIamPolicySearchResult - > - ): void; - searchAllIamPolicies( - request: protos.google.cloud.asset.v1.ISearchAllIamPoliciesRequest, - callback: PaginationCallback< - protos.google.cloud.asset.v1.ISearchAllIamPoliciesRequest, - | protos.google.cloud.asset.v1.ISearchAllIamPoliciesResponse - | null - | undefined, - protos.google.cloud.asset.v1.IIamPolicySearchResult - > - ): void; /** * Searches all IAM policies within the specified scope, such as a project, * folder, or organization. The caller must be granted the @@ -2580,6 +2533,37 @@ export class AssetServiceClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + searchAllIamPolicies( + request?: protos.google.cloud.asset.v1.ISearchAllIamPoliciesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.asset.v1.IIamPolicySearchResult[], + protos.google.cloud.asset.v1.ISearchAllIamPoliciesRequest | null, + protos.google.cloud.asset.v1.ISearchAllIamPoliciesResponse + ] + >; + searchAllIamPolicies( + request: protos.google.cloud.asset.v1.ISearchAllIamPoliciesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.asset.v1.ISearchAllIamPoliciesRequest, + | protos.google.cloud.asset.v1.ISearchAllIamPoliciesResponse + | null + | undefined, + protos.google.cloud.asset.v1.IIamPolicySearchResult + > + ): void; + searchAllIamPolicies( + request: protos.google.cloud.asset.v1.ISearchAllIamPoliciesRequest, + callback: PaginationCallback< + protos.google.cloud.asset.v1.ISearchAllIamPoliciesRequest, + | protos.google.cloud.asset.v1.ISearchAllIamPoliciesResponse + | null + | undefined, + protos.google.cloud.asset.v1.IIamPolicySearchResult + > + ): void; searchAllIamPolicies( request?: protos.google.cloud.asset.v1.ISearchAllIamPoliciesRequest, optionsOrCallback?: @@ -2866,11 +2850,8 @@ export class AssetServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * const iterable = client.searchAllIamPoliciesAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1/asset_service.search_all_iam_policies.js + * region_tag:cloudasset_v1_generated_AssetService_SearchAllIamPolicies_async */ searchAllIamPoliciesAsync( request?: protos.google.cloud.asset.v1.ISearchAllIamPoliciesRequest, @@ -2884,7 +2865,6 @@ export class AssetServiceClient { gax.routingHeader.fromParams({ scope: request.scope || '', }); - options = options || {}; const defaultCallSettings = this._defaults['searchAllIamPolicies']; const callSettings = defaultCallSettings.merge(options); this.initialize(); diff --git a/packages/google-cloud-asset/src/v1p1beta1/asset_service_client.ts b/packages/google-cloud-asset/src/v1p1beta1/asset_service_client.ts index 1cfca2194f5..2093f409813 100644 --- a/packages/google-cloud-asset/src/v1p1beta1/asset_service_client.ts +++ b/packages/google-cloud-asset/src/v1p1beta1/asset_service_client.ts @@ -310,37 +310,6 @@ export class AssetServiceClient { // -- Service calls -- // ------------------- - searchAllResources( - request?: protos.google.cloud.asset.v1p1beta1.ISearchAllResourcesRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.asset.v1p1beta1.IStandardResourceMetadata[], - protos.google.cloud.asset.v1p1beta1.ISearchAllResourcesRequest | null, - protos.google.cloud.asset.v1p1beta1.ISearchAllResourcesResponse - ] - >; - searchAllResources( - request: protos.google.cloud.asset.v1p1beta1.ISearchAllResourcesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.asset.v1p1beta1.ISearchAllResourcesRequest, - | protos.google.cloud.asset.v1p1beta1.ISearchAllResourcesResponse - | null - | undefined, - protos.google.cloud.asset.v1p1beta1.IStandardResourceMetadata - > - ): void; - searchAllResources( - request: protos.google.cloud.asset.v1p1beta1.ISearchAllResourcesRequest, - callback: PaginationCallback< - protos.google.cloud.asset.v1p1beta1.ISearchAllResourcesRequest, - | protos.google.cloud.asset.v1p1beta1.ISearchAllResourcesResponse - | null - | undefined, - protos.google.cloud.asset.v1p1beta1.IStandardResourceMetadata - > - ): void; /** * Searches all the resources under a given accessible CRM scope * (project/folder/organization). This RPC gives callers @@ -391,6 +360,37 @@ export class AssetServiceClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + searchAllResources( + request?: protos.google.cloud.asset.v1p1beta1.ISearchAllResourcesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.asset.v1p1beta1.IStandardResourceMetadata[], + protos.google.cloud.asset.v1p1beta1.ISearchAllResourcesRequest | null, + protos.google.cloud.asset.v1p1beta1.ISearchAllResourcesResponse + ] + >; + searchAllResources( + request: protos.google.cloud.asset.v1p1beta1.ISearchAllResourcesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.asset.v1p1beta1.ISearchAllResourcesRequest, + | protos.google.cloud.asset.v1p1beta1.ISearchAllResourcesResponse + | null + | undefined, + protos.google.cloud.asset.v1p1beta1.IStandardResourceMetadata + > + ): void; + searchAllResources( + request: protos.google.cloud.asset.v1p1beta1.ISearchAllResourcesRequest, + callback: PaginationCallback< + protos.google.cloud.asset.v1p1beta1.ISearchAllResourcesRequest, + | protos.google.cloud.asset.v1p1beta1.ISearchAllResourcesResponse + | null + | undefined, + protos.google.cloud.asset.v1p1beta1.IStandardResourceMetadata + > + ): void; searchAllResources( request?: protos.google.cloud.asset.v1p1beta1.ISearchAllResourcesRequest, optionsOrCallback?: @@ -543,11 +543,8 @@ export class AssetServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * const iterable = client.searchAllResourcesAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1p1beta1/asset_service.search_all_resources.js + * region_tag:cloudasset_v1p1beta1_generated_AssetService_SearchAllResources_async */ searchAllResourcesAsync( request?: protos.google.cloud.asset.v1p1beta1.ISearchAllResourcesRequest, @@ -561,7 +558,6 @@ export class AssetServiceClient { gax.routingHeader.fromParams({ scope: request.scope || '', }); - options = options || {}; const defaultCallSettings = this._defaults['searchAllResources']; const callSettings = defaultCallSettings.merge(options); this.initialize(); @@ -571,37 +567,6 @@ export class AssetServiceClient { callSettings ) as AsyncIterable; } - searchAllIamPolicies( - request?: protos.google.cloud.asset.v1p1beta1.ISearchAllIamPoliciesRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.asset.v1p1beta1.IIamPolicySearchResult[], - protos.google.cloud.asset.v1p1beta1.ISearchAllIamPoliciesRequest | null, - protos.google.cloud.asset.v1p1beta1.ISearchAllIamPoliciesResponse - ] - >; - searchAllIamPolicies( - request: protos.google.cloud.asset.v1p1beta1.ISearchAllIamPoliciesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.asset.v1p1beta1.ISearchAllIamPoliciesRequest, - | protos.google.cloud.asset.v1p1beta1.ISearchAllIamPoliciesResponse - | null - | undefined, - protos.google.cloud.asset.v1p1beta1.IIamPolicySearchResult - > - ): void; - searchAllIamPolicies( - request: protos.google.cloud.asset.v1p1beta1.ISearchAllIamPoliciesRequest, - callback: PaginationCallback< - protos.google.cloud.asset.v1p1beta1.ISearchAllIamPoliciesRequest, - | protos.google.cloud.asset.v1p1beta1.ISearchAllIamPoliciesResponse - | null - | undefined, - protos.google.cloud.asset.v1p1beta1.IIamPolicySearchResult - > - ): void; /** * Searches all the IAM policies under a given accessible CRM scope * (project/folder/organization). This RPC gives callers @@ -647,6 +612,37 @@ export class AssetServiceClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + searchAllIamPolicies( + request?: protos.google.cloud.asset.v1p1beta1.ISearchAllIamPoliciesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.asset.v1p1beta1.IIamPolicySearchResult[], + protos.google.cloud.asset.v1p1beta1.ISearchAllIamPoliciesRequest | null, + protos.google.cloud.asset.v1p1beta1.ISearchAllIamPoliciesResponse + ] + >; + searchAllIamPolicies( + request: protos.google.cloud.asset.v1p1beta1.ISearchAllIamPoliciesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.asset.v1p1beta1.ISearchAllIamPoliciesRequest, + | protos.google.cloud.asset.v1p1beta1.ISearchAllIamPoliciesResponse + | null + | undefined, + protos.google.cloud.asset.v1p1beta1.IIamPolicySearchResult + > + ): void; + searchAllIamPolicies( + request: protos.google.cloud.asset.v1p1beta1.ISearchAllIamPoliciesRequest, + callback: PaginationCallback< + protos.google.cloud.asset.v1p1beta1.ISearchAllIamPoliciesRequest, + | protos.google.cloud.asset.v1p1beta1.ISearchAllIamPoliciesResponse + | null + | undefined, + protos.google.cloud.asset.v1p1beta1.IIamPolicySearchResult + > + ): void; searchAllIamPolicies( request?: protos.google.cloud.asset.v1p1beta1.ISearchAllIamPoliciesRequest, optionsOrCallback?: @@ -789,11 +785,8 @@ export class AssetServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * const iterable = client.searchAllIamPoliciesAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1p1beta1/asset_service.search_all_iam_policies.js + * region_tag:cloudasset_v1p1beta1_generated_AssetService_SearchAllIamPolicies_async */ searchAllIamPoliciesAsync( request?: protos.google.cloud.asset.v1p1beta1.ISearchAllIamPoliciesRequest, @@ -807,7 +800,6 @@ export class AssetServiceClient { gax.routingHeader.fromParams({ scope: request.scope || '', }); - options = options || {}; const defaultCallSettings = this._defaults['searchAllIamPolicies']; const callSettings = defaultCallSettings.merge(options); this.initialize(); diff --git a/packages/google-cloud-asset/src/v1p2beta1/asset_service_client.ts b/packages/google-cloud-asset/src/v1p2beta1/asset_service_client.ts index 43e4ace69e8..deb79298129 100644 --- a/packages/google-cloud-asset/src/v1p2beta1/asset_service_client.ts +++ b/packages/google-cloud-asset/src/v1p2beta1/asset_service_client.ts @@ -303,33 +303,6 @@ export class AssetServiceClient { // ------------------- // -- Service calls -- // ------------------- - createFeed( - request?: protos.google.cloud.asset.v1p2beta1.ICreateFeedRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.asset.v1p2beta1.IFeed, - protos.google.cloud.asset.v1p2beta1.ICreateFeedRequest | undefined, - {} | undefined - ] - >; - createFeed( - request: protos.google.cloud.asset.v1p2beta1.ICreateFeedRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.asset.v1p2beta1.IFeed, - protos.google.cloud.asset.v1p2beta1.ICreateFeedRequest | null | undefined, - {} | null | undefined - > - ): void; - createFeed( - request: protos.google.cloud.asset.v1p2beta1.ICreateFeedRequest, - callback: Callback< - protos.google.cloud.asset.v1p2beta1.IFeed, - protos.google.cloud.asset.v1p2beta1.ICreateFeedRequest | null | undefined, - {} | null | undefined - > - ): void; /** * Creates a feed in a parent project/folder/organization to listen to its * asset updates. @@ -358,9 +331,36 @@ export class AssetServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example - * const [response] = await client.createFeed(request); + * @example include:samples/generated/v1p2beta1/asset_service.create_feed.js + * region_tag:cloudasset_v1p2beta1_generated_AssetService_CreateFeed_async */ + createFeed( + request?: protos.google.cloud.asset.v1p2beta1.ICreateFeedRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.asset.v1p2beta1.IFeed, + protos.google.cloud.asset.v1p2beta1.ICreateFeedRequest | undefined, + {} | undefined + ] + >; + createFeed( + request: protos.google.cloud.asset.v1p2beta1.ICreateFeedRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.asset.v1p2beta1.IFeed, + protos.google.cloud.asset.v1p2beta1.ICreateFeedRequest | null | undefined, + {} | null | undefined + > + ): void; + createFeed( + request: protos.google.cloud.asset.v1p2beta1.ICreateFeedRequest, + callback: Callback< + protos.google.cloud.asset.v1p2beta1.IFeed, + protos.google.cloud.asset.v1p2beta1.ICreateFeedRequest | null | undefined, + {} | null | undefined + > + ): void; createFeed( request?: protos.google.cloud.asset.v1p2beta1.ICreateFeedRequest, optionsOrCallback?: @@ -402,6 +402,26 @@ export class AssetServiceClient { this.initialize(); return this.innerApiCalls.createFeed(request, options, callback); } + /** + * Gets details about an asset feed. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the Feed and it must be in the format of: + * projects/project_number/feeds/feed_id + * folders/folder_number/feeds/feed_id + * organizations/organization_number/feeds/feed_id + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Feed]{@link google.cloud.asset.v1p2beta1.Feed}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1p2beta1/asset_service.get_feed.js + * region_tag:cloudasset_v1p2beta1_generated_AssetService_GetFeed_async + */ getFeed( request?: protos.google.cloud.asset.v1p2beta1.IGetFeedRequest, options?: CallOptions @@ -429,26 +449,6 @@ export class AssetServiceClient { {} | null | undefined > ): void; - /** - * Gets details about an asset feed. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the Feed and it must be in the format of: - * projects/project_number/feeds/feed_id - * folders/folder_number/feeds/feed_id - * organizations/organization_number/feeds/feed_id - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Feed]{@link google.cloud.asset.v1p2beta1.Feed}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.getFeed(request); - */ getFeed( request?: protos.google.cloud.asset.v1p2beta1.IGetFeedRequest, optionsOrCallback?: @@ -490,6 +490,25 @@ export class AssetServiceClient { this.initialize(); return this.innerApiCalls.getFeed(request, options, callback); } + /** + * Lists all asset feeds in a parent project/folder/organization. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent project/folder/organization whose feeds are to be + * listed. It can only be using project/folder/organization number (such as + * "folders/12345")", or a project ID (such as "projects/my-project-id"). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [ListFeedsResponse]{@link google.cloud.asset.v1p2beta1.ListFeedsResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1p2beta1/asset_service.list_feeds.js + * region_tag:cloudasset_v1p2beta1_generated_AssetService_ListFeeds_async + */ listFeeds( request?: protos.google.cloud.asset.v1p2beta1.IListFeedsRequest, options?: CallOptions @@ -517,25 +536,6 @@ export class AssetServiceClient { {} | null | undefined > ): void; - /** - * Lists all asset feeds in a parent project/folder/organization. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent project/folder/organization whose feeds are to be - * listed. It can only be using project/folder/organization number (such as - * "folders/12345")", or a project ID (such as "projects/my-project-id"). - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [ListFeedsResponse]{@link google.cloud.asset.v1p2beta1.ListFeedsResponse}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.listFeeds(request); - */ listFeeds( request?: protos.google.cloud.asset.v1p2beta1.IListFeedsRequest, optionsOrCallback?: @@ -577,6 +577,31 @@ export class AssetServiceClient { this.initialize(); return this.innerApiCalls.listFeeds(request, options, callback); } + /** + * Updates an asset feed configuration. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.asset.v1p2beta1.Feed} request.feed + * Required. The new values of feed details. It must match an existing feed and the + * field `name` must be in the format of: + * projects/project_number/feeds/feed_id or + * folders/folder_number/feeds/feed_id or + * organizations/organization_number/feeds/feed_id. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Only updates the `feed` fields indicated by this mask. + * The field mask must not be empty, and it must not contain fields that + * are immutable or only set by the server. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Feed]{@link google.cloud.asset.v1p2beta1.Feed}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1p2beta1/asset_service.update_feed.js + * region_tag:cloudasset_v1p2beta1_generated_AssetService_UpdateFeed_async + */ updateFeed( request?: protos.google.cloud.asset.v1p2beta1.IUpdateFeedRequest, options?: CallOptions @@ -604,31 +629,6 @@ export class AssetServiceClient { {} | null | undefined > ): void; - /** - * Updates an asset feed configuration. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.asset.v1p2beta1.Feed} request.feed - * Required. The new values of feed details. It must match an existing feed and the - * field `name` must be in the format of: - * projects/project_number/feeds/feed_id or - * folders/folder_number/feeds/feed_id or - * organizations/organization_number/feeds/feed_id. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Only updates the `feed` fields indicated by this mask. - * The field mask must not be empty, and it must not contain fields that - * are immutable or only set by the server. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Feed]{@link google.cloud.asset.v1p2beta1.Feed}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.updateFeed(request); - */ updateFeed( request?: protos.google.cloud.asset.v1p2beta1.IUpdateFeedRequest, optionsOrCallback?: @@ -670,6 +670,26 @@ export class AssetServiceClient { this.initialize(); return this.innerApiCalls.updateFeed(request, options, callback); } + /** + * Deletes an asset feed. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the feed and it must be in the format of: + * projects/project_number/feeds/feed_id + * folders/folder_number/feeds/feed_id + * organizations/organization_number/feeds/feed_id + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1p2beta1/asset_service.delete_feed.js + * region_tag:cloudasset_v1p2beta1_generated_AssetService_DeleteFeed_async + */ deleteFeed( request?: protos.google.cloud.asset.v1p2beta1.IDeleteFeedRequest, options?: CallOptions @@ -697,26 +717,6 @@ export class AssetServiceClient { {} | null | undefined > ): void; - /** - * Deletes an asset feed. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the feed and it must be in the format of: - * projects/project_number/feeds/feed_id - * folders/folder_number/feeds/feed_id - * organizations/organization_number/feeds/feed_id - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.deleteFeed(request); - */ deleteFeed( request?: protos.google.cloud.asset.v1p2beta1.IDeleteFeedRequest, optionsOrCallback?: diff --git a/packages/google-cloud-asset/src/v1p4beta1/asset_service_client.ts b/packages/google-cloud-asset/src/v1p4beta1/asset_service_client.ts index 8f682983863..5191de63efb 100644 --- a/packages/google-cloud-asset/src/v1p4beta1/asset_service_client.ts +++ b/packages/google-cloud-asset/src/v1p4beta1/asset_service_client.ts @@ -322,6 +322,26 @@ export class AssetServiceClient { // ------------------- // -- Service calls -- // ------------------- + /** + * Analyzes IAM policies based on the specified request. Returns + * a list of {@link google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult|IamPolicyAnalysisResult} matching the request. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery} request.analysisQuery + * Required. The request query. + * @param {google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options} [request.options] + * Optional. The request options. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeIamPolicyResponse]{@link google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1p4beta1/asset_service.analyze_iam_policy.js + * region_tag:cloudasset_v1p4beta1_generated_AssetService_AnalyzeIamPolicy_async + */ analyzeIamPolicy( request?: protos.google.cloud.asset.v1p4beta1.IAnalyzeIamPolicyRequest, options?: CallOptions @@ -353,26 +373,6 @@ export class AssetServiceClient { {} | null | undefined > ): void; - /** - * Analyzes IAM policies based on the specified request. Returns - * a list of {@link google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult|IamPolicyAnalysisResult} matching the request. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery} request.analysisQuery - * Required. The request query. - * @param {google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options} [request.options] - * Optional. The request options. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnalyzeIamPolicyResponse]{@link google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.analyzeIamPolicy(request); - */ analyzeIamPolicy( request?: protos.google.cloud.asset.v1p4beta1.IAnalyzeIamPolicyRequest, optionsOrCallback?: @@ -417,6 +417,32 @@ export class AssetServiceClient { return this.innerApiCalls.analyzeIamPolicy(request, options, callback); } + /** + * Exports IAM policy analysis based on the specified request. This API + * implements the {@link google.longrunning.Operation|google.longrunning.Operation} API allowing you to keep + * track of the export. The metadata contains the request to help callers to + * map responses to requests. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery} request.analysisQuery + * Required. The request query. + * @param {google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options} [request.options] + * Optional. The request options. + * @param {google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig} request.outputConfig + * Required. Output configuration indicating where the results will be output to. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1p4beta1/asset_service.export_iam_policy_analysis.js + * region_tag:cloudasset_v1p4beta1_generated_AssetService_ExportIamPolicyAnalysis_async + */ exportIamPolicyAnalysis( request?: protos.google.cloud.asset.v1p4beta1.IExportIamPolicyAnalysisRequest, options?: CallOptions @@ -453,33 +479,6 @@ export class AssetServiceClient { {} | null | undefined > ): void; - /** - * Exports IAM policy analysis based on the specified request. This API - * implements the {@link google.longrunning.Operation|google.longrunning.Operation} API allowing you to keep - * track of the export. The metadata contains the request to help callers to - * map responses to requests. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery} request.analysisQuery - * Required. The request query. - * @param {google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options} [request.options] - * Optional. The request options. - * @param {google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig} request.outputConfig - * Required. Output configuration indicating where the results will be output to. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.exportIamPolicyAnalysis(request); - * const [response] = await operation.promise(); - */ exportIamPolicyAnalysis( request?: protos.google.cloud.asset.v1p4beta1.IExportIamPolicyAnalysisRequest, optionsOrCallback?: @@ -541,11 +540,8 @@ export class AssetServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkExportIamPolicyAnalysisProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1p4beta1/asset_service.export_iam_policy_analysis.js + * region_tag:cloudasset_v1p4beta1_generated_AssetService_ExportIamPolicyAnalysis_async */ async checkExportIamPolicyAnalysisProgress( name: string diff --git a/packages/google-cloud-asset/src/v1p5beta1/asset_service_client.ts b/packages/google-cloud-asset/src/v1p5beta1/asset_service_client.ts index 8db22838d81..cfc36d44816 100644 --- a/packages/google-cloud-asset/src/v1p5beta1/asset_service_client.ts +++ b/packages/google-cloud-asset/src/v1p5beta1/asset_service_client.ts @@ -318,37 +318,6 @@ export class AssetServiceClient { // -- Service calls -- // ------------------- - listAssets( - request?: protos.google.cloud.asset.v1p5beta1.IListAssetsRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.asset.v1p5beta1.IAsset[], - protos.google.cloud.asset.v1p5beta1.IListAssetsRequest | null, - protos.google.cloud.asset.v1p5beta1.IListAssetsResponse - ] - >; - listAssets( - request: protos.google.cloud.asset.v1p5beta1.IListAssetsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.asset.v1p5beta1.IListAssetsRequest, - | protos.google.cloud.asset.v1p5beta1.IListAssetsResponse - | null - | undefined, - protos.google.cloud.asset.v1p5beta1.IAsset - > - ): void; - listAssets( - request: protos.google.cloud.asset.v1p5beta1.IListAssetsRequest, - callback: PaginationCallback< - protos.google.cloud.asset.v1p5beta1.IListAssetsRequest, - | protos.google.cloud.asset.v1p5beta1.IListAssetsResponse - | null - | undefined, - protos.google.cloud.asset.v1p5beta1.IAsset - > - ): void; /** * Lists assets with time and resource types and returns paged results in * response. @@ -395,6 +364,37 @@ export class AssetServiceClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + listAssets( + request?: protos.google.cloud.asset.v1p5beta1.IListAssetsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.asset.v1p5beta1.IAsset[], + protos.google.cloud.asset.v1p5beta1.IListAssetsRequest | null, + protos.google.cloud.asset.v1p5beta1.IListAssetsResponse + ] + >; + listAssets( + request: protos.google.cloud.asset.v1p5beta1.IListAssetsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.asset.v1p5beta1.IListAssetsRequest, + | protos.google.cloud.asset.v1p5beta1.IListAssetsResponse + | null + | undefined, + protos.google.cloud.asset.v1p5beta1.IAsset + > + ): void; + listAssets( + request: protos.google.cloud.asset.v1p5beta1.IListAssetsRequest, + callback: PaginationCallback< + protos.google.cloud.asset.v1p5beta1.IListAssetsRequest, + | protos.google.cloud.asset.v1p5beta1.IListAssetsResponse + | null + | undefined, + protos.google.cloud.asset.v1p5beta1.IAsset + > + ): void; listAssets( request?: protos.google.cloud.asset.v1p5beta1.IListAssetsRequest, optionsOrCallback?: @@ -547,11 +547,8 @@ export class AssetServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * const iterable = client.listAssetsAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1p5beta1/asset_service.list_assets.js + * region_tag:cloudasset_v1p5beta1_generated_AssetService_ListAssets_async */ listAssetsAsync( request?: protos.google.cloud.asset.v1p5beta1.IListAssetsRequest, @@ -565,7 +562,6 @@ export class AssetServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listAssets']; const callSettings = defaultCallSettings.merge(options); this.initialize();