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

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

@@ -2521,14 +2515,7 @@ public static ApiFuture<ListModelsPagedResponse> createAsync(
ApiFuture<ListModelsPage> futurePage =
ListModelsPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListModelsPage, ListModelsPagedResponse>() {
@Override
public ListModelsPagedResponse apply(ListModelsPage input) {
return new ListModelsPagedResponse(input);
}
},
MoreExecutors.directExecutor());
futurePage, input -> new ListModelsPagedResponse(input), MoreExecutors.directExecutor());
}

private ListModelsPagedResponse(ListModelsPage page) {
@@ -2603,12 +2590,7 @@ public static ApiFuture<ListModelEvaluationsPagedResponse> createAsync(
ListModelEvaluationsPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListModelEvaluationsPage, ListModelEvaluationsPagedResponse>() {
@Override
public ListModelEvaluationsPagedResponse apply(ListModelEvaluationsPage input) {
return new ListModelEvaluationsPagedResponse(input);
}
},
input -> new ListModelEvaluationsPagedResponse(input),
MoreExecutors.directExecutor());
}

@@ -308,14 +308,13 @@ public AutoMlStubSettings.Builder getStubSettingsBuilder() {
return ((AutoMlStubSettings.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;
@@ -169,14 +169,13 @@ public PredictionServiceStubSettings.Builder getStubSettingsBuilder() {
return ((PredictionServiceStubSettings.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;
@@ -1111,14 +1111,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;
}

Large diffs are not rendered by default.

@@ -22,7 +22,6 @@
import com.google.api.gax.grpc.GrpcStubCallableFactory;
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.OperationCallable;
import com.google.api.gax.rpc.RequestParamsExtractor;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.automl.v1.BatchPredictRequest;
import com.google.cloud.automl.v1.BatchPredictResult;
@@ -35,7 +34,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;

@@ -117,26 +115,20 @@ protected GrpcPredictionServiceStub(
GrpcCallSettings.<PredictRequest, PredictResponse>newBuilder()
.setMethodDescriptor(predictMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<PredictRequest>() {
@Override
public Map<String, String> extract(PredictRequest 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<BatchPredictRequest, Operation> batchPredictTransportSettings =
GrpcCallSettings.<BatchPredictRequest, Operation>newBuilder()
.setMethodDescriptor(batchPredictMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<BatchPredictRequest>() {
@Override
public Map<String, String> extract(BatchPredictRequest 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();

@@ -302,14 +302,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;
}
@@ -16,7 +16,6 @@

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

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

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

@@ -3382,14 +3366,7 @@ public static ApiFuture<ListModelsPagedResponse> createAsync(
ApiFuture<ListModelsPage> futurePage =
ListModelsPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListModelsPage, ListModelsPagedResponse>() {
@Override
public ListModelsPagedResponse apply(ListModelsPage input) {
return new ListModelsPagedResponse(input);
}
},
MoreExecutors.directExecutor());
futurePage, input -> new ListModelsPagedResponse(input), MoreExecutors.directExecutor());
}

private ListModelsPagedResponse(ListModelsPage page) {
@@ -3464,12 +3441,7 @@ public static ApiFuture<ListModelEvaluationsPagedResponse> createAsync(
ListModelEvaluationsPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListModelEvaluationsPage, ListModelEvaluationsPagedResponse>() {
@Override
public ListModelEvaluationsPagedResponse apply(ListModelEvaluationsPage input) {
return new ListModelEvaluationsPagedResponse(input);
}
},
input -> new ListModelEvaluationsPagedResponse(input),
MoreExecutors.directExecutor());
}

@@ -346,14 +346,13 @@ public AutoMlStubSettings.Builder getStubSettingsBuilder() {
return ((AutoMlStubSettings.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;
@@ -170,14 +170,13 @@ public PredictionServiceStubSettings.Builder getStubSettingsBuilder() {
return ((PredictionServiceStubSettings.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;
@@ -1356,14 +1356,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;
}

0 comments on commit 6e94a08

Please sign in to comment.