Skip to content
Permalink
Browse files
feat!: release gapic-generator-java v2.0.0 (#47)
  • Loading branch information
gcf-owl-bot[bot] committed Aug 4, 2021
1 parent 29895f3 commit 6e8fd4b1fb93b8075af8c2536655e7d213c1622a
@@ -16,7 +16,6 @@

package com.google.cloud.binaryauthorization.v1beta1;

import com.google.api.core.ApiFunction;
import com.google.api.core.ApiFuture;
import com.google.api.core.ApiFutures;
import com.google.api.core.BetaApi;
@@ -981,12 +980,7 @@ public static ApiFuture<ListAttestorsPagedResponse> createAsync(
ListAttestorsPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListAttestorsPage, ListAttestorsPagedResponse>() {
@Override
public ListAttestorsPagedResponse apply(ListAttestorsPage input) {
return new ListAttestorsPagedResponse(input);
}
},
input -> new ListAttestorsPagedResponse(input),
MoreExecutors.directExecutor());
}

@@ -202,14 +202,13 @@ public BinauthzManagementServiceV1Beta1StubSettings.Builder getStubSettingsBuild
return ((BinauthzManagementServiceV1Beta1StubSettings.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;
@@ -444,14 +444,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;
}
@@ -24,7 +24,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.binaryauthorization.v1beta1.Attestor;
import com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest;
@@ -42,7 +41,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;

@@ -188,91 +186,70 @@ protected GrpcBinauthzManagementServiceV1Beta1Stub(
GrpcCallSettings.<GetPolicyRequest, Policy>newBuilder()
.setMethodDescriptor(getPolicyMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<GetPolicyRequest>() {
@Override
public Map<String, String> extract(GetPolicyRequest 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<UpdatePolicyRequest, Policy> updatePolicyTransportSettings =
GrpcCallSettings.<UpdatePolicyRequest, Policy>newBuilder()
.setMethodDescriptor(updatePolicyMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<UpdatePolicyRequest>() {
@Override
public Map<String, String> extract(UpdatePolicyRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("policy.name", String.valueOf(request.getPolicy().getName()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("policy.name", String.valueOf(request.getPolicy().getName()));
return params.build();
})
.build();
GrpcCallSettings<CreateAttestorRequest, Attestor> createAttestorTransportSettings =
GrpcCallSettings.<CreateAttestorRequest, Attestor>newBuilder()
.setMethodDescriptor(createAttestorMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<CreateAttestorRequest>() {
@Override
public Map<String, String> extract(CreateAttestorRequest 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<GetAttestorRequest, Attestor> getAttestorTransportSettings =
GrpcCallSettings.<GetAttestorRequest, Attestor>newBuilder()
.setMethodDescriptor(getAttestorMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<GetAttestorRequest>() {
@Override
public Map<String, String> extract(GetAttestorRequest 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<UpdateAttestorRequest, Attestor> updateAttestorTransportSettings =
GrpcCallSettings.<UpdateAttestorRequest, Attestor>newBuilder()
.setMethodDescriptor(updateAttestorMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<UpdateAttestorRequest>() {
@Override
public Map<String, String> extract(UpdateAttestorRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("attestor.name", String.valueOf(request.getAttestor().getName()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("attestor.name", String.valueOf(request.getAttestor().getName()));
return params.build();
})
.build();
GrpcCallSettings<ListAttestorsRequest, ListAttestorsResponse> listAttestorsTransportSettings =
GrpcCallSettings.<ListAttestorsRequest, ListAttestorsResponse>newBuilder()
.setMethodDescriptor(listAttestorsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ListAttestorsRequest>() {
@Override
public Map<String, String> extract(ListAttestorsRequest 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<DeleteAttestorRequest, Empty> deleteAttestorTransportSettings =
GrpcCallSettings.<DeleteAttestorRequest, Empty>newBuilder()
.setMethodDescriptor(deleteAttestorMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<DeleteAttestorRequest>() {
@Override
public Map<String, String> extract(DeleteAttestorRequest 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();

0 comments on commit 6e8fd4b

Please sign in to comment.