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

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

@@ -202,14 +202,13 @@ public AccessApprovalStubSettings.Builder getStubSettingsBuilder() {
return ((AccessApprovalStubSettings.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;
@@ -480,14 +480,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;
}
@@ -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.accessapproval.v1.AccessApprovalSettings;
import com.google.cloud.accessapproval.v1.ApprovalRequest;
@@ -41,7 +40,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;

@@ -198,69 +196,54 @@ protected GrpcAccessApprovalStub(
GrpcCallSettings.<ListApprovalRequestsMessage, ListApprovalRequestsResponse>newBuilder()
.setMethodDescriptor(listApprovalRequestsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ListApprovalRequestsMessage>() {
@Override
public Map<String, String> extract(ListApprovalRequestsMessage 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<GetApprovalRequestMessage, ApprovalRequest>
getApprovalRequestTransportSettings =
GrpcCallSettings.<GetApprovalRequestMessage, ApprovalRequest>newBuilder()
.setMethodDescriptor(getApprovalRequestMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<GetApprovalRequestMessage>() {
@Override
public Map<String, String> extract(GetApprovalRequestMessage 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<ApproveApprovalRequestMessage, ApprovalRequest>
approveApprovalRequestTransportSettings =
GrpcCallSettings.<ApproveApprovalRequestMessage, ApprovalRequest>newBuilder()
.setMethodDescriptor(approveApprovalRequestMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ApproveApprovalRequestMessage>() {
@Override
public Map<String, String> extract(ApproveApprovalRequestMessage 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<DismissApprovalRequestMessage, ApprovalRequest>
dismissApprovalRequestTransportSettings =
GrpcCallSettings.<DismissApprovalRequestMessage, ApprovalRequest>newBuilder()
.setMethodDescriptor(dismissApprovalRequestMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<DismissApprovalRequestMessage>() {
@Override
public Map<String, String> extract(DismissApprovalRequestMessage 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<GetAccessApprovalSettingsMessage, AccessApprovalSettings>
getAccessApprovalSettingsTransportSettings =
GrpcCallSettings.<GetAccessApprovalSettingsMessage, AccessApprovalSettings>newBuilder()
.setMethodDescriptor(getAccessApprovalSettingsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<GetAccessApprovalSettingsMessage>() {
@Override
public Map<String, String> extract(GetAccessApprovalSettingsMessage 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<UpdateAccessApprovalSettingsMessage, AccessApprovalSettings>
@@ -269,30 +252,21 @@ public Map<String, String> extract(GetAccessApprovalSettingsMessage request) {
.<UpdateAccessApprovalSettingsMessage, AccessApprovalSettings>newBuilder()
.setMethodDescriptor(updateAccessApprovalSettingsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<UpdateAccessApprovalSettingsMessage>() {
@Override
public Map<String, String> extract(
UpdateAccessApprovalSettingsMessage request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put(
"settings.name", String.valueOf(request.getSettings().getName()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("settings.name", String.valueOf(request.getSettings().getName()));
return params.build();
})
.build();
GrpcCallSettings<DeleteAccessApprovalSettingsMessage, Empty>
deleteAccessApprovalSettingsTransportSettings =
GrpcCallSettings.<DeleteAccessApprovalSettingsMessage, Empty>newBuilder()
.setMethodDescriptor(deleteAccessApprovalSettingsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<DeleteAccessApprovalSettingsMessage>() {
@Override
public Map<String, String> extract(
DeleteAccessApprovalSettingsMessage 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 29c5796

Please sign in to comment.