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 (#247)

- [ ] 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] authored Feb 18, 2022
1 parent a8a3984 commit ecde411
Show file tree
Hide file tree
Showing 9 changed files with 362 additions and 17 deletions.
10 changes: 8 additions & 2 deletions packages/google-monitoring-dashboard/linkinator.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@
"skip": [
"https://codecov.io/gh/googleapis/",
"www.googleapis.com",
"img.shields.io"
"img.shields.io",
"https://console.cloud.google.com/cloudshell",
"https://support.google.com"
],
"silent": true,
"concurrency": 5
"concurrency": 5,
"retry": true,
"retryErrors": true,
"retryErrorsCount": 5,
"retryErrorsJitter": 3000
}
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,235 @@
{
"clientLibrary": {
"name": "nodejs-dashboard",
"version": "0.1.0",
"language": "TYPESCRIPT",
"apis": [
{
"id": "google.monitoring.dashboard.v1",
"version": "v1"
}
]
},
"snippets": [
{
"regionTag": "monitoring_v1_generated_DashboardsService_CreateDashboard_async",
"title": "DashboardsService createDashboard Sample",
"origin": "API_DEFINITION",
"description": " Creates a new custom dashboard. For examples on how you can use this API to create dashboards, see [Managing dashboards by API](https://cloud.google.com/monitoring/dashboards/api-dashboard). This method requires the `monitoring.dashboards.create` permission on the specified project. For more information about permissions, see [Cloud Identity and Access Management](https://cloud.google.com/iam).",
"canonical": true,
"file": "dashboards_service.create_dashboard.js",
"language": "JAVASCRIPT",
"segments": [
{
"start": 25,
"end": 62,
"type": "FULL"
}
],
"clientMethod": {
"shortName": "CreateDashboard",
"fullName": "google.monitoring.dashboard.v1.DashboardsService.CreateDashboard",
"async": true,
"parameters": [
{
"name": "parent",
"type": "TYPE_STRING"
},
{
"name": "dashboard",
"type": ".google.monitoring.dashboard.v1.Dashboard"
},
{
"name": "validate_only",
"type": "TYPE_BOOL"
}
],
"resultType": ".google.monitoring.dashboard.v1.Dashboard",
"client": {
"shortName": "DashboardsServiceClient",
"fullName": "google.monitoring.dashboard.v1.DashboardsServiceClient"
},
"method": {
"shortName": "CreateDashboard",
"fullName": "google.monitoring.dashboard.v1.DashboardsService.CreateDashboard",
"service": {
"shortName": "DashboardsService",
"fullName": "google.monitoring.dashboard.v1.DashboardsService"
}
}
}
},
{
"regionTag": "monitoring_v1_generated_DashboardsService_ListDashboards_async",
"title": "DashboardsService listDashboards Sample",
"origin": "API_DEFINITION",
"description": " Lists the existing dashboards. This method requires the `monitoring.dashboards.list` permission on the specified project. For more information, see [Cloud Identity and Access Management](https://cloud.google.com/iam).",
"canonical": true,
"file": "dashboards_service.list_dashboards.js",
"language": "JAVASCRIPT",
"segments": [
{
"start": 25,
"end": 64,
"type": "FULL"
}
],
"clientMethod": {
"shortName": "ListDashboards",
"fullName": "google.monitoring.dashboard.v1.DashboardsService.ListDashboards",
"async": true,
"parameters": [
{
"name": "parent",
"type": "TYPE_STRING"
},
{
"name": "page_size",
"type": "TYPE_INT32"
},
{
"name": "page_token",
"type": "TYPE_STRING"
}
],
"resultType": ".google.monitoring.dashboard.v1.ListDashboardsResponse",
"client": {
"shortName": "DashboardsServiceClient",
"fullName": "google.monitoring.dashboard.v1.DashboardsServiceClient"
},
"method": {
"shortName": "ListDashboards",
"fullName": "google.monitoring.dashboard.v1.DashboardsService.ListDashboards",
"service": {
"shortName": "DashboardsService",
"fullName": "google.monitoring.dashboard.v1.DashboardsService"
}
}
}
},
{
"regionTag": "monitoring_v1_generated_DashboardsService_GetDashboard_async",
"title": "DashboardsService getDashboard Sample",
"origin": "API_DEFINITION",
"description": " Fetches a specific dashboard. This method requires the `monitoring.dashboards.get` permission on the specified dashboard. For more information, see [Cloud Identity and Access Management](https://cloud.google.com/iam).",
"canonical": true,
"file": "dashboards_service.get_dashboard.js",
"language": "JAVASCRIPT",
"segments": [
{
"start": 25,
"end": 53,
"type": "FULL"
}
],
"clientMethod": {
"shortName": "GetDashboard",
"fullName": "google.monitoring.dashboard.v1.DashboardsService.GetDashboard",
"async": true,
"parameters": [
{
"name": "name",
"type": "TYPE_STRING"
}
],
"resultType": ".google.monitoring.dashboard.v1.Dashboard",
"client": {
"shortName": "DashboardsServiceClient",
"fullName": "google.monitoring.dashboard.v1.DashboardsServiceClient"
},
"method": {
"shortName": "GetDashboard",
"fullName": "google.monitoring.dashboard.v1.DashboardsService.GetDashboard",
"service": {
"shortName": "DashboardsService",
"fullName": "google.monitoring.dashboard.v1.DashboardsService"
}
}
}
},
{
"regionTag": "monitoring_v1_generated_DashboardsService_DeleteDashboard_async",
"title": "DashboardsService deleteDashboard Sample",
"origin": "API_DEFINITION",
"description": " Deletes an existing custom dashboard. This method requires the `monitoring.dashboards.delete` permission on the specified dashboard. For more information, see [Cloud Identity and Access Management](https://cloud.google.com/iam).",
"canonical": true,
"file": "dashboards_service.delete_dashboard.js",
"language": "JAVASCRIPT",
"segments": [
{
"start": 25,
"end": 51,
"type": "FULL"
}
],
"clientMethod": {
"shortName": "DeleteDashboard",
"fullName": "google.monitoring.dashboard.v1.DashboardsService.DeleteDashboard",
"async": true,
"parameters": [
{
"name": "name",
"type": "TYPE_STRING"
}
],
"resultType": ".google.protobuf.Empty",
"client": {
"shortName": "DashboardsServiceClient",
"fullName": "google.monitoring.dashboard.v1.DashboardsServiceClient"
},
"method": {
"shortName": "DeleteDashboard",
"fullName": "google.monitoring.dashboard.v1.DashboardsService.DeleteDashboard",
"service": {
"shortName": "DashboardsService",
"fullName": "google.monitoring.dashboard.v1.DashboardsService"
}
}
}
},
{
"regionTag": "monitoring_v1_generated_DashboardsService_UpdateDashboard_async",
"title": "DashboardsService updateDashboard Sample",
"origin": "API_DEFINITION",
"description": " Replaces an existing custom dashboard with a new definition. This method requires the `monitoring.dashboards.update` permission on the specified dashboard. For more information, see [Cloud Identity and Access Management](https://cloud.google.com/iam).",
"canonical": true,
"file": "dashboards_service.update_dashboard.js",
"language": "JAVASCRIPT",
"segments": [
{
"start": 25,
"end": 55,
"type": "FULL"
}
],
"clientMethod": {
"shortName": "UpdateDashboard",
"fullName": "google.monitoring.dashboard.v1.DashboardsService.UpdateDashboard",
"async": true,
"parameters": [
{
"name": "dashboard",
"type": ".google.monitoring.dashboard.v1.Dashboard"
},
{
"name": "validate_only",
"type": "TYPE_BOOL"
}
],
"resultType": ".google.monitoring.dashboard.v1.Dashboard",
"client": {
"shortName": "DashboardsServiceClient",
"fullName": "google.monitoring.dashboard.v1.DashboardsServiceClient"
},
"method": {
"shortName": "UpdateDashboard",
"fullName": "google.monitoring.dashboard.v1.DashboardsService.UpdateDashboard",
"service": {
"shortName": "DashboardsService",
"fullName": "google.monitoring.dashboard.v1.DashboardsService"
}
}
}
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -1044,9 +1044,8 @@ export class DashboardsServiceClient {
* @returns {Promise} A promise that resolves when the client is closed.
*/
close(): Promise<void> {
this.initialize();
if (!this._terminated) {
return this.dashboardsServiceStub!.then(stub => {
if (this.dashboardsServiceStub && !this._terminated) {
return this.dashboardsServiceStub.then(stub => {
this._terminated = true;
stub.close();
});
Expand Down
Loading

0 comments on commit ecde411

Please sign in to comment.