-
Notifications
You must be signed in to change notification settings - Fork 601
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 (#92)
* 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
d29c359
commit c548158
Showing
44 changed files
with
2,841 additions
and
964 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 | ||
} |
51 changes: 51 additions & 0 deletions
51
packages/google-appengine/samples/generated/v1/applications.create_application.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,51 @@ | ||
// 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() { | ||
// [START appengine_v1_generated_Applications_CreateApplication_async] | ||
/** | ||
* TODO(developer): Uncomment these variables before running the sample. | ||
*/ | ||
/** | ||
* Application configuration. | ||
*/ | ||
// const application = {} | ||
|
||
// Imports the Appengine library | ||
const {ApplicationsClient} = require('@google-cloud/appengine-admin').v1; | ||
|
||
// Instantiates a client | ||
const appengineClient = new ApplicationsClient(); | ||
|
||
async function callCreateApplication() { | ||
// Construct request | ||
const request = {}; | ||
|
||
// Run request | ||
const [operation] = await appengineClient.createApplication(request); | ||
const [response] = await operation.promise(); | ||
console.log(response); | ||
} | ||
|
||
callCreateApplication(); | ||
// [END appengine_v1_generated_Applications_CreateApplication_async] | ||
} | ||
|
||
process.on('unhandledRejection', err => { | ||
console.error(err.message); | ||
process.exitCode = 1; | ||
}); | ||
main(...process.argv.slice(2)); |
50 changes: 50 additions & 0 deletions
50
packages/google-appengine/samples/generated/v1/applications.get_application.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,50 @@ | ||
// 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() { | ||
// [START appengine_v1_generated_Applications_GetApplication_async] | ||
/** | ||
* TODO(developer): Uncomment these variables before running the sample. | ||
*/ | ||
/** | ||
* Name of the Application resource to get. Example: `apps/myapp`. | ||
*/ | ||
// const name = 'abc123' | ||
|
||
// Imports the Appengine library | ||
const {ApplicationsClient} = require('@google-cloud/appengine-admin').v1; | ||
|
||
// Instantiates a client | ||
const appengineClient = new ApplicationsClient(); | ||
|
||
async function callGetApplication() { | ||
// Construct request | ||
const request = {}; | ||
|
||
// Run request | ||
const response = await appengineClient.getApplication(request); | ||
console.log(response); | ||
} | ||
|
||
callGetApplication(); | ||
// [END appengine_v1_generated_Applications_GetApplication_async] | ||
} | ||
|
||
process.on('unhandledRejection', err => { | ||
console.error(err.message); | ||
process.exitCode = 1; | ||
}); | ||
main(...process.argv.slice(2)); |
51 changes: 51 additions & 0 deletions
51
packages/google-appengine/samples/generated/v1/applications.repair_application.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,51 @@ | ||
// 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() { | ||
// [START appengine_v1_generated_Applications_RepairApplication_async] | ||
/** | ||
* TODO(developer): Uncomment these variables before running the sample. | ||
*/ | ||
/** | ||
* Name of the application to repair. Example: `apps/myapp` | ||
*/ | ||
// const name = 'abc123' | ||
|
||
// Imports the Appengine library | ||
const {ApplicationsClient} = require('@google-cloud/appengine-admin').v1; | ||
|
||
// Instantiates a client | ||
const appengineClient = new ApplicationsClient(); | ||
|
||
async function callRepairApplication() { | ||
// Construct request | ||
const request = {}; | ||
|
||
// Run request | ||
const [operation] = await appengineClient.repairApplication(request); | ||
const [response] = await operation.promise(); | ||
console.log(response); | ||
} | ||
|
||
callRepairApplication(); | ||
// [END appengine_v1_generated_Applications_RepairApplication_async] | ||
} | ||
|
||
process.on('unhandledRejection', err => { | ||
console.error(err.message); | ||
process.exitCode = 1; | ||
}); | ||
main(...process.argv.slice(2)); |
59 changes: 59 additions & 0 deletions
59
packages/google-appengine/samples/generated/v1/applications.update_application.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() { | ||
// [START appengine_v1_generated_Applications_UpdateApplication_async] | ||
/** | ||
* TODO(developer): Uncomment these variables before running the sample. | ||
*/ | ||
/** | ||
* Name of the Application resource to update. Example: `apps/myapp`. | ||
*/ | ||
// const name = 'abc123' | ||
/** | ||
* An Application containing the updated resource. | ||
*/ | ||
// const application = {} | ||
/** | ||
* Standard field mask for the set of fields to be updated. | ||
*/ | ||
// const updateMask = {} | ||
|
||
// Imports the Appengine library | ||
const {ApplicationsClient} = require('@google-cloud/appengine-admin').v1; | ||
|
||
// Instantiates a client | ||
const appengineClient = new ApplicationsClient(); | ||
|
||
async function callUpdateApplication() { | ||
// Construct request | ||
const request = {}; | ||
|
||
// Run request | ||
const [operation] = await appengineClient.updateApplication(request); | ||
const [response] = await operation.promise(); | ||
console.log(response); | ||
} | ||
|
||
callUpdateApplication(); | ||
// [END appengine_v1_generated_Applications_UpdateApplication_async] | ||
} | ||
|
||
process.on('unhandledRejection', err => { | ||
console.error(err.message); | ||
process.exitCode = 1; | ||
}); | ||
main(...process.argv.slice(2)); |
55 changes: 55 additions & 0 deletions
55
...e-appengine/samples/generated/v1/authorized_certificates.create_authorized_certificate.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() { | ||
// [START appengine_v1_generated_AuthorizedCertificates_CreateAuthorizedCertificate_async] | ||
/** | ||
* TODO(developer): Uncomment these variables before running the sample. | ||
*/ | ||
/** | ||
* Name of the parent `Application` resource. Example: `apps/myapp`. | ||
*/ | ||
// const parent = 'abc123' | ||
/** | ||
* SSL certificate data. | ||
*/ | ||
// const certificate = {} | ||
|
||
// Imports the Appengine library | ||
const {AuthorizedCertificatesClient} = | ||
require('@google-cloud/appengine-admin').v1; | ||
|
||
// Instantiates a client | ||
const appengineClient = new AuthorizedCertificatesClient(); | ||
|
||
async function callCreateAuthorizedCertificate() { | ||
// Construct request | ||
const request = {}; | ||
|
||
// Run request | ||
const response = await appengineClient.createAuthorizedCertificate(request); | ||
console.log(response); | ||
} | ||
|
||
callCreateAuthorizedCertificate(); | ||
// [END appengine_v1_generated_AuthorizedCertificates_CreateAuthorizedCertificate_async] | ||
} | ||
|
||
process.on('unhandledRejection', err => { | ||
console.error(err.message); | ||
process.exitCode = 1; | ||
}); | ||
main(...process.argv.slice(2)); |
52 changes: 52 additions & 0 deletions
52
...e-appengine/samples/generated/v1/authorized_certificates.delete_authorized_certificate.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,52 @@ | ||
// 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() { | ||
// [START appengine_v1_generated_AuthorizedCertificates_DeleteAuthorizedCertificate_async] | ||
/** | ||
* TODO(developer): Uncomment these variables before running the sample. | ||
*/ | ||
/** | ||
* Name of the resource to delete. Example: | ||
* `apps/myapp/authorizedCertificates/12345`. | ||
*/ | ||
// const name = 'abc123' | ||
|
||
// Imports the Appengine library | ||
const {AuthorizedCertificatesClient} = | ||
require('@google-cloud/appengine-admin').v1; | ||
|
||
// Instantiates a client | ||
const appengineClient = new AuthorizedCertificatesClient(); | ||
|
||
async function callDeleteAuthorizedCertificate() { | ||
// Construct request | ||
const request = {}; | ||
|
||
// Run request | ||
const response = await appengineClient.deleteAuthorizedCertificate(request); | ||
console.log(response); | ||
} | ||
|
||
callDeleteAuthorizedCertificate(); | ||
// [END appengine_v1_generated_AuthorizedCertificates_DeleteAuthorizedCertificate_async] | ||
} | ||
|
||
process.on('unhandledRejection', err => { | ||
console.error(err.message); | ||
process.exitCode = 1; | ||
}); | ||
main(...process.argv.slice(2)); |
56 changes: 56 additions & 0 deletions
56
...ogle-appengine/samples/generated/v1/authorized_certificates.get_authorized_certificate.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,56 @@ | ||
// 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() { | ||
// [START appengine_v1_generated_AuthorizedCertificates_GetAuthorizedCertificate_async] | ||
/** | ||
* TODO(developer): Uncomment these variables before running the sample. | ||
*/ | ||
/** | ||
* Name of the resource requested. Example: | ||
* `apps/myapp/authorizedCertificates/12345`. | ||
*/ | ||
// const name = 'abc123' | ||
/** | ||
* Controls the set of fields returned in the `GET` response. | ||
*/ | ||
// const view = {} | ||
|
||
// Imports the Appengine library | ||
const {AuthorizedCertificatesClient} = | ||
require('@google-cloud/appengine-admin').v1; | ||
|
||
// Instantiates a client | ||
const appengineClient = new AuthorizedCertificatesClient(); | ||
|
||
async function callGetAuthorizedCertificate() { | ||
// Construct request | ||
const request = {}; | ||
|
||
// Run request | ||
const response = await appengineClient.getAuthorizedCertificate(request); | ||
console.log(response); | ||
} | ||
|
||
callGetAuthorizedCertificate(); | ||
// [END appengine_v1_generated_AuthorizedCertificates_GetAuthorizedCertificate_async] | ||
} | ||
|
||
process.on('unhandledRejection', err => { | ||
console.error(err.message); | ||
process.exitCode = 1; | ||
}); | ||
main(...process.argv.slice(2)); |
Oops, something went wrong.