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

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

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

@@ -220,14 +220,13 @@ public CloudBillingStubSettings.Builder getStubSettingsBuilder() {
return ((CloudBillingStubSettings.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;
@@ -16,7 +16,6 @@

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

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

private ListSkusPagedResponse(ListSkusPage page) {
@@ -166,14 +166,13 @@ public CloudCatalogStubSettings.Builder getStubSettingsBuilder() {
return ((CloudCatalogStubSettings.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;
@@ -605,14 +605,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;
}
@@ -383,14 +383,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.v1.BillingAccount;
import com.google.cloud.billing.v1.CreateBillingAccountRequest;
@@ -47,7 +46,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;

@@ -228,13 +226,10 @@ protected GrpcCloudBillingStub(
GrpcCallSettings.<GetBillingAccountRequest, BillingAccount>newBuilder()
.setMethodDescriptor(getBillingAccountMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<GetBillingAccountRequest>() {
@Override
public Map<String, String> extract(GetBillingAccountRequest 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<ListBillingAccountsRequest, ListBillingAccountsResponse>
@@ -247,13 +242,10 @@ public Map<String, String> extract(GetBillingAccountRequest request) {
GrpcCallSettings.<UpdateBillingAccountRequest, BillingAccount>newBuilder()
.setMethodDescriptor(updateBillingAccountMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<UpdateBillingAccountRequest>() {
@Override
public Map<String, String> extract(UpdateBillingAccountRequest 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<CreateBillingAccountRequest, BillingAccount>
@@ -267,81 +259,63 @@ public Map<String, String> extract(UpdateBillingAccountRequest request) {
.<ListProjectBillingInfoRequest, ListProjectBillingInfoResponse>newBuilder()
.setMethodDescriptor(listProjectBillingInfoMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ListProjectBillingInfoRequest>() {
@Override
public Map<String, String> extract(ListProjectBillingInfoRequest 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<GetProjectBillingInfoRequest, ProjectBillingInfo>
getProjectBillingInfoTransportSettings =
GrpcCallSettings.<GetProjectBillingInfoRequest, ProjectBillingInfo>newBuilder()
.setMethodDescriptor(getProjectBillingInfoMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<GetProjectBillingInfoRequest>() {
@Override
public Map<String, String> extract(GetProjectBillingInfoRequest 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<UpdateProjectBillingInfoRequest, ProjectBillingInfo>
updateProjectBillingInfoTransportSettings =
GrpcCallSettings.<UpdateProjectBillingInfoRequest, ProjectBillingInfo>newBuilder()
.setMethodDescriptor(updateProjectBillingInfoMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<UpdateProjectBillingInfoRequest>() {
@Override
public Map<String, String> extract(UpdateProjectBillingInfoRequest 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<GetIamPolicyRequest, Policy> getIamPolicyTransportSettings =
GrpcCallSettings.<GetIamPolicyRequest, Policy>newBuilder()
.setMethodDescriptor(getIamPolicyMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<GetIamPolicyRequest>() {
@Override
public Map<String, String> extract(GetIamPolicyRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("resource", String.valueOf(request.getResource()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("resource", String.valueOf(request.getResource()));
return params.build();
})
.build();
GrpcCallSettings<SetIamPolicyRequest, Policy> setIamPolicyTransportSettings =
GrpcCallSettings.<SetIamPolicyRequest, Policy>newBuilder()
.setMethodDescriptor(setIamPolicyMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<SetIamPolicyRequest>() {
@Override
public Map<String, String> extract(SetIamPolicyRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("resource", String.valueOf(request.getResource()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("resource", String.valueOf(request.getResource()));
return params.build();
})
.build();
GrpcCallSettings<TestIamPermissionsRequest, TestIamPermissionsResponse>
testIamPermissionsTransportSettings =
GrpcCallSettings.<TestIamPermissionsRequest, TestIamPermissionsResponse>newBuilder()
.setMethodDescriptor(testIamPermissionsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<TestIamPermissionsRequest>() {
@Override
public Map<String, String> extract(TestIamPermissionsRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("resource", String.valueOf(request.getResource()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("resource", String.valueOf(request.getResource()));
return params.build();
})
.build();

@@ -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.v1.ListServicesRequest;
import com.google.cloud.billing.v1.ListServicesResponse;
@@ -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;

@@ -122,13 +120,10 @@ protected GrpcCloudCatalogStub(
GrpcCallSettings.<ListSkusRequest, ListSkusResponse>newBuilder()
.setMethodDescriptor(listSkusMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ListSkusRequest>() {
@Override
public Map<String, String> extract(ListSkusRequest 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();

@@ -16,4 +16,8 @@
<className>com/google/cloud/billing/v1/*OrBuilder</className>
<method>boolean has*(*)</method>
</difference>
<difference>
<differenceType>8001</differenceType>
<className>com/google/cloud/billing/v1/SkuName*</className>
</difference>
</differences>

0 comments on commit 733fd5e

Please sign in to comment.