diff --git a/google-api-grpc/grpc-google-cloud-bigquerystorage-v1beta1/pom.xml b/google-api-grpc/grpc-google-cloud-bigquerystorage-v1beta1/pom.xml
new file mode 100644
index 000000000000..197e1b3ca228
--- /dev/null
+++ b/google-api-grpc/grpc-google-cloud-bigquerystorage-v1beta1/pom.xml
@@ -0,0 +1,31 @@
+
+ * BigQuery storage API. + * The BigQuery storage API can be used to read data stored in BigQuery. + *+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.10.0)", + comments = "Source: google/cloud/bigquery/storage/v1beta1/storage.proto") +public final class BigQueryStorageGrpc { + + private BigQueryStorageGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.bigquery.storage.v1beta1.BigQueryStorage"; + + // Static method descriptors that strictly reflect the proto. + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getCreateReadSessionMethod()} instead. + public static final io.grpc.MethodDescriptor
+ * BigQuery storage API. + * The BigQuery storage API can be used to read data stored in BigQuery. + *+ */ + public static abstract class BigQueryStorageImplBase implements io.grpc.BindableService { + + /** + *
+ * 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. + * Read sessions automatically expire 24 hours after they are created and do + * not require manual clean-up by the caller. + *+ */ + public void createReadSession(com.google.cloud.bigquery.storage.v1beta1.Storage.CreateReadSessionRequest request, + io.grpc.stub.StreamObserver
+ * Reads rows from the table in the format prescribed by the read session. + * Each response contains one or more table rows, up to a maximum of 10 MiB + * per response; read requests which attempt to read individual rows larger + * than this will fail. + * Each request also returns a set of stream statistics reflecting the + * estimated total number of rows in the read stream. This number is computed + * based on the total table size and the number of active streams in the read + * session, and may change as other streams continue to read data. + *+ */ + public void readRows(com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsRequest request, + io.grpc.stub.StreamObserver
+ * Creates additional streams for a ReadSession. This API can be used to + * dynamically adjust the parallelism of a batch processing task upwards by + * adding additional workers. + *+ */ + public void batchCreateReadSessionStreams(com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsRequest request, + io.grpc.stub.StreamObserver
+ * Triggers the graceful termination of a single stream in a ReadSession. This + * API can be used to dynamically adjust the parallelism of a batch processing + * task downwards without losing data. + * This API does not delete the stream -- it remains visible in the + * ReadSession, and any data processed by the stream is not released to other + * streams. However, no additional data will be assigned to the stream once + * this call completes. Callers must continue reading data on the stream until + * the end of the stream is reached so that data which has already been + * assigned to the stream will be processed. + * This method will return an error if there are no other live streams + * in the Session, or if SplitReadStream() has been called on the given + * Stream. + *+ */ + public void finalizeStream(com.google.cloud.bigquery.storage.v1beta1.Storage.FinalizeStreamRequest request, + io.grpc.stub.StreamObserver
+ * Splits a given read stream into two Streams. These streams are referred to + * as the primary and the residual of the split. The original stream can still + * be read from in the same manner as before. Both of the returned streams can + * also be read from, and the total rows return 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 Stream. 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. + * This method is guaranteed to be idempotent. + *+ */ + public void splitReadStream(com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamRequest request, + io.grpc.stub.StreamObserver
+ * BigQuery storage API. + * The BigQuery storage API can be used to read data stored in BigQuery. + *+ */ + public static final class BigQueryStorageStub extends io.grpc.stub.AbstractStub
+ * 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. + * Read sessions automatically expire 24 hours after they are created and do + * not require manual clean-up by the caller. + *+ */ + public void createReadSession(com.google.cloud.bigquery.storage.v1beta1.Storage.CreateReadSessionRequest request, + io.grpc.stub.StreamObserver
+ * Reads rows from the table in the format prescribed by the read session. + * Each response contains one or more table rows, up to a maximum of 10 MiB + * per response; read requests which attempt to read individual rows larger + * than this will fail. + * Each request also returns a set of stream statistics reflecting the + * estimated total number of rows in the read stream. This number is computed + * based on the total table size and the number of active streams in the read + * session, and may change as other streams continue to read data. + *+ */ + public void readRows(com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsRequest request, + io.grpc.stub.StreamObserver
+ * Creates additional streams for a ReadSession. This API can be used to + * dynamically adjust the parallelism of a batch processing task upwards by + * adding additional workers. + *+ */ + public void batchCreateReadSessionStreams(com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsRequest request, + io.grpc.stub.StreamObserver
+ * Triggers the graceful termination of a single stream in a ReadSession. This + * API can be used to dynamically adjust the parallelism of a batch processing + * task downwards without losing data. + * This API does not delete the stream -- it remains visible in the + * ReadSession, and any data processed by the stream is not released to other + * streams. However, no additional data will be assigned to the stream once + * this call completes. Callers must continue reading data on the stream until + * the end of the stream is reached so that data which has already been + * assigned to the stream will be processed. + * This method will return an error if there are no other live streams + * in the Session, or if SplitReadStream() has been called on the given + * Stream. + *+ */ + public void finalizeStream(com.google.cloud.bigquery.storage.v1beta1.Storage.FinalizeStreamRequest request, + io.grpc.stub.StreamObserver
+ * Splits a given read stream into two Streams. These streams are referred to + * as the primary and the residual of the split. The original stream can still + * be read from in the same manner as before. Both of the returned streams can + * also be read from, and the total rows return 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 Stream. 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. + * This method is guaranteed to be idempotent. + *+ */ + public void splitReadStream(com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamRequest request, + io.grpc.stub.StreamObserver
+ * BigQuery storage API. + * The BigQuery storage API can be used to read data stored in BigQuery. + *+ */ + public static final class BigQueryStorageBlockingStub extends io.grpc.stub.AbstractStub
+ * 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. + * Read sessions automatically expire 24 hours after they are created and do + * not require manual clean-up by the caller. + *+ */ + public com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession createReadSession(com.google.cloud.bigquery.storage.v1beta1.Storage.CreateReadSessionRequest request) { + return blockingUnaryCall( + getChannel(), getCreateReadSessionMethodHelper(), getCallOptions(), request); + } + + /** + *
+ * Reads rows from the table in the format prescribed by the read session. + * Each response contains one or more table rows, up to a maximum of 10 MiB + * per response; read requests which attempt to read individual rows larger + * than this will fail. + * Each request also returns a set of stream statistics reflecting the + * estimated total number of rows in the read stream. This number is computed + * based on the total table size and the number of active streams in the read + * session, and may change as other streams continue to read data. + *+ */ + public java.util.Iterator
+ * Creates additional streams for a ReadSession. This API can be used to + * dynamically adjust the parallelism of a batch processing task upwards by + * adding additional workers. + *+ */ + public com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsResponse batchCreateReadSessionStreams(com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsRequest request) { + return blockingUnaryCall( + getChannel(), getBatchCreateReadSessionStreamsMethodHelper(), getCallOptions(), request); + } + + /** + *
+ * Triggers the graceful termination of a single stream in a ReadSession. This + * API can be used to dynamically adjust the parallelism of a batch processing + * task downwards without losing data. + * This API does not delete the stream -- it remains visible in the + * ReadSession, and any data processed by the stream is not released to other + * streams. However, no additional data will be assigned to the stream once + * this call completes. Callers must continue reading data on the stream until + * the end of the stream is reached so that data which has already been + * assigned to the stream will be processed. + * This method will return an error if there are no other live streams + * in the Session, or if SplitReadStream() has been called on the given + * Stream. + *+ */ + public com.google.protobuf.Empty finalizeStream(com.google.cloud.bigquery.storage.v1beta1.Storage.FinalizeStreamRequest request) { + return blockingUnaryCall( + getChannel(), getFinalizeStreamMethodHelper(), getCallOptions(), request); + } + + /** + *
+ * Splits a given read stream into two Streams. These streams are referred to + * as the primary and the residual of the split. The original stream can still + * be read from in the same manner as before. Both of the returned streams can + * also be read from, and the total rows return 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 Stream. 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. + * This method is guaranteed to be idempotent. + *+ */ + public com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamResponse splitReadStream(com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamRequest request) { + return blockingUnaryCall( + getChannel(), getSplitReadStreamMethodHelper(), getCallOptions(), request); + } + } + + /** + *
+ * BigQuery storage API. + * The BigQuery storage API can be used to read data stored in BigQuery. + *+ */ + public static final class BigQueryStorageFutureStub extends io.grpc.stub.AbstractStub
+ * 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. + * Read sessions automatically expire 24 hours after they are created and do + * not require manual clean-up by the caller. + *+ */ + public com.google.common.util.concurrent.ListenableFuture
+ * Creates additional streams for a ReadSession. This API can be used to + * dynamically adjust the parallelism of a batch processing task upwards by + * adding additional workers. + *+ */ + public com.google.common.util.concurrent.ListenableFuture
+ * Triggers the graceful termination of a single stream in a ReadSession. This + * API can be used to dynamically adjust the parallelism of a batch processing + * task downwards without losing data. + * This API does not delete the stream -- it remains visible in the + * ReadSession, and any data processed by the stream is not released to other + * streams. However, no additional data will be assigned to the stream once + * this call completes. Callers must continue reading data on the stream until + * the end of the stream is reached so that data which has already been + * assigned to the stream will be processed. + * This method will return an error if there are no other live streams + * in the Session, or if SplitReadStream() has been called on the given + * Stream. + *+ */ + public com.google.common.util.concurrent.ListenableFuture
+ * Splits a given read stream into two Streams. These streams are referred to + * as the primary and the residual of the split. The original stream can still + * be read from in the same manner as before. Both of the returned streams can + * also be read from, and the total rows return 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 Stream. 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. + * This method is guaranteed to be idempotent. + *+ */ + public com.google.common.util.concurrent.ListenableFuture
+ * Json serialized schema, as described at + * https://avro.apache.org/docs/1.8.1/spec.html + *+ * + *
string schema = 1;
+ */
+ java.lang.String getSchema();
+ /**
+ * + * Json serialized schema, as described at + * https://avro.apache.org/docs/1.8.1/spec.html + *+ * + *
string schema = 1;
+ */
+ com.google.protobuf.ByteString
+ getSchemaBytes();
+ }
+ /**
+ * + * Avro schema. + *+ * + * Protobuf type {@code google.cloud.bigquery.storage.v1beta1.AvroSchema} + */ + public static final class AvroSchema extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.bigquery.storage.v1beta1.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 + 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(); + } + 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(); + + schema_ = s; + break; + } + default: { + if (!parseUnknownFieldProto3( + 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.v1beta1.AvroProto.internal_static_google_cloud_bigquery_storage_v1beta1_AvroSchema_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.bigquery.storage.v1beta1.AvroProto.internal_static_google_cloud_bigquery_storage_v1beta1_AvroSchema_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema.class, com.google.cloud.bigquery.storage.v1beta1.AvroProto.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;
+ */
+ 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;
+ */
+ 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.v1beta1.AvroProto.AvroSchema)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema other = (com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema) obj;
+
+ boolean result = true;
+ result = result && getSchema()
+ .equals(other.getSchema());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @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.v1beta1.AvroProto.AvroSchema parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.AvroProto.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.v1beta1.AvroProto.AvroSchema parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.AvroProto.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.v1beta1.AvroProto.AvroSchema parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.AvroProto.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.v1beta1.AvroProto.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.v1beta1.AvroProto.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.v1beta1.AvroProto.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.v1beta1.AvroProto.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.v1beta1.AvroProto.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.v1beta1.AvroProto.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.v1beta1.AvroProto.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.v1beta1.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;
+ */
+ 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;
+ */
+ 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;
+ */
+ 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;
+ */
+ 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;
+ */
+ 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.setUnknownFieldsProto3(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.v1beta1.AvroSchema)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.bigquery.storage.v1beta1.AvroSchema)
+ private static final com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema();
+ }
+
+ public static com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Binary serialized rows in a block. + *+ * + *
bytes serialized_binary_rows = 1;
+ */
+ com.google.protobuf.ByteString getSerializedBinaryRows();
+
+ /**
+ * + * The count of rows in the returning block. + *+ * + *
int64 row_count = 2;
+ */
+ long getRowCount();
+ }
+ /**
+ * + * Avro rows. + *+ * + * Protobuf type {@code google.cloud.bigquery.storage.v1beta1.AvroRows} + */ + public static final class AvroRows extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.bigquery.storage.v1beta1.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; + rowCount_ = 0L; + } + + @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(); + } + 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: { + + serializedBinaryRows_ = input.readBytes(); + break; + } + case 16: { + + rowCount_ = input.readInt64(); + break; + } + default: { + if (!parseUnknownFieldProto3( + 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.v1beta1.AvroProto.internal_static_google_cloud_bigquery_storage_v1beta1_AvroRows_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.bigquery.storage.v1beta1.AvroProto.internal_static_google_cloud_bigquery_storage_v1beta1_AvroRows_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows.class, com.google.cloud.bigquery.storage.v1beta1.AvroProto.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;
+ */
+ 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;
+ */
+ 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.v1beta1.AvroProto.AvroRows)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows other = (com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows) obj;
+
+ boolean result = true;
+ result = result && getSerializedBinaryRows()
+ .equals(other.getSerializedBinaryRows());
+ result = result && (getRowCount()
+ == other.getRowCount());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @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.v1beta1.AvroProto.AvroRows parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.AvroProto.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.v1beta1.AvroProto.AvroRows parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.AvroProto.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.v1beta1.AvroProto.AvroRows parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.AvroProto.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.v1beta1.AvroProto.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.v1beta1.AvroProto.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.v1beta1.AvroProto.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.v1beta1.AvroProto.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.v1beta1.AvroProto.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.v1beta1.AvroProto.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.v1beta1.AvroProto.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.v1beta1.AvroRows} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder
+ * Binary serialized rows in a block. + *+ * + *
bytes serialized_binary_rows = 1;
+ */
+ public com.google.protobuf.ByteString getSerializedBinaryRows() {
+ return serializedBinaryRows_;
+ }
+ /**
+ * + * Binary serialized rows in a block. + *+ * + *
bytes serialized_binary_rows = 1;
+ */
+ 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;
+ */
+ public Builder clearSerializedBinaryRows() {
+
+ serializedBinaryRows_ = getDefaultInstance().getSerializedBinaryRows();
+ onChanged();
+ return this;
+ }
+
+ private long rowCount_ ;
+ /**
+ * + * The count of rows in the returning block. + *+ * + *
int64 row_count = 2;
+ */
+ public long getRowCount() {
+ return rowCount_;
+ }
+ /**
+ * + * The count of rows in the returning block. + *+ * + *
int64 row_count = 2;
+ */
+ public Builder setRowCount(long value) {
+
+ rowCount_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * + * The count of rows in the returning block. + *+ * + *
int64 row_count = 2;
+ */
+ public Builder clearRowCount() {
+
+ rowCount_ = 0L;
+ onChanged();
+ return this;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(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.v1beta1.AvroRows)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.bigquery.storage.v1beta1.AvroRows)
+ private static final com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows();
+ }
+
+ public static com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Optional. 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;
+ */
+ java.util.List+ * Optional. 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;
+ */
+ int getSelectedFieldsCount();
+ /**
+ * + * Optional. 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;
+ */
+ java.lang.String getSelectedFields(int index);
+ /**
+ * + * Optional. 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;
+ */
+ com.google.protobuf.ByteString
+ getSelectedFieldsBytes(int index);
+
+ /**
+ * + * Optional. SQL text filtering statement, similar to a WHERE clause in + * a query. Currently, we support combinations of predicates that are + * a comparison between a column and a constant value in SQL statement. + * Aggregates are not supported. + * Example: "a > DATE '2014-9-27' AND (b > 5 and C LIKE 'date')" + *+ * + *
string row_restriction = 2;
+ */
+ java.lang.String getRowRestriction();
+ /**
+ * + * Optional. SQL text filtering statement, similar to a WHERE clause in + * a query. Currently, we support combinations of predicates that are + * a comparison between a column and a constant value in SQL statement. + * Aggregates are not supported. + * Example: "a > DATE '2014-9-27' AND (b > 5 and C LIKE 'date')" + *+ * + *
string row_restriction = 2;
+ */
+ com.google.protobuf.ByteString
+ getRowRestrictionBytes();
+ }
+ /**
+ * + * Options dictating how we read a table. + *+ * + * Protobuf type {@code google.cloud.bigquery.storage.v1beta1.TableReadOptions} + */ + public static final class TableReadOptions extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.bigquery.storage.v1beta1.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 + 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) == 0x00000001)) { + 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 (!parseUnknownFieldProto3( + 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) == 0x00000001)) { + selectedFields_ = selectedFields_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.bigquery.storage.v1beta1.ReadOptions.internal_static_google_cloud_bigquery_storage_v1beta1_TableReadOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.bigquery.storage.v1beta1.ReadOptions.internal_static_google_cloud_bigquery_storage_v1beta1_TableReadOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.bigquery.storage.v1beta1.ReadOptions.TableReadOptions.class, com.google.cloud.bigquery.storage.v1beta1.ReadOptions.TableReadOptions.Builder.class); + } + + private int bitField0_; + public static final int SELECTED_FIELDS_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList selectedFields_; + /** + *
+ * Optional. 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;
+ */
+ public com.google.protobuf.ProtocolStringList
+ getSelectedFieldsList() {
+ return selectedFields_;
+ }
+ /**
+ * + * Optional. 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;
+ */
+ public int getSelectedFieldsCount() {
+ return selectedFields_.size();
+ }
+ /**
+ * + * Optional. 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;
+ */
+ public java.lang.String getSelectedFields(int index) {
+ return selectedFields_.get(index);
+ }
+ /**
+ * + * Optional. 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;
+ */
+ 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_;
+ /**
+ * + * Optional. SQL text filtering statement, similar to a WHERE clause in + * a query. Currently, we support combinations of predicates that are + * a comparison between a column and a constant value in SQL statement. + * Aggregates are not supported. + * Example: "a > DATE '2014-9-27' AND (b > 5 and C LIKE 'date')" + *+ * + *
string row_restriction = 2;
+ */
+ 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;
+ }
+ }
+ /**
+ * + * Optional. SQL text filtering statement, similar to a WHERE clause in + * a query. Currently, we support combinations of predicates that are + * a comparison between a column and a constant value in SQL statement. + * Aggregates are not supported. + * Example: "a > DATE '2014-9-27' AND (b > 5 and C LIKE 'date')" + *+ * + *
string row_restriction = 2;
+ */
+ 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.v1beta1.ReadOptions.TableReadOptions)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.bigquery.storage.v1beta1.ReadOptions.TableReadOptions other = (com.google.cloud.bigquery.storage.v1beta1.ReadOptions.TableReadOptions) obj;
+
+ boolean result = true;
+ result = result && getSelectedFieldsList()
+ .equals(other.getSelectedFieldsList());
+ result = result && getRowRestriction()
+ .equals(other.getRowRestriction());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @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.v1beta1.ReadOptions.TableReadOptions parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.ReadOptions.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.v1beta1.ReadOptions.TableReadOptions parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.ReadOptions.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.v1beta1.ReadOptions.TableReadOptions parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.ReadOptions.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.v1beta1.ReadOptions.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.v1beta1.ReadOptions.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.v1beta1.ReadOptions.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.v1beta1.ReadOptions.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.v1beta1.ReadOptions.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.v1beta1.ReadOptions.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.v1beta1.ReadOptions.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.v1beta1.TableReadOptions} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder
+ * Optional. 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;
+ */
+ public com.google.protobuf.ProtocolStringList
+ getSelectedFieldsList() {
+ return selectedFields_.getUnmodifiableView();
+ }
+ /**
+ * + * Optional. 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;
+ */
+ public int getSelectedFieldsCount() {
+ return selectedFields_.size();
+ }
+ /**
+ * + * Optional. 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;
+ */
+ public java.lang.String getSelectedFields(int index) {
+ return selectedFields_.get(index);
+ }
+ /**
+ * + * Optional. 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;
+ */
+ public com.google.protobuf.ByteString
+ getSelectedFieldsBytes(int index) {
+ return selectedFields_.getByteString(index);
+ }
+ /**
+ * + * Optional. 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;
+ */
+ public Builder setSelectedFields(
+ int index, java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureSelectedFieldsIsMutable();
+ selectedFields_.set(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ * + * Optional. 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;
+ */
+ public Builder addSelectedFields(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureSelectedFieldsIsMutable();
+ selectedFields_.add(value);
+ onChanged();
+ return this;
+ }
+ /**
+ * + * Optional. 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;
+ */
+ public Builder addAllSelectedFields(
+ java.lang.Iterable+ * Optional. 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;
+ */
+ public Builder clearSelectedFields() {
+ selectedFields_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+ /**
+ * + * Optional. 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;
+ */
+ 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_ = "";
+ /**
+ * + * Optional. SQL text filtering statement, similar to a WHERE clause in + * a query. Currently, we support combinations of predicates that are + * a comparison between a column and a constant value in SQL statement. + * Aggregates are not supported. + * Example: "a > DATE '2014-9-27' AND (b > 5 and C LIKE 'date')" + *+ * + *
string row_restriction = 2;
+ */
+ 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;
+ }
+ }
+ /**
+ * + * Optional. SQL text filtering statement, similar to a WHERE clause in + * a query. Currently, we support combinations of predicates that are + * a comparison between a column and a constant value in SQL statement. + * Aggregates are not supported. + * Example: "a > DATE '2014-9-27' AND (b > 5 and C LIKE 'date')" + *+ * + *
string row_restriction = 2;
+ */
+ 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;
+ }
+ }
+ /**
+ * + * Optional. SQL text filtering statement, similar to a WHERE clause in + * a query. Currently, we support combinations of predicates that are + * a comparison between a column and a constant value in SQL statement. + * Aggregates are not supported. + * Example: "a > DATE '2014-9-27' AND (b > 5 and C LIKE 'date')" + *+ * + *
string row_restriction = 2;
+ */
+ public Builder setRowRestriction(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ rowRestriction_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * + * Optional. SQL text filtering statement, similar to a WHERE clause in + * a query. Currently, we support combinations of predicates that are + * a comparison between a column and a constant value in SQL statement. + * Aggregates are not supported. + * Example: "a > DATE '2014-9-27' AND (b > 5 and C LIKE 'date')" + *+ * + *
string row_restriction = 2;
+ */
+ public Builder clearRowRestriction() {
+
+ rowRestriction_ = getDefaultInstance().getRowRestriction();
+ onChanged();
+ return this;
+ }
+ /**
+ * + * Optional. SQL text filtering statement, similar to a WHERE clause in + * a query. Currently, we support combinations of predicates that are + * a comparison between a column and a constant value in SQL statement. + * Aggregates are not supported. + * Example: "a > DATE '2014-9-27' AND (b > 5 and C LIKE 'date')" + *+ * + *
string row_restriction = 2;
+ */
+ 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.setUnknownFieldsProto3(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.v1beta1.TableReadOptions)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.bigquery.storage.v1beta1.TableReadOptions)
+ private static final com.google.cloud.bigquery.storage.v1beta1.ReadOptions.TableReadOptions DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.bigquery.storage.v1beta1.ReadOptions.TableReadOptions();
+ }
+
+ public static com.google.cloud.bigquery.storage.v1beta1.ReadOptions.TableReadOptions getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Data format for input or output data. + *+ * + * Protobuf enum {@code google.cloud.bigquery.storage.v1beta1.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),
+ 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;
+
+
+ public final int getNumber() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalArgumentException(
+ "Can't get the number of an unknown enum value.");
+ }
+ return value;
+ }
+
+ /**
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static DataFormat valueOf(int value) {
+ return forNumber(value);
+ }
+
+ public static DataFormat forNumber(int value) {
+ switch (value) {
+ case 0: return DATA_FORMAT_UNSPECIFIED;
+ case 1: return AVRO;
+ default: return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap
+ * Name of the stream. In the form
+ * `/projects/{project_id}/stream/{stream_id}`
+ *
+ *
+ * string name = 1;
+ */
+ java.lang.String getName();
+ /**
+ *
+ * Name of the stream. In the form
+ * `/projects/{project_id}/stream/{stream_id}`
+ *
+ *
+ * string name = 1;
+ */
+ com.google.protobuf.ByteString
+ getNameBytes();
+
+ /**
+ * + * Rows in the stream. + *+ * + *
int64 row_count = 2;
+ */
+ long getRowCount();
+ }
+ /**
+ * Protobuf type {@code google.cloud.bigquery.storage.v1beta1.Stream}
+ */
+ public static final class Stream extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:google.cloud.bigquery.storage.v1beta1.Stream)
+ StreamOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use Stream.newBuilder() to construct.
+ private Stream(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private Stream() {
+ name_ = "";
+ rowCount_ = 0L;
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private Stream(
+ 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 16: {
+
+ rowCount_ = input.readInt64();
+ break;
+ }
+ default: {
+ if (!parseUnknownFieldProto3(
+ 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.v1beta1.Storage.internal_static_google_cloud_bigquery_storage_v1beta1_Stream_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.bigquery.storage.v1beta1.Storage.internal_static_google_cloud_bigquery_storage_v1beta1_Stream_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.class, com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.Builder.class);
+ }
+
+ public static final int NAME_FIELD_NUMBER = 1;
+ private volatile java.lang.Object name_;
+ /**
+ *
+ * Name of the stream. In the form
+ * `/projects/{project_id}/stream/{stream_id}`
+ *
+ *
+ * string name = 1;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ * Name of the stream. In the form
+ * `/projects/{project_id}/stream/{stream_id}`
+ *
+ *
+ * string name = 1;
+ */
+ 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 ROW_COUNT_FIELD_NUMBER = 2;
+ private long rowCount_;
+ /**
+ * + * Rows in the stream. + *+ * + *
int64 row_count = 2;
+ */
+ 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 (!getNameBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
+ }
+ 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 (!getNameBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
+ }
+ 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.v1beta1.Storage.Stream)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.bigquery.storage.v1beta1.Storage.Stream other = (com.google.cloud.bigquery.storage.v1beta1.Storage.Stream) obj;
+
+ boolean result = true;
+ result = result && getName()
+ .equals(other.getName());
+ result = result && (getRowCount()
+ == other.getRowCount());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @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) + 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.v1beta1.Storage.Stream parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.Stream 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.v1beta1.Storage.Stream parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.Stream 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.v1beta1.Storage.Stream parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.Stream 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.v1beta1.Storage.Stream parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.Stream 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.v1beta1.Storage.Stream parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.Stream 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.v1beta1.Storage.Stream 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.v1beta1.Storage.Stream 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.v1beta1.Storage.Stream 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.v1beta1.Stream}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder
+ * Name of the stream. In the form
+ * `/projects/{project_id}/stream/{stream_id}`
+ *
+ *
+ * string name = 1;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ * Name of the stream. In the form
+ * `/projects/{project_id}/stream/{stream_id}`
+ *
+ *
+ * string name = 1;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ * Name of the stream. In the form
+ * `/projects/{project_id}/stream/{stream_id}`
+ *
+ *
+ * string name = 1;
+ */
+ public Builder setName(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Name of the stream. In the form
+ * `/projects/{project_id}/stream/{stream_id}`
+ *
+ *
+ * string name = 1;
+ */
+ public Builder clearName() {
+
+ name_ = getDefaultInstance().getName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Name of the stream. In the form
+ * `/projects/{project_id}/stream/{stream_id}`
+ *
+ *
+ * string name = 1;
+ */
+ public Builder setNameBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+
+ private long rowCount_ ;
+ /**
+ * + * Rows in the stream. + *+ * + *
int64 row_count = 2;
+ */
+ public long getRowCount() {
+ return rowCount_;
+ }
+ /**
+ * + * Rows in the stream. + *+ * + *
int64 row_count = 2;
+ */
+ public Builder setRowCount(long value) {
+
+ rowCount_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * + * Rows in the stream. + *+ * + *
int64 row_count = 2;
+ */
+ public Builder clearRowCount() {
+
+ rowCount_ = 0L;
+ onChanged();
+ return this;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(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.v1beta1.Stream)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.bigquery.storage.v1beta1.Stream)
+ private static final com.google.cloud.bigquery.storage.v1beta1.Storage.Stream DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.bigquery.storage.v1beta1.Storage.Stream();
+ }
+
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.Stream getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser.google.cloud.bigquery.storage.v1beta1.Stream stream = 1;
+ */
+ boolean hasStream();
+ /**
+ * .google.cloud.bigquery.storage.v1beta1.Stream stream = 1;
+ */
+ com.google.cloud.bigquery.storage.v1beta1.Storage.Stream getStream();
+ /**
+ * .google.cloud.bigquery.storage.v1beta1.Stream stream = 1;
+ */
+ com.google.cloud.bigquery.storage.v1beta1.Storage.StreamOrBuilder getStreamOrBuilder();
+
+ /**
+ * + * Position in the stream. + *+ * + *
int64 offset = 2;
+ */
+ long getOffset();
+ }
+ /**
+ * Protobuf type {@code google.cloud.bigquery.storage.v1beta1.StreamPosition}
+ */
+ public static final class StreamPosition extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:google.cloud.bigquery.storage.v1beta1.StreamPosition)
+ StreamPositionOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use StreamPosition.newBuilder() to construct.
+ private StreamPosition(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private StreamPosition() {
+ offset_ = 0L;
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private StreamPosition(
+ 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: {
+ com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.Builder subBuilder = null;
+ if (stream_ != null) {
+ subBuilder = stream_.toBuilder();
+ }
+ stream_ = input.readMessage(com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(stream_);
+ stream_ = subBuilder.buildPartial();
+ }
+
+ break;
+ }
+ case 16: {
+
+ offset_ = input.readInt64();
+ break;
+ }
+ default: {
+ if (!parseUnknownFieldProto3(
+ 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.v1beta1.Storage.internal_static_google_cloud_bigquery_storage_v1beta1_StreamPosition_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.bigquery.storage.v1beta1.Storage.internal_static_google_cloud_bigquery_storage_v1beta1_StreamPosition_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPosition.class, com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPosition.Builder.class);
+ }
+
+ public static final int STREAM_FIELD_NUMBER = 1;
+ private com.google.cloud.bigquery.storage.v1beta1.Storage.Stream stream_;
+ /**
+ * .google.cloud.bigquery.storage.v1beta1.Stream stream = 1;
+ */
+ public boolean hasStream() {
+ return stream_ != null;
+ }
+ /**
+ * .google.cloud.bigquery.storage.v1beta1.Stream stream = 1;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.Stream getStream() {
+ return stream_ == null ? com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.getDefaultInstance() : stream_;
+ }
+ /**
+ * .google.cloud.bigquery.storage.v1beta1.Stream stream = 1;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.StreamOrBuilder getStreamOrBuilder() {
+ return getStream();
+ }
+
+ public static final int OFFSET_FIELD_NUMBER = 2;
+ private long offset_;
+ /**
+ * + * Position in the stream. + *+ * + *
int64 offset = 2;
+ */
+ 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 (stream_ != null) {
+ output.writeMessage(1, getStream());
+ }
+ 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 (stream_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(1, getStream());
+ }
+ 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.v1beta1.Storage.StreamPosition)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPosition other = (com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPosition) obj;
+
+ boolean result = true;
+ result = result && (hasStream() == other.hasStream());
+ if (hasStream()) {
+ result = result && getStream()
+ .equals(other.getStream());
+ }
+ result = result && (getOffset()
+ == other.getOffset());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasStream()) {
+ hash = (37 * hash) + STREAM_FIELD_NUMBER;
+ hash = (53 * hash) + getStream().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.v1beta1.Storage.StreamPosition parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPosition 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.v1beta1.Storage.StreamPosition parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPosition 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.v1beta1.Storage.StreamPosition parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPosition 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.v1beta1.Storage.StreamPosition parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPosition 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.v1beta1.Storage.StreamPosition parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPosition 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.v1beta1.Storage.StreamPosition 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.v1beta1.Storage.StreamPosition 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.v1beta1.Storage.StreamPosition 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.v1beta1.StreamPosition}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder.google.cloud.bigquery.storage.v1beta1.Stream stream = 1;
+ */
+ public boolean hasStream() {
+ return streamBuilder_ != null || stream_ != null;
+ }
+ /**
+ * .google.cloud.bigquery.storage.v1beta1.Stream stream = 1;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.Stream getStream() {
+ if (streamBuilder_ == null) {
+ return stream_ == null ? com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.getDefaultInstance() : stream_;
+ } else {
+ return streamBuilder_.getMessage();
+ }
+ }
+ /**
+ * .google.cloud.bigquery.storage.v1beta1.Stream stream = 1;
+ */
+ public Builder setStream(com.google.cloud.bigquery.storage.v1beta1.Storage.Stream value) {
+ if (streamBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ stream_ = value;
+ onChanged();
+ } else {
+ streamBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ * .google.cloud.bigquery.storage.v1beta1.Stream stream = 1;
+ */
+ public Builder setStream(
+ com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.Builder builderForValue) {
+ if (streamBuilder_ == null) {
+ stream_ = builderForValue.build();
+ onChanged();
+ } else {
+ streamBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ * .google.cloud.bigquery.storage.v1beta1.Stream stream = 1;
+ */
+ public Builder mergeStream(com.google.cloud.bigquery.storage.v1beta1.Storage.Stream value) {
+ if (streamBuilder_ == null) {
+ if (stream_ != null) {
+ stream_ =
+ com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.newBuilder(stream_).mergeFrom(value).buildPartial();
+ } else {
+ stream_ = value;
+ }
+ onChanged();
+ } else {
+ streamBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ * .google.cloud.bigquery.storage.v1beta1.Stream stream = 1;
+ */
+ public Builder clearStream() {
+ if (streamBuilder_ == null) {
+ stream_ = null;
+ onChanged();
+ } else {
+ stream_ = null;
+ streamBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ * .google.cloud.bigquery.storage.v1beta1.Stream stream = 1;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.Builder getStreamBuilder() {
+
+ onChanged();
+ return getStreamFieldBuilder().getBuilder();
+ }
+ /**
+ * .google.cloud.bigquery.storage.v1beta1.Stream stream = 1;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.StreamOrBuilder getStreamOrBuilder() {
+ if (streamBuilder_ != null) {
+ return streamBuilder_.getMessageOrBuilder();
+ } else {
+ return stream_ == null ?
+ com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.getDefaultInstance() : stream_;
+ }
+ }
+ /**
+ * .google.cloud.bigquery.storage.v1beta1.Stream stream = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1beta1.Storage.Stream, com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.Builder, com.google.cloud.bigquery.storage.v1beta1.Storage.StreamOrBuilder>
+ getStreamFieldBuilder() {
+ if (streamBuilder_ == null) {
+ streamBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1beta1.Storage.Stream, com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.Builder, com.google.cloud.bigquery.storage.v1beta1.Storage.StreamOrBuilder>(
+ getStream(),
+ getParentForChildren(),
+ isClean());
+ stream_ = null;
+ }
+ return streamBuilder_;
+ }
+
+ private long offset_ ;
+ /**
+ * + * Position in the stream. + *+ * + *
int64 offset = 2;
+ */
+ public long getOffset() {
+ return offset_;
+ }
+ /**
+ * + * Position in the stream. + *+ * + *
int64 offset = 2;
+ */
+ public Builder setOffset(long value) {
+
+ offset_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * + * Position in the stream. + *+ * + *
int64 offset = 2;
+ */
+ public Builder clearOffset() {
+
+ offset_ = 0L;
+ onChanged();
+ return this;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(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.v1beta1.StreamPosition)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.bigquery.storage.v1beta1.StreamPosition)
+ private static final com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPosition DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPosition();
+ }
+
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPosition getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * Unique identifier for the session. In the form
+ * `projects/{project_id}/sessions/{session_id}`
+ *
+ *
+ * string name = 1;
+ */
+ java.lang.String getName();
+ /**
+ *
+ * Unique identifier for the session. In the form
+ * `projects/{project_id}/sessions/{session_id}`
+ *
+ *
+ * string name = 1;
+ */
+ com.google.protobuf.ByteString
+ getNameBytes();
+
+ /**
+ * + * Time at which the session becomes invalid. After this time, subsequent + * requests to read this Session will return errors. + *+ * + *
.google.protobuf.Timestamp expire_time = 2;
+ */
+ boolean hasExpireTime();
+ /**
+ * + * Time at which the session becomes invalid. After this time, subsequent + * requests to read this Session will return errors. + *+ * + *
.google.protobuf.Timestamp expire_time = 2;
+ */
+ com.google.protobuf.Timestamp getExpireTime();
+ /**
+ * + * Time at which the session becomes invalid. After this time, subsequent + * requests to read this Session will return errors. + *+ * + *
.google.protobuf.Timestamp expire_time = 2;
+ */
+ com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder();
+
+ /**
+ * + * Avro schema. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.AvroSchema avro_schema = 5;
+ */
+ boolean hasAvroSchema();
+ /**
+ * + * Avro schema. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.AvroSchema avro_schema = 5;
+ */
+ com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema getAvroSchema();
+ /**
+ * + * Avro schema. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.AvroSchema avro_schema = 5;
+ */
+ com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchemaOrBuilder getAvroSchemaOrBuilder();
+
+ /**
+ * + * Streams associated with this session. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 4;
+ */
+ java.util.List+ * Streams associated with this session. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 4;
+ */
+ com.google.cloud.bigquery.storage.v1beta1.Storage.Stream getStreams(int index);
+ /**
+ * + * Streams associated with this session. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 4;
+ */
+ int getStreamsCount();
+ /**
+ * + * Streams associated with this session. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 4;
+ */
+ java.util.List extends com.google.cloud.bigquery.storage.v1beta1.Storage.StreamOrBuilder>
+ getStreamsOrBuilderList();
+ /**
+ * + * Streams associated with this session. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 4;
+ */
+ com.google.cloud.bigquery.storage.v1beta1.Storage.StreamOrBuilder getStreamsOrBuilder(
+ int index);
+
+ /**
+ * + * Table that this ReadSession is reading from. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableReference table_reference = 7;
+ */
+ boolean hasTableReference();
+ /**
+ * + * Table that this ReadSession is reading from. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableReference table_reference = 7;
+ */
+ com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference getTableReference();
+ /**
+ * + * Table that this ReadSession is reading from. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableReference table_reference = 7;
+ */
+ com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReferenceOrBuilder getTableReferenceOrBuilder();
+
+ /**
+ * + * Any modifiers which are applied when reading from the specified table. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableModifiers table_modifiers = 8;
+ */
+ boolean hasTableModifiers();
+ /**
+ * + * Any modifiers which are applied when reading from the specified table. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableModifiers table_modifiers = 8;
+ */
+ com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers getTableModifiers();
+ /**
+ * + * Any modifiers which are applied when reading from the specified table. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableModifiers table_modifiers = 8;
+ */
+ com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiersOrBuilder getTableModifiersOrBuilder();
+
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession.SchemaCase getSchemaCase();
+ }
+ /**
+ * Protobuf type {@code google.cloud.bigquery.storage.v1beta1.ReadSession}
+ */
+ public static final class ReadSession extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:google.cloud.bigquery.storage.v1beta1.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_ = "";
+ streams_ = java.util.Collections.emptyList();
+ }
+
+ @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 34: {
+ if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
+ streams_ = new java.util.ArrayList
+ * Unique identifier for the session. In the form
+ * `projects/{project_id}/sessions/{session_id}`
+ *
+ *
+ * string name = 1;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ * Unique identifier for the session. In the form
+ * `projects/{project_id}/sessions/{session_id}`
+ *
+ *
+ * string name = 1;
+ */
+ 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_;
+ /**
+ * + * Time at which the session becomes invalid. After this time, subsequent + * requests to read this Session will return errors. + *+ * + *
.google.protobuf.Timestamp expire_time = 2;
+ */
+ public boolean hasExpireTime() {
+ return expireTime_ != null;
+ }
+ /**
+ * + * Time at which the session becomes invalid. After this time, subsequent + * requests to read this Session will return errors. + *+ * + *
.google.protobuf.Timestamp expire_time = 2;
+ */
+ public com.google.protobuf.Timestamp getExpireTime() {
+ return expireTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expireTime_;
+ }
+ /**
+ * + * Time at which the session becomes invalid. After this time, subsequent + * requests to read this Session will return errors. + *+ * + *
.google.protobuf.Timestamp expire_time = 2;
+ */
+ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() {
+ return getExpireTime();
+ }
+
+ public static final int AVRO_SCHEMA_FIELD_NUMBER = 5;
+ /**
+ * + * Avro schema. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.AvroSchema avro_schema = 5;
+ */
+ public boolean hasAvroSchema() {
+ return schemaCase_ == 5;
+ }
+ /**
+ * + * Avro schema. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.AvroSchema avro_schema = 5;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema getAvroSchema() {
+ if (schemaCase_ == 5) {
+ return (com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema) schema_;
+ }
+ return com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema.getDefaultInstance();
+ }
+ /**
+ * + * Avro schema. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.AvroSchema avro_schema = 5;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchemaOrBuilder getAvroSchemaOrBuilder() {
+ if (schemaCase_ == 5) {
+ return (com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema) schema_;
+ }
+ return com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema.getDefaultInstance();
+ }
+
+ public static final int STREAMS_FIELD_NUMBER = 4;
+ private java.util.List+ * Streams associated with this session. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 4;
+ */
+ public java.util.List+ * Streams associated with this session. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 4;
+ */
+ public java.util.List extends com.google.cloud.bigquery.storage.v1beta1.Storage.StreamOrBuilder>
+ getStreamsOrBuilderList() {
+ return streams_;
+ }
+ /**
+ * + * Streams associated with this session. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 4;
+ */
+ public int getStreamsCount() {
+ return streams_.size();
+ }
+ /**
+ * + * Streams associated with this session. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 4;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.Stream getStreams(int index) {
+ return streams_.get(index);
+ }
+ /**
+ * + * Streams associated with this session. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 4;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.StreamOrBuilder getStreamsOrBuilder(
+ int index) {
+ return streams_.get(index);
+ }
+
+ public static final int TABLE_REFERENCE_FIELD_NUMBER = 7;
+ private com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference tableReference_;
+ /**
+ * + * Table that this ReadSession is reading from. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableReference table_reference = 7;
+ */
+ public boolean hasTableReference() {
+ return tableReference_ != null;
+ }
+ /**
+ * + * Table that this ReadSession is reading from. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableReference table_reference = 7;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference getTableReference() {
+ return tableReference_ == null ? com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference.getDefaultInstance() : tableReference_;
+ }
+ /**
+ * + * Table that this ReadSession is reading from. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableReference table_reference = 7;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReferenceOrBuilder getTableReferenceOrBuilder() {
+ return getTableReference();
+ }
+
+ public static final int TABLE_MODIFIERS_FIELD_NUMBER = 8;
+ private com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers tableModifiers_;
+ /**
+ * + * Any modifiers which are applied when reading from the specified table. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableModifiers table_modifiers = 8;
+ */
+ public boolean hasTableModifiers() {
+ return tableModifiers_ != null;
+ }
+ /**
+ * + * Any modifiers which are applied when reading from the specified table. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableModifiers table_modifiers = 8;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers getTableModifiers() {
+ return tableModifiers_ == null ? com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers.getDefaultInstance() : tableModifiers_;
+ }
+ /**
+ * + * Any modifiers which are applied when reading from the specified table. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableModifiers table_modifiers = 8;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiersOrBuilder getTableModifiersOrBuilder() {
+ return getTableModifiers();
+ }
+
+ 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());
+ }
+ for (int i = 0; i < streams_.size(); i++) {
+ output.writeMessage(4, streams_.get(i));
+ }
+ if (schemaCase_ == 5) {
+ output.writeMessage(5, (com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema) schema_);
+ }
+ if (tableReference_ != null) {
+ output.writeMessage(7, getTableReference());
+ }
+ if (tableModifiers_ != null) {
+ output.writeMessage(8, getTableModifiers());
+ }
+ 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());
+ }
+ for (int i = 0; i < streams_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(4, streams_.get(i));
+ }
+ if (schemaCase_ == 5) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(5, (com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema) schema_);
+ }
+ if (tableReference_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(7, getTableReference());
+ }
+ if (tableModifiers_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(8, getTableModifiers());
+ }
+ 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.v1beta1.Storage.ReadSession)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession other = (com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession) obj;
+
+ boolean result = true;
+ result = result && getName()
+ .equals(other.getName());
+ result = result && (hasExpireTime() == other.hasExpireTime());
+ if (hasExpireTime()) {
+ result = result && getExpireTime()
+ .equals(other.getExpireTime());
+ }
+ result = result && getStreamsList()
+ .equals(other.getStreamsList());
+ result = result && (hasTableReference() == other.hasTableReference());
+ if (hasTableReference()) {
+ result = result && getTableReference()
+ .equals(other.getTableReference());
+ }
+ result = result && (hasTableModifiers() == other.hasTableModifiers());
+ if (hasTableModifiers()) {
+ result = result && getTableModifiers()
+ .equals(other.getTableModifiers());
+ }
+ result = result && getSchemaCase().equals(
+ other.getSchemaCase());
+ if (!result) return false;
+ switch (schemaCase_) {
+ case 5:
+ result = result && getAvroSchema()
+ .equals(other.getAvroSchema());
+ break;
+ case 0:
+ default:
+ }
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @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();
+ }
+ if (getStreamsCount() > 0) {
+ hash = (37 * hash) + STREAMS_FIELD_NUMBER;
+ hash = (53 * hash) + getStreamsList().hashCode();
+ }
+ if (hasTableReference()) {
+ hash = (37 * hash) + TABLE_REFERENCE_FIELD_NUMBER;
+ hash = (53 * hash) + getTableReference().hashCode();
+ }
+ if (hasTableModifiers()) {
+ hash = (37 * hash) + TABLE_MODIFIERS_FIELD_NUMBER;
+ hash = (53 * hash) + getTableModifiers().hashCode();
+ }
+ switch (schemaCase_) {
+ case 5:
+ hash = (37 * hash) + AVRO_SCHEMA_FIELD_NUMBER;
+ hash = (53 * hash) + getAvroSchema().hashCode();
+ break;
+ case 0:
+ default:
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.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.v1beta1.Storage.ReadSession parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.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.v1beta1.Storage.ReadSession parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.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.v1beta1.Storage.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.v1beta1.Storage.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.v1beta1.Storage.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.v1beta1.Storage.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.v1beta1.Storage.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.v1beta1.Storage.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.v1beta1.Storage.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;
+ }
+ /**
+ * Protobuf type {@code google.cloud.bigquery.storage.v1beta1.ReadSession}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder
+ * Unique identifier for the session. In the form
+ * `projects/{project_id}/sessions/{session_id}`
+ *
+ *
+ * string name = 1;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ * Unique identifier for the session. In the form
+ * `projects/{project_id}/sessions/{session_id}`
+ *
+ *
+ * string name = 1;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ * Unique identifier for the session. In the form
+ * `projects/{project_id}/sessions/{session_id}`
+ *
+ *
+ * string name = 1;
+ */
+ public Builder setName(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Unique identifier for the session. In the form
+ * `projects/{project_id}/sessions/{session_id}`
+ *
+ *
+ * string name = 1;
+ */
+ public Builder clearName() {
+
+ name_ = getDefaultInstance().getName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Unique identifier for the session. In the form
+ * `projects/{project_id}/sessions/{session_id}`
+ *
+ *
+ * string name = 1;
+ */
+ 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_ = null;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> expireTimeBuilder_;
+ /**
+ * + * Time at which the session becomes invalid. After this time, subsequent + * requests to read this Session will return errors. + *+ * + *
.google.protobuf.Timestamp expire_time = 2;
+ */
+ public boolean hasExpireTime() {
+ return expireTimeBuilder_ != null || expireTime_ != null;
+ }
+ /**
+ * + * Time at which the session becomes invalid. After this time, subsequent + * requests to read this Session will return errors. + *+ * + *
.google.protobuf.Timestamp expire_time = 2;
+ */
+ public com.google.protobuf.Timestamp getExpireTime() {
+ if (expireTimeBuilder_ == null) {
+ return expireTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expireTime_;
+ } else {
+ return expireTimeBuilder_.getMessage();
+ }
+ }
+ /**
+ * + * Time at which the session becomes invalid. After this time, subsequent + * requests to read this Session will return errors. + *+ * + *
.google.protobuf.Timestamp expire_time = 2;
+ */
+ 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;
+ }
+ /**
+ * + * Time at which the session becomes invalid. After this time, subsequent + * requests to read this Session will return errors. + *+ * + *
.google.protobuf.Timestamp expire_time = 2;
+ */
+ public Builder setExpireTime(
+ com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (expireTimeBuilder_ == null) {
+ expireTime_ = builderForValue.build();
+ onChanged();
+ } else {
+ expireTimeBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ * + * Time at which the session becomes invalid. After this time, subsequent + * requests to read this Session will return errors. + *+ * + *
.google.protobuf.Timestamp expire_time = 2;
+ */
+ 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;
+ }
+ /**
+ * + * Time at which the session becomes invalid. After this time, subsequent + * requests to read this Session will return errors. + *+ * + *
.google.protobuf.Timestamp expire_time = 2;
+ */
+ public Builder clearExpireTime() {
+ if (expireTimeBuilder_ == null) {
+ expireTime_ = null;
+ onChanged();
+ } else {
+ expireTime_ = null;
+ expireTimeBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ * + * Time at which the session becomes invalid. After this time, subsequent + * requests to read this Session will return errors. + *+ * + *
.google.protobuf.Timestamp expire_time = 2;
+ */
+ public com.google.protobuf.Timestamp.Builder getExpireTimeBuilder() {
+
+ onChanged();
+ return getExpireTimeFieldBuilder().getBuilder();
+ }
+ /**
+ * + * Time at which the session becomes invalid. After this time, subsequent + * requests to read this Session will return errors. + *+ * + *
.google.protobuf.Timestamp expire_time = 2;
+ */
+ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() {
+ if (expireTimeBuilder_ != null) {
+ return expireTimeBuilder_.getMessageOrBuilder();
+ } else {
+ return expireTime_ == null ?
+ com.google.protobuf.Timestamp.getDefaultInstance() : expireTime_;
+ }
+ }
+ /**
+ * + * Time at which the session becomes invalid. After this time, subsequent + * requests to read this Session will return errors. + *+ * + *
.google.protobuf.Timestamp expire_time = 2;
+ */
+ 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 com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema, com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema.Builder, com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchemaOrBuilder> avroSchemaBuilder_;
+ /**
+ * + * Avro schema. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.AvroSchema avro_schema = 5;
+ */
+ public boolean hasAvroSchema() {
+ return schemaCase_ == 5;
+ }
+ /**
+ * + * Avro schema. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.AvroSchema avro_schema = 5;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema getAvroSchema() {
+ if (avroSchemaBuilder_ == null) {
+ if (schemaCase_ == 5) {
+ return (com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema) schema_;
+ }
+ return com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema.getDefaultInstance();
+ } else {
+ if (schemaCase_ == 5) {
+ return avroSchemaBuilder_.getMessage();
+ }
+ return com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema.getDefaultInstance();
+ }
+ }
+ /**
+ * + * Avro schema. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.AvroSchema avro_schema = 5;
+ */
+ public Builder setAvroSchema(com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema value) {
+ if (avroSchemaBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ schema_ = value;
+ onChanged();
+ } else {
+ avroSchemaBuilder_.setMessage(value);
+ }
+ schemaCase_ = 5;
+ return this;
+ }
+ /**
+ * + * Avro schema. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.AvroSchema avro_schema = 5;
+ */
+ public Builder setAvroSchema(
+ com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema.Builder builderForValue) {
+ if (avroSchemaBuilder_ == null) {
+ schema_ = builderForValue.build();
+ onChanged();
+ } else {
+ avroSchemaBuilder_.setMessage(builderForValue.build());
+ }
+ schemaCase_ = 5;
+ return this;
+ }
+ /**
+ * + * Avro schema. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.AvroSchema avro_schema = 5;
+ */
+ public Builder mergeAvroSchema(com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema value) {
+ if (avroSchemaBuilder_ == null) {
+ if (schemaCase_ == 5 &&
+ schema_ != com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema.getDefaultInstance()) {
+ schema_ = com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema.newBuilder((com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema) schema_)
+ .mergeFrom(value).buildPartial();
+ } else {
+ schema_ = value;
+ }
+ onChanged();
+ } else {
+ if (schemaCase_ == 5) {
+ avroSchemaBuilder_.mergeFrom(value);
+ }
+ avroSchemaBuilder_.setMessage(value);
+ }
+ schemaCase_ = 5;
+ return this;
+ }
+ /**
+ * + * Avro schema. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.AvroSchema avro_schema = 5;
+ */
+ public Builder clearAvroSchema() {
+ if (avroSchemaBuilder_ == null) {
+ if (schemaCase_ == 5) {
+ schemaCase_ = 0;
+ schema_ = null;
+ onChanged();
+ }
+ } else {
+ if (schemaCase_ == 5) {
+ schemaCase_ = 0;
+ schema_ = null;
+ }
+ avroSchemaBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ * + * Avro schema. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.AvroSchema avro_schema = 5;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema.Builder getAvroSchemaBuilder() {
+ return getAvroSchemaFieldBuilder().getBuilder();
+ }
+ /**
+ * + * Avro schema. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.AvroSchema avro_schema = 5;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchemaOrBuilder getAvroSchemaOrBuilder() {
+ if ((schemaCase_ == 5) && (avroSchemaBuilder_ != null)) {
+ return avroSchemaBuilder_.getMessageOrBuilder();
+ } else {
+ if (schemaCase_ == 5) {
+ return (com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema) schema_;
+ }
+ return com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema.getDefaultInstance();
+ }
+ }
+ /**
+ * + * Avro schema. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.AvroSchema avro_schema = 5;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema, com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema.Builder, com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchemaOrBuilder>
+ getAvroSchemaFieldBuilder() {
+ if (avroSchemaBuilder_ == null) {
+ if (!(schemaCase_ == 5)) {
+ schema_ = com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema.getDefaultInstance();
+ }
+ avroSchemaBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema, com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema.Builder, com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchemaOrBuilder>(
+ (com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema) schema_,
+ getParentForChildren(),
+ isClean());
+ schema_ = null;
+ }
+ schemaCase_ = 5;
+ onChanged();;
+ return avroSchemaBuilder_;
+ }
+
+ private java.util.List+ * Streams associated with this session. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 4;
+ */
+ public java.util.List+ * Streams associated with this session. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 4;
+ */
+ public int getStreamsCount() {
+ if (streamsBuilder_ == null) {
+ return streams_.size();
+ } else {
+ return streamsBuilder_.getCount();
+ }
+ }
+ /**
+ * + * Streams associated with this session. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 4;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.Stream getStreams(int index) {
+ if (streamsBuilder_ == null) {
+ return streams_.get(index);
+ } else {
+ return streamsBuilder_.getMessage(index);
+ }
+ }
+ /**
+ * + * Streams associated with this session. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 4;
+ */
+ public Builder setStreams(
+ int index, com.google.cloud.bigquery.storage.v1beta1.Storage.Stream value) {
+ if (streamsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureStreamsIsMutable();
+ streams_.set(index, value);
+ onChanged();
+ } else {
+ streamsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * + * Streams associated with this session. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 4;
+ */
+ public Builder setStreams(
+ int index, com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.Builder builderForValue) {
+ if (streamsBuilder_ == null) {
+ ensureStreamsIsMutable();
+ streams_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ streamsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * + * Streams associated with this session. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 4;
+ */
+ public Builder addStreams(com.google.cloud.bigquery.storage.v1beta1.Storage.Stream value) {
+ if (streamsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureStreamsIsMutable();
+ streams_.add(value);
+ onChanged();
+ } else {
+ streamsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ * + * Streams associated with this session. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 4;
+ */
+ public Builder addStreams(
+ int index, com.google.cloud.bigquery.storage.v1beta1.Storage.Stream value) {
+ if (streamsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureStreamsIsMutable();
+ streams_.add(index, value);
+ onChanged();
+ } else {
+ streamsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * + * Streams associated with this session. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 4;
+ */
+ public Builder addStreams(
+ com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.Builder builderForValue) {
+ if (streamsBuilder_ == null) {
+ ensureStreamsIsMutable();
+ streams_.add(builderForValue.build());
+ onChanged();
+ } else {
+ streamsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * + * Streams associated with this session. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 4;
+ */
+ public Builder addStreams(
+ int index, com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.Builder builderForValue) {
+ if (streamsBuilder_ == null) {
+ ensureStreamsIsMutable();
+ streams_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ streamsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * + * Streams associated with this session. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 4;
+ */
+ public Builder addAllStreams(
+ java.lang.Iterable extends com.google.cloud.bigquery.storage.v1beta1.Storage.Stream> values) {
+ if (streamsBuilder_ == null) {
+ ensureStreamsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, streams_);
+ onChanged();
+ } else {
+ streamsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ * + * Streams associated with this session. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 4;
+ */
+ public Builder clearStreams() {
+ if (streamsBuilder_ == null) {
+ streams_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000008);
+ onChanged();
+ } else {
+ streamsBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ * + * Streams associated with this session. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 4;
+ */
+ public Builder removeStreams(int index) {
+ if (streamsBuilder_ == null) {
+ ensureStreamsIsMutable();
+ streams_.remove(index);
+ onChanged();
+ } else {
+ streamsBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ * + * Streams associated with this session. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 4;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.Builder getStreamsBuilder(
+ int index) {
+ return getStreamsFieldBuilder().getBuilder(index);
+ }
+ /**
+ * + * Streams associated with this session. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 4;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.StreamOrBuilder getStreamsOrBuilder(
+ int index) {
+ if (streamsBuilder_ == null) {
+ return streams_.get(index); } else {
+ return streamsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ * + * Streams associated with this session. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 4;
+ */
+ public java.util.List extends com.google.cloud.bigquery.storage.v1beta1.Storage.StreamOrBuilder>
+ getStreamsOrBuilderList() {
+ if (streamsBuilder_ != null) {
+ return streamsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(streams_);
+ }
+ }
+ /**
+ * + * Streams associated with this session. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 4;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.Builder addStreamsBuilder() {
+ return getStreamsFieldBuilder().addBuilder(
+ com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.getDefaultInstance());
+ }
+ /**
+ * + * Streams associated with this session. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 4;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.Builder addStreamsBuilder(
+ int index) {
+ return getStreamsFieldBuilder().addBuilder(
+ index, com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.getDefaultInstance());
+ }
+ /**
+ * + * Streams associated with this session. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 4;
+ */
+ public java.util.List+ * Table that this ReadSession is reading from. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableReference table_reference = 7;
+ */
+ public boolean hasTableReference() {
+ return tableReferenceBuilder_ != null || tableReference_ != null;
+ }
+ /**
+ * + * Table that this ReadSession is reading from. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableReference table_reference = 7;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference getTableReference() {
+ if (tableReferenceBuilder_ == null) {
+ return tableReference_ == null ? com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference.getDefaultInstance() : tableReference_;
+ } else {
+ return tableReferenceBuilder_.getMessage();
+ }
+ }
+ /**
+ * + * Table that this ReadSession is reading from. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableReference table_reference = 7;
+ */
+ public Builder setTableReference(com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference value) {
+ if (tableReferenceBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ tableReference_ = value;
+ onChanged();
+ } else {
+ tableReferenceBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ * + * Table that this ReadSession is reading from. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableReference table_reference = 7;
+ */
+ public Builder setTableReference(
+ com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference.Builder builderForValue) {
+ if (tableReferenceBuilder_ == null) {
+ tableReference_ = builderForValue.build();
+ onChanged();
+ } else {
+ tableReferenceBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ * + * Table that this ReadSession is reading from. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableReference table_reference = 7;
+ */
+ public Builder mergeTableReference(com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference value) {
+ if (tableReferenceBuilder_ == null) {
+ if (tableReference_ != null) {
+ tableReference_ =
+ com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference.newBuilder(tableReference_).mergeFrom(value).buildPartial();
+ } else {
+ tableReference_ = value;
+ }
+ onChanged();
+ } else {
+ tableReferenceBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ * + * Table that this ReadSession is reading from. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableReference table_reference = 7;
+ */
+ public Builder clearTableReference() {
+ if (tableReferenceBuilder_ == null) {
+ tableReference_ = null;
+ onChanged();
+ } else {
+ tableReference_ = null;
+ tableReferenceBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ * + * Table that this ReadSession is reading from. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableReference table_reference = 7;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference.Builder getTableReferenceBuilder() {
+
+ onChanged();
+ return getTableReferenceFieldBuilder().getBuilder();
+ }
+ /**
+ * + * Table that this ReadSession is reading from. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableReference table_reference = 7;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReferenceOrBuilder getTableReferenceOrBuilder() {
+ if (tableReferenceBuilder_ != null) {
+ return tableReferenceBuilder_.getMessageOrBuilder();
+ } else {
+ return tableReference_ == null ?
+ com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference.getDefaultInstance() : tableReference_;
+ }
+ }
+ /**
+ * + * Table that this ReadSession is reading from. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableReference table_reference = 7;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference, com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference.Builder, com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReferenceOrBuilder>
+ getTableReferenceFieldBuilder() {
+ if (tableReferenceBuilder_ == null) {
+ tableReferenceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference, com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference.Builder, com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReferenceOrBuilder>(
+ getTableReference(),
+ getParentForChildren(),
+ isClean());
+ tableReference_ = null;
+ }
+ return tableReferenceBuilder_;
+ }
+
+ private com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers tableModifiers_ = null;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers, com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers.Builder, com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiersOrBuilder> tableModifiersBuilder_;
+ /**
+ * + * Any modifiers which are applied when reading from the specified table. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableModifiers table_modifiers = 8;
+ */
+ public boolean hasTableModifiers() {
+ return tableModifiersBuilder_ != null || tableModifiers_ != null;
+ }
+ /**
+ * + * Any modifiers which are applied when reading from the specified table. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableModifiers table_modifiers = 8;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers getTableModifiers() {
+ if (tableModifiersBuilder_ == null) {
+ return tableModifiers_ == null ? com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers.getDefaultInstance() : tableModifiers_;
+ } else {
+ return tableModifiersBuilder_.getMessage();
+ }
+ }
+ /**
+ * + * Any modifiers which are applied when reading from the specified table. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableModifiers table_modifiers = 8;
+ */
+ public Builder setTableModifiers(com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers value) {
+ if (tableModifiersBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ tableModifiers_ = value;
+ onChanged();
+ } else {
+ tableModifiersBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ * + * Any modifiers which are applied when reading from the specified table. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableModifiers table_modifiers = 8;
+ */
+ public Builder setTableModifiers(
+ com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers.Builder builderForValue) {
+ if (tableModifiersBuilder_ == null) {
+ tableModifiers_ = builderForValue.build();
+ onChanged();
+ } else {
+ tableModifiersBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ * + * Any modifiers which are applied when reading from the specified table. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableModifiers table_modifiers = 8;
+ */
+ public Builder mergeTableModifiers(com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers value) {
+ if (tableModifiersBuilder_ == null) {
+ if (tableModifiers_ != null) {
+ tableModifiers_ =
+ com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers.newBuilder(tableModifiers_).mergeFrom(value).buildPartial();
+ } else {
+ tableModifiers_ = value;
+ }
+ onChanged();
+ } else {
+ tableModifiersBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ * + * Any modifiers which are applied when reading from the specified table. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableModifiers table_modifiers = 8;
+ */
+ public Builder clearTableModifiers() {
+ if (tableModifiersBuilder_ == null) {
+ tableModifiers_ = null;
+ onChanged();
+ } else {
+ tableModifiers_ = null;
+ tableModifiersBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ * + * Any modifiers which are applied when reading from the specified table. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableModifiers table_modifiers = 8;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers.Builder getTableModifiersBuilder() {
+
+ onChanged();
+ return getTableModifiersFieldBuilder().getBuilder();
+ }
+ /**
+ * + * Any modifiers which are applied when reading from the specified table. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableModifiers table_modifiers = 8;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiersOrBuilder getTableModifiersOrBuilder() {
+ if (tableModifiersBuilder_ != null) {
+ return tableModifiersBuilder_.getMessageOrBuilder();
+ } else {
+ return tableModifiers_ == null ?
+ com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers.getDefaultInstance() : tableModifiers_;
+ }
+ }
+ /**
+ * + * Any modifiers which are applied when reading from the specified table. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableModifiers table_modifiers = 8;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers, com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers.Builder, com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiersOrBuilder>
+ getTableModifiersFieldBuilder() {
+ if (tableModifiersBuilder_ == null) {
+ tableModifiersBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers, com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers.Builder, com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiersOrBuilder>(
+ getTableModifiers(),
+ getParentForChildren(),
+ isClean());
+ tableModifiers_ = null;
+ }
+ return tableModifiersBuilder_;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(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.v1beta1.ReadSession)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.bigquery.storage.v1beta1.ReadSession)
+ private static final com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession();
+ }
+
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Required. Reference to the table to read. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableReference table_reference = 1;
+ */
+ boolean hasTableReference();
+ /**
+ * + * Required. Reference to the table to read. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableReference table_reference = 1;
+ */
+ com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference getTableReference();
+ /**
+ * + * Required. Reference to the table to read. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableReference table_reference = 1;
+ */
+ com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReferenceOrBuilder getTableReferenceOrBuilder();
+
+ /**
+ * + * Required. String of the form "projects/your-project-id" indicating the + * project this ReadSession is associated with. This is the project that will + * be billed for usage. + *+ * + *
string parent = 6;
+ */
+ java.lang.String getParent();
+ /**
+ * + * Required. String of the form "projects/your-project-id" indicating the + * project this ReadSession is associated with. This is the project that will + * be billed for usage. + *+ * + *
string parent = 6;
+ */
+ com.google.protobuf.ByteString
+ getParentBytes();
+
+ /**
+ * + * Optional. Any modifiers to the Table (e.g. snapshot timestamp). + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableModifiers table_modifiers = 2;
+ */
+ boolean hasTableModifiers();
+ /**
+ * + * Optional. Any modifiers to the Table (e.g. snapshot timestamp). + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableModifiers table_modifiers = 2;
+ */
+ com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers getTableModifiers();
+ /**
+ * + * Optional. Any modifiers to the Table (e.g. snapshot timestamp). + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableModifiers table_modifiers = 2;
+ */
+ com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiersOrBuilder getTableModifiersOrBuilder();
+
+ /**
+ * + * Optional. Initial number of streams. If unset or 0, we 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 and + * the maximum amount of parallelism allowed by the system. + * Streams must be read starting from offset 0. + *+ * + *
int32 requested_streams = 3;
+ */
+ int getRequestedStreams();
+
+ /**
+ * + * Optional. Read options for this session (e.g. column selection, filters). + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableReadOptions read_options = 4;
+ */
+ boolean hasReadOptions();
+ /**
+ * + * Optional. Read options for this session (e.g. column selection, filters). + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableReadOptions read_options = 4;
+ */
+ com.google.cloud.bigquery.storage.v1beta1.ReadOptions.TableReadOptions getReadOptions();
+ /**
+ * + * Optional. Read options for this session (e.g. column selection, filters). + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableReadOptions read_options = 4;
+ */
+ com.google.cloud.bigquery.storage.v1beta1.ReadOptions.TableReadOptionsOrBuilder getReadOptionsOrBuilder();
+
+ /**
+ * + * Data output format. Currently default to Avro. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.DataFormat format = 5;
+ */
+ int getFormatValue();
+ /**
+ * + * Data output format. Currently default to Avro. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.DataFormat format = 5;
+ */
+ com.google.cloud.bigquery.storage.v1beta1.Storage.DataFormat getFormat();
+ }
+ /**
+ * Protobuf type {@code google.cloud.bigquery.storage.v1beta1.CreateReadSessionRequest}
+ */
+ public static final class CreateReadSessionRequest extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:google.cloud.bigquery.storage.v1beta1.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_ = "";
+ requestedStreams_ = 0;
+ format_ = 0;
+ }
+
+ @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();
+ }
+ 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: {
+ com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference.Builder subBuilder = null;
+ if (tableReference_ != null) {
+ subBuilder = tableReference_.toBuilder();
+ }
+ tableReference_ = input.readMessage(com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(tableReference_);
+ tableReference_ = subBuilder.buildPartial();
+ }
+
+ break;
+ }
+ case 18: {
+ com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers.Builder subBuilder = null;
+ if (tableModifiers_ != null) {
+ subBuilder = tableModifiers_.toBuilder();
+ }
+ tableModifiers_ = input.readMessage(com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(tableModifiers_);
+ tableModifiers_ = subBuilder.buildPartial();
+ }
+
+ break;
+ }
+ case 24: {
+
+ requestedStreams_ = input.readInt32();
+ break;
+ }
+ case 34: {
+ com.google.cloud.bigquery.storage.v1beta1.ReadOptions.TableReadOptions.Builder subBuilder = null;
+ if (readOptions_ != null) {
+ subBuilder = readOptions_.toBuilder();
+ }
+ readOptions_ = input.readMessage(com.google.cloud.bigquery.storage.v1beta1.ReadOptions.TableReadOptions.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(readOptions_);
+ readOptions_ = subBuilder.buildPartial();
+ }
+
+ break;
+ }
+ case 40: {
+ int rawValue = input.readEnum();
+
+ format_ = rawValue;
+ break;
+ }
+ case 50: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ parent_ = s;
+ break;
+ }
+ default: {
+ if (!parseUnknownFieldProto3(
+ 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.v1beta1.Storage.internal_static_google_cloud_bigquery_storage_v1beta1_CreateReadSessionRequest_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.bigquery.storage.v1beta1.Storage.internal_static_google_cloud_bigquery_storage_v1beta1_CreateReadSessionRequest_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.bigquery.storage.v1beta1.Storage.CreateReadSessionRequest.class, com.google.cloud.bigquery.storage.v1beta1.Storage.CreateReadSessionRequest.Builder.class);
+ }
+
+ public static final int TABLE_REFERENCE_FIELD_NUMBER = 1;
+ private com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference tableReference_;
+ /**
+ * + * Required. Reference to the table to read. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableReference table_reference = 1;
+ */
+ public boolean hasTableReference() {
+ return tableReference_ != null;
+ }
+ /**
+ * + * Required. Reference to the table to read. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableReference table_reference = 1;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference getTableReference() {
+ return tableReference_ == null ? com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference.getDefaultInstance() : tableReference_;
+ }
+ /**
+ * + * Required. Reference to the table to read. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableReference table_reference = 1;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReferenceOrBuilder getTableReferenceOrBuilder() {
+ return getTableReference();
+ }
+
+ public static final int PARENT_FIELD_NUMBER = 6;
+ private volatile java.lang.Object parent_;
+ /**
+ * + * Required. String of the form "projects/your-project-id" indicating the + * project this ReadSession is associated with. This is the project that will + * be billed for usage. + *+ * + *
string parent = 6;
+ */
+ 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. String of the form "projects/your-project-id" indicating the + * project this ReadSession is associated with. This is the project that will + * be billed for usage. + *+ * + *
string parent = 6;
+ */
+ 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 TABLE_MODIFIERS_FIELD_NUMBER = 2;
+ private com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers tableModifiers_;
+ /**
+ * + * Optional. Any modifiers to the Table (e.g. snapshot timestamp). + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableModifiers table_modifiers = 2;
+ */
+ public boolean hasTableModifiers() {
+ return tableModifiers_ != null;
+ }
+ /**
+ * + * Optional. Any modifiers to the Table (e.g. snapshot timestamp). + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableModifiers table_modifiers = 2;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers getTableModifiers() {
+ return tableModifiers_ == null ? com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers.getDefaultInstance() : tableModifiers_;
+ }
+ /**
+ * + * Optional. Any modifiers to the Table (e.g. snapshot timestamp). + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableModifiers table_modifiers = 2;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiersOrBuilder getTableModifiersOrBuilder() {
+ return getTableModifiers();
+ }
+
+ public static final int REQUESTED_STREAMS_FIELD_NUMBER = 3;
+ private int requestedStreams_;
+ /**
+ * + * Optional. Initial number of streams. If unset or 0, we 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 and + * the maximum amount of parallelism allowed by the system. + * Streams must be read starting from offset 0. + *+ * + *
int32 requested_streams = 3;
+ */
+ public int getRequestedStreams() {
+ return requestedStreams_;
+ }
+
+ public static final int READ_OPTIONS_FIELD_NUMBER = 4;
+ private com.google.cloud.bigquery.storage.v1beta1.ReadOptions.TableReadOptions readOptions_;
+ /**
+ * + * Optional. Read options for this session (e.g. column selection, filters). + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableReadOptions read_options = 4;
+ */
+ public boolean hasReadOptions() {
+ return readOptions_ != null;
+ }
+ /**
+ * + * Optional. Read options for this session (e.g. column selection, filters). + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableReadOptions read_options = 4;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.ReadOptions.TableReadOptions getReadOptions() {
+ return readOptions_ == null ? com.google.cloud.bigquery.storage.v1beta1.ReadOptions.TableReadOptions.getDefaultInstance() : readOptions_;
+ }
+ /**
+ * + * Optional. Read options for this session (e.g. column selection, filters). + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableReadOptions read_options = 4;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.ReadOptions.TableReadOptionsOrBuilder getReadOptionsOrBuilder() {
+ return getReadOptions();
+ }
+
+ public static final int FORMAT_FIELD_NUMBER = 5;
+ private int format_;
+ /**
+ * + * Data output format. Currently default to Avro. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.DataFormat format = 5;
+ */
+ public int getFormatValue() {
+ return format_;
+ }
+ /**
+ * + * Data output format. Currently default to Avro. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.DataFormat format = 5;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.DataFormat getFormat() {
+ @SuppressWarnings("deprecation")
+ com.google.cloud.bigquery.storage.v1beta1.Storage.DataFormat result = com.google.cloud.bigquery.storage.v1beta1.Storage.DataFormat.valueOf(format_);
+ return result == null ? com.google.cloud.bigquery.storage.v1beta1.Storage.DataFormat.UNRECOGNIZED : result;
+ }
+
+ 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 (tableReference_ != null) {
+ output.writeMessage(1, getTableReference());
+ }
+ if (tableModifiers_ != null) {
+ output.writeMessage(2, getTableModifiers());
+ }
+ if (requestedStreams_ != 0) {
+ output.writeInt32(3, requestedStreams_);
+ }
+ if (readOptions_ != null) {
+ output.writeMessage(4, getReadOptions());
+ }
+ if (format_ != com.google.cloud.bigquery.storage.v1beta1.Storage.DataFormat.DATA_FORMAT_UNSPECIFIED.getNumber()) {
+ output.writeEnum(5, format_);
+ }
+ if (!getParentBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 6, parent_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (tableReference_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(1, getTableReference());
+ }
+ if (tableModifiers_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(2, getTableModifiers());
+ }
+ if (requestedStreams_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(3, requestedStreams_);
+ }
+ if (readOptions_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(4, getReadOptions());
+ }
+ if (format_ != com.google.cloud.bigquery.storage.v1beta1.Storage.DataFormat.DATA_FORMAT_UNSPECIFIED.getNumber()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeEnumSize(5, format_);
+ }
+ if (!getParentBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, parent_);
+ }
+ 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.v1beta1.Storage.CreateReadSessionRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.bigquery.storage.v1beta1.Storage.CreateReadSessionRequest other = (com.google.cloud.bigquery.storage.v1beta1.Storage.CreateReadSessionRequest) obj;
+
+ boolean result = true;
+ result = result && (hasTableReference() == other.hasTableReference());
+ if (hasTableReference()) {
+ result = result && getTableReference()
+ .equals(other.getTableReference());
+ }
+ result = result && getParent()
+ .equals(other.getParent());
+ result = result && (hasTableModifiers() == other.hasTableModifiers());
+ if (hasTableModifiers()) {
+ result = result && getTableModifiers()
+ .equals(other.getTableModifiers());
+ }
+ result = result && (getRequestedStreams()
+ == other.getRequestedStreams());
+ result = result && (hasReadOptions() == other.hasReadOptions());
+ if (hasReadOptions()) {
+ result = result && getReadOptions()
+ .equals(other.getReadOptions());
+ }
+ result = result && format_ == other.format_;
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasTableReference()) {
+ hash = (37 * hash) + TABLE_REFERENCE_FIELD_NUMBER;
+ hash = (53 * hash) + getTableReference().hashCode();
+ }
+ hash = (37 * hash) + PARENT_FIELD_NUMBER;
+ hash = (53 * hash) + getParent().hashCode();
+ if (hasTableModifiers()) {
+ hash = (37 * hash) + TABLE_MODIFIERS_FIELD_NUMBER;
+ hash = (53 * hash) + getTableModifiers().hashCode();
+ }
+ hash = (37 * hash) + REQUESTED_STREAMS_FIELD_NUMBER;
+ hash = (53 * hash) + getRequestedStreams();
+ if (hasReadOptions()) {
+ hash = (37 * hash) + READ_OPTIONS_FIELD_NUMBER;
+ hash = (53 * hash) + getReadOptions().hashCode();
+ }
+ hash = (37 * hash) + FORMAT_FIELD_NUMBER;
+ hash = (53 * hash) + format_;
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.CreateReadSessionRequest parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.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.v1beta1.Storage.CreateReadSessionRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.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.v1beta1.Storage.CreateReadSessionRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.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.v1beta1.Storage.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.v1beta1.Storage.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.v1beta1.Storage.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.v1beta1.Storage.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.v1beta1.Storage.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.v1beta1.Storage.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.v1beta1.Storage.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;
+ }
+ /**
+ * Protobuf type {@code google.cloud.bigquery.storage.v1beta1.CreateReadSessionRequest}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder+ * Required. Reference to the table to read. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableReference table_reference = 1;
+ */
+ public boolean hasTableReference() {
+ return tableReferenceBuilder_ != null || tableReference_ != null;
+ }
+ /**
+ * + * Required. Reference to the table to read. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableReference table_reference = 1;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference getTableReference() {
+ if (tableReferenceBuilder_ == null) {
+ return tableReference_ == null ? com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference.getDefaultInstance() : tableReference_;
+ } else {
+ return tableReferenceBuilder_.getMessage();
+ }
+ }
+ /**
+ * + * Required. Reference to the table to read. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableReference table_reference = 1;
+ */
+ public Builder setTableReference(com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference value) {
+ if (tableReferenceBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ tableReference_ = value;
+ onChanged();
+ } else {
+ tableReferenceBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ * + * Required. Reference to the table to read. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableReference table_reference = 1;
+ */
+ public Builder setTableReference(
+ com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference.Builder builderForValue) {
+ if (tableReferenceBuilder_ == null) {
+ tableReference_ = builderForValue.build();
+ onChanged();
+ } else {
+ tableReferenceBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ * + * Required. Reference to the table to read. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableReference table_reference = 1;
+ */
+ public Builder mergeTableReference(com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference value) {
+ if (tableReferenceBuilder_ == null) {
+ if (tableReference_ != null) {
+ tableReference_ =
+ com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference.newBuilder(tableReference_).mergeFrom(value).buildPartial();
+ } else {
+ tableReference_ = value;
+ }
+ onChanged();
+ } else {
+ tableReferenceBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ * + * Required. Reference to the table to read. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableReference table_reference = 1;
+ */
+ public Builder clearTableReference() {
+ if (tableReferenceBuilder_ == null) {
+ tableReference_ = null;
+ onChanged();
+ } else {
+ tableReference_ = null;
+ tableReferenceBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ * + * Required. Reference to the table to read. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableReference table_reference = 1;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference.Builder getTableReferenceBuilder() {
+
+ onChanged();
+ return getTableReferenceFieldBuilder().getBuilder();
+ }
+ /**
+ * + * Required. Reference to the table to read. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableReference table_reference = 1;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReferenceOrBuilder getTableReferenceOrBuilder() {
+ if (tableReferenceBuilder_ != null) {
+ return tableReferenceBuilder_.getMessageOrBuilder();
+ } else {
+ return tableReference_ == null ?
+ com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference.getDefaultInstance() : tableReference_;
+ }
+ }
+ /**
+ * + * Required. Reference to the table to read. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableReference table_reference = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference, com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference.Builder, com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReferenceOrBuilder>
+ getTableReferenceFieldBuilder() {
+ if (tableReferenceBuilder_ == null) {
+ tableReferenceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference, com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference.Builder, com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReferenceOrBuilder>(
+ getTableReference(),
+ getParentForChildren(),
+ isClean());
+ tableReference_ = null;
+ }
+ return tableReferenceBuilder_;
+ }
+
+ private java.lang.Object parent_ = "";
+ /**
+ * + * Required. String of the form "projects/your-project-id" indicating the + * project this ReadSession is associated with. This is the project that will + * be billed for usage. + *+ * + *
string parent = 6;
+ */
+ 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. String of the form "projects/your-project-id" indicating the + * project this ReadSession is associated with. This is the project that will + * be billed for usage. + *+ * + *
string parent = 6;
+ */
+ 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. String of the form "projects/your-project-id" indicating the + * project this ReadSession is associated with. This is the project that will + * be billed for usage. + *+ * + *
string parent = 6;
+ */
+ public Builder setParent(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ parent_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * + * Required. String of the form "projects/your-project-id" indicating the + * project this ReadSession is associated with. This is the project that will + * be billed for usage. + *+ * + *
string parent = 6;
+ */
+ public Builder clearParent() {
+
+ parent_ = getDefaultInstance().getParent();
+ onChanged();
+ return this;
+ }
+ /**
+ * + * Required. String of the form "projects/your-project-id" indicating the + * project this ReadSession is associated with. This is the project that will + * be billed for usage. + *+ * + *
string parent = 6;
+ */
+ 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.v1beta1.TableReferenceProto.TableModifiers tableModifiers_ = null;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers, com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers.Builder, com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiersOrBuilder> tableModifiersBuilder_;
+ /**
+ * + * Optional. Any modifiers to the Table (e.g. snapshot timestamp). + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableModifiers table_modifiers = 2;
+ */
+ public boolean hasTableModifiers() {
+ return tableModifiersBuilder_ != null || tableModifiers_ != null;
+ }
+ /**
+ * + * Optional. Any modifiers to the Table (e.g. snapshot timestamp). + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableModifiers table_modifiers = 2;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers getTableModifiers() {
+ if (tableModifiersBuilder_ == null) {
+ return tableModifiers_ == null ? com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers.getDefaultInstance() : tableModifiers_;
+ } else {
+ return tableModifiersBuilder_.getMessage();
+ }
+ }
+ /**
+ * + * Optional. Any modifiers to the Table (e.g. snapshot timestamp). + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableModifiers table_modifiers = 2;
+ */
+ public Builder setTableModifiers(com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers value) {
+ if (tableModifiersBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ tableModifiers_ = value;
+ onChanged();
+ } else {
+ tableModifiersBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ * + * Optional. Any modifiers to the Table (e.g. snapshot timestamp). + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableModifiers table_modifiers = 2;
+ */
+ public Builder setTableModifiers(
+ com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers.Builder builderForValue) {
+ if (tableModifiersBuilder_ == null) {
+ tableModifiers_ = builderForValue.build();
+ onChanged();
+ } else {
+ tableModifiersBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ * + * Optional. Any modifiers to the Table (e.g. snapshot timestamp). + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableModifiers table_modifiers = 2;
+ */
+ public Builder mergeTableModifiers(com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers value) {
+ if (tableModifiersBuilder_ == null) {
+ if (tableModifiers_ != null) {
+ tableModifiers_ =
+ com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers.newBuilder(tableModifiers_).mergeFrom(value).buildPartial();
+ } else {
+ tableModifiers_ = value;
+ }
+ onChanged();
+ } else {
+ tableModifiersBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ * + * Optional. Any modifiers to the Table (e.g. snapshot timestamp). + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableModifiers table_modifiers = 2;
+ */
+ public Builder clearTableModifiers() {
+ if (tableModifiersBuilder_ == null) {
+ tableModifiers_ = null;
+ onChanged();
+ } else {
+ tableModifiers_ = null;
+ tableModifiersBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ * + * Optional. Any modifiers to the Table (e.g. snapshot timestamp). + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableModifiers table_modifiers = 2;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers.Builder getTableModifiersBuilder() {
+
+ onChanged();
+ return getTableModifiersFieldBuilder().getBuilder();
+ }
+ /**
+ * + * Optional. Any modifiers to the Table (e.g. snapshot timestamp). + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableModifiers table_modifiers = 2;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiersOrBuilder getTableModifiersOrBuilder() {
+ if (tableModifiersBuilder_ != null) {
+ return tableModifiersBuilder_.getMessageOrBuilder();
+ } else {
+ return tableModifiers_ == null ?
+ com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers.getDefaultInstance() : tableModifiers_;
+ }
+ }
+ /**
+ * + * Optional. Any modifiers to the Table (e.g. snapshot timestamp). + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableModifiers table_modifiers = 2;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers, com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers.Builder, com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiersOrBuilder>
+ getTableModifiersFieldBuilder() {
+ if (tableModifiersBuilder_ == null) {
+ tableModifiersBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers, com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers.Builder, com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiersOrBuilder>(
+ getTableModifiers(),
+ getParentForChildren(),
+ isClean());
+ tableModifiers_ = null;
+ }
+ return tableModifiersBuilder_;
+ }
+
+ private int requestedStreams_ ;
+ /**
+ * + * Optional. Initial number of streams. If unset or 0, we 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 and + * the maximum amount of parallelism allowed by the system. + * Streams must be read starting from offset 0. + *+ * + *
int32 requested_streams = 3;
+ */
+ public int getRequestedStreams() {
+ return requestedStreams_;
+ }
+ /**
+ * + * Optional. Initial number of streams. If unset or 0, we 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 and + * the maximum amount of parallelism allowed by the system. + * Streams must be read starting from offset 0. + *+ * + *
int32 requested_streams = 3;
+ */
+ public Builder setRequestedStreams(int value) {
+
+ requestedStreams_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * + * Optional. Initial number of streams. If unset or 0, we 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 and + * the maximum amount of parallelism allowed by the system. + * Streams must be read starting from offset 0. + *+ * + *
int32 requested_streams = 3;
+ */
+ public Builder clearRequestedStreams() {
+
+ requestedStreams_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private com.google.cloud.bigquery.storage.v1beta1.ReadOptions.TableReadOptions readOptions_ = null;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1beta1.ReadOptions.TableReadOptions, com.google.cloud.bigquery.storage.v1beta1.ReadOptions.TableReadOptions.Builder, com.google.cloud.bigquery.storage.v1beta1.ReadOptions.TableReadOptionsOrBuilder> readOptionsBuilder_;
+ /**
+ * + * Optional. Read options for this session (e.g. column selection, filters). + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableReadOptions read_options = 4;
+ */
+ public boolean hasReadOptions() {
+ return readOptionsBuilder_ != null || readOptions_ != null;
+ }
+ /**
+ * + * Optional. Read options for this session (e.g. column selection, filters). + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableReadOptions read_options = 4;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.ReadOptions.TableReadOptions getReadOptions() {
+ if (readOptionsBuilder_ == null) {
+ return readOptions_ == null ? com.google.cloud.bigquery.storage.v1beta1.ReadOptions.TableReadOptions.getDefaultInstance() : readOptions_;
+ } else {
+ return readOptionsBuilder_.getMessage();
+ }
+ }
+ /**
+ * + * Optional. Read options for this session (e.g. column selection, filters). + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableReadOptions read_options = 4;
+ */
+ public Builder setReadOptions(com.google.cloud.bigquery.storage.v1beta1.ReadOptions.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.v1beta1.TableReadOptions read_options = 4;
+ */
+ public Builder setReadOptions(
+ com.google.cloud.bigquery.storage.v1beta1.ReadOptions.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.v1beta1.TableReadOptions read_options = 4;
+ */
+ public Builder mergeReadOptions(com.google.cloud.bigquery.storage.v1beta1.ReadOptions.TableReadOptions value) {
+ if (readOptionsBuilder_ == null) {
+ if (readOptions_ != null) {
+ readOptions_ =
+ com.google.cloud.bigquery.storage.v1beta1.ReadOptions.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.v1beta1.TableReadOptions read_options = 4;
+ */
+ 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.v1beta1.TableReadOptions read_options = 4;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.ReadOptions.TableReadOptions.Builder getReadOptionsBuilder() {
+
+ onChanged();
+ return getReadOptionsFieldBuilder().getBuilder();
+ }
+ /**
+ * + * Optional. Read options for this session (e.g. column selection, filters). + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableReadOptions read_options = 4;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.ReadOptions.TableReadOptionsOrBuilder getReadOptionsOrBuilder() {
+ if (readOptionsBuilder_ != null) {
+ return readOptionsBuilder_.getMessageOrBuilder();
+ } else {
+ return readOptions_ == null ?
+ com.google.cloud.bigquery.storage.v1beta1.ReadOptions.TableReadOptions.getDefaultInstance() : readOptions_;
+ }
+ }
+ /**
+ * + * Optional. Read options for this session (e.g. column selection, filters). + *+ * + *
.google.cloud.bigquery.storage.v1beta1.TableReadOptions read_options = 4;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1beta1.ReadOptions.TableReadOptions, com.google.cloud.bigquery.storage.v1beta1.ReadOptions.TableReadOptions.Builder, com.google.cloud.bigquery.storage.v1beta1.ReadOptions.TableReadOptionsOrBuilder>
+ getReadOptionsFieldBuilder() {
+ if (readOptionsBuilder_ == null) {
+ readOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1beta1.ReadOptions.TableReadOptions, com.google.cloud.bigquery.storage.v1beta1.ReadOptions.TableReadOptions.Builder, com.google.cloud.bigquery.storage.v1beta1.ReadOptions.TableReadOptionsOrBuilder>(
+ getReadOptions(),
+ getParentForChildren(),
+ isClean());
+ readOptions_ = null;
+ }
+ return readOptionsBuilder_;
+ }
+
+ private int format_ = 0;
+ /**
+ * + * Data output format. Currently default to Avro. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.DataFormat format = 5;
+ */
+ public int getFormatValue() {
+ return format_;
+ }
+ /**
+ * + * Data output format. Currently default to Avro. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.DataFormat format = 5;
+ */
+ public Builder setFormatValue(int value) {
+ format_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * + * Data output format. Currently default to Avro. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.DataFormat format = 5;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.DataFormat getFormat() {
+ @SuppressWarnings("deprecation")
+ com.google.cloud.bigquery.storage.v1beta1.Storage.DataFormat result = com.google.cloud.bigquery.storage.v1beta1.Storage.DataFormat.valueOf(format_);
+ return result == null ? com.google.cloud.bigquery.storage.v1beta1.Storage.DataFormat.UNRECOGNIZED : result;
+ }
+ /**
+ * + * Data output format. Currently default to Avro. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.DataFormat format = 5;
+ */
+ public Builder setFormat(com.google.cloud.bigquery.storage.v1beta1.Storage.DataFormat value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ format_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ * + * Data output format. Currently default to Avro. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.DataFormat format = 5;
+ */
+ public Builder clearFormat() {
+
+ format_ = 0;
+ onChanged();
+ return this;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(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.v1beta1.CreateReadSessionRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.bigquery.storage.v1beta1.CreateReadSessionRequest)
+ private static final com.google.cloud.bigquery.storage.v1beta1.Storage.CreateReadSessionRequest DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.bigquery.storage.v1beta1.Storage.CreateReadSessionRequest();
+ }
+
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.CreateReadSessionRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Required. Identifier of the position in the stream to start reading from. + * The offset requested must be less than the last row read from ReadRows. + * Requesting a larger offset is undefined. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.StreamPosition read_position = 1;
+ */
+ boolean hasReadPosition();
+ /**
+ * + * Required. Identifier of the position in the stream to start reading from. + * The offset requested must be less than the last row read from ReadRows. + * Requesting a larger offset is undefined. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.StreamPosition read_position = 1;
+ */
+ com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPosition getReadPosition();
+ /**
+ * + * Required. Identifier of the position in the stream to start reading from. + * The offset requested must be less than the last row read from ReadRows. + * Requesting a larger offset is undefined. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.StreamPosition read_position = 1;
+ */
+ com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPositionOrBuilder getReadPositionOrBuilder();
+ }
+ /**
+ * Protobuf type {@code google.cloud.bigquery.storage.v1beta1.ReadRowsRequest}
+ */
+ public static final class ReadRowsRequest extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:google.cloud.bigquery.storage.v1beta1.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() {
+ }
+
+ @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();
+ }
+ 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: {
+ com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPosition.Builder subBuilder = null;
+ if (readPosition_ != null) {
+ subBuilder = readPosition_.toBuilder();
+ }
+ readPosition_ = input.readMessage(com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPosition.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(readPosition_);
+ readPosition_ = subBuilder.buildPartial();
+ }
+
+ break;
+ }
+ default: {
+ if (!parseUnknownFieldProto3(
+ 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.v1beta1.Storage.internal_static_google_cloud_bigquery_storage_v1beta1_ReadRowsRequest_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.bigquery.storage.v1beta1.Storage.internal_static_google_cloud_bigquery_storage_v1beta1_ReadRowsRequest_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsRequest.class, com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsRequest.Builder.class);
+ }
+
+ public static final int READ_POSITION_FIELD_NUMBER = 1;
+ private com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPosition readPosition_;
+ /**
+ * + * Required. Identifier of the position in the stream to start reading from. + * The offset requested must be less than the last row read from ReadRows. + * Requesting a larger offset is undefined. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.StreamPosition read_position = 1;
+ */
+ public boolean hasReadPosition() {
+ return readPosition_ != null;
+ }
+ /**
+ * + * Required. Identifier of the position in the stream to start reading from. + * The offset requested must be less than the last row read from ReadRows. + * Requesting a larger offset is undefined. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.StreamPosition read_position = 1;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPosition getReadPosition() {
+ return readPosition_ == null ? com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPosition.getDefaultInstance() : readPosition_;
+ }
+ /**
+ * + * Required. Identifier of the position in the stream to start reading from. + * The offset requested must be less than the last row read from ReadRows. + * Requesting a larger offset is undefined. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.StreamPosition read_position = 1;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPositionOrBuilder getReadPositionOrBuilder() {
+ return getReadPosition();
+ }
+
+ 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 (readPosition_ != null) {
+ output.writeMessage(1, getReadPosition());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (readPosition_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(1, getReadPosition());
+ }
+ 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.v1beta1.Storage.ReadRowsRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsRequest other = (com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsRequest) obj;
+
+ boolean result = true;
+ result = result && (hasReadPosition() == other.hasReadPosition());
+ if (hasReadPosition()) {
+ result = result && getReadPosition()
+ .equals(other.getReadPosition());
+ }
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasReadPosition()) {
+ hash = (37 * hash) + READ_POSITION_FIELD_NUMBER;
+ hash = (53 * hash) + getReadPosition().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsRequest parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.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.v1beta1.Storage.ReadRowsRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.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.v1beta1.Storage.ReadRowsRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.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.v1beta1.Storage.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.v1beta1.Storage.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.v1beta1.Storage.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.v1beta1.Storage.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.v1beta1.Storage.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.v1beta1.Storage.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.v1beta1.Storage.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;
+ }
+ /**
+ * Protobuf type {@code google.cloud.bigquery.storage.v1beta1.ReadRowsRequest}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder+ * Required. Identifier of the position in the stream to start reading from. + * The offset requested must be less than the last row read from ReadRows. + * Requesting a larger offset is undefined. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.StreamPosition read_position = 1;
+ */
+ public boolean hasReadPosition() {
+ return readPositionBuilder_ != null || readPosition_ != null;
+ }
+ /**
+ * + * Required. Identifier of the position in the stream to start reading from. + * The offset requested must be less than the last row read from ReadRows. + * Requesting a larger offset is undefined. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.StreamPosition read_position = 1;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPosition getReadPosition() {
+ if (readPositionBuilder_ == null) {
+ return readPosition_ == null ? com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPosition.getDefaultInstance() : readPosition_;
+ } else {
+ return readPositionBuilder_.getMessage();
+ }
+ }
+ /**
+ * + * Required. Identifier of the position in the stream to start reading from. + * The offset requested must be less than the last row read from ReadRows. + * Requesting a larger offset is undefined. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.StreamPosition read_position = 1;
+ */
+ public Builder setReadPosition(com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPosition value) {
+ if (readPositionBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ readPosition_ = value;
+ onChanged();
+ } else {
+ readPositionBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ * + * Required. Identifier of the position in the stream to start reading from. + * The offset requested must be less than the last row read from ReadRows. + * Requesting a larger offset is undefined. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.StreamPosition read_position = 1;
+ */
+ public Builder setReadPosition(
+ com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPosition.Builder builderForValue) {
+ if (readPositionBuilder_ == null) {
+ readPosition_ = builderForValue.build();
+ onChanged();
+ } else {
+ readPositionBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ * + * Required. Identifier of the position in the stream to start reading from. + * The offset requested must be less than the last row read from ReadRows. + * Requesting a larger offset is undefined. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.StreamPosition read_position = 1;
+ */
+ public Builder mergeReadPosition(com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPosition value) {
+ if (readPositionBuilder_ == null) {
+ if (readPosition_ != null) {
+ readPosition_ =
+ com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPosition.newBuilder(readPosition_).mergeFrom(value).buildPartial();
+ } else {
+ readPosition_ = value;
+ }
+ onChanged();
+ } else {
+ readPositionBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ * + * Required. Identifier of the position in the stream to start reading from. + * The offset requested must be less than the last row read from ReadRows. + * Requesting a larger offset is undefined. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.StreamPosition read_position = 1;
+ */
+ public Builder clearReadPosition() {
+ if (readPositionBuilder_ == null) {
+ readPosition_ = null;
+ onChanged();
+ } else {
+ readPosition_ = null;
+ readPositionBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ * + * Required. Identifier of the position in the stream to start reading from. + * The offset requested must be less than the last row read from ReadRows. + * Requesting a larger offset is undefined. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.StreamPosition read_position = 1;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPosition.Builder getReadPositionBuilder() {
+
+ onChanged();
+ return getReadPositionFieldBuilder().getBuilder();
+ }
+ /**
+ * + * Required. Identifier of the position in the stream to start reading from. + * The offset requested must be less than the last row read from ReadRows. + * Requesting a larger offset is undefined. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.StreamPosition read_position = 1;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPositionOrBuilder getReadPositionOrBuilder() {
+ if (readPositionBuilder_ != null) {
+ return readPositionBuilder_.getMessageOrBuilder();
+ } else {
+ return readPosition_ == null ?
+ com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPosition.getDefaultInstance() : readPosition_;
+ }
+ }
+ /**
+ * + * Required. Identifier of the position in the stream to start reading from. + * The offset requested must be less than the last row read from ReadRows. + * Requesting a larger offset is undefined. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.StreamPosition read_position = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPosition, com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPosition.Builder, com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPositionOrBuilder>
+ getReadPositionFieldBuilder() {
+ if (readPositionBuilder_ == null) {
+ readPositionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPosition, com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPosition.Builder, com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPositionOrBuilder>(
+ getReadPosition(),
+ getParentForChildren(),
+ isClean());
+ readPosition_ = null;
+ }
+ return readPositionBuilder_;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(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.v1beta1.ReadRowsRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.bigquery.storage.v1beta1.ReadRowsRequest)
+ private static final com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsRequest DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsRequest();
+ }
+
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Number of estimated rows in the current stream. May change over time as + * different readers in the stream progress at rates which are relatively fast + * or slow. + *+ * + *
int64 estimated_row_count = 1;
+ */
+ long getEstimatedRowCount();
+ }
+ /**
+ * Protobuf type {@code google.cloud.bigquery.storage.v1beta1.StreamStatus}
+ */
+ public static final class StreamStatus extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:google.cloud.bigquery.storage.v1beta1.StreamStatus)
+ StreamStatusOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use StreamStatus.newBuilder() to construct.
+ private StreamStatus(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private StreamStatus() {
+ estimatedRowCount_ = 0L;
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private StreamStatus(
+ 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 8: {
+
+ estimatedRowCount_ = input.readInt64();
+ break;
+ }
+ default: {
+ if (!parseUnknownFieldProto3(
+ 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.v1beta1.Storage.internal_static_google_cloud_bigquery_storage_v1beta1_StreamStatus_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.bigquery.storage.v1beta1.Storage.internal_static_google_cloud_bigquery_storage_v1beta1_StreamStatus_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus.class, com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus.Builder.class);
+ }
+
+ public static final int ESTIMATED_ROW_COUNT_FIELD_NUMBER = 1;
+ private long estimatedRowCount_;
+ /**
+ * + * Number of estimated rows in the current stream. May change over time as + * different readers in the stream progress at rates which are relatively fast + * or slow. + *+ * + *
int64 estimated_row_count = 1;
+ */
+ public long getEstimatedRowCount() {
+ return estimatedRowCount_;
+ }
+
+ 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 (estimatedRowCount_ != 0L) {
+ output.writeInt64(1, estimatedRowCount_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (estimatedRowCount_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt64Size(1, estimatedRowCount_);
+ }
+ 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.v1beta1.Storage.StreamStatus)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus other = (com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus) obj;
+
+ boolean result = true;
+ result = result && (getEstimatedRowCount()
+ == other.getEstimatedRowCount());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + ESTIMATED_ROW_COUNT_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ getEstimatedRowCount());
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus 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.v1beta1.Storage.StreamStatus parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus 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.v1beta1.Storage.StreamStatus parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus 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.v1beta1.Storage.StreamStatus parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus 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.v1beta1.Storage.StreamStatus parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus 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.v1beta1.Storage.StreamStatus 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.v1beta1.Storage.StreamStatus 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.v1beta1.Storage.StreamStatus 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.v1beta1.StreamStatus}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder+ * Number of estimated rows in the current stream. May change over time as + * different readers in the stream progress at rates which are relatively fast + * or slow. + *+ * + *
int64 estimated_row_count = 1;
+ */
+ public long getEstimatedRowCount() {
+ return estimatedRowCount_;
+ }
+ /**
+ * + * Number of estimated rows in the current stream. May change over time as + * different readers in the stream progress at rates which are relatively fast + * or slow. + *+ * + *
int64 estimated_row_count = 1;
+ */
+ public Builder setEstimatedRowCount(long value) {
+
+ estimatedRowCount_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * + * Number of estimated rows in the current stream. May change over time as + * different readers in the stream progress at rates which are relatively fast + * or slow. + *+ * + *
int64 estimated_row_count = 1;
+ */
+ public Builder clearEstimatedRowCount() {
+
+ estimatedRowCount_ = 0L;
+ onChanged();
+ return this;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(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.v1beta1.StreamStatus)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.bigquery.storage.v1beta1.StreamStatus)
+ private static final com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus();
+ }
+
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * How much this connection is being throttled. + * 0 is no throttling, 100 is completely throttled. + *+ * + *
int32 throttle_percent = 1;
+ */
+ int getThrottlePercent();
+ }
+ /**
+ * + * Information on if the current connection is being throttled. + *+ * + * Protobuf type {@code google.cloud.bigquery.storage.v1beta1.ThrottleStatus} + */ + public static final class ThrottleStatus extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.bigquery.storage.v1beta1.ThrottleStatus) + ThrottleStatusOrBuilder { + private static final long serialVersionUID = 0L; + // Use ThrottleStatus.newBuilder() to construct. + private ThrottleStatus(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + private ThrottleStatus() { + throttlePercent_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ThrottleStatus( + 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 8: { + + throttlePercent_ = input.readInt32(); + break; + } + default: { + if (!parseUnknownFieldProto3( + 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.v1beta1.Storage.internal_static_google_cloud_bigquery_storage_v1beta1_ThrottleStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.bigquery.storage.v1beta1.Storage.internal_static_google_cloud_bigquery_storage_v1beta1_ThrottleStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus.class, com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus.Builder.class); + } + + public static final int THROTTLE_PERCENT_FIELD_NUMBER = 1; + private int throttlePercent_; + /** + *
+ * How much this connection is being throttled. + * 0 is no throttling, 100 is completely throttled. + *+ * + *
int32 throttle_percent = 1;
+ */
+ public int getThrottlePercent() {
+ return throttlePercent_;
+ }
+
+ 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 (throttlePercent_ != 0) {
+ output.writeInt32(1, throttlePercent_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (throttlePercent_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(1, throttlePercent_);
+ }
+ 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.v1beta1.Storage.ThrottleStatus)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus other = (com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus) obj;
+
+ boolean result = true;
+ result = result && (getThrottlePercent()
+ == other.getThrottlePercent());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + THROTTLE_PERCENT_FIELD_NUMBER;
+ hash = (53 * hash) + getThrottlePercent();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus 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.v1beta1.Storage.ThrottleStatus parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus 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.v1beta1.Storage.ThrottleStatus parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus 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.v1beta1.Storage.ThrottleStatus parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus 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.v1beta1.Storage.ThrottleStatus parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus 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.v1beta1.Storage.ThrottleStatus 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.v1beta1.Storage.ThrottleStatus 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.v1beta1.Storage.ThrottleStatus 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 on if the current connection is being throttled. + *+ * + * Protobuf type {@code google.cloud.bigquery.storage.v1beta1.ThrottleStatus} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder
+ * How much this connection is being throttled. + * 0 is no throttling, 100 is completely throttled. + *+ * + *
int32 throttle_percent = 1;
+ */
+ public int getThrottlePercent() {
+ return throttlePercent_;
+ }
+ /**
+ * + * How much this connection is being throttled. + * 0 is no throttling, 100 is completely throttled. + *+ * + *
int32 throttle_percent = 1;
+ */
+ public Builder setThrottlePercent(int value) {
+
+ throttlePercent_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * + * How much this connection is being throttled. + * 0 is no throttling, 100 is completely throttled. + *+ * + *
int32 throttle_percent = 1;
+ */
+ public Builder clearThrottlePercent() {
+
+ throttlePercent_ = 0;
+ onChanged();
+ return this;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(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.v1beta1.ThrottleStatus)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.bigquery.storage.v1beta1.ThrottleStatus)
+ private static final com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus();
+ }
+
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Serialized row data in AVRO format. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.AvroRows avro_rows = 3;
+ */
+ boolean hasAvroRows();
+ /**
+ * + * Serialized row data in AVRO format. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.AvroRows avro_rows = 3;
+ */
+ com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows getAvroRows();
+ /**
+ * + * Serialized row data in AVRO format. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.AvroRows avro_rows = 3;
+ */
+ com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRowsOrBuilder getAvroRowsOrBuilder();
+
+ /**
+ * + * Estimated stream statistics. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.StreamStatus status = 2;
+ */
+ boolean hasStatus();
+ /**
+ * + * Estimated stream statistics. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.StreamStatus status = 2;
+ */
+ com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus getStatus();
+ /**
+ * + * Estimated stream statistics. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.StreamStatus status = 2;
+ */
+ com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatusOrBuilder getStatusOrBuilder();
+
+ /**
+ * + * Throttling status. If unset, the latest response still describes + * the current throttling status. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.ThrottleStatus throttle_status = 5;
+ */
+ boolean hasThrottleStatus();
+ /**
+ * + * Throttling status. If unset, the latest response still describes + * the current throttling status. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.ThrottleStatus throttle_status = 5;
+ */
+ com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus getThrottleStatus();
+ /**
+ * + * Throttling status. If unset, the latest response still describes + * the current throttling status. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.ThrottleStatus throttle_status = 5;
+ */
+ com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatusOrBuilder getThrottleStatusOrBuilder();
+
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsResponse.RowsCase getRowsCase();
+ }
+ /**
+ * Protobuf type {@code google.cloud.bigquery.storage.v1beta1.ReadRowsResponse}
+ */
+ public static final class ReadRowsResponse extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:google.cloud.bigquery.storage.v1beta1.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
+ 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();
+ }
+ 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 18: {
+ com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus.Builder subBuilder = null;
+ if (status_ != null) {
+ subBuilder = status_.toBuilder();
+ }
+ status_ = input.readMessage(com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(status_);
+ status_ = subBuilder.buildPartial();
+ }
+
+ break;
+ }
+ case 26: {
+ com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows.Builder subBuilder = null;
+ if (rowsCase_ == 3) {
+ subBuilder = ((com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows) rows_).toBuilder();
+ }
+ rows_ =
+ input.readMessage(com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom((com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows) rows_);
+ rows_ = subBuilder.buildPartial();
+ }
+ rowsCase_ = 3;
+ break;
+ }
+ case 42: {
+ com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus.Builder subBuilder = null;
+ if (throttleStatus_ != null) {
+ subBuilder = throttleStatus_.toBuilder();
+ }
+ throttleStatus_ = input.readMessage(com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(throttleStatus_);
+ throttleStatus_ = subBuilder.buildPartial();
+ }
+
+ break;
+ }
+ default: {
+ if (!parseUnknownFieldProto3(
+ 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.v1beta1.Storage.internal_static_google_cloud_bigquery_storage_v1beta1_ReadRowsResponse_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.bigquery.storage.v1beta1.Storage.internal_static_google_cloud_bigquery_storage_v1beta1_ReadRowsResponse_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsResponse.class, com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsResponse.Builder.class);
+ }
+
+ private int rowsCase_ = 0;
+ private java.lang.Object rows_;
+ public enum RowsCase
+ implements com.google.protobuf.Internal.EnumLite {
+ AVRO_ROWS(3),
+ ROWS_NOT_SET(0);
+ private final int value;
+ private RowsCase(int value) {
+ this.value = value;
+ }
+ /**
+ * @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 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.v1beta1.AvroRows avro_rows = 3;
+ */
+ public boolean hasAvroRows() {
+ return rowsCase_ == 3;
+ }
+ /**
+ * + * Serialized row data in AVRO format. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.AvroRows avro_rows = 3;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows getAvroRows() {
+ if (rowsCase_ == 3) {
+ return (com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows) rows_;
+ }
+ return com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows.getDefaultInstance();
+ }
+ /**
+ * + * Serialized row data in AVRO format. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.AvroRows avro_rows = 3;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRowsOrBuilder getAvroRowsOrBuilder() {
+ if (rowsCase_ == 3) {
+ return (com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows) rows_;
+ }
+ return com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows.getDefaultInstance();
+ }
+
+ public static final int STATUS_FIELD_NUMBER = 2;
+ private com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus status_;
+ /**
+ * + * Estimated stream statistics. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.StreamStatus status = 2;
+ */
+ public boolean hasStatus() {
+ return status_ != null;
+ }
+ /**
+ * + * Estimated stream statistics. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.StreamStatus status = 2;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus getStatus() {
+ return status_ == null ? com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus.getDefaultInstance() : status_;
+ }
+ /**
+ * + * Estimated stream statistics. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.StreamStatus status = 2;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatusOrBuilder getStatusOrBuilder() {
+ return getStatus();
+ }
+
+ public static final int THROTTLE_STATUS_FIELD_NUMBER = 5;
+ private com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus throttleStatus_;
+ /**
+ * + * Throttling status. If unset, the latest response still describes + * the current throttling status. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.ThrottleStatus throttle_status = 5;
+ */
+ public boolean hasThrottleStatus() {
+ return throttleStatus_ != null;
+ }
+ /**
+ * + * Throttling status. If unset, the latest response still describes + * the current throttling status. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.ThrottleStatus throttle_status = 5;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus getThrottleStatus() {
+ return throttleStatus_ == null ? com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus.getDefaultInstance() : throttleStatus_;
+ }
+ /**
+ * + * Throttling status. If unset, the latest response still describes + * the current throttling status. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.ThrottleStatus throttle_status = 5;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatusOrBuilder getThrottleStatusOrBuilder() {
+ return getThrottleStatus();
+ }
+
+ 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 (status_ != null) {
+ output.writeMessage(2, getStatus());
+ }
+ if (rowsCase_ == 3) {
+ output.writeMessage(3, (com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows) rows_);
+ }
+ if (throttleStatus_ != null) {
+ output.writeMessage(5, getThrottleStatus());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (status_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(2, getStatus());
+ }
+ if (rowsCase_ == 3) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(3, (com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows) rows_);
+ }
+ if (throttleStatus_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(5, getThrottleStatus());
+ }
+ 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.v1beta1.Storage.ReadRowsResponse)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsResponse other = (com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsResponse) obj;
+
+ boolean result = true;
+ result = result && (hasStatus() == other.hasStatus());
+ if (hasStatus()) {
+ result = result && getStatus()
+ .equals(other.getStatus());
+ }
+ result = result && (hasThrottleStatus() == other.hasThrottleStatus());
+ if (hasThrottleStatus()) {
+ result = result && getThrottleStatus()
+ .equals(other.getThrottleStatus());
+ }
+ result = result && getRowsCase().equals(
+ other.getRowsCase());
+ if (!result) return false;
+ switch (rowsCase_) {
+ case 3:
+ result = result && getAvroRows()
+ .equals(other.getAvroRows());
+ break;
+ case 0:
+ default:
+ }
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasStatus()) {
+ hash = (37 * hash) + STATUS_FIELD_NUMBER;
+ hash = (53 * hash) + getStatus().hashCode();
+ }
+ if (hasThrottleStatus()) {
+ hash = (37 * hash) + THROTTLE_STATUS_FIELD_NUMBER;
+ hash = (53 * hash) + getThrottleStatus().hashCode();
+ }
+ switch (rowsCase_) {
+ case 3:
+ hash = (37 * hash) + AVRO_ROWS_FIELD_NUMBER;
+ hash = (53 * hash) + getAvroRows().hashCode();
+ break;
+ case 0:
+ default:
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsResponse parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.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.v1beta1.Storage.ReadRowsResponse parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.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.v1beta1.Storage.ReadRowsResponse parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.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.v1beta1.Storage.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.v1beta1.Storage.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.v1beta1.Storage.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.v1beta1.Storage.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.v1beta1.Storage.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.v1beta1.Storage.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.v1beta1.Storage.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;
+ }
+ /**
+ * Protobuf type {@code google.cloud.bigquery.storage.v1beta1.ReadRowsResponse}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder+ * Serialized row data in AVRO format. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.AvroRows avro_rows = 3;
+ */
+ public boolean hasAvroRows() {
+ return rowsCase_ == 3;
+ }
+ /**
+ * + * Serialized row data in AVRO format. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.AvroRows avro_rows = 3;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows getAvroRows() {
+ if (avroRowsBuilder_ == null) {
+ if (rowsCase_ == 3) {
+ return (com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows) rows_;
+ }
+ return com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows.getDefaultInstance();
+ } else {
+ if (rowsCase_ == 3) {
+ return avroRowsBuilder_.getMessage();
+ }
+ return com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows.getDefaultInstance();
+ }
+ }
+ /**
+ * + * Serialized row data in AVRO format. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.AvroRows avro_rows = 3;
+ */
+ public Builder setAvroRows(com.google.cloud.bigquery.storage.v1beta1.AvroProto.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.v1beta1.AvroRows avro_rows = 3;
+ */
+ public Builder setAvroRows(
+ com.google.cloud.bigquery.storage.v1beta1.AvroProto.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.v1beta1.AvroRows avro_rows = 3;
+ */
+ public Builder mergeAvroRows(com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows value) {
+ if (avroRowsBuilder_ == null) {
+ if (rowsCase_ == 3 &&
+ rows_ != com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows.getDefaultInstance()) {
+ rows_ = com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows.newBuilder((com.google.cloud.bigquery.storage.v1beta1.AvroProto.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.v1beta1.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.v1beta1.AvroRows avro_rows = 3;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows.Builder getAvroRowsBuilder() {
+ return getAvroRowsFieldBuilder().getBuilder();
+ }
+ /**
+ * + * Serialized row data in AVRO format. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.AvroRows avro_rows = 3;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRowsOrBuilder getAvroRowsOrBuilder() {
+ if ((rowsCase_ == 3) && (avroRowsBuilder_ != null)) {
+ return avroRowsBuilder_.getMessageOrBuilder();
+ } else {
+ if (rowsCase_ == 3) {
+ return (com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows) rows_;
+ }
+ return com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows.getDefaultInstance();
+ }
+ }
+ /**
+ * + * Serialized row data in AVRO format. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.AvroRows avro_rows = 3;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows, com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows.Builder, com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRowsOrBuilder>
+ getAvroRowsFieldBuilder() {
+ if (avroRowsBuilder_ == null) {
+ if (!(rowsCase_ == 3)) {
+ rows_ = com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows.getDefaultInstance();
+ }
+ avroRowsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows, com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows.Builder, com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRowsOrBuilder>(
+ (com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows) rows_,
+ getParentForChildren(),
+ isClean());
+ rows_ = null;
+ }
+ rowsCase_ = 3;
+ onChanged();;
+ return avroRowsBuilder_;
+ }
+
+ private com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus status_ = null;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus, com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus.Builder, com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatusOrBuilder> statusBuilder_;
+ /**
+ * + * Estimated stream statistics. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.StreamStatus status = 2;
+ */
+ public boolean hasStatus() {
+ return statusBuilder_ != null || status_ != null;
+ }
+ /**
+ * + * Estimated stream statistics. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.StreamStatus status = 2;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus getStatus() {
+ if (statusBuilder_ == null) {
+ return status_ == null ? com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus.getDefaultInstance() : status_;
+ } else {
+ return statusBuilder_.getMessage();
+ }
+ }
+ /**
+ * + * Estimated stream statistics. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.StreamStatus status = 2;
+ */
+ public Builder setStatus(com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus value) {
+ if (statusBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ status_ = value;
+ onChanged();
+ } else {
+ statusBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ * + * Estimated stream statistics. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.StreamStatus status = 2;
+ */
+ public Builder setStatus(
+ com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus.Builder builderForValue) {
+ if (statusBuilder_ == null) {
+ status_ = builderForValue.build();
+ onChanged();
+ } else {
+ statusBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ * + * Estimated stream statistics. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.StreamStatus status = 2;
+ */
+ public Builder mergeStatus(com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus value) {
+ if (statusBuilder_ == null) {
+ if (status_ != null) {
+ status_ =
+ com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus.newBuilder(status_).mergeFrom(value).buildPartial();
+ } else {
+ status_ = value;
+ }
+ onChanged();
+ } else {
+ statusBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ * + * Estimated stream statistics. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.StreamStatus status = 2;
+ */
+ public Builder clearStatus() {
+ if (statusBuilder_ == null) {
+ status_ = null;
+ onChanged();
+ } else {
+ status_ = null;
+ statusBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ * + * Estimated stream statistics. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.StreamStatus status = 2;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus.Builder getStatusBuilder() {
+
+ onChanged();
+ return getStatusFieldBuilder().getBuilder();
+ }
+ /**
+ * + * Estimated stream statistics. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.StreamStatus status = 2;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatusOrBuilder getStatusOrBuilder() {
+ if (statusBuilder_ != null) {
+ return statusBuilder_.getMessageOrBuilder();
+ } else {
+ return status_ == null ?
+ com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus.getDefaultInstance() : status_;
+ }
+ }
+ /**
+ * + * Estimated stream statistics. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.StreamStatus status = 2;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus, com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus.Builder, com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatusOrBuilder>
+ getStatusFieldBuilder() {
+ if (statusBuilder_ == null) {
+ statusBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus, com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus.Builder, com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatusOrBuilder>(
+ getStatus(),
+ getParentForChildren(),
+ isClean());
+ status_ = null;
+ }
+ return statusBuilder_;
+ }
+
+ private com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus throttleStatus_ = null;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus, com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus.Builder, com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatusOrBuilder> throttleStatusBuilder_;
+ /**
+ * + * Throttling status. If unset, the latest response still describes + * the current throttling status. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.ThrottleStatus throttle_status = 5;
+ */
+ public boolean hasThrottleStatus() {
+ return throttleStatusBuilder_ != null || throttleStatus_ != null;
+ }
+ /**
+ * + * Throttling status. If unset, the latest response still describes + * the current throttling status. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.ThrottleStatus throttle_status = 5;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus getThrottleStatus() {
+ if (throttleStatusBuilder_ == null) {
+ return throttleStatus_ == null ? com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus.getDefaultInstance() : throttleStatus_;
+ } else {
+ return throttleStatusBuilder_.getMessage();
+ }
+ }
+ /**
+ * + * Throttling status. If unset, the latest response still describes + * the current throttling status. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.ThrottleStatus throttle_status = 5;
+ */
+ public Builder setThrottleStatus(com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus value) {
+ if (throttleStatusBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ throttleStatus_ = value;
+ onChanged();
+ } else {
+ throttleStatusBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ * + * Throttling status. If unset, the latest response still describes + * the current throttling status. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.ThrottleStatus throttle_status = 5;
+ */
+ public Builder setThrottleStatus(
+ com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus.Builder builderForValue) {
+ if (throttleStatusBuilder_ == null) {
+ throttleStatus_ = builderForValue.build();
+ onChanged();
+ } else {
+ throttleStatusBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ * + * Throttling status. If unset, the latest response still describes + * the current throttling status. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.ThrottleStatus throttle_status = 5;
+ */
+ public Builder mergeThrottleStatus(com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus value) {
+ if (throttleStatusBuilder_ == null) {
+ if (throttleStatus_ != null) {
+ throttleStatus_ =
+ com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus.newBuilder(throttleStatus_).mergeFrom(value).buildPartial();
+ } else {
+ throttleStatus_ = value;
+ }
+ onChanged();
+ } else {
+ throttleStatusBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ * + * Throttling status. If unset, the latest response still describes + * the current throttling status. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.ThrottleStatus throttle_status = 5;
+ */
+ public Builder clearThrottleStatus() {
+ if (throttleStatusBuilder_ == null) {
+ throttleStatus_ = null;
+ onChanged();
+ } else {
+ throttleStatus_ = null;
+ throttleStatusBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ * + * Throttling status. If unset, the latest response still describes + * the current throttling status. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.ThrottleStatus throttle_status = 5;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus.Builder getThrottleStatusBuilder() {
+
+ onChanged();
+ return getThrottleStatusFieldBuilder().getBuilder();
+ }
+ /**
+ * + * Throttling status. If unset, the latest response still describes + * the current throttling status. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.ThrottleStatus throttle_status = 5;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatusOrBuilder getThrottleStatusOrBuilder() {
+ if (throttleStatusBuilder_ != null) {
+ return throttleStatusBuilder_.getMessageOrBuilder();
+ } else {
+ return throttleStatus_ == null ?
+ com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus.getDefaultInstance() : throttleStatus_;
+ }
+ }
+ /**
+ * + * Throttling status. If unset, the latest response still describes + * the current throttling status. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.ThrottleStatus throttle_status = 5;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus, com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus.Builder, com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatusOrBuilder>
+ getThrottleStatusFieldBuilder() {
+ if (throttleStatusBuilder_ == null) {
+ throttleStatusBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus, com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus.Builder, com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatusOrBuilder>(
+ getThrottleStatus(),
+ getParentForChildren(),
+ isClean());
+ throttleStatus_ = null;
+ }
+ return throttleStatusBuilder_;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(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.v1beta1.ReadRowsResponse)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.bigquery.storage.v1beta1.ReadRowsResponse)
+ private static final com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsResponse DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsResponse();
+ }
+
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsResponse getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Required. Must be a non-expired session obtained from a call to + * CreateReadSession. Only the name field needs to be set. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.ReadSession session = 1;
+ */
+ boolean hasSession();
+ /**
+ * + * Required. Must be a non-expired session obtained from a call to + * CreateReadSession. Only the name field needs to be set. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.ReadSession session = 1;
+ */
+ com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession getSession();
+ /**
+ * + * Required. Must be a non-expired session obtained from a call to + * CreateReadSession. Only the name field needs to be set. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.ReadSession session = 1;
+ */
+ com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSessionOrBuilder getSessionOrBuilder();
+
+ /**
+ * + * Required. Number of new streams requested. Must be positive. + * Number of added streams may be less than this, see CreateReadSessionRequest + * for more information. + *+ * + *
int32 requested_streams = 2;
+ */
+ int getRequestedStreams();
+ }
+ /**
+ * Protobuf type {@code google.cloud.bigquery.storage.v1beta1.BatchCreateReadSessionStreamsRequest}
+ */
+ public static final class BatchCreateReadSessionStreamsRequest extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:google.cloud.bigquery.storage.v1beta1.BatchCreateReadSessionStreamsRequest)
+ BatchCreateReadSessionStreamsRequestOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use BatchCreateReadSessionStreamsRequest.newBuilder() to construct.
+ private BatchCreateReadSessionStreamsRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private BatchCreateReadSessionStreamsRequest() {
+ requestedStreams_ = 0;
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private BatchCreateReadSessionStreamsRequest(
+ 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: {
+ com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession.Builder subBuilder = null;
+ if (session_ != null) {
+ subBuilder = session_.toBuilder();
+ }
+ session_ = input.readMessage(com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(session_);
+ session_ = subBuilder.buildPartial();
+ }
+
+ break;
+ }
+ case 16: {
+
+ requestedStreams_ = input.readInt32();
+ break;
+ }
+ default: {
+ if (!parseUnknownFieldProto3(
+ 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.v1beta1.Storage.internal_static_google_cloud_bigquery_storage_v1beta1_BatchCreateReadSessionStreamsRequest_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.bigquery.storage.v1beta1.Storage.internal_static_google_cloud_bigquery_storage_v1beta1_BatchCreateReadSessionStreamsRequest_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsRequest.class, com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsRequest.Builder.class);
+ }
+
+ public static final int SESSION_FIELD_NUMBER = 1;
+ private com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession session_;
+ /**
+ * + * Required. Must be a non-expired session obtained from a call to + * CreateReadSession. Only the name field needs to be set. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.ReadSession session = 1;
+ */
+ public boolean hasSession() {
+ return session_ != null;
+ }
+ /**
+ * + * Required. Must be a non-expired session obtained from a call to + * CreateReadSession. Only the name field needs to be set. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.ReadSession session = 1;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession getSession() {
+ return session_ == null ? com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession.getDefaultInstance() : session_;
+ }
+ /**
+ * + * Required. Must be a non-expired session obtained from a call to + * CreateReadSession. Only the name field needs to be set. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.ReadSession session = 1;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSessionOrBuilder getSessionOrBuilder() {
+ return getSession();
+ }
+
+ public static final int REQUESTED_STREAMS_FIELD_NUMBER = 2;
+ private int requestedStreams_;
+ /**
+ * + * Required. Number of new streams requested. Must be positive. + * Number of added streams may be less than this, see CreateReadSessionRequest + * for more information. + *+ * + *
int32 requested_streams = 2;
+ */
+ public int getRequestedStreams() {
+ return requestedStreams_;
+ }
+
+ 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 (session_ != null) {
+ output.writeMessage(1, getSession());
+ }
+ if (requestedStreams_ != 0) {
+ output.writeInt32(2, requestedStreams_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (session_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(1, getSession());
+ }
+ if (requestedStreams_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(2, requestedStreams_);
+ }
+ 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.v1beta1.Storage.BatchCreateReadSessionStreamsRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsRequest other = (com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsRequest) obj;
+
+ boolean result = true;
+ result = result && (hasSession() == other.hasSession());
+ if (hasSession()) {
+ result = result && getSession()
+ .equals(other.getSession());
+ }
+ result = result && (getRequestedStreams()
+ == other.getRequestedStreams());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasSession()) {
+ hash = (37 * hash) + SESSION_FIELD_NUMBER;
+ hash = (53 * hash) + getSession().hashCode();
+ }
+ hash = (37 * hash) + REQUESTED_STREAMS_FIELD_NUMBER;
+ hash = (53 * hash) + getRequestedStreams();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsRequest parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsRequest 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.v1beta1.Storage.BatchCreateReadSessionStreamsRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsRequest 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.v1beta1.Storage.BatchCreateReadSessionStreamsRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsRequest 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.v1beta1.Storage.BatchCreateReadSessionStreamsRequest parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsRequest 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.v1beta1.Storage.BatchCreateReadSessionStreamsRequest parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsRequest 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.v1beta1.Storage.BatchCreateReadSessionStreamsRequest 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.v1beta1.Storage.BatchCreateReadSessionStreamsRequest 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.v1beta1.Storage.BatchCreateReadSessionStreamsRequest 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.v1beta1.BatchCreateReadSessionStreamsRequest}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder+ * Required. Must be a non-expired session obtained from a call to + * CreateReadSession. Only the name field needs to be set. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.ReadSession session = 1;
+ */
+ public boolean hasSession() {
+ return sessionBuilder_ != null || session_ != null;
+ }
+ /**
+ * + * Required. Must be a non-expired session obtained from a call to + * CreateReadSession. Only the name field needs to be set. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.ReadSession session = 1;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession getSession() {
+ if (sessionBuilder_ == null) {
+ return session_ == null ? com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession.getDefaultInstance() : session_;
+ } else {
+ return sessionBuilder_.getMessage();
+ }
+ }
+ /**
+ * + * Required. Must be a non-expired session obtained from a call to + * CreateReadSession. Only the name field needs to be set. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.ReadSession session = 1;
+ */
+ public Builder setSession(com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession value) {
+ if (sessionBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ session_ = value;
+ onChanged();
+ } else {
+ sessionBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ * + * Required. Must be a non-expired session obtained from a call to + * CreateReadSession. Only the name field needs to be set. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.ReadSession session = 1;
+ */
+ public Builder setSession(
+ com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession.Builder builderForValue) {
+ if (sessionBuilder_ == null) {
+ session_ = builderForValue.build();
+ onChanged();
+ } else {
+ sessionBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ * + * Required. Must be a non-expired session obtained from a call to + * CreateReadSession. Only the name field needs to be set. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.ReadSession session = 1;
+ */
+ public Builder mergeSession(com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession value) {
+ if (sessionBuilder_ == null) {
+ if (session_ != null) {
+ session_ =
+ com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession.newBuilder(session_).mergeFrom(value).buildPartial();
+ } else {
+ session_ = value;
+ }
+ onChanged();
+ } else {
+ sessionBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ * + * Required. Must be a non-expired session obtained from a call to + * CreateReadSession. Only the name field needs to be set. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.ReadSession session = 1;
+ */
+ public Builder clearSession() {
+ if (sessionBuilder_ == null) {
+ session_ = null;
+ onChanged();
+ } else {
+ session_ = null;
+ sessionBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ * + * Required. Must be a non-expired session obtained from a call to + * CreateReadSession. Only the name field needs to be set. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.ReadSession session = 1;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession.Builder getSessionBuilder() {
+
+ onChanged();
+ return getSessionFieldBuilder().getBuilder();
+ }
+ /**
+ * + * Required. Must be a non-expired session obtained from a call to + * CreateReadSession. Only the name field needs to be set. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.ReadSession session = 1;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSessionOrBuilder getSessionOrBuilder() {
+ if (sessionBuilder_ != null) {
+ return sessionBuilder_.getMessageOrBuilder();
+ } else {
+ return session_ == null ?
+ com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession.getDefaultInstance() : session_;
+ }
+ }
+ /**
+ * + * Required. Must be a non-expired session obtained from a call to + * CreateReadSession. Only the name field needs to be set. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.ReadSession session = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession, com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession.Builder, com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSessionOrBuilder>
+ getSessionFieldBuilder() {
+ if (sessionBuilder_ == null) {
+ sessionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession, com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession.Builder, com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSessionOrBuilder>(
+ getSession(),
+ getParentForChildren(),
+ isClean());
+ session_ = null;
+ }
+ return sessionBuilder_;
+ }
+
+ private int requestedStreams_ ;
+ /**
+ * + * Required. Number of new streams requested. Must be positive. + * Number of added streams may be less than this, see CreateReadSessionRequest + * for more information. + *+ * + *
int32 requested_streams = 2;
+ */
+ public int getRequestedStreams() {
+ return requestedStreams_;
+ }
+ /**
+ * + * Required. Number of new streams requested. Must be positive. + * Number of added streams may be less than this, see CreateReadSessionRequest + * for more information. + *+ * + *
int32 requested_streams = 2;
+ */
+ public Builder setRequestedStreams(int value) {
+
+ requestedStreams_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * + * Required. Number of new streams requested. Must be positive. + * Number of added streams may be less than this, see CreateReadSessionRequest + * for more information. + *+ * + *
int32 requested_streams = 2;
+ */
+ public Builder clearRequestedStreams() {
+
+ requestedStreams_ = 0;
+ onChanged();
+ return this;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(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.v1beta1.BatchCreateReadSessionStreamsRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.bigquery.storage.v1beta1.BatchCreateReadSessionStreamsRequest)
+ private static final com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsRequest DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsRequest();
+ }
+
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Newly added streams. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 1;
+ */
+ java.util.List+ * Newly added streams. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 1;
+ */
+ com.google.cloud.bigquery.storage.v1beta1.Storage.Stream getStreams(int index);
+ /**
+ * + * Newly added streams. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 1;
+ */
+ int getStreamsCount();
+ /**
+ * + * Newly added streams. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 1;
+ */
+ java.util.List extends com.google.cloud.bigquery.storage.v1beta1.Storage.StreamOrBuilder>
+ getStreamsOrBuilderList();
+ /**
+ * + * Newly added streams. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 1;
+ */
+ com.google.cloud.bigquery.storage.v1beta1.Storage.StreamOrBuilder getStreamsOrBuilder(
+ int index);
+ }
+ /**
+ * Protobuf type {@code google.cloud.bigquery.storage.v1beta1.BatchCreateReadSessionStreamsResponse}
+ */
+ public static final class BatchCreateReadSessionStreamsResponse extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:google.cloud.bigquery.storage.v1beta1.BatchCreateReadSessionStreamsResponse)
+ BatchCreateReadSessionStreamsResponseOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use BatchCreateReadSessionStreamsResponse.newBuilder() to construct.
+ private BatchCreateReadSessionStreamsResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private BatchCreateReadSessionStreamsResponse() {
+ streams_ = java.util.Collections.emptyList();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private BatchCreateReadSessionStreamsResponse(
+ 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: {
+ if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
+ streams_ = new java.util.ArrayList+ * Newly added streams. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 1;
+ */
+ public java.util.List+ * Newly added streams. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 1;
+ */
+ public java.util.List extends com.google.cloud.bigquery.storage.v1beta1.Storage.StreamOrBuilder>
+ getStreamsOrBuilderList() {
+ return streams_;
+ }
+ /**
+ * + * Newly added streams. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 1;
+ */
+ public int getStreamsCount() {
+ return streams_.size();
+ }
+ /**
+ * + * Newly added streams. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 1;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.Stream getStreams(int index) {
+ return streams_.get(index);
+ }
+ /**
+ * + * Newly added streams. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 1;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.StreamOrBuilder 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 {
+ for (int i = 0; i < streams_.size(); i++) {
+ output.writeMessage(1, streams_.get(i));
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ for (int i = 0; i < streams_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(1, 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.v1beta1.Storage.BatchCreateReadSessionStreamsResponse)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsResponse other = (com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsResponse) obj;
+
+ boolean result = true;
+ result = result && getStreamsList()
+ .equals(other.getStreamsList());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (getStreamsCount() > 0) {
+ hash = (37 * hash) + STREAMS_FIELD_NUMBER;
+ hash = (53 * hash) + getStreamsList().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsResponse parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsResponse 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.v1beta1.Storage.BatchCreateReadSessionStreamsResponse parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsResponse 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.v1beta1.Storage.BatchCreateReadSessionStreamsResponse parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsResponse 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.v1beta1.Storage.BatchCreateReadSessionStreamsResponse parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsResponse 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.v1beta1.Storage.BatchCreateReadSessionStreamsResponse parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsResponse 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.v1beta1.Storage.BatchCreateReadSessionStreamsResponse 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.v1beta1.Storage.BatchCreateReadSessionStreamsResponse 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.v1beta1.Storage.BatchCreateReadSessionStreamsResponse 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.v1beta1.BatchCreateReadSessionStreamsResponse}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder+ * Newly added streams. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 1;
+ */
+ public java.util.List+ * Newly added streams. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 1;
+ */
+ public int getStreamsCount() {
+ if (streamsBuilder_ == null) {
+ return streams_.size();
+ } else {
+ return streamsBuilder_.getCount();
+ }
+ }
+ /**
+ * + * Newly added streams. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 1;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.Stream getStreams(int index) {
+ if (streamsBuilder_ == null) {
+ return streams_.get(index);
+ } else {
+ return streamsBuilder_.getMessage(index);
+ }
+ }
+ /**
+ * + * Newly added streams. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 1;
+ */
+ public Builder setStreams(
+ int index, com.google.cloud.bigquery.storage.v1beta1.Storage.Stream value) {
+ if (streamsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureStreamsIsMutable();
+ streams_.set(index, value);
+ onChanged();
+ } else {
+ streamsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * + * Newly added streams. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 1;
+ */
+ public Builder setStreams(
+ int index, com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.Builder builderForValue) {
+ if (streamsBuilder_ == null) {
+ ensureStreamsIsMutable();
+ streams_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ streamsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * + * Newly added streams. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 1;
+ */
+ public Builder addStreams(com.google.cloud.bigquery.storage.v1beta1.Storage.Stream value) {
+ if (streamsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureStreamsIsMutable();
+ streams_.add(value);
+ onChanged();
+ } else {
+ streamsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ * + * Newly added streams. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 1;
+ */
+ public Builder addStreams(
+ int index, com.google.cloud.bigquery.storage.v1beta1.Storage.Stream value) {
+ if (streamsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureStreamsIsMutable();
+ streams_.add(index, value);
+ onChanged();
+ } else {
+ streamsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * + * Newly added streams. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 1;
+ */
+ public Builder addStreams(
+ com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.Builder builderForValue) {
+ if (streamsBuilder_ == null) {
+ ensureStreamsIsMutable();
+ streams_.add(builderForValue.build());
+ onChanged();
+ } else {
+ streamsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * + * Newly added streams. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 1;
+ */
+ public Builder addStreams(
+ int index, com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.Builder builderForValue) {
+ if (streamsBuilder_ == null) {
+ ensureStreamsIsMutable();
+ streams_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ streamsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * + * Newly added streams. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 1;
+ */
+ public Builder addAllStreams(
+ java.lang.Iterable extends com.google.cloud.bigquery.storage.v1beta1.Storage.Stream> values) {
+ if (streamsBuilder_ == null) {
+ ensureStreamsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, streams_);
+ onChanged();
+ } else {
+ streamsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ * + * Newly added streams. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 1;
+ */
+ public Builder clearStreams() {
+ if (streamsBuilder_ == null) {
+ streams_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ streamsBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ * + * Newly added streams. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 1;
+ */
+ public Builder removeStreams(int index) {
+ if (streamsBuilder_ == null) {
+ ensureStreamsIsMutable();
+ streams_.remove(index);
+ onChanged();
+ } else {
+ streamsBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ * + * Newly added streams. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 1;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.Builder getStreamsBuilder(
+ int index) {
+ return getStreamsFieldBuilder().getBuilder(index);
+ }
+ /**
+ * + * Newly added streams. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 1;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.StreamOrBuilder getStreamsOrBuilder(
+ int index) {
+ if (streamsBuilder_ == null) {
+ return streams_.get(index); } else {
+ return streamsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ * + * Newly added streams. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 1;
+ */
+ public java.util.List extends com.google.cloud.bigquery.storage.v1beta1.Storage.StreamOrBuilder>
+ getStreamsOrBuilderList() {
+ if (streamsBuilder_ != null) {
+ return streamsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(streams_);
+ }
+ }
+ /**
+ * + * Newly added streams. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 1;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.Builder addStreamsBuilder() {
+ return getStreamsFieldBuilder().addBuilder(
+ com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.getDefaultInstance());
+ }
+ /**
+ * + * Newly added streams. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 1;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.Builder addStreamsBuilder(
+ int index) {
+ return getStreamsFieldBuilder().addBuilder(
+ index, com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.getDefaultInstance());
+ }
+ /**
+ * + * Newly added streams. + *+ * + *
repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 1;
+ */
+ public java.util.List+ * Stream to finalize. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream stream = 2;
+ */
+ boolean hasStream();
+ /**
+ * + * Stream to finalize. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream stream = 2;
+ */
+ com.google.cloud.bigquery.storage.v1beta1.Storage.Stream getStream();
+ /**
+ * + * Stream to finalize. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream stream = 2;
+ */
+ com.google.cloud.bigquery.storage.v1beta1.Storage.StreamOrBuilder getStreamOrBuilder();
+ }
+ /**
+ * Protobuf type {@code google.cloud.bigquery.storage.v1beta1.FinalizeStreamRequest}
+ */
+ public static final class FinalizeStreamRequest extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:google.cloud.bigquery.storage.v1beta1.FinalizeStreamRequest)
+ FinalizeStreamRequestOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use FinalizeStreamRequest.newBuilder() to construct.
+ private FinalizeStreamRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private FinalizeStreamRequest() {
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private FinalizeStreamRequest(
+ 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 18: {
+ com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.Builder subBuilder = null;
+ if (stream_ != null) {
+ subBuilder = stream_.toBuilder();
+ }
+ stream_ = input.readMessage(com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(stream_);
+ stream_ = subBuilder.buildPartial();
+ }
+
+ break;
+ }
+ default: {
+ if (!parseUnknownFieldProto3(
+ 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.v1beta1.Storage.internal_static_google_cloud_bigquery_storage_v1beta1_FinalizeStreamRequest_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.bigquery.storage.v1beta1.Storage.internal_static_google_cloud_bigquery_storage_v1beta1_FinalizeStreamRequest_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.bigquery.storage.v1beta1.Storage.FinalizeStreamRequest.class, com.google.cloud.bigquery.storage.v1beta1.Storage.FinalizeStreamRequest.Builder.class);
+ }
+
+ public static final int STREAM_FIELD_NUMBER = 2;
+ private com.google.cloud.bigquery.storage.v1beta1.Storage.Stream stream_;
+ /**
+ * + * Stream to finalize. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream stream = 2;
+ */
+ public boolean hasStream() {
+ return stream_ != null;
+ }
+ /**
+ * + * Stream to finalize. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream stream = 2;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.Stream getStream() {
+ return stream_ == null ? com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.getDefaultInstance() : stream_;
+ }
+ /**
+ * + * Stream to finalize. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream stream = 2;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.StreamOrBuilder getStreamOrBuilder() {
+ return getStream();
+ }
+
+ 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 (stream_ != null) {
+ output.writeMessage(2, getStream());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (stream_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(2, getStream());
+ }
+ 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.v1beta1.Storage.FinalizeStreamRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.bigquery.storage.v1beta1.Storage.FinalizeStreamRequest other = (com.google.cloud.bigquery.storage.v1beta1.Storage.FinalizeStreamRequest) obj;
+
+ boolean result = true;
+ result = result && (hasStream() == other.hasStream());
+ if (hasStream()) {
+ result = result && getStream()
+ .equals(other.getStream());
+ }
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasStream()) {
+ hash = (37 * hash) + STREAM_FIELD_NUMBER;
+ hash = (53 * hash) + getStream().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.FinalizeStreamRequest parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.FinalizeStreamRequest 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.v1beta1.Storage.FinalizeStreamRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.FinalizeStreamRequest 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.v1beta1.Storage.FinalizeStreamRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.FinalizeStreamRequest 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.v1beta1.Storage.FinalizeStreamRequest parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.FinalizeStreamRequest 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.v1beta1.Storage.FinalizeStreamRequest parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.FinalizeStreamRequest 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.v1beta1.Storage.FinalizeStreamRequest 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.v1beta1.Storage.FinalizeStreamRequest 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.v1beta1.Storage.FinalizeStreamRequest 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.v1beta1.FinalizeStreamRequest}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder+ * Stream to finalize. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream stream = 2;
+ */
+ public boolean hasStream() {
+ return streamBuilder_ != null || stream_ != null;
+ }
+ /**
+ * + * Stream to finalize. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream stream = 2;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.Stream getStream() {
+ if (streamBuilder_ == null) {
+ return stream_ == null ? com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.getDefaultInstance() : stream_;
+ } else {
+ return streamBuilder_.getMessage();
+ }
+ }
+ /**
+ * + * Stream to finalize. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream stream = 2;
+ */
+ public Builder setStream(com.google.cloud.bigquery.storage.v1beta1.Storage.Stream value) {
+ if (streamBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ stream_ = value;
+ onChanged();
+ } else {
+ streamBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ * + * Stream to finalize. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream stream = 2;
+ */
+ public Builder setStream(
+ com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.Builder builderForValue) {
+ if (streamBuilder_ == null) {
+ stream_ = builderForValue.build();
+ onChanged();
+ } else {
+ streamBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ * + * Stream to finalize. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream stream = 2;
+ */
+ public Builder mergeStream(com.google.cloud.bigquery.storage.v1beta1.Storage.Stream value) {
+ if (streamBuilder_ == null) {
+ if (stream_ != null) {
+ stream_ =
+ com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.newBuilder(stream_).mergeFrom(value).buildPartial();
+ } else {
+ stream_ = value;
+ }
+ onChanged();
+ } else {
+ streamBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ * + * Stream to finalize. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream stream = 2;
+ */
+ public Builder clearStream() {
+ if (streamBuilder_ == null) {
+ stream_ = null;
+ onChanged();
+ } else {
+ stream_ = null;
+ streamBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ * + * Stream to finalize. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream stream = 2;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.Builder getStreamBuilder() {
+
+ onChanged();
+ return getStreamFieldBuilder().getBuilder();
+ }
+ /**
+ * + * Stream to finalize. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream stream = 2;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.StreamOrBuilder getStreamOrBuilder() {
+ if (streamBuilder_ != null) {
+ return streamBuilder_.getMessageOrBuilder();
+ } else {
+ return stream_ == null ?
+ com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.getDefaultInstance() : stream_;
+ }
+ }
+ /**
+ * + * Stream to finalize. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream stream = 2;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1beta1.Storage.Stream, com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.Builder, com.google.cloud.bigquery.storage.v1beta1.Storage.StreamOrBuilder>
+ getStreamFieldBuilder() {
+ if (streamBuilder_ == null) {
+ streamBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1beta1.Storage.Stream, com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.Builder, com.google.cloud.bigquery.storage.v1beta1.Storage.StreamOrBuilder>(
+ getStream(),
+ getParentForChildren(),
+ isClean());
+ stream_ = null;
+ }
+ return streamBuilder_;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(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.v1beta1.FinalizeStreamRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.bigquery.storage.v1beta1.FinalizeStreamRequest)
+ private static final com.google.cloud.bigquery.storage.v1beta1.Storage.FinalizeStreamRequest DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.bigquery.storage.v1beta1.Storage.FinalizeStreamRequest();
+ }
+
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.FinalizeStreamRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Stream to split. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream original_stream = 1;
+ */
+ boolean hasOriginalStream();
+ /**
+ * + * Stream to split. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream original_stream = 1;
+ */
+ com.google.cloud.bigquery.storage.v1beta1.Storage.Stream getOriginalStream();
+ /**
+ * + * Stream to split. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream original_stream = 1;
+ */
+ com.google.cloud.bigquery.storage.v1beta1.Storage.StreamOrBuilder getOriginalStreamOrBuilder();
+ }
+ /**
+ * Protobuf type {@code google.cloud.bigquery.storage.v1beta1.SplitReadStreamRequest}
+ */
+ public static final class SplitReadStreamRequest extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:google.cloud.bigquery.storage.v1beta1.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() {
+ }
+
+ @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();
+ }
+ 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: {
+ com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.Builder subBuilder = null;
+ if (originalStream_ != null) {
+ subBuilder = originalStream_.toBuilder();
+ }
+ originalStream_ = input.readMessage(com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(originalStream_);
+ originalStream_ = subBuilder.buildPartial();
+ }
+
+ break;
+ }
+ default: {
+ if (!parseUnknownFieldProto3(
+ 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.v1beta1.Storage.internal_static_google_cloud_bigquery_storage_v1beta1_SplitReadStreamRequest_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.bigquery.storage.v1beta1.Storage.internal_static_google_cloud_bigquery_storage_v1beta1_SplitReadStreamRequest_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamRequest.class, com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamRequest.Builder.class);
+ }
+
+ public static final int ORIGINAL_STREAM_FIELD_NUMBER = 1;
+ private com.google.cloud.bigquery.storage.v1beta1.Storage.Stream originalStream_;
+ /**
+ * + * Stream to split. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream original_stream = 1;
+ */
+ public boolean hasOriginalStream() {
+ return originalStream_ != null;
+ }
+ /**
+ * + * Stream to split. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream original_stream = 1;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.Stream getOriginalStream() {
+ return originalStream_ == null ? com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.getDefaultInstance() : originalStream_;
+ }
+ /**
+ * + * Stream to split. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream original_stream = 1;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.StreamOrBuilder getOriginalStreamOrBuilder() {
+ return getOriginalStream();
+ }
+
+ 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 (originalStream_ != null) {
+ output.writeMessage(1, getOriginalStream());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (originalStream_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(1, getOriginalStream());
+ }
+ 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.v1beta1.Storage.SplitReadStreamRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamRequest other = (com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamRequest) obj;
+
+ boolean result = true;
+ result = result && (hasOriginalStream() == other.hasOriginalStream());
+ if (hasOriginalStream()) {
+ result = result && getOriginalStream()
+ .equals(other.getOriginalStream());
+ }
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasOriginalStream()) {
+ hash = (37 * hash) + ORIGINAL_STREAM_FIELD_NUMBER;
+ hash = (53 * hash) + getOriginalStream().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamRequest parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.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.v1beta1.Storage.SplitReadStreamRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.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.v1beta1.Storage.SplitReadStreamRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.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.v1beta1.Storage.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.v1beta1.Storage.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.v1beta1.Storage.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.v1beta1.Storage.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.v1beta1.Storage.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.v1beta1.Storage.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.v1beta1.Storage.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;
+ }
+ /**
+ * Protobuf type {@code google.cloud.bigquery.storage.v1beta1.SplitReadStreamRequest}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder+ * Stream to split. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream original_stream = 1;
+ */
+ public boolean hasOriginalStream() {
+ return originalStreamBuilder_ != null || originalStream_ != null;
+ }
+ /**
+ * + * Stream to split. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream original_stream = 1;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.Stream getOriginalStream() {
+ if (originalStreamBuilder_ == null) {
+ return originalStream_ == null ? com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.getDefaultInstance() : originalStream_;
+ } else {
+ return originalStreamBuilder_.getMessage();
+ }
+ }
+ /**
+ * + * Stream to split. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream original_stream = 1;
+ */
+ public Builder setOriginalStream(com.google.cloud.bigquery.storage.v1beta1.Storage.Stream value) {
+ if (originalStreamBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ originalStream_ = value;
+ onChanged();
+ } else {
+ originalStreamBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ * + * Stream to split. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream original_stream = 1;
+ */
+ public Builder setOriginalStream(
+ com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.Builder builderForValue) {
+ if (originalStreamBuilder_ == null) {
+ originalStream_ = builderForValue.build();
+ onChanged();
+ } else {
+ originalStreamBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ * + * Stream to split. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream original_stream = 1;
+ */
+ public Builder mergeOriginalStream(com.google.cloud.bigquery.storage.v1beta1.Storage.Stream value) {
+ if (originalStreamBuilder_ == null) {
+ if (originalStream_ != null) {
+ originalStream_ =
+ com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.newBuilder(originalStream_).mergeFrom(value).buildPartial();
+ } else {
+ originalStream_ = value;
+ }
+ onChanged();
+ } else {
+ originalStreamBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ * + * Stream to split. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream original_stream = 1;
+ */
+ public Builder clearOriginalStream() {
+ if (originalStreamBuilder_ == null) {
+ originalStream_ = null;
+ onChanged();
+ } else {
+ originalStream_ = null;
+ originalStreamBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ * + * Stream to split. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream original_stream = 1;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.Builder getOriginalStreamBuilder() {
+
+ onChanged();
+ return getOriginalStreamFieldBuilder().getBuilder();
+ }
+ /**
+ * + * Stream to split. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream original_stream = 1;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.StreamOrBuilder getOriginalStreamOrBuilder() {
+ if (originalStreamBuilder_ != null) {
+ return originalStreamBuilder_.getMessageOrBuilder();
+ } else {
+ return originalStream_ == null ?
+ com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.getDefaultInstance() : originalStream_;
+ }
+ }
+ /**
+ * + * Stream to split. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream original_stream = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1beta1.Storage.Stream, com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.Builder, com.google.cloud.bigquery.storage.v1beta1.Storage.StreamOrBuilder>
+ getOriginalStreamFieldBuilder() {
+ if (originalStreamBuilder_ == null) {
+ originalStreamBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1beta1.Storage.Stream, com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.Builder, com.google.cloud.bigquery.storage.v1beta1.Storage.StreamOrBuilder>(
+ getOriginalStream(),
+ getParentForChildren(),
+ isClean());
+ originalStream_ = null;
+ }
+ return originalStreamBuilder_;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(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.v1beta1.SplitReadStreamRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.bigquery.storage.v1beta1.SplitReadStreamRequest)
+ private static final com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamRequest DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamRequest();
+ }
+
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Primary stream. Will contain the beginning portion of + * |original_stream|. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream primary_stream = 1;
+ */
+ boolean hasPrimaryStream();
+ /**
+ * + * Primary stream. Will contain the beginning portion of + * |original_stream|. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream primary_stream = 1;
+ */
+ com.google.cloud.bigquery.storage.v1beta1.Storage.Stream getPrimaryStream();
+ /**
+ * + * Primary stream. Will contain the beginning portion of + * |original_stream|. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream primary_stream = 1;
+ */
+ com.google.cloud.bigquery.storage.v1beta1.Storage.StreamOrBuilder getPrimaryStreamOrBuilder();
+
+ /**
+ * + * Remainder stream. Will contain the tail of |original_stream|. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream remainder_stream = 2;
+ */
+ boolean hasRemainderStream();
+ /**
+ * + * Remainder stream. Will contain the tail of |original_stream|. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream remainder_stream = 2;
+ */
+ com.google.cloud.bigquery.storage.v1beta1.Storage.Stream getRemainderStream();
+ /**
+ * + * Remainder stream. Will contain the tail of |original_stream|. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream remainder_stream = 2;
+ */
+ com.google.cloud.bigquery.storage.v1beta1.Storage.StreamOrBuilder getRemainderStreamOrBuilder();
+ }
+ /**
+ * Protobuf type {@code google.cloud.bigquery.storage.v1beta1.SplitReadStreamResponse}
+ */
+ public static final class SplitReadStreamResponse extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:google.cloud.bigquery.storage.v1beta1.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
+ 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();
+ }
+ 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: {
+ com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.Builder subBuilder = null;
+ if (primaryStream_ != null) {
+ subBuilder = primaryStream_.toBuilder();
+ }
+ primaryStream_ = input.readMessage(com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(primaryStream_);
+ primaryStream_ = subBuilder.buildPartial();
+ }
+
+ break;
+ }
+ case 18: {
+ com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.Builder subBuilder = null;
+ if (remainderStream_ != null) {
+ subBuilder = remainderStream_.toBuilder();
+ }
+ remainderStream_ = input.readMessage(com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(remainderStream_);
+ remainderStream_ = subBuilder.buildPartial();
+ }
+
+ break;
+ }
+ default: {
+ if (!parseUnknownFieldProto3(
+ 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.v1beta1.Storage.internal_static_google_cloud_bigquery_storage_v1beta1_SplitReadStreamResponse_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.bigquery.storage.v1beta1.Storage.internal_static_google_cloud_bigquery_storage_v1beta1_SplitReadStreamResponse_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamResponse.class, com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamResponse.Builder.class);
+ }
+
+ public static final int PRIMARY_STREAM_FIELD_NUMBER = 1;
+ private com.google.cloud.bigquery.storage.v1beta1.Storage.Stream primaryStream_;
+ /**
+ * + * Primary stream. Will contain the beginning portion of + * |original_stream|. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream primary_stream = 1;
+ */
+ public boolean hasPrimaryStream() {
+ return primaryStream_ != null;
+ }
+ /**
+ * + * Primary stream. Will contain the beginning portion of + * |original_stream|. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream primary_stream = 1;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.Stream getPrimaryStream() {
+ return primaryStream_ == null ? com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.getDefaultInstance() : primaryStream_;
+ }
+ /**
+ * + * Primary stream. Will contain the beginning portion of + * |original_stream|. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream primary_stream = 1;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.StreamOrBuilder getPrimaryStreamOrBuilder() {
+ return getPrimaryStream();
+ }
+
+ public static final int REMAINDER_STREAM_FIELD_NUMBER = 2;
+ private com.google.cloud.bigquery.storage.v1beta1.Storage.Stream remainderStream_;
+ /**
+ * + * Remainder stream. Will contain the tail of |original_stream|. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream remainder_stream = 2;
+ */
+ public boolean hasRemainderStream() {
+ return remainderStream_ != null;
+ }
+ /**
+ * + * Remainder stream. Will contain the tail of |original_stream|. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream remainder_stream = 2;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.Stream getRemainderStream() {
+ return remainderStream_ == null ? com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.getDefaultInstance() : remainderStream_;
+ }
+ /**
+ * + * Remainder stream. Will contain the tail of |original_stream|. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream remainder_stream = 2;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.StreamOrBuilder 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.v1beta1.Storage.SplitReadStreamResponse)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamResponse other = (com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamResponse) obj;
+
+ boolean result = true;
+ result = result && (hasPrimaryStream() == other.hasPrimaryStream());
+ if (hasPrimaryStream()) {
+ result = result && getPrimaryStream()
+ .equals(other.getPrimaryStream());
+ }
+ result = result && (hasRemainderStream() == other.hasRemainderStream());
+ if (hasRemainderStream()) {
+ result = result && getRemainderStream()
+ .equals(other.getRemainderStream());
+ }
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @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.v1beta1.Storage.SplitReadStreamResponse parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.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.v1beta1.Storage.SplitReadStreamResponse parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.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.v1beta1.Storage.SplitReadStreamResponse parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.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.v1beta1.Storage.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.v1beta1.Storage.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.v1beta1.Storage.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.v1beta1.Storage.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.v1beta1.Storage.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.v1beta1.Storage.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.v1beta1.Storage.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;
+ }
+ /**
+ * Protobuf type {@code google.cloud.bigquery.storage.v1beta1.SplitReadStreamResponse}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder+ * Primary stream. Will contain the beginning portion of + * |original_stream|. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream primary_stream = 1;
+ */
+ public boolean hasPrimaryStream() {
+ return primaryStreamBuilder_ != null || primaryStream_ != null;
+ }
+ /**
+ * + * Primary stream. Will contain the beginning portion of + * |original_stream|. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream primary_stream = 1;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.Stream getPrimaryStream() {
+ if (primaryStreamBuilder_ == null) {
+ return primaryStream_ == null ? com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.getDefaultInstance() : primaryStream_;
+ } else {
+ return primaryStreamBuilder_.getMessage();
+ }
+ }
+ /**
+ * + * Primary stream. Will contain the beginning portion of + * |original_stream|. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream primary_stream = 1;
+ */
+ public Builder setPrimaryStream(com.google.cloud.bigquery.storage.v1beta1.Storage.Stream value) {
+ if (primaryStreamBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ primaryStream_ = value;
+ onChanged();
+ } else {
+ primaryStreamBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ * + * Primary stream. Will contain the beginning portion of + * |original_stream|. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream primary_stream = 1;
+ */
+ public Builder setPrimaryStream(
+ com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.Builder builderForValue) {
+ if (primaryStreamBuilder_ == null) {
+ primaryStream_ = builderForValue.build();
+ onChanged();
+ } else {
+ primaryStreamBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ * + * Primary stream. Will contain the beginning portion of + * |original_stream|. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream primary_stream = 1;
+ */
+ public Builder mergePrimaryStream(com.google.cloud.bigquery.storage.v1beta1.Storage.Stream value) {
+ if (primaryStreamBuilder_ == null) {
+ if (primaryStream_ != null) {
+ primaryStream_ =
+ com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.newBuilder(primaryStream_).mergeFrom(value).buildPartial();
+ } else {
+ primaryStream_ = value;
+ }
+ onChanged();
+ } else {
+ primaryStreamBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ * + * Primary stream. Will contain the beginning portion of + * |original_stream|. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream primary_stream = 1;
+ */
+ public Builder clearPrimaryStream() {
+ if (primaryStreamBuilder_ == null) {
+ primaryStream_ = null;
+ onChanged();
+ } else {
+ primaryStream_ = null;
+ primaryStreamBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ * + * Primary stream. Will contain the beginning portion of + * |original_stream|. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream primary_stream = 1;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.Builder getPrimaryStreamBuilder() {
+
+ onChanged();
+ return getPrimaryStreamFieldBuilder().getBuilder();
+ }
+ /**
+ * + * Primary stream. Will contain the beginning portion of + * |original_stream|. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream primary_stream = 1;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.StreamOrBuilder getPrimaryStreamOrBuilder() {
+ if (primaryStreamBuilder_ != null) {
+ return primaryStreamBuilder_.getMessageOrBuilder();
+ } else {
+ return primaryStream_ == null ?
+ com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.getDefaultInstance() : primaryStream_;
+ }
+ }
+ /**
+ * + * Primary stream. Will contain the beginning portion of + * |original_stream|. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream primary_stream = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1beta1.Storage.Stream, com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.Builder, com.google.cloud.bigquery.storage.v1beta1.Storage.StreamOrBuilder>
+ getPrimaryStreamFieldBuilder() {
+ if (primaryStreamBuilder_ == null) {
+ primaryStreamBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1beta1.Storage.Stream, com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.Builder, com.google.cloud.bigquery.storage.v1beta1.Storage.StreamOrBuilder>(
+ getPrimaryStream(),
+ getParentForChildren(),
+ isClean());
+ primaryStream_ = null;
+ }
+ return primaryStreamBuilder_;
+ }
+
+ private com.google.cloud.bigquery.storage.v1beta1.Storage.Stream remainderStream_ = null;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1beta1.Storage.Stream, com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.Builder, com.google.cloud.bigquery.storage.v1beta1.Storage.StreamOrBuilder> remainderStreamBuilder_;
+ /**
+ * + * Remainder stream. Will contain the tail of |original_stream|. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream remainder_stream = 2;
+ */
+ public boolean hasRemainderStream() {
+ return remainderStreamBuilder_ != null || remainderStream_ != null;
+ }
+ /**
+ * + * Remainder stream. Will contain the tail of |original_stream|. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream remainder_stream = 2;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.Stream getRemainderStream() {
+ if (remainderStreamBuilder_ == null) {
+ return remainderStream_ == null ? com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.getDefaultInstance() : remainderStream_;
+ } else {
+ return remainderStreamBuilder_.getMessage();
+ }
+ }
+ /**
+ * + * Remainder stream. Will contain the tail of |original_stream|. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream remainder_stream = 2;
+ */
+ public Builder setRemainderStream(com.google.cloud.bigquery.storage.v1beta1.Storage.Stream value) {
+ if (remainderStreamBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ remainderStream_ = value;
+ onChanged();
+ } else {
+ remainderStreamBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ * + * Remainder stream. Will contain the tail of |original_stream|. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream remainder_stream = 2;
+ */
+ public Builder setRemainderStream(
+ com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.Builder builderForValue) {
+ if (remainderStreamBuilder_ == null) {
+ remainderStream_ = builderForValue.build();
+ onChanged();
+ } else {
+ remainderStreamBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ * + * Remainder stream. Will contain the tail of |original_stream|. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream remainder_stream = 2;
+ */
+ public Builder mergeRemainderStream(com.google.cloud.bigquery.storage.v1beta1.Storage.Stream value) {
+ if (remainderStreamBuilder_ == null) {
+ if (remainderStream_ != null) {
+ remainderStream_ =
+ com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.newBuilder(remainderStream_).mergeFrom(value).buildPartial();
+ } else {
+ remainderStream_ = value;
+ }
+ onChanged();
+ } else {
+ remainderStreamBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ * + * Remainder stream. Will contain the tail of |original_stream|. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream remainder_stream = 2;
+ */
+ public Builder clearRemainderStream() {
+ if (remainderStreamBuilder_ == null) {
+ remainderStream_ = null;
+ onChanged();
+ } else {
+ remainderStream_ = null;
+ remainderStreamBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ * + * Remainder stream. Will contain the tail of |original_stream|. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream remainder_stream = 2;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.Builder getRemainderStreamBuilder() {
+
+ onChanged();
+ return getRemainderStreamFieldBuilder().getBuilder();
+ }
+ /**
+ * + * Remainder stream. Will contain the tail of |original_stream|. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream remainder_stream = 2;
+ */
+ public com.google.cloud.bigquery.storage.v1beta1.Storage.StreamOrBuilder getRemainderStreamOrBuilder() {
+ if (remainderStreamBuilder_ != null) {
+ return remainderStreamBuilder_.getMessageOrBuilder();
+ } else {
+ return remainderStream_ == null ?
+ com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.getDefaultInstance() : remainderStream_;
+ }
+ }
+ /**
+ * + * Remainder stream. Will contain the tail of |original_stream|. + *+ * + *
.google.cloud.bigquery.storage.v1beta1.Stream remainder_stream = 2;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1beta1.Storage.Stream, com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.Builder, com.google.cloud.bigquery.storage.v1beta1.Storage.StreamOrBuilder>
+ getRemainderStreamFieldBuilder() {
+ if (remainderStreamBuilder_ == null) {
+ remainderStreamBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.storage.v1beta1.Storage.Stream, com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.Builder, com.google.cloud.bigquery.storage.v1beta1.Storage.StreamOrBuilder>(
+ getRemainderStream(),
+ getParentForChildren(),
+ isClean());
+ remainderStream_ = null;
+ }
+ return remainderStreamBuilder_;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(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.v1beta1.SplitReadStreamResponse)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.bigquery.storage.v1beta1.SplitReadStreamResponse)
+ private static final com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamResponse DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamResponse();
+ }
+
+ public static com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamResponse getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The assigned project ID of the project. + *+ * + *
string project_id = 1;
+ */
+ java.lang.String getProjectId();
+ /**
+ * + * The assigned project ID of the project. + *+ * + *
string project_id = 1;
+ */
+ com.google.protobuf.ByteString
+ getProjectIdBytes();
+
+ /**
+ * + * The ID of the dataset in the above project. + *+ * + *
string dataset_id = 2;
+ */
+ java.lang.String getDatasetId();
+ /**
+ * + * The ID of the dataset in the above project. + *+ * + *
string dataset_id = 2;
+ */
+ com.google.protobuf.ByteString
+ getDatasetIdBytes();
+
+ /**
+ * + * The ID of the table in the above dataset. + *+ * + *
string table_id = 3;
+ */
+ java.lang.String getTableId();
+ /**
+ * + * The ID of the table in the above dataset. + *+ * + *
string table_id = 3;
+ */
+ com.google.protobuf.ByteString
+ getTableIdBytes();
+ }
+ /**
+ * + * Table reference that includes just the 3 strings needed to identify a table. + *+ * + * Protobuf type {@code google.cloud.bigquery.storage.v1beta1.TableReference} + */ + public static final class TableReference extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.bigquery.storage.v1beta1.TableReference) + TableReferenceOrBuilder { + private static final long serialVersionUID = 0L; + // Use TableReference.newBuilder() to construct. + private TableReference(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + private TableReference() { + projectId_ = ""; + datasetId_ = ""; + tableId_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TableReference( + 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(); + + projectId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + datasetId_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + tableId_ = s; + break; + } + default: { + if (!parseUnknownFieldProto3( + 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.v1beta1.TableReferenceProto.internal_static_google_cloud_bigquery_storage_v1beta1_TableReference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.internal_static_google_cloud_bigquery_storage_v1beta1_TableReference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference.class, com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference.Builder.class); + } + + public static final int PROJECT_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object projectId_; + /** + *
+ * The assigned project ID of the project. + *+ * + *
string project_id = 1;
+ */
+ public java.lang.String getProjectId() {
+ java.lang.Object ref = projectId_;
+ 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();
+ projectId_ = s;
+ return s;
+ }
+ }
+ /**
+ * + * The assigned project ID of the project. + *+ * + *
string project_id = 1;
+ */
+ public com.google.protobuf.ByteString
+ getProjectIdBytes() {
+ java.lang.Object ref = projectId_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ projectId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int DATASET_ID_FIELD_NUMBER = 2;
+ private volatile java.lang.Object datasetId_;
+ /**
+ * + * The ID of the dataset in the above project. + *+ * + *
string dataset_id = 2;
+ */
+ public java.lang.String getDatasetId() {
+ java.lang.Object ref = datasetId_;
+ 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();
+ datasetId_ = s;
+ return s;
+ }
+ }
+ /**
+ * + * The ID of the dataset in the above project. + *+ * + *
string dataset_id = 2;
+ */
+ public com.google.protobuf.ByteString
+ getDatasetIdBytes() {
+ java.lang.Object ref = datasetId_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ datasetId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int TABLE_ID_FIELD_NUMBER = 3;
+ private volatile java.lang.Object tableId_;
+ /**
+ * + * The ID of the table in the above dataset. + *+ * + *
string table_id = 3;
+ */
+ public java.lang.String getTableId() {
+ java.lang.Object ref = tableId_;
+ 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();
+ tableId_ = s;
+ return s;
+ }
+ }
+ /**
+ * + * The ID of the table in the above dataset. + *+ * + *
string table_id = 3;
+ */
+ public com.google.protobuf.ByteString
+ getTableIdBytes() {
+ java.lang.Object ref = tableId_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ tableId_ = 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 (!getProjectIdBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_);
+ }
+ if (!getDatasetIdBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, datasetId_);
+ }
+ if (!getTableIdBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, tableId_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getProjectIdBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_);
+ }
+ if (!getDatasetIdBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, datasetId_);
+ }
+ if (!getTableIdBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, tableId_);
+ }
+ 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.v1beta1.TableReferenceProto.TableReference)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference other = (com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference) obj;
+
+ boolean result = true;
+ result = result && getProjectId()
+ .equals(other.getProjectId());
+ result = result && getDatasetId()
+ .equals(other.getDatasetId());
+ result = result && getTableId()
+ .equals(other.getTableId());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER;
+ hash = (53 * hash) + getProjectId().hashCode();
+ hash = (37 * hash) + DATASET_ID_FIELD_NUMBER;
+ hash = (53 * hash) + getDatasetId().hashCode();
+ hash = (37 * hash) + TABLE_ID_FIELD_NUMBER;
+ hash = (53 * hash) + getTableId().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference 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.v1beta1.TableReferenceProto.TableReference parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference 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.v1beta1.TableReferenceProto.TableReference parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference 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.v1beta1.TableReferenceProto.TableReference parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference 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.v1beta1.TableReferenceProto.TableReference parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference 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.v1beta1.TableReferenceProto.TableReference 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.v1beta1.TableReferenceProto.TableReference 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.v1beta1.TableReferenceProto.TableReference 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;
+ }
+ /**
+ * + * Table reference that includes just the 3 strings needed to identify a table. + *+ * + * Protobuf type {@code google.cloud.bigquery.storage.v1beta1.TableReference} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder
+ * The assigned project ID of the project. + *+ * + *
string project_id = 1;
+ */
+ public java.lang.String getProjectId() {
+ java.lang.Object ref = projectId_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ projectId_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * + * The assigned project ID of the project. + *+ * + *
string project_id = 1;
+ */
+ public com.google.protobuf.ByteString
+ getProjectIdBytes() {
+ java.lang.Object ref = projectId_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ projectId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * + * The assigned project ID of the project. + *+ * + *
string project_id = 1;
+ */
+ public Builder setProjectId(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ projectId_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * + * The assigned project ID of the project. + *+ * + *
string project_id = 1;
+ */
+ public Builder clearProjectId() {
+
+ projectId_ = getDefaultInstance().getProjectId();
+ onChanged();
+ return this;
+ }
+ /**
+ * + * The assigned project ID of the project. + *+ * + *
string project_id = 1;
+ */
+ public Builder setProjectIdBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ projectId_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object datasetId_ = "";
+ /**
+ * + * The ID of the dataset in the above project. + *+ * + *
string dataset_id = 2;
+ */
+ public java.lang.String getDatasetId() {
+ java.lang.Object ref = datasetId_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ datasetId_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * + * The ID of the dataset in the above project. + *+ * + *
string dataset_id = 2;
+ */
+ public com.google.protobuf.ByteString
+ getDatasetIdBytes() {
+ java.lang.Object ref = datasetId_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ datasetId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * + * The ID of the dataset in the above project. + *+ * + *
string dataset_id = 2;
+ */
+ public Builder setDatasetId(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ datasetId_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * + * The ID of the dataset in the above project. + *+ * + *
string dataset_id = 2;
+ */
+ public Builder clearDatasetId() {
+
+ datasetId_ = getDefaultInstance().getDatasetId();
+ onChanged();
+ return this;
+ }
+ /**
+ * + * The ID of the dataset in the above project. + *+ * + *
string dataset_id = 2;
+ */
+ public Builder setDatasetIdBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ datasetId_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object tableId_ = "";
+ /**
+ * + * The ID of the table in the above dataset. + *+ * + *
string table_id = 3;
+ */
+ public java.lang.String getTableId() {
+ java.lang.Object ref = tableId_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ tableId_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * + * The ID of the table in the above dataset. + *+ * + *
string table_id = 3;
+ */
+ public com.google.protobuf.ByteString
+ getTableIdBytes() {
+ java.lang.Object ref = tableId_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ tableId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * + * The ID of the table in the above dataset. + *+ * + *
string table_id = 3;
+ */
+ public Builder setTableId(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ tableId_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * + * The ID of the table in the above dataset. + *+ * + *
string table_id = 3;
+ */
+ public Builder clearTableId() {
+
+ tableId_ = getDefaultInstance().getTableId();
+ onChanged();
+ return this;
+ }
+ /**
+ * + * The ID of the table in the above dataset. + *+ * + *
string table_id = 3;
+ */
+ public Builder setTableIdBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ tableId_ = value;
+ onChanged();
+ return this;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(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.v1beta1.TableReference)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.bigquery.storage.v1beta1.TableReference)
+ private static final com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference();
+ }
+
+ public static com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The snapshot time of the table. If not set, interpreted as now. + *+ * + *
.google.protobuf.Timestamp snapshot_time = 1;
+ */
+ boolean hasSnapshotTime();
+ /**
+ * + * The snapshot time of the table. If not set, interpreted as now. + *+ * + *
.google.protobuf.Timestamp snapshot_time = 1;
+ */
+ 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();
+ }
+ /**
+ * + * All fields in this message optional. + *+ * + * Protobuf type {@code google.cloud.bigquery.storage.v1beta1.TableModifiers} + */ + public static final class TableModifiers extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.bigquery.storage.v1beta1.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 + 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(); + } + 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: { + 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 (!parseUnknownFieldProto3( + 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.v1beta1.TableReferenceProto.internal_static_google_cloud_bigquery_storage_v1beta1_TableModifiers_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.internal_static_google_cloud_bigquery_storage_v1beta1_TableModifiers_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers.class, com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.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;
+ */
+ public boolean hasSnapshotTime() {
+ return snapshotTime_ != null;
+ }
+ /**
+ * + * The snapshot time of the table. If not set, interpreted as now. + *+ * + *
.google.protobuf.Timestamp snapshot_time = 1;
+ */
+ 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.v1beta1.TableReferenceProto.TableModifiers)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers other = (com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers) obj;
+
+ boolean result = true;
+ result = result && (hasSnapshotTime() == other.hasSnapshotTime());
+ if (hasSnapshotTime()) {
+ result = result && getSnapshotTime()
+ .equals(other.getSnapshotTime());
+ }
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @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.v1beta1.TableReferenceProto.TableModifiers parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.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.v1beta1.TableReferenceProto.TableModifiers parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.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.v1beta1.TableReferenceProto.TableModifiers parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.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.v1beta1.TableReferenceProto.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.v1beta1.TableReferenceProto.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.v1beta1.TableReferenceProto.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.v1beta1.TableReferenceProto.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.v1beta1.TableReferenceProto.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.v1beta1.TableReferenceProto.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.v1beta1.TableReferenceProto.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;
+ }
+ /**
+ * + * All fields in this message optional. + *+ * + * Protobuf type {@code google.cloud.bigquery.storage.v1beta1.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;
+ */
+ 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;
+ */
+ 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.setUnknownFieldsProto3(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.v1beta1.TableModifiers)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.bigquery.storage.v1beta1.TableModifiers)
+ private static final com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers();
+ }
+
+ public static com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.ParserThe BigQuery storage API can be used to read data stored in 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 (BaseBigQueryStorageClient baseBigQueryStorageClient = BaseBigQueryStorageClient.create()) {
+ * TableReference tableReference = TableReference.newBuilder().build();
+ * String parent = "";
+ * int requestedStreams = 0;
+ * ReadSession response = baseBigQueryStorageClient.createReadSession(tableReference, parent, requestedStreams);
+ * }
+ *
+ *
+ *
+ * Note: close() needs to be called on the baseBigQueryStorageClient 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 BaseBigQueryStorageSettings to + * create(). For example: + * + *
To customize credentials: + * + *
+ *
+ * BaseBigQueryStorageSettings baseBigQueryStorageSettings =
+ * BaseBigQueryStorageSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * BaseBigQueryStorageClient baseBigQueryStorageClient =
+ * BaseBigQueryStorageClient.create(baseBigQueryStorageSettings);
+ *
+ *
+ *
+ * To customize the endpoint:
+ *
+ *
+ *
+ * BaseBigQueryStorageSettings baseBigQueryStorageSettings =
+ * BaseBigQueryStorageSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * BaseBigQueryStorageClient baseBigQueryStorageClient =
+ * BaseBigQueryStorageClient.create(baseBigQueryStorageSettings);
+ *
+ *
+ */
+@Generated("by gapic-generator")
+@BetaApi
+public class BaseBigQueryStorageClient implements BackgroundResource {
+ private final BaseBigQueryStorageSettings settings;
+ private final BigQueryStorageStub stub;
+
+ /** Constructs an instance of BaseBigQueryStorageClient with default settings. */
+ public static final BaseBigQueryStorageClient create() throws IOException {
+ return create(BaseBigQueryStorageSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of BaseBigQueryStorageClient, 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 BaseBigQueryStorageClient create(BaseBigQueryStorageSettings settings)
+ throws IOException {
+ return new BaseBigQueryStorageClient(settings);
+ }
+
+ /**
+ * Constructs an instance of BaseBigQueryStorageClient, using the given stub for making calls.
+ * This is for advanced usage - prefer to use BaseBigQueryStorageSettings}.
+ */
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public static final BaseBigQueryStorageClient create(BigQueryStorageStub stub) {
+ return new BaseBigQueryStorageClient(stub);
+ }
+
+ /**
+ * Constructs an instance of BaseBigQueryStorageClient, 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 BaseBigQueryStorageClient(BaseBigQueryStorageSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((BigQueryStorageStubSettings) settings.getStubSettings()).createStub();
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ protected BaseBigQueryStorageClient(BigQueryStorageStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ }
+
+ public final BaseBigQueryStorageSettings getSettings() {
+ return settings;
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public BigQueryStorageStub 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. + * + *
Read sessions automatically expire 24 hours after they are created and do not require manual + * clean-up by the caller. + * + *
Sample code: + * + *
+ * try (BaseBigQueryStorageClient baseBigQueryStorageClient = BaseBigQueryStorageClient.create()) {
+ * TableReference tableReference = TableReference.newBuilder().build();
+ * String parent = "";
+ * int requestedStreams = 0;
+ * ReadSession response = baseBigQueryStorageClient.createReadSession(tableReference, parent, requestedStreams);
+ * }
+ *
+ *
+ * @param tableReference Required. Reference to the table to read.
+ * @param parent Required. String of the form "projects/your-project-id" indicating the project
+ * this ReadSession is associated with. This is the project that will be billed for usage.
+ * @param requestedStreams Optional. Initial number of streams. If unset or 0, we 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 and the maximum amount of parallelism allowed by the system.
+ * Streams must be read starting from offset 0. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ReadSession createReadSession( + TableReference tableReference, String parent, int requestedStreams) { + + CreateReadSessionRequest request = + CreateReadSessionRequest.newBuilder() + .setTableReference(tableReference) + .setParent(parent) + .setRequestedStreams(requestedStreams) + .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. + * + *
Read sessions automatically expire 24 hours after they are created and do not require manual + * clean-up by the caller. + * + *
Sample code: + * + *
+ * try (BaseBigQueryStorageClient baseBigQueryStorageClient = BaseBigQueryStorageClient.create()) {
+ * TableReference tableReference = TableReference.newBuilder().build();
+ * String parent = "";
+ * CreateReadSessionRequest request = CreateReadSessionRequest.newBuilder()
+ * .setTableReference(tableReference)
+ * .setParent(parent)
+ * .build();
+ * ReadSession response = baseBigQueryStorageClient.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. + * + *
Read sessions automatically expire 24 hours after they are created and do not require manual + * clean-up by the caller. + * + *
Sample code: + * + *
+ * try (BaseBigQueryStorageClient baseBigQueryStorageClient = BaseBigQueryStorageClient.create()) {
+ * TableReference tableReference = TableReference.newBuilder().build();
+ * String parent = "";
+ * CreateReadSessionRequest request = CreateReadSessionRequest.newBuilder()
+ * .setTableReference(tableReference)
+ * .setParent(parent)
+ * .build();
+ * ApiFuture<ReadSession> future = baseBigQueryStorageClient.createReadSessionCallable().futureCall(request);
+ * // Do something
+ * ReadSession response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallableEach request also returns a set of stream statistics reflecting the estimated total number + * of rows in the read stream. This number is computed based on the total table size and the + * number of active streams in the read session, and may change as other streams continue to read + * data. + * + *
Sample code: + * + *
+ * try (BaseBigQueryStorageClient baseBigQueryStorageClient = BaseBigQueryStorageClient.create()) {
+ * StreamPosition readPosition = StreamPosition.newBuilder().build();
+ * ReadRowsRequest request = ReadRowsRequest.newBuilder()
+ * .setReadPosition(readPosition)
+ * .build();
+ *
+ * ServerStream<ReadRowsResponse> stream = baseBigQueryStorageClient.readRowsCallable().call(request);
+ * for (ReadRowsResponse response : stream) {
+ * // Do something when receive a response
+ * }
+ * }
+ *
+ */
+ public final ServerStreamingCallableSample code: + * + *
+ * try (BaseBigQueryStorageClient baseBigQueryStorageClient = BaseBigQueryStorageClient.create()) {
+ * ReadSession session = ReadSession.newBuilder().build();
+ * int requestedStreams = 0;
+ * BatchCreateReadSessionStreamsResponse response = baseBigQueryStorageClient.batchCreateReadSessionStreams(session, requestedStreams);
+ * }
+ *
+ *
+ * @param session Required. Must be a non-expired session obtained from a call to
+ * CreateReadSession. Only the name field needs to be set.
+ * @param requestedStreams Required. Number of new streams requested. Must be positive. Number of
+ * added streams may be less than this, see CreateReadSessionRequest for more information.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final BatchCreateReadSessionStreamsResponse batchCreateReadSessionStreams(
+ ReadSession session, int requestedStreams) {
+
+ BatchCreateReadSessionStreamsRequest request =
+ BatchCreateReadSessionStreamsRequest.newBuilder()
+ .setSession(session)
+ .setRequestedStreams(requestedStreams)
+ .build();
+ return batchCreateReadSessionStreams(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Creates additional streams for a ReadSession. This API can be used to dynamically adjust the
+ * parallelism of a batch processing task upwards by adding additional workers.
+ *
+ * Sample code: + * + *
+ * try (BaseBigQueryStorageClient baseBigQueryStorageClient = BaseBigQueryStorageClient.create()) {
+ * ReadSession session = ReadSession.newBuilder().build();
+ * int requestedStreams = 0;
+ * BatchCreateReadSessionStreamsRequest request = BatchCreateReadSessionStreamsRequest.newBuilder()
+ * .setSession(session)
+ * .setRequestedStreams(requestedStreams)
+ * .build();
+ * BatchCreateReadSessionStreamsResponse response = baseBigQueryStorageClient.batchCreateReadSessionStreams(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 BatchCreateReadSessionStreamsResponse batchCreateReadSessionStreams(
+ BatchCreateReadSessionStreamsRequest request) {
+ return batchCreateReadSessionStreamsCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Creates additional streams for a ReadSession. This API can be used to dynamically adjust the
+ * parallelism of a batch processing task upwards by adding additional workers.
+ *
+ * Sample code: + * + *
+ * try (BaseBigQueryStorageClient baseBigQueryStorageClient = BaseBigQueryStorageClient.create()) {
+ * ReadSession session = ReadSession.newBuilder().build();
+ * int requestedStreams = 0;
+ * BatchCreateReadSessionStreamsRequest request = BatchCreateReadSessionStreamsRequest.newBuilder()
+ * .setSession(session)
+ * .setRequestedStreams(requestedStreams)
+ * .build();
+ * ApiFuture<BatchCreateReadSessionStreamsResponse> future = baseBigQueryStorageClient.batchCreateReadSessionStreamsCallable().futureCall(request);
+ * // Do something
+ * BatchCreateReadSessionStreamsResponse response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallable<
+ BatchCreateReadSessionStreamsRequest, BatchCreateReadSessionStreamsResponse>
+ batchCreateReadSessionStreamsCallable() {
+ return stub.batchCreateReadSessionStreamsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Triggers the graceful termination of a single stream in a ReadSession. This API can be used to
+ * dynamically adjust the parallelism of a batch processing task downwards without losing data.
+ *
+ * This API does not delete the stream -- it remains visible in the ReadSession, and any data + * processed by the stream is not released to other streams. However, no additional data will be + * assigned to the stream once this call completes. Callers must continue reading data on the + * stream until the end of the stream is reached so that data which has already been assigned to + * the stream will be processed. + * + *
This method will return an error if there are no other live streams in the Session, or if + * SplitReadStream() has been called on the given Stream. + * + *
Sample code: + * + *
+ * try (BaseBigQueryStorageClient baseBigQueryStorageClient = BaseBigQueryStorageClient.create()) {
+ * Stream stream = Stream.newBuilder().build();
+ * baseBigQueryStorageClient.finalizeStream(stream);
+ * }
+ *
+ *
+ * @param stream Stream to finalize.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void finalizeStream(Stream stream) {
+
+ FinalizeStreamRequest request = FinalizeStreamRequest.newBuilder().setStream(stream).build();
+ finalizeStream(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Triggers the graceful termination of a single stream in a ReadSession. This API can be used to
+ * dynamically adjust the parallelism of a batch processing task downwards without losing data.
+ *
+ * This API does not delete the stream -- it remains visible in the ReadSession, and any data + * processed by the stream is not released to other streams. However, no additional data will be + * assigned to the stream once this call completes. Callers must continue reading data on the + * stream until the end of the stream is reached so that data which has already been assigned to + * the stream will be processed. + * + *
This method will return an error if there are no other live streams in the Session, or if + * SplitReadStream() has been called on the given Stream. + * + *
Sample code: + * + *
+ * try (BaseBigQueryStorageClient baseBigQueryStorageClient = BaseBigQueryStorageClient.create()) {
+ * Stream stream = Stream.newBuilder().build();
+ * FinalizeStreamRequest request = FinalizeStreamRequest.newBuilder()
+ * .setStream(stream)
+ * .build();
+ * baseBigQueryStorageClient.finalizeStream(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 void finalizeStream(FinalizeStreamRequest request) {
+ finalizeStreamCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Triggers the graceful termination of a single stream in a ReadSession. This API can be used to
+ * dynamically adjust the parallelism of a batch processing task downwards without losing data.
+ *
+ * This API does not delete the stream -- it remains visible in the ReadSession, and any data + * processed by the stream is not released to other streams. However, no additional data will be + * assigned to the stream once this call completes. Callers must continue reading data on the + * stream until the end of the stream is reached so that data which has already been assigned to + * the stream will be processed. + * + *
This method will return an error if there are no other live streams in the Session, or if + * SplitReadStream() has been called on the given Stream. + * + *
Sample code: + * + *
+ * try (BaseBigQueryStorageClient baseBigQueryStorageClient = BaseBigQueryStorageClient.create()) {
+ * Stream stream = Stream.newBuilder().build();
+ * FinalizeStreamRequest request = FinalizeStreamRequest.newBuilder()
+ * .setStream(stream)
+ * .build();
+ * ApiFuture<Void> future = baseBigQueryStorageClient.finalizeStreamCallable().futureCall(request);
+ * // Do something
+ * future.get();
+ * }
+ *
+ */
+ public final UnaryCallableMoreover, the two child streams will be allocated back to back in the original Stream. + * 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. + * + *
This method is guaranteed to be idempotent. + * + *
Sample code: + * + *
+ * try (BaseBigQueryStorageClient baseBigQueryStorageClient = BaseBigQueryStorageClient.create()) {
+ * Stream originalStream = Stream.newBuilder().build();
+ * SplitReadStreamResponse response = baseBigQueryStorageClient.splitReadStream(originalStream);
+ * }
+ *
+ *
+ * @param originalStream Stream to split.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SplitReadStreamResponse splitReadStream(Stream originalStream) {
+
+ SplitReadStreamRequest request =
+ SplitReadStreamRequest.newBuilder().setOriginalStream(originalStream).build();
+ return splitReadStream(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Splits a given read stream into two Streams. These streams are referred to as the primary and
+ * the residual of the split. The original stream can still be read from in the same manner as
+ * before. Both of the returned streams can also be read from, and the total rows return 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 Stream. + * 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. + * + *
This method is guaranteed to be idempotent. + * + *
Sample code: + * + *
+ * try (BaseBigQueryStorageClient baseBigQueryStorageClient = BaseBigQueryStorageClient.create()) {
+ * Stream originalStream = Stream.newBuilder().build();
+ * SplitReadStreamRequest request = SplitReadStreamRequest.newBuilder()
+ * .setOriginalStream(originalStream)
+ * .build();
+ * SplitReadStreamResponse response = baseBigQueryStorageClient.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 read stream into two Streams. These streams are referred to as the primary and
+ * the residual of the split. The original stream can still be read from in the same manner as
+ * before. Both of the returned streams can also be read from, and the total rows return 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 Stream. + * 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. + * + *
This method is guaranteed to be idempotent. + * + *
Sample code: + * + *
+ * try (BaseBigQueryStorageClient baseBigQueryStorageClient = BaseBigQueryStorageClient.create()) {
+ * Stream originalStream = Stream.newBuilder().build();
+ * SplitReadStreamRequest request = SplitReadStreamRequest.newBuilder()
+ * .setOriginalStream(originalStream)
+ * .build();
+ * ApiFuture<SplitReadStreamResponse> future = baseBigQueryStorageClient.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: + * + *
+ *
+ * BaseBigQueryStorageSettings.Builder baseBigQueryStorageSettingsBuilder =
+ * BaseBigQueryStorageSettings.newBuilder();
+ * baseBigQueryStorageSettingsBuilder.createReadSessionSettings().getRetrySettings().toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30));
+ * BaseBigQueryStorageSettings baseBigQueryStorageSettings = baseBigQueryStorageSettingsBuilder.build();
+ *
+ *
+ */
+@Generated("by gapic-generator")
+@BetaApi
+public class BaseBigQueryStorageSettings 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.
+ *
+ * ========================= BaseBigQueryStorageClient =========================
+ *
+ * Service Description: BigQuery storage API.
+ *
+ * The BigQuery storage API can be used to read data stored in BigQuery.
+ *
+ * Sample for BaseBigQueryStorageClient:
+ *
+ * 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 BigQueryStorageStub 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 GrpcBigQueryStorageCallableFactory 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 GrpcBigQueryStorageStub extends BigQueryStorageStub {
+
+ private static final MethodDescriptor
+ *
+ */
+package com.google.cloud.bigquery.storage.v1beta1;
diff --git a/google-cloud-clients/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/stub/BigQueryStorageStub.java b/google-cloud-clients/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/stub/BigQueryStorageStub.java
new file mode 100644
index 000000000000..6aa6546e8583
--- /dev/null
+++ b/google-cloud-clients/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/stub/BigQueryStorageStub.java
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2018 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.v1beta1.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.v1beta1.Storage.BatchCreateReadSessionStreamsRequest;
+import com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsResponse;
+import com.google.cloud.bigquery.storage.v1beta1.Storage.CreateReadSessionRequest;
+import com.google.cloud.bigquery.storage.v1beta1.Storage.FinalizeStreamRequest;
+import com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsRequest;
+import com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsResponse;
+import com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession;
+import com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamRequest;
+import com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamResponse;
+import com.google.protobuf.Empty;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS
+/**
+ * Base stub class for BigQuery Storage API.
+ *
+ *
+ * try (BaseBigQueryStorageClient baseBigQueryStorageClient = BaseBigQueryStorageClient.create()) {
+ * TableReference tableReference = TableReference.newBuilder().build();
+ * String parent = "";
+ * int requestedStreams = 0;
+ * ReadSession response = baseBigQueryStorageClient.createReadSession(tableReference, parent, requestedStreams);
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ */
+@Generated("by gapic-generator")
+@BetaApi
+public class BigQueryStorageStubSettings extends StubSettings
+ * BigQueryStorageStubSettings.Builder baseBigQueryStorageSettingsBuilder =
+ * BigQueryStorageStubSettings.newBuilder();
+ * baseBigQueryStorageSettingsBuilder.createReadSessionSettings().getRetrySettings().toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30));
+ * BigQueryStorageStubSettings baseBigQueryStorageSettings = baseBigQueryStorageSettingsBuilder.build();
+ *
+ *