From 68d52f70670a27268cef60bdc6230aea82d6b4d4 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 28 Sep 2021 16:56:03 -0700 Subject: [PATCH] docs(samples): add auto-generated samples for Node with api short name in region tag (#30) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs(samples): add auto-generated samples for Node with api short name in region tag PiperOrigin-RevId: 399287285 Source-Link: https://github.com/googleapis/googleapis/commit/15759865d1c54e3d46429010f7e472fe6c3d3715 Source-Link: https://github.com/googleapis/googleapis-gen/commit/b27fff623a5d8d586b703b5e4919856abe7c2eb3 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 --- .../gateway_service.delete_resource.js | 60 +++++++++++++++++++ .../v1beta1/gateway_service.get_resource.js | 60 +++++++++++++++++++ .../v1beta1/gateway_service.patch_resource.js | 60 +++++++++++++++++++ .../v1beta1/gateway_service.post_resource.js | 60 +++++++++++++++++++ .../v1beta1/gateway_service.put_resource.js | 60 +++++++++++++++++++ 5 files changed, 300 insertions(+) create mode 100644 packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.delete_resource.js create mode 100644 packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.get_resource.js create mode 100644 packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.patch_resource.js create mode 100644 packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.post_resource.js create mode 100644 packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.put_resource.js diff --git a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.delete_resource.js b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.delete_resource.js new file mode 100644 index 00000000000..ec54ce42e11 --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.delete_resource.js @@ -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)); diff --git a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.get_resource.js b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.get_resource.js new file mode 100644 index 00000000000..19115308d05 --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.get_resource.js @@ -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)); diff --git a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.patch_resource.js b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.patch_resource.js new file mode 100644 index 00000000000..98fd0db958c --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.patch_resource.js @@ -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)); diff --git a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.post_resource.js b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.post_resource.js new file mode 100644 index 00000000000..ad581725015 --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.post_resource.js @@ -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)); diff --git a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.put_resource.js b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.put_resource.js new file mode 100644 index 00000000000..5e367a75c16 --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.put_resource.js @@ -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));