-
Notifications
You must be signed in to change notification settings - Fork 595
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 auto-generated samples for Node with api short nam…
…e in region tag (#30) * docs(samples): add auto-generated samples for Node with api short name in region tag PiperOrigin-RevId: 399287285 Source-Link: googleapis/googleapis@1575986 Source-Link: googleapis/googleapis-gen@b27fff6 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjI3ZmZmNjIzYTVkOGQ1ODZiNzAzYjVlNDkxOTg1NmFiZTdjMmViMyJ9 * 🦉 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
661c846
commit 68d52f7
Showing
5 changed files
with
300 additions
and
0 deletions.
There are no files selected for viewing
60 changes: 60 additions & 0 deletions
60
...gle-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.delete_resource.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() { | ||
// [START connectgateway_v1beta1_generated_GatewayService_DeleteResource_async] | ||
/** | ||
* TODO(developer): Uncomment these variables before running the sample. | ||
*/ | ||
/** | ||
* The HTTP Content-Type header value specifying the content type of the body. | ||
*/ | ||
// const contentType = 'abc123' | ||
/** | ||
* The HTTP request/response body as raw binary. | ||
*/ | ||
// const data = 'Buffer.from('string')' | ||
/** | ||
* Application specific response metadata. Must be set in the first response | ||
* for streaming APIs. | ||
*/ | ||
// const extensions = 1234 | ||
|
||
// Imports the Gateway library | ||
const {GatewayServiceClient} = | ||
require('@google-cloud/gke-connect-gateway').v1beta1; | ||
|
||
// Instantiates a client | ||
const gatewayClient = new GatewayServiceClient(); | ||
|
||
async function deleteResource() { | ||
// Construct request | ||
const request = {}; | ||
|
||
// Run request | ||
const response = await gatewayClient.deleteResource(request); | ||
console.log(response); | ||
} | ||
|
||
deleteResource(); | ||
// [END connectgateway_v1beta1_generated_GatewayService_DeleteResource_async] | ||
} | ||
|
||
process.on('unhandledRejection', err => { | ||
console.error(err.message); | ||
process.exitCode = 1; | ||
}); | ||
main(...process.argv.slice(2)); |
60 changes: 60 additions & 0 deletions
60
...google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.get_resource.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() { | ||
// [START connectgateway_v1beta1_generated_GatewayService_GetResource_async] | ||
/** | ||
* TODO(developer): Uncomment these variables before running the sample. | ||
*/ | ||
/** | ||
* The HTTP Content-Type header value specifying the content type of the body. | ||
*/ | ||
// const contentType = 'abc123' | ||
/** | ||
* The HTTP request/response body as raw binary. | ||
*/ | ||
// const data = 'Buffer.from('string')' | ||
/** | ||
* Application specific response metadata. Must be set in the first response | ||
* for streaming APIs. | ||
*/ | ||
// const extensions = 1234 | ||
|
||
// Imports the Gateway library | ||
const {GatewayServiceClient} = | ||
require('@google-cloud/gke-connect-gateway').v1beta1; | ||
|
||
// Instantiates a client | ||
const gatewayClient = new GatewayServiceClient(); | ||
|
||
async function getResource() { | ||
// Construct request | ||
const request = {}; | ||
|
||
// Run request | ||
const response = await gatewayClient.getResource(request); | ||
console.log(response); | ||
} | ||
|
||
getResource(); | ||
// [END connectgateway_v1beta1_generated_GatewayService_GetResource_async] | ||
} | ||
|
||
process.on('unhandledRejection', err => { | ||
console.error(err.message); | ||
process.exitCode = 1; | ||
}); | ||
main(...process.argv.slice(2)); |
60 changes: 60 additions & 0 deletions
60
...ogle-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.patch_resource.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() { | ||
// [START connectgateway_v1beta1_generated_GatewayService_PatchResource_async] | ||
/** | ||
* TODO(developer): Uncomment these variables before running the sample. | ||
*/ | ||
/** | ||
* The HTTP Content-Type header value specifying the content type of the body. | ||
*/ | ||
// const contentType = 'abc123' | ||
/** | ||
* The HTTP request/response body as raw binary. | ||
*/ | ||
// const data = 'Buffer.from('string')' | ||
/** | ||
* Application specific response metadata. Must be set in the first response | ||
* for streaming APIs. | ||
*/ | ||
// const extensions = 1234 | ||
|
||
// Imports the Gateway library | ||
const {GatewayServiceClient} = | ||
require('@google-cloud/gke-connect-gateway').v1beta1; | ||
|
||
// Instantiates a client | ||
const gatewayClient = new GatewayServiceClient(); | ||
|
||
async function patchResource() { | ||
// Construct request | ||
const request = {}; | ||
|
||
// Run request | ||
const response = await gatewayClient.patchResource(request); | ||
console.log(response); | ||
} | ||
|
||
patchResource(); | ||
// [END connectgateway_v1beta1_generated_GatewayService_PatchResource_async] | ||
} | ||
|
||
process.on('unhandledRejection', err => { | ||
console.error(err.message); | ||
process.exitCode = 1; | ||
}); | ||
main(...process.argv.slice(2)); |
60 changes: 60 additions & 0 deletions
60
...oogle-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.post_resource.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() { | ||
// [START connectgateway_v1beta1_generated_GatewayService_PostResource_async] | ||
/** | ||
* TODO(developer): Uncomment these variables before running the sample. | ||
*/ | ||
/** | ||
* The HTTP Content-Type header value specifying the content type of the body. | ||
*/ | ||
// const contentType = 'abc123' | ||
/** | ||
* The HTTP request/response body as raw binary. | ||
*/ | ||
// const data = 'Buffer.from('string')' | ||
/** | ||
* Application specific response metadata. Must be set in the first response | ||
* for streaming APIs. | ||
*/ | ||
// const extensions = 1234 | ||
|
||
// Imports the Gateway library | ||
const {GatewayServiceClient} = | ||
require('@google-cloud/gke-connect-gateway').v1beta1; | ||
|
||
// Instantiates a client | ||
const gatewayClient = new GatewayServiceClient(); | ||
|
||
async function postResource() { | ||
// Construct request | ||
const request = {}; | ||
|
||
// Run request | ||
const response = await gatewayClient.postResource(request); | ||
console.log(response); | ||
} | ||
|
||
postResource(); | ||
// [END connectgateway_v1beta1_generated_GatewayService_PostResource_async] | ||
} | ||
|
||
process.on('unhandledRejection', err => { | ||
console.error(err.message); | ||
process.exitCode = 1; | ||
}); | ||
main(...process.argv.slice(2)); |
60 changes: 60 additions & 0 deletions
60
...google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.put_resource.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() { | ||
// [START connectgateway_v1beta1_generated_GatewayService_PutResource_async] | ||
/** | ||
* TODO(developer): Uncomment these variables before running the sample. | ||
*/ | ||
/** | ||
* The HTTP Content-Type header value specifying the content type of the body. | ||
*/ | ||
// const contentType = 'abc123' | ||
/** | ||
* The HTTP request/response body as raw binary. | ||
*/ | ||
// const data = 'Buffer.from('string')' | ||
/** | ||
* Application specific response metadata. Must be set in the first response | ||
* for streaming APIs. | ||
*/ | ||
// const extensions = 1234 | ||
|
||
// Imports the Gateway library | ||
const {GatewayServiceClient} = | ||
require('@google-cloud/gke-connect-gateway').v1beta1; | ||
|
||
// Instantiates a client | ||
const gatewayClient = new GatewayServiceClient(); | ||
|
||
async function putResource() { | ||
// Construct request | ||
const request = {}; | ||
|
||
// Run request | ||
const response = await gatewayClient.putResource(request); | ||
console.log(response); | ||
} | ||
|
||
putResource(); | ||
// [END connectgateway_v1beta1_generated_GatewayService_PutResource_async] | ||
} | ||
|
||
process.on('unhandledRejection', err => { | ||
console.error(err.message); | ||
process.exitCode = 1; | ||
}); | ||
main(...process.argv.slice(2)); |