From b35efd7bd9d9013f2c286277d42d9f754f07ba56 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Sat, 29 May 2021 14:07:41 -0700 Subject: [PATCH] feat: update serviceusage v1beta1 API (#10) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: update serviceusage v1beta1 API Committer: @xiaozhenliu-gg5 PiperOrigin-RevId: 376207067 Source-Link: https://github.com/googleapis/googleapis/commit/1c20dcfd8052a2bea026bda36875e5b7606028db Source-Link: https://github.com/googleapis/googleapis-gen/commit/d2c0525662392e5a2e735fd4397d4d07161918f2 * 🦉 Updates from OwlBot Co-authored-by: Owl Bot Co-authored-by: Justin Beckwith --- .../google/api/serviceusage/v1beta1/serviceusage.proto | 7 +++++-- packages/google-api-serviceusage/protos/protos.json | 2 +- .../src/v1beta1/service_usage_client.ts | 8 ++++++-- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/packages/google-api-serviceusage/protos/google/api/serviceusage/v1beta1/serviceusage.proto b/packages/google-api-serviceusage/protos/google/api/serviceusage/v1beta1/serviceusage.proto index f41633f7eb3..2b0761f33f9 100644 --- a/packages/google-api-serviceusage/protos/google/api/serviceusage/v1beta1/serviceusage.proto +++ b/packages/google-api-serviceusage/protos/google/api/serviceusage/v1beta1/serviceusage.proto @@ -31,10 +31,13 @@ option java_package = "com.google.api.serviceusage.v1beta1"; option php_namespace = "Google\\Api\\ServiceUsage\\V1beta1"; option ruby_package = "Google::Api::ServiceUsage::V1beta1"; -// [Service Usage API](/service-usage/docs/overview) +// [Service Usage API](https://cloud.google.com/service-usage/docs/overview) service ServiceUsage { option (google.api.default_host) = "serviceusage.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-platform.read-only," + "https://www.googleapis.com/auth/service.management"; // Enables a service so that it can be used with a project. // diff --git a/packages/google-api-serviceusage/protos/protos.json b/packages/google-api-serviceusage/protos/protos.json index fa55d295f95..30676a8eb56 100644 --- a/packages/google-api-serviceusage/protos/protos.json +++ b/packages/google-api-serviceusage/protos/protos.json @@ -1918,7 +1918,7 @@ "ServiceUsage": { "options": { "(google.api.default_host)": "serviceusage.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/service.management" }, "methods": { "EnableService": { diff --git a/packages/google-api-serviceusage/src/v1beta1/service_usage_client.ts b/packages/google-api-serviceusage/src/v1beta1/service_usage_client.ts index 4192c721bca..f3236c9d340 100644 --- a/packages/google-api-serviceusage/src/v1beta1/service_usage_client.ts +++ b/packages/google-api-serviceusage/src/v1beta1/service_usage_client.ts @@ -42,7 +42,7 @@ import {operationsProtos} from 'google-gax'; const version = require('../../../package.json').version; /** - * [Service Usage API](/service-usage/docs/overview) + * [Service Usage API](https://cloud.google.com/service-usage/docs/overview) * @class * @memberof v1beta1 */ @@ -472,7 +472,11 @@ export class ServiceUsageClient { * @returns {string[]} List of default scopes. */ static get scopes() { - return ['https://www.googleapis.com/auth/cloud-platform']; + return [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloud-platform.read-only', + 'https://www.googleapis.com/auth/service.management', + ]; } getProjectId(): Promise;