Skip to content

Commit eedeb96

Browse files
docs(samples): add example tags to generated samples (#577)
* docs(samples): add example tags to generated samples PiperOrigin-RevId: 408439482 Source-Link: googleapis/googleapis@b9f6184 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 <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 703352e commit eedeb96

23 files changed

+118
-118
lines changed

asset/snippets/generated/v1/asset_service.analyze_iam_policy.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -22,26 +22,26 @@ function main(analysisQuery) {
2222
/**
2323
* Required. The request query.
2424
*/
25-
// const analysisQuery = ''
25+
// const analysisQuery = {}
2626
/**
2727
* Optional. Amount of time executable has to complete. See JSON representation of
28-
* [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
28+
* Duration (https://developers.google.com/protocol-buffers/docs/proto3#json).
2929
* If this field is set with a value less than the RPC deadline, and the
3030
* execution of your query hasn't finished in the specified
3131
* execution timeout, you will get a response with partial result.
3232
* Otherwise, your query's execution will continue until the RPC deadline.
3333
* If it's not finished until then, you will get a DEADLINE_EXCEEDED error.
3434
* Default is empty.
3535
*/
36-
// const executionTimeout = ''
36+
// const executionTimeout = {}
3737

3838
// Imports the Asset library
3939
const {AssetServiceClient} = require('@google-cloud/asset').v1;
4040

4141
// Instantiates a client
4242
const assetClient = new AssetServiceClient();
4343

44-
async function analyzeIamPolicy() {
44+
async function callAnalyzeIamPolicy() {
4545
// Construct request
4646
const request = {
4747
analysisQuery,
@@ -52,7 +52,7 @@ function main(analysisQuery) {
5252
console.log(response);
5353
}
5454

55-
analyzeIamPolicy();
55+
callAnalyzeIamPolicy();
5656
// [END cloudasset_v1_generated_AssetService_AnalyzeIamPolicy_async]
5757
}
5858

asset/snippets/generated/v1/asset_service.analyze_iam_policy_longrunning.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,19 @@ function main(analysisQuery, outputConfig) {
2222
/**
2323
* Required. The request query.
2424
*/
25-
// const analysisQuery = ''
25+
// const analysisQuery = {}
2626
/**
2727
* Required. Output configuration indicating where the results will be output to.
2828
*/
29-
// const outputConfig = ''
29+
// const outputConfig = {}
3030

3131
// Imports the Asset library
3232
const {AssetServiceClient} = require('@google-cloud/asset').v1;
3333

3434
// Instantiates a client
3535
const assetClient = new AssetServiceClient();
3636

37-
async function analyzeIamPolicyLongrunning() {
37+
async function callAnalyzeIamPolicyLongrunning() {
3838
// Construct request
3939
const request = {
4040
analysisQuery,
@@ -47,7 +47,7 @@ function main(analysisQuery, outputConfig) {
4747
console.log(response);
4848
}
4949

50-
analyzeIamPolicyLongrunning();
50+
callAnalyzeIamPolicyLongrunning();
5151
// [END cloudasset_v1_generated_AssetService_AnalyzeIamPolicyLongrunning_async]
5252
}
5353

asset/snippets/generated/v1/asset_service.analyze_move.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ function main(resource, destinationParent) {
3838
* Analysis view indicating what information should be included in the
3939
* analysis response. If unspecified, the default view is FULL.
4040
*/
41-
// const view = ''
41+
// const view = {}
4242

4343
// Imports the Asset library
4444
const {AssetServiceClient} = require('@google-cloud/asset').v1;
4545

4646
// Instantiates a client
4747
const assetClient = new AssetServiceClient();
4848

49-
async function analyzeMove() {
49+
async function callAnalyzeMove() {
5050
// Construct request
5151
const request = {
5252
resource,
@@ -58,7 +58,7 @@ function main(resource, destinationParent) {
5858
console.log(response);
5959
}
6060

61-
analyzeMove();
61+
callAnalyzeMove();
6262
// [END cloudasset_v1_generated_AssetService_AnalyzeMove_async]
6363
}
6464

asset/snippets/generated/v1/asset_service.batch_get_assets_history.js

+13-13
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function main(parent) {
3737
/**
3838
* Optional. The content type.
3939
*/
40-
// const contentType = ''
40+
// const contentType = {}
4141
/**
4242
* Optional. The time window for the asset history. Both start_time and
4343
* end_time are optional and if set, it must be after the current time minus
@@ -46,23 +46,23 @@ function main(parent) {
4646
* returned. The returned results contain all temporal assets whose time
4747
* window overlap with read_time_window.
4848
*/
49-
// const readTimeWindow = ''
49+
// const readTimeWindow = {}
5050
/**
5151
* Optional. A list of relationship types to output, for example:
5252
* `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
5353
* content_type=RELATIONSHIP.
5454
* * If specified:
55-
* it outputs specified relationships' history on the [asset_names]. It
56-
* returns an error if any of the [relationship_types] doesn't belong to the
57-
* supported relationship types of the [asset_names] or if any of the
58-
* [asset_names]'s types doesn't belong to the source types of the
59-
* [relationship_types].
55+
* it outputs specified relationships' history on the asset_names. It
56+
* returns an error if any of the relationship_types doesn't belong to the
57+
* supported relationship types of the asset_names or if any of the
58+
* asset_names's types doesn't belong to the source types of the
59+
* relationship_types.
6060
* * Otherwise:
61-
* it outputs the supported relationships' history on the [asset_names] or
62-
* returns an error if any of the [asset_names]'s types has no relationship
61+
* it outputs the supported relationships' history on the asset_names or
62+
* returns an error if any of the asset_names's types has no relationship
6363
* support.
64-
* See [Introduction to Cloud Asset
65-
* Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
64+
* See Introduction to Cloud Asset
65+
* Inventory (https://cloud.google.com/asset-inventory/docs/overview) for all
6666
* supported asset types and relationship types.
6767
*/
6868
// const relationshipTypes = 'abc123'
@@ -73,7 +73,7 @@ function main(parent) {
7373
// Instantiates a client
7474
const assetClient = new AssetServiceClient();
7575

76-
async function batchGetAssetsHistory() {
76+
async function callBatchGetAssetsHistory() {
7777
// Construct request
7878
const request = {
7979
parent,
@@ -84,7 +84,7 @@ function main(parent) {
8484
console.log(response);
8585
}
8686

87-
batchGetAssetsHistory();
87+
callBatchGetAssetsHistory();
8888
// [END cloudasset_v1_generated_AssetService_BatchGetAssetsHistory_async]
8989
}
9090

asset/snippets/generated/v1/asset_service.create_feed.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ function main(parent, feedId, feed) {
3939
* folders/folder_number/feeds/feed_id
4040
* organizations/organization_number/feeds/feed_id
4141
*/
42-
// const feed = ''
42+
// const feed = {}
4343

4444
// Imports the Asset library
4545
const {AssetServiceClient} = require('@google-cloud/asset').v1;
4646

4747
// Instantiates a client
4848
const assetClient = new AssetServiceClient();
4949

50-
async function createFeed() {
50+
async function callCreateFeed() {
5151
// Construct request
5252
const request = {
5353
parent,
@@ -60,7 +60,7 @@ function main(parent, feedId, feed) {
6060
console.log(response);
6161
}
6262

63-
createFeed();
63+
callCreateFeed();
6464
// [END cloudasset_v1_generated_AssetService_CreateFeed_async]
6565
}
6666

asset/snippets/generated/v1/asset_service.delete_feed.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function main(name) {
3333
// Instantiates a client
3434
const assetClient = new AssetServiceClient();
3535

36-
async function deleteFeed() {
36+
async function callDeleteFeed() {
3737
// Construct request
3838
const request = {
3939
name,
@@ -44,7 +44,7 @@ function main(name) {
4444
console.log(response);
4545
}
4646

47-
deleteFeed();
47+
callDeleteFeed();
4848
// [END cloudasset_v1_generated_AssetService_DeleteFeed_async]
4949
}
5050

asset/snippets/generated/v1/asset_service.export_assets.js

+15-15
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function main(parent, outputConfig) {
3333
* data collection and indexing, there is a volatile window during which
3434
* running the same query may get different results.
3535
*/
36-
// const readTime = ''
36+
// const readTime = {}
3737
/**
3838
* A list of asset types to take a snapshot for. For example:
3939
* "compute.googleapis.com/Disk".
@@ -42,39 +42,39 @@ function main(parent, outputConfig) {
4242
* with "compute.googleapis.com".
4343
* * ".*Instance" snapshots resources whose asset type ends with "Instance".
4444
* * ".*Instance.*" snapshots resources whose asset type contains "Instance".
45-
* See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
45+
* See RE2 (https://github.com/google/re2/wiki/Syntax) for all supported
4646
* regular expression syntax. If the regular expression does not match any
4747
* supported asset type, an INVALID_ARGUMENT error will be returned.
4848
* If specified, only matching assets will be returned, otherwise, it will
49-
* snapshot all asset types. See [Introduction to Cloud Asset
50-
* Inventory](https://cloud.google.com/asset-inventory/docs/overview)
49+
* snapshot all asset types. See Introduction to Cloud Asset
50+
* Inventory (https://cloud.google.com/asset-inventory/docs/overview)
5151
* for all supported asset types.
5252
*/
5353
// const assetTypes = 'abc123'
5454
/**
5555
* Asset content type. If not specified, no content but the asset name will be
5656
* returned.
5757
*/
58-
// const contentType = ''
58+
// const contentType = {}
5959
/**
6060
* Required. Output configuration indicating where the results will be output to.
6161
*/
62-
// const outputConfig = ''
62+
// const outputConfig = {}
6363
/**
6464
* A list of relationship types to export, for example:
6565
* `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
6666
* content_type=RELATIONSHIP.
6767
* * If specified:
6868
* it snapshots specified relationships. It returns an error if
69-
* any of the [relationship_types] doesn't belong to the supported
70-
* relationship types of the [asset_types] or if any of the [asset_types]
71-
* doesn't belong to the source types of the [relationship_types].
69+
* any of the relationship_types doesn't belong to the supported
70+
* relationship types of the asset_types or if any of the asset_types
71+
* doesn't belong to the source types of the relationship_types.
7272
* * Otherwise:
73-
* it snapshots the supported relationships for all [asset_types] or returns
74-
* an error if any of the [asset_types] has no relationship support.
73+
* it snapshots the supported relationships for all asset_types or returns
74+
* an error if any of the asset_types has no relationship support.
7575
* An unspecified asset types field means all supported asset_types.
76-
* See [Introduction to Cloud Asset
77-
* Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
76+
* See Introduction to Cloud Asset
77+
* Inventory (https://cloud.google.com/asset-inventory/docs/overview) for all
7878
* supported asset types and relationship types.
7979
*/
8080
// const relationshipTypes = 'abc123'
@@ -85,7 +85,7 @@ function main(parent, outputConfig) {
8585
// Instantiates a client
8686
const assetClient = new AssetServiceClient();
8787

88-
async function exportAssets() {
88+
async function callExportAssets() {
8989
// Construct request
9090
const request = {
9191
parent,
@@ -98,7 +98,7 @@ function main(parent, outputConfig) {
9898
console.log(response);
9999
}
100100

101-
exportAssets();
101+
callExportAssets();
102102
// [END cloudasset_v1_generated_AssetService_ExportAssets_async]
103103
}
104104

asset/snippets/generated/v1/asset_service.get_feed.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function main(name) {
3333
// Instantiates a client
3434
const assetClient = new AssetServiceClient();
3535

36-
async function getFeed() {
36+
async function callGetFeed() {
3737
// Construct request
3838
const request = {
3939
name,
@@ -44,7 +44,7 @@ function main(name) {
4444
console.log(response);
4545
}
4646

47-
getFeed();
47+
callGetFeed();
4848
// [END cloudasset_v1_generated_AssetService_GetFeed_async]
4949
}
5050

asset/snippets/generated/v1/asset_service.list_assets.js

+14-14
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function main(parent) {
3333
* data collection and indexing, there is a volatile window during which
3434
* running the same query may get different results.
3535
*/
36-
// const readTime = ''
36+
// const readTime = {}
3737
/**
3838
* A list of asset types to take a snapshot for. For example:
3939
* "compute.googleapis.com/Disk".
@@ -42,20 +42,20 @@ function main(parent) {
4242
* with "compute.googleapis.com".
4343
* * ".*Instance" snapshots resources whose asset type ends with "Instance".
4444
* * ".*Instance.*" snapshots resources whose asset type contains "Instance".
45-
* See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
45+
* See RE2 (https://github.com/google/re2/wiki/Syntax) for all supported
4646
* regular expression syntax. If the regular expression does not match any
4747
* supported asset type, an INVALID_ARGUMENT error will be returned.
4848
* If specified, only matching assets will be returned, otherwise, it will
49-
* snapshot all asset types. See [Introduction to Cloud Asset
50-
* Inventory](https://cloud.google.com/asset-inventory/docs/overview)
49+
* snapshot all asset types. See Introduction to Cloud Asset
50+
* Inventory (https://cloud.google.com/asset-inventory/docs/overview)
5151
* for all supported asset types.
5252
*/
5353
// const assetTypes = 'abc123'
5454
/**
5555
* Asset content type. If not specified, no content but the asset name will
5656
* be returned.
5757
*/
58-
// const contentType = ''
58+
// const contentType = {}
5959
/**
6060
* The maximum number of assets to be returned in a single response. Default
6161
* is 100, minimum is 1, and maximum is 1000.
@@ -73,15 +73,15 @@ function main(parent) {
7373
* content_type=RELATIONSHIP.
7474
* * If specified:
7575
* it snapshots specified relationships. It returns an error if
76-
* any of the [relationship_types] doesn't belong to the supported
77-
* relationship types of the [asset_types] or if any of the [asset_types]
78-
* doesn't belong to the source types of the [relationship_types].
76+
* any of the relationship_types doesn't belong to the supported
77+
* relationship types of the asset_types or if any of the asset_types
78+
* doesn't belong to the source types of the relationship_types.
7979
* * Otherwise:
80-
* it snapshots the supported relationships for all [asset_types] or returns
81-
* an error if any of the [asset_types] has no relationship support.
80+
* it snapshots the supported relationships for all asset_types or returns
81+
* an error if any of the asset_types has no relationship support.
8282
* An unspecified asset types field means all supported asset_types.
83-
* See [Introduction to Cloud Asset
84-
* Inventory](https://cloud.google.com/asset-inventory/docs/overview)
83+
* See Introduction to Cloud Asset
84+
* Inventory (https://cloud.google.com/asset-inventory/docs/overview)
8585
* for all supported asset types and relationship types.
8686
*/
8787
// const relationshipTypes = 'abc123'
@@ -92,7 +92,7 @@ function main(parent) {
9292
// Instantiates a client
9393
const assetClient = new AssetServiceClient();
9494

95-
async function listAssets() {
95+
async function callListAssets() {
9696
// Construct request
9797
const request = {
9898
parent,
@@ -105,7 +105,7 @@ function main(parent) {
105105
}
106106
}
107107

108-
listAssets();
108+
callListAssets();
109109
// [END cloudasset_v1_generated_AssetService_ListAssets_async]
110110
}
111111

asset/snippets/generated/v1/asset_service.list_feeds.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function main(parent) {
3232
// Instantiates a client
3333
const assetClient = new AssetServiceClient();
3434

35-
async function listFeeds() {
35+
async function callListFeeds() {
3636
// Construct request
3737
const request = {
3838
parent,
@@ -43,7 +43,7 @@ function main(parent) {
4343
console.log(response);
4444
}
4545

46-
listFeeds();
46+
callListFeeds();
4747
// [END cloudasset_v1_generated_AssetService_ListFeeds_async]
4848
}
4949

0 commit comments

Comments
 (0)