Skip to content
Permalink
Browse files
feat!: release gapic-generator-java v2.0.0 (#489)
* feat!: release gapic-generator-java v2.0.0

Committer: @miraleung
PiperOrigin-RevId: 388535346

Source-Link: googleapis/googleapis@d9eaf41

Source-Link: https://github.com/googleapis/googleapis-gen/commit/976c5ab6f24b58c91fe04847ead1953f99d19e6a

* 🦉 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 5, 2021
1 parent e162f29 commit 7ec2db39034ed8caecf0da9877ffe0014e2fd528
@@ -212,14 +212,13 @@ public ConnectionServiceStubSettings.Builder getStubSettingsBuilder() {
return ((ConnectionServiceStubSettings.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;
@@ -436,14 +436,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;
}
@@ -22,7 +22,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.bigquery.connection.v1beta1.ConnectionProto;
import com.google.common.collect.ImmutableMap;
@@ -36,7 +35,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;

@@ -232,14 +230,10 @@ protected GrpcConnectionServiceStub(
.<ConnectionProto.CreateConnectionRequest, ConnectionProto.Connection>newBuilder()
.setMethodDescriptor(createConnectionMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ConnectionProto.CreateConnectionRequest>() {
@Override
public Map<String, String> extract(
ConnectionProto.CreateConnectionRequest 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<ConnectionProto.GetConnectionRequest, ConnectionProto.Connection>
@@ -248,14 +242,10 @@ public Map<String, String> extract(
.<ConnectionProto.GetConnectionRequest, ConnectionProto.Connection>newBuilder()
.setMethodDescriptor(getConnectionMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ConnectionProto.GetConnectionRequest>() {
@Override
public Map<String, String> extract(
ConnectionProto.GetConnectionRequest 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<
@@ -266,14 +256,10 @@ public Map<String, String> extract(
newBuilder()
.setMethodDescriptor(listConnectionsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ConnectionProto.ListConnectionsRequest>() {
@Override
public Map<String, String> extract(
ConnectionProto.ListConnectionsRequest 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<ConnectionProto.UpdateConnectionRequest, ConnectionProto.Connection>
@@ -282,85 +268,63 @@ public Map<String, String> extract(
.<ConnectionProto.UpdateConnectionRequest, ConnectionProto.Connection>newBuilder()
.setMethodDescriptor(updateConnectionMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ConnectionProto.UpdateConnectionRequest>() {
@Override
public Map<String, String> extract(
ConnectionProto.UpdateConnectionRequest 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<ConnectionProto.UpdateConnectionCredentialRequest, Empty>
updateConnectionCredentialTransportSettings =
GrpcCallSettings.<ConnectionProto.UpdateConnectionCredentialRequest, Empty>newBuilder()
.setMethodDescriptor(updateConnectionCredentialMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<
ConnectionProto.UpdateConnectionCredentialRequest>() {
@Override
public Map<String, String> extract(
ConnectionProto.UpdateConnectionCredentialRequest 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<ConnectionProto.DeleteConnectionRequest, Empty>
deleteConnectionTransportSettings =
GrpcCallSettings.<ConnectionProto.DeleteConnectionRequest, Empty>newBuilder()
.setMethodDescriptor(deleteConnectionMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ConnectionProto.DeleteConnectionRequest>() {
@Override
public Map<String, String> extract(
ConnectionProto.DeleteConnectionRequest 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();

@@ -16,7 +16,6 @@

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

@@ -211,14 +211,13 @@ public ConnectionServiceStubSettings.Builder getStubSettingsBuilder() {
return ((ConnectionServiceStubSettings.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;
@@ -470,14 +470,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 7ec2db3

Please sign in to comment.