Skip to content
Permalink
Browse files
feat!: release gapic-generator-java v2.0.0 (#548)
  • Loading branch information
gcf-owl-bot[bot] committed Aug 6, 2021
1 parent f454282 commit 22223d653a44efa69b421b4fcdaacba3ec7781e5
@@ -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;
@@ -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) {
@@ -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;
@@ -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;
}
@@ -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;
@@ -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;

@@ -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();

@@ -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;
@@ -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) {
@@ -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;
@@ -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;
}
@@ -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;
@@ -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;

@@ -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();

@@ -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>
@@ -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>

0 comments on commit 22223d6

Please sign in to comment.