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

Commit

Permalink
feat!: release gapic-generator-java v2.0.0 (#548)
Browse files Browse the repository at this point in the history
Committer: @miraleung
PiperOrigin-RevId: 388535346

Source-Link: googleapis/googleapis@d9eaf41

Source-Link: googleapis/googleapis-gen@976c5ab
  • Loading branch information
gcf-owl-bot[bot] committed Aug 6, 2021
1 parent f454282 commit 22223d6
Show file tree
Hide file tree
Showing 11 changed files with 54 additions and 268 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package com.google.cloud.billing.budgets.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 @@ -738,14 +737,7 @@ public static ApiFuture<ListBudgetsPagedResponse> createAsync(
ApiFuture<ListBudgetsPage> futurePage =
ListBudgetsPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListBudgetsPage, ListBudgetsPagedResponse>() {
@Override
public ListBudgetsPagedResponse apply(ListBudgetsPage input) {
return new ListBudgetsPagedResponse(input);
}
},
MoreExecutors.directExecutor());
futurePage, input -> new ListBudgetsPagedResponse(input), MoreExecutors.directExecutor());
}

private ListBudgetsPagedResponse(ListBudgetsPage page) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,14 +181,13 @@ public BudgetServiceStubSettings.Builder getStubSettingsBuilder() {
return ((BudgetServiceStubSettings.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
Original file line number Diff line number Diff line change
Expand Up @@ -402,14 +402,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
Original file line number Diff line number Diff line change
Expand Up @@ -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.billing.budgets.v1.Budget;
import com.google.cloud.billing.budgets.v1.CreateBudgetRequest;
Expand All @@ -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;

Expand Down Expand Up @@ -146,65 +144,50 @@ protected GrpcBudgetServiceStub(
GrpcCallSettings.<CreateBudgetRequest, Budget>newBuilder()
.setMethodDescriptor(createBudgetMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<CreateBudgetRequest>() {
@Override
public Map<String, String> extract(CreateBudgetRequest 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<UpdateBudgetRequest, Budget> updateBudgetTransportSettings =
GrpcCallSettings.<UpdateBudgetRequest, Budget>newBuilder()
.setMethodDescriptor(updateBudgetMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<UpdateBudgetRequest>() {
@Override
public Map<String, String> extract(UpdateBudgetRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("budget.name", String.valueOf(request.getBudget().getName()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("budget.name", String.valueOf(request.getBudget().getName()));
return params.build();
})
.build();
GrpcCallSettings<GetBudgetRequest, Budget> getBudgetTransportSettings =
GrpcCallSettings.<GetBudgetRequest, Budget>newBuilder()
.setMethodDescriptor(getBudgetMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<GetBudgetRequest>() {
@Override
public Map<String, String> extract(GetBudgetRequest 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<ListBudgetsRequest, ListBudgetsResponse> listBudgetsTransportSettings =
GrpcCallSettings.<ListBudgetsRequest, ListBudgetsResponse>newBuilder()
.setMethodDescriptor(listBudgetsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ListBudgetsRequest>() {
@Override
public Map<String, String> extract(ListBudgetsRequest 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<DeleteBudgetRequest, Empty> deleteBudgetTransportSettings =
GrpcCallSettings.<DeleteBudgetRequest, Empty>newBuilder()
.setMethodDescriptor(deleteBudgetMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<DeleteBudgetRequest>() {
@Override
public Map<String, String> extract(DeleteBudgetRequest 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
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package com.google.cloud.billing.budgets.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 @@ -497,14 +496,7 @@ public static ApiFuture<ListBudgetsPagedResponse> createAsync(
ApiFuture<ListBudgetsPage> futurePage =
ListBudgetsPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListBudgetsPage, ListBudgetsPagedResponse>() {
@Override
public ListBudgetsPagedResponse apply(ListBudgetsPage input) {
return new ListBudgetsPagedResponse(input);
}
},
MoreExecutors.directExecutor());
futurePage, input -> new ListBudgetsPagedResponse(input), MoreExecutors.directExecutor());
}

private ListBudgetsPagedResponse(ListBudgetsPage page) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,14 +182,13 @@ public BudgetServiceStubSettings.Builder getStubSettingsBuilder() {
return ((BudgetServiceStubSettings.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
Original file line number Diff line number Diff line change
Expand Up @@ -403,14 +403,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
Original file line number Diff line number Diff line change
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.billing.budgets.v1beta1.Budget;
import com.google.cloud.billing.budgets.v1beta1.CreateBudgetRequest;
Expand All @@ -39,7 +38,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 @@ -148,65 +146,50 @@ protected GrpcBudgetServiceStub(
GrpcCallSettings.<CreateBudgetRequest, Budget>newBuilder()
.setMethodDescriptor(createBudgetMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<CreateBudgetRequest>() {
@Override
public Map<String, String> extract(CreateBudgetRequest 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<UpdateBudgetRequest, Budget> updateBudgetTransportSettings =
GrpcCallSettings.<UpdateBudgetRequest, Budget>newBuilder()
.setMethodDescriptor(updateBudgetMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<UpdateBudgetRequest>() {
@Override
public Map<String, String> extract(UpdateBudgetRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("budget.name", String.valueOf(request.getBudget().getName()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("budget.name", String.valueOf(request.getBudget().getName()));
return params.build();
})
.build();
GrpcCallSettings<GetBudgetRequest, Budget> getBudgetTransportSettings =
GrpcCallSettings.<GetBudgetRequest, Budget>newBuilder()
.setMethodDescriptor(getBudgetMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<GetBudgetRequest>() {
@Override
public Map<String, String> extract(GetBudgetRequest 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<ListBudgetsRequest, ListBudgetsResponse> listBudgetsTransportSettings =
GrpcCallSettings.<ListBudgetsRequest, ListBudgetsResponse>newBuilder()
.setMethodDescriptor(listBudgetsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ListBudgetsRequest>() {
@Override
public Map<String, String> extract(ListBudgetsRequest 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<DeleteBudgetRequest, Empty> deleteBudgetTransportSettings =
GrpcCallSettings.<DeleteBudgetRequest, Empty>newBuilder()
.setMethodDescriptor(deleteBudgetMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<DeleteBudgetRequest>() {
@Override
public Map<String, String> extract(DeleteBudgetRequest 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
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,8 @@
<className>com/google/cloud/billing/budgets/v1/*OrBuilder</className>
<method>boolean has*(*)</method>
</difference>
<difference>
<differenceType>8001</differenceType>
<className>com/google/cloud/billing/budgets/v1/BillingAccountName*</className>
</difference>
</differences>
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,8 @@
<className>com/google/cloud/billing/budgets/v1beta1/*OrBuilder</className>
<method>boolean has*(*)</method>
</difference>
<difference>
<differenceType>8001</differenceType>
<className>com/google/cloud/billing/budgets/v1beta1/Billing*</className>
</difference>
</differences>
Loading

0 comments on commit 22223d6

Please sign in to comment.