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 (#481)
Browse files Browse the repository at this point in the history
  • Loading branch information
gcf-owl-bot[bot] authored Aug 10, 2021
1 parent 6a02789 commit 1873e8c
Show file tree
Hide file tree
Showing 17 changed files with 179 additions and 526 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,14 +156,13 @@ public LookupServiceStubSettings.Builder getStubSettingsBuilder() {
return ((LookupServiceStubSettings.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 @@ -16,7 +16,6 @@

package com.google.cloud.servicedirectory.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 @@ -1951,12 +1950,7 @@ public static ApiFuture<ListNamespacesPagedResponse> createAsync(
ListNamespacesPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListNamespacesPage, ListNamespacesPagedResponse>() {
@Override
public ListNamespacesPagedResponse apply(ListNamespacesPage input) {
return new ListNamespacesPagedResponse(input);
}
},
input -> new ListNamespacesPagedResponse(input),
MoreExecutors.directExecutor());
}

Expand Down Expand Up @@ -2032,12 +2026,7 @@ public static ApiFuture<ListServicesPagedResponse> createAsync(
ListServicesPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListServicesPage, ListServicesPagedResponse>() {
@Override
public ListServicesPagedResponse apply(ListServicesPage input) {
return new ListServicesPagedResponse(input);
}
},
input -> new ListServicesPagedResponse(input),
MoreExecutors.directExecutor());
}

Expand Down Expand Up @@ -2112,12 +2101,7 @@ public static ApiFuture<ListEndpointsPagedResponse> createAsync(
ListEndpointsPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListEndpointsPage, ListEndpointsPagedResponse>() {
@Override
public ListEndpointsPagedResponse apply(ListEndpointsPage input) {
return new ListEndpointsPagedResponse(input);
}
},
input -> new ListEndpointsPagedResponse(input),
MoreExecutors.directExecutor());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,14 +259,13 @@ public RegistrationServiceStubSettings.Builder getStubSettingsBuilder() {
return ((RegistrationServiceStubSettings.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.servicedirectory.v1.ResolveServiceRequest;
import com.google.cloud.servicedirectory.v1.ResolveServiceResponse;
Expand All @@ -30,7 +29,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 @@ -102,13 +100,10 @@ protected GrpcLookupServiceStub(
GrpcCallSettings.<ResolveServiceRequest, ResolveServiceResponse>newBuilder()
.setMethodDescriptor(resolveServiceMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ResolveServiceRequest>() {
@Override
public Map<String, String> extract(ResolveServiceRequest 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
Loading

0 comments on commit 1873e8c

Please sign in to comment.