Skip to content
This repository has been archived by the owner on Sep 16, 2023. It is now read-only.

Commit

Permalink
feat!: release gapic-generator-java v2.0.0 (#491)
Browse files Browse the repository at this point in the history
This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/67939a45-8364-4a45-a469-4e074f9f361c/targets

- [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.)

PiperOrigin-RevId: 388535346
Source-Link: googleapis/googleapis@d9eaf41
PiperOrigin-RevId: 388499329
Source-Link: googleapis/googleapis@bb0a090
  • Loading branch information
yoshi-automation committed Aug 6, 2021
1 parent 11f637d commit 5ccd35c
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 24 deletions.
Expand Up @@ -180,14 +180,13 @@ public WebRiskServiceStubSettings.Builder getStubSettingsBuilder() {
return ((WebRiskServiceStubSettings.Builder) getStubSettings());
}

// NEXT_MAJOR_VER: remove 'throws Exception'.
/**
* Applies the given settings updater function to all of the unary API methods in this service.
*
* <p>Note: This method does not support applying settings to streaming methods.
*/
public Builder applyToAllUnaryMethods(
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
super.applyToAllUnaryMethods(
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
return this;
Expand Down
Expand Up @@ -21,7 +21,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.common.collect.ImmutableMap;
import com.google.longrunning.stub.GrpcOperationsStub;
Expand All @@ -36,7 +35,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;

Expand Down Expand Up @@ -156,13 +154,10 @@ protected GrpcWebRiskServiceStub(
GrpcCallSettings.<CreateSubmissionRequest, Submission>newBuilder()
.setMethodDescriptor(createSubmissionMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<CreateSubmissionRequest>() {
@Override
public Map<String, String> extract(CreateSubmissionRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
})
.build();

Expand Down Expand Up @@ -212,7 +207,13 @@ public UnaryCallable<CreateSubmissionRequest, Submission> createSubmissionCallab

@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
Expand Down
Expand Up @@ -322,14 +322,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.
*
* <p>Note: This method does not support applying settings to streaming methods.
*/
public Builder applyToAllUnaryMethods(
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater);
return this;
}
Expand Down
Expand Up @@ -176,14 +176,13 @@ public WebRiskServiceV1Beta1StubSettings.Builder getStubSettingsBuilder() {
return ((WebRiskServiceV1Beta1StubSettings.Builder) getStubSettings());
}

// NEXT_MAJOR_VER: remove 'throws Exception'.
/**
* Applies the given settings updater function to all of the unary API methods in this service.
*
* <p>Note: This method does not support applying settings to streaming methods.
*/
public Builder applyToAllUnaryMethods(
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
super.applyToAllUnaryMethods(
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
return this;
Expand Down
Expand Up @@ -178,7 +178,13 @@ public UnaryCallable<SearchHashesRequest, SearchHashesResponse> searchHashesCall

@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
Expand Down
Expand Up @@ -292,14 +292,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.
*
* <p>Note: This method does not support applying settings to streaming methods.
*/
public Builder applyToAllUnaryMethods(
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater);
return this;
}
Expand Down
10 changes: 5 additions & 5 deletions synth.metadata
Expand Up @@ -4,23 +4,23 @@
"git": {
"name": ".",
"remote": "https://github.com/googleapis/java-webrisk.git",
"sha": "3900d14b8e9ea84f02e075a87d31f2535608f903"
"sha": "1f702037cebafe7a4775bff8a2d31e9e4ca09bfa"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "551681f25e36b11829e87e580281350461f4f3f5",
"internalRef": "379784268"
"sha": "d9eaf41de44d953458b18712a3f240bb4c564e48",
"internalRef": "388535346"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "551681f25e36b11829e87e580281350461f4f3f5",
"internalRef": "379784268"
"sha": "d9eaf41de44d953458b18712a3f240bb4c564e48",
"internalRef": "388535346"
}
},
{
Expand Down

0 comments on commit 5ccd35c

Please sign in to comment.