diff --git a/google-cloud-life-sciences/src/main/java/com/google/cloud/lifesciences/v2beta/WorkflowsServiceV2BetaSettings.java b/google-cloud-life-sciences/src/main/java/com/google/cloud/lifesciences/v2beta/WorkflowsServiceV2BetaSettings.java
index 223b0186..8bc3dfa6 100644
--- a/google-cloud-life-sciences/src/main/java/com/google/cloud/lifesciences/v2beta/WorkflowsServiceV2BetaSettings.java
+++ b/google-cloud-life-sciences/src/main/java/com/google/cloud/lifesciences/v2beta/WorkflowsServiceV2BetaSettings.java
@@ -167,14 +167,13 @@ public WorkflowsServiceV2BetaStubSettings.Builder getStubSettingsBuilder() {
return ((WorkflowsServiceV2BetaStubSettings.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/google-cloud-life-sciences/src/main/java/com/google/cloud/lifesciences/v2beta/stub/GrpcWorkflowsServiceV2BetaStub.java b/google-cloud-life-sciences/src/main/java/com/google/cloud/lifesciences/v2beta/stub/GrpcWorkflowsServiceV2BetaStub.java
index 61dad2df..1071398e 100644
--- a/google-cloud-life-sciences/src/main/java/com/google/cloud/lifesciences/v2beta/stub/GrpcWorkflowsServiceV2BetaStub.java
+++ b/google-cloud-life-sciences/src/main/java/com/google/cloud/lifesciences/v2beta/stub/GrpcWorkflowsServiceV2BetaStub.java
@@ -23,7 +23,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.lifesciences.v2beta.Metadata;
import com.google.cloud.lifesciences.v2beta.RunPipelineRequest;
@@ -34,7 +33,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;
@@ -107,13 +105,10 @@ protected GrpcWorkflowsServiceV2BetaStub(
GrpcCallSettings.newBuilder()
.setMethodDescriptor(runPipelineMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(RunPipelineRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("parent", String.valueOf(request.getParent()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("parent", String.valueOf(request.getParent()));
+ return params.build();
})
.build();
@@ -148,7 +143,13 @@ public UnaryCallable runPipelineCallable() {
@Override
public final void close() {
- shutdown();
+ try {
+ backgroundResources.close();
+ } catch (RuntimeException e) {
+ throw e;
+ } catch (Exception e) {
+ throw new IllegalStateException("Failed to close resource", e);
+ }
}
@Override
diff --git a/google-cloud-life-sciences/src/main/java/com/google/cloud/lifesciences/v2beta/stub/WorkflowsServiceV2BetaStubSettings.java b/google-cloud-life-sciences/src/main/java/com/google/cloud/lifesciences/v2beta/stub/WorkflowsServiceV2BetaStubSettings.java
index 1782ce94..a4863445 100644
--- a/google-cloud-life-sciences/src/main/java/com/google/cloud/lifesciences/v2beta/stub/WorkflowsServiceV2BetaStubSettings.java
+++ b/google-cloud-life-sciences/src/main/java/com/google/cloud/lifesciences/v2beta/stub/WorkflowsServiceV2BetaStubSettings.java
@@ -286,14 +286,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;
}