From 3d5b8dd5c9a3b732d257644eb2d9b609a2eec9c2 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 10 Nov 2021 14:09:04 -0800 Subject: [PATCH] docs(samples): add example tags to generated samples (#577) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs(samples): add example tags to generated samples PiperOrigin-RevId: 408439482 Source-Link: https://github.com/googleapis/googleapis/commit/b9f61843dc80c7c285fc34fd3a40aae55082c2b9 Source-Link: https://github.com/googleapis/googleapis-gen/commit/eb888bc214efc7bf43bf4634b470254565a659a5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWI4ODhiYzIxNGVmYzdiZjQzYmY0NjM0YjQ3MDI1NDU2NWE2NTlhNSJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../v1/asset_service.analyze_iam_policy.js | 10 +++---- ..._service.analyze_iam_policy_longrunning.js | 8 ++--- .../v1/asset_service.analyze_move.js | 6 ++-- .../asset_service.batch_get_assets_history.js | 26 ++++++++-------- .../generated/v1/asset_service.create_feed.js | 6 ++-- .../generated/v1/asset_service.delete_feed.js | 4 +-- .../v1/asset_service.export_assets.js | 30 +++++++++---------- .../generated/v1/asset_service.get_feed.js | 4 +-- .../generated/v1/asset_service.list_assets.js | 28 ++++++++--------- .../generated/v1/asset_service.list_feeds.js | 4 +-- .../asset_service.search_all_iam_policies.js | 20 ++++++------- .../v1/asset_service.search_all_resources.js | 18 +++++------ .../generated/v1/asset_service.update_feed.js | 8 ++--- .../asset_service.search_all_iam_policies.js | 4 +-- .../asset_service.search_all_resources.js | 4 +-- .../v1p2beta1/asset_service.create_feed.js | 6 ++-- .../v1p2beta1/asset_service.delete_feed.js | 4 +-- .../v1p2beta1/asset_service.get_feed.js | 4 +-- .../v1p2beta1/asset_service.list_feeds.js | 4 +-- .../v1p2beta1/asset_service.update_feed.js | 8 ++--- .../asset_service.analyze_iam_policy.js | 8 ++--- ...sset_service.export_iam_policy_analysis.js | 10 +++---- .../v1p5beta1/asset_service.list_assets.js | 12 ++++---- 23 files changed, 118 insertions(+), 118 deletions(-) diff --git a/asset/snippets/generated/v1/asset_service.analyze_iam_policy.js b/asset/snippets/generated/v1/asset_service.analyze_iam_policy.js index 5d7f2cc17da..f36a4e9630a 100644 --- a/asset/snippets/generated/v1/asset_service.analyze_iam_policy.js +++ b/asset/snippets/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/asset/snippets/generated/v1/asset_service.analyze_iam_policy_longrunning.js b/asset/snippets/generated/v1/asset_service.analyze_iam_policy_longrunning.js index 6570bd6220d..28548a8a30f 100644 --- a/asset/snippets/generated/v1/asset_service.analyze_iam_policy_longrunning.js +++ b/asset/snippets/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/asset/snippets/generated/v1/asset_service.analyze_move.js b/asset/snippets/generated/v1/asset_service.analyze_move.js index 0df32716ef5..e6ea142b34f 100644 --- a/asset/snippets/generated/v1/asset_service.analyze_move.js +++ b/asset/snippets/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/asset/snippets/generated/v1/asset_service.batch_get_assets_history.js b/asset/snippets/generated/v1/asset_service.batch_get_assets_history.js index 651d1555c8e..60230130817 100644 --- a/asset/snippets/generated/v1/asset_service.batch_get_assets_history.js +++ b/asset/snippets/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/asset/snippets/generated/v1/asset_service.create_feed.js b/asset/snippets/generated/v1/asset_service.create_feed.js index 05d24467524..216f98b4f0c 100644 --- a/asset/snippets/generated/v1/asset_service.create_feed.js +++ b/asset/snippets/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/asset/snippets/generated/v1/asset_service.delete_feed.js b/asset/snippets/generated/v1/asset_service.delete_feed.js index e72349b3130..74fd1a9fa22 100644 --- a/asset/snippets/generated/v1/asset_service.delete_feed.js +++ b/asset/snippets/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/asset/snippets/generated/v1/asset_service.export_assets.js b/asset/snippets/generated/v1/asset_service.export_assets.js index ef338fd65fe..28684b3b8f6 100644 --- a/asset/snippets/generated/v1/asset_service.export_assets.js +++ b/asset/snippets/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/asset/snippets/generated/v1/asset_service.get_feed.js b/asset/snippets/generated/v1/asset_service.get_feed.js index eeda3a194ac..d402cba1d04 100644 --- a/asset/snippets/generated/v1/asset_service.get_feed.js +++ b/asset/snippets/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/asset/snippets/generated/v1/asset_service.list_assets.js b/asset/snippets/generated/v1/asset_service.list_assets.js index 84556de5da4..57410a2936d 100644 --- a/asset/snippets/generated/v1/asset_service.list_assets.js +++ b/asset/snippets/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/asset/snippets/generated/v1/asset_service.list_feeds.js b/asset/snippets/generated/v1/asset_service.list_feeds.js index 97476d935b1..e94a7aa304f 100644 --- a/asset/snippets/generated/v1/asset_service.list_feeds.js +++ b/asset/snippets/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/asset/snippets/generated/v1/asset_service.search_all_iam_policies.js b/asset/snippets/generated/v1/asset_service.search_all_iam_policies.js index 9b3dd1b53b1..acc4033d91f 100644 --- a/asset/snippets/generated/v1/asset_service.search_all_iam_policies.js +++ b/asset/snippets/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/asset/snippets/generated/v1/asset_service.search_all_resources.js b/asset/snippets/generated/v1/asset_service.search_all_resources.js index 16c28272e40..1ec152145c9 100644 --- a/asset/snippets/generated/v1/asset_service.search_all_resources.js +++ b/asset/snippets/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/asset/snippets/generated/v1/asset_service.update_feed.js b/asset/snippets/generated/v1/asset_service.update_feed.js index fc0b5b5aff4..7b8090fb5f4 100644 --- a/asset/snippets/generated/v1/asset_service.update_feed.js +++ b/asset/snippets/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/asset/snippets/generated/v1p1beta1/asset_service.search_all_iam_policies.js b/asset/snippets/generated/v1p1beta1/asset_service.search_all_iam_policies.js index ce7a4481d43..2879ca874c4 100644 --- a/asset/snippets/generated/v1p1beta1/asset_service.search_all_iam_policies.js +++ b/asset/snippets/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/asset/snippets/generated/v1p1beta1/asset_service.search_all_resources.js b/asset/snippets/generated/v1p1beta1/asset_service.search_all_resources.js index d5f28f1956c..856dcdbc27c 100644 --- a/asset/snippets/generated/v1p1beta1/asset_service.search_all_resources.js +++ b/asset/snippets/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/asset/snippets/generated/v1p2beta1/asset_service.create_feed.js b/asset/snippets/generated/v1p2beta1/asset_service.create_feed.js index 9cae8dd8cd8..388cde9c84e 100644 --- a/asset/snippets/generated/v1p2beta1/asset_service.create_feed.js +++ b/asset/snippets/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/asset/snippets/generated/v1p2beta1/asset_service.delete_feed.js b/asset/snippets/generated/v1p2beta1/asset_service.delete_feed.js index 4b8c15b0146..95368bbc74a 100644 --- a/asset/snippets/generated/v1p2beta1/asset_service.delete_feed.js +++ b/asset/snippets/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/asset/snippets/generated/v1p2beta1/asset_service.get_feed.js b/asset/snippets/generated/v1p2beta1/asset_service.get_feed.js index c0fdb7a9e80..e1114eb44b5 100644 --- a/asset/snippets/generated/v1p2beta1/asset_service.get_feed.js +++ b/asset/snippets/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/asset/snippets/generated/v1p2beta1/asset_service.list_feeds.js b/asset/snippets/generated/v1p2beta1/asset_service.list_feeds.js index c0e67b8d0ab..de139a74f36 100644 --- a/asset/snippets/generated/v1p2beta1/asset_service.list_feeds.js +++ b/asset/snippets/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/asset/snippets/generated/v1p2beta1/asset_service.update_feed.js b/asset/snippets/generated/v1p2beta1/asset_service.update_feed.js index 0cfbf0c2319..9bdcd533ad6 100644 --- a/asset/snippets/generated/v1p2beta1/asset_service.update_feed.js +++ b/asset/snippets/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/asset/snippets/generated/v1p4beta1/asset_service.analyze_iam_policy.js b/asset/snippets/generated/v1p4beta1/asset_service.analyze_iam_policy.js index 40f9fe5cab5..5653b6b045e 100644 --- a/asset/snippets/generated/v1p4beta1/asset_service.analyze_iam_policy.js +++ b/asset/snippets/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/asset/snippets/generated/v1p4beta1/asset_service.export_iam_policy_analysis.js b/asset/snippets/generated/v1p4beta1/asset_service.export_iam_policy_analysis.js index e72fda42aca..91299962da2 100644 --- a/asset/snippets/generated/v1p4beta1/asset_service.export_iam_policy_analysis.js +++ b/asset/snippets/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/asset/snippets/generated/v1p5beta1/asset_service.list_assets.js b/asset/snippets/generated/v1p5beta1/asset_service.list_assets.js index b4424c7c9b3..ba81b2f8b32 100644 --- a/asset/snippets/generated/v1p5beta1/asset_service.list_assets.js +++ b/asset/snippets/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] }