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 (#498)
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/936977e4-f27c-4b3b-9406-fff8abcd40a4/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 authored Aug 6, 2021
1 parent 5ac7214 commit 9715de3
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,14 +174,13 @@ public IamCredentialsStubSettings.Builder getStubSettingsBuilder() {
return ((IamCredentialsStubSettings.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
Original file line number Diff line number Diff line change
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.cloud.iam.credentials.v1.GenerateAccessTokenRequest;
import com.google.cloud.iam.credentials.v1.GenerateAccessTokenResponse;
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 @@ -143,53 +141,41 @@ protected GrpcIamCredentialsStub(
GrpcCallSettings.<GenerateAccessTokenRequest, GenerateAccessTokenResponse>newBuilder()
.setMethodDescriptor(generateAccessTokenMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<GenerateAccessTokenRequest>() {
@Override
public Map<String, String> extract(GenerateAccessTokenRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
})
.build();
GrpcCallSettings<GenerateIdTokenRequest, GenerateIdTokenResponse>
generateIdTokenTransportSettings =
GrpcCallSettings.<GenerateIdTokenRequest, GenerateIdTokenResponse>newBuilder()
.setMethodDescriptor(generateIdTokenMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<GenerateIdTokenRequest>() {
@Override
public Map<String, String> extract(GenerateIdTokenRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
})
.build();
GrpcCallSettings<SignBlobRequest, SignBlobResponse> signBlobTransportSettings =
GrpcCallSettings.<SignBlobRequest, SignBlobResponse>newBuilder()
.setMethodDescriptor(signBlobMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<SignBlobRequest>() {
@Override
public Map<String, String> extract(SignBlobRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
})
.build();
GrpcCallSettings<SignJwtRequest, SignJwtResponse> signJwtTransportSettings =
GrpcCallSettings.<SignJwtRequest, SignJwtResponse>newBuilder()
.setMethodDescriptor(signJwtMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<SignJwtRequest>() {
@Override
public Map<String, String> extract(SignJwtRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
})
.build();

Expand Down Expand Up @@ -239,7 +225,13 @@ public UnaryCallable<SignJwtRequest, SignJwtResponse> signJwtCallable() {

@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
Original file line number Diff line number Diff line change
Expand Up @@ -312,14 +312,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
4 changes: 2 additions & 2 deletions synth.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "551681f25e36b11829e87e580281350461f4f3f5",
"internalRef": "379784268"
"sha": "d9eaf41de44d953458b18712a3f240bb4c564e48",
"internalRef": "388535346"
}
},
{
Expand Down

0 comments on commit 9715de3

Please sign in to comment.