Skip to content
Permalink
Browse files
feat!: release gapic-generator-java v2.0.0 (#433)
  • Loading branch information
gcf-owl-bot[bot] committed Aug 4, 2021
1 parent 34663b9 commit c1b98e50871526ae5ed943f566133b1a73639ea4
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 240 deletions.
@@ -16,7 +16,6 @@

package com.google.cloud.monitoring.dashboard.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;
@@ -528,12 +527,7 @@ public static ApiFuture<ListDashboardsPagedResponse> createAsync(
ListDashboardsPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListDashboardsPage, ListDashboardsPagedResponse>() {
@Override
public ListDashboardsPagedResponse apply(ListDashboardsPage input) {
return new ListDashboardsPagedResponse(input);
}
},
input -> new ListDashboardsPagedResponse(input),
MoreExecutors.directExecutor());
}

@@ -189,14 +189,13 @@ public DashboardsServiceStubSettings.Builder getStubSettingsBuilder() {
return ((DashboardsServiceStubSettings.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;
@@ -409,14 +409,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.common.collect.ImmutableMap;
import com.google.longrunning.stub.GrpcOperationsStub;
@@ -38,7 +37,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;

@@ -156,66 +154,51 @@ protected GrpcDashboardsServiceStub(
GrpcCallSettings.<CreateDashboardRequest, Dashboard>newBuilder()
.setMethodDescriptor(createDashboardMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<CreateDashboardRequest>() {
@Override
public Map<String, String> extract(CreateDashboardRequest 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<ListDashboardsRequest, ListDashboardsResponse>
listDashboardsTransportSettings =
GrpcCallSettings.<ListDashboardsRequest, ListDashboardsResponse>newBuilder()
.setMethodDescriptor(listDashboardsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ListDashboardsRequest>() {
@Override
public Map<String, String> extract(ListDashboardsRequest 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<GetDashboardRequest, Dashboard> getDashboardTransportSettings =
GrpcCallSettings.<GetDashboardRequest, Dashboard>newBuilder()
.setMethodDescriptor(getDashboardMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<GetDashboardRequest>() {
@Override
public Map<String, String> extract(GetDashboardRequest 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<DeleteDashboardRequest, Empty> deleteDashboardTransportSettings =
GrpcCallSettings.<DeleteDashboardRequest, Empty>newBuilder()
.setMethodDescriptor(deleteDashboardMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<DeleteDashboardRequest>() {
@Override
public Map<String, String> extract(DeleteDashboardRequest 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<UpdateDashboardRequest, Dashboard> updateDashboardTransportSettings =
GrpcCallSettings.<UpdateDashboardRequest, Dashboard>newBuilder()
.setMethodDescriptor(updateDashboardMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<UpdateDashboardRequest>() {
@Override
public Map<String, String> extract(UpdateDashboardRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("dashboard.name", String.valueOf(request.getDashboard().getName()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("dashboard.name", String.valueOf(request.getDashboard().getName()));
return params.build();
})
.build();

This file was deleted.

0 comments on commit c1b98e5

Please sign in to comment.