The Read API can be used to read data from BigQuery. + * + *
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: + * + *
+ *
+ * try (BaseBigQueryReadClient baseBigQueryReadClient = BaseBigQueryReadClient.create()) {
+ * String parent = "";
+ * ReadSession readSession = ReadSession.newBuilder().build();
+ * int maxStreamCount = 0;
+ * ReadSession response = baseBigQueryReadClient.createReadSession(parent, readSession, maxStreamCount);
+ * }
+ *
+ *
+ *
+ * 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(). + * + *
The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *
See the individual methods for example code. + * + *
Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *
This class can be customized by passing in a custom instance of BaseBigQueryReadSettings to + * create(). For example: + * + *
To customize credentials: + * + *
+ *
+ * BaseBigQueryReadSettings baseBigQueryReadSettings =
+ * BaseBigQueryReadSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * BaseBigQueryReadClient baseBigQueryReadClient =
+ * BaseBigQueryReadClient.create(baseBigQueryReadSettings);
+ *
+ *
+ *
+ * To customize the endpoint:
+ *
+ *
+ *
+ * BaseBigQueryReadSettings baseBigQueryReadSettings =
+ * BaseBigQueryReadSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * BaseBigQueryReadClient baseBigQueryReadClient =
+ * BaseBigQueryReadClient.create(baseBigQueryReadSettings);
+ *
+ *
+ */
+@Generated("by gapic-generator")
+@BetaApi
+public class BaseBigQueryReadClient implements BackgroundResource {
+ private final BaseBigQueryReadSettings settings;
+ private final BigQueryReadStub stub;
+
+ /** Constructs an instance of BaseBigQueryReadClient with default settings. */
+ public static final BaseBigQueryReadClient create() throws IOException {
+ return create(BaseBigQueryReadSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of BaseBigQueryReadClient, using the given settings. The channels are
+ * created based on the settings passed in, or defaults for any settings that are not set.
+ */
+ public static final BaseBigQueryReadClient create(BaseBigQueryReadSettings settings)
+ throws IOException {
+ return new BaseBigQueryReadClient(settings);
+ }
+
+ /**
+ * Constructs an instance of BaseBigQueryReadClient, using the given stub for making calls. This
+ * is for advanced usage - prefer to use BaseBigQueryReadSettings}.
+ */
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public static final BaseBigQueryReadClient create(BigQueryReadStub stub) {
+ return new BaseBigQueryReadClient(stub);
+ }
+
+ /**
+ * Constructs an instance of BaseBigQueryReadClient, using the given settings. This is protected
+ * so that it is easy to make a subclass, but otherwise, the static factory methods should be
+ * preferred.
+ */
+ protected BaseBigQueryReadClient(BaseBigQueryReadSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((BigQueryReadStubSettings) settings.getStubSettings()).createStub();
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ protected BaseBigQueryReadClient(BigQueryReadStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ }
+
+ public final BaseBigQueryReadSettings getSettings() {
+ return settings;
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public BigQueryReadStub getStub() {
+ return stub;
+ }
+
+ // 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
+ * specifies properties of the data to be read, such as a list of columns or a push-down filter
+ * describing the rows to be returned.
+ *
+ * A particular row can be read by at most one stream. When the caller has reached the end of + * each stream in the session, then all the data in the table has been read. + * + *
Data is assigned to each stream such that roughly the same number of rows can be read from + * each stream. Because the server-side unit for assigning data is collections of rows, the API + * does not guarantee that each stream will return the same number or rows. Additionally, the + * limits are enforced based on the number of pre-filtered rows, so some filters can lead to + * lopsided assignments. + * + *
Read sessions automatically expire 24 hours after they are created and do not require manual + * clean-up by the caller. + * + *
Sample code: + * + *
+ * try (BaseBigQueryReadClient baseBigQueryReadClient = BaseBigQueryReadClient.create()) {
+ * String parent = "";
+ * ReadSession readSession = ReadSession.newBuilder().build();
+ * int maxStreamCount = 0;
+ * ReadSession response = baseBigQueryReadClient.createReadSession(parent, readSession, maxStreamCount);
+ * }
+ *
+ *
+ * @param parent Required. The request project that owns the session, in the form of
+ * `projects/{project_id}`.
+ * @param readSession Required. Session to be created.
+ * @param maxStreamCount Max initial number of streams. If unset or zero, the server will provide
+ * a value of streams so as to produce reasonable throughput. Must be non-negative. The number
+ * of streams may be lower than the requested number, depending on the amount parallelism that
+ * is reasonable for the table. Error will be returned if the max count is greater than the
+ * current system max limit of 1,000.
+ * Streams must be read starting from offset 0. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ReadSession createReadSession( + String parent, ReadSession readSession, int maxStreamCount) { + CreateReadSessionRequest request = + CreateReadSessionRequest.newBuilder() + .setParent(parent) + .setReadSession(readSession) + .setMaxStreamCount(maxStreamCount) + .build(); + return createReadSession(request); + } + + // 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 + * specifies properties of the data to be read, such as a list of columns or a push-down filter + * describing the rows to be returned. + * + *
A particular row can be read by at most one stream. When the caller has reached the end of + * each stream in the session, then all the data in the table has been read. + * + *
Data is assigned to each stream such that roughly the same number of rows can be read from + * each stream. Because the server-side unit for assigning data is collections of rows, the API + * does not guarantee that each stream will return the same number or rows. Additionally, the + * limits are enforced based on the number of pre-filtered rows, so some filters can lead to + * lopsided assignments. + * + *
Read sessions automatically expire 24 hours after they are created and do not require manual + * clean-up by the caller. + * + *
Sample code: + * + *
+ * try (BaseBigQueryReadClient baseBigQueryReadClient = BaseBigQueryReadClient.create()) {
+ * CreateReadSessionRequest request = CreateReadSessionRequest.newBuilder().build();
+ * ReadSession response = baseBigQueryReadClient.createReadSession(request);
+ * }
+ *
+ *
+ * @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
+ /**
+ * 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
+ * specifies properties of the data to be read, such as a list of columns or a push-down filter
+ * describing the rows to be returned.
+ *
+ * A particular row can be read by at most one stream. When the caller has reached the end of + * each stream in the session, then all the data in the table has been read. + * + *
Data is assigned to each stream such that roughly the same number of rows can be read from + * each stream. Because the server-side unit for assigning data is collections of rows, the API + * does not guarantee that each stream will return the same number or rows. Additionally, the + * limits are enforced based on the number of pre-filtered rows, so some filters can lead to + * lopsided assignments. + * + *
Read sessions automatically expire 24 hours after they are created and do not require manual + * clean-up by the caller. + * + *
Sample code: + * + *
+ * try (BaseBigQueryReadClient baseBigQueryReadClient = BaseBigQueryReadClient.create()) {
+ * CreateReadSessionRequest request = CreateReadSessionRequest.newBuilder().build();
+ * ApiFuture<ReadSession> future = baseBigQueryReadClient.createReadSessionCallable().futureCall(request);
+ * // Do something
+ * ReadSession response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallableEach request also returns a set of stream statistics reflecting the current state of the + * stream. + * + *
Sample code: + * + *
+ * try (BaseBigQueryReadClient baseBigQueryReadClient = BaseBigQueryReadClient.create()) {
+ * ReadRowsRequest request = ReadRowsRequest.newBuilder().build();
+ *
+ * ServerStream<ReadRowsResponse> stream = baseBigQueryReadClient.readRowsCallable().call(request);
+ * for (ReadRowsResponse response : stream) {
+ * // Do something when receive a response
+ * }
+ * }
+ *
+ */
+ public final ServerStreamingCallableMoreover, the two child streams will be allocated back-to-back in the original `ReadStream`. + * Concretely, it is guaranteed that for streams original, primary, and residual, that + * original[0-j] = primary[0-j] and original[j-n] = residual[0-m] once the streams have been read + * to completion. + * + *
Sample code: + * + *
+ * try (BaseBigQueryReadClient baseBigQueryReadClient = BaseBigQueryReadClient.create()) {
+ * SplitReadStreamRequest request = SplitReadStreamRequest.newBuilder().build();
+ * SplitReadStreamResponse response = baseBigQueryReadClient.splitReadStream(request);
+ * }
+ *
+ *
+ * @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
+ /**
+ * 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
+ * still be read from in the same manner as before. Both of the returned `ReadStream` objects can
+ * also be read from, and the rows returned by both child streams will be the same as the rows
+ * read from the original stream.
+ *
+ * Moreover, the two child streams will be allocated back-to-back in the original `ReadStream`. + * Concretely, it is guaranteed that for streams original, primary, and residual, that + * original[0-j] = primary[0-j] and original[j-n] = residual[0-m] once the streams have been read + * to completion. + * + *
Sample code: + * + *
+ * try (BaseBigQueryReadClient baseBigQueryReadClient = BaseBigQueryReadClient.create()) {
+ * SplitReadStreamRequest request = SplitReadStreamRequest.newBuilder().build();
+ * ApiFuture<SplitReadStreamResponse> future = baseBigQueryReadClient.splitReadStreamCallable().futureCall(request);
+ * // Do something
+ * SplitReadStreamResponse response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallableThe default instance has everything set to sensible defaults: + * + *
The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *
For example, to set the total timeout of createReadSession to 30 seconds: + * + *
+ *
+ * BaseBigQueryReadSettings.Builder baseBigQueryReadSettingsBuilder =
+ * BaseBigQueryReadSettings.newBuilder();
+ * baseBigQueryReadSettingsBuilder.createReadSessionSettings().getRetrySettings().toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30));
+ * BaseBigQueryReadSettings baseBigQueryReadSettings = baseBigQueryReadSettingsBuilder.build();
+ *
+ *
+ */
+@Generated("by gapic-generator")
+@BetaApi
+public class BaseBigQueryReadSettings extends ClientSettingsNote: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction The interfaces provided are listed below, along with usage samples.
+ *
+ * ====================== BaseBigQueryReadClient ======================
+ *
+ * Service Description: BigQuery Read API.
+ *
+ * The Read API can be used to read data from BigQuery.
+ *
+ * Sample for BaseBigQueryReadClient:
+ *
+ * This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator")
+@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+public abstract class BigQueryReadStub implements BackgroundResource {
+
+ public UnaryCallable The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the total timeout of createReadSession to 30 seconds:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction This class is for advanced usage.
+ */
+@Generated("by gapic-generator")
+@BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+public class GrpcBigQueryReadCallableFactory implements GrpcStubCallableFactory {
+ @Override
+ public This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator")
+@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+public class GrpcBigQueryReadStub extends BigQueryReadStub {
+
+ private static final MethodDescriptor
+ *
+ */
+@Generated("by gapic-generator")
+package com.google.cloud.bigquery.storage.v1;
+
+import javax.annotation.Generated;
diff --git a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/stub/BigQueryReadStub.java b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/stub/BigQueryReadStub.java
new file mode 100644
index 0000000000..01bff92268
--- /dev/null
+++ b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/stub/BigQueryReadStub.java
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
+ *
+ * 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.stub;
+
+import com.google.api.core.BetaApi;
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.rpc.ServerStreamingCallable;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.bigquery.storage.v1.CreateReadSessionRequest;
+import com.google.cloud.bigquery.storage.v1.ReadRowsRequest;
+import com.google.cloud.bigquery.storage.v1.ReadRowsResponse;
+import com.google.cloud.bigquery.storage.v1.ReadSession;
+import com.google.cloud.bigquery.storage.v1.SplitReadStreamRequest;
+import com.google.cloud.bigquery.storage.v1.SplitReadStreamResponse;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS
+/**
+ * Base stub class for BigQuery Storage API.
+ *
+ *
+ * try (BaseBigQueryReadClient baseBigQueryReadClient = BaseBigQueryReadClient.create()) {
+ * String parent = "";
+ * ReadSession readSession = ReadSession.newBuilder().build();
+ * int maxStreamCount = 0;
+ * ReadSession response = baseBigQueryReadClient.createReadSession(parent, readSession, maxStreamCount);
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ */
+@Generated("by gapic-generator")
+@BetaApi
+public class BigQueryReadStubSettings extends StubSettings
+ * BigQueryReadStubSettings.Builder baseBigQueryReadSettingsBuilder =
+ * BigQueryReadStubSettings.newBuilder();
+ * baseBigQueryReadSettingsBuilder.createReadSessionSettings().getRetrySettings().toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30));
+ * BigQueryReadStubSettings baseBigQueryReadSettings = baseBigQueryReadSettingsBuilder.build();
+ *
+ *
+ * Arrow RecordBatch. + *+ * + * Protobuf type {@code google.cloud.bigquery.storage.v1.ArrowRecordBatch} + */ +public final class ArrowRecordBatch extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.bigquery.storage.v1.ArrowRecordBatch) + ArrowRecordBatchOrBuilder { + private static final long serialVersionUID = 0L; + // Use ArrowRecordBatch.newBuilder() to construct. + private ArrowRecordBatch(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private ArrowRecordBatch() { + serializedRecordBatch_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ArrowRecordBatch(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ArrowRecordBatch( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + serializedRecordBatch_ = input.readBytes(); + break; + } + case 16: + { + rowCount_ = input.readInt64(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.bigquery.storage.v1.ArrowProto + .internal_static_google_cloud_bigquery_storage_v1_ArrowRecordBatch_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.bigquery.storage.v1.ArrowProto + .internal_static_google_cloud_bigquery_storage_v1_ArrowRecordBatch_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.bigquery.storage.v1.ArrowRecordBatch.class, + com.google.cloud.bigquery.storage.v1.ArrowRecordBatch.Builder.class); + } + + public static final int SERIALIZED_RECORD_BATCH_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString serializedRecordBatch_; + /** + * + * + *
+ * IPC-serialized Arrow RecordBatch. + *+ * + *
bytes serialized_record_batch = 1;
+ *
+ * @return The serializedRecordBatch.
+ */
+ public com.google.protobuf.ByteString getSerializedRecordBatch() {
+ return serializedRecordBatch_;
+ }
+
+ public static final int ROW_COUNT_FIELD_NUMBER = 2;
+ private long rowCount_;
+ /**
+ *
+ *
+ * + * The count of rows in `serialized_record_batch`. + *+ * + *
int64 row_count = 2;
+ *
+ * @return The rowCount.
+ */
+ public long getRowCount() {
+ return rowCount_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!serializedRecordBatch_.isEmpty()) {
+ output.writeBytes(1, serializedRecordBatch_);
+ }
+ if (rowCount_ != 0L) {
+ output.writeInt64(2, rowCount_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!serializedRecordBatch_.isEmpty()) {
+ size += com.google.protobuf.CodedOutputStream.computeBytesSize(1, serializedRecordBatch_);
+ }
+ if (rowCount_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, rowCount_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.bigquery.storage.v1.ArrowRecordBatch)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.bigquery.storage.v1.ArrowRecordBatch other =
+ (com.google.cloud.bigquery.storage.v1.ArrowRecordBatch) obj;
+
+ if (!getSerializedRecordBatch().equals(other.getSerializedRecordBatch())) return false;
+ if (getRowCount() != other.getRowCount()) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + SERIALIZED_RECORD_BATCH_FIELD_NUMBER;
+ hash = (53 * hash) + getSerializedRecordBatch().hashCode();
+ hash = (37 * hash) + ROW_COUNT_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getRowCount());
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ArrowRecordBatch parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ArrowRecordBatch parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ArrowRecordBatch parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ArrowRecordBatch parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ArrowRecordBatch parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ArrowRecordBatch parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ArrowRecordBatch parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ArrowRecordBatch parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ArrowRecordBatch parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ArrowRecordBatch parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ArrowRecordBatch parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ArrowRecordBatch parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.cloud.bigquery.storage.v1.ArrowRecordBatch prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * Arrow RecordBatch. + *+ * + * Protobuf type {@code google.cloud.bigquery.storage.v1.ArrowRecordBatch} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * IPC-serialized Arrow RecordBatch. + *+ * + *
bytes serialized_record_batch = 1;
+ *
+ * @return The serializedRecordBatch.
+ */
+ public com.google.protobuf.ByteString getSerializedRecordBatch() {
+ return serializedRecordBatch_;
+ }
+ /**
+ *
+ *
+ * + * IPC-serialized Arrow RecordBatch. + *+ * + *
bytes serialized_record_batch = 1;
+ *
+ * @param value The serializedRecordBatch to set.
+ * @return This builder for chaining.
+ */
+ public Builder setSerializedRecordBatch(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ serializedRecordBatch_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * IPC-serialized Arrow RecordBatch. + *+ * + *
bytes serialized_record_batch = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearSerializedRecordBatch() {
+
+ serializedRecordBatch_ = getDefaultInstance().getSerializedRecordBatch();
+ onChanged();
+ return this;
+ }
+
+ private long rowCount_;
+ /**
+ *
+ *
+ * + * The count of rows in `serialized_record_batch`. + *+ * + *
int64 row_count = 2;
+ *
+ * @return The rowCount.
+ */
+ public long getRowCount() {
+ return rowCount_;
+ }
+ /**
+ *
+ *
+ * + * The count of rows in `serialized_record_batch`. + *+ * + *
int64 row_count = 2;
+ *
+ * @param value The rowCount to set.
+ * @return This builder for chaining.
+ */
+ public Builder setRowCount(long value) {
+
+ rowCount_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The count of rows in `serialized_record_batch`. + *+ * + *
int64 row_count = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearRowCount() {
+
+ rowCount_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.bigquery.storage.v1.ArrowRecordBatch)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.bigquery.storage.v1.ArrowRecordBatch)
+ private static final com.google.cloud.bigquery.storage.v1.ArrowRecordBatch DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.bigquery.storage.v1.ArrowRecordBatch();
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ArrowRecordBatch getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * IPC-serialized Arrow RecordBatch. + *+ * + *
bytes serialized_record_batch = 1;
+ *
+ * @return The serializedRecordBatch.
+ */
+ com.google.protobuf.ByteString getSerializedRecordBatch();
+
+ /**
+ *
+ *
+ * + * The count of rows in `serialized_record_batch`. + *+ * + *
int64 row_count = 2;
+ *
+ * @return The rowCount.
+ */
+ long getRowCount();
+}
diff --git a/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/ArrowSchema.java b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/ArrowSchema.java
new file mode 100644
index 0000000000..3080140c6d
--- /dev/null
+++ b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/ArrowSchema.java
@@ -0,0 +1,556 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
+ *
+ * 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.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/bigquery/storage/v1/arrow.proto
+
+package com.google.cloud.bigquery.storage.v1;
+
+/**
+ *
+ *
+ * + * Arrow schema as specified in + * https://arrow.apache.org/docs/python/api/datatypes.html + * and serialized to bytes using IPC: + * https://arrow.apache.org/docs/ipc.html. + * See code samples on how this message can be deserialized. + *+ * + * Protobuf type {@code google.cloud.bigquery.storage.v1.ArrowSchema} + */ +public final class ArrowSchema extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.bigquery.storage.v1.ArrowSchema) + ArrowSchemaOrBuilder { + private static final long serialVersionUID = 0L; + // Use ArrowSchema.newBuilder() to construct. + private ArrowSchema(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private ArrowSchema() { + serializedSchema_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ArrowSchema(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ArrowSchema( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + serializedSchema_ = input.readBytes(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.bigquery.storage.v1.ArrowProto + .internal_static_google_cloud_bigquery_storage_v1_ArrowSchema_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.bigquery.storage.v1.ArrowProto + .internal_static_google_cloud_bigquery_storage_v1_ArrowSchema_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.bigquery.storage.v1.ArrowSchema.class, + com.google.cloud.bigquery.storage.v1.ArrowSchema.Builder.class); + } + + public static final int SERIALIZED_SCHEMA_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString serializedSchema_; + /** + * + * + *
+ * IPC serialized Arrow schema. + *+ * + *
bytes serialized_schema = 1;
+ *
+ * @return The serializedSchema.
+ */
+ public com.google.protobuf.ByteString getSerializedSchema() {
+ return serializedSchema_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!serializedSchema_.isEmpty()) {
+ output.writeBytes(1, serializedSchema_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!serializedSchema_.isEmpty()) {
+ size += com.google.protobuf.CodedOutputStream.computeBytesSize(1, serializedSchema_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.bigquery.storage.v1.ArrowSchema)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.bigquery.storage.v1.ArrowSchema other =
+ (com.google.cloud.bigquery.storage.v1.ArrowSchema) obj;
+
+ if (!getSerializedSchema().equals(other.getSerializedSchema())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + SERIALIZED_SCHEMA_FIELD_NUMBER;
+ hash = (53 * hash) + getSerializedSchema().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ArrowSchema parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ArrowSchema parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ArrowSchema parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ArrowSchema parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ArrowSchema parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ArrowSchema parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ArrowSchema parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ArrowSchema parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ArrowSchema parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ArrowSchema parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ArrowSchema parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ArrowSchema parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(com.google.cloud.bigquery.storage.v1.ArrowSchema prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * Arrow schema as specified in + * https://arrow.apache.org/docs/python/api/datatypes.html + * and serialized to bytes using IPC: + * https://arrow.apache.org/docs/ipc.html. + * See code samples on how this message can be deserialized. + *+ * + * Protobuf type {@code google.cloud.bigquery.storage.v1.ArrowSchema} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * IPC serialized Arrow schema. + *+ * + *
bytes serialized_schema = 1;
+ *
+ * @return The serializedSchema.
+ */
+ public com.google.protobuf.ByteString getSerializedSchema() {
+ return serializedSchema_;
+ }
+ /**
+ *
+ *
+ * + * IPC serialized Arrow schema. + *+ * + *
bytes serialized_schema = 1;
+ *
+ * @param value The serializedSchema to set.
+ * @return This builder for chaining.
+ */
+ public Builder setSerializedSchema(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ serializedSchema_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * IPC serialized Arrow schema. + *+ * + *
bytes serialized_schema = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearSerializedSchema() {
+
+ serializedSchema_ = getDefaultInstance().getSerializedSchema();
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.bigquery.storage.v1.ArrowSchema)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.bigquery.storage.v1.ArrowSchema)
+ private static final com.google.cloud.bigquery.storage.v1.ArrowSchema DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.bigquery.storage.v1.ArrowSchema();
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ArrowSchema getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * IPC serialized Arrow schema. + *+ * + *
bytes serialized_schema = 1;
+ *
+ * @return The serializedSchema.
+ */
+ com.google.protobuf.ByteString getSerializedSchema();
+}
diff --git a/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/AvroProto.java b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/AvroProto.java
new file mode 100644
index 0000000000..abf6aa7b3f
--- /dev/null
+++ b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/AvroProto.java
@@ -0,0 +1,78 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
+ *
+ * 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.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/bigquery/storage/v1/avro.proto
+
+package com.google.cloud.bigquery.storage.v1;
+
+public final class AvroProto {
+ private AvroProto() {}
+
+ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {}
+
+ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) {
+ registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry);
+ }
+
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_bigquery_storage_v1_AvroSchema_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_bigquery_storage_v1_AvroSchema_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_bigquery_storage_v1_AvroRows_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_bigquery_storage_v1_AvroRows_fieldAccessorTable;
+
+ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ return descriptor;
+ }
+
+ private static com.google.protobuf.Descriptors.FileDescriptor descriptor;
+
+ static {
+ java.lang.String[] descriptorData = {
+ "\n+google/cloud/bigquery/storage/v1/avro."
+ + "proto\022 google.cloud.bigquery.storage.v1\""
+ + "\034\n\nAvroSchema\022\016\n\006schema\030\001 \001(\t\"=\n\010AvroRow"
+ + "s\022\036\n\026serialized_binary_rows\030\001 \001(\014\022\021\n\trow"
+ + "_count\030\002 \001(\003B|\n$com.google.cloud.bigquer"
+ + "y.storage.v1B\tAvroProtoP\001ZGgoogle.golang"
+ + ".org/genproto/googleapis/cloud/bigquery/"
+ + "storage/v1;storageb\006proto3"
+ };
+ descriptor =
+ com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
+ descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {});
+ internal_static_google_cloud_bigquery_storage_v1_AvroSchema_descriptor =
+ getDescriptor().getMessageTypes().get(0);
+ internal_static_google_cloud_bigquery_storage_v1_AvroSchema_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_bigquery_storage_v1_AvroSchema_descriptor,
+ new java.lang.String[] {
+ "Schema",
+ });
+ internal_static_google_cloud_bigquery_storage_v1_AvroRows_descriptor =
+ getDescriptor().getMessageTypes().get(1);
+ internal_static_google_cloud_bigquery_storage_v1_AvroRows_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_bigquery_storage_v1_AvroRows_descriptor,
+ new java.lang.String[] {
+ "SerializedBinaryRows", "RowCount",
+ });
+ }
+
+ // @@protoc_insertion_point(outer_class_scope)
+}
diff --git a/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/AvroRows.java b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/AvroRows.java
new file mode 100644
index 0000000000..e7654adaee
--- /dev/null
+++ b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/AvroRows.java
@@ -0,0 +1,636 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
+ *
+ * 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.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/bigquery/storage/v1/avro.proto
+
+package com.google.cloud.bigquery.storage.v1;
+
+/**
+ *
+ *
+ * + * Avro rows. + *+ * + * Protobuf type {@code google.cloud.bigquery.storage.v1.AvroRows} + */ +public final class AvroRows extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.bigquery.storage.v1.AvroRows) + AvroRowsOrBuilder { + private static final long serialVersionUID = 0L; + // Use AvroRows.newBuilder() to construct. + private AvroRows(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private AvroRows() { + serializedBinaryRows_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AvroRows(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AvroRows( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + serializedBinaryRows_ = input.readBytes(); + break; + } + case 16: + { + rowCount_ = input.readInt64(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.bigquery.storage.v1.AvroProto + .internal_static_google_cloud_bigquery_storage_v1_AvroRows_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.bigquery.storage.v1.AvroProto + .internal_static_google_cloud_bigquery_storage_v1_AvroRows_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.bigquery.storage.v1.AvroRows.class, + com.google.cloud.bigquery.storage.v1.AvroRows.Builder.class); + } + + public static final int SERIALIZED_BINARY_ROWS_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString serializedBinaryRows_; + /** + * + * + *
+ * Binary serialized rows in a block. + *+ * + *
bytes serialized_binary_rows = 1;
+ *
+ * @return The serializedBinaryRows.
+ */
+ public com.google.protobuf.ByteString getSerializedBinaryRows() {
+ return serializedBinaryRows_;
+ }
+
+ public static final int ROW_COUNT_FIELD_NUMBER = 2;
+ private long rowCount_;
+ /**
+ *
+ *
+ * + * The count of rows in the returning block. + *+ * + *
int64 row_count = 2;
+ *
+ * @return The rowCount.
+ */
+ public long getRowCount() {
+ return rowCount_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!serializedBinaryRows_.isEmpty()) {
+ output.writeBytes(1, serializedBinaryRows_);
+ }
+ if (rowCount_ != 0L) {
+ output.writeInt64(2, rowCount_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!serializedBinaryRows_.isEmpty()) {
+ size += com.google.protobuf.CodedOutputStream.computeBytesSize(1, serializedBinaryRows_);
+ }
+ if (rowCount_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, rowCount_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.bigquery.storage.v1.AvroRows)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.bigquery.storage.v1.AvroRows other =
+ (com.google.cloud.bigquery.storage.v1.AvroRows) obj;
+
+ if (!getSerializedBinaryRows().equals(other.getSerializedBinaryRows())) return false;
+ if (getRowCount() != other.getRowCount()) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + SERIALIZED_BINARY_ROWS_FIELD_NUMBER;
+ hash = (53 * hash) + getSerializedBinaryRows().hashCode();
+ hash = (37 * hash) + ROW_COUNT_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getRowCount());
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.AvroRows parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.AvroRows parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.AvroRows parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.AvroRows parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.AvroRows parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.AvroRows parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.AvroRows parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.AvroRows parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.AvroRows parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.AvroRows parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.AvroRows parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.AvroRows parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(com.google.cloud.bigquery.storage.v1.AvroRows prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * Avro rows. + *+ * + * Protobuf type {@code google.cloud.bigquery.storage.v1.AvroRows} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Binary serialized rows in a block. + *+ * + *
bytes serialized_binary_rows = 1;
+ *
+ * @return The serializedBinaryRows.
+ */
+ public com.google.protobuf.ByteString getSerializedBinaryRows() {
+ return serializedBinaryRows_;
+ }
+ /**
+ *
+ *
+ * + * Binary serialized rows in a block. + *+ * + *
bytes serialized_binary_rows = 1;
+ *
+ * @param value The serializedBinaryRows to set.
+ * @return This builder for chaining.
+ */
+ public Builder setSerializedBinaryRows(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ serializedBinaryRows_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Binary serialized rows in a block. + *+ * + *
bytes serialized_binary_rows = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearSerializedBinaryRows() {
+
+ serializedBinaryRows_ = getDefaultInstance().getSerializedBinaryRows();
+ onChanged();
+ return this;
+ }
+
+ private long rowCount_;
+ /**
+ *
+ *
+ * + * The count of rows in the returning block. + *+ * + *
int64 row_count = 2;
+ *
+ * @return The rowCount.
+ */
+ public long getRowCount() {
+ return rowCount_;
+ }
+ /**
+ *
+ *
+ * + * The count of rows in the returning block. + *+ * + *
int64 row_count = 2;
+ *
+ * @param value The rowCount to set.
+ * @return This builder for chaining.
+ */
+ public Builder setRowCount(long value) {
+
+ rowCount_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The count of rows in the returning block. + *+ * + *
int64 row_count = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearRowCount() {
+
+ rowCount_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.bigquery.storage.v1.AvroRows)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.bigquery.storage.v1.AvroRows)
+ private static final com.google.cloud.bigquery.storage.v1.AvroRows DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.bigquery.storage.v1.AvroRows();
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.AvroRows getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Binary serialized rows in a block. + *+ * + *
bytes serialized_binary_rows = 1;
+ *
+ * @return The serializedBinaryRows.
+ */
+ com.google.protobuf.ByteString getSerializedBinaryRows();
+
+ /**
+ *
+ *
+ * + * The count of rows in the returning block. + *+ * + *
int64 row_count = 2;
+ *
+ * @return The rowCount.
+ */
+ long getRowCount();
+}
diff --git a/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/AvroSchema.java b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/AvroSchema.java
new file mode 100644
index 0000000000..f6785523a5
--- /dev/null
+++ b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/AvroSchema.java
@@ -0,0 +1,640 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
+ *
+ * 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.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/bigquery/storage/v1/avro.proto
+
+package com.google.cloud.bigquery.storage.v1;
+
+/**
+ *
+ *
+ * + * Avro schema. + *+ * + * Protobuf type {@code google.cloud.bigquery.storage.v1.AvroSchema} + */ +public final class AvroSchema extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.bigquery.storage.v1.AvroSchema) + AvroSchemaOrBuilder { + private static final long serialVersionUID = 0L; + // Use AvroSchema.newBuilder() to construct. + private AvroSchema(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private AvroSchema() { + schema_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AvroSchema(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AvroSchema( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + schema_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.bigquery.storage.v1.AvroProto + .internal_static_google_cloud_bigquery_storage_v1_AvroSchema_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.bigquery.storage.v1.AvroProto + .internal_static_google_cloud_bigquery_storage_v1_AvroSchema_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.bigquery.storage.v1.AvroSchema.class, + com.google.cloud.bigquery.storage.v1.AvroSchema.Builder.class); + } + + public static final int SCHEMA_FIELD_NUMBER = 1; + private volatile java.lang.Object schema_; + /** + * + * + *
+ * Json serialized schema, as described at + * https://avro.apache.org/docs/1.8.1/spec.html. + *+ * + *
string schema = 1;
+ *
+ * @return The schema.
+ */
+ public java.lang.String getSchema() {
+ java.lang.Object ref = schema_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ schema_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Json serialized schema, as described at + * https://avro.apache.org/docs/1.8.1/spec.html. + *+ * + *
string schema = 1;
+ *
+ * @return The bytes for schema.
+ */
+ public com.google.protobuf.ByteString getSchemaBytes() {
+ java.lang.Object ref = schema_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ schema_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!getSchemaBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, schema_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getSchemaBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, schema_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.bigquery.storage.v1.AvroSchema)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.bigquery.storage.v1.AvroSchema other =
+ (com.google.cloud.bigquery.storage.v1.AvroSchema) obj;
+
+ if (!getSchema().equals(other.getSchema())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + SCHEMA_FIELD_NUMBER;
+ hash = (53 * hash) + getSchema().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.AvroSchema parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.AvroSchema parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.AvroSchema parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.AvroSchema parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.AvroSchema parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.AvroSchema parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.AvroSchema parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.AvroSchema parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.AvroSchema parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.AvroSchema parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.AvroSchema parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.AvroSchema parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(com.google.cloud.bigquery.storage.v1.AvroSchema prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * Avro schema. + *+ * + * Protobuf type {@code google.cloud.bigquery.storage.v1.AvroSchema} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Json serialized schema, as described at + * https://avro.apache.org/docs/1.8.1/spec.html. + *+ * + *
string schema = 1;
+ *
+ * @return The schema.
+ */
+ public java.lang.String getSchema() {
+ java.lang.Object ref = schema_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ schema_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Json serialized schema, as described at + * https://avro.apache.org/docs/1.8.1/spec.html. + *+ * + *
string schema = 1;
+ *
+ * @return The bytes for schema.
+ */
+ public com.google.protobuf.ByteString getSchemaBytes() {
+ java.lang.Object ref = schema_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ schema_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Json serialized schema, as described at + * https://avro.apache.org/docs/1.8.1/spec.html. + *+ * + *
string schema = 1;
+ *
+ * @param value The schema to set.
+ * @return This builder for chaining.
+ */
+ public Builder setSchema(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ schema_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Json serialized schema, as described at + * https://avro.apache.org/docs/1.8.1/spec.html. + *+ * + *
string schema = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearSchema() {
+
+ schema_ = getDefaultInstance().getSchema();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Json serialized schema, as described at + * https://avro.apache.org/docs/1.8.1/spec.html. + *+ * + *
string schema = 1;
+ *
+ * @param value The bytes for schema to set.
+ * @return This builder for chaining.
+ */
+ public Builder setSchemaBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ schema_ = value;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.bigquery.storage.v1.AvroSchema)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.bigquery.storage.v1.AvroSchema)
+ private static final com.google.cloud.bigquery.storage.v1.AvroSchema DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.bigquery.storage.v1.AvroSchema();
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.AvroSchema getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Json serialized schema, as described at + * https://avro.apache.org/docs/1.8.1/spec.html. + *+ * + *
string schema = 1;
+ *
+ * @return The schema.
+ */
+ java.lang.String getSchema();
+ /**
+ *
+ *
+ * + * Json serialized schema, as described at + * https://avro.apache.org/docs/1.8.1/spec.html. + *+ * + *
string schema = 1;
+ *
+ * @return The bytes for schema.
+ */
+ com.google.protobuf.ByteString getSchemaBytes();
+}
diff --git a/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/CreateReadSessionRequest.java b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/CreateReadSessionRequest.java
new file mode 100644
index 0000000000..4436a0e9c4
--- /dev/null
+++ b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/CreateReadSessionRequest.java
@@ -0,0 +1,1071 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
+ *
+ * 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.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/bigquery/storage/v1/storage.proto
+
+package com.google.cloud.bigquery.storage.v1;
+
+/**
+ *
+ *
+ * + * Request message for `CreateReadSession`. + *+ * + * Protobuf type {@code google.cloud.bigquery.storage.v1.CreateReadSessionRequest} + */ +public final class CreateReadSessionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.bigquery.storage.v1.CreateReadSessionRequest) + CreateReadSessionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateReadSessionRequest.newBuilder() to construct. + private CreateReadSessionRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private CreateReadSessionRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateReadSessionRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateReadSessionRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + com.google.cloud.bigquery.storage.v1.ReadSession.Builder subBuilder = null; + if (readSession_ != null) { + subBuilder = readSession_.toBuilder(); + } + readSession_ = + input.readMessage( + com.google.cloud.bigquery.storage.v1.ReadSession.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(readSession_); + readSession_ = subBuilder.buildPartial(); + } + + break; + } + case 24: + { + maxStreamCount_ = input.readInt32(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.bigquery.storage.v1.StorageProto + .internal_static_google_cloud_bigquery_storage_v1_CreateReadSessionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.bigquery.storage.v1.StorageProto + .internal_static_google_cloud_bigquery_storage_v1_CreateReadSessionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.bigquery.storage.v1.CreateReadSessionRequest.class, + com.google.cloud.bigquery.storage.v1.CreateReadSessionRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+ * Required. The request project that owns the session, in the form of + * `projects/{project_id}`. + *+ * + *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The parent.
+ */
+ public java.lang.String getParent() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ parent_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The request project that owns the session, in the form of + * `projects/{project_id}`. + *+ * + *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The bytes for parent.
+ */
+ public com.google.protobuf.ByteString getParentBytes() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ parent_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int READ_SESSION_FIELD_NUMBER = 2;
+ private com.google.cloud.bigquery.storage.v1.ReadSession readSession_;
+ /**
+ *
+ *
+ * + * Required. Session to be created. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ReadSession read_session = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return Whether the readSession field is set.
+ */
+ public boolean hasReadSession() {
+ return readSession_ != null;
+ }
+ /**
+ *
+ *
+ * + * Required. Session to be created. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ReadSession read_session = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return The readSession.
+ */
+ public com.google.cloud.bigquery.storage.v1.ReadSession getReadSession() {
+ return readSession_ == null
+ ? com.google.cloud.bigquery.storage.v1.ReadSession.getDefaultInstance()
+ : readSession_;
+ }
+ /**
+ *
+ *
+ * + * Required. Session to be created. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ReadSession read_session = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public com.google.cloud.bigquery.storage.v1.ReadSessionOrBuilder getReadSessionOrBuilder() {
+ return getReadSession();
+ }
+
+ public static final int MAX_STREAM_COUNT_FIELD_NUMBER = 3;
+ private int maxStreamCount_;
+ /**
+ *
+ *
+ * + * Max initial number of streams. If unset or zero, the server will + * provide a value of streams so as to produce reasonable throughput. Must be + * non-negative. The number of streams may be lower than the requested number, + * depending on the amount parallelism that is reasonable for the table. Error + * will be returned if the max count is greater than the current system + * max limit of 1,000. + * Streams must be read starting from offset 0. + *+ * + *
int32 max_stream_count = 3;
+ *
+ * @return The maxStreamCount.
+ */
+ public int getMaxStreamCount() {
+ return maxStreamCount_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!getParentBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_);
+ }
+ if (readSession_ != null) {
+ output.writeMessage(2, getReadSession());
+ }
+ if (maxStreamCount_ != 0) {
+ output.writeInt32(3, maxStreamCount_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getParentBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_);
+ }
+ if (readSession_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getReadSession());
+ }
+ if (maxStreamCount_ != 0) {
+ size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, maxStreamCount_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.bigquery.storage.v1.CreateReadSessionRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.bigquery.storage.v1.CreateReadSessionRequest other =
+ (com.google.cloud.bigquery.storage.v1.CreateReadSessionRequest) obj;
+
+ if (!getParent().equals(other.getParent())) return false;
+ if (hasReadSession() != other.hasReadSession()) return false;
+ if (hasReadSession()) {
+ if (!getReadSession().equals(other.getReadSession())) return false;
+ }
+ if (getMaxStreamCount() != other.getMaxStreamCount()) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + PARENT_FIELD_NUMBER;
+ hash = (53 * hash) + getParent().hashCode();
+ if (hasReadSession()) {
+ hash = (37 * hash) + READ_SESSION_FIELD_NUMBER;
+ hash = (53 * hash) + getReadSession().hashCode();
+ }
+ hash = (37 * hash) + MAX_STREAM_COUNT_FIELD_NUMBER;
+ hash = (53 * hash) + getMaxStreamCount();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.CreateReadSessionRequest parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.CreateReadSessionRequest parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.CreateReadSessionRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.CreateReadSessionRequest parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.CreateReadSessionRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.CreateReadSessionRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.CreateReadSessionRequest parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.CreateReadSessionRequest parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.CreateReadSessionRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.CreateReadSessionRequest parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.CreateReadSessionRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.CreateReadSessionRequest parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.cloud.bigquery.storage.v1.CreateReadSessionRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * Request message for `CreateReadSession`. + *+ * + * Protobuf type {@code google.cloud.bigquery.storage.v1.CreateReadSessionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Required. The request project that owns the session, in the form of + * `projects/{project_id}`. + *+ * + *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The parent.
+ */
+ public java.lang.String getParent() {
+ java.lang.Object ref = parent_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ parent_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The request project that owns the session, in the form of + * `projects/{project_id}`. + *+ * + *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The bytes for parent.
+ */
+ public com.google.protobuf.ByteString getParentBytes() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ parent_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The request project that owns the session, in the form of + * `projects/{project_id}`. + *+ * + *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param value The parent to set.
+ * @return This builder for chaining.
+ */
+ public Builder setParent(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ parent_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The request project that owns the session, in the form of + * `projects/{project_id}`. + *+ * + *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearParent() {
+
+ parent_ = getDefaultInstance().getParent();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The request project that owns the session, in the form of + * `projects/{project_id}`. + *+ * + *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param value The bytes for parent to set.
+ * @return This builder for chaining.
+ */
+ public Builder setParentBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ parent_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.cloud.bigquery.storage.v1.ReadSession readSession_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1.ReadSession,
+ com.google.cloud.bigquery.storage.v1.ReadSession.Builder,
+ com.google.cloud.bigquery.storage.v1.ReadSessionOrBuilder>
+ readSessionBuilder_;
+ /**
+ *
+ *
+ * + * Required. Session to be created. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ReadSession read_session = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return Whether the readSession field is set.
+ */
+ public boolean hasReadSession() {
+ return readSessionBuilder_ != null || readSession_ != null;
+ }
+ /**
+ *
+ *
+ * + * Required. Session to be created. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ReadSession read_session = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return The readSession.
+ */
+ public com.google.cloud.bigquery.storage.v1.ReadSession getReadSession() {
+ if (readSessionBuilder_ == null) {
+ return readSession_ == null
+ ? com.google.cloud.bigquery.storage.v1.ReadSession.getDefaultInstance()
+ : readSession_;
+ } else {
+ return readSessionBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Session to be created. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ReadSession read_session = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder setReadSession(com.google.cloud.bigquery.storage.v1.ReadSession value) {
+ if (readSessionBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ readSession_ = value;
+ onChanged();
+ } else {
+ readSessionBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Session to be created. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ReadSession read_session = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder setReadSession(
+ com.google.cloud.bigquery.storage.v1.ReadSession.Builder builderForValue) {
+ if (readSessionBuilder_ == null) {
+ readSession_ = builderForValue.build();
+ onChanged();
+ } else {
+ readSessionBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Session to be created. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ReadSession read_session = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder mergeReadSession(com.google.cloud.bigquery.storage.v1.ReadSession value) {
+ if (readSessionBuilder_ == null) {
+ if (readSession_ != null) {
+ readSession_ =
+ com.google.cloud.bigquery.storage.v1.ReadSession.newBuilder(readSession_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ readSession_ = value;
+ }
+ onChanged();
+ } else {
+ readSessionBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Session to be created. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ReadSession read_session = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder clearReadSession() {
+ if (readSessionBuilder_ == null) {
+ readSession_ = null;
+ onChanged();
+ } else {
+ readSession_ = null;
+ readSessionBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Session to be created. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ReadSession read_session = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public com.google.cloud.bigquery.storage.v1.ReadSession.Builder getReadSessionBuilder() {
+
+ onChanged();
+ return getReadSessionFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Required. Session to be created. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ReadSession read_session = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public com.google.cloud.bigquery.storage.v1.ReadSessionOrBuilder getReadSessionOrBuilder() {
+ if (readSessionBuilder_ != null) {
+ return readSessionBuilder_.getMessageOrBuilder();
+ } else {
+ return readSession_ == null
+ ? com.google.cloud.bigquery.storage.v1.ReadSession.getDefaultInstance()
+ : readSession_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Session to be created. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ReadSession read_session = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1.ReadSession,
+ com.google.cloud.bigquery.storage.v1.ReadSession.Builder,
+ com.google.cloud.bigquery.storage.v1.ReadSessionOrBuilder>
+ getReadSessionFieldBuilder() {
+ if (readSessionBuilder_ == null) {
+ readSessionBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1.ReadSession,
+ com.google.cloud.bigquery.storage.v1.ReadSession.Builder,
+ com.google.cloud.bigquery.storage.v1.ReadSessionOrBuilder>(
+ getReadSession(), getParentForChildren(), isClean());
+ readSession_ = null;
+ }
+ return readSessionBuilder_;
+ }
+
+ private int maxStreamCount_;
+ /**
+ *
+ *
+ * + * Max initial number of streams. If unset or zero, the server will + * provide a value of streams so as to produce reasonable throughput. Must be + * non-negative. The number of streams may be lower than the requested number, + * depending on the amount parallelism that is reasonable for the table. Error + * will be returned if the max count is greater than the current system + * max limit of 1,000. + * Streams must be read starting from offset 0. + *+ * + *
int32 max_stream_count = 3;
+ *
+ * @return The maxStreamCount.
+ */
+ public int getMaxStreamCount() {
+ return maxStreamCount_;
+ }
+ /**
+ *
+ *
+ * + * Max initial number of streams. If unset or zero, the server will + * provide a value of streams so as to produce reasonable throughput. Must be + * non-negative. The number of streams may be lower than the requested number, + * depending on the amount parallelism that is reasonable for the table. Error + * will be returned if the max count is greater than the current system + * max limit of 1,000. + * Streams must be read starting from offset 0. + *+ * + *
int32 max_stream_count = 3;
+ *
+ * @param value The maxStreamCount to set.
+ * @return This builder for chaining.
+ */
+ public Builder setMaxStreamCount(int value) {
+
+ maxStreamCount_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Max initial number of streams. If unset or zero, the server will + * provide a value of streams so as to produce reasonable throughput. Must be + * non-negative. The number of streams may be lower than the requested number, + * depending on the amount parallelism that is reasonable for the table. Error + * will be returned if the max count is greater than the current system + * max limit of 1,000. + * Streams must be read starting from offset 0. + *+ * + *
int32 max_stream_count = 3;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearMaxStreamCount() {
+
+ maxStreamCount_ = 0;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.bigquery.storage.v1.CreateReadSessionRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.bigquery.storage.v1.CreateReadSessionRequest)
+ private static final com.google.cloud.bigquery.storage.v1.CreateReadSessionRequest
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.bigquery.storage.v1.CreateReadSessionRequest();
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.CreateReadSessionRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Required. The request project that owns the session, in the form of + * `projects/{project_id}`. + *+ * + *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The parent.
+ */
+ java.lang.String getParent();
+ /**
+ *
+ *
+ * + * Required. The request project that owns the session, in the form of + * `projects/{project_id}`. + *+ * + *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The bytes for parent.
+ */
+ com.google.protobuf.ByteString getParentBytes();
+
+ /**
+ *
+ *
+ * + * Required. Session to be created. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ReadSession read_session = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return Whether the readSession field is set.
+ */
+ boolean hasReadSession();
+ /**
+ *
+ *
+ * + * Required. Session to be created. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ReadSession read_session = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return The readSession.
+ */
+ com.google.cloud.bigquery.storage.v1.ReadSession getReadSession();
+ /**
+ *
+ *
+ * + * Required. Session to be created. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ReadSession read_session = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ com.google.cloud.bigquery.storage.v1.ReadSessionOrBuilder getReadSessionOrBuilder();
+
+ /**
+ *
+ *
+ * + * Max initial number of streams. If unset or zero, the server will + * provide a value of streams so as to produce reasonable throughput. Must be + * non-negative. The number of streams may be lower than the requested number, + * depending on the amount parallelism that is reasonable for the table. Error + * will be returned if the max count is greater than the current system + * max limit of 1,000. + * Streams must be read starting from offset 0. + *+ * + *
int32 max_stream_count = 3;
+ *
+ * @return The maxStreamCount.
+ */
+ int getMaxStreamCount();
+}
diff --git a/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/DataFormat.java b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/DataFormat.java
new file mode 100644
index 0000000000..ce53fa9157
--- /dev/null
+++ b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/DataFormat.java
@@ -0,0 +1,160 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
+ *
+ * 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.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/bigquery/storage/v1/stream.proto
+
+package com.google.cloud.bigquery.storage.v1;
+
+/**
+ *
+ *
+ * + * Data format for input or output data. + *+ * + * Protobuf enum {@code google.cloud.bigquery.storage.v1.DataFormat} + */ +public enum DataFormat implements com.google.protobuf.ProtocolMessageEnum { + /**
DATA_FORMAT_UNSPECIFIED = 0;
*/
+ DATA_FORMAT_UNSPECIFIED(0),
+ /**
+ *
+ *
+ * + * Avro is a standard open source row based file format. + * See https://avro.apache.org/ for more details. + *+ * + *
AVRO = 1;
+ */
+ AVRO(1),
+ /**
+ *
+ *
+ * + * Arrow is a standard open source column-based message format. + * See https://arrow.apache.org/ for more details. + *+ * + *
ARROW = 2;
+ */
+ ARROW(2),
+ UNRECOGNIZED(-1),
+ ;
+
+ /** DATA_FORMAT_UNSPECIFIED = 0;
*/
+ public static final int DATA_FORMAT_UNSPECIFIED_VALUE = 0;
+ /**
+ *
+ *
+ * + * Avro is a standard open source row based file format. + * See https://avro.apache.org/ for more details. + *+ * + *
AVRO = 1;
+ */
+ public static final int AVRO_VALUE = 1;
+ /**
+ *
+ *
+ * + * Arrow is a standard open source column-based message format. + * See https://arrow.apache.org/ for more details. + *+ * + *
ARROW = 2;
+ */
+ public static final int ARROW_VALUE = 2;
+
+ public final int getNumber() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalArgumentException(
+ "Can't get the number of an unknown enum value.");
+ }
+ return value;
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static DataFormat valueOf(int value) {
+ return forNumber(value);
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ */
+ public static DataFormat forNumber(int value) {
+ switch (value) {
+ case 0:
+ return DATA_FORMAT_UNSPECIFIED;
+ case 1:
+ return AVRO;
+ case 2:
+ return ARROW;
+ default:
+ return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap+ * Request message for `ReadRows`. + *+ * + * Protobuf type {@code google.cloud.bigquery.storage.v1.ReadRowsRequest} + */ +public final class ReadRowsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.bigquery.storage.v1.ReadRowsRequest) + ReadRowsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ReadRowsRequest.newBuilder() to construct. + private ReadRowsRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private ReadRowsRequest() { + readStream_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ReadRowsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ReadRowsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + readStream_ = s; + break; + } + case 16: + { + offset_ = input.readInt64(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.bigquery.storage.v1.StorageProto + .internal_static_google_cloud_bigquery_storage_v1_ReadRowsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.bigquery.storage.v1.StorageProto + .internal_static_google_cloud_bigquery_storage_v1_ReadRowsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.bigquery.storage.v1.ReadRowsRequest.class, + com.google.cloud.bigquery.storage.v1.ReadRowsRequest.Builder.class); + } + + public static final int READ_STREAM_FIELD_NUMBER = 1; + private volatile java.lang.Object readStream_; + /** + * + * + *
+ * Required. Stream to read rows from. + *+ * + *
+ * string read_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The readStream.
+ */
+ public java.lang.String getReadStream() {
+ java.lang.Object ref = readStream_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ readStream_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Stream to read rows from. + *+ * + *
+ * string read_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The bytes for readStream.
+ */
+ public com.google.protobuf.ByteString getReadStreamBytes() {
+ java.lang.Object ref = readStream_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ readStream_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int OFFSET_FIELD_NUMBER = 2;
+ private long offset_;
+ /**
+ *
+ *
+ * + * The offset requested must be less than the last row read from Read. + * Requesting a larger offset is undefined. If not specified, start reading + * from offset zero. + *+ * + *
int64 offset = 2;
+ *
+ * @return The offset.
+ */
+ public long getOffset() {
+ return offset_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!getReadStreamBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, readStream_);
+ }
+ if (offset_ != 0L) {
+ output.writeInt64(2, offset_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getReadStreamBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, readStream_);
+ }
+ if (offset_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, offset_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.bigquery.storage.v1.ReadRowsRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.bigquery.storage.v1.ReadRowsRequest other =
+ (com.google.cloud.bigquery.storage.v1.ReadRowsRequest) obj;
+
+ if (!getReadStream().equals(other.getReadStream())) return false;
+ if (getOffset() != other.getOffset()) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + READ_STREAM_FIELD_NUMBER;
+ hash = (53 * hash) + getReadStream().hashCode();
+ hash = (37 * hash) + OFFSET_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getOffset());
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadRowsRequest parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadRowsRequest parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadRowsRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadRowsRequest parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadRowsRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadRowsRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadRowsRequest parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadRowsRequest parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadRowsRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadRowsRequest parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadRowsRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadRowsRequest parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(com.google.cloud.bigquery.storage.v1.ReadRowsRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * Request message for `ReadRows`. + *+ * + * Protobuf type {@code google.cloud.bigquery.storage.v1.ReadRowsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Required. Stream to read rows from. + *+ * + *
+ * string read_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The readStream.
+ */
+ public java.lang.String getReadStream() {
+ java.lang.Object ref = readStream_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ readStream_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Stream to read rows from. + *+ * + *
+ * string read_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The bytes for readStream.
+ */
+ public com.google.protobuf.ByteString getReadStreamBytes() {
+ java.lang.Object ref = readStream_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ readStream_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Stream to read rows from. + *+ * + *
+ * string read_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param value The readStream to set.
+ * @return This builder for chaining.
+ */
+ public Builder setReadStream(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ readStream_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Stream to read rows from. + *+ * + *
+ * string read_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearReadStream() {
+
+ readStream_ = getDefaultInstance().getReadStream();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Stream to read rows from. + *+ * + *
+ * string read_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param value The bytes for readStream to set.
+ * @return This builder for chaining.
+ */
+ public Builder setReadStreamBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ readStream_ = value;
+ onChanged();
+ return this;
+ }
+
+ private long offset_;
+ /**
+ *
+ *
+ * + * The offset requested must be less than the last row read from Read. + * Requesting a larger offset is undefined. If not specified, start reading + * from offset zero. + *+ * + *
int64 offset = 2;
+ *
+ * @return The offset.
+ */
+ public long getOffset() {
+ return offset_;
+ }
+ /**
+ *
+ *
+ * + * The offset requested must be less than the last row read from Read. + * Requesting a larger offset is undefined. If not specified, start reading + * from offset zero. + *+ * + *
int64 offset = 2;
+ *
+ * @param value The offset to set.
+ * @return This builder for chaining.
+ */
+ public Builder setOffset(long value) {
+
+ offset_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The offset requested must be less than the last row read from Read. + * Requesting a larger offset is undefined. If not specified, start reading + * from offset zero. + *+ * + *
int64 offset = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearOffset() {
+
+ offset_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.bigquery.storage.v1.ReadRowsRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.bigquery.storage.v1.ReadRowsRequest)
+ private static final com.google.cloud.bigquery.storage.v1.ReadRowsRequest DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.bigquery.storage.v1.ReadRowsRequest();
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadRowsRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Required. Stream to read rows from. + *+ * + *
+ * string read_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The readStream.
+ */
+ java.lang.String getReadStream();
+ /**
+ *
+ *
+ * + * Required. Stream to read rows from. + *+ * + *
+ * string read_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The bytes for readStream.
+ */
+ com.google.protobuf.ByteString getReadStreamBytes();
+
+ /**
+ *
+ *
+ * + * The offset requested must be less than the last row read from Read. + * Requesting a larger offset is undefined. If not specified, start reading + * from offset zero. + *+ * + *
int64 offset = 2;
+ *
+ * @return The offset.
+ */
+ long getOffset();
+}
diff --git a/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/ReadRowsResponse.java b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/ReadRowsResponse.java
new file mode 100644
index 0000000000..48b5347a06
--- /dev/null
+++ b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/ReadRowsResponse.java
@@ -0,0 +1,1788 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
+ *
+ * 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.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/bigquery/storage/v1/storage.proto
+
+package com.google.cloud.bigquery.storage.v1;
+
+/**
+ *
+ *
+ * + * Response from calling `ReadRows` may include row data, progress and + * throttling information. + *+ * + * Protobuf type {@code google.cloud.bigquery.storage.v1.ReadRowsResponse} + */ +public final class ReadRowsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.bigquery.storage.v1.ReadRowsResponse) + ReadRowsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ReadRowsResponse.newBuilder() to construct. + private ReadRowsResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private ReadRowsResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ReadRowsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ReadRowsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + com.google.cloud.bigquery.storage.v1.StreamStats.Builder subBuilder = null; + if (stats_ != null) { + subBuilder = stats_.toBuilder(); + } + stats_ = + input.readMessage( + com.google.cloud.bigquery.storage.v1.StreamStats.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(stats_); + stats_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + com.google.cloud.bigquery.storage.v1.AvroRows.Builder subBuilder = null; + if (rowsCase_ == 3) { + subBuilder = ((com.google.cloud.bigquery.storage.v1.AvroRows) rows_).toBuilder(); + } + rows_ = + input.readMessage( + com.google.cloud.bigquery.storage.v1.AvroRows.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.bigquery.storage.v1.AvroRows) rows_); + rows_ = subBuilder.buildPartial(); + } + rowsCase_ = 3; + break; + } + case 34: + { + com.google.cloud.bigquery.storage.v1.ArrowRecordBatch.Builder subBuilder = null; + if (rowsCase_ == 4) { + subBuilder = + ((com.google.cloud.bigquery.storage.v1.ArrowRecordBatch) rows_).toBuilder(); + } + rows_ = + input.readMessage( + com.google.cloud.bigquery.storage.v1.ArrowRecordBatch.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.bigquery.storage.v1.ArrowRecordBatch) rows_); + rows_ = subBuilder.buildPartial(); + } + rowsCase_ = 4; + break; + } + case 42: + { + com.google.cloud.bigquery.storage.v1.ThrottleState.Builder subBuilder = null; + if (throttleState_ != null) { + subBuilder = throttleState_.toBuilder(); + } + throttleState_ = + input.readMessage( + com.google.cloud.bigquery.storage.v1.ThrottleState.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(throttleState_); + throttleState_ = subBuilder.buildPartial(); + } + + break; + } + case 48: + { + rowCount_ = input.readInt64(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.bigquery.storage.v1.StorageProto + .internal_static_google_cloud_bigquery_storage_v1_ReadRowsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.bigquery.storage.v1.StorageProto + .internal_static_google_cloud_bigquery_storage_v1_ReadRowsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.bigquery.storage.v1.ReadRowsResponse.class, + com.google.cloud.bigquery.storage.v1.ReadRowsResponse.Builder.class); + } + + private int rowsCase_ = 0; + private java.lang.Object rows_; + + public enum RowsCase implements com.google.protobuf.Internal.EnumLite { + AVRO_ROWS(3), + ARROW_RECORD_BATCH(4), + ROWS_NOT_SET(0); + private final int value; + + private RowsCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RowsCase valueOf(int value) { + return forNumber(value); + } + + public static RowsCase forNumber(int value) { + switch (value) { + case 3: + return AVRO_ROWS; + case 4: + return ARROW_RECORD_BATCH; + case 0: + return ROWS_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public RowsCase getRowsCase() { + return RowsCase.forNumber(rowsCase_); + } + + public static final int AVRO_ROWS_FIELD_NUMBER = 3; + /** + * + * + *
+ * Serialized row data in AVRO format. + *+ * + *
.google.cloud.bigquery.storage.v1.AvroRows avro_rows = 3;
+ *
+ * @return Whether the avroRows field is set.
+ */
+ public boolean hasAvroRows() {
+ return rowsCase_ == 3;
+ }
+ /**
+ *
+ *
+ * + * Serialized row data in AVRO format. + *+ * + *
.google.cloud.bigquery.storage.v1.AvroRows avro_rows = 3;
+ *
+ * @return The avroRows.
+ */
+ public com.google.cloud.bigquery.storage.v1.AvroRows getAvroRows() {
+ if (rowsCase_ == 3) {
+ return (com.google.cloud.bigquery.storage.v1.AvroRows) rows_;
+ }
+ return com.google.cloud.bigquery.storage.v1.AvroRows.getDefaultInstance();
+ }
+ /**
+ *
+ *
+ * + * Serialized row data in AVRO format. + *+ * + *
.google.cloud.bigquery.storage.v1.AvroRows avro_rows = 3;
+ */
+ public com.google.cloud.bigquery.storage.v1.AvroRowsOrBuilder getAvroRowsOrBuilder() {
+ if (rowsCase_ == 3) {
+ return (com.google.cloud.bigquery.storage.v1.AvroRows) rows_;
+ }
+ return com.google.cloud.bigquery.storage.v1.AvroRows.getDefaultInstance();
+ }
+
+ public static final int ARROW_RECORD_BATCH_FIELD_NUMBER = 4;
+ /**
+ *
+ *
+ * + * Serialized row data in Arrow RecordBatch format. + *+ * + *
.google.cloud.bigquery.storage.v1.ArrowRecordBatch arrow_record_batch = 4;
+ *
+ * @return Whether the arrowRecordBatch field is set.
+ */
+ public boolean hasArrowRecordBatch() {
+ return rowsCase_ == 4;
+ }
+ /**
+ *
+ *
+ * + * Serialized row data in Arrow RecordBatch format. + *+ * + *
.google.cloud.bigquery.storage.v1.ArrowRecordBatch arrow_record_batch = 4;
+ *
+ * @return The arrowRecordBatch.
+ */
+ public com.google.cloud.bigquery.storage.v1.ArrowRecordBatch getArrowRecordBatch() {
+ if (rowsCase_ == 4) {
+ return (com.google.cloud.bigquery.storage.v1.ArrowRecordBatch) rows_;
+ }
+ return com.google.cloud.bigquery.storage.v1.ArrowRecordBatch.getDefaultInstance();
+ }
+ /**
+ *
+ *
+ * + * Serialized row data in Arrow RecordBatch format. + *+ * + *
.google.cloud.bigquery.storage.v1.ArrowRecordBatch arrow_record_batch = 4;
+ */
+ public com.google.cloud.bigquery.storage.v1.ArrowRecordBatchOrBuilder
+ getArrowRecordBatchOrBuilder() {
+ if (rowsCase_ == 4) {
+ return (com.google.cloud.bigquery.storage.v1.ArrowRecordBatch) rows_;
+ }
+ return com.google.cloud.bigquery.storage.v1.ArrowRecordBatch.getDefaultInstance();
+ }
+
+ public static final int ROW_COUNT_FIELD_NUMBER = 6;
+ private long rowCount_;
+ /**
+ *
+ *
+ * + * Number of serialized rows in the rows block. + *+ * + *
int64 row_count = 6;
+ *
+ * @return The rowCount.
+ */
+ public long getRowCount() {
+ return rowCount_;
+ }
+
+ public static final int STATS_FIELD_NUMBER = 2;
+ private com.google.cloud.bigquery.storage.v1.StreamStats stats_;
+ /**
+ *
+ *
+ * + * Statistics for the stream. + *+ * + *
.google.cloud.bigquery.storage.v1.StreamStats stats = 2;
+ *
+ * @return Whether the stats field is set.
+ */
+ public boolean hasStats() {
+ return stats_ != null;
+ }
+ /**
+ *
+ *
+ * + * Statistics for the stream. + *+ * + *
.google.cloud.bigquery.storage.v1.StreamStats stats = 2;
+ *
+ * @return The stats.
+ */
+ public com.google.cloud.bigquery.storage.v1.StreamStats getStats() {
+ return stats_ == null
+ ? com.google.cloud.bigquery.storage.v1.StreamStats.getDefaultInstance()
+ : stats_;
+ }
+ /**
+ *
+ *
+ * + * Statistics for the stream. + *+ * + *
.google.cloud.bigquery.storage.v1.StreamStats stats = 2;
+ */
+ public com.google.cloud.bigquery.storage.v1.StreamStatsOrBuilder getStatsOrBuilder() {
+ return getStats();
+ }
+
+ public static final int THROTTLE_STATE_FIELD_NUMBER = 5;
+ private com.google.cloud.bigquery.storage.v1.ThrottleState throttleState_;
+ /**
+ *
+ *
+ * + * Throttling state. If unset, the latest response still describes + * the current throttling status. + *+ * + *
.google.cloud.bigquery.storage.v1.ThrottleState throttle_state = 5;
+ *
+ * @return Whether the throttleState field is set.
+ */
+ public boolean hasThrottleState() {
+ return throttleState_ != null;
+ }
+ /**
+ *
+ *
+ * + * Throttling state. If unset, the latest response still describes + * the current throttling status. + *+ * + *
.google.cloud.bigquery.storage.v1.ThrottleState throttle_state = 5;
+ *
+ * @return The throttleState.
+ */
+ public com.google.cloud.bigquery.storage.v1.ThrottleState getThrottleState() {
+ return throttleState_ == null
+ ? com.google.cloud.bigquery.storage.v1.ThrottleState.getDefaultInstance()
+ : throttleState_;
+ }
+ /**
+ *
+ *
+ * + * Throttling state. If unset, the latest response still describes + * the current throttling status. + *+ * + *
.google.cloud.bigquery.storage.v1.ThrottleState throttle_state = 5;
+ */
+ public com.google.cloud.bigquery.storage.v1.ThrottleStateOrBuilder getThrottleStateOrBuilder() {
+ return getThrottleState();
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (stats_ != null) {
+ output.writeMessage(2, getStats());
+ }
+ if (rowsCase_ == 3) {
+ output.writeMessage(3, (com.google.cloud.bigquery.storage.v1.AvroRows) rows_);
+ }
+ if (rowsCase_ == 4) {
+ output.writeMessage(4, (com.google.cloud.bigquery.storage.v1.ArrowRecordBatch) rows_);
+ }
+ if (throttleState_ != null) {
+ output.writeMessage(5, getThrottleState());
+ }
+ if (rowCount_ != 0L) {
+ output.writeInt64(6, rowCount_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (stats_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStats());
+ }
+ if (rowsCase_ == 3) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 3, (com.google.cloud.bigquery.storage.v1.AvroRows) rows_);
+ }
+ if (rowsCase_ == 4) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 4, (com.google.cloud.bigquery.storage.v1.ArrowRecordBatch) rows_);
+ }
+ if (throttleState_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getThrottleState());
+ }
+ if (rowCount_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(6, rowCount_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.bigquery.storage.v1.ReadRowsResponse)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.bigquery.storage.v1.ReadRowsResponse other =
+ (com.google.cloud.bigquery.storage.v1.ReadRowsResponse) obj;
+
+ if (getRowCount() != other.getRowCount()) return false;
+ if (hasStats() != other.hasStats()) return false;
+ if (hasStats()) {
+ if (!getStats().equals(other.getStats())) return false;
+ }
+ if (hasThrottleState() != other.hasThrottleState()) return false;
+ if (hasThrottleState()) {
+ if (!getThrottleState().equals(other.getThrottleState())) return false;
+ }
+ if (!getRowsCase().equals(other.getRowsCase())) return false;
+ switch (rowsCase_) {
+ case 3:
+ if (!getAvroRows().equals(other.getAvroRows())) return false;
+ break;
+ case 4:
+ if (!getArrowRecordBatch().equals(other.getArrowRecordBatch())) return false;
+ break;
+ case 0:
+ default:
+ }
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + ROW_COUNT_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getRowCount());
+ if (hasStats()) {
+ hash = (37 * hash) + STATS_FIELD_NUMBER;
+ hash = (53 * hash) + getStats().hashCode();
+ }
+ if (hasThrottleState()) {
+ hash = (37 * hash) + THROTTLE_STATE_FIELD_NUMBER;
+ hash = (53 * hash) + getThrottleState().hashCode();
+ }
+ switch (rowsCase_) {
+ case 3:
+ hash = (37 * hash) + AVRO_ROWS_FIELD_NUMBER;
+ hash = (53 * hash) + getAvroRows().hashCode();
+ break;
+ case 4:
+ hash = (37 * hash) + ARROW_RECORD_BATCH_FIELD_NUMBER;
+ hash = (53 * hash) + getArrowRecordBatch().hashCode();
+ break;
+ case 0:
+ default:
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadRowsResponse parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadRowsResponse parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadRowsResponse parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadRowsResponse parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadRowsResponse parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadRowsResponse parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadRowsResponse parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadRowsResponse parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadRowsResponse parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadRowsResponse parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadRowsResponse parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadRowsResponse parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.cloud.bigquery.storage.v1.ReadRowsResponse prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * Response from calling `ReadRows` may include row data, progress and + * throttling information. + *+ * + * Protobuf type {@code google.cloud.bigquery.storage.v1.ReadRowsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Serialized row data in AVRO format. + *+ * + *
.google.cloud.bigquery.storage.v1.AvroRows avro_rows = 3;
+ *
+ * @return Whether the avroRows field is set.
+ */
+ public boolean hasAvroRows() {
+ return rowsCase_ == 3;
+ }
+ /**
+ *
+ *
+ * + * Serialized row data in AVRO format. + *+ * + *
.google.cloud.bigquery.storage.v1.AvroRows avro_rows = 3;
+ *
+ * @return The avroRows.
+ */
+ public com.google.cloud.bigquery.storage.v1.AvroRows getAvroRows() {
+ if (avroRowsBuilder_ == null) {
+ if (rowsCase_ == 3) {
+ return (com.google.cloud.bigquery.storage.v1.AvroRows) rows_;
+ }
+ return com.google.cloud.bigquery.storage.v1.AvroRows.getDefaultInstance();
+ } else {
+ if (rowsCase_ == 3) {
+ return avroRowsBuilder_.getMessage();
+ }
+ return com.google.cloud.bigquery.storage.v1.AvroRows.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * Serialized row data in AVRO format. + *+ * + *
.google.cloud.bigquery.storage.v1.AvroRows avro_rows = 3;
+ */
+ public Builder setAvroRows(com.google.cloud.bigquery.storage.v1.AvroRows value) {
+ if (avroRowsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ rows_ = value;
+ onChanged();
+ } else {
+ avroRowsBuilder_.setMessage(value);
+ }
+ rowsCase_ = 3;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Serialized row data in AVRO format. + *+ * + *
.google.cloud.bigquery.storage.v1.AvroRows avro_rows = 3;
+ */
+ public Builder setAvroRows(
+ com.google.cloud.bigquery.storage.v1.AvroRows.Builder builderForValue) {
+ if (avroRowsBuilder_ == null) {
+ rows_ = builderForValue.build();
+ onChanged();
+ } else {
+ avroRowsBuilder_.setMessage(builderForValue.build());
+ }
+ rowsCase_ = 3;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Serialized row data in AVRO format. + *+ * + *
.google.cloud.bigquery.storage.v1.AvroRows avro_rows = 3;
+ */
+ public Builder mergeAvroRows(com.google.cloud.bigquery.storage.v1.AvroRows value) {
+ if (avroRowsBuilder_ == null) {
+ if (rowsCase_ == 3
+ && rows_ != com.google.cloud.bigquery.storage.v1.AvroRows.getDefaultInstance()) {
+ rows_ =
+ com.google.cloud.bigquery.storage.v1.AvroRows.newBuilder(
+ (com.google.cloud.bigquery.storage.v1.AvroRows) rows_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ rows_ = value;
+ }
+ onChanged();
+ } else {
+ if (rowsCase_ == 3) {
+ avroRowsBuilder_.mergeFrom(value);
+ }
+ avroRowsBuilder_.setMessage(value);
+ }
+ rowsCase_ = 3;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Serialized row data in AVRO format. + *+ * + *
.google.cloud.bigquery.storage.v1.AvroRows avro_rows = 3;
+ */
+ public Builder clearAvroRows() {
+ if (avroRowsBuilder_ == null) {
+ if (rowsCase_ == 3) {
+ rowsCase_ = 0;
+ rows_ = null;
+ onChanged();
+ }
+ } else {
+ if (rowsCase_ == 3) {
+ rowsCase_ = 0;
+ rows_ = null;
+ }
+ avroRowsBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Serialized row data in AVRO format. + *+ * + *
.google.cloud.bigquery.storage.v1.AvroRows avro_rows = 3;
+ */
+ public com.google.cloud.bigquery.storage.v1.AvroRows.Builder getAvroRowsBuilder() {
+ return getAvroRowsFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Serialized row data in AVRO format. + *+ * + *
.google.cloud.bigquery.storage.v1.AvroRows avro_rows = 3;
+ */
+ public com.google.cloud.bigquery.storage.v1.AvroRowsOrBuilder getAvroRowsOrBuilder() {
+ if ((rowsCase_ == 3) && (avroRowsBuilder_ != null)) {
+ return avroRowsBuilder_.getMessageOrBuilder();
+ } else {
+ if (rowsCase_ == 3) {
+ return (com.google.cloud.bigquery.storage.v1.AvroRows) rows_;
+ }
+ return com.google.cloud.bigquery.storage.v1.AvroRows.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * Serialized row data in AVRO format. + *+ * + *
.google.cloud.bigquery.storage.v1.AvroRows avro_rows = 3;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1.AvroRows,
+ com.google.cloud.bigquery.storage.v1.AvroRows.Builder,
+ com.google.cloud.bigquery.storage.v1.AvroRowsOrBuilder>
+ getAvroRowsFieldBuilder() {
+ if (avroRowsBuilder_ == null) {
+ if (!(rowsCase_ == 3)) {
+ rows_ = com.google.cloud.bigquery.storage.v1.AvroRows.getDefaultInstance();
+ }
+ avroRowsBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1.AvroRows,
+ com.google.cloud.bigquery.storage.v1.AvroRows.Builder,
+ com.google.cloud.bigquery.storage.v1.AvroRowsOrBuilder>(
+ (com.google.cloud.bigquery.storage.v1.AvroRows) rows_,
+ getParentForChildren(),
+ isClean());
+ rows_ = null;
+ }
+ rowsCase_ = 3;
+ onChanged();
+ ;
+ return avroRowsBuilder_;
+ }
+
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1.ArrowRecordBatch,
+ com.google.cloud.bigquery.storage.v1.ArrowRecordBatch.Builder,
+ com.google.cloud.bigquery.storage.v1.ArrowRecordBatchOrBuilder>
+ arrowRecordBatchBuilder_;
+ /**
+ *
+ *
+ * + * Serialized row data in Arrow RecordBatch format. + *+ * + *
.google.cloud.bigquery.storage.v1.ArrowRecordBatch arrow_record_batch = 4;
+ *
+ * @return Whether the arrowRecordBatch field is set.
+ */
+ public boolean hasArrowRecordBatch() {
+ return rowsCase_ == 4;
+ }
+ /**
+ *
+ *
+ * + * Serialized row data in Arrow RecordBatch format. + *+ * + *
.google.cloud.bigquery.storage.v1.ArrowRecordBatch arrow_record_batch = 4;
+ *
+ * @return The arrowRecordBatch.
+ */
+ public com.google.cloud.bigquery.storage.v1.ArrowRecordBatch getArrowRecordBatch() {
+ if (arrowRecordBatchBuilder_ == null) {
+ if (rowsCase_ == 4) {
+ return (com.google.cloud.bigquery.storage.v1.ArrowRecordBatch) rows_;
+ }
+ return com.google.cloud.bigquery.storage.v1.ArrowRecordBatch.getDefaultInstance();
+ } else {
+ if (rowsCase_ == 4) {
+ return arrowRecordBatchBuilder_.getMessage();
+ }
+ return com.google.cloud.bigquery.storage.v1.ArrowRecordBatch.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * Serialized row data in Arrow RecordBatch format. + *+ * + *
.google.cloud.bigquery.storage.v1.ArrowRecordBatch arrow_record_batch = 4;
+ */
+ public Builder setArrowRecordBatch(
+ com.google.cloud.bigquery.storage.v1.ArrowRecordBatch value) {
+ if (arrowRecordBatchBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ rows_ = value;
+ onChanged();
+ } else {
+ arrowRecordBatchBuilder_.setMessage(value);
+ }
+ rowsCase_ = 4;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Serialized row data in Arrow RecordBatch format. + *+ * + *
.google.cloud.bigquery.storage.v1.ArrowRecordBatch arrow_record_batch = 4;
+ */
+ public Builder setArrowRecordBatch(
+ com.google.cloud.bigquery.storage.v1.ArrowRecordBatch.Builder builderForValue) {
+ if (arrowRecordBatchBuilder_ == null) {
+ rows_ = builderForValue.build();
+ onChanged();
+ } else {
+ arrowRecordBatchBuilder_.setMessage(builderForValue.build());
+ }
+ rowsCase_ = 4;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Serialized row data in Arrow RecordBatch format. + *+ * + *
.google.cloud.bigquery.storage.v1.ArrowRecordBatch arrow_record_batch = 4;
+ */
+ public Builder mergeArrowRecordBatch(
+ com.google.cloud.bigquery.storage.v1.ArrowRecordBatch value) {
+ if (arrowRecordBatchBuilder_ == null) {
+ if (rowsCase_ == 4
+ && rows_
+ != com.google.cloud.bigquery.storage.v1.ArrowRecordBatch.getDefaultInstance()) {
+ rows_ =
+ com.google.cloud.bigquery.storage.v1.ArrowRecordBatch.newBuilder(
+ (com.google.cloud.bigquery.storage.v1.ArrowRecordBatch) rows_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ rows_ = value;
+ }
+ onChanged();
+ } else {
+ if (rowsCase_ == 4) {
+ arrowRecordBatchBuilder_.mergeFrom(value);
+ }
+ arrowRecordBatchBuilder_.setMessage(value);
+ }
+ rowsCase_ = 4;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Serialized row data in Arrow RecordBatch format. + *+ * + *
.google.cloud.bigquery.storage.v1.ArrowRecordBatch arrow_record_batch = 4;
+ */
+ public Builder clearArrowRecordBatch() {
+ if (arrowRecordBatchBuilder_ == null) {
+ if (rowsCase_ == 4) {
+ rowsCase_ = 0;
+ rows_ = null;
+ onChanged();
+ }
+ } else {
+ if (rowsCase_ == 4) {
+ rowsCase_ = 0;
+ rows_ = null;
+ }
+ arrowRecordBatchBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Serialized row data in Arrow RecordBatch format. + *+ * + *
.google.cloud.bigquery.storage.v1.ArrowRecordBatch arrow_record_batch = 4;
+ */
+ public com.google.cloud.bigquery.storage.v1.ArrowRecordBatch.Builder
+ getArrowRecordBatchBuilder() {
+ return getArrowRecordBatchFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Serialized row data in Arrow RecordBatch format. + *+ * + *
.google.cloud.bigquery.storage.v1.ArrowRecordBatch arrow_record_batch = 4;
+ */
+ public com.google.cloud.bigquery.storage.v1.ArrowRecordBatchOrBuilder
+ getArrowRecordBatchOrBuilder() {
+ if ((rowsCase_ == 4) && (arrowRecordBatchBuilder_ != null)) {
+ return arrowRecordBatchBuilder_.getMessageOrBuilder();
+ } else {
+ if (rowsCase_ == 4) {
+ return (com.google.cloud.bigquery.storage.v1.ArrowRecordBatch) rows_;
+ }
+ return com.google.cloud.bigquery.storage.v1.ArrowRecordBatch.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * Serialized row data in Arrow RecordBatch format. + *+ * + *
.google.cloud.bigquery.storage.v1.ArrowRecordBatch arrow_record_batch = 4;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1.ArrowRecordBatch,
+ com.google.cloud.bigquery.storage.v1.ArrowRecordBatch.Builder,
+ com.google.cloud.bigquery.storage.v1.ArrowRecordBatchOrBuilder>
+ getArrowRecordBatchFieldBuilder() {
+ if (arrowRecordBatchBuilder_ == null) {
+ if (!(rowsCase_ == 4)) {
+ rows_ = com.google.cloud.bigquery.storage.v1.ArrowRecordBatch.getDefaultInstance();
+ }
+ arrowRecordBatchBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1.ArrowRecordBatch,
+ com.google.cloud.bigquery.storage.v1.ArrowRecordBatch.Builder,
+ com.google.cloud.bigquery.storage.v1.ArrowRecordBatchOrBuilder>(
+ (com.google.cloud.bigquery.storage.v1.ArrowRecordBatch) rows_,
+ getParentForChildren(),
+ isClean());
+ rows_ = null;
+ }
+ rowsCase_ = 4;
+ onChanged();
+ ;
+ return arrowRecordBatchBuilder_;
+ }
+
+ private long rowCount_;
+ /**
+ *
+ *
+ * + * Number of serialized rows in the rows block. + *+ * + *
int64 row_count = 6;
+ *
+ * @return The rowCount.
+ */
+ public long getRowCount() {
+ return rowCount_;
+ }
+ /**
+ *
+ *
+ * + * Number of serialized rows in the rows block. + *+ * + *
int64 row_count = 6;
+ *
+ * @param value The rowCount to set.
+ * @return This builder for chaining.
+ */
+ public Builder setRowCount(long value) {
+
+ rowCount_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Number of serialized rows in the rows block. + *+ * + *
int64 row_count = 6;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearRowCount() {
+
+ rowCount_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private com.google.cloud.bigquery.storage.v1.StreamStats stats_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1.StreamStats,
+ com.google.cloud.bigquery.storage.v1.StreamStats.Builder,
+ com.google.cloud.bigquery.storage.v1.StreamStatsOrBuilder>
+ statsBuilder_;
+ /**
+ *
+ *
+ * + * Statistics for the stream. + *+ * + *
.google.cloud.bigquery.storage.v1.StreamStats stats = 2;
+ *
+ * @return Whether the stats field is set.
+ */
+ public boolean hasStats() {
+ return statsBuilder_ != null || stats_ != null;
+ }
+ /**
+ *
+ *
+ * + * Statistics for the stream. + *+ * + *
.google.cloud.bigquery.storage.v1.StreamStats stats = 2;
+ *
+ * @return The stats.
+ */
+ public com.google.cloud.bigquery.storage.v1.StreamStats getStats() {
+ if (statsBuilder_ == null) {
+ return stats_ == null
+ ? com.google.cloud.bigquery.storage.v1.StreamStats.getDefaultInstance()
+ : stats_;
+ } else {
+ return statsBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Statistics for the stream. + *+ * + *
.google.cloud.bigquery.storage.v1.StreamStats stats = 2;
+ */
+ public Builder setStats(com.google.cloud.bigquery.storage.v1.StreamStats value) {
+ if (statsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ stats_ = value;
+ onChanged();
+ } else {
+ statsBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Statistics for the stream. + *+ * + *
.google.cloud.bigquery.storage.v1.StreamStats stats = 2;
+ */
+ public Builder setStats(
+ com.google.cloud.bigquery.storage.v1.StreamStats.Builder builderForValue) {
+ if (statsBuilder_ == null) {
+ stats_ = builderForValue.build();
+ onChanged();
+ } else {
+ statsBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Statistics for the stream. + *+ * + *
.google.cloud.bigquery.storage.v1.StreamStats stats = 2;
+ */
+ public Builder mergeStats(com.google.cloud.bigquery.storage.v1.StreamStats value) {
+ if (statsBuilder_ == null) {
+ if (stats_ != null) {
+ stats_ =
+ com.google.cloud.bigquery.storage.v1.StreamStats.newBuilder(stats_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ stats_ = value;
+ }
+ onChanged();
+ } else {
+ statsBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Statistics for the stream. + *+ * + *
.google.cloud.bigquery.storage.v1.StreamStats stats = 2;
+ */
+ public Builder clearStats() {
+ if (statsBuilder_ == null) {
+ stats_ = null;
+ onChanged();
+ } else {
+ stats_ = null;
+ statsBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Statistics for the stream. + *+ * + *
.google.cloud.bigquery.storage.v1.StreamStats stats = 2;
+ */
+ public com.google.cloud.bigquery.storage.v1.StreamStats.Builder getStatsBuilder() {
+
+ onChanged();
+ return getStatsFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Statistics for the stream. + *+ * + *
.google.cloud.bigquery.storage.v1.StreamStats stats = 2;
+ */
+ public com.google.cloud.bigquery.storage.v1.StreamStatsOrBuilder getStatsOrBuilder() {
+ if (statsBuilder_ != null) {
+ return statsBuilder_.getMessageOrBuilder();
+ } else {
+ return stats_ == null
+ ? com.google.cloud.bigquery.storage.v1.StreamStats.getDefaultInstance()
+ : stats_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Statistics for the stream. + *+ * + *
.google.cloud.bigquery.storage.v1.StreamStats stats = 2;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1.StreamStats,
+ com.google.cloud.bigquery.storage.v1.StreamStats.Builder,
+ com.google.cloud.bigquery.storage.v1.StreamStatsOrBuilder>
+ getStatsFieldBuilder() {
+ if (statsBuilder_ == null) {
+ statsBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1.StreamStats,
+ com.google.cloud.bigquery.storage.v1.StreamStats.Builder,
+ com.google.cloud.bigquery.storage.v1.StreamStatsOrBuilder>(
+ getStats(), getParentForChildren(), isClean());
+ stats_ = null;
+ }
+ return statsBuilder_;
+ }
+
+ private com.google.cloud.bigquery.storage.v1.ThrottleState throttleState_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1.ThrottleState,
+ com.google.cloud.bigquery.storage.v1.ThrottleState.Builder,
+ com.google.cloud.bigquery.storage.v1.ThrottleStateOrBuilder>
+ throttleStateBuilder_;
+ /**
+ *
+ *
+ * + * Throttling state. If unset, the latest response still describes + * the current throttling status. + *+ * + *
.google.cloud.bigquery.storage.v1.ThrottleState throttle_state = 5;
+ *
+ * @return Whether the throttleState field is set.
+ */
+ public boolean hasThrottleState() {
+ return throttleStateBuilder_ != null || throttleState_ != null;
+ }
+ /**
+ *
+ *
+ * + * Throttling state. If unset, the latest response still describes + * the current throttling status. + *+ * + *
.google.cloud.bigquery.storage.v1.ThrottleState throttle_state = 5;
+ *
+ * @return The throttleState.
+ */
+ public com.google.cloud.bigquery.storage.v1.ThrottleState getThrottleState() {
+ if (throttleStateBuilder_ == null) {
+ return throttleState_ == null
+ ? com.google.cloud.bigquery.storage.v1.ThrottleState.getDefaultInstance()
+ : throttleState_;
+ } else {
+ return throttleStateBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Throttling state. If unset, the latest response still describes + * the current throttling status. + *+ * + *
.google.cloud.bigquery.storage.v1.ThrottleState throttle_state = 5;
+ */
+ public Builder setThrottleState(com.google.cloud.bigquery.storage.v1.ThrottleState value) {
+ if (throttleStateBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ throttleState_ = value;
+ onChanged();
+ } else {
+ throttleStateBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Throttling state. If unset, the latest response still describes + * the current throttling status. + *+ * + *
.google.cloud.bigquery.storage.v1.ThrottleState throttle_state = 5;
+ */
+ public Builder setThrottleState(
+ com.google.cloud.bigquery.storage.v1.ThrottleState.Builder builderForValue) {
+ if (throttleStateBuilder_ == null) {
+ throttleState_ = builderForValue.build();
+ onChanged();
+ } else {
+ throttleStateBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Throttling state. If unset, the latest response still describes + * the current throttling status. + *+ * + *
.google.cloud.bigquery.storage.v1.ThrottleState throttle_state = 5;
+ */
+ public Builder mergeThrottleState(com.google.cloud.bigquery.storage.v1.ThrottleState value) {
+ if (throttleStateBuilder_ == null) {
+ if (throttleState_ != null) {
+ throttleState_ =
+ com.google.cloud.bigquery.storage.v1.ThrottleState.newBuilder(throttleState_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ throttleState_ = value;
+ }
+ onChanged();
+ } else {
+ throttleStateBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Throttling state. If unset, the latest response still describes + * the current throttling status. + *+ * + *
.google.cloud.bigquery.storage.v1.ThrottleState throttle_state = 5;
+ */
+ public Builder clearThrottleState() {
+ if (throttleStateBuilder_ == null) {
+ throttleState_ = null;
+ onChanged();
+ } else {
+ throttleState_ = null;
+ throttleStateBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Throttling state. If unset, the latest response still describes + * the current throttling status. + *+ * + *
.google.cloud.bigquery.storage.v1.ThrottleState throttle_state = 5;
+ */
+ public com.google.cloud.bigquery.storage.v1.ThrottleState.Builder getThrottleStateBuilder() {
+
+ onChanged();
+ return getThrottleStateFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Throttling state. If unset, the latest response still describes + * the current throttling status. + *+ * + *
.google.cloud.bigquery.storage.v1.ThrottleState throttle_state = 5;
+ */
+ public com.google.cloud.bigquery.storage.v1.ThrottleStateOrBuilder getThrottleStateOrBuilder() {
+ if (throttleStateBuilder_ != null) {
+ return throttleStateBuilder_.getMessageOrBuilder();
+ } else {
+ return throttleState_ == null
+ ? com.google.cloud.bigquery.storage.v1.ThrottleState.getDefaultInstance()
+ : throttleState_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Throttling state. If unset, the latest response still describes + * the current throttling status. + *+ * + *
.google.cloud.bigquery.storage.v1.ThrottleState throttle_state = 5;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1.ThrottleState,
+ com.google.cloud.bigquery.storage.v1.ThrottleState.Builder,
+ com.google.cloud.bigquery.storage.v1.ThrottleStateOrBuilder>
+ getThrottleStateFieldBuilder() {
+ if (throttleStateBuilder_ == null) {
+ throttleStateBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1.ThrottleState,
+ com.google.cloud.bigquery.storage.v1.ThrottleState.Builder,
+ com.google.cloud.bigquery.storage.v1.ThrottleStateOrBuilder>(
+ getThrottleState(), getParentForChildren(), isClean());
+ throttleState_ = null;
+ }
+ return throttleStateBuilder_;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.bigquery.storage.v1.ReadRowsResponse)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.bigquery.storage.v1.ReadRowsResponse)
+ private static final com.google.cloud.bigquery.storage.v1.ReadRowsResponse DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.bigquery.storage.v1.ReadRowsResponse();
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadRowsResponse getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Serialized row data in AVRO format. + *+ * + *
.google.cloud.bigquery.storage.v1.AvroRows avro_rows = 3;
+ *
+ * @return Whether the avroRows field is set.
+ */
+ boolean hasAvroRows();
+ /**
+ *
+ *
+ * + * Serialized row data in AVRO format. + *+ * + *
.google.cloud.bigquery.storage.v1.AvroRows avro_rows = 3;
+ *
+ * @return The avroRows.
+ */
+ com.google.cloud.bigquery.storage.v1.AvroRows getAvroRows();
+ /**
+ *
+ *
+ * + * Serialized row data in AVRO format. + *+ * + *
.google.cloud.bigquery.storage.v1.AvroRows avro_rows = 3;
+ */
+ com.google.cloud.bigquery.storage.v1.AvroRowsOrBuilder getAvroRowsOrBuilder();
+
+ /**
+ *
+ *
+ * + * Serialized row data in Arrow RecordBatch format. + *+ * + *
.google.cloud.bigquery.storage.v1.ArrowRecordBatch arrow_record_batch = 4;
+ *
+ * @return Whether the arrowRecordBatch field is set.
+ */
+ boolean hasArrowRecordBatch();
+ /**
+ *
+ *
+ * + * Serialized row data in Arrow RecordBatch format. + *+ * + *
.google.cloud.bigquery.storage.v1.ArrowRecordBatch arrow_record_batch = 4;
+ *
+ * @return The arrowRecordBatch.
+ */
+ com.google.cloud.bigquery.storage.v1.ArrowRecordBatch getArrowRecordBatch();
+ /**
+ *
+ *
+ * + * Serialized row data in Arrow RecordBatch format. + *+ * + *
.google.cloud.bigquery.storage.v1.ArrowRecordBatch arrow_record_batch = 4;
+ */
+ com.google.cloud.bigquery.storage.v1.ArrowRecordBatchOrBuilder getArrowRecordBatchOrBuilder();
+
+ /**
+ *
+ *
+ * + * Number of serialized rows in the rows block. + *+ * + *
int64 row_count = 6;
+ *
+ * @return The rowCount.
+ */
+ long getRowCount();
+
+ /**
+ *
+ *
+ * + * Statistics for the stream. + *+ * + *
.google.cloud.bigquery.storage.v1.StreamStats stats = 2;
+ *
+ * @return Whether the stats field is set.
+ */
+ boolean hasStats();
+ /**
+ *
+ *
+ * + * Statistics for the stream. + *+ * + *
.google.cloud.bigquery.storage.v1.StreamStats stats = 2;
+ *
+ * @return The stats.
+ */
+ com.google.cloud.bigquery.storage.v1.StreamStats getStats();
+ /**
+ *
+ *
+ * + * Statistics for the stream. + *+ * + *
.google.cloud.bigquery.storage.v1.StreamStats stats = 2;
+ */
+ com.google.cloud.bigquery.storage.v1.StreamStatsOrBuilder getStatsOrBuilder();
+
+ /**
+ *
+ *
+ * + * Throttling state. If unset, the latest response still describes + * the current throttling status. + *+ * + *
.google.cloud.bigquery.storage.v1.ThrottleState throttle_state = 5;
+ *
+ * @return Whether the throttleState field is set.
+ */
+ boolean hasThrottleState();
+ /**
+ *
+ *
+ * + * Throttling state. If unset, the latest response still describes + * the current throttling status. + *+ * + *
.google.cloud.bigquery.storage.v1.ThrottleState throttle_state = 5;
+ *
+ * @return The throttleState.
+ */
+ com.google.cloud.bigquery.storage.v1.ThrottleState getThrottleState();
+ /**
+ *
+ *
+ * + * Throttling state. If unset, the latest response still describes + * the current throttling status. + *+ * + *
.google.cloud.bigquery.storage.v1.ThrottleState throttle_state = 5;
+ */
+ com.google.cloud.bigquery.storage.v1.ThrottleStateOrBuilder getThrottleStateOrBuilder();
+
+ public com.google.cloud.bigquery.storage.v1.ReadRowsResponse.RowsCase getRowsCase();
+}
diff --git a/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/ReadSession.java b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/ReadSession.java
new file mode 100644
index 0000000000..2cacbb33c2
--- /dev/null
+++ b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/ReadSession.java
@@ -0,0 +1,5146 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
+ *
+ * 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.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/bigquery/storage/v1/stream.proto
+
+package com.google.cloud.bigquery.storage.v1;
+
+/**
+ *
+ *
+ * + * Information about the ReadSession. + *+ * + * Protobuf type {@code google.cloud.bigquery.storage.v1.ReadSession} + */ +public final class ReadSession extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.bigquery.storage.v1.ReadSession) + ReadSessionOrBuilder { + private static final long serialVersionUID = 0L; + // Use ReadSession.newBuilder() to construct. + private ReadSession(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private ReadSession() { + name_ = ""; + dataFormat_ = 0; + table_ = ""; + streams_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ReadSession(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ReadSession( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (expireTime_ != null) { + subBuilder = expireTime_.toBuilder(); + } + expireTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(expireTime_); + expireTime_ = subBuilder.buildPartial(); + } + + break; + } + case 24: + { + int rawValue = input.readEnum(); + + dataFormat_ = rawValue; + break; + } + case 34: + { + com.google.cloud.bigquery.storage.v1.AvroSchema.Builder subBuilder = null; + if (schemaCase_ == 4) { + subBuilder = + ((com.google.cloud.bigquery.storage.v1.AvroSchema) schema_).toBuilder(); + } + schema_ = + input.readMessage( + com.google.cloud.bigquery.storage.v1.AvroSchema.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.bigquery.storage.v1.AvroSchema) schema_); + schema_ = subBuilder.buildPartial(); + } + schemaCase_ = 4; + break; + } + case 42: + { + com.google.cloud.bigquery.storage.v1.ArrowSchema.Builder subBuilder = null; + if (schemaCase_ == 5) { + subBuilder = + ((com.google.cloud.bigquery.storage.v1.ArrowSchema) schema_).toBuilder(); + } + schema_ = + input.readMessage( + com.google.cloud.bigquery.storage.v1.ArrowSchema.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.bigquery.storage.v1.ArrowSchema) schema_); + schema_ = subBuilder.buildPartial(); + } + schemaCase_ = 5; + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + table_ = s; + break; + } + case 58: + { + com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiers.Builder subBuilder = + null; + if (tableModifiers_ != null) { + subBuilder = tableModifiers_.toBuilder(); + } + tableModifiers_ = + input.readMessage( + com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiers.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(tableModifiers_); + tableModifiers_ = subBuilder.buildPartial(); + } + + break; + } + case 66: + { + com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions.Builder subBuilder = + null; + if (readOptions_ != null) { + subBuilder = readOptions_.toBuilder(); + } + readOptions_ = + input.readMessage( + com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(readOptions_); + readOptions_ = subBuilder.buildPartial(); + } + + break; + } + case 82: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + streams_ = + new java.util.ArrayList
+ * The snapshot time of the table. If not set, interpreted as now. + *+ * + *
.google.protobuf.Timestamp snapshot_time = 1;
+ *
+ * @return Whether the snapshotTime field is set.
+ */
+ boolean hasSnapshotTime();
+ /**
+ *
+ *
+ * + * The snapshot time of the table. If not set, interpreted as now. + *+ * + *
.google.protobuf.Timestamp snapshot_time = 1;
+ *
+ * @return The snapshotTime.
+ */
+ com.google.protobuf.Timestamp getSnapshotTime();
+ /**
+ *
+ *
+ * + * The snapshot time of the table. If not set, interpreted as now. + *+ * + *
.google.protobuf.Timestamp snapshot_time = 1;
+ */
+ com.google.protobuf.TimestampOrBuilder getSnapshotTimeOrBuilder();
+ }
+ /**
+ *
+ *
+ * + * Additional attributes when reading a table. + *+ * + * Protobuf type {@code google.cloud.bigquery.storage.v1.ReadSession.TableModifiers} + */ + public static final class TableModifiers extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.bigquery.storage.v1.ReadSession.TableModifiers) + TableModifiersOrBuilder { + private static final long serialVersionUID = 0L; + // Use TableModifiers.newBuilder() to construct. + private TableModifiers(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private TableModifiers() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TableModifiers(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TableModifiers( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (snapshotTime_ != null) { + subBuilder = snapshotTime_.toBuilder(); + } + snapshotTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(snapshotTime_); + snapshotTime_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.bigquery.storage.v1.StreamProto + .internal_static_google_cloud_bigquery_storage_v1_ReadSession_TableModifiers_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.bigquery.storage.v1.StreamProto + .internal_static_google_cloud_bigquery_storage_v1_ReadSession_TableModifiers_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiers.class, + com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiers.Builder.class); + } + + public static final int SNAPSHOT_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp snapshotTime_; + /** + * + * + *
+ * The snapshot time of the table. If not set, interpreted as now. + *+ * + *
.google.protobuf.Timestamp snapshot_time = 1;
+ *
+ * @return Whether the snapshotTime field is set.
+ */
+ public boolean hasSnapshotTime() {
+ return snapshotTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * The snapshot time of the table. If not set, interpreted as now. + *+ * + *
.google.protobuf.Timestamp snapshot_time = 1;
+ *
+ * @return The snapshotTime.
+ */
+ public com.google.protobuf.Timestamp getSnapshotTime() {
+ return snapshotTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : snapshotTime_;
+ }
+ /**
+ *
+ *
+ * + * The snapshot time of the table. If not set, interpreted as now. + *+ * + *
.google.protobuf.Timestamp snapshot_time = 1;
+ */
+ public com.google.protobuf.TimestampOrBuilder getSnapshotTimeOrBuilder() {
+ return getSnapshotTime();
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (snapshotTime_ != null) {
+ output.writeMessage(1, getSnapshotTime());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (snapshotTime_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSnapshotTime());
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiers)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiers other =
+ (com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiers) obj;
+
+ if (hasSnapshotTime() != other.hasSnapshotTime()) return false;
+ if (hasSnapshotTime()) {
+ if (!getSnapshotTime().equals(other.getSnapshotTime())) return false;
+ }
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasSnapshotTime()) {
+ hash = (37 * hash) + SNAPSHOT_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + getSnapshotTime().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiers parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiers parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiers parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiers parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiers parseFrom(
+ byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiers parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiers parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiers parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiers
+ parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiers
+ parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiers parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiers parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiers prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * Additional attributes when reading a table. + *+ * + * Protobuf type {@code google.cloud.bigquery.storage.v1.ReadSession.TableModifiers} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The snapshot time of the table. If not set, interpreted as now. + *+ * + *
.google.protobuf.Timestamp snapshot_time = 1;
+ *
+ * @return Whether the snapshotTime field is set.
+ */
+ public boolean hasSnapshotTime() {
+ return snapshotTimeBuilder_ != null || snapshotTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * The snapshot time of the table. If not set, interpreted as now. + *+ * + *
.google.protobuf.Timestamp snapshot_time = 1;
+ *
+ * @return The snapshotTime.
+ */
+ public com.google.protobuf.Timestamp getSnapshotTime() {
+ if (snapshotTimeBuilder_ == null) {
+ return snapshotTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : snapshotTime_;
+ } else {
+ return snapshotTimeBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * The snapshot time of the table. If not set, interpreted as now. + *+ * + *
.google.protobuf.Timestamp snapshot_time = 1;
+ */
+ public Builder setSnapshotTime(com.google.protobuf.Timestamp value) {
+ if (snapshotTimeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ snapshotTime_ = value;
+ onChanged();
+ } else {
+ snapshotTimeBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The snapshot time of the table. If not set, interpreted as now. + *+ * + *
.google.protobuf.Timestamp snapshot_time = 1;
+ */
+ public Builder setSnapshotTime(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (snapshotTimeBuilder_ == null) {
+ snapshotTime_ = builderForValue.build();
+ onChanged();
+ } else {
+ snapshotTimeBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The snapshot time of the table. If not set, interpreted as now. + *+ * + *
.google.protobuf.Timestamp snapshot_time = 1;
+ */
+ public Builder mergeSnapshotTime(com.google.protobuf.Timestamp value) {
+ if (snapshotTimeBuilder_ == null) {
+ if (snapshotTime_ != null) {
+ snapshotTime_ =
+ com.google.protobuf.Timestamp.newBuilder(snapshotTime_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ snapshotTime_ = value;
+ }
+ onChanged();
+ } else {
+ snapshotTimeBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The snapshot time of the table. If not set, interpreted as now. + *+ * + *
.google.protobuf.Timestamp snapshot_time = 1;
+ */
+ public Builder clearSnapshotTime() {
+ if (snapshotTimeBuilder_ == null) {
+ snapshotTime_ = null;
+ onChanged();
+ } else {
+ snapshotTime_ = null;
+ snapshotTimeBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The snapshot time of the table. If not set, interpreted as now. + *+ * + *
.google.protobuf.Timestamp snapshot_time = 1;
+ */
+ public com.google.protobuf.Timestamp.Builder getSnapshotTimeBuilder() {
+
+ onChanged();
+ return getSnapshotTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * The snapshot time of the table. If not set, interpreted as now. + *+ * + *
.google.protobuf.Timestamp snapshot_time = 1;
+ */
+ public com.google.protobuf.TimestampOrBuilder getSnapshotTimeOrBuilder() {
+ if (snapshotTimeBuilder_ != null) {
+ return snapshotTimeBuilder_.getMessageOrBuilder();
+ } else {
+ return snapshotTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : snapshotTime_;
+ }
+ }
+ /**
+ *
+ *
+ * + * The snapshot time of the table. If not set, interpreted as now. + *+ * + *
.google.protobuf.Timestamp snapshot_time = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ getSnapshotTimeFieldBuilder() {
+ if (snapshotTimeBuilder_ == null) {
+ snapshotTimeBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>(
+ getSnapshotTime(), getParentForChildren(), isClean());
+ snapshotTime_ = null;
+ }
+ return snapshotTimeBuilder_;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.bigquery.storage.v1.ReadSession.TableModifiers)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.bigquery.storage.v1.ReadSession.TableModifiers)
+ private static final com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiers
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiers();
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiers
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Names of the fields in the table that should be read. If empty, all + * fields will be read. If the specified field is a nested field, all + * the sub-fields in the field will be selected. The output field order is + * unrelated to the order of fields in selected_fields. + *+ * + *
repeated string selected_fields = 1;
+ *
+ * @return A list containing the selectedFields.
+ */
+ java.util.List+ * Names of the fields in the table that should be read. If empty, all + * fields will be read. If the specified field is a nested field, all + * the sub-fields in the field will be selected. The output field order is + * unrelated to the order of fields in selected_fields. + *+ * + *
repeated string selected_fields = 1;
+ *
+ * @return The count of selectedFields.
+ */
+ int getSelectedFieldsCount();
+ /**
+ *
+ *
+ * + * Names of the fields in the table that should be read. If empty, all + * fields will be read. If the specified field is a nested field, all + * the sub-fields in the field will be selected. The output field order is + * unrelated to the order of fields in selected_fields. + *+ * + *
repeated string selected_fields = 1;
+ *
+ * @param index The index of the element to return.
+ * @return The selectedFields at the given index.
+ */
+ java.lang.String getSelectedFields(int index);
+ /**
+ *
+ *
+ * + * Names of the fields in the table that should be read. If empty, all + * fields will be read. If the specified field is a nested field, all + * the sub-fields in the field will be selected. The output field order is + * unrelated to the order of fields in selected_fields. + *+ * + *
repeated string selected_fields = 1;
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the selectedFields at the given index.
+ */
+ com.google.protobuf.ByteString getSelectedFieldsBytes(int index);
+
+ /**
+ *
+ *
+ * + * SQL text filtering statement, similar to a WHERE clause in a query. + * Currently, only a single predicate that is a comparison between a column + * and a constant value is supported. Aggregates are not supported. + * Examples: "int_field > 5" + * "date_field = CAST('2014-9-27' as DATE)" + * "nullable_field is not NULL" + * "st_equals(geo_field, st_geofromtext("POINT(2, 2)"))" + * "numeric_field BETWEEN 1.0 AND 5.0" + *+ * + *
string row_restriction = 2;
+ *
+ * @return The rowRestriction.
+ */
+ java.lang.String getRowRestriction();
+ /**
+ *
+ *
+ * + * SQL text filtering statement, similar to a WHERE clause in a query. + * Currently, only a single predicate that is a comparison between a column + * and a constant value is supported. Aggregates are not supported. + * Examples: "int_field > 5" + * "date_field = CAST('2014-9-27' as DATE)" + * "nullable_field is not NULL" + * "st_equals(geo_field, st_geofromtext("POINT(2, 2)"))" + * "numeric_field BETWEEN 1.0 AND 5.0" + *+ * + *
string row_restriction = 2;
+ *
+ * @return The bytes for rowRestriction.
+ */
+ com.google.protobuf.ByteString getRowRestrictionBytes();
+ }
+ /**
+ *
+ *
+ * + * Options dictating how we read a table. + *+ * + * Protobuf type {@code google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions} + */ + public static final class TableReadOptions extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions) + TableReadOptionsOrBuilder { + private static final long serialVersionUID = 0L; + // Use TableReadOptions.newBuilder() to construct. + private TableReadOptions(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private TableReadOptions() { + selectedFields_ = com.google.protobuf.LazyStringArrayList.EMPTY; + rowRestriction_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TableReadOptions(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TableReadOptions( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + selectedFields_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + selectedFields_.add(s); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + rowRestriction_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + selectedFields_ = selectedFields_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.bigquery.storage.v1.StreamProto + .internal_static_google_cloud_bigquery_storage_v1_ReadSession_TableReadOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.bigquery.storage.v1.StreamProto + .internal_static_google_cloud_bigquery_storage_v1_ReadSession_TableReadOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions.class, + com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions.Builder.class); + } + + public static final int SELECTED_FIELDS_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList selectedFields_; + /** + * + * + *
+ * Names of the fields in the table that should be read. If empty, all + * fields will be read. If the specified field is a nested field, all + * the sub-fields in the field will be selected. The output field order is + * unrelated to the order of fields in selected_fields. + *+ * + *
repeated string selected_fields = 1;
+ *
+ * @return A list containing the selectedFields.
+ */
+ public com.google.protobuf.ProtocolStringList getSelectedFieldsList() {
+ return selectedFields_;
+ }
+ /**
+ *
+ *
+ * + * Names of the fields in the table that should be read. If empty, all + * fields will be read. If the specified field is a nested field, all + * the sub-fields in the field will be selected. The output field order is + * unrelated to the order of fields in selected_fields. + *+ * + *
repeated string selected_fields = 1;
+ *
+ * @return The count of selectedFields.
+ */
+ public int getSelectedFieldsCount() {
+ return selectedFields_.size();
+ }
+ /**
+ *
+ *
+ * + * Names of the fields in the table that should be read. If empty, all + * fields will be read. If the specified field is a nested field, all + * the sub-fields in the field will be selected. The output field order is + * unrelated to the order of fields in selected_fields. + *+ * + *
repeated string selected_fields = 1;
+ *
+ * @param index The index of the element to return.
+ * @return The selectedFields at the given index.
+ */
+ public java.lang.String getSelectedFields(int index) {
+ return selectedFields_.get(index);
+ }
+ /**
+ *
+ *
+ * + * Names of the fields in the table that should be read. If empty, all + * fields will be read. If the specified field is a nested field, all + * the sub-fields in the field will be selected. The output field order is + * unrelated to the order of fields in selected_fields. + *+ * + *
repeated string selected_fields = 1;
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the selectedFields at the given index.
+ */
+ public com.google.protobuf.ByteString getSelectedFieldsBytes(int index) {
+ return selectedFields_.getByteString(index);
+ }
+
+ public static final int ROW_RESTRICTION_FIELD_NUMBER = 2;
+ private volatile java.lang.Object rowRestriction_;
+ /**
+ *
+ *
+ * + * SQL text filtering statement, similar to a WHERE clause in a query. + * Currently, only a single predicate that is a comparison between a column + * and a constant value is supported. Aggregates are not supported. + * Examples: "int_field > 5" + * "date_field = CAST('2014-9-27' as DATE)" + * "nullable_field is not NULL" + * "st_equals(geo_field, st_geofromtext("POINT(2, 2)"))" + * "numeric_field BETWEEN 1.0 AND 5.0" + *+ * + *
string row_restriction = 2;
+ *
+ * @return The rowRestriction.
+ */
+ public java.lang.String getRowRestriction() {
+ java.lang.Object ref = rowRestriction_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ rowRestriction_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * SQL text filtering statement, similar to a WHERE clause in a query. + * Currently, only a single predicate that is a comparison between a column + * and a constant value is supported. Aggregates are not supported. + * Examples: "int_field > 5" + * "date_field = CAST('2014-9-27' as DATE)" + * "nullable_field is not NULL" + * "st_equals(geo_field, st_geofromtext("POINT(2, 2)"))" + * "numeric_field BETWEEN 1.0 AND 5.0" + *+ * + *
string row_restriction = 2;
+ *
+ * @return The bytes for rowRestriction.
+ */
+ public com.google.protobuf.ByteString getRowRestrictionBytes() {
+ java.lang.Object ref = rowRestriction_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ rowRestriction_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ for (int i = 0; i < selectedFields_.size(); i++) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, selectedFields_.getRaw(i));
+ }
+ if (!getRowRestrictionBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, rowRestriction_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ {
+ int dataSize = 0;
+ for (int i = 0; i < selectedFields_.size(); i++) {
+ dataSize += computeStringSizeNoTag(selectedFields_.getRaw(i));
+ }
+ size += dataSize;
+ size += 1 * getSelectedFieldsList().size();
+ }
+ if (!getRowRestrictionBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, rowRestriction_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions other =
+ (com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions) obj;
+
+ if (!getSelectedFieldsList().equals(other.getSelectedFieldsList())) return false;
+ if (!getRowRestriction().equals(other.getRowRestriction())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (getSelectedFieldsCount() > 0) {
+ hash = (37 * hash) + SELECTED_FIELDS_FIELD_NUMBER;
+ hash = (53 * hash) + getSelectedFieldsList().hashCode();
+ }
+ hash = (37 * hash) + ROW_RESTRICTION_FIELD_NUMBER;
+ hash = (53 * hash) + getRowRestriction().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions parseFrom(
+ byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions
+ parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions
+ parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * Options dictating how we read a table. + *+ * + * Protobuf type {@code google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Names of the fields in the table that should be read. If empty, all + * fields will be read. If the specified field is a nested field, all + * the sub-fields in the field will be selected. The output field order is + * unrelated to the order of fields in selected_fields. + *+ * + *
repeated string selected_fields = 1;
+ *
+ * @return A list containing the selectedFields.
+ */
+ public com.google.protobuf.ProtocolStringList getSelectedFieldsList() {
+ return selectedFields_.getUnmodifiableView();
+ }
+ /**
+ *
+ *
+ * + * Names of the fields in the table that should be read. If empty, all + * fields will be read. If the specified field is a nested field, all + * the sub-fields in the field will be selected. The output field order is + * unrelated to the order of fields in selected_fields. + *+ * + *
repeated string selected_fields = 1;
+ *
+ * @return The count of selectedFields.
+ */
+ public int getSelectedFieldsCount() {
+ return selectedFields_.size();
+ }
+ /**
+ *
+ *
+ * + * Names of the fields in the table that should be read. If empty, all + * fields will be read. If the specified field is a nested field, all + * the sub-fields in the field will be selected. The output field order is + * unrelated to the order of fields in selected_fields. + *+ * + *
repeated string selected_fields = 1;
+ *
+ * @param index The index of the element to return.
+ * @return The selectedFields at the given index.
+ */
+ public java.lang.String getSelectedFields(int index) {
+ return selectedFields_.get(index);
+ }
+ /**
+ *
+ *
+ * + * Names of the fields in the table that should be read. If empty, all + * fields will be read. If the specified field is a nested field, all + * the sub-fields in the field will be selected. The output field order is + * unrelated to the order of fields in selected_fields. + *+ * + *
repeated string selected_fields = 1;
+ *
+ * @param value The bytes of the selectedFields to add.
+ */
+ public com.google.protobuf.ByteString getSelectedFieldsBytes(int index) {
+ return selectedFields_.getByteString(index);
+ }
+ /**
+ *
+ *
+ * + * Names of the fields in the table that should be read. If empty, all + * fields will be read. If the specified field is a nested field, all + * the sub-fields in the field will be selected. The output field order is + * unrelated to the order of fields in selected_fields. + *+ * + *
repeated string selected_fields = 1;
+ *
+ * @param index The index to set the value at.
+ * @param value The selectedFields to set.
+ * @return This builder for chaining.
+ */
+ public Builder setSelectedFields(int index, java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureSelectedFieldsIsMutable();
+ selectedFields_.set(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Names of the fields in the table that should be read. If empty, all + * fields will be read. If the specified field is a nested field, all + * the sub-fields in the field will be selected. The output field order is + * unrelated to the order of fields in selected_fields. + *+ * + *
repeated string selected_fields = 1;
+ *
+ * @param value The selectedFields to add.
+ * @return This builder for chaining.
+ */
+ public Builder addSelectedFields(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureSelectedFieldsIsMutable();
+ selectedFields_.add(value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Names of the fields in the table that should be read. If empty, all + * fields will be read. If the specified field is a nested field, all + * the sub-fields in the field will be selected. The output field order is + * unrelated to the order of fields in selected_fields. + *+ * + *
repeated string selected_fields = 1;
+ *
+ * @param values The selectedFields to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAllSelectedFields(java.lang.Iterable+ * Names of the fields in the table that should be read. If empty, all + * fields will be read. If the specified field is a nested field, all + * the sub-fields in the field will be selected. The output field order is + * unrelated to the order of fields in selected_fields. + *+ * + *
repeated string selected_fields = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearSelectedFields() {
+ selectedFields_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Names of the fields in the table that should be read. If empty, all + * fields will be read. If the specified field is a nested field, all + * the sub-fields in the field will be selected. The output field order is + * unrelated to the order of fields in selected_fields. + *+ * + *
repeated string selected_fields = 1;
+ *
+ * @param value The bytes of the selectedFields to add.
+ * @return This builder for chaining.
+ */
+ public Builder addSelectedFieldsBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ ensureSelectedFieldsIsMutable();
+ selectedFields_.add(value);
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object rowRestriction_ = "";
+ /**
+ *
+ *
+ * + * SQL text filtering statement, similar to a WHERE clause in a query. + * Currently, only a single predicate that is a comparison between a column + * and a constant value is supported. Aggregates are not supported. + * Examples: "int_field > 5" + * "date_field = CAST('2014-9-27' as DATE)" + * "nullable_field is not NULL" + * "st_equals(geo_field, st_geofromtext("POINT(2, 2)"))" + * "numeric_field BETWEEN 1.0 AND 5.0" + *+ * + *
string row_restriction = 2;
+ *
+ * @return The rowRestriction.
+ */
+ public java.lang.String getRowRestriction() {
+ java.lang.Object ref = rowRestriction_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ rowRestriction_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * SQL text filtering statement, similar to a WHERE clause in a query. + * Currently, only a single predicate that is a comparison between a column + * and a constant value is supported. Aggregates are not supported. + * Examples: "int_field > 5" + * "date_field = CAST('2014-9-27' as DATE)" + * "nullable_field is not NULL" + * "st_equals(geo_field, st_geofromtext("POINT(2, 2)"))" + * "numeric_field BETWEEN 1.0 AND 5.0" + *+ * + *
string row_restriction = 2;
+ *
+ * @return The bytes for rowRestriction.
+ */
+ public com.google.protobuf.ByteString getRowRestrictionBytes() {
+ java.lang.Object ref = rowRestriction_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ rowRestriction_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * SQL text filtering statement, similar to a WHERE clause in a query. + * Currently, only a single predicate that is a comparison between a column + * and a constant value is supported. Aggregates are not supported. + * Examples: "int_field > 5" + * "date_field = CAST('2014-9-27' as DATE)" + * "nullable_field is not NULL" + * "st_equals(geo_field, st_geofromtext("POINT(2, 2)"))" + * "numeric_field BETWEEN 1.0 AND 5.0" + *+ * + *
string row_restriction = 2;
+ *
+ * @param value The rowRestriction to set.
+ * @return This builder for chaining.
+ */
+ public Builder setRowRestriction(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ rowRestriction_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * SQL text filtering statement, similar to a WHERE clause in a query. + * Currently, only a single predicate that is a comparison between a column + * and a constant value is supported. Aggregates are not supported. + * Examples: "int_field > 5" + * "date_field = CAST('2014-9-27' as DATE)" + * "nullable_field is not NULL" + * "st_equals(geo_field, st_geofromtext("POINT(2, 2)"))" + * "numeric_field BETWEEN 1.0 AND 5.0" + *+ * + *
string row_restriction = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearRowRestriction() {
+
+ rowRestriction_ = getDefaultInstance().getRowRestriction();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * SQL text filtering statement, similar to a WHERE clause in a query. + * Currently, only a single predicate that is a comparison between a column + * and a constant value is supported. Aggregates are not supported. + * Examples: "int_field > 5" + * "date_field = CAST('2014-9-27' as DATE)" + * "nullable_field is not NULL" + * "st_equals(geo_field, st_geofromtext("POINT(2, 2)"))" + * "numeric_field BETWEEN 1.0 AND 5.0" + *+ * + *
string row_restriction = 2;
+ *
+ * @param value The bytes for rowRestriction to set.
+ * @return This builder for chaining.
+ */
+ public Builder setRowRestrictionBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ rowRestriction_ = value;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions)
+ private static final com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions();
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Output only. Unique identifier for the session, in the form + * `projects/{project_id}/locations/{location}/sessions/{session_id}`. + *+ * + *
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ * @return The name.
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Output only. Unique identifier for the session, in the form + * `projects/{project_id}/locations/{location}/sessions/{session_id}`. + *+ * + *
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ * @return The bytes for name.
+ */
+ public com.google.protobuf.ByteString getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int EXPIRE_TIME_FIELD_NUMBER = 2;
+ private com.google.protobuf.Timestamp expireTime_;
+ /**
+ *
+ *
+ * + * Output only. Time at which the session becomes invalid. After this time, subsequent + * requests to read this Session will return errors. The expire_time is + * automatically assigned and currently cannot be specified or updated. + *+ * + *
.google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return Whether the expireTime field is set.
+ */
+ public boolean hasExpireTime() {
+ return expireTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * Output only. Time at which the session becomes invalid. After this time, subsequent + * requests to read this Session will return errors. The expire_time is + * automatically assigned and currently cannot be specified or updated. + *+ * + *
.google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return The expireTime.
+ */
+ public com.google.protobuf.Timestamp getExpireTime() {
+ return expireTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expireTime_;
+ }
+ /**
+ *
+ *
+ * + * Output only. Time at which the session becomes invalid. After this time, subsequent + * requests to read this Session will return errors. The expire_time is + * automatically assigned and currently cannot be specified or updated. + *+ * + *
.google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() {
+ return getExpireTime();
+ }
+
+ public static final int DATA_FORMAT_FIELD_NUMBER = 3;
+ private int dataFormat_;
+ /**
+ *
+ *
+ * + * Immutable. Data format of the output data. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.DataFormat data_format = 3 [(.google.api.field_behavior) = IMMUTABLE];
+ *
+ *
+ * @return The enum numeric value on the wire for dataFormat.
+ */
+ public int getDataFormatValue() {
+ return dataFormat_;
+ }
+ /**
+ *
+ *
+ * + * Immutable. Data format of the output data. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.DataFormat data_format = 3 [(.google.api.field_behavior) = IMMUTABLE];
+ *
+ *
+ * @return The dataFormat.
+ */
+ public com.google.cloud.bigquery.storage.v1.DataFormat getDataFormat() {
+ @SuppressWarnings("deprecation")
+ com.google.cloud.bigquery.storage.v1.DataFormat result =
+ com.google.cloud.bigquery.storage.v1.DataFormat.valueOf(dataFormat_);
+ return result == null ? com.google.cloud.bigquery.storage.v1.DataFormat.UNRECOGNIZED : result;
+ }
+
+ public static final int AVRO_SCHEMA_FIELD_NUMBER = 4;
+ /**
+ *
+ *
+ * + * Output only. Avro schema. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.AvroSchema avro_schema = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return Whether the avroSchema field is set.
+ */
+ public boolean hasAvroSchema() {
+ return schemaCase_ == 4;
+ }
+ /**
+ *
+ *
+ * + * Output only. Avro schema. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.AvroSchema avro_schema = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return The avroSchema.
+ */
+ public com.google.cloud.bigquery.storage.v1.AvroSchema getAvroSchema() {
+ if (schemaCase_ == 4) {
+ return (com.google.cloud.bigquery.storage.v1.AvroSchema) schema_;
+ }
+ return com.google.cloud.bigquery.storage.v1.AvroSchema.getDefaultInstance();
+ }
+ /**
+ *
+ *
+ * + * Output only. Avro schema. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.AvroSchema avro_schema = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public com.google.cloud.bigquery.storage.v1.AvroSchemaOrBuilder getAvroSchemaOrBuilder() {
+ if (schemaCase_ == 4) {
+ return (com.google.cloud.bigquery.storage.v1.AvroSchema) schema_;
+ }
+ return com.google.cloud.bigquery.storage.v1.AvroSchema.getDefaultInstance();
+ }
+
+ public static final int ARROW_SCHEMA_FIELD_NUMBER = 5;
+ /**
+ *
+ *
+ * + * Output only. Arrow schema. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ArrowSchema arrow_schema = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return Whether the arrowSchema field is set.
+ */
+ public boolean hasArrowSchema() {
+ return schemaCase_ == 5;
+ }
+ /**
+ *
+ *
+ * + * Output only. Arrow schema. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ArrowSchema arrow_schema = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return The arrowSchema.
+ */
+ public com.google.cloud.bigquery.storage.v1.ArrowSchema getArrowSchema() {
+ if (schemaCase_ == 5) {
+ return (com.google.cloud.bigquery.storage.v1.ArrowSchema) schema_;
+ }
+ return com.google.cloud.bigquery.storage.v1.ArrowSchema.getDefaultInstance();
+ }
+ /**
+ *
+ *
+ * + * Output only. Arrow schema. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ArrowSchema arrow_schema = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public com.google.cloud.bigquery.storage.v1.ArrowSchemaOrBuilder getArrowSchemaOrBuilder() {
+ if (schemaCase_ == 5) {
+ return (com.google.cloud.bigquery.storage.v1.ArrowSchema) schema_;
+ }
+ return com.google.cloud.bigquery.storage.v1.ArrowSchema.getDefaultInstance();
+ }
+
+ public static final int TABLE_FIELD_NUMBER = 6;
+ private volatile java.lang.Object table_;
+ /**
+ *
+ *
+ * + * Immutable. Table that this ReadSession is reading from, in the form + * `projects/{project_id}/datasets/{dataset_id}/tables/{table_id} + *+ * + *
+ * string table = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The table.
+ */
+ public java.lang.String getTable() {
+ java.lang.Object ref = table_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ table_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Immutable. Table that this ReadSession is reading from, in the form + * `projects/{project_id}/datasets/{dataset_id}/tables/{table_id} + *+ * + *
+ * string table = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The bytes for table.
+ */
+ public com.google.protobuf.ByteString getTableBytes() {
+ java.lang.Object ref = table_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ table_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int TABLE_MODIFIERS_FIELD_NUMBER = 7;
+ private com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiers tableModifiers_;
+ /**
+ *
+ *
+ * + * Optional. Any modifiers which are applied when reading from the specified table. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ReadSession.TableModifiers table_modifiers = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the tableModifiers field is set.
+ */
+ public boolean hasTableModifiers() {
+ return tableModifiers_ != null;
+ }
+ /**
+ *
+ *
+ * + * Optional. Any modifiers which are applied when reading from the specified table. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ReadSession.TableModifiers table_modifiers = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The tableModifiers.
+ */
+ public com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiers getTableModifiers() {
+ return tableModifiers_ == null
+ ? com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiers.getDefaultInstance()
+ : tableModifiers_;
+ }
+ /**
+ *
+ *
+ * + * Optional. Any modifiers which are applied when reading from the specified table. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ReadSession.TableModifiers table_modifiers = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiersOrBuilder
+ getTableModifiersOrBuilder() {
+ return getTableModifiers();
+ }
+
+ public static final int READ_OPTIONS_FIELD_NUMBER = 8;
+ private com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions readOptions_;
+ /**
+ *
+ *
+ * + * Optional. Read options for this session (e.g. column selection, filters). + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions read_options = 8 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the readOptions field is set.
+ */
+ public boolean hasReadOptions() {
+ return readOptions_ != null;
+ }
+ /**
+ *
+ *
+ * + * Optional. Read options for this session (e.g. column selection, filters). + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions read_options = 8 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The readOptions.
+ */
+ public com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions getReadOptions() {
+ return readOptions_ == null
+ ? com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions.getDefaultInstance()
+ : readOptions_;
+ }
+ /**
+ *
+ *
+ * + * Optional. Read options for this session (e.g. column selection, filters). + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions read_options = 8 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptionsOrBuilder
+ getReadOptionsOrBuilder() {
+ return getReadOptions();
+ }
+
+ public static final int STREAMS_FIELD_NUMBER = 10;
+ private java.util.List+ * Output only. A list of streams created with the session. + * At least one stream is created with the session. In the future, larger + * request_stream_count values *may* result in this list being unpopulated, + * in that case, the user will need to use a List method to get the streams + * instead, which is not yet available. + *+ * + *
+ * repeated .google.cloud.bigquery.storage.v1.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public java.util.List+ * Output only. A list of streams created with the session. + * At least one stream is created with the session. In the future, larger + * request_stream_count values *may* result in this list being unpopulated, + * in that case, the user will need to use a List method to get the streams + * instead, which is not yet available. + *+ * + *
+ * repeated .google.cloud.bigquery.storage.v1.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public java.util.List extends com.google.cloud.bigquery.storage.v1.ReadStreamOrBuilder>
+ getStreamsOrBuilderList() {
+ return streams_;
+ }
+ /**
+ *
+ *
+ * + * Output only. A list of streams created with the session. + * At least one stream is created with the session. In the future, larger + * request_stream_count values *may* result in this list being unpopulated, + * in that case, the user will need to use a List method to get the streams + * instead, which is not yet available. + *+ * + *
+ * repeated .google.cloud.bigquery.storage.v1.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public int getStreamsCount() {
+ return streams_.size();
+ }
+ /**
+ *
+ *
+ * + * Output only. A list of streams created with the session. + * At least one stream is created with the session. In the future, larger + * request_stream_count values *may* result in this list being unpopulated, + * in that case, the user will need to use a List method to get the streams + * instead, which is not yet available. + *+ * + *
+ * repeated .google.cloud.bigquery.storage.v1.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public com.google.cloud.bigquery.storage.v1.ReadStream getStreams(int index) {
+ return streams_.get(index);
+ }
+ /**
+ *
+ *
+ * + * Output only. A list of streams created with the session. + * At least one stream is created with the session. In the future, larger + * request_stream_count values *may* result in this list being unpopulated, + * in that case, the user will need to use a List method to get the streams + * instead, which is not yet available. + *+ * + *
+ * repeated .google.cloud.bigquery.storage.v1.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public com.google.cloud.bigquery.storage.v1.ReadStreamOrBuilder getStreamsOrBuilder(int index) {
+ return streams_.get(index);
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!getNameBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
+ }
+ if (expireTime_ != null) {
+ output.writeMessage(2, getExpireTime());
+ }
+ if (dataFormat_
+ != com.google.cloud.bigquery.storage.v1.DataFormat.DATA_FORMAT_UNSPECIFIED.getNumber()) {
+ output.writeEnum(3, dataFormat_);
+ }
+ if (schemaCase_ == 4) {
+ output.writeMessage(4, (com.google.cloud.bigquery.storage.v1.AvroSchema) schema_);
+ }
+ if (schemaCase_ == 5) {
+ output.writeMessage(5, (com.google.cloud.bigquery.storage.v1.ArrowSchema) schema_);
+ }
+ if (!getTableBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 6, table_);
+ }
+ if (tableModifiers_ != null) {
+ output.writeMessage(7, getTableModifiers());
+ }
+ if (readOptions_ != null) {
+ output.writeMessage(8, getReadOptions());
+ }
+ for (int i = 0; i < streams_.size(); i++) {
+ output.writeMessage(10, streams_.get(i));
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getNameBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
+ }
+ if (expireTime_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getExpireTime());
+ }
+ if (dataFormat_
+ != com.google.cloud.bigquery.storage.v1.DataFormat.DATA_FORMAT_UNSPECIFIED.getNumber()) {
+ size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, dataFormat_);
+ }
+ if (schemaCase_ == 4) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 4, (com.google.cloud.bigquery.storage.v1.AvroSchema) schema_);
+ }
+ if (schemaCase_ == 5) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 5, (com.google.cloud.bigquery.storage.v1.ArrowSchema) schema_);
+ }
+ if (!getTableBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, table_);
+ }
+ if (tableModifiers_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getTableModifiers());
+ }
+ if (readOptions_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getReadOptions());
+ }
+ for (int i = 0; i < streams_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, streams_.get(i));
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.bigquery.storage.v1.ReadSession)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.bigquery.storage.v1.ReadSession other =
+ (com.google.cloud.bigquery.storage.v1.ReadSession) obj;
+
+ if (!getName().equals(other.getName())) return false;
+ if (hasExpireTime() != other.hasExpireTime()) return false;
+ if (hasExpireTime()) {
+ if (!getExpireTime().equals(other.getExpireTime())) return false;
+ }
+ if (dataFormat_ != other.dataFormat_) return false;
+ if (!getTable().equals(other.getTable())) return false;
+ if (hasTableModifiers() != other.hasTableModifiers()) return false;
+ if (hasTableModifiers()) {
+ if (!getTableModifiers().equals(other.getTableModifiers())) return false;
+ }
+ if (hasReadOptions() != other.hasReadOptions()) return false;
+ if (hasReadOptions()) {
+ if (!getReadOptions().equals(other.getReadOptions())) return false;
+ }
+ if (!getStreamsList().equals(other.getStreamsList())) return false;
+ if (!getSchemaCase().equals(other.getSchemaCase())) return false;
+ switch (schemaCase_) {
+ case 4:
+ if (!getAvroSchema().equals(other.getAvroSchema())) return false;
+ break;
+ case 5:
+ if (!getArrowSchema().equals(other.getArrowSchema())) return false;
+ break;
+ case 0:
+ default:
+ }
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getName().hashCode();
+ if (hasExpireTime()) {
+ hash = (37 * hash) + EXPIRE_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + getExpireTime().hashCode();
+ }
+ hash = (37 * hash) + DATA_FORMAT_FIELD_NUMBER;
+ hash = (53 * hash) + dataFormat_;
+ hash = (37 * hash) + TABLE_FIELD_NUMBER;
+ hash = (53 * hash) + getTable().hashCode();
+ if (hasTableModifiers()) {
+ hash = (37 * hash) + TABLE_MODIFIERS_FIELD_NUMBER;
+ hash = (53 * hash) + getTableModifiers().hashCode();
+ }
+ if (hasReadOptions()) {
+ hash = (37 * hash) + READ_OPTIONS_FIELD_NUMBER;
+ hash = (53 * hash) + getReadOptions().hashCode();
+ }
+ if (getStreamsCount() > 0) {
+ hash = (37 * hash) + STREAMS_FIELD_NUMBER;
+ hash = (53 * hash) + getStreamsList().hashCode();
+ }
+ switch (schemaCase_) {
+ case 4:
+ hash = (37 * hash) + AVRO_SCHEMA_FIELD_NUMBER;
+ hash = (53 * hash) + getAvroSchema().hashCode();
+ break;
+ case 5:
+ hash = (37 * hash) + ARROW_SCHEMA_FIELD_NUMBER;
+ hash = (53 * hash) + getArrowSchema().hashCode();
+ break;
+ case 0:
+ default:
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadSession parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadSession parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadSession parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadSession parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadSession parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadSession parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadSession parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadSession parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadSession parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadSession parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadSession parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadSession parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(com.google.cloud.bigquery.storage.v1.ReadSession prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * Information about the ReadSession. + *+ * + * Protobuf type {@code google.cloud.bigquery.storage.v1.ReadSession} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Output only. Unique identifier for the session, in the form + * `projects/{project_id}/locations/{location}/sessions/{session_id}`. + *+ * + *
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ * @return The name.
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Output only. Unique identifier for the session, in the form + * `projects/{project_id}/locations/{location}/sessions/{session_id}`. + *+ * + *
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ * @return The bytes for name.
+ */
+ public com.google.protobuf.ByteString getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Output only. Unique identifier for the session, in the form + * `projects/{project_id}/locations/{location}/sessions/{session_id}`. + *+ * + *
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ * @param value The name to set.
+ * @return This builder for chaining.
+ */
+ public Builder setName(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. Unique identifier for the session, in the form + * `projects/{project_id}/locations/{location}/sessions/{session_id}`. + *+ * + *
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearName() {
+
+ name_ = getDefaultInstance().getName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. Unique identifier for the session, in the form + * `projects/{project_id}/locations/{location}/sessions/{session_id}`. + *+ * + *
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ * @param value The bytes for name to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNameBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.Timestamp expireTime_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ expireTimeBuilder_;
+ /**
+ *
+ *
+ * + * Output only. Time at which the session becomes invalid. After this time, subsequent + * requests to read this Session will return errors. The expire_time is + * automatically assigned and currently cannot be specified or updated. + *+ * + *
+ * .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return Whether the expireTime field is set.
+ */
+ public boolean hasExpireTime() {
+ return expireTimeBuilder_ != null || expireTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * Output only. Time at which the session becomes invalid. After this time, subsequent + * requests to read this Session will return errors. The expire_time is + * automatically assigned and currently cannot be specified or updated. + *+ * + *
+ * .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return The expireTime.
+ */
+ public com.google.protobuf.Timestamp getExpireTime() {
+ if (expireTimeBuilder_ == null) {
+ return expireTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : expireTime_;
+ } else {
+ return expireTimeBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Output only. Time at which the session becomes invalid. After this time, subsequent + * requests to read this Session will return errors. The expire_time is + * automatically assigned and currently cannot be specified or updated. + *+ * + *
+ * .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder setExpireTime(com.google.protobuf.Timestamp value) {
+ if (expireTimeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ expireTime_ = value;
+ onChanged();
+ } else {
+ expireTimeBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. Time at which the session becomes invalid. After this time, subsequent + * requests to read this Session will return errors. The expire_time is + * automatically assigned and currently cannot be specified or updated. + *+ * + *
+ * .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder setExpireTime(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (expireTimeBuilder_ == null) {
+ expireTime_ = builderForValue.build();
+ onChanged();
+ } else {
+ expireTimeBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. Time at which the session becomes invalid. After this time, subsequent + * requests to read this Session will return errors. The expire_time is + * automatically assigned and currently cannot be specified or updated. + *+ * + *
+ * .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder mergeExpireTime(com.google.protobuf.Timestamp value) {
+ if (expireTimeBuilder_ == null) {
+ if (expireTime_ != null) {
+ expireTime_ =
+ com.google.protobuf.Timestamp.newBuilder(expireTime_).mergeFrom(value).buildPartial();
+ } else {
+ expireTime_ = value;
+ }
+ onChanged();
+ } else {
+ expireTimeBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. Time at which the session becomes invalid. After this time, subsequent + * requests to read this Session will return errors. The expire_time is + * automatically assigned and currently cannot be specified or updated. + *+ * + *
+ * .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder clearExpireTime() {
+ if (expireTimeBuilder_ == null) {
+ expireTime_ = null;
+ onChanged();
+ } else {
+ expireTime_ = null;
+ expireTimeBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. Time at which the session becomes invalid. After this time, subsequent + * requests to read this Session will return errors. The expire_time is + * automatically assigned and currently cannot be specified or updated. + *+ * + *
+ * .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public com.google.protobuf.Timestamp.Builder getExpireTimeBuilder() {
+
+ onChanged();
+ return getExpireTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Output only. Time at which the session becomes invalid. After this time, subsequent + * requests to read this Session will return errors. The expire_time is + * automatically assigned and currently cannot be specified or updated. + *+ * + *
+ * .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() {
+ if (expireTimeBuilder_ != null) {
+ return expireTimeBuilder_.getMessageOrBuilder();
+ } else {
+ return expireTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : expireTime_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Output only. Time at which the session becomes invalid. After this time, subsequent + * requests to read this Session will return errors. The expire_time is + * automatically assigned and currently cannot be specified or updated. + *+ * + *
+ * .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ getExpireTimeFieldBuilder() {
+ if (expireTimeBuilder_ == null) {
+ expireTimeBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>(
+ getExpireTime(), getParentForChildren(), isClean());
+ expireTime_ = null;
+ }
+ return expireTimeBuilder_;
+ }
+
+ private int dataFormat_ = 0;
+ /**
+ *
+ *
+ * + * Immutable. Data format of the output data. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.DataFormat data_format = 3 [(.google.api.field_behavior) = IMMUTABLE];
+ *
+ *
+ * @return The enum numeric value on the wire for dataFormat.
+ */
+ public int getDataFormatValue() {
+ return dataFormat_;
+ }
+ /**
+ *
+ *
+ * + * Immutable. Data format of the output data. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.DataFormat data_format = 3 [(.google.api.field_behavior) = IMMUTABLE];
+ *
+ *
+ * @param value The enum numeric value on the wire for dataFormat to set.
+ * @return This builder for chaining.
+ */
+ public Builder setDataFormatValue(int value) {
+ dataFormat_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Immutable. Data format of the output data. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.DataFormat data_format = 3 [(.google.api.field_behavior) = IMMUTABLE];
+ *
+ *
+ * @return The dataFormat.
+ */
+ public com.google.cloud.bigquery.storage.v1.DataFormat getDataFormat() {
+ @SuppressWarnings("deprecation")
+ com.google.cloud.bigquery.storage.v1.DataFormat result =
+ com.google.cloud.bigquery.storage.v1.DataFormat.valueOf(dataFormat_);
+ return result == null ? com.google.cloud.bigquery.storage.v1.DataFormat.UNRECOGNIZED : result;
+ }
+ /**
+ *
+ *
+ * + * Immutable. Data format of the output data. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.DataFormat data_format = 3 [(.google.api.field_behavior) = IMMUTABLE];
+ *
+ *
+ * @param value The dataFormat to set.
+ * @return This builder for chaining.
+ */
+ public Builder setDataFormat(com.google.cloud.bigquery.storage.v1.DataFormat value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ dataFormat_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Immutable. Data format of the output data. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.DataFormat data_format = 3 [(.google.api.field_behavior) = IMMUTABLE];
+ *
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearDataFormat() {
+
+ dataFormat_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1.AvroSchema,
+ com.google.cloud.bigquery.storage.v1.AvroSchema.Builder,
+ com.google.cloud.bigquery.storage.v1.AvroSchemaOrBuilder>
+ avroSchemaBuilder_;
+ /**
+ *
+ *
+ * + * Output only. Avro schema. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.AvroSchema avro_schema = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return Whether the avroSchema field is set.
+ */
+ public boolean hasAvroSchema() {
+ return schemaCase_ == 4;
+ }
+ /**
+ *
+ *
+ * + * Output only. Avro schema. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.AvroSchema avro_schema = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return The avroSchema.
+ */
+ public com.google.cloud.bigquery.storage.v1.AvroSchema getAvroSchema() {
+ if (avroSchemaBuilder_ == null) {
+ if (schemaCase_ == 4) {
+ return (com.google.cloud.bigquery.storage.v1.AvroSchema) schema_;
+ }
+ return com.google.cloud.bigquery.storage.v1.AvroSchema.getDefaultInstance();
+ } else {
+ if (schemaCase_ == 4) {
+ return avroSchemaBuilder_.getMessage();
+ }
+ return com.google.cloud.bigquery.storage.v1.AvroSchema.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * Output only. Avro schema. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.AvroSchema avro_schema = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder setAvroSchema(com.google.cloud.bigquery.storage.v1.AvroSchema value) {
+ if (avroSchemaBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ schema_ = value;
+ onChanged();
+ } else {
+ avroSchemaBuilder_.setMessage(value);
+ }
+ schemaCase_ = 4;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. Avro schema. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.AvroSchema avro_schema = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder setAvroSchema(
+ com.google.cloud.bigquery.storage.v1.AvroSchema.Builder builderForValue) {
+ if (avroSchemaBuilder_ == null) {
+ schema_ = builderForValue.build();
+ onChanged();
+ } else {
+ avroSchemaBuilder_.setMessage(builderForValue.build());
+ }
+ schemaCase_ = 4;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. Avro schema. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.AvroSchema avro_schema = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder mergeAvroSchema(com.google.cloud.bigquery.storage.v1.AvroSchema value) {
+ if (avroSchemaBuilder_ == null) {
+ if (schemaCase_ == 4
+ && schema_ != com.google.cloud.bigquery.storage.v1.AvroSchema.getDefaultInstance()) {
+ schema_ =
+ com.google.cloud.bigquery.storage.v1.AvroSchema.newBuilder(
+ (com.google.cloud.bigquery.storage.v1.AvroSchema) schema_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ schema_ = value;
+ }
+ onChanged();
+ } else {
+ if (schemaCase_ == 4) {
+ avroSchemaBuilder_.mergeFrom(value);
+ }
+ avroSchemaBuilder_.setMessage(value);
+ }
+ schemaCase_ = 4;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. Avro schema. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.AvroSchema avro_schema = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder clearAvroSchema() {
+ if (avroSchemaBuilder_ == null) {
+ if (schemaCase_ == 4) {
+ schemaCase_ = 0;
+ schema_ = null;
+ onChanged();
+ }
+ } else {
+ if (schemaCase_ == 4) {
+ schemaCase_ = 0;
+ schema_ = null;
+ }
+ avroSchemaBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. Avro schema. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.AvroSchema avro_schema = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public com.google.cloud.bigquery.storage.v1.AvroSchema.Builder getAvroSchemaBuilder() {
+ return getAvroSchemaFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Output only. Avro schema. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.AvroSchema avro_schema = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public com.google.cloud.bigquery.storage.v1.AvroSchemaOrBuilder getAvroSchemaOrBuilder() {
+ if ((schemaCase_ == 4) && (avroSchemaBuilder_ != null)) {
+ return avroSchemaBuilder_.getMessageOrBuilder();
+ } else {
+ if (schemaCase_ == 4) {
+ return (com.google.cloud.bigquery.storage.v1.AvroSchema) schema_;
+ }
+ return com.google.cloud.bigquery.storage.v1.AvroSchema.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * Output only. Avro schema. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.AvroSchema avro_schema = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1.AvroSchema,
+ com.google.cloud.bigquery.storage.v1.AvroSchema.Builder,
+ com.google.cloud.bigquery.storage.v1.AvroSchemaOrBuilder>
+ getAvroSchemaFieldBuilder() {
+ if (avroSchemaBuilder_ == null) {
+ if (!(schemaCase_ == 4)) {
+ schema_ = com.google.cloud.bigquery.storage.v1.AvroSchema.getDefaultInstance();
+ }
+ avroSchemaBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1.AvroSchema,
+ com.google.cloud.bigquery.storage.v1.AvroSchema.Builder,
+ com.google.cloud.bigquery.storage.v1.AvroSchemaOrBuilder>(
+ (com.google.cloud.bigquery.storage.v1.AvroSchema) schema_,
+ getParentForChildren(),
+ isClean());
+ schema_ = null;
+ }
+ schemaCase_ = 4;
+ onChanged();
+ ;
+ return avroSchemaBuilder_;
+ }
+
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1.ArrowSchema,
+ com.google.cloud.bigquery.storage.v1.ArrowSchema.Builder,
+ com.google.cloud.bigquery.storage.v1.ArrowSchemaOrBuilder>
+ arrowSchemaBuilder_;
+ /**
+ *
+ *
+ * + * Output only. Arrow schema. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ArrowSchema arrow_schema = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return Whether the arrowSchema field is set.
+ */
+ public boolean hasArrowSchema() {
+ return schemaCase_ == 5;
+ }
+ /**
+ *
+ *
+ * + * Output only. Arrow schema. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ArrowSchema arrow_schema = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return The arrowSchema.
+ */
+ public com.google.cloud.bigquery.storage.v1.ArrowSchema getArrowSchema() {
+ if (arrowSchemaBuilder_ == null) {
+ if (schemaCase_ == 5) {
+ return (com.google.cloud.bigquery.storage.v1.ArrowSchema) schema_;
+ }
+ return com.google.cloud.bigquery.storage.v1.ArrowSchema.getDefaultInstance();
+ } else {
+ if (schemaCase_ == 5) {
+ return arrowSchemaBuilder_.getMessage();
+ }
+ return com.google.cloud.bigquery.storage.v1.ArrowSchema.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * Output only. Arrow schema. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ArrowSchema arrow_schema = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder setArrowSchema(com.google.cloud.bigquery.storage.v1.ArrowSchema value) {
+ if (arrowSchemaBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ schema_ = value;
+ onChanged();
+ } else {
+ arrowSchemaBuilder_.setMessage(value);
+ }
+ schemaCase_ = 5;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. Arrow schema. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ArrowSchema arrow_schema = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder setArrowSchema(
+ com.google.cloud.bigquery.storage.v1.ArrowSchema.Builder builderForValue) {
+ if (arrowSchemaBuilder_ == null) {
+ schema_ = builderForValue.build();
+ onChanged();
+ } else {
+ arrowSchemaBuilder_.setMessage(builderForValue.build());
+ }
+ schemaCase_ = 5;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. Arrow schema. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ArrowSchema arrow_schema = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder mergeArrowSchema(com.google.cloud.bigquery.storage.v1.ArrowSchema value) {
+ if (arrowSchemaBuilder_ == null) {
+ if (schemaCase_ == 5
+ && schema_ != com.google.cloud.bigquery.storage.v1.ArrowSchema.getDefaultInstance()) {
+ schema_ =
+ com.google.cloud.bigquery.storage.v1.ArrowSchema.newBuilder(
+ (com.google.cloud.bigquery.storage.v1.ArrowSchema) schema_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ schema_ = value;
+ }
+ onChanged();
+ } else {
+ if (schemaCase_ == 5) {
+ arrowSchemaBuilder_.mergeFrom(value);
+ }
+ arrowSchemaBuilder_.setMessage(value);
+ }
+ schemaCase_ = 5;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. Arrow schema. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ArrowSchema arrow_schema = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder clearArrowSchema() {
+ if (arrowSchemaBuilder_ == null) {
+ if (schemaCase_ == 5) {
+ schemaCase_ = 0;
+ schema_ = null;
+ onChanged();
+ }
+ } else {
+ if (schemaCase_ == 5) {
+ schemaCase_ = 0;
+ schema_ = null;
+ }
+ arrowSchemaBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. Arrow schema. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ArrowSchema arrow_schema = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public com.google.cloud.bigquery.storage.v1.ArrowSchema.Builder getArrowSchemaBuilder() {
+ return getArrowSchemaFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Output only. Arrow schema. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ArrowSchema arrow_schema = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public com.google.cloud.bigquery.storage.v1.ArrowSchemaOrBuilder getArrowSchemaOrBuilder() {
+ if ((schemaCase_ == 5) && (arrowSchemaBuilder_ != null)) {
+ return arrowSchemaBuilder_.getMessageOrBuilder();
+ } else {
+ if (schemaCase_ == 5) {
+ return (com.google.cloud.bigquery.storage.v1.ArrowSchema) schema_;
+ }
+ return com.google.cloud.bigquery.storage.v1.ArrowSchema.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * Output only. Arrow schema. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ArrowSchema arrow_schema = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1.ArrowSchema,
+ com.google.cloud.bigquery.storage.v1.ArrowSchema.Builder,
+ com.google.cloud.bigquery.storage.v1.ArrowSchemaOrBuilder>
+ getArrowSchemaFieldBuilder() {
+ if (arrowSchemaBuilder_ == null) {
+ if (!(schemaCase_ == 5)) {
+ schema_ = com.google.cloud.bigquery.storage.v1.ArrowSchema.getDefaultInstance();
+ }
+ arrowSchemaBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1.ArrowSchema,
+ com.google.cloud.bigquery.storage.v1.ArrowSchema.Builder,
+ com.google.cloud.bigquery.storage.v1.ArrowSchemaOrBuilder>(
+ (com.google.cloud.bigquery.storage.v1.ArrowSchema) schema_,
+ getParentForChildren(),
+ isClean());
+ schema_ = null;
+ }
+ schemaCase_ = 5;
+ onChanged();
+ ;
+ return arrowSchemaBuilder_;
+ }
+
+ private java.lang.Object table_ = "";
+ /**
+ *
+ *
+ * + * Immutable. Table that this ReadSession is reading from, in the form + * `projects/{project_id}/datasets/{dataset_id}/tables/{table_id} + *+ * + *
+ * string table = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The table.
+ */
+ public java.lang.String getTable() {
+ java.lang.Object ref = table_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ table_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Immutable. Table that this ReadSession is reading from, in the form + * `projects/{project_id}/datasets/{dataset_id}/tables/{table_id} + *+ * + *
+ * string table = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The bytes for table.
+ */
+ public com.google.protobuf.ByteString getTableBytes() {
+ java.lang.Object ref = table_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ table_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Immutable. Table that this ReadSession is reading from, in the form + * `projects/{project_id}/datasets/{dataset_id}/tables/{table_id} + *+ * + *
+ * string table = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param value The table to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTable(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ table_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Immutable. Table that this ReadSession is reading from, in the form + * `projects/{project_id}/datasets/{dataset_id}/tables/{table_id} + *+ * + *
+ * string table = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearTable() {
+
+ table_ = getDefaultInstance().getTable();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Immutable. Table that this ReadSession is reading from, in the form + * `projects/{project_id}/datasets/{dataset_id}/tables/{table_id} + *+ * + *
+ * string table = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param value The bytes for table to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTableBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ table_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiers tableModifiers_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiers,
+ com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiers.Builder,
+ com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiersOrBuilder>
+ tableModifiersBuilder_;
+ /**
+ *
+ *
+ * + * Optional. Any modifiers which are applied when reading from the specified table. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ReadSession.TableModifiers table_modifiers = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the tableModifiers field is set.
+ */
+ public boolean hasTableModifiers() {
+ return tableModifiersBuilder_ != null || tableModifiers_ != null;
+ }
+ /**
+ *
+ *
+ * + * Optional. Any modifiers which are applied when reading from the specified table. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ReadSession.TableModifiers table_modifiers = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The tableModifiers.
+ */
+ public com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiers getTableModifiers() {
+ if (tableModifiersBuilder_ == null) {
+ return tableModifiers_ == null
+ ? com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiers.getDefaultInstance()
+ : tableModifiers_;
+ } else {
+ return tableModifiersBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. Any modifiers which are applied when reading from the specified table. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ReadSession.TableModifiers table_modifiers = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setTableModifiers(
+ com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiers value) {
+ if (tableModifiersBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ tableModifiers_ = value;
+ onChanged();
+ } else {
+ tableModifiersBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Any modifiers which are applied when reading from the specified table. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ReadSession.TableModifiers table_modifiers = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setTableModifiers(
+ com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiers.Builder builderForValue) {
+ if (tableModifiersBuilder_ == null) {
+ tableModifiers_ = builderForValue.build();
+ onChanged();
+ } else {
+ tableModifiersBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Any modifiers which are applied when reading from the specified table. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ReadSession.TableModifiers table_modifiers = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder mergeTableModifiers(
+ com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiers value) {
+ if (tableModifiersBuilder_ == null) {
+ if (tableModifiers_ != null) {
+ tableModifiers_ =
+ com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiers.newBuilder(
+ tableModifiers_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ tableModifiers_ = value;
+ }
+ onChanged();
+ } else {
+ tableModifiersBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Any modifiers which are applied when reading from the specified table. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ReadSession.TableModifiers table_modifiers = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder clearTableModifiers() {
+ if (tableModifiersBuilder_ == null) {
+ tableModifiers_ = null;
+ onChanged();
+ } else {
+ tableModifiers_ = null;
+ tableModifiersBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Any modifiers which are applied when reading from the specified table. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ReadSession.TableModifiers table_modifiers = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiers.Builder
+ getTableModifiersBuilder() {
+
+ onChanged();
+ return getTableModifiersFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Optional. Any modifiers which are applied when reading from the specified table. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ReadSession.TableModifiers table_modifiers = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiersOrBuilder
+ getTableModifiersOrBuilder() {
+ if (tableModifiersBuilder_ != null) {
+ return tableModifiersBuilder_.getMessageOrBuilder();
+ } else {
+ return tableModifiers_ == null
+ ? com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiers.getDefaultInstance()
+ : tableModifiers_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. Any modifiers which are applied when reading from the specified table. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ReadSession.TableModifiers table_modifiers = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiers,
+ com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiers.Builder,
+ com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiersOrBuilder>
+ getTableModifiersFieldBuilder() {
+ if (tableModifiersBuilder_ == null) {
+ tableModifiersBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiers,
+ com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiers.Builder,
+ com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiersOrBuilder>(
+ getTableModifiers(), getParentForChildren(), isClean());
+ tableModifiers_ = null;
+ }
+ return tableModifiersBuilder_;
+ }
+
+ private com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions readOptions_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions,
+ com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions.Builder,
+ com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptionsOrBuilder>
+ readOptionsBuilder_;
+ /**
+ *
+ *
+ * + * Optional. Read options for this session (e.g. column selection, filters). + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions read_options = 8 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the readOptions field is set.
+ */
+ public boolean hasReadOptions() {
+ return readOptionsBuilder_ != null || readOptions_ != null;
+ }
+ /**
+ *
+ *
+ * + * Optional. Read options for this session (e.g. column selection, filters). + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions read_options = 8 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The readOptions.
+ */
+ public com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions getReadOptions() {
+ if (readOptionsBuilder_ == null) {
+ return readOptions_ == null
+ ? com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions.getDefaultInstance()
+ : readOptions_;
+ } else {
+ return readOptionsBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. Read options for this session (e.g. column selection, filters). + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions read_options = 8 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setReadOptions(
+ com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions value) {
+ if (readOptionsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ readOptions_ = value;
+ onChanged();
+ } else {
+ readOptionsBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Read options for this session (e.g. column selection, filters). + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions read_options = 8 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setReadOptions(
+ com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions.Builder builderForValue) {
+ if (readOptionsBuilder_ == null) {
+ readOptions_ = builderForValue.build();
+ onChanged();
+ } else {
+ readOptionsBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Read options for this session (e.g. column selection, filters). + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions read_options = 8 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder mergeReadOptions(
+ com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions value) {
+ if (readOptionsBuilder_ == null) {
+ if (readOptions_ != null) {
+ readOptions_ =
+ com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions.newBuilder(
+ readOptions_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ readOptions_ = value;
+ }
+ onChanged();
+ } else {
+ readOptionsBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Read options for this session (e.g. column selection, filters). + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions read_options = 8 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder clearReadOptions() {
+ if (readOptionsBuilder_ == null) {
+ readOptions_ = null;
+ onChanged();
+ } else {
+ readOptions_ = null;
+ readOptionsBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Read options for this session (e.g. column selection, filters). + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions read_options = 8 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions.Builder
+ getReadOptionsBuilder() {
+
+ onChanged();
+ return getReadOptionsFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Optional. Read options for this session (e.g. column selection, filters). + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions read_options = 8 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptionsOrBuilder
+ getReadOptionsOrBuilder() {
+ if (readOptionsBuilder_ != null) {
+ return readOptionsBuilder_.getMessageOrBuilder();
+ } else {
+ return readOptions_ == null
+ ? com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions.getDefaultInstance()
+ : readOptions_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. Read options for this session (e.g. column selection, filters). + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions read_options = 8 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions,
+ com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions.Builder,
+ com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptionsOrBuilder>
+ getReadOptionsFieldBuilder() {
+ if (readOptionsBuilder_ == null) {
+ readOptionsBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions,
+ com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions.Builder,
+ com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptionsOrBuilder>(
+ getReadOptions(), getParentForChildren(), isClean());
+ readOptions_ = null;
+ }
+ return readOptionsBuilder_;
+ }
+
+ private java.util.List+ * Output only. A list of streams created with the session. + * At least one stream is created with the session. In the future, larger + * request_stream_count values *may* result in this list being unpopulated, + * in that case, the user will need to use a List method to get the streams + * instead, which is not yet available. + *+ * + *
+ * repeated .google.cloud.bigquery.storage.v1.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public java.util.List+ * Output only. A list of streams created with the session. + * At least one stream is created with the session. In the future, larger + * request_stream_count values *may* result in this list being unpopulated, + * in that case, the user will need to use a List method to get the streams + * instead, which is not yet available. + *+ * + *
+ * repeated .google.cloud.bigquery.storage.v1.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public int getStreamsCount() {
+ if (streamsBuilder_ == null) {
+ return streams_.size();
+ } else {
+ return streamsBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ *
+ * + * Output only. A list of streams created with the session. + * At least one stream is created with the session. In the future, larger + * request_stream_count values *may* result in this list being unpopulated, + * in that case, the user will need to use a List method to get the streams + * instead, which is not yet available. + *+ * + *
+ * repeated .google.cloud.bigquery.storage.v1.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public com.google.cloud.bigquery.storage.v1.ReadStream getStreams(int index) {
+ if (streamsBuilder_ == null) {
+ return streams_.get(index);
+ } else {
+ return streamsBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * Output only. A list of streams created with the session. + * At least one stream is created with the session. In the future, larger + * request_stream_count values *may* result in this list being unpopulated, + * in that case, the user will need to use a List method to get the streams + * instead, which is not yet available. + *+ * + *
+ * repeated .google.cloud.bigquery.storage.v1.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder setStreams(int index, com.google.cloud.bigquery.storage.v1.ReadStream value) {
+ if (streamsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureStreamsIsMutable();
+ streams_.set(index, value);
+ onChanged();
+ } else {
+ streamsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. A list of streams created with the session. + * At least one stream is created with the session. In the future, larger + * request_stream_count values *may* result in this list being unpopulated, + * in that case, the user will need to use a List method to get the streams + * instead, which is not yet available. + *+ * + *
+ * repeated .google.cloud.bigquery.storage.v1.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder setStreams(
+ int index, com.google.cloud.bigquery.storage.v1.ReadStream.Builder builderForValue) {
+ if (streamsBuilder_ == null) {
+ ensureStreamsIsMutable();
+ streams_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ streamsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. A list of streams created with the session. + * At least one stream is created with the session. In the future, larger + * request_stream_count values *may* result in this list being unpopulated, + * in that case, the user will need to use a List method to get the streams + * instead, which is not yet available. + *+ * + *
+ * repeated .google.cloud.bigquery.storage.v1.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder addStreams(com.google.cloud.bigquery.storage.v1.ReadStream value) {
+ if (streamsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureStreamsIsMutable();
+ streams_.add(value);
+ onChanged();
+ } else {
+ streamsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. A list of streams created with the session. + * At least one stream is created with the session. In the future, larger + * request_stream_count values *may* result in this list being unpopulated, + * in that case, the user will need to use a List method to get the streams + * instead, which is not yet available. + *+ * + *
+ * repeated .google.cloud.bigquery.storage.v1.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder addStreams(int index, com.google.cloud.bigquery.storage.v1.ReadStream value) {
+ if (streamsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureStreamsIsMutable();
+ streams_.add(index, value);
+ onChanged();
+ } else {
+ streamsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. A list of streams created with the session. + * At least one stream is created with the session. In the future, larger + * request_stream_count values *may* result in this list being unpopulated, + * in that case, the user will need to use a List method to get the streams + * instead, which is not yet available. + *+ * + *
+ * repeated .google.cloud.bigquery.storage.v1.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder addStreams(
+ com.google.cloud.bigquery.storage.v1.ReadStream.Builder builderForValue) {
+ if (streamsBuilder_ == null) {
+ ensureStreamsIsMutable();
+ streams_.add(builderForValue.build());
+ onChanged();
+ } else {
+ streamsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. A list of streams created with the session. + * At least one stream is created with the session. In the future, larger + * request_stream_count values *may* result in this list being unpopulated, + * in that case, the user will need to use a List method to get the streams + * instead, which is not yet available. + *+ * + *
+ * repeated .google.cloud.bigquery.storage.v1.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder addStreams(
+ int index, com.google.cloud.bigquery.storage.v1.ReadStream.Builder builderForValue) {
+ if (streamsBuilder_ == null) {
+ ensureStreamsIsMutable();
+ streams_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ streamsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. A list of streams created with the session. + * At least one stream is created with the session. In the future, larger + * request_stream_count values *may* result in this list being unpopulated, + * in that case, the user will need to use a List method to get the streams + * instead, which is not yet available. + *+ * + *
+ * repeated .google.cloud.bigquery.storage.v1.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder addAllStreams(
+ java.lang.Iterable extends com.google.cloud.bigquery.storage.v1.ReadStream> values) {
+ if (streamsBuilder_ == null) {
+ ensureStreamsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, streams_);
+ onChanged();
+ } else {
+ streamsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. A list of streams created with the session. + * At least one stream is created with the session. In the future, larger + * request_stream_count values *may* result in this list being unpopulated, + * in that case, the user will need to use a List method to get the streams + * instead, which is not yet available. + *+ * + *
+ * repeated .google.cloud.bigquery.storage.v1.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder clearStreams() {
+ if (streamsBuilder_ == null) {
+ streams_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ streamsBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. A list of streams created with the session. + * At least one stream is created with the session. In the future, larger + * request_stream_count values *may* result in this list being unpopulated, + * in that case, the user will need to use a List method to get the streams + * instead, which is not yet available. + *+ * + *
+ * repeated .google.cloud.bigquery.storage.v1.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder removeStreams(int index) {
+ if (streamsBuilder_ == null) {
+ ensureStreamsIsMutable();
+ streams_.remove(index);
+ onChanged();
+ } else {
+ streamsBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. A list of streams created with the session. + * At least one stream is created with the session. In the future, larger + * request_stream_count values *may* result in this list being unpopulated, + * in that case, the user will need to use a List method to get the streams + * instead, which is not yet available. + *+ * + *
+ * repeated .google.cloud.bigquery.storage.v1.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public com.google.cloud.bigquery.storage.v1.ReadStream.Builder getStreamsBuilder(int index) {
+ return getStreamsFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ *
+ * + * Output only. A list of streams created with the session. + * At least one stream is created with the session. In the future, larger + * request_stream_count values *may* result in this list being unpopulated, + * in that case, the user will need to use a List method to get the streams + * instead, which is not yet available. + *+ * + *
+ * repeated .google.cloud.bigquery.storage.v1.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public com.google.cloud.bigquery.storage.v1.ReadStreamOrBuilder getStreamsOrBuilder(int index) {
+ if (streamsBuilder_ == null) {
+ return streams_.get(index);
+ } else {
+ return streamsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * Output only. A list of streams created with the session. + * At least one stream is created with the session. In the future, larger + * request_stream_count values *may* result in this list being unpopulated, + * in that case, the user will need to use a List method to get the streams + * instead, which is not yet available. + *+ * + *
+ * repeated .google.cloud.bigquery.storage.v1.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public java.util.List extends com.google.cloud.bigquery.storage.v1.ReadStreamOrBuilder>
+ getStreamsOrBuilderList() {
+ if (streamsBuilder_ != null) {
+ return streamsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(streams_);
+ }
+ }
+ /**
+ *
+ *
+ * + * Output only. A list of streams created with the session. + * At least one stream is created with the session. In the future, larger + * request_stream_count values *may* result in this list being unpopulated, + * in that case, the user will need to use a List method to get the streams + * instead, which is not yet available. + *+ * + *
+ * repeated .google.cloud.bigquery.storage.v1.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public com.google.cloud.bigquery.storage.v1.ReadStream.Builder addStreamsBuilder() {
+ return getStreamsFieldBuilder()
+ .addBuilder(com.google.cloud.bigquery.storage.v1.ReadStream.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * Output only. A list of streams created with the session. + * At least one stream is created with the session. In the future, larger + * request_stream_count values *may* result in this list being unpopulated, + * in that case, the user will need to use a List method to get the streams + * instead, which is not yet available. + *+ * + *
+ * repeated .google.cloud.bigquery.storage.v1.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public com.google.cloud.bigquery.storage.v1.ReadStream.Builder addStreamsBuilder(int index) {
+ return getStreamsFieldBuilder()
+ .addBuilder(index, com.google.cloud.bigquery.storage.v1.ReadStream.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * Output only. A list of streams created with the session. + * At least one stream is created with the session. In the future, larger + * request_stream_count values *may* result in this list being unpopulated, + * in that case, the user will need to use a List method to get the streams + * instead, which is not yet available. + *+ * + *
+ * repeated .google.cloud.bigquery.storage.v1.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public java.util.List+ * Output only. Unique identifier for the session, in the form + * `projects/{project_id}/locations/{location}/sessions/{session_id}`. + *+ * + *
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ * @return The name.
+ */
+ java.lang.String getName();
+ /**
+ *
+ *
+ * + * Output only. Unique identifier for the session, in the form + * `projects/{project_id}/locations/{location}/sessions/{session_id}`. + *+ * + *
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ * @return The bytes for name.
+ */
+ com.google.protobuf.ByteString getNameBytes();
+
+ /**
+ *
+ *
+ * + * Output only. Time at which the session becomes invalid. After this time, subsequent + * requests to read this Session will return errors. The expire_time is + * automatically assigned and currently cannot be specified or updated. + *+ * + *
.google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return Whether the expireTime field is set.
+ */
+ boolean hasExpireTime();
+ /**
+ *
+ *
+ * + * Output only. Time at which the session becomes invalid. After this time, subsequent + * requests to read this Session will return errors. The expire_time is + * automatically assigned and currently cannot be specified or updated. + *+ * + *
.google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return The expireTime.
+ */
+ com.google.protobuf.Timestamp getExpireTime();
+ /**
+ *
+ *
+ * + * Output only. Time at which the session becomes invalid. After this time, subsequent + * requests to read this Session will return errors. The expire_time is + * automatically assigned and currently cannot be specified or updated. + *+ * + *
.google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder();
+
+ /**
+ *
+ *
+ * + * Immutable. Data format of the output data. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.DataFormat data_format = 3 [(.google.api.field_behavior) = IMMUTABLE];
+ *
+ *
+ * @return The enum numeric value on the wire for dataFormat.
+ */
+ int getDataFormatValue();
+ /**
+ *
+ *
+ * + * Immutable. Data format of the output data. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.DataFormat data_format = 3 [(.google.api.field_behavior) = IMMUTABLE];
+ *
+ *
+ * @return The dataFormat.
+ */
+ com.google.cloud.bigquery.storage.v1.DataFormat getDataFormat();
+
+ /**
+ *
+ *
+ * + * Output only. Avro schema. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.AvroSchema avro_schema = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return Whether the avroSchema field is set.
+ */
+ boolean hasAvroSchema();
+ /**
+ *
+ *
+ * + * Output only. Avro schema. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.AvroSchema avro_schema = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return The avroSchema.
+ */
+ com.google.cloud.bigquery.storage.v1.AvroSchema getAvroSchema();
+ /**
+ *
+ *
+ * + * Output only. Avro schema. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.AvroSchema avro_schema = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ com.google.cloud.bigquery.storage.v1.AvroSchemaOrBuilder getAvroSchemaOrBuilder();
+
+ /**
+ *
+ *
+ * + * Output only. Arrow schema. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ArrowSchema arrow_schema = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return Whether the arrowSchema field is set.
+ */
+ boolean hasArrowSchema();
+ /**
+ *
+ *
+ * + * Output only. Arrow schema. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ArrowSchema arrow_schema = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return The arrowSchema.
+ */
+ com.google.cloud.bigquery.storage.v1.ArrowSchema getArrowSchema();
+ /**
+ *
+ *
+ * + * Output only. Arrow schema. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ArrowSchema arrow_schema = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ com.google.cloud.bigquery.storage.v1.ArrowSchemaOrBuilder getArrowSchemaOrBuilder();
+
+ /**
+ *
+ *
+ * + * Immutable. Table that this ReadSession is reading from, in the form + * `projects/{project_id}/datasets/{dataset_id}/tables/{table_id} + *+ * + *
+ * string table = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The table.
+ */
+ java.lang.String getTable();
+ /**
+ *
+ *
+ * + * Immutable. Table that this ReadSession is reading from, in the form + * `projects/{project_id}/datasets/{dataset_id}/tables/{table_id} + *+ * + *
+ * string table = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The bytes for table.
+ */
+ com.google.protobuf.ByteString getTableBytes();
+
+ /**
+ *
+ *
+ * + * Optional. Any modifiers which are applied when reading from the specified table. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ReadSession.TableModifiers table_modifiers = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the tableModifiers field is set.
+ */
+ boolean hasTableModifiers();
+ /**
+ *
+ *
+ * + * Optional. Any modifiers which are applied when reading from the specified table. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ReadSession.TableModifiers table_modifiers = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The tableModifiers.
+ */
+ com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiers getTableModifiers();
+ /**
+ *
+ *
+ * + * Optional. Any modifiers which are applied when reading from the specified table. + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ReadSession.TableModifiers table_modifiers = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiersOrBuilder
+ getTableModifiersOrBuilder();
+
+ /**
+ *
+ *
+ * + * Optional. Read options for this session (e.g. column selection, filters). + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions read_options = 8 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the readOptions field is set.
+ */
+ boolean hasReadOptions();
+ /**
+ *
+ *
+ * + * Optional. Read options for this session (e.g. column selection, filters). + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions read_options = 8 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The readOptions.
+ */
+ com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions getReadOptions();
+ /**
+ *
+ *
+ * + * Optional. Read options for this session (e.g. column selection, filters). + *+ * + *
+ * .google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions read_options = 8 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptionsOrBuilder
+ getReadOptionsOrBuilder();
+
+ /**
+ *
+ *
+ * + * Output only. A list of streams created with the session. + * At least one stream is created with the session. In the future, larger + * request_stream_count values *may* result in this list being unpopulated, + * in that case, the user will need to use a List method to get the streams + * instead, which is not yet available. + *+ * + *
+ * repeated .google.cloud.bigquery.storage.v1.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ java.util.List+ * Output only. A list of streams created with the session. + * At least one stream is created with the session. In the future, larger + * request_stream_count values *may* result in this list being unpopulated, + * in that case, the user will need to use a List method to get the streams + * instead, which is not yet available. + *+ * + *
+ * repeated .google.cloud.bigquery.storage.v1.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ com.google.cloud.bigquery.storage.v1.ReadStream getStreams(int index);
+ /**
+ *
+ *
+ * + * Output only. A list of streams created with the session. + * At least one stream is created with the session. In the future, larger + * request_stream_count values *may* result in this list being unpopulated, + * in that case, the user will need to use a List method to get the streams + * instead, which is not yet available. + *+ * + *
+ * repeated .google.cloud.bigquery.storage.v1.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ int getStreamsCount();
+ /**
+ *
+ *
+ * + * Output only. A list of streams created with the session. + * At least one stream is created with the session. In the future, larger + * request_stream_count values *may* result in this list being unpopulated, + * in that case, the user will need to use a List method to get the streams + * instead, which is not yet available. + *+ * + *
+ * repeated .google.cloud.bigquery.storage.v1.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ java.util.List extends com.google.cloud.bigquery.storage.v1.ReadStreamOrBuilder>
+ getStreamsOrBuilderList();
+ /**
+ *
+ *
+ * + * Output only. A list of streams created with the session. + * At least one stream is created with the session. In the future, larger + * request_stream_count values *may* result in this list being unpopulated, + * in that case, the user will need to use a List method to get the streams + * instead, which is not yet available. + *+ * + *
+ * repeated .google.cloud.bigquery.storage.v1.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ com.google.cloud.bigquery.storage.v1.ReadStreamOrBuilder getStreamsOrBuilder(int index);
+
+ public com.google.cloud.bigquery.storage.v1.ReadSession.SchemaCase getSchemaCase();
+}
diff --git a/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/ReadStream.java b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/ReadStream.java
new file mode 100644
index 0000000000..bd960bd7fa
--- /dev/null
+++ b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/ReadStream.java
@@ -0,0 +1,644 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
+ *
+ * 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.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/bigquery/storage/v1/stream.proto
+
+package com.google.cloud.bigquery.storage.v1;
+
+/**
+ *
+ *
+ * + * Information about a single stream that gets data out of the storage system. + * Most of the information about `ReadStream` instances is aggregated, making + * `ReadStream` lightweight. + *+ * + * Protobuf type {@code google.cloud.bigquery.storage.v1.ReadStream} + */ +public final class ReadStream extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.bigquery.storage.v1.ReadStream) + ReadStreamOrBuilder { + private static final long serialVersionUID = 0L; + // Use ReadStream.newBuilder() to construct. + private ReadStream(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private ReadStream() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ReadStream(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ReadStream( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.bigquery.storage.v1.StreamProto + .internal_static_google_cloud_bigquery_storage_v1_ReadStream_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.bigquery.storage.v1.StreamProto + .internal_static_google_cloud_bigquery_storage_v1_ReadStream_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.bigquery.storage.v1.ReadStream.class, + com.google.cloud.bigquery.storage.v1.ReadStream.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+ * Output only. Name of the stream, in the form + * `projects/{project_id}/locations/{location}/sessions/{session_id}/streams/{stream_id}`. + *+ * + *
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ * @return The name.
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Output only. Name of the stream, in the form + * `projects/{project_id}/locations/{location}/sessions/{session_id}/streams/{stream_id}`. + *+ * + *
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ * @return The bytes for name.
+ */
+ public com.google.protobuf.ByteString getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!getNameBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getNameBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.bigquery.storage.v1.ReadStream)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.bigquery.storage.v1.ReadStream other =
+ (com.google.cloud.bigquery.storage.v1.ReadStream) obj;
+
+ if (!getName().equals(other.getName())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getName().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadStream parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadStream parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadStream parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadStream parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadStream parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadStream parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadStream parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadStream parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadStream parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadStream parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadStream parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadStream parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(com.google.cloud.bigquery.storage.v1.ReadStream prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * Information about a single stream that gets data out of the storage system. + * Most of the information about `ReadStream` instances is aggregated, making + * `ReadStream` lightweight. + *+ * + * Protobuf type {@code google.cloud.bigquery.storage.v1.ReadStream} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Output only. Name of the stream, in the form + * `projects/{project_id}/locations/{location}/sessions/{session_id}/streams/{stream_id}`. + *+ * + *
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ * @return The name.
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Output only. Name of the stream, in the form + * `projects/{project_id}/locations/{location}/sessions/{session_id}/streams/{stream_id}`. + *+ * + *
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ * @return The bytes for name.
+ */
+ public com.google.protobuf.ByteString getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Output only. Name of the stream, in the form + * `projects/{project_id}/locations/{location}/sessions/{session_id}/streams/{stream_id}`. + *+ * + *
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ * @param value The name to set.
+ * @return This builder for chaining.
+ */
+ public Builder setName(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. Name of the stream, in the form + * `projects/{project_id}/locations/{location}/sessions/{session_id}/streams/{stream_id}`. + *+ * + *
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearName() {
+
+ name_ = getDefaultInstance().getName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. Name of the stream, in the form + * `projects/{project_id}/locations/{location}/sessions/{session_id}/streams/{stream_id}`. + *+ * + *
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ * @param value The bytes for name to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNameBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.bigquery.storage.v1.ReadStream)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.bigquery.storage.v1.ReadStream)
+ private static final com.google.cloud.bigquery.storage.v1.ReadStream DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.bigquery.storage.v1.ReadStream();
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.ReadStream getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Output only. Name of the stream, in the form + * `projects/{project_id}/locations/{location}/sessions/{session_id}/streams/{stream_id}`. + *+ * + *
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ * @return The name.
+ */
+ java.lang.String getName();
+ /**
+ *
+ *
+ * + * Output only. Name of the stream, in the form + * `projects/{project_id}/locations/{location}/sessions/{session_id}/streams/{stream_id}`. + *+ * + *
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ * @return The bytes for name.
+ */
+ com.google.protobuf.ByteString getNameBytes();
+}
diff --git a/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/SplitReadStreamRequest.java b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/SplitReadStreamRequest.java
new file mode 100644
index 0000000000..f4ba015ecd
--- /dev/null
+++ b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/SplitReadStreamRequest.java
@@ -0,0 +1,765 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
+ *
+ * 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.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/bigquery/storage/v1/storage.proto
+
+package com.google.cloud.bigquery.storage.v1;
+
+/**
+ *
+ *
+ * + * Request message for `SplitReadStream`. + *+ * + * Protobuf type {@code google.cloud.bigquery.storage.v1.SplitReadStreamRequest} + */ +public final class SplitReadStreamRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.bigquery.storage.v1.SplitReadStreamRequest) + SplitReadStreamRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use SplitReadStreamRequest.newBuilder() to construct. + private SplitReadStreamRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private SplitReadStreamRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SplitReadStreamRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SplitReadStreamRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 17: + { + fraction_ = input.readDouble(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.bigquery.storage.v1.StorageProto + .internal_static_google_cloud_bigquery_storage_v1_SplitReadStreamRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.bigquery.storage.v1.StorageProto + .internal_static_google_cloud_bigquery_storage_v1_SplitReadStreamRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.bigquery.storage.v1.SplitReadStreamRequest.class, + com.google.cloud.bigquery.storage.v1.SplitReadStreamRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+ * Required. Name of the stream to split. + *+ * + *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The name.
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Name of the stream to split. + *+ * + *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The bytes for name.
+ */
+ public com.google.protobuf.ByteString getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int FRACTION_FIELD_NUMBER = 2;
+ private double fraction_;
+ /**
+ *
+ *
+ * + * A value in the range (0.0, 1.0) that specifies the fractional point at + * which the original stream should be split. The actual split point is + * evaluated on pre-filtered rows, so if a filter is provided, then there is + * no guarantee that the division of the rows between the new child streams + * will be proportional to this fractional value. Additionally, because the + * server-side unit for assigning data is collections of rows, this fraction + * will always map to a data storage boundary on the server side. + *+ * + *
double fraction = 2;
+ *
+ * @return The fraction.
+ */
+ public double getFraction() {
+ return fraction_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!getNameBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
+ }
+ if (fraction_ != 0D) {
+ output.writeDouble(2, fraction_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getNameBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
+ }
+ if (fraction_ != 0D) {
+ size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, fraction_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.bigquery.storage.v1.SplitReadStreamRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.bigquery.storage.v1.SplitReadStreamRequest other =
+ (com.google.cloud.bigquery.storage.v1.SplitReadStreamRequest) obj;
+
+ if (!getName().equals(other.getName())) return false;
+ if (java.lang.Double.doubleToLongBits(getFraction())
+ != java.lang.Double.doubleToLongBits(other.getFraction())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getName().hashCode();
+ hash = (37 * hash) + FRACTION_FIELD_NUMBER;
+ hash =
+ (53 * hash)
+ + com.google.protobuf.Internal.hashLong(
+ java.lang.Double.doubleToLongBits(getFraction()));
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.SplitReadStreamRequest parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.SplitReadStreamRequest parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.SplitReadStreamRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.SplitReadStreamRequest parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.SplitReadStreamRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.SplitReadStreamRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.SplitReadStreamRequest parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.SplitReadStreamRequest parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.SplitReadStreamRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.SplitReadStreamRequest parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.SplitReadStreamRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.SplitReadStreamRequest parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.cloud.bigquery.storage.v1.SplitReadStreamRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * Request message for `SplitReadStream`. + *+ * + * Protobuf type {@code google.cloud.bigquery.storage.v1.SplitReadStreamRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Required. Name of the stream to split. + *+ * + *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The name.
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Name of the stream to split. + *+ * + *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The bytes for name.
+ */
+ public com.google.protobuf.ByteString getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Name of the stream to split. + *+ * + *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param value The name to set.
+ * @return This builder for chaining.
+ */
+ public Builder setName(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Name of the stream to split. + *+ * + *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearName() {
+
+ name_ = getDefaultInstance().getName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Name of the stream to split. + *+ * + *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param value The bytes for name to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNameBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+
+ private double fraction_;
+ /**
+ *
+ *
+ * + * A value in the range (0.0, 1.0) that specifies the fractional point at + * which the original stream should be split. The actual split point is + * evaluated on pre-filtered rows, so if a filter is provided, then there is + * no guarantee that the division of the rows between the new child streams + * will be proportional to this fractional value. Additionally, because the + * server-side unit for assigning data is collections of rows, this fraction + * will always map to a data storage boundary on the server side. + *+ * + *
double fraction = 2;
+ *
+ * @return The fraction.
+ */
+ public double getFraction() {
+ return fraction_;
+ }
+ /**
+ *
+ *
+ * + * A value in the range (0.0, 1.0) that specifies the fractional point at + * which the original stream should be split. The actual split point is + * evaluated on pre-filtered rows, so if a filter is provided, then there is + * no guarantee that the division of the rows between the new child streams + * will be proportional to this fractional value. Additionally, because the + * server-side unit for assigning data is collections of rows, this fraction + * will always map to a data storage boundary on the server side. + *+ * + *
double fraction = 2;
+ *
+ * @param value The fraction to set.
+ * @return This builder for chaining.
+ */
+ public Builder setFraction(double value) {
+
+ fraction_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A value in the range (0.0, 1.0) that specifies the fractional point at + * which the original stream should be split. The actual split point is + * evaluated on pre-filtered rows, so if a filter is provided, then there is + * no guarantee that the division of the rows between the new child streams + * will be proportional to this fractional value. Additionally, because the + * server-side unit for assigning data is collections of rows, this fraction + * will always map to a data storage boundary on the server side. + *+ * + *
double fraction = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearFraction() {
+
+ fraction_ = 0D;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.bigquery.storage.v1.SplitReadStreamRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.bigquery.storage.v1.SplitReadStreamRequest)
+ private static final com.google.cloud.bigquery.storage.v1.SplitReadStreamRequest DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.bigquery.storage.v1.SplitReadStreamRequest();
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.SplitReadStreamRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Required. Name of the stream to split. + *+ * + *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The name.
+ */
+ java.lang.String getName();
+ /**
+ *
+ *
+ * + * Required. Name of the stream to split. + *+ * + *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The bytes for name.
+ */
+ com.google.protobuf.ByteString getNameBytes();
+
+ /**
+ *
+ *
+ * + * A value in the range (0.0, 1.0) that specifies the fractional point at + * which the original stream should be split. The actual split point is + * evaluated on pre-filtered rows, so if a filter is provided, then there is + * no guarantee that the division of the rows between the new child streams + * will be proportional to this fractional value. Additionally, because the + * server-side unit for assigning data is collections of rows, this fraction + * will always map to a data storage boundary on the server side. + *+ * + *
double fraction = 2;
+ *
+ * @return The fraction.
+ */
+ double getFraction();
+}
diff --git a/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/SplitReadStreamResponse.java b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/SplitReadStreamResponse.java
new file mode 100644
index 0000000000..0e80d230c3
--- /dev/null
+++ b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/SplitReadStreamResponse.java
@@ -0,0 +1,1046 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
+ *
+ * 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.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/bigquery/storage/v1/storage.proto
+
+package com.google.cloud.bigquery.storage.v1;
+
+/**
+ *
+ *
+ * + * Response message for `SplitReadStream`. + *+ * + * Protobuf type {@code google.cloud.bigquery.storage.v1.SplitReadStreamResponse} + */ +public final class SplitReadStreamResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.bigquery.storage.v1.SplitReadStreamResponse) + SplitReadStreamResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use SplitReadStreamResponse.newBuilder() to construct. + private SplitReadStreamResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private SplitReadStreamResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SplitReadStreamResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SplitReadStreamResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.bigquery.storage.v1.ReadStream.Builder subBuilder = null; + if (primaryStream_ != null) { + subBuilder = primaryStream_.toBuilder(); + } + primaryStream_ = + input.readMessage( + com.google.cloud.bigquery.storage.v1.ReadStream.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(primaryStream_); + primaryStream_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.cloud.bigquery.storage.v1.ReadStream.Builder subBuilder = null; + if (remainderStream_ != null) { + subBuilder = remainderStream_.toBuilder(); + } + remainderStream_ = + input.readMessage( + com.google.cloud.bigquery.storage.v1.ReadStream.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(remainderStream_); + remainderStream_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.bigquery.storage.v1.StorageProto + .internal_static_google_cloud_bigquery_storage_v1_SplitReadStreamResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.bigquery.storage.v1.StorageProto + .internal_static_google_cloud_bigquery_storage_v1_SplitReadStreamResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.bigquery.storage.v1.SplitReadStreamResponse.class, + com.google.cloud.bigquery.storage.v1.SplitReadStreamResponse.Builder.class); + } + + public static final int PRIMARY_STREAM_FIELD_NUMBER = 1; + private com.google.cloud.bigquery.storage.v1.ReadStream primaryStream_; + /** + * + * + *
+ * Primary stream, which contains the beginning portion of + * |original_stream|. An empty value indicates that the original stream can no + * longer be split. + *+ * + *
.google.cloud.bigquery.storage.v1.ReadStream primary_stream = 1;
+ *
+ * @return Whether the primaryStream field is set.
+ */
+ public boolean hasPrimaryStream() {
+ return primaryStream_ != null;
+ }
+ /**
+ *
+ *
+ * + * Primary stream, which contains the beginning portion of + * |original_stream|. An empty value indicates that the original stream can no + * longer be split. + *+ * + *
.google.cloud.bigquery.storage.v1.ReadStream primary_stream = 1;
+ *
+ * @return The primaryStream.
+ */
+ public com.google.cloud.bigquery.storage.v1.ReadStream getPrimaryStream() {
+ return primaryStream_ == null
+ ? com.google.cloud.bigquery.storage.v1.ReadStream.getDefaultInstance()
+ : primaryStream_;
+ }
+ /**
+ *
+ *
+ * + * Primary stream, which contains the beginning portion of + * |original_stream|. An empty value indicates that the original stream can no + * longer be split. + *+ * + *
.google.cloud.bigquery.storage.v1.ReadStream primary_stream = 1;
+ */
+ public com.google.cloud.bigquery.storage.v1.ReadStreamOrBuilder getPrimaryStreamOrBuilder() {
+ return getPrimaryStream();
+ }
+
+ public static final int REMAINDER_STREAM_FIELD_NUMBER = 2;
+ private com.google.cloud.bigquery.storage.v1.ReadStream remainderStream_;
+ /**
+ *
+ *
+ * + * Remainder stream, which contains the tail of |original_stream|. An empty + * value indicates that the original stream can no longer be split. + *+ * + *
.google.cloud.bigquery.storage.v1.ReadStream remainder_stream = 2;
+ *
+ * @return Whether the remainderStream field is set.
+ */
+ public boolean hasRemainderStream() {
+ return remainderStream_ != null;
+ }
+ /**
+ *
+ *
+ * + * Remainder stream, which contains the tail of |original_stream|. An empty + * value indicates that the original stream can no longer be split. + *+ * + *
.google.cloud.bigquery.storage.v1.ReadStream remainder_stream = 2;
+ *
+ * @return The remainderStream.
+ */
+ public com.google.cloud.bigquery.storage.v1.ReadStream getRemainderStream() {
+ return remainderStream_ == null
+ ? com.google.cloud.bigquery.storage.v1.ReadStream.getDefaultInstance()
+ : remainderStream_;
+ }
+ /**
+ *
+ *
+ * + * Remainder stream, which contains the tail of |original_stream|. An empty + * value indicates that the original stream can no longer be split. + *+ * + *
.google.cloud.bigquery.storage.v1.ReadStream remainder_stream = 2;
+ */
+ public com.google.cloud.bigquery.storage.v1.ReadStreamOrBuilder getRemainderStreamOrBuilder() {
+ return getRemainderStream();
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (primaryStream_ != null) {
+ output.writeMessage(1, getPrimaryStream());
+ }
+ if (remainderStream_ != null) {
+ output.writeMessage(2, getRemainderStream());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (primaryStream_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPrimaryStream());
+ }
+ if (remainderStream_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getRemainderStream());
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.bigquery.storage.v1.SplitReadStreamResponse)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.bigquery.storage.v1.SplitReadStreamResponse other =
+ (com.google.cloud.bigquery.storage.v1.SplitReadStreamResponse) obj;
+
+ if (hasPrimaryStream() != other.hasPrimaryStream()) return false;
+ if (hasPrimaryStream()) {
+ if (!getPrimaryStream().equals(other.getPrimaryStream())) return false;
+ }
+ if (hasRemainderStream() != other.hasRemainderStream()) return false;
+ if (hasRemainderStream()) {
+ if (!getRemainderStream().equals(other.getRemainderStream())) return false;
+ }
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasPrimaryStream()) {
+ hash = (37 * hash) + PRIMARY_STREAM_FIELD_NUMBER;
+ hash = (53 * hash) + getPrimaryStream().hashCode();
+ }
+ if (hasRemainderStream()) {
+ hash = (37 * hash) + REMAINDER_STREAM_FIELD_NUMBER;
+ hash = (53 * hash) + getRemainderStream().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.SplitReadStreamResponse parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.SplitReadStreamResponse parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.SplitReadStreamResponse parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.SplitReadStreamResponse parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.SplitReadStreamResponse parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.SplitReadStreamResponse parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.SplitReadStreamResponse parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.SplitReadStreamResponse parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.SplitReadStreamResponse parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.SplitReadStreamResponse parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.SplitReadStreamResponse parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.SplitReadStreamResponse parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.cloud.bigquery.storage.v1.SplitReadStreamResponse prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * Response message for `SplitReadStream`. + *+ * + * Protobuf type {@code google.cloud.bigquery.storage.v1.SplitReadStreamResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Primary stream, which contains the beginning portion of + * |original_stream|. An empty value indicates that the original stream can no + * longer be split. + *+ * + *
.google.cloud.bigquery.storage.v1.ReadStream primary_stream = 1;
+ *
+ * @return Whether the primaryStream field is set.
+ */
+ public boolean hasPrimaryStream() {
+ return primaryStreamBuilder_ != null || primaryStream_ != null;
+ }
+ /**
+ *
+ *
+ * + * Primary stream, which contains the beginning portion of + * |original_stream|. An empty value indicates that the original stream can no + * longer be split. + *+ * + *
.google.cloud.bigquery.storage.v1.ReadStream primary_stream = 1;
+ *
+ * @return The primaryStream.
+ */
+ public com.google.cloud.bigquery.storage.v1.ReadStream getPrimaryStream() {
+ if (primaryStreamBuilder_ == null) {
+ return primaryStream_ == null
+ ? com.google.cloud.bigquery.storage.v1.ReadStream.getDefaultInstance()
+ : primaryStream_;
+ } else {
+ return primaryStreamBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Primary stream, which contains the beginning portion of + * |original_stream|. An empty value indicates that the original stream can no + * longer be split. + *+ * + *
.google.cloud.bigquery.storage.v1.ReadStream primary_stream = 1;
+ */
+ public Builder setPrimaryStream(com.google.cloud.bigquery.storage.v1.ReadStream value) {
+ if (primaryStreamBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ primaryStream_ = value;
+ onChanged();
+ } else {
+ primaryStreamBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Primary stream, which contains the beginning portion of + * |original_stream|. An empty value indicates that the original stream can no + * longer be split. + *+ * + *
.google.cloud.bigquery.storage.v1.ReadStream primary_stream = 1;
+ */
+ public Builder setPrimaryStream(
+ com.google.cloud.bigquery.storage.v1.ReadStream.Builder builderForValue) {
+ if (primaryStreamBuilder_ == null) {
+ primaryStream_ = builderForValue.build();
+ onChanged();
+ } else {
+ primaryStreamBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Primary stream, which contains the beginning portion of + * |original_stream|. An empty value indicates that the original stream can no + * longer be split. + *+ * + *
.google.cloud.bigquery.storage.v1.ReadStream primary_stream = 1;
+ */
+ public Builder mergePrimaryStream(com.google.cloud.bigquery.storage.v1.ReadStream value) {
+ if (primaryStreamBuilder_ == null) {
+ if (primaryStream_ != null) {
+ primaryStream_ =
+ com.google.cloud.bigquery.storage.v1.ReadStream.newBuilder(primaryStream_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ primaryStream_ = value;
+ }
+ onChanged();
+ } else {
+ primaryStreamBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Primary stream, which contains the beginning portion of + * |original_stream|. An empty value indicates that the original stream can no + * longer be split. + *+ * + *
.google.cloud.bigquery.storage.v1.ReadStream primary_stream = 1;
+ */
+ public Builder clearPrimaryStream() {
+ if (primaryStreamBuilder_ == null) {
+ primaryStream_ = null;
+ onChanged();
+ } else {
+ primaryStream_ = null;
+ primaryStreamBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Primary stream, which contains the beginning portion of + * |original_stream|. An empty value indicates that the original stream can no + * longer be split. + *+ * + *
.google.cloud.bigquery.storage.v1.ReadStream primary_stream = 1;
+ */
+ public com.google.cloud.bigquery.storage.v1.ReadStream.Builder getPrimaryStreamBuilder() {
+
+ onChanged();
+ return getPrimaryStreamFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Primary stream, which contains the beginning portion of + * |original_stream|. An empty value indicates that the original stream can no + * longer be split. + *+ * + *
.google.cloud.bigquery.storage.v1.ReadStream primary_stream = 1;
+ */
+ public com.google.cloud.bigquery.storage.v1.ReadStreamOrBuilder getPrimaryStreamOrBuilder() {
+ if (primaryStreamBuilder_ != null) {
+ return primaryStreamBuilder_.getMessageOrBuilder();
+ } else {
+ return primaryStream_ == null
+ ? com.google.cloud.bigquery.storage.v1.ReadStream.getDefaultInstance()
+ : primaryStream_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Primary stream, which contains the beginning portion of + * |original_stream|. An empty value indicates that the original stream can no + * longer be split. + *+ * + *
.google.cloud.bigquery.storage.v1.ReadStream primary_stream = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1.ReadStream,
+ com.google.cloud.bigquery.storage.v1.ReadStream.Builder,
+ com.google.cloud.bigquery.storage.v1.ReadStreamOrBuilder>
+ getPrimaryStreamFieldBuilder() {
+ if (primaryStreamBuilder_ == null) {
+ primaryStreamBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1.ReadStream,
+ com.google.cloud.bigquery.storage.v1.ReadStream.Builder,
+ com.google.cloud.bigquery.storage.v1.ReadStreamOrBuilder>(
+ getPrimaryStream(), getParentForChildren(), isClean());
+ primaryStream_ = null;
+ }
+ return primaryStreamBuilder_;
+ }
+
+ private com.google.cloud.bigquery.storage.v1.ReadStream remainderStream_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1.ReadStream,
+ com.google.cloud.bigquery.storage.v1.ReadStream.Builder,
+ com.google.cloud.bigquery.storage.v1.ReadStreamOrBuilder>
+ remainderStreamBuilder_;
+ /**
+ *
+ *
+ * + * Remainder stream, which contains the tail of |original_stream|. An empty + * value indicates that the original stream can no longer be split. + *+ * + *
.google.cloud.bigquery.storage.v1.ReadStream remainder_stream = 2;
+ *
+ * @return Whether the remainderStream field is set.
+ */
+ public boolean hasRemainderStream() {
+ return remainderStreamBuilder_ != null || remainderStream_ != null;
+ }
+ /**
+ *
+ *
+ * + * Remainder stream, which contains the tail of |original_stream|. An empty + * value indicates that the original stream can no longer be split. + *+ * + *
.google.cloud.bigquery.storage.v1.ReadStream remainder_stream = 2;
+ *
+ * @return The remainderStream.
+ */
+ public com.google.cloud.bigquery.storage.v1.ReadStream getRemainderStream() {
+ if (remainderStreamBuilder_ == null) {
+ return remainderStream_ == null
+ ? com.google.cloud.bigquery.storage.v1.ReadStream.getDefaultInstance()
+ : remainderStream_;
+ } else {
+ return remainderStreamBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Remainder stream, which contains the tail of |original_stream|. An empty + * value indicates that the original stream can no longer be split. + *+ * + *
.google.cloud.bigquery.storage.v1.ReadStream remainder_stream = 2;
+ */
+ public Builder setRemainderStream(com.google.cloud.bigquery.storage.v1.ReadStream value) {
+ if (remainderStreamBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ remainderStream_ = value;
+ onChanged();
+ } else {
+ remainderStreamBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Remainder stream, which contains the tail of |original_stream|. An empty + * value indicates that the original stream can no longer be split. + *+ * + *
.google.cloud.bigquery.storage.v1.ReadStream remainder_stream = 2;
+ */
+ public Builder setRemainderStream(
+ com.google.cloud.bigquery.storage.v1.ReadStream.Builder builderForValue) {
+ if (remainderStreamBuilder_ == null) {
+ remainderStream_ = builderForValue.build();
+ onChanged();
+ } else {
+ remainderStreamBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Remainder stream, which contains the tail of |original_stream|. An empty + * value indicates that the original stream can no longer be split. + *+ * + *
.google.cloud.bigquery.storage.v1.ReadStream remainder_stream = 2;
+ */
+ public Builder mergeRemainderStream(com.google.cloud.bigquery.storage.v1.ReadStream value) {
+ if (remainderStreamBuilder_ == null) {
+ if (remainderStream_ != null) {
+ remainderStream_ =
+ com.google.cloud.bigquery.storage.v1.ReadStream.newBuilder(remainderStream_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ remainderStream_ = value;
+ }
+ onChanged();
+ } else {
+ remainderStreamBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Remainder stream, which contains the tail of |original_stream|. An empty + * value indicates that the original stream can no longer be split. + *+ * + *
.google.cloud.bigquery.storage.v1.ReadStream remainder_stream = 2;
+ */
+ public Builder clearRemainderStream() {
+ if (remainderStreamBuilder_ == null) {
+ remainderStream_ = null;
+ onChanged();
+ } else {
+ remainderStream_ = null;
+ remainderStreamBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Remainder stream, which contains the tail of |original_stream|. An empty + * value indicates that the original stream can no longer be split. + *+ * + *
.google.cloud.bigquery.storage.v1.ReadStream remainder_stream = 2;
+ */
+ public com.google.cloud.bigquery.storage.v1.ReadStream.Builder getRemainderStreamBuilder() {
+
+ onChanged();
+ return getRemainderStreamFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Remainder stream, which contains the tail of |original_stream|. An empty + * value indicates that the original stream can no longer be split. + *+ * + *
.google.cloud.bigquery.storage.v1.ReadStream remainder_stream = 2;
+ */
+ public com.google.cloud.bigquery.storage.v1.ReadStreamOrBuilder getRemainderStreamOrBuilder() {
+ if (remainderStreamBuilder_ != null) {
+ return remainderStreamBuilder_.getMessageOrBuilder();
+ } else {
+ return remainderStream_ == null
+ ? com.google.cloud.bigquery.storage.v1.ReadStream.getDefaultInstance()
+ : remainderStream_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Remainder stream, which contains the tail of |original_stream|. An empty + * value indicates that the original stream can no longer be split. + *+ * + *
.google.cloud.bigquery.storage.v1.ReadStream remainder_stream = 2;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1.ReadStream,
+ com.google.cloud.bigquery.storage.v1.ReadStream.Builder,
+ com.google.cloud.bigquery.storage.v1.ReadStreamOrBuilder>
+ getRemainderStreamFieldBuilder() {
+ if (remainderStreamBuilder_ == null) {
+ remainderStreamBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1.ReadStream,
+ com.google.cloud.bigquery.storage.v1.ReadStream.Builder,
+ com.google.cloud.bigquery.storage.v1.ReadStreamOrBuilder>(
+ getRemainderStream(), getParentForChildren(), isClean());
+ remainderStream_ = null;
+ }
+ return remainderStreamBuilder_;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.bigquery.storage.v1.SplitReadStreamResponse)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.bigquery.storage.v1.SplitReadStreamResponse)
+ private static final com.google.cloud.bigquery.storage.v1.SplitReadStreamResponse
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.bigquery.storage.v1.SplitReadStreamResponse();
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.SplitReadStreamResponse getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Primary stream, which contains the beginning portion of + * |original_stream|. An empty value indicates that the original stream can no + * longer be split. + *+ * + *
.google.cloud.bigquery.storage.v1.ReadStream primary_stream = 1;
+ *
+ * @return Whether the primaryStream field is set.
+ */
+ boolean hasPrimaryStream();
+ /**
+ *
+ *
+ * + * Primary stream, which contains the beginning portion of + * |original_stream|. An empty value indicates that the original stream can no + * longer be split. + *+ * + *
.google.cloud.bigquery.storage.v1.ReadStream primary_stream = 1;
+ *
+ * @return The primaryStream.
+ */
+ com.google.cloud.bigquery.storage.v1.ReadStream getPrimaryStream();
+ /**
+ *
+ *
+ * + * Primary stream, which contains the beginning portion of + * |original_stream|. An empty value indicates that the original stream can no + * longer be split. + *+ * + *
.google.cloud.bigquery.storage.v1.ReadStream primary_stream = 1;
+ */
+ com.google.cloud.bigquery.storage.v1.ReadStreamOrBuilder getPrimaryStreamOrBuilder();
+
+ /**
+ *
+ *
+ * + * Remainder stream, which contains the tail of |original_stream|. An empty + * value indicates that the original stream can no longer be split. + *+ * + *
.google.cloud.bigquery.storage.v1.ReadStream remainder_stream = 2;
+ *
+ * @return Whether the remainderStream field is set.
+ */
+ boolean hasRemainderStream();
+ /**
+ *
+ *
+ * + * Remainder stream, which contains the tail of |original_stream|. An empty + * value indicates that the original stream can no longer be split. + *+ * + *
.google.cloud.bigquery.storage.v1.ReadStream remainder_stream = 2;
+ *
+ * @return The remainderStream.
+ */
+ com.google.cloud.bigquery.storage.v1.ReadStream getRemainderStream();
+ /**
+ *
+ *
+ * + * Remainder stream, which contains the tail of |original_stream|. An empty + * value indicates that the original stream can no longer be split. + *+ * + *
.google.cloud.bigquery.storage.v1.ReadStream remainder_stream = 2;
+ */
+ com.google.cloud.bigquery.storage.v1.ReadStreamOrBuilder getRemainderStreamOrBuilder();
+}
diff --git a/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/StorageProto.java b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/StorageProto.java
new file mode 100644
index 0000000000..48e0ce1b8d
--- /dev/null
+++ b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/StorageProto.java
@@ -0,0 +1,231 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
+ *
+ * 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.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/bigquery/storage/v1/storage.proto
+
+package com.google.cloud.bigquery.storage.v1;
+
+public final class StorageProto {
+ private StorageProto() {}
+
+ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {}
+
+ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) {
+ registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry);
+ }
+
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_bigquery_storage_v1_CreateReadSessionRequest_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_bigquery_storage_v1_CreateReadSessionRequest_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_bigquery_storage_v1_ReadRowsRequest_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_bigquery_storage_v1_ReadRowsRequest_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_bigquery_storage_v1_ThrottleState_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_bigquery_storage_v1_ThrottleState_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_bigquery_storage_v1_StreamStats_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_bigquery_storage_v1_StreamStats_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_bigquery_storage_v1_StreamStats_Progress_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_bigquery_storage_v1_StreamStats_Progress_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_bigquery_storage_v1_ReadRowsResponse_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_bigquery_storage_v1_ReadRowsResponse_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_bigquery_storage_v1_SplitReadStreamRequest_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_bigquery_storage_v1_SplitReadStreamRequest_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_bigquery_storage_v1_SplitReadStreamResponse_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_bigquery_storage_v1_SplitReadStreamResponse_fieldAccessorTable;
+
+ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ return descriptor;
+ }
+
+ private static com.google.protobuf.Descriptors.FileDescriptor descriptor;
+
+ static {
+ java.lang.String[] descriptorData = {
+ "\n.google/cloud/bigquery/storage/v1/stora"
+ + "ge.proto\022 google.cloud.bigquery.storage."
+ + "v1\032\034google/api/annotations.proto\032\027google"
+ + "/api/client.proto\032\037google/api/field_beha"
+ + "vior.proto\032\031google/api/resource.proto\032,g"
+ + "oogle/cloud/bigquery/storage/v1/arrow.pr"
+ + "oto\032+google/cloud/bigquery/storage/v1/av"
+ + "ro.proto\032-google/cloud/bigquery/storage/"
+ + "v1/stream.proto\"\303\001\n\030CreateReadSessionReq"
+ + "uest\022C\n\006parent\030\001 \001(\tB3\340A\002\372A-\n+cloudresou"
+ + "rcemanager.googleapis.com/Project\022H\n\014rea"
+ + "d_session\030\002 \001(\0132-.google.cloud.bigquery."
+ + "storage.v1.ReadSessionB\003\340A\002\022\030\n\020max_strea"
+ + "m_count\030\003 \001(\005\"i\n\017ReadRowsRequest\022F\n\013read"
+ + "_stream\030\001 \001(\tB1\340A\002\372A+\n)bigquerystorage.g"
+ + "oogleapis.com/ReadStream\022\016\n\006offset\030\002 \001(\003"
+ + "\")\n\rThrottleState\022\030\n\020throttle_percent\030\001 "
+ + "\001(\005\"\227\001\n\013StreamStats\022H\n\010progress\030\002 \001(\01326."
+ + "google.cloud.bigquery.storage.v1.StreamS"
+ + "tats.Progress\032>\n\010Progress\022\031\n\021at_response"
+ + "_start\030\001 \001(\001\022\027\n\017at_response_end\030\002 \001(\001\"\307\002"
+ + "\n\020ReadRowsResponse\022?\n\tavro_rows\030\003 \001(\0132*."
+ + "google.cloud.bigquery.storage.v1.AvroRow"
+ + "sH\000\022P\n\022arrow_record_batch\030\004 \001(\01322.google"
+ + ".cloud.bigquery.storage.v1.ArrowRecordBa"
+ + "tchH\000\022\021\n\trow_count\030\006 \001(\003\022<\n\005stats\030\002 \001(\0132"
+ + "-.google.cloud.bigquery.storage.v1.Strea"
+ + "mStats\022G\n\016throttle_state\030\005 \001(\0132/.google."
+ + "cloud.bigquery.storage.v1.ThrottleStateB"
+ + "\006\n\004rows\"k\n\026SplitReadStreamRequest\022?\n\004nam"
+ + "e\030\001 \001(\tB1\340A\002\372A+\n)bigquerystorage.googlea"
+ + "pis.com/ReadStream\022\020\n\010fraction\030\002 \001(\001\"\247\001\n"
+ + "\027SplitReadStreamResponse\022D\n\016primary_stre"
+ + "am\030\001 \001(\0132,.google.cloud.bigquery.storage"
+ + ".v1.ReadStream\022F\n\020remainder_stream\030\002 \001(\013"
+ + "2,.google.cloud.bigquery.storage.v1.Read"
+ + "Stream2\306\006\n\014BigQueryRead\022\351\001\n\021CreateReadSe"
+ + "ssion\022:.google.cloud.bigquery.storage.v1"
+ + ".CreateReadSessionRequest\032-.google.cloud"
+ + ".bigquery.storage.v1.ReadSession\"i\202\323\344\223\002<"
+ + "\"7/v1/{read_session.table=projects/*/dat"
+ + "asets/*/tables/*}:\001*\332A$parent,read_sessi"
+ + "on,max_stream_count\022\317\001\n\010ReadRows\0221.googl"
+ + "e.cloud.bigquery.storage.v1.ReadRowsRequ"
+ + "est\0322.google.cloud.bigquery.storage.v1.R"
+ + "eadRowsResponse\"Z\202\323\344\223\002?\022=/v1/{read_strea"
+ + "m=projects/*/locations/*/sessions/*/stre"
+ + "ams/*}\332A\022read_stream,offset0\001\022\306\001\n\017SplitR"
+ + "eadStream\0228.google.cloud.bigquery.storag"
+ + "e.v1.SplitReadStreamRequest\0329.google.clo"
+ + "ud.bigquery.storage.v1.SplitReadStreamRe"
+ + "sponse\">\202\323\344\223\0028\0226/v1/{name=projects/*/loc"
+ + "ations/*/sessions/*/streams/*}\032\256\001\312A\036bigq"
+ + "uerystorage.googleapis.com\322A\211\001https://ww"
+ + "w.googleapis.com/auth/bigquery,https://w"
+ + "ww.googleapis.com/auth/bigquery.readonly"
+ + ",https://www.googleapis.com/auth/cloud-p"
+ + "latformB\177\n$com.google.cloud.bigquery.sto"
+ + "rage.v1B\014StorageProtoP\001ZGgoogle.golang.o"
+ + "rg/genproto/googleapis/cloud/bigquery/st"
+ + "orage/v1;storageb\006proto3"
+ };
+ descriptor =
+ com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
+ descriptorData,
+ new com.google.protobuf.Descriptors.FileDescriptor[] {
+ com.google.api.AnnotationsProto.getDescriptor(),
+ com.google.api.ClientProto.getDescriptor(),
+ com.google.api.FieldBehaviorProto.getDescriptor(),
+ com.google.api.ResourceProto.getDescriptor(),
+ com.google.cloud.bigquery.storage.v1.ArrowProto.getDescriptor(),
+ com.google.cloud.bigquery.storage.v1.AvroProto.getDescriptor(),
+ com.google.cloud.bigquery.storage.v1.StreamProto.getDescriptor(),
+ });
+ internal_static_google_cloud_bigquery_storage_v1_CreateReadSessionRequest_descriptor =
+ getDescriptor().getMessageTypes().get(0);
+ internal_static_google_cloud_bigquery_storage_v1_CreateReadSessionRequest_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_bigquery_storage_v1_CreateReadSessionRequest_descriptor,
+ new java.lang.String[] {
+ "Parent", "ReadSession", "MaxStreamCount",
+ });
+ internal_static_google_cloud_bigquery_storage_v1_ReadRowsRequest_descriptor =
+ getDescriptor().getMessageTypes().get(1);
+ internal_static_google_cloud_bigquery_storage_v1_ReadRowsRequest_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_bigquery_storage_v1_ReadRowsRequest_descriptor,
+ new java.lang.String[] {
+ "ReadStream", "Offset",
+ });
+ internal_static_google_cloud_bigquery_storage_v1_ThrottleState_descriptor =
+ getDescriptor().getMessageTypes().get(2);
+ internal_static_google_cloud_bigquery_storage_v1_ThrottleState_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_bigquery_storage_v1_ThrottleState_descriptor,
+ new java.lang.String[] {
+ "ThrottlePercent",
+ });
+ internal_static_google_cloud_bigquery_storage_v1_StreamStats_descriptor =
+ getDescriptor().getMessageTypes().get(3);
+ internal_static_google_cloud_bigquery_storage_v1_StreamStats_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_bigquery_storage_v1_StreamStats_descriptor,
+ new java.lang.String[] {
+ "Progress",
+ });
+ internal_static_google_cloud_bigquery_storage_v1_StreamStats_Progress_descriptor =
+ internal_static_google_cloud_bigquery_storage_v1_StreamStats_descriptor
+ .getNestedTypes()
+ .get(0);
+ internal_static_google_cloud_bigquery_storage_v1_StreamStats_Progress_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_bigquery_storage_v1_StreamStats_Progress_descriptor,
+ new java.lang.String[] {
+ "AtResponseStart", "AtResponseEnd",
+ });
+ internal_static_google_cloud_bigquery_storage_v1_ReadRowsResponse_descriptor =
+ getDescriptor().getMessageTypes().get(4);
+ internal_static_google_cloud_bigquery_storage_v1_ReadRowsResponse_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_bigquery_storage_v1_ReadRowsResponse_descriptor,
+ new java.lang.String[] {
+ "AvroRows", "ArrowRecordBatch", "RowCount", "Stats", "ThrottleState", "Rows",
+ });
+ internal_static_google_cloud_bigquery_storage_v1_SplitReadStreamRequest_descriptor =
+ getDescriptor().getMessageTypes().get(5);
+ internal_static_google_cloud_bigquery_storage_v1_SplitReadStreamRequest_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_bigquery_storage_v1_SplitReadStreamRequest_descriptor,
+ new java.lang.String[] {
+ "Name", "Fraction",
+ });
+ internal_static_google_cloud_bigquery_storage_v1_SplitReadStreamResponse_descriptor =
+ getDescriptor().getMessageTypes().get(6);
+ internal_static_google_cloud_bigquery_storage_v1_SplitReadStreamResponse_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_bigquery_storage_v1_SplitReadStreamResponse_descriptor,
+ new java.lang.String[] {
+ "PrimaryStream", "RemainderStream",
+ });
+ com.google.protobuf.ExtensionRegistry registry =
+ com.google.protobuf.ExtensionRegistry.newInstance();
+ registry.add(com.google.api.ClientProto.defaultHost);
+ registry.add(com.google.api.FieldBehaviorProto.fieldBehavior);
+ registry.add(com.google.api.AnnotationsProto.http);
+ registry.add(com.google.api.ClientProto.methodSignature);
+ registry.add(com.google.api.ClientProto.oauthScopes);
+ registry.add(com.google.api.ResourceProto.resourceReference);
+ com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor(
+ descriptor, registry);
+ com.google.api.AnnotationsProto.getDescriptor();
+ com.google.api.ClientProto.getDescriptor();
+ com.google.api.FieldBehaviorProto.getDescriptor();
+ com.google.api.ResourceProto.getDescriptor();
+ com.google.cloud.bigquery.storage.v1.ArrowProto.getDescriptor();
+ com.google.cloud.bigquery.storage.v1.AvroProto.getDescriptor();
+ com.google.cloud.bigquery.storage.v1.StreamProto.getDescriptor();
+ }
+
+ // @@protoc_insertion_point(outer_class_scope)
+}
diff --git a/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/StreamProto.java b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/StreamProto.java
new file mode 100644
index 0000000000..323fb785b6
--- /dev/null
+++ b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/StreamProto.java
@@ -0,0 +1,164 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
+ *
+ * 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.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/bigquery/storage/v1/stream.proto
+
+package com.google.cloud.bigquery.storage.v1;
+
+public final class StreamProto {
+ private StreamProto() {}
+
+ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {}
+
+ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) {
+ registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry);
+ }
+
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_bigquery_storage_v1_ReadSession_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_bigquery_storage_v1_ReadSession_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_bigquery_storage_v1_ReadSession_TableModifiers_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_bigquery_storage_v1_ReadSession_TableModifiers_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_bigquery_storage_v1_ReadSession_TableReadOptions_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_bigquery_storage_v1_ReadSession_TableReadOptions_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_bigquery_storage_v1_ReadStream_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_bigquery_storage_v1_ReadStream_fieldAccessorTable;
+
+ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ return descriptor;
+ }
+
+ private static com.google.protobuf.Descriptors.FileDescriptor descriptor;
+
+ static {
+ java.lang.String[] descriptorData = {
+ "\n-google/cloud/bigquery/storage/v1/strea"
+ + "m.proto\022 google.cloud.bigquery.storage.v"
+ + "1\032\037google/api/field_behavior.proto\032\031goog"
+ + "le/api/resource.proto\032,google/cloud/bigq"
+ + "uery/storage/v1/arrow.proto\032+google/clou"
+ + "d/bigquery/storage/v1/avro.proto\032\037google"
+ + "/protobuf/timestamp.proto\"\347\006\n\013ReadSessio"
+ + "n\022\021\n\004name\030\001 \001(\tB\003\340A\003\0224\n\013expire_time\030\002 \001("
+ + "\0132\032.google.protobuf.TimestampB\003\340A\003\022F\n\013da"
+ + "ta_format\030\003 \001(\0162,.google.cloud.bigquery."
+ + "storage.v1.DataFormatB\003\340A\005\022H\n\013avro_schem"
+ + "a\030\004 \001(\0132,.google.cloud.bigquery.storage."
+ + "v1.AvroSchemaB\003\340A\003H\000\022J\n\014arrow_schema\030\005 \001"
+ + "(\0132-.google.cloud.bigquery.storage.v1.Ar"
+ + "rowSchemaB\003\340A\003H\000\0224\n\005table\030\006 \001(\tB%\340A\005\372A\037\n"
+ + "\035bigquery.googleapis.com/Table\022Z\n\017table_"
+ + "modifiers\030\007 \001(\0132<.google.cloud.bigquery."
+ + "storage.v1.ReadSession.TableModifiersB\003\340"
+ + "A\001\022Y\n\014read_options\030\010 \001(\0132>.google.cloud."
+ + "bigquery.storage.v1.ReadSession.TableRea"
+ + "dOptionsB\003\340A\001\022B\n\007streams\030\n \003(\0132,.google."
+ + "cloud.bigquery.storage.v1.ReadStreamB\003\340A"
+ + "\003\032C\n\016TableModifiers\0221\n\rsnapshot_time\030\001 \001"
+ + "(\0132\032.google.protobuf.Timestamp\032D\n\020TableR"
+ + "eadOptions\022\027\n\017selected_fields\030\001 \003(\t\022\027\n\017r"
+ + "ow_restriction\030\002 \001(\t:k\352Ah\n*bigquerystora"
+ + "ge.googleapis.com/ReadSession\022:projects/"
+ + "{project}/locations/{location}/sessions/"
+ + "{session}B\010\n\006schema\"\234\001\n\nReadStream\022\021\n\004na"
+ + "me\030\001 \001(\tB\003\340A\003:{\352Ax\n)bigquerystorage.goog"
+ + "leapis.com/ReadStream\022Kprojects/{project"
+ + "}/locations/{location}/sessions/{session"
+ + "}/streams/{stream}*>\n\nDataFormat\022\033\n\027DATA"
+ + "_FORMAT_UNSPECIFIED\020\000\022\010\n\004AVRO\020\001\022\t\n\005ARROW"
+ + "\020\002B~\n$com.google.cloud.bigquery.storage."
+ + "v1B\013StreamProtoP\001ZGgoogle.golang.org/gen"
+ + "proto/googleapis/cloud/bigquery/storage/"
+ + "v1;storageb\006proto3"
+ };
+ descriptor =
+ com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
+ descriptorData,
+ new com.google.protobuf.Descriptors.FileDescriptor[] {
+ com.google.api.FieldBehaviorProto.getDescriptor(),
+ com.google.api.ResourceProto.getDescriptor(),
+ com.google.cloud.bigquery.storage.v1.ArrowProto.getDescriptor(),
+ com.google.cloud.bigquery.storage.v1.AvroProto.getDescriptor(),
+ com.google.protobuf.TimestampProto.getDescriptor(),
+ });
+ internal_static_google_cloud_bigquery_storage_v1_ReadSession_descriptor =
+ getDescriptor().getMessageTypes().get(0);
+ internal_static_google_cloud_bigquery_storage_v1_ReadSession_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_bigquery_storage_v1_ReadSession_descriptor,
+ new java.lang.String[] {
+ "Name",
+ "ExpireTime",
+ "DataFormat",
+ "AvroSchema",
+ "ArrowSchema",
+ "Table",
+ "TableModifiers",
+ "ReadOptions",
+ "Streams",
+ "Schema",
+ });
+ internal_static_google_cloud_bigquery_storage_v1_ReadSession_TableModifiers_descriptor =
+ internal_static_google_cloud_bigquery_storage_v1_ReadSession_descriptor
+ .getNestedTypes()
+ .get(0);
+ internal_static_google_cloud_bigquery_storage_v1_ReadSession_TableModifiers_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_bigquery_storage_v1_ReadSession_TableModifiers_descriptor,
+ new java.lang.String[] {
+ "SnapshotTime",
+ });
+ internal_static_google_cloud_bigquery_storage_v1_ReadSession_TableReadOptions_descriptor =
+ internal_static_google_cloud_bigquery_storage_v1_ReadSession_descriptor
+ .getNestedTypes()
+ .get(1);
+ internal_static_google_cloud_bigquery_storage_v1_ReadSession_TableReadOptions_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_bigquery_storage_v1_ReadSession_TableReadOptions_descriptor,
+ new java.lang.String[] {
+ "SelectedFields", "RowRestriction",
+ });
+ internal_static_google_cloud_bigquery_storage_v1_ReadStream_descriptor =
+ getDescriptor().getMessageTypes().get(1);
+ internal_static_google_cloud_bigquery_storage_v1_ReadStream_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_bigquery_storage_v1_ReadStream_descriptor,
+ new java.lang.String[] {
+ "Name",
+ });
+ com.google.protobuf.ExtensionRegistry registry =
+ com.google.protobuf.ExtensionRegistry.newInstance();
+ registry.add(com.google.api.FieldBehaviorProto.fieldBehavior);
+ registry.add(com.google.api.ResourceProto.resource);
+ registry.add(com.google.api.ResourceProto.resourceReference);
+ com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor(
+ descriptor, registry);
+ com.google.api.FieldBehaviorProto.getDescriptor();
+ com.google.api.ResourceProto.getDescriptor();
+ com.google.cloud.bigquery.storage.v1.ArrowProto.getDescriptor();
+ com.google.cloud.bigquery.storage.v1.AvroProto.getDescriptor();
+ com.google.protobuf.TimestampProto.getDescriptor();
+ }
+
+ // @@protoc_insertion_point(outer_class_scope)
+}
diff --git a/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/StreamStats.java b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/StreamStats.java
new file mode 100644
index 0000000000..5710d42b3a
--- /dev/null
+++ b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/StreamStats.java
@@ -0,0 +1,1424 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
+ *
+ * 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.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/bigquery/storage/v1/storage.proto
+
+package com.google.cloud.bigquery.storage.v1;
+
+/**
+ *
+ *
+ * + * Estimated stream statistics for a given Stream. + *+ * + * Protobuf type {@code google.cloud.bigquery.storage.v1.StreamStats} + */ +public final class StreamStats extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.bigquery.storage.v1.StreamStats) + StreamStatsOrBuilder { + private static final long serialVersionUID = 0L; + // Use StreamStats.newBuilder() to construct. + private StreamStats(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private StreamStats() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StreamStats(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private StreamStats( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + com.google.cloud.bigquery.storage.v1.StreamStats.Progress.Builder subBuilder = null; + if (progress_ != null) { + subBuilder = progress_.toBuilder(); + } + progress_ = + input.readMessage( + com.google.cloud.bigquery.storage.v1.StreamStats.Progress.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(progress_); + progress_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.bigquery.storage.v1.StorageProto + .internal_static_google_cloud_bigquery_storage_v1_StreamStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.bigquery.storage.v1.StorageProto + .internal_static_google_cloud_bigquery_storage_v1_StreamStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.bigquery.storage.v1.StreamStats.class, + com.google.cloud.bigquery.storage.v1.StreamStats.Builder.class); + } + + public interface ProgressOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.storage.v1.StreamStats.Progress) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+ * The fraction of rows assigned to the stream that have been processed by + * the server so far, not including the rows in the current response + * message. + * This value, along with `at_response_end`, can be used to interpolate + * the progress made as the rows in the message are being processed using + * the following formula: `at_response_start + (at_response_end - + * at_response_start) * rows_processed_from_response / rows_in_response`. + * Note that if a filter is provided, the `at_response_end` value of the + * previous response may not necessarily be equal to the + * `at_response_start` value of the current response. + *+ * + *
double at_response_start = 1;
+ *
+ * @return The atResponseStart.
+ */
+ double getAtResponseStart();
+
+ /**
+ *
+ *
+ * + * Similar to `at_response_start`, except that this value includes the + * rows in the current response. + *+ * + *
double at_response_end = 2;
+ *
+ * @return The atResponseEnd.
+ */
+ double getAtResponseEnd();
+ }
+ /** Protobuf type {@code google.cloud.bigquery.storage.v1.StreamStats.Progress} */
+ public static final class Progress extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.cloud.bigquery.storage.v1.StreamStats.Progress)
+ ProgressOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use Progress.newBuilder() to construct.
+ private Progress(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private Progress() {}
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new Progress();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+ return this.unknownFields;
+ }
+
+ private Progress(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 9:
+ {
+ atResponseStart_ = input.readDouble();
+ break;
+ }
+ case 17:
+ {
+ atResponseEnd_ = input.readDouble();
+ break;
+ }
+ default:
+ {
+ if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.cloud.bigquery.storage.v1.StorageProto
+ .internal_static_google_cloud_bigquery_storage_v1_StreamStats_Progress_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.bigquery.storage.v1.StorageProto
+ .internal_static_google_cloud_bigquery_storage_v1_StreamStats_Progress_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.bigquery.storage.v1.StreamStats.Progress.class,
+ com.google.cloud.bigquery.storage.v1.StreamStats.Progress.Builder.class);
+ }
+
+ public static final int AT_RESPONSE_START_FIELD_NUMBER = 1;
+ private double atResponseStart_;
+ /**
+ *
+ *
+ * + * The fraction of rows assigned to the stream that have been processed by + * the server so far, not including the rows in the current response + * message. + * This value, along with `at_response_end`, can be used to interpolate + * the progress made as the rows in the message are being processed using + * the following formula: `at_response_start + (at_response_end - + * at_response_start) * rows_processed_from_response / rows_in_response`. + * Note that if a filter is provided, the `at_response_end` value of the + * previous response may not necessarily be equal to the + * `at_response_start` value of the current response. + *+ * + *
double at_response_start = 1;
+ *
+ * @return The atResponseStart.
+ */
+ public double getAtResponseStart() {
+ return atResponseStart_;
+ }
+
+ public static final int AT_RESPONSE_END_FIELD_NUMBER = 2;
+ private double atResponseEnd_;
+ /**
+ *
+ *
+ * + * Similar to `at_response_start`, except that this value includes the + * rows in the current response. + *+ * + *
double at_response_end = 2;
+ *
+ * @return The atResponseEnd.
+ */
+ public double getAtResponseEnd() {
+ return atResponseEnd_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (atResponseStart_ != 0D) {
+ output.writeDouble(1, atResponseStart_);
+ }
+ if (atResponseEnd_ != 0D) {
+ output.writeDouble(2, atResponseEnd_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (atResponseStart_ != 0D) {
+ size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, atResponseStart_);
+ }
+ if (atResponseEnd_ != 0D) {
+ size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, atResponseEnd_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.bigquery.storage.v1.StreamStats.Progress)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.bigquery.storage.v1.StreamStats.Progress other =
+ (com.google.cloud.bigquery.storage.v1.StreamStats.Progress) obj;
+
+ if (java.lang.Double.doubleToLongBits(getAtResponseStart())
+ != java.lang.Double.doubleToLongBits(other.getAtResponseStart())) return false;
+ if (java.lang.Double.doubleToLongBits(getAtResponseEnd())
+ != java.lang.Double.doubleToLongBits(other.getAtResponseEnd())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + AT_RESPONSE_START_FIELD_NUMBER;
+ hash =
+ (53 * hash)
+ + com.google.protobuf.Internal.hashLong(
+ java.lang.Double.doubleToLongBits(getAtResponseStart()));
+ hash = (37 * hash) + AT_RESPONSE_END_FIELD_NUMBER;
+ hash =
+ (53 * hash)
+ + com.google.protobuf.Internal.hashLong(
+ java.lang.Double.doubleToLongBits(getAtResponseEnd()));
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.StreamStats.Progress parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.StreamStats.Progress parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.StreamStats.Progress parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.StreamStats.Progress parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.StreamStats.Progress parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.StreamStats.Progress parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.StreamStats.Progress parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.StreamStats.Progress parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.StreamStats.Progress parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.StreamStats.Progress parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.StreamStats.Progress parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.StreamStats.Progress parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.cloud.bigquery.storage.v1.StreamStats.Progress prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /** Protobuf type {@code google.cloud.bigquery.storage.v1.StreamStats.Progress} */
+ public static final class Builder
+ extends com.google.protobuf.GeneratedMessageV3.Builder+ * The fraction of rows assigned to the stream that have been processed by + * the server so far, not including the rows in the current response + * message. + * This value, along with `at_response_end`, can be used to interpolate + * the progress made as the rows in the message are being processed using + * the following formula: `at_response_start + (at_response_end - + * at_response_start) * rows_processed_from_response / rows_in_response`. + * Note that if a filter is provided, the `at_response_end` value of the + * previous response may not necessarily be equal to the + * `at_response_start` value of the current response. + *+ * + *
double at_response_start = 1;
+ *
+ * @return The atResponseStart.
+ */
+ public double getAtResponseStart() {
+ return atResponseStart_;
+ }
+ /**
+ *
+ *
+ * + * The fraction of rows assigned to the stream that have been processed by + * the server so far, not including the rows in the current response + * message. + * This value, along with `at_response_end`, can be used to interpolate + * the progress made as the rows in the message are being processed using + * the following formula: `at_response_start + (at_response_end - + * at_response_start) * rows_processed_from_response / rows_in_response`. + * Note that if a filter is provided, the `at_response_end` value of the + * previous response may not necessarily be equal to the + * `at_response_start` value of the current response. + *+ * + *
double at_response_start = 1;
+ *
+ * @param value The atResponseStart to set.
+ * @return This builder for chaining.
+ */
+ public Builder setAtResponseStart(double value) {
+
+ atResponseStart_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The fraction of rows assigned to the stream that have been processed by + * the server so far, not including the rows in the current response + * message. + * This value, along with `at_response_end`, can be used to interpolate + * the progress made as the rows in the message are being processed using + * the following formula: `at_response_start + (at_response_end - + * at_response_start) * rows_processed_from_response / rows_in_response`. + * Note that if a filter is provided, the `at_response_end` value of the + * previous response may not necessarily be equal to the + * `at_response_start` value of the current response. + *+ * + *
double at_response_start = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearAtResponseStart() {
+
+ atResponseStart_ = 0D;
+ onChanged();
+ return this;
+ }
+
+ private double atResponseEnd_;
+ /**
+ *
+ *
+ * + * Similar to `at_response_start`, except that this value includes the + * rows in the current response. + *+ * + *
double at_response_end = 2;
+ *
+ * @return The atResponseEnd.
+ */
+ public double getAtResponseEnd() {
+ return atResponseEnd_;
+ }
+ /**
+ *
+ *
+ * + * Similar to `at_response_start`, except that this value includes the + * rows in the current response. + *+ * + *
double at_response_end = 2;
+ *
+ * @param value The atResponseEnd to set.
+ * @return This builder for chaining.
+ */
+ public Builder setAtResponseEnd(double value) {
+
+ atResponseEnd_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Similar to `at_response_start`, except that this value includes the + * rows in the current response. + *+ * + *
double at_response_end = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearAtResponseEnd() {
+
+ atResponseEnd_ = 0D;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.bigquery.storage.v1.StreamStats.Progress)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.bigquery.storage.v1.StreamStats.Progress)
+ private static final com.google.cloud.bigquery.storage.v1.StreamStats.Progress DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.bigquery.storage.v1.StreamStats.Progress();
+ }
+
+ public static com.google.cloud.bigquery.storage.v1.StreamStats.Progress getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser