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

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,14 +201,13 @@ public GSuiteAddOnsStubSettings.Builder getStubSettingsBuilder() {
return ((GSuiteAddOnsStubSettings.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 @@ -494,14 +494,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
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,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.gsuiteaddons.v1.Authorization;
import com.google.cloud.gsuiteaddons.v1.CreateDeploymentRequest;
Expand All @@ -44,7 +43,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 @@ -206,119 +204,91 @@ protected GrpcGSuiteAddOnsStub(
GrpcCallSettings.<GetAuthorizationRequest, Authorization>newBuilder()
.setMethodDescriptor(getAuthorizationMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<GetAuthorizationRequest>() {
@Override
public Map<String, String> extract(GetAuthorizationRequest 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<CreateDeploymentRequest, Deployment> createDeploymentTransportSettings =
GrpcCallSettings.<CreateDeploymentRequest, Deployment>newBuilder()
.setMethodDescriptor(createDeploymentMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<CreateDeploymentRequest>() {
@Override
public Map<String, String> extract(CreateDeploymentRequest 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<ReplaceDeploymentRequest, Deployment> replaceDeploymentTransportSettings =
GrpcCallSettings.<ReplaceDeploymentRequest, Deployment>newBuilder()
.setMethodDescriptor(replaceDeploymentMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ReplaceDeploymentRequest>() {
@Override
public Map<String, String> extract(ReplaceDeploymentRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put(
"deployment.name", String.valueOf(request.getDeployment().getName()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("deployment.name", String.valueOf(request.getDeployment().getName()));
return params.build();
})
.build();
GrpcCallSettings<GetDeploymentRequest, Deployment> getDeploymentTransportSettings =
GrpcCallSettings.<GetDeploymentRequest, Deployment>newBuilder()
.setMethodDescriptor(getDeploymentMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<GetDeploymentRequest>() {
@Override
public Map<String, String> extract(GetDeploymentRequest 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<ListDeploymentsRequest, ListDeploymentsResponse>
listDeploymentsTransportSettings =
GrpcCallSettings.<ListDeploymentsRequest, ListDeploymentsResponse>newBuilder()
.setMethodDescriptor(listDeploymentsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ListDeploymentsRequest>() {
@Override
public Map<String, String> extract(ListDeploymentsRequest 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<DeleteDeploymentRequest, Empty> deleteDeploymentTransportSettings =
GrpcCallSettings.<DeleteDeploymentRequest, Empty>newBuilder()
.setMethodDescriptor(deleteDeploymentMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<DeleteDeploymentRequest>() {
@Override
public Map<String, String> extract(DeleteDeploymentRequest 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<InstallDeploymentRequest, Empty> installDeploymentTransportSettings =
GrpcCallSettings.<InstallDeploymentRequest, Empty>newBuilder()
.setMethodDescriptor(installDeploymentMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<InstallDeploymentRequest>() {
@Override
public Map<String, String> extract(InstallDeploymentRequest 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<UninstallDeploymentRequest, Empty> uninstallDeploymentTransportSettings =
GrpcCallSettings.<UninstallDeploymentRequest, Empty>newBuilder()
.setMethodDescriptor(uninstallDeploymentMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<UninstallDeploymentRequest>() {
@Override
public Map<String, String> extract(UninstallDeploymentRequest 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<GetInstallStatusRequest, InstallStatus> getInstallStatusTransportSettings =
GrpcCallSettings.<GetInstallStatusRequest, InstallStatus>newBuilder()
.setMethodDescriptor(getInstallStatusMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<GetInstallStatusRequest>() {
@Override
public Map<String, String> extract(GetInstallStatusRequest 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

0 comments on commit 9be92e1

Please sign in to comment.