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 (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
gcf-owl-bot[bot] authored Aug 4, 2021
1 parent ad80a15 commit 9f1add3
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package com.google.cloud.vpcaccess.v1;

import com.google.api.core.ApiFunction;
import com.google.api.core.ApiFuture;
import com.google.api.core.ApiFutures;
import com.google.api.core.BetaApi;
Expand Down Expand Up @@ -698,12 +697,7 @@ public static ApiFuture<ListConnectorsPagedResponse> createAsync(
ListConnectorsPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListConnectorsPage, ListConnectorsPagedResponse>() {
@Override
public ListConnectorsPagedResponse apply(ListConnectorsPage input) {
return new ListConnectorsPagedResponse(input);
}
},
input -> new ListConnectorsPagedResponse(input),
MoreExecutors.directExecutor());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,14 +191,13 @@ public VpcAccessServiceStubSettings.Builder getStubSettingsBuilder() {
return ((VpcAccessServiceStubSettings.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 @@ -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.vpcaccess.v1.Connector;
import com.google.cloud.vpcaccess.v1.CreateConnectorRequest;
Expand All @@ -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;

Expand Down Expand Up @@ -151,53 +149,41 @@ protected GrpcVpcAccessServiceStub(
GrpcCallSettings.<CreateConnectorRequest, Operation>newBuilder()
.setMethodDescriptor(createConnectorMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<CreateConnectorRequest>() {
@Override
public Map<String, String> extract(CreateConnectorRequest 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<GetConnectorRequest, Connector> getConnectorTransportSettings =
GrpcCallSettings.<GetConnectorRequest, Connector>newBuilder()
.setMethodDescriptor(getConnectorMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<GetConnectorRequest>() {
@Override
public Map<String, String> extract(GetConnectorRequest 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<ListConnectorsRequest, ListConnectorsResponse>
listConnectorsTransportSettings =
GrpcCallSettings.<ListConnectorsRequest, ListConnectorsResponse>newBuilder()
.setMethodDescriptor(listConnectorsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ListConnectorsRequest>() {
@Override
public Map<String, String> extract(ListConnectorsRequest 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<DeleteConnectorRequest, Operation> deleteConnectorTransportSettings =
GrpcCallSettings.<DeleteConnectorRequest, Operation>newBuilder()
.setMethodDescriptor(deleteConnectorMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<DeleteConnectorRequest>() {
@Override
public Map<String, String> extract(DeleteConnectorRequest 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
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
* <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

0 comments on commit 9f1add3

Please sign in to comment.