-
Notifications
You must be signed in to change notification settings - Fork 606
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(samples): add example tags to generated samples (#322)
* 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
1 parent
e4e89c6
commit ac55cd4
Showing
36 changed files
with
3,152 additions
and
977 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,5 +6,5 @@ | |
"img.shields.io" | ||
], | ||
"silent": true, | ||
"concurrency": 10 | ||
"concurrency": 5 | ||
} |
61 changes: 61 additions & 0 deletions
61
...atalabeling/samples/generated/v1beta1/data_labeling_service.create_annotation_spec_set.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
// Copyright 2021 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
'use strict'; | ||
|
||
function main(parent, annotationSpecSet) { | ||
// [START datalabeling_v1beta1_generated_DataLabelingService_CreateAnnotationSpecSet_async] | ||
/** | ||
* TODO(developer): Uncomment these variables before running the sample. | ||
*/ | ||
/** | ||
* Required. AnnotationSpecSet resource parent, format: | ||
* projects/{project_id} | ||
*/ | ||
// const parent = 'abc123' | ||
/** | ||
* Required. Annotation spec set to create. Annotation specs must be included. | ||
* Only one annotation spec will be accepted for annotation specs with same | ||
* display_name. | ||
*/ | ||
// const annotationSpecSet = {} | ||
|
||
// Imports the Datalabeling library | ||
const {DataLabelingServiceClient} = | ||
require('@google-cloud/datalabeling').v1beta1; | ||
|
||
// Instantiates a client | ||
const datalabelingClient = new DataLabelingServiceClient(); | ||
|
||
async function callCreateAnnotationSpecSet() { | ||
// Construct request | ||
const request = { | ||
parent, | ||
annotationSpecSet, | ||
}; | ||
|
||
// Run request | ||
const response = await datalabelingClient.createAnnotationSpecSet(request); | ||
console.log(response); | ||
} | ||
|
||
callCreateAnnotationSpecSet(); | ||
// [END datalabeling_v1beta1_generated_DataLabelingService_CreateAnnotationSpecSet_async] | ||
} | ||
|
||
process.on('unhandledRejection', err => { | ||
console.error(err.message); | ||
process.exitCode = 1; | ||
}); | ||
main(...process.argv.slice(2)); |
59 changes: 59 additions & 0 deletions
59
...ogle-cloud-datalabeling/samples/generated/v1beta1/data_labeling_service.create_dataset.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
// Copyright 2021 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
'use strict'; | ||
|
||
function main(parent, dataset) { | ||
// [START datalabeling_v1beta1_generated_DataLabelingService_CreateDataset_async] | ||
/** | ||
* TODO(developer): Uncomment these variables before running the sample. | ||
*/ | ||
/** | ||
* Required. Dataset resource parent, format: | ||
* projects/{project_id} | ||
*/ | ||
// const parent = 'abc123' | ||
/** | ||
* Required. The dataset to be created. | ||
*/ | ||
// const dataset = {} | ||
|
||
// Imports the Datalabeling library | ||
const {DataLabelingServiceClient} = | ||
require('@google-cloud/datalabeling').v1beta1; | ||
|
||
// Instantiates a client | ||
const datalabelingClient = new DataLabelingServiceClient(); | ||
|
||
async function callCreateDataset() { | ||
// Construct request | ||
const request = { | ||
parent, | ||
dataset, | ||
}; | ||
|
||
// Run request | ||
const response = await datalabelingClient.createDataset(request); | ||
console.log(response); | ||
} | ||
|
||
callCreateDataset(); | ||
// [END datalabeling_v1beta1_generated_DataLabelingService_CreateDataset_async] | ||
} | ||
|
||
process.on('unhandledRejection', err => { | ||
console.error(err.message); | ||
process.exitCode = 1; | ||
}); | ||
main(...process.argv.slice(2)); |
59 changes: 59 additions & 0 deletions
59
...oud-datalabeling/samples/generated/v1beta1/data_labeling_service.create_evaluation_job.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
// Copyright 2021 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
'use strict'; | ||
|
||
function main(parent, job) { | ||
// [START datalabeling_v1beta1_generated_DataLabelingService_CreateEvaluationJob_async] | ||
/** | ||
* TODO(developer): Uncomment these variables before running the sample. | ||
*/ | ||
/** | ||
* Required. Evaluation job resource parent. Format: | ||
* "projects/<var>{project_id}</var>" | ||
*/ | ||
// const parent = 'abc123' | ||
/** | ||
* Required. The evaluation job to create. | ||
*/ | ||
// const job = {} | ||
|
||
// Imports the Datalabeling library | ||
const {DataLabelingServiceClient} = | ||
require('@google-cloud/datalabeling').v1beta1; | ||
|
||
// Instantiates a client | ||
const datalabelingClient = new DataLabelingServiceClient(); | ||
|
||
async function callCreateEvaluationJob() { | ||
// Construct request | ||
const request = { | ||
parent, | ||
job, | ||
}; | ||
|
||
// Run request | ||
const response = await datalabelingClient.createEvaluationJob(request); | ||
console.log(response); | ||
} | ||
|
||
callCreateEvaluationJob(); | ||
// [END datalabeling_v1beta1_generated_DataLabelingService_CreateEvaluationJob_async] | ||
} | ||
|
||
process.on('unhandledRejection', err => { | ||
console.error(err.message); | ||
process.exitCode = 1; | ||
}); | ||
main(...process.argv.slice(2)); |
60 changes: 60 additions & 0 deletions
60
...-cloud-datalabeling/samples/generated/v1beta1/data_labeling_service.create_instruction.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
// Copyright 2021 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
'use strict'; | ||
|
||
function main(parent, instruction) { | ||
// [START datalabeling_v1beta1_generated_DataLabelingService_CreateInstruction_async] | ||
/** | ||
* TODO(developer): Uncomment these variables before running the sample. | ||
*/ | ||
/** | ||
* Required. Instruction resource parent, format: | ||
* projects/{project_id} | ||
*/ | ||
// const parent = 'abc123' | ||
/** | ||
* Required. Instruction of how to perform the labeling task. | ||
*/ | ||
// const instruction = {} | ||
|
||
// Imports the Datalabeling library | ||
const {DataLabelingServiceClient} = | ||
require('@google-cloud/datalabeling').v1beta1; | ||
|
||
// Instantiates a client | ||
const datalabelingClient = new DataLabelingServiceClient(); | ||
|
||
async function callCreateInstruction() { | ||
// Construct request | ||
const request = { | ||
parent, | ||
instruction, | ||
}; | ||
|
||
// Run request | ||
const [operation] = await datalabelingClient.createInstruction(request); | ||
const [response] = await operation.promise(); | ||
console.log(response); | ||
} | ||
|
||
callCreateInstruction(); | ||
// [END datalabeling_v1beta1_generated_DataLabelingService_CreateInstruction_async] | ||
} | ||
|
||
process.on('unhandledRejection', err => { | ||
console.error(err.message); | ||
process.exitCode = 1; | ||
}); | ||
main(...process.argv.slice(2)); |
55 changes: 55 additions & 0 deletions
55
...-datalabeling/samples/generated/v1beta1/data_labeling_service.delete_annotated_dataset.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// Copyright 2021 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
'use strict'; | ||
|
||
function main(name) { | ||
// [START datalabeling_v1beta1_generated_DataLabelingService_DeleteAnnotatedDataset_async] | ||
/** | ||
* TODO(developer): Uncomment these variables before running the sample. | ||
*/ | ||
/** | ||
* Required. Name of the annotated dataset to delete, format: | ||
* projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ | ||
* {annotated_dataset_id} | ||
*/ | ||
// const name = 'abc123' | ||
|
||
// Imports the Datalabeling library | ||
const {DataLabelingServiceClient} = | ||
require('@google-cloud/datalabeling').v1beta1; | ||
|
||
// Instantiates a client | ||
const datalabelingClient = new DataLabelingServiceClient(); | ||
|
||
async function callDeleteAnnotatedDataset() { | ||
// Construct request | ||
const request = { | ||
name, | ||
}; | ||
|
||
// Run request | ||
const response = await datalabelingClient.deleteAnnotatedDataset(request); | ||
console.log(response); | ||
} | ||
|
||
callDeleteAnnotatedDataset(); | ||
// [END datalabeling_v1beta1_generated_DataLabelingService_DeleteAnnotatedDataset_async] | ||
} | ||
|
||
process.on('unhandledRejection', err => { | ||
console.error(err.message); | ||
process.exitCode = 1; | ||
}); | ||
main(...process.argv.slice(2)); |
54 changes: 54 additions & 0 deletions
54
...atalabeling/samples/generated/v1beta1/data_labeling_service.delete_annotation_spec_set.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
// Copyright 2021 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
'use strict'; | ||
|
||
function main(name) { | ||
// [START datalabeling_v1beta1_generated_DataLabelingService_DeleteAnnotationSpecSet_async] | ||
/** | ||
* TODO(developer): Uncomment these variables before running the sample. | ||
*/ | ||
/** | ||
* Required. AnnotationSpec resource name, format: | ||
* `projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}`. | ||
*/ | ||
// const name = 'abc123' | ||
|
||
// Imports the Datalabeling library | ||
const {DataLabelingServiceClient} = | ||
require('@google-cloud/datalabeling').v1beta1; | ||
|
||
// Instantiates a client | ||
const datalabelingClient = new DataLabelingServiceClient(); | ||
|
||
async function callDeleteAnnotationSpecSet() { | ||
// Construct request | ||
const request = { | ||
name, | ||
}; | ||
|
||
// Run request | ||
const response = await datalabelingClient.deleteAnnotationSpecSet(request); | ||
console.log(response); | ||
} | ||
|
||
callDeleteAnnotationSpecSet(); | ||
// [END datalabeling_v1beta1_generated_DataLabelingService_DeleteAnnotationSpecSet_async] | ||
} | ||
|
||
process.on('unhandledRejection', err => { | ||
console.error(err.message); | ||
process.exitCode = 1; | ||
}); | ||
main(...process.argv.slice(2)); |
Oops, something went wrong.