Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Commit

Permalink
docs(samples): add example tags to generated samples (#577)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Nov 10, 2021
1 parent 0c0bd8c commit 6b33fb7
Show file tree
Hide file tree
Showing 29 changed files with 749 additions and 785 deletions.
2 changes: 1 addition & 1 deletion linkinator.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"img.shields.io"
],
"silent": true,
"concurrency": 10
"concurrency": 5
}
10 changes: 5 additions & 5 deletions samples/generated/v1/asset_service.analyze_iam_policy.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,26 @@ 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.
* Otherwise, your query's execution will continue until the RPC deadline.
* 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;

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

async function analyzeIamPolicy() {
async function callAnalyzeIamPolicy() {
// Construct request
const request = {
analysisQuery,
Expand All @@ -52,7 +52,7 @@ function main(analysisQuery) {
console.log(response);
}

analyzeIamPolicy();
callAnalyzeIamPolicy();
// [END cloudasset_v1_generated_AssetService_AnalyzeIamPolicy_async]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ 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;

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

async function analyzeIamPolicyLongrunning() {
async function callAnalyzeIamPolicyLongrunning() {
// Construct request
const request = {
analysisQuery,
Expand All @@ -47,7 +47,7 @@ function main(analysisQuery, outputConfig) {
console.log(response);
}

analyzeIamPolicyLongrunning();
callAnalyzeIamPolicyLongrunning();
// [END cloudasset_v1_generated_AssetService_AnalyzeIamPolicyLongrunning_async]
}

Expand Down
6 changes: 3 additions & 3 deletions samples/generated/v1/asset_service.analyze_move.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ 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;

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

async function analyzeMove() {
async function callAnalyzeMove() {
// Construct request
const request = {
resource,
Expand All @@ -58,7 +58,7 @@ function main(resource, destinationParent) {
console.log(response);
}

analyzeMove();
callAnalyzeMove();
// [END cloudasset_v1_generated_AssetService_AnalyzeMove_async]
}

Expand Down
26 changes: 13 additions & 13 deletions samples/generated/v1/asset_service.batch_get_assets_history.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'
Expand All @@ -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,
Expand All @@ -84,7 +84,7 @@ function main(parent) {
console.log(response);
}

batchGetAssetsHistory();
callBatchGetAssetsHistory();
// [END cloudasset_v1_generated_AssetService_BatchGetAssetsHistory_async]
}

Expand Down
6 changes: 3 additions & 3 deletions samples/generated/v1/asset_service.create_feed.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ 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;

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

async function createFeed() {
async function callCreateFeed() {
// Construct request
const request = {
parent,
Expand All @@ -60,7 +60,7 @@ function main(parent, feedId, feed) {
console.log(response);
}

createFeed();
callCreateFeed();
// [END cloudasset_v1_generated_AssetService_CreateFeed_async]
}

Expand Down
4 changes: 2 additions & 2 deletions samples/generated/v1/asset_service.delete_feed.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -44,7 +44,7 @@ function main(name) {
console.log(response);
}

deleteFeed();
callDeleteFeed();
// [END cloudasset_v1_generated_AssetService_DeleteFeed_async]
}

Expand Down
30 changes: 15 additions & 15 deletions samples/generated/v1/asset_service.export_assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -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".
Expand All @@ -42,39 +42,39 @@ 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'
/**
* 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'
Expand All @@ -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,
Expand All @@ -98,7 +98,7 @@ function main(parent, outputConfig) {
console.log(response);
}

exportAssets();
callExportAssets();
// [END cloudasset_v1_generated_AssetService_ExportAssets_async]
}

Expand Down
4 changes: 2 additions & 2 deletions samples/generated/v1/asset_service.get_feed.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -44,7 +44,7 @@ function main(name) {
console.log(response);
}

getFeed();
callGetFeed();
// [END cloudasset_v1_generated_AssetService_GetFeed_async]
}

Expand Down
28 changes: 14 additions & 14 deletions samples/generated/v1/asset_service.list_assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -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".
Expand All @@ -42,20 +42,20 @@ 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'
/**
* 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.
Expand All @@ -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'
Expand All @@ -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,
Expand All @@ -105,7 +105,7 @@ function main(parent) {
}
}

listAssets();
callListAssets();
// [END cloudasset_v1_generated_AssetService_ListAssets_async]
}

Expand Down
Loading

0 comments on commit 6b33fb7

Please sign in to comment.