Skip to content
This repository has been archived by the owner on Sep 16, 2023. It is now read-only.

Commit

Permalink
feat!: release gapic-generator-java v2.0.0 (#571)
Browse files Browse the repository at this point in the history
* feat!: release gapic-generator-java v2.0.0

Committer: @miraleung
PiperOrigin-RevId: 388535346

Source-Link: googleapis/googleapis@d9eaf41

Source-Link: googleapis/googleapis-gen@976c5ab

* 🦉 Updates from OwlBot

See https://github.com/googleapis/repo-automation-bots/blob/master/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed Aug 11, 2021
1 parent 043b90b commit 6856736
Show file tree
Hide file tree
Showing 8 changed files with 72 additions and 152 deletions.
Expand Up @@ -16,7 +16,6 @@

package com.google.cloud.recommender.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;
Expand Down Expand Up @@ -1456,12 +1455,7 @@ public static ApiFuture<ListInsightsPagedResponse> createAsync(
ListInsightsPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListInsightsPage, ListInsightsPagedResponse>() {
@Override
public ListInsightsPagedResponse apply(ListInsightsPage input) {
return new ListInsightsPagedResponse(input);
}
},
input -> new ListInsightsPagedResponse(input),
MoreExecutors.directExecutor());
}

Expand Down Expand Up @@ -1537,12 +1531,7 @@ public static ApiFuture<ListRecommendationsPagedResponse> createAsync(
ListRecommendationsPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListRecommendationsPage, ListRecommendationsPagedResponse>() {
@Override
public ListRecommendationsPagedResponse apply(ListRecommendationsPage input) {
return new ListRecommendationsPagedResponse(input);
}
},
input -> new ListRecommendationsPagedResponse(input),
MoreExecutors.directExecutor());
}

Expand Down
Expand Up @@ -199,14 +199,13 @@ public RecommenderStubSettings.Builder getStubSettingsBuilder() {
return ((RecommenderStubSettings.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;
Expand Down
Expand Up @@ -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.recommender.v1.GetInsightRequest;
import com.google.cloud.recommender.v1.GetRecommendationRequest;
Expand All @@ -43,7 +42,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;

Expand Down Expand Up @@ -199,109 +197,84 @@ protected GrpcRecommenderStub(
GrpcCallSettings.<ListInsightsRequest, ListInsightsResponse>newBuilder()
.setMethodDescriptor(listInsightsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ListInsightsRequest>() {
@Override
public Map<String, String> extract(ListInsightsRequest 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<GetInsightRequest, Insight> getInsightTransportSettings =
GrpcCallSettings.<GetInsightRequest, Insight>newBuilder()
.setMethodDescriptor(getInsightMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<GetInsightRequest>() {
@Override
public Map<String, String> extract(GetInsightRequest 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<MarkInsightAcceptedRequest, Insight> markInsightAcceptedTransportSettings =
GrpcCallSettings.<MarkInsightAcceptedRequest, Insight>newBuilder()
.setMethodDescriptor(markInsightAcceptedMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<MarkInsightAcceptedRequest>() {
@Override
public Map<String, String> extract(MarkInsightAcceptedRequest 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<ListRecommendationsRequest, ListRecommendationsResponse>
listRecommendationsTransportSettings =
GrpcCallSettings.<ListRecommendationsRequest, ListRecommendationsResponse>newBuilder()
.setMethodDescriptor(listRecommendationsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ListRecommendationsRequest>() {
@Override
public Map<String, String> extract(ListRecommendationsRequest 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<GetRecommendationRequest, Recommendation> getRecommendationTransportSettings =
GrpcCallSettings.<GetRecommendationRequest, Recommendation>newBuilder()
.setMethodDescriptor(getRecommendationMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<GetRecommendationRequest>() {
@Override
public Map<String, String> extract(GetRecommendationRequest 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<MarkRecommendationClaimedRequest, Recommendation>
markRecommendationClaimedTransportSettings =
GrpcCallSettings.<MarkRecommendationClaimedRequest, Recommendation>newBuilder()
.setMethodDescriptor(markRecommendationClaimedMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<MarkRecommendationClaimedRequest>() {
@Override
public Map<String, String> extract(MarkRecommendationClaimedRequest 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<MarkRecommendationSucceededRequest, Recommendation>
markRecommendationSucceededTransportSettings =
GrpcCallSettings.<MarkRecommendationSucceededRequest, Recommendation>newBuilder()
.setMethodDescriptor(markRecommendationSucceededMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<MarkRecommendationSucceededRequest>() {
@Override
public Map<String, String> extract(
MarkRecommendationSucceededRequest 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<MarkRecommendationFailedRequest, Recommendation>
markRecommendationFailedTransportSettings =
GrpcCallSettings.<MarkRecommendationFailedRequest, Recommendation>newBuilder()
.setMethodDescriptor(markRecommendationFailedMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<MarkRecommendationFailedRequest>() {
@Override
public Map<String, String> extract(MarkRecommendationFailedRequest 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();

Expand Down
Expand Up @@ -539,14 +539,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;
}
Expand Down
Expand Up @@ -16,7 +16,6 @@

package com.google.cloud.recommender.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;
Expand Down Expand Up @@ -1386,12 +1385,7 @@ public static ApiFuture<ListInsightsPagedResponse> createAsync(
ListInsightsPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListInsightsPage, ListInsightsPagedResponse>() {
@Override
public ListInsightsPagedResponse apply(ListInsightsPage input) {
return new ListInsightsPagedResponse(input);
}
},
input -> new ListInsightsPagedResponse(input),
MoreExecutors.directExecutor());
}

Expand Down Expand Up @@ -1467,12 +1461,7 @@ public static ApiFuture<ListRecommendationsPagedResponse> createAsync(
ListRecommendationsPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListRecommendationsPage, ListRecommendationsPagedResponse>() {
@Override
public ListRecommendationsPagedResponse apply(ListRecommendationsPage input) {
return new ListRecommendationsPagedResponse(input);
}
},
input -> new ListRecommendationsPagedResponse(input),
MoreExecutors.directExecutor());
}

Expand Down
Expand Up @@ -200,14 +200,13 @@ public RecommenderStubSettings.Builder getStubSettingsBuilder() {
return ((RecommenderStubSettings.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;
Expand Down

0 comments on commit 6856736

Please sign in to comment.