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

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

@@ -1070,12 +1064,7 @@ public static ApiFuture<ComputeContactsPagedResponse> createAsync(
ComputeContactsPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ComputeContactsPage, ComputeContactsPagedResponse>() {
@Override
public ComputeContactsPagedResponse apply(ComputeContactsPage input) {
return new ComputeContactsPagedResponse(input);
}
},
input -> new ComputeContactsPagedResponse(input),
MoreExecutors.directExecutor());
}

@@ -198,14 +198,13 @@ public EssentialContactsServiceStubSettings.Builder getStubSettingsBuilder() {
return ((EssentialContactsServiceStubSettings.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;
@@ -500,14 +500,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.essentialcontacts.v1.ComputeContactsRequest;
import com.google.cloud.essentialcontacts.v1.ComputeContactsResponse;
@@ -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;

@@ -190,92 +188,71 @@ protected GrpcEssentialContactsServiceStub(
GrpcCallSettings.<CreateContactRequest, Contact>newBuilder()
.setMethodDescriptor(createContactMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<CreateContactRequest>() {
@Override
public Map<String, String> extract(CreateContactRequest 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<UpdateContactRequest, Contact> updateContactTransportSettings =
GrpcCallSettings.<UpdateContactRequest, Contact>newBuilder()
.setMethodDescriptor(updateContactMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<UpdateContactRequest>() {
@Override
public Map<String, String> extract(UpdateContactRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("contact.name", String.valueOf(request.getContact().getName()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("contact.name", String.valueOf(request.getContact().getName()));
return params.build();
})
.build();
GrpcCallSettings<ListContactsRequest, ListContactsResponse> listContactsTransportSettings =
GrpcCallSettings.<ListContactsRequest, ListContactsResponse>newBuilder()
.setMethodDescriptor(listContactsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ListContactsRequest>() {
@Override
public Map<String, String> extract(ListContactsRequest 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<GetContactRequest, Contact> getContactTransportSettings =
GrpcCallSettings.<GetContactRequest, Contact>newBuilder()
.setMethodDescriptor(getContactMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<GetContactRequest>() {
@Override
public Map<String, String> extract(GetContactRequest 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<DeleteContactRequest, Empty> deleteContactTransportSettings =
GrpcCallSettings.<DeleteContactRequest, Empty>newBuilder()
.setMethodDescriptor(deleteContactMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<DeleteContactRequest>() {
@Override
public Map<String, String> extract(DeleteContactRequest 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<ComputeContactsRequest, ComputeContactsResponse>
computeContactsTransportSettings =
GrpcCallSettings.<ComputeContactsRequest, ComputeContactsResponse>newBuilder()
.setMethodDescriptor(computeContactsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ComputeContactsRequest>() {
@Override
public Map<String, String> extract(ComputeContactsRequest 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<SendTestMessageRequest, Empty> sendTestMessageTransportSettings =
GrpcCallSettings.<SendTestMessageRequest, Empty>newBuilder()
.setMethodDescriptor(sendTestMessageMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<SendTestMessageRequest>() {
@Override
public Map<String, String> extract(SendTestMessageRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("resource", String.valueOf(request.getResource()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("resource", String.valueOf(request.getResource()));
return params.build();
})
.build();

0 comments on commit 1e3b7f4

Please sign in to comment.