Skip to content

Commit

Permalink
docs(samples): include metadata file, add exclusions for samples to h…
Browse files Browse the repository at this point in the history
…andwritten libraries (#55)

- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 429395631

Source-Link: googleapis/googleapis@84594b3

Source-Link: googleapis/googleapis-gen@ed74f97
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWQ3NGY5NzBmZDgyOTE0ODc0ZTZiMjdiMDQ3NjNjZmE2NmJhZmU5YiJ9
  • Loading branch information
gcf-owl-bot[bot] committed Feb 18, 2022
1 parent 51a4f5d commit f78a6bb
Show file tree
Hide file tree
Showing 8 changed files with 369 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
// Copyright 2021 Google LLC
// Copyright 2022 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
// https://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.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **



'use strict';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
// Copyright 2021 Google LLC
// Copyright 2022 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
// https://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.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **



'use strict';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
// Copyright 2021 Google LLC
// Copyright 2022 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
// https://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.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **



'use strict';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
// Copyright 2021 Google LLC
// Copyright 2022 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
// https://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.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **



'use strict';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
// Copyright 2021 Google LLC
// Copyright 2022 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
// https://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.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **



'use strict';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,255 @@
{
"clientLibrary": {
"name": "nodejs-gateway",
"version": "0.1.0",
"language": "TYPESCRIPT",
"apis": [
{
"id": "google.cloud.gkeconnect.gateway.v1beta1",
"version": "v1beta1"
}
]
},
"snippets": [
{
"regionTag": "connectgateway_v1beta1_generated_GatewayService_GetResource_async",
"title": "GatewayService getResource Sample",
"origin": "API_DEFINITION",
"description": " GetResource performs an HTTP GET request on the Kubernetes API Server.",
"canonical": true,
"file": "gateway_service.get_resource.js",
"language": "JAVASCRIPT",
"segments": [
{
"start": 25,
"end": 58,
"type": "FULL"
}
],
"clientMethod": {
"shortName": "GetResource",
"fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.GetResource",
"async": true,
"parameters": [
{
"name": "content_type",
"type": "TYPE_STRING"
},
{
"name": "data",
"type": "TYPE_BYTES"
},
{
"name": "extensions",
"type": "TYPE_MESSAGE[]"
}
],
"resultType": ".google.api.HttpBody",
"client": {
"shortName": "GatewayServiceClient",
"fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayServiceClient"
},
"method": {
"shortName": "GetResource",
"fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.GetResource",
"service": {
"shortName": "GatewayService",
"fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService"
}
}
}
},
{
"regionTag": "connectgateway_v1beta1_generated_GatewayService_PostResource_async",
"title": "GatewayService postResource Sample",
"origin": "API_DEFINITION",
"description": " PostResource performs an HTTP POST on the Kubernetes API Server.",
"canonical": true,
"file": "gateway_service.post_resource.js",
"language": "JAVASCRIPT",
"segments": [
{
"start": 25,
"end": 58,
"type": "FULL"
}
],
"clientMethod": {
"shortName": "PostResource",
"fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.PostResource",
"async": true,
"parameters": [
{
"name": "content_type",
"type": "TYPE_STRING"
},
{
"name": "data",
"type": "TYPE_BYTES"
},
{
"name": "extensions",
"type": "TYPE_MESSAGE[]"
}
],
"resultType": ".google.api.HttpBody",
"client": {
"shortName": "GatewayServiceClient",
"fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayServiceClient"
},
"method": {
"shortName": "PostResource",
"fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.PostResource",
"service": {
"shortName": "GatewayService",
"fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService"
}
}
}
},
{
"regionTag": "connectgateway_v1beta1_generated_GatewayService_DeleteResource_async",
"title": "GatewayService deleteResource Sample",
"origin": "API_DEFINITION",
"description": " DeleteResource performs an HTTP DELETE on the Kubernetes API Server.",
"canonical": true,
"file": "gateway_service.delete_resource.js",
"language": "JAVASCRIPT",
"segments": [
{
"start": 25,
"end": 58,
"type": "FULL"
}
],
"clientMethod": {
"shortName": "DeleteResource",
"fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.DeleteResource",
"async": true,
"parameters": [
{
"name": "content_type",
"type": "TYPE_STRING"
},
{
"name": "data",
"type": "TYPE_BYTES"
},
{
"name": "extensions",
"type": "TYPE_MESSAGE[]"
}
],
"resultType": ".google.api.HttpBody",
"client": {
"shortName": "GatewayServiceClient",
"fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayServiceClient"
},
"method": {
"shortName": "DeleteResource",
"fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.DeleteResource",
"service": {
"shortName": "GatewayService",
"fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService"
}
}
}
},
{
"regionTag": "connectgateway_v1beta1_generated_GatewayService_PutResource_async",
"title": "GatewayService putResource Sample",
"origin": "API_DEFINITION",
"description": " PutResource performs an HTTP PUT on the Kubernetes API Server.",
"canonical": true,
"file": "gateway_service.put_resource.js",
"language": "JAVASCRIPT",
"segments": [
{
"start": 25,
"end": 58,
"type": "FULL"
}
],
"clientMethod": {
"shortName": "PutResource",
"fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.PutResource",
"async": true,
"parameters": [
{
"name": "content_type",
"type": "TYPE_STRING"
},
{
"name": "data",
"type": "TYPE_BYTES"
},
{
"name": "extensions",
"type": "TYPE_MESSAGE[]"
}
],
"resultType": ".google.api.HttpBody",
"client": {
"shortName": "GatewayServiceClient",
"fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayServiceClient"
},
"method": {
"shortName": "PutResource",
"fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.PutResource",
"service": {
"shortName": "GatewayService",
"fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService"
}
}
}
},
{
"regionTag": "connectgateway_v1beta1_generated_GatewayService_PatchResource_async",
"title": "GatewayService patchResource Sample",
"origin": "API_DEFINITION",
"description": " PatchResource performs an HTTP PATCH on the Kubernetes API Server.",
"canonical": true,
"file": "gateway_service.patch_resource.js",
"language": "JAVASCRIPT",
"segments": [
{
"start": 25,
"end": 58,
"type": "FULL"
}
],
"clientMethod": {
"shortName": "PatchResource",
"fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.PatchResource",
"async": true,
"parameters": [
{
"name": "content_type",
"type": "TYPE_STRING"
},
{
"name": "data",
"type": "TYPE_BYTES"
},
{
"name": "extensions",
"type": "TYPE_MESSAGE[]"
}
],
"resultType": ".google.api.HttpBody",
"client": {
"shortName": "GatewayServiceClient",
"fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayServiceClient"
},
"method": {
"shortName": "PatchResource",
"fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.PatchResource",
"service": {
"shortName": "GatewayService",
"fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService"
}
}
}
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -720,9 +720,8 @@ export class GatewayServiceClient {
* @returns {Promise} A promise that resolves when the client is closed.
*/
close(): Promise<void> {
this.initialize();
if (!this._terminated) {
return this.gatewayServiceStub!.then(stub => {
if (this.gatewayServiceStub && !this._terminated) {
return this.gatewayServiceStub.then(stub => {
this._terminated = true;
stub.close();
});
Expand Down
Loading

0 comments on commit f78a6bb

Please sign in to comment.