Skip to content
Permalink
Browse files
feat!: release gapic-generator-java v2.0.0 (#118)
  • Loading branch information
gcf-owl-bot[bot] committed Aug 4, 2021
1 parent c8f67fa commit 6a650bfdfb2906e666e18692e4f27283268f88d3
@@ -166,14 +166,13 @@ public ProfilerServiceStubSettings.Builder getStubSettingsBuilder() {
return ((ProfilerServiceStubSettings.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;
@@ -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.devtools.cloudprofiler.v2.CreateOfflineProfileRequest;
@@ -32,7 +31,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;

@@ -127,39 +125,30 @@ protected GrpcProfilerServiceStub(
GrpcCallSettings.<CreateProfileRequest, Profile>newBuilder()
.setMethodDescriptor(createProfileMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<CreateProfileRequest>() {
@Override
public Map<String, String> extract(CreateProfileRequest 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();
GrpcCallSettings<CreateOfflineProfileRequest, Profile> createOfflineProfileTransportSettings =
GrpcCallSettings.<CreateOfflineProfileRequest, Profile>newBuilder()
.setMethodDescriptor(createOfflineProfileMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<CreateOfflineProfileRequest>() {
@Override
public Map<String, String> extract(CreateOfflineProfileRequest 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();
GrpcCallSettings<UpdateProfileRequest, Profile> updateProfileTransportSettings =
GrpcCallSettings.<UpdateProfileRequest, Profile>newBuilder()
.setMethodDescriptor(updateProfileMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<UpdateProfileRequest>() {
@Override
public Map<String, String> extract(UpdateProfileRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("profile.name", String.valueOf(request.getProfile().getName()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("profile.name", String.valueOf(request.getProfile().getName()));
return params.build();
})
.build();

@@ -290,14 +290,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;
}

0 comments on commit 6a650bf

Please sign in to comment.