Skip to content
Permalink
Browse files
feat: updates to Write API v1beta2 public interface, migrate to Java …
…microgenerator (#728)

* chore: migrate java-bigquerystorage to the Java microgenerator

Committer: @miraleung
PiperOrigin-RevId: 345311069

Source-Author: Google APIs <noreply@google.com>
Source-Date: Wed Dec 2 14:17:15 2020 -0800
Source-Repo: googleapis/googleapis
Source-Sha: e39e42f368d236203a774ee994fcb4d730c33a83
Source-Link: googleapis/googleapis@e39e42f

* feat!: Updates to BigQuery Write API V1Beta2 public interface. This includes breaking changes to the API, it is fine because the API is not officially launched yet.

PiperOrigin-RevId: 345469340

Source-Author: Google APIs <noreply@google.com>
Source-Date: Thu Dec 3 09:33:11 2020 -0800
Source-Repo: googleapis/googleapis
Source-Sha: b53c4d98aab1eae3dac90b37019dede686782f13
Source-Link: googleapis/googleapis@b53c4d9

* fix: Update gapic-generator-java to 0.0.7

Committer: @miraleung
PiperOrigin-RevId: 345476969

Source-Author: Google APIs <noreply@google.com>
Source-Date: Thu Dec 3 10:07:32 2020 -0800
Source-Repo: googleapis/googleapis
Source-Sha: 7be2c821dd88109038c55c89f7dd48f092eeab9d
Source-Link: googleapis/googleapis@7be2c82

* chore: rollback migrating java-bigquerystorage to the Java microgenerator

Committer: @miraleung
PiperOrigin-RevId: 345522380

Source-Author: Google APIs <noreply@google.com>
Source-Date: Thu Dec 3 13:28:07 2020 -0800
Source-Repo: googleapis/googleapis
Source-Sha: f8f975c7d43904e90d6c5f1684fdb6804400e641
Source-Link: googleapis/googleapis@f8f975c

* chore: migrate java-bigquerystorage to the Java microgenerator

Committer: @miraleung
PiperOrigin-RevId: 346405446

Source-Author: Google APIs <noreply@google.com>
Source-Date: Tue Dec 8 14:03:11 2020 -0800
Source-Repo: googleapis/googleapis
Source-Sha: abc43060f136ce77124754a48f367102e646844a
Source-Link: googleapis/googleapis@abc4306

* chore: update gapic-generator-java to 0.0.11

Committer: @miraleung
PiperOrigin-RevId: 347036369

Source-Author: Google APIs <noreply@google.com>
Source-Date: Fri Dec 11 11:13:47 2020 -0800
Source-Repo: googleapis/googleapis
Source-Sha: 6d65640b1fcbdf26ea76cb720de0ac138cae9bed
Source-Link: googleapis/googleapis@6d65640

Co-authored-by: Stephanie Wang <stephaniewang526@users.noreply.github.com>
Co-authored-by: stephwang <stephwang@google.com>
  • Loading branch information
3 people committed Dec 17, 2020
1 parent c32a86a commit 2fc59689dfe64be6c23104493f690f476a0cda7f
Showing with 6,730 additions and 3,802 deletions.
  1. +0 −46 google-cloud-bigquerystorage/clirr-ignored-differences.xml
  2. +20 −120 ...ud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/BaseBigQueryReadClient.java
  3. +18 −15 ...-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/BaseBigQueryReadSettings.java
  4. +5 −18 google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/package-info.java
  5. +4 −5 ...oud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/stub/BigQueryReadStub.java
  6. +47 −52 ...uerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/stub/BigQueryReadStubSettings.java
  7. +19 −21 ...rage/src/main/java/com/google/cloud/bigquery/storage/v1/stub/GrpcBigQueryReadCallableFactory.java
  8. +17 −10 ...bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/stub/GrpcBigQueryReadStub.java
  9. +91 −336 ...bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1alpha2/BigQueryWriteClient.java
  10. +39 −40 ...gquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1alpha2/BigQueryWriteSettings.java
  11. +4 −16 ...-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1alpha2/package-info.java
  12. +15 −22 ...querystorage/src/main/java/com/google/cloud/bigquery/storage/v1alpha2/stub/BigQueryWriteStub.java
  13. +96 −93 ...rage/src/main/java/com/google/cloud/bigquery/storage/v1alpha2/stub/BigQueryWriteStubSettings.java
  14. +19 −21 ...c/main/java/com/google/cloud/bigquery/storage/v1alpha2/stub/GrpcBigQueryWriteCallableFactory.java
  15. +146 −108 ...ystorage/src/main/java/com/google/cloud/bigquery/storage/v1alpha2/stub/GrpcBigQueryWriteStub.java
  16. +59 −245 ...erystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/BaseBigQueryStorageClient.java
  17. +36 −35 ...ystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/BaseBigQueryStorageSettings.java
  18. +5 −18 ...e-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/package-info.java
  19. +15 −19 ...uerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/stub/BigQueryStorageStub.java
  20. +91 −93 ...age/src/main/java/com/google/cloud/bigquery/storage/v1beta1/stub/BigQueryStorageStubSettings.java
  21. +19 −21 .../main/java/com/google/cloud/bigquery/storage/v1beta1/stub/GrpcBigQueryStorageCallableFactory.java
  22. +105 −82 ...storage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/stub/GrpcBigQueryStorageStub.java
  23. +20 −120 ...gquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/BaseBigQueryReadClient.java
  24. +18 −15 ...uerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/BaseBigQueryReadSettings.java
  25. +35 −275 ...-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/BigQueryWriteClient.java
  26. +19 −17 ...igquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/BigQueryWriteSettings.java
  27. +6 −29 ...e-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/package-info.java
  28. +4 −5 ...igquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/stub/BigQueryReadStub.java
  29. +46 −102 ...torage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/stub/BigQueryReadStubSettings.java
  30. +4 −5 ...gquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/stub/BigQueryWriteStub.java
  31. +52 −107 ...orage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/stub/BigQueryWriteStubSettings.java
  32. +19 −21 ...src/main/java/com/google/cloud/bigquery/storage/v1beta2/stub/GrpcBigQueryReadCallableFactory.java
  33. +17 −10 ...erystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/stub/GrpcBigQueryReadStub.java
  34. +19 −21 ...rc/main/java/com/google/cloud/bigquery/storage/v1beta2/stub/GrpcBigQueryWriteCallableFactory.java
  35. +29 −10 ...rystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/stub/GrpcBigQueryWriteStub.java
  36. +108 −44 ...igquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1/BaseBigQueryReadClientTest.java
  37. +4 −2 ...le-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1/MockBigQueryRead.java
  38. +10 −8 ...loud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1/MockBigQueryReadImpl.java
  39. +259 −101 ...uerystorage/src/test/java/com/google/cloud/bigquery/storage/v1alpha2/BigQueryWriteClientTest.java
  40. +4 −2 ...d-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1alpha2/MockBigQueryWrite.java
  41. +36 −43 ...gquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1alpha2/MockBigQueryWriteImpl.java
  42. +107 −82 ...torage/src/test/java/com/google/cloud/bigquery/storage/v1beta1/BaseBigQueryStorageClientTest.java
  43. +4 −2 ...-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta1/MockBigQueryStorage.java
  44. +27 −31 ...querystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta1/MockBigQueryStorageImpl.java
  45. +109 −48 ...rystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta2/BaseBigQueryReadClientTest.java
  46. +227 −72 ...querystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta2/BigQueryWriteClientTest.java
  47. +1 −1 ...bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta2/JsonStreamWriterTest.java
  48. +4 −2 ...oud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta2/MockBigQueryRead.java
  49. +10 −8 ...bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta2/MockBigQueryReadImpl.java
  50. +4 −2 ...ud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta2/MockBigQueryWrite.java
  51. +16 −14 ...igquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta2/MockBigQueryWriteImpl.java
  52. +13 −13 ...oud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta2/StreamWriterTest.java
  53. +2 −2 ...e/src/test/java/com/google/cloud/bigquery/storage/v1beta2/it/ITBigQueryWriteManualClientTest.java
  54. +46 −40 ...ogle-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/ProjectName.java
  55. +63 −50 ...-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/ReadSessionName.java
  56. +70 −55 ...e-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/ReadStreamName.java
  57. +63 −50 ...google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/TableName.java
  58. +63 −50 ...-bigquerystorage-v1alpha2/src/main/java/com/google/cloud/bigquery/storage/v1alpha2/TableName.java
  59. +70 −55 ...erystorage-v1alpha2/src/main/java/com/google/cloud/bigquery/storage/v1alpha2/WriteStreamName.java
  60. +46 −40 ...-bigquerystorage-v1beta1/src/main/java/com/google/cloud/bigquery/storage/v1beta1/ProjectName.java
  61. +63 −50 ...querystorage-v1beta1/src/main/java/com/google/cloud/bigquery/storage/v1beta1/ReadSessionName.java
  62. +63 −50 ...d-bigquerystorage-v1beta1/src/main/java/com/google/cloud/bigquery/storage/v1beta1/StreamName.java
  63. +172 −10 proto-google-cloud-bigquerystorage-v1beta2/clirr-ignored-differences.xml
  64. +132 −44 ...erystorage-v1beta2/src/main/java/com/google/cloud/bigquery/storage/v1beta2/AppendRowsRequest.java
  65. +18 −6 ...e-v1beta2/src/main/java/com/google/cloud/bigquery/storage/v1beta2/AppendRowsRequestOrBuilder.java
  66. +1,240 −66 ...rystorage-v1beta2/src/main/java/com/google/cloud/bigquery/storage/v1beta2/AppendRowsResponse.java
  67. +69 −10 ...-v1beta2/src/main/java/com/google/cloud/bigquery/storage/v1beta2/AppendRowsResponseOrBuilder.java
  68. +546 −2 ...eta2/src/main/java/com/google/cloud/bigquery/storage/v1beta2/BatchCommitWriteStreamsResponse.java
  69. +61 −0 ...main/java/com/google/cloud/bigquery/storage/v1beta2/BatchCommitWriteStreamsResponseOrBuilder.java
  70. +46 −40 ...-bigquerystorage-v1beta2/src/main/java/com/google/cloud/bigquery/storage/v1beta2/ProjectName.java
  71. +63 −50 ...querystorage-v1beta2/src/main/java/com/google/cloud/bigquery/storage/v1beta2/ReadSessionName.java
  72. +70 −55 ...gquerystorage-v1beta2/src/main/java/com/google/cloud/bigquery/storage/v1beta2/ReadStreamName.java
  73. +1,214 −0 ...bigquerystorage-v1beta2/src/main/java/com/google/cloud/bigquery/storage/v1beta2/StorageError.java
  74. +100 −0 ...torage-v1beta2/src/main/java/com/google/cloud/bigquery/storage/v1beta2/StorageErrorOrBuilder.java
  75. +131 −92 ...bigquerystorage-v1beta2/src/main/java/com/google/cloud/bigquery/storage/v1beta2/StorageProto.java
  76. +15 −15 ...-bigquerystorage-v1beta2/src/main/java/com/google/cloud/bigquery/storage/v1beta2/StreamProto.java
  77. +63 −50 ...ud-bigquerystorage-v1beta2/src/main/java/com/google/cloud/bigquery/storage/v1beta2/TableName.java
  78. +0 −179 ...-bigquerystorage-v1beta2/src/main/java/com/google/cloud/bigquery/storage/v1beta2/WriteStream.java
  79. +70 −55 ...querystorage-v1beta2/src/main/java/com/google/cloud/bigquery/storage/v1beta2/WriteStreamName.java
  80. +0 −25 ...storage-v1beta2/src/main/java/com/google/cloud/bigquery/storage/v1beta2/WriteStreamOrBuilder.java
  81. +69 −9 ...-cloud-bigquerystorage-v1beta2/src/main/proto/google/cloud/bigquery/storage/v1beta2/storage.proto
  82. +0 −3 ...e-cloud-bigquerystorage-v1beta2/src/main/proto/google/cloud/bigquery/storage/v1beta2/stream.proto
  83. +1 −1 synth.metadata

This file was deleted.

@@ -5,14 +5,15 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.google.cloud.bigquery.storage.v1;

import com.google.api.core.BetaApi;
@@ -25,7 +26,7 @@
import java.util.concurrent.TimeUnit;
import javax.annotation.Generated;

// AUTO-GENERATED DOCUMENTATION AND SERVICE
// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
* Service Description: BigQuery Read API.
*
@@ -34,18 +35,7 @@
* <p>This class provides the ability to make remote calls to the backing service through method
* calls that map to API methods. Sample code to get started:
*
* <pre>
* <code>
* try (BaseBigQueryReadClient baseBigQueryReadClient = BaseBigQueryReadClient.create()) {
* ProjectName parent = ProjectName.of("[PROJECT]");
* ReadSession readSession = ReadSession.newBuilder().build();
* int maxStreamCount = 0;
* ReadSession response = baseBigQueryReadClient.createReadSession(parent, readSession, maxStreamCount);
* }
* </code>
* </pre>
*
* <p>Note: close() needs to be called on the baseBigQueryReadClient object to clean up resources
* <p>Note: close() needs to be called on the BaseBigQueryReadClient object to clean up resources
* such as threads. In the example above, try-with-resources is used, which automatically calls
* close().
*
@@ -74,30 +64,28 @@
*
* <p>To customize credentials:
*
* <pre>
* <code>
* <pre>{@code
* BaseBigQueryReadSettings baseBigQueryReadSettings =
* BaseBigQueryReadSettings.newBuilder()
* .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
* .build();
* BaseBigQueryReadClient baseBigQueryReadClient =
* BaseBigQueryReadClient.create(baseBigQueryReadSettings);
* </code>
* </pre>
* }</pre>
*
* To customize the endpoint:
* <p>To customize the endpoint:
*
* <pre>
* <code>
* <pre>{@code
* BaseBigQueryReadSettings baseBigQueryReadSettings =
* BaseBigQueryReadSettings.newBuilder().setEndpoint(myEndpoint).build();
* BaseBigQueryReadClient baseBigQueryReadClient =
* BaseBigQueryReadClient.create(baseBigQueryReadSettings);
* </code>
* </pre>
* }</pre>
*
* <p>Please refer to the GitHub repository's samples for more quickstart code snippets.
*/
@Generated("by gapic-generator")
@BetaApi
@Generated("by gapic-generator")
public class BaseBigQueryReadClient implements BackgroundResource {
private final BaseBigQueryReadSettings settings;
private final BigQueryReadStub stub;
@@ -118,7 +106,7 @@ public static final BaseBigQueryReadClient create(BaseBigQueryReadSettings setti

/**
* Constructs an instance of BaseBigQueryReadClient, using the given stub for making calls. This
* is for advanced usage - prefer to use BaseBigQueryReadSettings}.
* is for advanced usage - prefer using create(BaseBigQueryReadSettings).
*/
@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public static final BaseBigQueryReadClient create(BigQueryReadStub stub) {
@@ -150,7 +138,7 @@ public BigQueryReadStub getStub() {
return stub;
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new read session. A read session divides the contents of a BigQuery table into one or
* more streams, which can then be used to read data from the table. The read session also
@@ -169,17 +157,6 @@ public BigQueryReadStub getStub() {
* <p>Read sessions automatically expire 24 hours after they are created and do not require manual
* clean-up by the caller.
*
* <p>Sample code:
*
* <pre><code>
* try (BaseBigQueryReadClient baseBigQueryReadClient = BaseBigQueryReadClient.create()) {
* ProjectName parent = ProjectName.of("[PROJECT]");
* ReadSession readSession = ReadSession.newBuilder().build();
* int maxStreamCount = 0;
* ReadSession response = baseBigQueryReadClient.createReadSession(parent, readSession, maxStreamCount);
* }
* </code></pre>
*
* @param parent Required. The request project that owns the session, in the form of
* `projects/{project_id}`.
* @param readSession Required. Session to be created.
@@ -202,7 +179,7 @@ public final ReadSession createReadSession(
return createReadSession(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new read session. A read session divides the contents of a BigQuery table into one or
* more streams, which can then be used to read data from the table. The read session also
@@ -221,17 +198,6 @@ public final ReadSession createReadSession(
* <p>Read sessions automatically expire 24 hours after they are created and do not require manual
* clean-up by the caller.
*
* <p>Sample code:
*
* <pre><code>
* try (BaseBigQueryReadClient baseBigQueryReadClient = BaseBigQueryReadClient.create()) {
* ProjectName parent = ProjectName.of("[PROJECT]");
* ReadSession readSession = ReadSession.newBuilder().build();
* int maxStreamCount = 0;
* ReadSession response = baseBigQueryReadClient.createReadSession(parent.toString(), readSession, maxStreamCount);
* }
* </code></pre>
*
* @param parent Required. The request project that owns the session, in the form of
* `projects/{project_id}`.
* @param readSession Required. Session to be created.
@@ -254,7 +220,7 @@ public final ReadSession createReadSession(
return createReadSession(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new read session. A read session divides the contents of a BigQuery table into one or
* more streams, which can then be used to read data from the table. The read session also
@@ -273,28 +239,14 @@ public final ReadSession createReadSession(
* <p>Read sessions automatically expire 24 hours after they are created and do not require manual
* clean-up by the caller.
*
* <p>Sample code:
*
* <pre><code>
* try (BaseBigQueryReadClient baseBigQueryReadClient = BaseBigQueryReadClient.create()) {
* ProjectName parent = ProjectName.of("[PROJECT]");
* ReadSession readSession = ReadSession.newBuilder().build();
* CreateReadSessionRequest request = CreateReadSessionRequest.newBuilder()
* .setParent(parent.toString())
* .setReadSession(readSession)
* .build();
* ReadSession response = baseBigQueryReadClient.createReadSession(request);
* }
* </code></pre>
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ReadSession createReadSession(CreateReadSessionRequest request) {
return createReadSessionCallable().call(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new read session. A read session divides the contents of a BigQuery table into one or
* more streams, which can then be used to read data from the table. The read session also
@@ -314,26 +266,12 @@ public final ReadSession createReadSession(CreateReadSessionRequest request) {
* clean-up by the caller.
*
* <p>Sample code:
*
* <pre><code>
* try (BaseBigQueryReadClient baseBigQueryReadClient = BaseBigQueryReadClient.create()) {
* ProjectName parent = ProjectName.of("[PROJECT]");
* ReadSession readSession = ReadSession.newBuilder().build();
* CreateReadSessionRequest request = CreateReadSessionRequest.newBuilder()
* .setParent(parent.toString())
* .setReadSession(readSession)
* .build();
* ApiFuture&lt;ReadSession&gt; future = baseBigQueryReadClient.createReadSessionCallable().futureCall(request);
* // Do something
* ReadSession response = future.get();
* }
* </code></pre>
*/
public final UnaryCallable<CreateReadSessionRequest, ReadSession> createReadSessionCallable() {
return stub.createReadSessionCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Reads rows from the stream in the format prescribed by the ReadSession. Each response contains
* one or more table rows, up to a maximum of 100 MiB per response; read requests which attempt to
@@ -343,26 +281,12 @@ public final UnaryCallable<CreateReadSessionRequest, ReadSession> createReadSess
* stream.
*
* <p>Sample code:
*
* <pre><code>
* try (BaseBigQueryReadClient baseBigQueryReadClient = BaseBigQueryReadClient.create()) {
* ReadStreamName readStream = ReadStreamName.of("[PROJECT]", "[LOCATION]", "[SESSION]", "[STREAM]");
* ReadRowsRequest request = ReadRowsRequest.newBuilder()
* .setReadStream(readStream.toString())
* .build();
*
* ServerStream&lt;ReadRowsResponse&gt; stream = baseBigQueryReadClient.readRowsCallable().call(request);
* for (ReadRowsResponse response : stream) {
* // Do something when receive a response
* }
* }
* </code></pre>
*/
public final ServerStreamingCallable<ReadRowsRequest, ReadRowsResponse> readRowsCallable() {
return stub.readRowsCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Splits a given `ReadStream` into two `ReadStream` objects. These `ReadStream` objects are
* referred to as the primary and the residual streams of the split. The original `ReadStream` can
@@ -375,26 +299,14 @@ public final ServerStreamingCallable<ReadRowsRequest, ReadRowsResponse> readRows
* original[0-j] = primary[0-j] and original[j-n] = residual[0-m] once the streams have been read
* to completion.
*
* <p>Sample code:
*
* <pre><code>
* try (BaseBigQueryReadClient baseBigQueryReadClient = BaseBigQueryReadClient.create()) {
* ReadStreamName name = ReadStreamName.of("[PROJECT]", "[LOCATION]", "[SESSION]", "[STREAM]");
* SplitReadStreamRequest request = SplitReadStreamRequest.newBuilder()
* .setName(name.toString())
* .build();
* SplitReadStreamResponse response = baseBigQueryReadClient.splitReadStream(request);
* }
* </code></pre>
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final SplitReadStreamResponse splitReadStream(SplitReadStreamRequest request) {
return splitReadStreamCallable().call(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Splits a given `ReadStream` into two `ReadStream` objects. These `ReadStream` objects are
* referred to as the primary and the residual streams of the split. The original `ReadStream` can
@@ -408,18 +320,6 @@ public final SplitReadStreamResponse splitReadStream(SplitReadStreamRequest requ
* to completion.
*
* <p>Sample code:
*
* <pre><code>
* try (BaseBigQueryReadClient baseBigQueryReadClient = BaseBigQueryReadClient.create()) {
* ReadStreamName name = ReadStreamName.of("[PROJECT]", "[LOCATION]", "[SESSION]", "[STREAM]");
* SplitReadStreamRequest request = SplitReadStreamRequest.newBuilder()
* .setName(name.toString())
* .build();
* ApiFuture&lt;SplitReadStreamResponse&gt; future = baseBigQueryReadClient.splitReadStreamCallable().futureCall(request);
* // Do something
* SplitReadStreamResponse response = future.get();
* }
* </code></pre>
*/
public final UnaryCallable<SplitReadStreamRequest, SplitReadStreamResponse>
splitReadStreamCallable() {

0 comments on commit 2fc5968

Please sign in to comment.