From d96a5b4fc2e3d646548efa8ebd4c6564d5b43e64 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 4 Aug 2021 23:10:43 +0000 Subject: [PATCH] feat!: release gapic-generator-java v2.0.0 (#581) Committer: @miraleung PiperOrigin-RevId: 388535346 Source-Link: https://github.com/googleapis/googleapis/commit/d9eaf41de44d953458b18712a3f240bb4c564e48 Source-Link: https://github.com/googleapis/googleapis-gen/commit/976c5ab6f24b58c91fe04847ead1953f99d19e6a --- .../resourcemanager/v3/FoldersClient.java | 17 +--- .../resourcemanager/v3/FoldersSettings.java | 3 +- .../v3/OrganizationsClient.java | 8 +- .../v3/OrganizationsSettings.java | 3 +- .../resourcemanager/v3/ProjectsClient.java | 15 +--- .../resourcemanager/v3/ProjectsSettings.java | 3 +- .../resourcemanager/v3/TagBindingsClient.java | 8 +- .../v3/TagBindingsSettings.java | 3 +- .../resourcemanager/v3/TagKeysClient.java | 10 +-- .../resourcemanager/v3/TagKeysSettings.java | 3 +- .../resourcemanager/v3/TagValuesClient.java | 8 +- .../resourcemanager/v3/TagValuesSettings.java | 3 +- .../v3/stub/FoldersStubSettings.java | 3 +- .../v3/stub/GrpcFoldersStub.java | 90 +++++++------------ .../v3/stub/GrpcOrganizationsStub.java | 46 ++++------ .../v3/stub/GrpcProjectsStub.java | 90 +++++++------------ .../v3/stub/GrpcTagBindingsStub.java | 13 +-- .../v3/stub/GrpcTagKeysStub.java | 68 +++++--------- .../v3/stub/GrpcTagValuesStub.java | 68 +++++--------- .../v3/stub/OrganizationsStubSettings.java | 3 +- .../v3/stub/ProjectsStubSettings.java | 3 +- .../v3/stub/TagBindingsStubSettings.java | 3 +- .../v3/stub/TagKeysStubSettings.java | 3 +- .../v3/stub/TagValuesStubSettings.java | 3 +- 24 files changed, 152 insertions(+), 325 deletions(-) diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/FoldersClient.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/FoldersClient.java index b13644d23a56..71930e0425c2 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/FoldersClient.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/FoldersClient.java @@ -16,7 +16,6 @@ package com.google.cloud.resourcemanager.v3; -import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; import com.google.api.core.BetaApi; @@ -1819,14 +1818,7 @@ public static ApiFuture createAsync( ApiFuture futurePage = ListFoldersPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( - futurePage, - new ApiFunction() { - @Override - public ListFoldersPagedResponse apply(ListFoldersPage input) { - return new ListFoldersPagedResponse(input); - } - }, - MoreExecutors.directExecutor()); + futurePage, input -> new ListFoldersPagedResponse(input), MoreExecutors.directExecutor()); } private ListFoldersPagedResponse(ListFoldersPage page) { @@ -1900,12 +1892,7 @@ public static ApiFuture createAsync( SearchFoldersPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, - new ApiFunction() { - @Override - public SearchFoldersPagedResponse apply(SearchFoldersPage input) { - return new SearchFoldersPagedResponse(input); - } - }, + input -> new SearchFoldersPagedResponse(input), MoreExecutors.directExecutor()); } diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/FoldersSettings.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/FoldersSettings.java index d809b4754789..c97e0b613ee3 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/FoldersSettings.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/FoldersSettings.java @@ -249,14 +249,13 @@ public FoldersStubSettings.Builder getStubSettingsBuilder() { return ((FoldersStubSettings.Builder) getStubSettings()); } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods( getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); return this; diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/OrganizationsClient.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/OrganizationsClient.java index 517637ebbeb1..1b30e8c8fe34 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/OrganizationsClient.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/OrganizationsClient.java @@ -16,7 +16,6 @@ package com.google.cloud.resourcemanager.v3; -import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; import com.google.api.core.BetaApi; @@ -789,12 +788,7 @@ public static ApiFuture createAsync( SearchOrganizationsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, - new ApiFunction() { - @Override - public SearchOrganizationsPagedResponse apply(SearchOrganizationsPage input) { - return new SearchOrganizationsPagedResponse(input); - } - }, + input -> new SearchOrganizationsPagedResponse(input), MoreExecutors.directExecutor()); } diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/OrganizationsSettings.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/OrganizationsSettings.java index f6e21592132a..5a7344aef483 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/OrganizationsSettings.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/OrganizationsSettings.java @@ -187,14 +187,13 @@ public OrganizationsStubSettings.Builder getStubSettingsBuilder() { return ((OrganizationsStubSettings.Builder) getStubSettings()); } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods( getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); return this; diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/ProjectsClient.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/ProjectsClient.java index 7e66a03abb49..97b97320a885 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/ProjectsClient.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/ProjectsClient.java @@ -16,7 +16,6 @@ package com.google.cloud.resourcemanager.v3; -import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; import com.google.api.core.BetaApi; @@ -1914,12 +1913,7 @@ public static ApiFuture createAsync( ListProjectsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, - new ApiFunction() { - @Override - public ListProjectsPagedResponse apply(ListProjectsPage input) { - return new ListProjectsPagedResponse(input); - } - }, + input -> new ListProjectsPagedResponse(input), MoreExecutors.directExecutor()); } @@ -1994,12 +1988,7 @@ public static ApiFuture createAsync( SearchProjectsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, - new ApiFunction() { - @Override - public SearchProjectsPagedResponse apply(SearchProjectsPage input) { - return new SearchProjectsPagedResponse(input); - } - }, + input -> new SearchProjectsPagedResponse(input), MoreExecutors.directExecutor()); } diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/ProjectsSettings.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/ProjectsSettings.java index 7cc3b8d42965..d38f023e78e2 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/ProjectsSettings.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/ProjectsSettings.java @@ -250,14 +250,13 @@ public ProjectsStubSettings.Builder getStubSettingsBuilder() { return ((ProjectsStubSettings.Builder) getStubSettings()); } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods( getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); return this; diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagBindingsClient.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagBindingsClient.java index bbbaefbdcb45..e28ff2881a1e 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagBindingsClient.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagBindingsClient.java @@ -16,7 +16,6 @@ package com.google.cloud.resourcemanager.v3; -import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; import com.google.api.core.BetaApi; @@ -587,12 +586,7 @@ public static ApiFuture createAsync( ListTagBindingsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, - new ApiFunction() { - @Override - public ListTagBindingsPagedResponse apply(ListTagBindingsPage input) { - return new ListTagBindingsPagedResponse(input); - } - }, + input -> new ListTagBindingsPagedResponse(input), MoreExecutors.directExecutor()); } diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagBindingsSettings.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagBindingsSettings.java index 3437211db96d..6ace6b23f93d 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagBindingsSettings.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagBindingsSettings.java @@ -185,14 +185,13 @@ public TagBindingsStubSettings.Builder getStubSettingsBuilder() { return ((TagBindingsStubSettings.Builder) getStubSettings()); } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods( getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); return this; diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagKeysClient.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagKeysClient.java index d4751c1ba44d..b150821ff786 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagKeysClient.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagKeysClient.java @@ -16,7 +16,6 @@ package com.google.cloud.resourcemanager.v3; -import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; import com.google.api.core.BetaApi; @@ -1107,14 +1106,7 @@ public static ApiFuture createAsync( ApiFuture futurePage = ListTagKeysPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( - futurePage, - new ApiFunction() { - @Override - public ListTagKeysPagedResponse apply(ListTagKeysPage input) { - return new ListTagKeysPagedResponse(input); - } - }, - MoreExecutors.directExecutor()); + futurePage, input -> new ListTagKeysPagedResponse(input), MoreExecutors.directExecutor()); } private ListTagKeysPagedResponse(ListTagKeysPage page) { diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagKeysSettings.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagKeysSettings.java index 11027b10eaec..eeac6ac685e3 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagKeysSettings.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagKeysSettings.java @@ -220,14 +220,13 @@ public TagKeysStubSettings.Builder getStubSettingsBuilder() { return ((TagKeysStubSettings.Builder) getStubSettings()); } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods( getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); return this; diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagValuesClient.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagValuesClient.java index ad59723af83a..5ff8e3693dc1 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagValuesClient.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagValuesClient.java @@ -16,7 +16,6 @@ package com.google.cloud.resourcemanager.v3; -import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; import com.google.api.core.BetaApi; @@ -1118,12 +1117,7 @@ public static ApiFuture createAsync( ListTagValuesPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, - new ApiFunction() { - @Override - public ListTagValuesPagedResponse apply(ListTagValuesPage input) { - return new ListTagValuesPagedResponse(input); - } - }, + input -> new ListTagValuesPagedResponse(input), MoreExecutors.directExecutor()); } diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagValuesSettings.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagValuesSettings.java index 172ae24ae396..1de75ca7273e 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagValuesSettings.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagValuesSettings.java @@ -220,14 +220,13 @@ public TagValuesStubSettings.Builder getStubSettingsBuilder() { return ((TagValuesStubSettings.Builder) getStubSettings()); } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods( getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); return this; diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/FoldersStubSettings.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/FoldersStubSettings.java index efb9f02e4aa8..808c139b4bcd 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/FoldersStubSettings.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/FoldersStubSettings.java @@ -769,14 +769,13 @@ private static Builder initDefaults(Builder builder) { return builder; } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); return this; } diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/GrpcFoldersStub.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/GrpcFoldersStub.java index 181fc78991cd..c31f3597608e 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/GrpcFoldersStub.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/GrpcFoldersStub.java @@ -25,7 +25,6 @@ import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.RequestParamsExtractor; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.resourcemanager.v3.CreateFolderMetadata; import com.google.cloud.resourcemanager.v3.CreateFolderRequest; @@ -54,7 +53,6 @@ import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; -import java.util.Map; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; @@ -237,13 +235,10 @@ protected GrpcFoldersStub( GrpcCallSettings.newBuilder() .setMethodDescriptor(getFolderMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetFolderRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings listFoldersTransportSettings = @@ -262,78 +257,60 @@ public Map extract(GetFolderRequest request) { GrpcCallSettings.newBuilder() .setMethodDescriptor(updateFolderMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(UpdateFolderRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("folder.name", String.valueOf(request.getFolder().getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("folder.name", String.valueOf(request.getFolder().getName())); + return params.build(); }) .build(); GrpcCallSettings moveFolderTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(moveFolderMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(MoveFolderRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings deleteFolderTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteFolderMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(DeleteFolderRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings undeleteFolderTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(undeleteFolderMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(UndeleteFolderRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings getIamPolicyTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getIamPolicyMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetIamPolicyRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("resource", String.valueOf(request.getResource())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); }) .build(); GrpcCallSettings setIamPolicyTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(setIamPolicyMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(SetIamPolicyRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("resource", String.valueOf(request.getResource())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); }) .build(); GrpcCallSettings @@ -341,13 +318,10 @@ public Map extract(SetIamPolicyRequest request) { GrpcCallSettings.newBuilder() .setMethodDescriptor(testIamPermissionsMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(TestIamPermissionsRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("resource", String.valueOf(request.getResource())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); }) .build(); diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/GrpcOrganizationsStub.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/GrpcOrganizationsStub.java index 32616543c7be..28343df5fa04 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/GrpcOrganizationsStub.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/GrpcOrganizationsStub.java @@ -23,7 +23,6 @@ import com.google.api.gax.grpc.GrpcCallSettings; import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.RequestParamsExtractor; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.resourcemanager.v3.GetOrganizationRequest; import com.google.cloud.resourcemanager.v3.Organization; @@ -39,7 +38,6 @@ import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; -import java.util.Map; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; @@ -156,13 +154,10 @@ protected GrpcOrganizationsStub( GrpcCallSettings.newBuilder() .setMethodDescriptor(getOrganizationMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetOrganizationRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings @@ -174,26 +169,20 @@ public Map extract(GetOrganizationRequest request) { GrpcCallSettings.newBuilder() .setMethodDescriptor(getIamPolicyMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetIamPolicyRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("resource", String.valueOf(request.getResource())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); }) .build(); GrpcCallSettings setIamPolicyTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(setIamPolicyMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(SetIamPolicyRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("resource", String.valueOf(request.getResource())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); }) .build(); GrpcCallSettings @@ -201,13 +190,10 @@ public Map extract(SetIamPolicyRequest request) { GrpcCallSettings.newBuilder() .setMethodDescriptor(testIamPermissionsMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(TestIamPermissionsRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("resource", String.valueOf(request.getResource())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); }) .build(); diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/GrpcProjectsStub.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/GrpcProjectsStub.java index 9eee56d08237..13847478df1b 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/GrpcProjectsStub.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/GrpcProjectsStub.java @@ -25,7 +25,6 @@ import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.RequestParamsExtractor; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.resourcemanager.v3.CreateProjectMetadata; import com.google.cloud.resourcemanager.v3.CreateProjectRequest; @@ -54,7 +53,6 @@ import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; -import java.util.Map; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; @@ -240,13 +238,10 @@ protected GrpcProjectsStub( GrpcCallSettings.newBuilder() .setMethodDescriptor(getProjectMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetProjectRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings listProjectsTransportSettings = @@ -266,78 +261,60 @@ public Map extract(GetProjectRequest request) { GrpcCallSettings.newBuilder() .setMethodDescriptor(updateProjectMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(UpdateProjectRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("project.name", String.valueOf(request.getProject().getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("project.name", String.valueOf(request.getProject().getName())); + return params.build(); }) .build(); GrpcCallSettings moveProjectTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(moveProjectMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(MoveProjectRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings deleteProjectTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteProjectMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(DeleteProjectRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings undeleteProjectTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(undeleteProjectMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(UndeleteProjectRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings getIamPolicyTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getIamPolicyMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetIamPolicyRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("resource", String.valueOf(request.getResource())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); }) .build(); GrpcCallSettings setIamPolicyTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(setIamPolicyMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(SetIamPolicyRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("resource", String.valueOf(request.getResource())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); }) .build(); GrpcCallSettings @@ -345,13 +322,10 @@ public Map extract(SetIamPolicyRequest request) { GrpcCallSettings.newBuilder() .setMethodDescriptor(testIamPermissionsMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(TestIamPermissionsRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("resource", String.valueOf(request.getResource())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); }) .build(); diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/GrpcTagBindingsStub.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/GrpcTagBindingsStub.java index f634c9344a50..92743cd43a80 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/GrpcTagBindingsStub.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/GrpcTagBindingsStub.java @@ -24,7 +24,6 @@ import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.RequestParamsExtractor; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.resourcemanager.v3.CreateTagBindingMetadata; import com.google.cloud.resourcemanager.v3.CreateTagBindingRequest; @@ -40,7 +39,6 @@ import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; -import java.util.Map; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; @@ -149,13 +147,10 @@ protected GrpcTagBindingsStub( GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteTagBindingMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(DeleteTagBindingRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/GrpcTagKeysStub.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/GrpcTagKeysStub.java index 12d10a3ecbd6..5441fad9a90b 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/GrpcTagKeysStub.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/GrpcTagKeysStub.java @@ -24,7 +24,6 @@ import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.RequestParamsExtractor; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.resourcemanager.v3.CreateTagKeyMetadata; import com.google.cloud.resourcemanager.v3.CreateTagKeyRequest; @@ -47,7 +46,6 @@ import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; -import java.util.Map; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; @@ -196,13 +194,10 @@ protected GrpcTagKeysStub( GrpcCallSettings.newBuilder() .setMethodDescriptor(getTagKeyMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetTagKeyRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings createTagKeyTransportSettings = @@ -213,52 +208,40 @@ public Map extract(GetTagKeyRequest request) { GrpcCallSettings.newBuilder() .setMethodDescriptor(updateTagKeyMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(UpdateTagKeyRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("tag_key.name", String.valueOf(request.getTagKey().getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("tag_key.name", String.valueOf(request.getTagKey().getName())); + return params.build(); }) .build(); GrpcCallSettings deleteTagKeyTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteTagKeyMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(DeleteTagKeyRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings getIamPolicyTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getIamPolicyMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetIamPolicyRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("resource", String.valueOf(request.getResource())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); }) .build(); GrpcCallSettings setIamPolicyTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(setIamPolicyMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(SetIamPolicyRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("resource", String.valueOf(request.getResource())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); }) .build(); GrpcCallSettings @@ -266,13 +249,10 @@ public Map extract(SetIamPolicyRequest request) { GrpcCallSettings.newBuilder() .setMethodDescriptor(testIamPermissionsMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(TestIamPermissionsRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("resource", String.valueOf(request.getResource())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); }) .build(); diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/GrpcTagValuesStub.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/GrpcTagValuesStub.java index 9e1267b4a1f7..2dabc639402c 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/GrpcTagValuesStub.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/GrpcTagValuesStub.java @@ -24,7 +24,6 @@ import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.RequestParamsExtractor; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.resourcemanager.v3.CreateTagValueMetadata; import com.google.cloud.resourcemanager.v3.CreateTagValueRequest; @@ -47,7 +46,6 @@ import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; -import java.util.Map; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; @@ -202,13 +200,10 @@ protected GrpcTagValuesStub( GrpcCallSettings.newBuilder() .setMethodDescriptor(getTagValueMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetTagValueRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings createTagValueTransportSettings = @@ -219,52 +214,40 @@ public Map extract(GetTagValueRequest request) { GrpcCallSettings.newBuilder() .setMethodDescriptor(updateTagValueMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(UpdateTagValueRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("tag_value.name", String.valueOf(request.getTagValue().getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("tag_value.name", String.valueOf(request.getTagValue().getName())); + return params.build(); }) .build(); GrpcCallSettings deleteTagValueTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteTagValueMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(DeleteTagValueRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); }) .build(); GrpcCallSettings getIamPolicyTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getIamPolicyMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetIamPolicyRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("resource", String.valueOf(request.getResource())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); }) .build(); GrpcCallSettings setIamPolicyTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(setIamPolicyMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(SetIamPolicyRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("resource", String.valueOf(request.getResource())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); }) .build(); GrpcCallSettings @@ -272,13 +255,10 @@ public Map extract(SetIamPolicyRequest request) { GrpcCallSettings.newBuilder() .setMethodDescriptor(testIamPermissionsMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(TestIamPermissionsRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("resource", String.valueOf(request.getResource())); - return params.build(); - } + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); }) .build(); diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/OrganizationsStubSettings.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/OrganizationsStubSettings.java index 38121f8cdad6..40b31c7428c1 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/OrganizationsStubSettings.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/OrganizationsStubSettings.java @@ -421,14 +421,13 @@ private static Builder initDefaults(Builder builder) { return builder; } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); return this; } diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/ProjectsStubSettings.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/ProjectsStubSettings.java index 0ea4f7846ab1..148ae7125e11 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/ProjectsStubSettings.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/ProjectsStubSettings.java @@ -775,14 +775,13 @@ private static Builder initDefaults(Builder builder) { return builder; } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); return this; } diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagBindingsStubSettings.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagBindingsStubSettings.java index 66735be5640f..8b3886f2eb52 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagBindingsStubSettings.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagBindingsStubSettings.java @@ -450,14 +450,13 @@ private static Builder initDefaults(Builder builder) { return builder; } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); return this; } diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagKeysStubSettings.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagKeysStubSettings.java index 84a0636bfd4d..ca2c52eb7002 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagKeysStubSettings.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagKeysStubSettings.java @@ -578,14 +578,13 @@ private static Builder initDefaults(Builder builder) { return builder; } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); return this; } diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagValuesStubSettings.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagValuesStubSettings.java index 23390ae56510..993cc889841e 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagValuesStubSettings.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagValuesStubSettings.java @@ -585,14 +585,13 @@ private static Builder initDefaults(Builder builder) { return builder; } - // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * *

Note: This method does not support applying settings to streaming methods. */ public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { + ApiFunction, Void> settingsUpdater) { super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); return this; }