Skip to content
Permalink
Browse files
feat!: Java 8 breaking generator changes (#1222)
This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/d9958105-2c81-4042-8726-6edc37113f51/targets

- [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.)

PiperOrigin-RevId: 388535346
Source-Link: googleapis/googleapis@d9eaf41
PiperOrigin-RevId: 388499329
Source-Link: googleapis/googleapis@bb0a090
  • Loading branch information
yoshi-automation committed Aug 5, 2021
1 parent 93a0eae commit ac9103c18b96933cb724ae9c96a46005bae8160d
Showing with 175 additions and 1,289 deletions.
  1. +1 −1 google-cloud-bigquerystorage/clirr-ignored-differences.xml
  2. +1 −2 ...-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/BaseBigQueryReadSettings.java
  3. +1 −2 ...uerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/stub/BigQueryReadStubSettings.java
  4. +20 −25 ...bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/stub/GrpcBigQueryReadStub.java
  5. +1 −2 ...ystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/BaseBigQueryStorageSettings.java
  6. +1 −2 ...age/src/main/java/com/google/cloud/bigquery/storage/v1beta1/stub/BigQueryStorageStubSettings.java
  7. +36 −48 ...storage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/stub/GrpcBigQueryStorageStub.java
  8. +1 −2 ...uerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/BaseBigQueryReadSettings.java
  9. +1 −2 ...igquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/BigQueryWriteSettings.java
  10. +1 −2 ...torage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/stub/BigQueryReadStubSettings.java
  11. +1 −2 ...orage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/stub/BigQueryWriteStubSettings.java
  12. +20 −25 ...erystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/stub/GrpcBigQueryReadStub.java
  13. +31 −45 ...rystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/stub/GrpcBigQueryWriteStub.java
  14. +4 −4 ...igquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1/BaseBigQueryReadClientTest.java
  15. +2 −2 ...torage/src/test/java/com/google/cloud/bigquery/storage/v1beta1/BaseBigQueryStorageClientTest.java
  16. +2 −2 ...rystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta2/BaseBigQueryReadClientTest.java
  17. +16 −0 proto-google-cloud-bigquerystorage-v1/clirr-ignored-differences.xml
  18. +0 −223 ...-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/ReadSessionName.java
  19. +0 −217 ...google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/TableName.java
  20. +20 −0 proto-google-cloud-bigquerystorage-v1beta1/clirr-ignored-differences.xml
  21. +0 −223 ...querystorage-v1beta1/src/main/java/com/google/cloud/bigquery/storage/v1beta1/ReadSessionName.java
  22. +0 −223 ...d-bigquerystorage-v1beta1/src/main/java/com/google/cloud/bigquery/storage/v1beta1/StreamName.java
  23. +8 −0 proto-google-cloud-bigquerystorage-v1beta2/clirr-ignored-differences.xml
  24. +0 −223 ...querystorage-v1beta2/src/main/java/com/google/cloud/bigquery/storage/v1beta2/ReadSessionName.java
  25. +7 −12 synth.metadata
@@ -31,4 +31,4 @@
<className>com/google/cloud/bigquery/storage/v1beta2/JsonStreamWriter$Builder</className>
<method>com.google.cloud.bigquery.storage.v1beta2.JsonStreamWriter$Builder createDefaultStream()</method>
</difference>
</differences>
</differences>
@@ -169,14 +169,13 @@ public BigQueryReadStubSettings.Builder getStubSettingsBuilder() {
return ((BigQueryReadStubSettings.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;
@@ -323,14 +323,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;
}
@@ -21,7 +21,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.ServerStreamingCallable;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.bigquery.storage.v1.CreateReadSessionRequest;
@@ -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;

@@ -128,41 +126,32 @@ protected GrpcBigQueryReadStub(
GrpcCallSettings.<CreateReadSessionRequest, ReadSession>newBuilder()
.setMethodDescriptor(createReadSessionMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<CreateReadSessionRequest>() {
@Override
public Map<String, String> extract(CreateReadSessionRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put(
"read_session.table", String.valueOf(request.getReadSession().getTable()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put(
"read_session.table", String.valueOf(request.getReadSession().getTable()));
return params.build();
})
.build();
GrpcCallSettings<ReadRowsRequest, ReadRowsResponse> readRowsTransportSettings =
GrpcCallSettings.<ReadRowsRequest, ReadRowsResponse>newBuilder()
.setMethodDescriptor(readRowsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ReadRowsRequest>() {
@Override
public Map<String, String> extract(ReadRowsRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("read_stream", String.valueOf(request.getReadStream()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("read_stream", String.valueOf(request.getReadStream()));
return params.build();
})
.build();
GrpcCallSettings<SplitReadStreamRequest, SplitReadStreamResponse>
splitReadStreamTransportSettings =
GrpcCallSettings.<SplitReadStreamRequest, SplitReadStreamResponse>newBuilder()
.setMethodDescriptor(splitReadStreamMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<SplitReadStreamRequest>() {
@Override
public Map<String, String> extract(SplitReadStreamRequest 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();

@@ -203,7 +192,13 @@ public UnaryCallable<SplitReadStreamRequest, SplitReadStreamResponse> splitReadS

@Override
public final void close() {
shutdown();
try {
backgroundResources.close();
} catch (RuntimeException e) {
throw e;
} catch (Exception e) {
throw new IllegalStateException("Failed to close resource", e);
}
}

@Override
@@ -188,14 +188,13 @@ public BigQueryStorageStubSettings.Builder getStubSettingsBuilder() {
return ((BigQueryStorageStubSettings.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;
@@ -375,14 +375,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.ServerStreamingCallable;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.bigquery.storage.v1beta1.Storage;
@@ -32,7 +31,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;

@@ -173,33 +171,27 @@ protected GrpcBigQueryStorageStub(
GrpcCallSettings.<Storage.CreateReadSessionRequest, Storage.ReadSession>newBuilder()
.setMethodDescriptor(createReadSessionMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<Storage.CreateReadSessionRequest>() {
@Override
public Map<String, String> extract(Storage.CreateReadSessionRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put(
"table_reference.dataset_id",
String.valueOf(request.getTableReference().getDatasetId()));
params.put(
"table_reference.project_id",
String.valueOf(request.getTableReference().getProjectId()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put(
"table_reference.dataset_id",
String.valueOf(request.getTableReference().getDatasetId()));
params.put(
"table_reference.project_id",
String.valueOf(request.getTableReference().getProjectId()));
return params.build();
})
.build();
GrpcCallSettings<Storage.ReadRowsRequest, Storage.ReadRowsResponse> readRowsTransportSettings =
GrpcCallSettings.<Storage.ReadRowsRequest, Storage.ReadRowsResponse>newBuilder()
.setMethodDescriptor(readRowsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<Storage.ReadRowsRequest>() {
@Override
public Map<String, String> extract(Storage.ReadRowsRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put(
"read_position.stream.name",
String.valueOf(request.getReadPosition().getStream().getName()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put(
"read_position.stream.name",
String.valueOf(request.getReadPosition().getStream().getName()));
return params.build();
})
.build();
GrpcCallSettings<
@@ -212,27 +204,20 @@ public Map<String, String> extract(Storage.ReadRowsRequest request) {
newBuilder()
.setMethodDescriptor(batchCreateReadSessionStreamsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<Storage.BatchCreateReadSessionStreamsRequest>() {
@Override
public Map<String, String> extract(
Storage.BatchCreateReadSessionStreamsRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("session.name", String.valueOf(request.getSession().getName()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("session.name", String.valueOf(request.getSession().getName()));
return params.build();
})
.build();
GrpcCallSettings<Storage.FinalizeStreamRequest, Empty> finalizeStreamTransportSettings =
GrpcCallSettings.<Storage.FinalizeStreamRequest, Empty>newBuilder()
.setMethodDescriptor(finalizeStreamMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<Storage.FinalizeStreamRequest>() {
@Override
public Map<String, String> extract(Storage.FinalizeStreamRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("stream.name", String.valueOf(request.getStream().getName()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("stream.name", String.valueOf(request.getStream().getName()));
return params.build();
})
.build();
GrpcCallSettings<Storage.SplitReadStreamRequest, Storage.SplitReadStreamResponse>
@@ -241,15 +226,12 @@ public Map<String, String> extract(Storage.FinalizeStreamRequest request) {
.<Storage.SplitReadStreamRequest, Storage.SplitReadStreamResponse>newBuilder()
.setMethodDescriptor(splitReadStreamMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<Storage.SplitReadStreamRequest>() {
@Override
public Map<String, String> extract(Storage.SplitReadStreamRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put(
"original_stream.name",
String.valueOf(request.getOriginalStream().getName()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put(
"original_stream.name",
String.valueOf(request.getOriginalStream().getName()));
return params.build();
})
.build();

@@ -314,7 +296,13 @@ public UnaryCallable<Storage.FinalizeStreamRequest, Empty> finalizeStreamCallabl

@Override
public final void close() {
shutdown();
try {
backgroundResources.close();
} catch (RuntimeException e) {
throw e;
} catch (Exception e) {
throw new IllegalStateException("Failed to close resource", e);
}
}

@Override
@@ -170,14 +170,13 @@ public BigQueryReadStubSettings.Builder getStubSettingsBuilder() {
return ((BigQueryReadStubSettings.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;
@@ -185,14 +185,13 @@ public BigQueryWriteStubSettings.Builder getStubSettingsBuilder() {
return ((BigQueryWriteStubSettings.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;
@@ -324,14 +324,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;
}
@@ -386,14 +386,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 ac9103c

Please sign in to comment.