This repository has been archived by the owner on Nov 14, 2023. It is now read-only.
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 (#563)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 408439482 Source-Link: googleapis/googleapis@b9f6184 Source-Link: googleapis/googleapis-gen@eb888bc Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWI4ODhiYzIxNGVmYzdiZjQzYmY0NjM0YjQ3MDI1NDU2NWE2NTlhNSJ9
- Loading branch information
1 parent
eb8927f
commit cd14cf1
Showing
52 changed files
with
4,142 additions
and
1,323 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 | ||
} |
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,58 @@ | ||
// 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 automl_v1_generated_AutoMl_CreateDataset_async] | ||
/** | ||
* TODO(developer): Uncomment these variables before running the sample. | ||
*/ | ||
/** | ||
* Required. The resource name of the project to create the dataset for. | ||
*/ | ||
// const parent = 'abc123' | ||
/** | ||
* Required. The dataset to create. | ||
*/ | ||
// const dataset = {} | ||
|
||
// Imports the Automl library | ||
const {AutoMlClient} = require('@google-cloud/automl').v1; | ||
|
||
// Instantiates a client | ||
const automlClient = new AutoMlClient(); | ||
|
||
async function callCreateDataset() { | ||
// Construct request | ||
const request = { | ||
parent, | ||
dataset, | ||
}; | ||
|
||
// Run request | ||
const [operation] = await automlClient.createDataset(request); | ||
const [response] = await operation.promise(); | ||
console.log(response); | ||
} | ||
|
||
callCreateDataset(); | ||
// [END automl_v1_generated_AutoMl_CreateDataset_async] | ||
} | ||
|
||
process.on('unhandledRejection', err => { | ||
console.error(err.message); | ||
process.exitCode = 1; | ||
}); | ||
main(...process.argv.slice(2)); |
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,58 @@ | ||
// 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, model) { | ||
// [START automl_v1_generated_AutoMl_CreateModel_async] | ||
/** | ||
* TODO(developer): Uncomment these variables before running the sample. | ||
*/ | ||
/** | ||
* Required. Resource name of the parent project where the model is being created. | ||
*/ | ||
// const parent = 'abc123' | ||
/** | ||
* Required. The model to create. | ||
*/ | ||
// const model = {} | ||
|
||
// Imports the Automl library | ||
const {AutoMlClient} = require('@google-cloud/automl').v1; | ||
|
||
// Instantiates a client | ||
const automlClient = new AutoMlClient(); | ||
|
||
async function callCreateModel() { | ||
// Construct request | ||
const request = { | ||
parent, | ||
model, | ||
}; | ||
|
||
// Run request | ||
const [operation] = await automlClient.createModel(request); | ||
const [response] = await operation.promise(); | ||
console.log(response); | ||
} | ||
|
||
callCreateModel(); | ||
// [END automl_v1_generated_AutoMl_CreateModel_async] | ||
} | ||
|
||
process.on('unhandledRejection', err => { | ||
console.error(err.message); | ||
process.exitCode = 1; | ||
}); | ||
main(...process.argv.slice(2)); |
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,53 @@ | ||
// 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 automl_v1_generated_AutoMl_DeleteDataset_async] | ||
/** | ||
* TODO(developer): Uncomment these variables before running the sample. | ||
*/ | ||
/** | ||
* Required. The resource name of the dataset to delete. | ||
*/ | ||
// const name = 'abc123' | ||
|
||
// Imports the Automl library | ||
const {AutoMlClient} = require('@google-cloud/automl').v1; | ||
|
||
// Instantiates a client | ||
const automlClient = new AutoMlClient(); | ||
|
||
async function callDeleteDataset() { | ||
// Construct request | ||
const request = { | ||
name, | ||
}; | ||
|
||
// Run request | ||
const [operation] = await automlClient.deleteDataset(request); | ||
const [response] = await operation.promise(); | ||
console.log(response); | ||
} | ||
|
||
callDeleteDataset(); | ||
// [END automl_v1_generated_AutoMl_DeleteDataset_async] | ||
} | ||
|
||
process.on('unhandledRejection', err => { | ||
console.error(err.message); | ||
process.exitCode = 1; | ||
}); | ||
main(...process.argv.slice(2)); |
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,53 @@ | ||
// 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 automl_v1_generated_AutoMl_DeleteModel_async] | ||
/** | ||
* TODO(developer): Uncomment these variables before running the sample. | ||
*/ | ||
/** | ||
* Required. Resource name of the model being deleted. | ||
*/ | ||
// const name = 'abc123' | ||
|
||
// Imports the Automl library | ||
const {AutoMlClient} = require('@google-cloud/automl').v1; | ||
|
||
// Instantiates a client | ||
const automlClient = new AutoMlClient(); | ||
|
||
async function callDeleteModel() { | ||
// Construct request | ||
const request = { | ||
name, | ||
}; | ||
|
||
// Run request | ||
const [operation] = await automlClient.deleteModel(request); | ||
const [response] = await operation.promise(); | ||
console.log(response); | ||
} | ||
|
||
callDeleteModel(); | ||
// [END automl_v1_generated_AutoMl_DeleteModel_async] | ||
} | ||
|
||
process.on('unhandledRejection', err => { | ||
console.error(err.message); | ||
process.exitCode = 1; | ||
}); | ||
main(...process.argv.slice(2)); |
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(name) { | ||
// [START automl_v1_generated_AutoMl_DeployModel_async] | ||
/** | ||
* TODO(developer): Uncomment these variables before running the sample. | ||
*/ | ||
/** | ||
* Model deployment metadata specific to Image Object Detection. | ||
*/ | ||
// const imageObjectDetectionModelDeploymentMetadata = {} | ||
/** | ||
* Model deployment metadata specific to Image Classification. | ||
*/ | ||
// const imageClassificationModelDeploymentMetadata = {} | ||
/** | ||
* Required. Resource name of the model to deploy. | ||
*/ | ||
// const name = 'abc123' | ||
|
||
// Imports the Automl library | ||
const {AutoMlClient} = require('@google-cloud/automl').v1; | ||
|
||
// Instantiates a client | ||
const automlClient = new AutoMlClient(); | ||
|
||
async function callDeployModel() { | ||
// Construct request | ||
const request = { | ||
name, | ||
}; | ||
|
||
// Run request | ||
const [operation] = await automlClient.deployModel(request); | ||
const [response] = await operation.promise(); | ||
console.log(response); | ||
} | ||
|
||
callDeployModel(); | ||
// [END automl_v1_generated_AutoMl_DeployModel_async] | ||
} | ||
|
||
process.on('unhandledRejection', err => { | ||
console.error(err.message); | ||
process.exitCode = 1; | ||
}); | ||
main(...process.argv.slice(2)); |
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,58 @@ | ||
// 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, outputConfig) { | ||
// [START automl_v1_generated_AutoMl_ExportData_async] | ||
/** | ||
* TODO(developer): Uncomment these variables before running the sample. | ||
*/ | ||
/** | ||
* Required. The resource name of the dataset. | ||
*/ | ||
// const name = 'abc123' | ||
/** | ||
* Required. The desired output location. | ||
*/ | ||
// const outputConfig = {} | ||
|
||
// Imports the Automl library | ||
const {AutoMlClient} = require('@google-cloud/automl').v1; | ||
|
||
// Instantiates a client | ||
const automlClient = new AutoMlClient(); | ||
|
||
async function callExportData() { | ||
// Construct request | ||
const request = { | ||
name, | ||
outputConfig, | ||
}; | ||
|
||
// Run request | ||
const [operation] = await automlClient.exportData(request); | ||
const [response] = await operation.promise(); | ||
console.log(response); | ||
} | ||
|
||
callExportData(); | ||
// [END automl_v1_generated_AutoMl_ExportData_async] | ||
} | ||
|
||
process.on('unhandledRejection', err => { | ||
console.error(err.message); | ||
process.exitCode = 1; | ||
}); | ||
main(...process.argv.slice(2)); |
Oops, something went wrong.