Skip to content

Commit

Permalink
docs(samples): add example tags to generated samples (#551)
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: googleapis/googleapis-gen@eb888bc
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 11, 2021
1 parent cbfceae commit 4e38af4
Show file tree
Hide file tree
Showing 37 changed files with 1,050 additions and 1,110 deletions.
2 changes: 1 addition & 1 deletion packages/google-cloud-dataproc/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
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ function main(parent, policy) {
/**
* Required. The autoscaling policy to create.
*/
// const policy = ''
// const policy = {}

// Imports the Dataproc library
const {AutoscalingPolicyServiceClient} = require('@google-cloud/dataproc').v1;

// Instantiates a client
const dataprocClient = new AutoscalingPolicyServiceClient();

async function createAutoscalingPolicy() {
async function callCreateAutoscalingPolicy() {
// Construct request
const request = {
parent,
Expand All @@ -53,7 +53,7 @@ function main(parent, policy) {
console.log(response);
}

createAutoscalingPolicy();
callCreateAutoscalingPolicy();
// [END dataproc_v1_generated_AutoscalingPolicyService_CreateAutoscalingPolicy_async]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function main(name) {
// Instantiates a client
const dataprocClient = new AutoscalingPolicyServiceClient();

async function deleteAutoscalingPolicy() {
async function callDeleteAutoscalingPolicy() {
// Construct request
const request = {
name,
Expand All @@ -48,7 +48,7 @@ function main(name) {
console.log(response);
}

deleteAutoscalingPolicy();
callDeleteAutoscalingPolicy();
// [END dataproc_v1_generated_AutoscalingPolicyService_DeleteAutoscalingPolicy_async]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function main(name) {
// Instantiates a client
const dataprocClient = new AutoscalingPolicyServiceClient();

async function getAutoscalingPolicy() {
async function callGetAutoscalingPolicy() {
// Construct request
const request = {
name,
Expand All @@ -48,7 +48,7 @@ function main(name) {
console.log(response);
}

getAutoscalingPolicy();
callGetAutoscalingPolicy();
// [END dataproc_v1_generated_AutoscalingPolicyService_GetAutoscalingPolicy_async]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function main(parent) {
// Instantiates a client
const dataprocClient = new AutoscalingPolicyServiceClient();

async function listAutoscalingPolicies() {
async function callListAutoscalingPolicies() {
// Construct request
const request = {
parent,
Expand All @@ -60,7 +60,7 @@ function main(parent) {
}
}

listAutoscalingPolicies();
callListAutoscalingPolicies();
// [END dataproc_v1_generated_AutoscalingPolicyService_ListAutoscalingPolicies_async]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ function main(policy) {
/**
* Required. The updated autoscaling policy.
*/
// const policy = ''
// const policy = {}

// Imports the Dataproc library
const {AutoscalingPolicyServiceClient} = require('@google-cloud/dataproc').v1;

// Instantiates a client
const dataprocClient = new AutoscalingPolicyServiceClient();

async function updateAutoscalingPolicy() {
async function callUpdateAutoscalingPolicy() {
// Construct request
const request = {
policy,
Expand All @@ -41,7 +41,7 @@ function main(policy) {
console.log(response);
}

updateAutoscalingPolicy();
callUpdateAutoscalingPolicy();
// [END dataproc_v1_generated_AutoscalingPolicyService_UpdateAutoscalingPolicy_async]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function main(parent, batch) {
/**
* Required. The batch to create.
*/
// const batch = ''
// const batch = {}
/**
* Optional. The ID to use for the batch, which will become the final component of
* the batch's resource name.
Expand All @@ -36,12 +36,12 @@ function main(parent, batch) {
/**
* Optional. A unique ID used to identify the request. If the service
* receives two
* [CreateBatchRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateBatchRequest)s
* CreateBatchRequest (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateBatchRequest)s
* with the same request_id, the second request is ignored and the
* Operation that corresponds to the first Batch created and stored
* in the backend is returned.
* Recommendation: Set this value to a
* [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
* UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).
* The value must contain only letters (a-z, A-Z), numbers (0-9),
* underscores (_), and hyphens (-). The maximum length is 40 characters.
*/
Expand All @@ -53,7 +53,7 @@ function main(parent, batch) {
// Instantiates a client
const dataprocClient = new BatchControllerClient();

async function createBatch() {
async function callCreateBatch() {
// Construct request
const request = {
parent,
Expand All @@ -66,7 +66,7 @@ function main(parent, batch) {
console.log(response);
}

createBatch();
callCreateBatch();
// [END dataproc_v1_generated_BatchController_CreateBatch_async]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function main(name) {
// Instantiates a client
const dataprocClient = new BatchControllerClient();

async function deleteBatch() {
async function callDeleteBatch() {
// Construct request
const request = {
name,
Expand All @@ -41,7 +41,7 @@ function main(name) {
console.log(response);
}

deleteBatch();
callDeleteBatch();
// [END dataproc_v1_generated_BatchController_DeleteBatch_async]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function main(name) {
// Instantiates a client
const dataprocClient = new BatchControllerClient();

async function getBatch() {
async function callGetBatch() {
// Construct request
const request = {
name,
Expand All @@ -41,7 +41,7 @@ function main(name) {
console.log(response);
}

getBatch();
callGetBatch();
// [END dataproc_v1_generated_BatchController_GetBatch_async]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function main(parent) {
// Instantiates a client
const dataprocClient = new BatchControllerClient();

async function listBatches() {
async function callListBatches() {
// Construct request
const request = {
parent,
Expand All @@ -54,7 +54,7 @@ function main(parent) {
}
}

listBatches();
callListBatches();
// [END dataproc_v1_generated_BatchController_ListBatches_async]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,31 +31,31 @@ function main(projectId, region, cluster) {
/**
* Required. The cluster to create.
*/
// const cluster = ''
// const cluster = {}
/**
* Optional. A unique ID used to identify the request. If the server receives two
* [CreateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateClusterRequest)s
* CreateClusterRequest (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateClusterRequest)s
* with the same id, then the second request will be ignored and the
* first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the backend
* first google.longrunning.Operation google.longrunning.Operation created and stored in the backend
* is returned.
* It is recommended to always set this value to a
* [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
* UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).
* The ID must contain only letters (a-z, A-Z), numbers (0-9),
* underscores (_), and hyphens (-). The maximum length is 40 characters.
*/
// const requestId = 'abc123'
/**
* Optional. Failure action when primary worker creation fails.
*/
// const actionOnFailedPrimaryWorkers = ''
// const actionOnFailedPrimaryWorkers = {}

// Imports the Dataproc library
const {ClusterControllerClient} = require('@google-cloud/dataproc').v1;

// Instantiates a client
const dataprocClient = new ClusterControllerClient();

async function createCluster() {
async function callCreateCluster() {
// Construct request
const request = {
projectId,
Expand All @@ -69,7 +69,7 @@ function main(projectId, region, cluster) {
console.log(response);
}

createCluster();
callCreateCluster();
// [END dataproc_v1_generated_ClusterController_CreateCluster_async]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ function main(projectId, region, clusterName) {
/**
* Optional. A unique ID used to identify the request. If the server
* receives two
* [DeleteClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.DeleteClusterRequest)s
* DeleteClusterRequest (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.DeleteClusterRequest)s
* with the same id, then the second request will be ignored and the
* first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the
* first google.longrunning.Operation google.longrunning.Operation created and stored in the
* backend is returned.
* It is recommended to always set this value to a
* [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
* UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).
* The ID must contain only letters (a-z, A-Z), numbers (0-9),
* underscores (_), and hyphens (-). The maximum length is 40 characters.
*/
Expand All @@ -57,7 +57,7 @@ function main(projectId, region, clusterName) {
// Instantiates a client
const dataprocClient = new ClusterControllerClient();

async function deleteCluster() {
async function callDeleteCluster() {
// Construct request
const request = {
projectId,
Expand All @@ -71,7 +71,7 @@ function main(projectId, region, clusterName) {
console.log(response);
}

deleteCluster();
callDeleteCluster();
// [END dataproc_v1_generated_ClusterController_DeleteCluster_async]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function main(projectId, region, clusterName) {
// Instantiates a client
const dataprocClient = new ClusterControllerClient();

async function diagnoseCluster() {
async function callDiagnoseCluster() {
// Construct request
const request = {
projectId,
Expand All @@ -53,7 +53,7 @@ function main(projectId, region, clusterName) {
console.log(response);
}

diagnoseCluster();
callDiagnoseCluster();
// [END dataproc_v1_generated_ClusterController_DiagnoseCluster_async]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function main(projectId, region, clusterName) {
// Instantiates a client
const dataprocClient = new ClusterControllerClient();

async function getCluster() {
async function callGetCluster() {
// Construct request
const request = {
projectId,
Expand All @@ -52,7 +52,7 @@ function main(projectId, region, clusterName) {
console.log(response);
}

getCluster();
callGetCluster();
// [END dataproc_v1_generated_ClusterController_GetCluster_async]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ function main(projectId, region) {
/**
* Optional. A filter constraining the clusters to list. Filters are
* case-sensitive and have the following syntax:
* field = value [AND [field = value]] ...
* where **field** is one of `status.state`, `clusterName`, or `labels.[KEY]`,
* field = value AND field = value ...
* where **field** is one of `status.state`, `clusterName`, or `labels.KEY`,
* and `[KEY]` is a label key. **value** can be `*` to match all values.
* `status.state` can be one of the following: `ACTIVE`, `INACTIVE`,
* `CREATING`, `RUNNING`, `ERROR`, `DELETING`, or `UPDATING`. `ACTIVE`
Expand Down Expand Up @@ -61,7 +61,7 @@ function main(projectId, region) {
// Instantiates a client
const dataprocClient = new ClusterControllerClient();

async function listClusters() {
async function callListClusters() {
// Construct request
const request = {
projectId,
Expand All @@ -75,7 +75,7 @@ function main(projectId, region) {
}
}

listClusters();
callListClusters();
// [END dataproc_v1_generated_ClusterController_ListClusters_async]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ function main(projectId, region, clusterName) {
/**
* Optional. A unique ID used to identify the request. If the server
* receives two
* [StartClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StartClusterRequest)s
* StartClusterRequest (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StartClusterRequest)s
* with the same id, then the second request will be ignored and the
* first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the
* first google.longrunning.Operation google.longrunning.Operation created and stored in the
* backend is returned.
* Recommendation: Set this value to a
* [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
* UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).
* The ID must contain only letters (a-z, A-Z), numbers (0-9),
* underscores (_), and hyphens (-). The maximum length is 40 characters.
*/
Expand All @@ -57,7 +57,7 @@ function main(projectId, region, clusterName) {
// Instantiates a client
const dataprocClient = new ClusterControllerClient();

async function startCluster() {
async function callStartCluster() {
// Construct request
const request = {
projectId,
Expand All @@ -71,7 +71,7 @@ function main(projectId, region, clusterName) {
console.log(response);
}

startCluster();
callStartCluster();
// [END dataproc_v1_generated_ClusterController_StartCluster_async]
}

Expand Down
Loading

0 comments on commit 4e38af4

Please sign in to comment.