From b68d4ddc05d3d828e31487895c566f708810df29 Mon Sep 17 00:00:00 2001 From: Jesse Lovelace Date: Mon, 12 Nov 2018 12:57:25 -0800 Subject: [PATCH] New Client: BigQuery Storage --- .../LICENSE | 201 + .../build.gradle | 49 + .../pom.xml | 31 + .../storage/v1beta1/BigQueryStorageGrpc.java | 825 + google-api-grpc/pom.xml | 12 + .../LICENSE | 201 + .../build.gradle | 52 + .../pom.xml | 31 + .../bigquery/storage/v1beta1/AvroProto.java | 1267 ++ .../bigquery/storage/v1beta1/ReadOptions.java | 1004 ++ .../bigquery/storage/v1beta1/Storage.java | 12499 ++++++++++++++++ .../storage/v1beta1/TableReferenceProto.java | 1692 +++ .../cloud/bigquery/storage/v1beta1/avro.proto | 39 + .../storage/v1beta1/read_options.proto | 39 + .../bigquery/storage/v1beta1/storage.proto | 249 + .../storage/v1beta1/table_reference.proto | 43 + google-cloud-bom/pom.xml | 10 + .../google-cloud-bigquerystorage/README.md | 100 + .../google-cloud-bigquerystorage/pom.xml | 80 + .../v1beta1/BaseBigQueryStorageClient.java | 620 + .../v1beta1/BaseBigQueryStorageSettings.java | 235 + .../storage/v1beta1/package-info.java | 41 + .../v1beta1/stub/BigQueryStorageStub.java | 68 + .../stub/BigQueryStorageStubSettings.java | 387 + .../GrpcBigQueryStorageCallableFactory.java | 116 + .../v1beta1/stub/GrpcBigQueryStorageStub.java | 314 + .../BaseBigQueryStorageClientTest.java | 296 + .../storage/v1beta1/MockBigQueryStorage.java | 57 + .../v1beta1/MockBigQueryStorageImpl.java | 143 + .../google-cloud-bigquerystorage/synth.py | 31 + google-cloud-clients/pom.xml | 5 +- 31 files changed, 20735 insertions(+), 2 deletions(-) create mode 100644 google-api-grpc/grpc-google-cloud-bigquerystorage-v1beta1/LICENSE create mode 100644 google-api-grpc/grpc-google-cloud-bigquerystorage-v1beta1/build.gradle create mode 100644 google-api-grpc/grpc-google-cloud-bigquerystorage-v1beta1/pom.xml create mode 100644 google-api-grpc/grpc-google-cloud-bigquerystorage-v1beta1/src/main/java/com/google/cloud/bigquery/storage/v1beta1/BigQueryStorageGrpc.java create mode 100644 google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/LICENSE create mode 100644 google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/build.gradle create mode 100644 google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/pom.xml create mode 100644 google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/src/main/java/com/google/cloud/bigquery/storage/v1beta1/AvroProto.java create mode 100644 google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/src/main/java/com/google/cloud/bigquery/storage/v1beta1/ReadOptions.java create mode 100644 google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/src/main/java/com/google/cloud/bigquery/storage/v1beta1/Storage.java create mode 100644 google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/src/main/java/com/google/cloud/bigquery/storage/v1beta1/TableReferenceProto.java create mode 100644 google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/src/main/proto/google/cloud/bigquery/storage/v1beta1/avro.proto create mode 100644 google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/src/main/proto/google/cloud/bigquery/storage/v1beta1/read_options.proto create mode 100644 google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/src/main/proto/google/cloud/bigquery/storage/v1beta1/storage.proto create mode 100644 google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/src/main/proto/google/cloud/bigquery/storage/v1beta1/table_reference.proto create mode 100644 google-cloud-clients/google-cloud-bigquerystorage/README.md create mode 100644 google-cloud-clients/google-cloud-bigquerystorage/pom.xml create mode 100644 google-cloud-clients/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/BaseBigQueryStorageClient.java create mode 100644 google-cloud-clients/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/BaseBigQueryStorageSettings.java create mode 100644 google-cloud-clients/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/package-info.java create mode 100644 google-cloud-clients/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/stub/BigQueryStorageStub.java create mode 100644 google-cloud-clients/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/stub/BigQueryStorageStubSettings.java create mode 100644 google-cloud-clients/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/stub/GrpcBigQueryStorageCallableFactory.java create mode 100644 google-cloud-clients/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/stub/GrpcBigQueryStorageStub.java create mode 100644 google-cloud-clients/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta1/BaseBigQueryStorageClientTest.java create mode 100644 google-cloud-clients/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta1/MockBigQueryStorage.java create mode 100644 google-cloud-clients/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta1/MockBigQueryStorageImpl.java create mode 100644 google-cloud-clients/google-cloud-bigquerystorage/synth.py diff --git a/google-api-grpc/grpc-google-cloud-bigquerystorage-v1beta1/LICENSE b/google-api-grpc/grpc-google-cloud-bigquerystorage-v1beta1/LICENSE new file mode 100644 index 000000000000..a8ee855de2aa --- /dev/null +++ b/google-api-grpc/grpc-google-cloud-bigquerystorage-v1beta1/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + https://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/google-api-grpc/grpc-google-cloud-bigquerystorage-v1beta1/build.gradle b/google-api-grpc/grpc-google-cloud-bigquerystorage-v1beta1/build.gradle new file mode 100644 index 000000000000..ff8d4046030f --- /dev/null +++ b/google-api-grpc/grpc-google-cloud-bigquerystorage-v1beta1/build.gradle @@ -0,0 +1,49 @@ +buildscript { + repositories { + mavenCentral() + } +} + +apply plugin: 'java' + +description = 'GRPC library for grpc-google-cloud-bigquerystorage-v1beta1' +group = 'com.google.api.grpc' +version = '0.0.0-SNAPSHOT' +sourceCompatibility = 1.7 +targetCompatibility = 1.7 + +repositories { + mavenCentral() + mavenLocal() +} + +dependencies { + compile 'io.grpc:grpc-stub:1.10.1' + compile 'io.grpc:grpc-protobuf:1.10.1' + compile project(':proto-google-cloud-bigquerystorage-v1beta1') +} + +sourceSets { + main { + java { + srcDir 'src/main/java' + } + } +} + +task javadocJar(type: Jar) { + classifier = 'javadoc' + from javadoc +} + +task sourcesJar(type: Jar) { + classifier = 'sources' + from sourceSets.main.allSource +} + +artifacts { + archives javadocJar, sourcesJar +} + +compileJava.options.encoding = 'UTF-8' +javadoc.options.encoding = 'UTF-8' \ No newline at end of file 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..e0407c1d6d86 --- /dev/null +++ b/google-api-grpc/grpc-google-cloud-bigquerystorage-v1beta1/pom.xml @@ -0,0 +1,31 @@ + + 4.0.0 + grpc-google-cloud-bigquerystorage-v1beta1 + 0.34.1-SNAPSHOT + grpc-google-cloud-bigquerystorage-v1beta1 + GRPC library for grpc-google-cloud-bigquerystorage-v1beta1 + + com.google.api.grpc + google-api-grpc + 0.34.1-SNAPSHOT + + + + io.grpc + grpc-stub + compile + + + io.grpc + grpc-protobuf + compile + + + com.google.api.grpc + proto-google-cloud-bigquerystorage-v1beta1 + compile + + + \ No newline at end of file diff --git a/google-api-grpc/grpc-google-cloud-bigquerystorage-v1beta1/src/main/java/com/google/cloud/bigquery/storage/v1beta1/BigQueryStorageGrpc.java b/google-api-grpc/grpc-google-cloud-bigquerystorage-v1beta1/src/main/java/com/google/cloud/bigquery/storage/v1beta1/BigQueryStorageGrpc.java new file mode 100644 index 000000000000..2fc2cfa10c8e --- /dev/null +++ b/google-api-grpc/grpc-google-cloud-bigquerystorage-v1beta1/src/main/java/com/google/cloud/bigquery/storage/v1beta1/BigQueryStorageGrpc.java @@ -0,0 +1,825 @@ +package com.google.cloud.bigquery.storage.v1beta1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall; +import static io.grpc.stub.ClientCalls.asyncClientStreamingCall; +import static io.grpc.stub.ClientCalls.asyncServerStreamingCall; +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.blockingServerStreamingCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall; +import static io.grpc.stub.ServerCalls.asyncClientStreamingCall; +import static io.grpc.stub.ServerCalls.asyncServerStreamingCall; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; + +/** + *
+ * 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 METHOD_CREATE_READ_SESSION = getCreateReadSessionMethodHelper(); + + private static volatile io.grpc.MethodDescriptor getCreateReadSessionMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor getCreateReadSessionMethod() { + return getCreateReadSessionMethodHelper(); + } + + private static io.grpc.MethodDescriptor getCreateReadSessionMethodHelper() { + io.grpc.MethodDescriptor getCreateReadSessionMethod; + if ((getCreateReadSessionMethod = BigQueryStorageGrpc.getCreateReadSessionMethod) == null) { + synchronized (BigQueryStorageGrpc.class) { + if ((getCreateReadSessionMethod = BigQueryStorageGrpc.getCreateReadSessionMethod) == null) { + BigQueryStorageGrpc.getCreateReadSessionMethod = getCreateReadSessionMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "google.cloud.bigquery.storage.v1beta1.BigQueryStorage", "CreateReadSession")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.bigquery.storage.v1beta1.Storage.CreateReadSessionRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession.getDefaultInstance())) + .setSchemaDescriptor(new BigQueryStorageMethodDescriptorSupplier("CreateReadSession")) + .build(); + } + } + } + return getCreateReadSessionMethod; + } + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getReadRowsMethod()} instead. + public static final io.grpc.MethodDescriptor METHOD_READ_ROWS = getReadRowsMethodHelper(); + + private static volatile io.grpc.MethodDescriptor getReadRowsMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor getReadRowsMethod() { + return getReadRowsMethodHelper(); + } + + private static io.grpc.MethodDescriptor getReadRowsMethodHelper() { + io.grpc.MethodDescriptor getReadRowsMethod; + if ((getReadRowsMethod = BigQueryStorageGrpc.getReadRowsMethod) == null) { + synchronized (BigQueryStorageGrpc.class) { + if ((getReadRowsMethod = BigQueryStorageGrpc.getReadRowsMethod) == null) { + BigQueryStorageGrpc.getReadRowsMethod = getReadRowsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName(generateFullMethodName( + "google.cloud.bigquery.storage.v1beta1.BigQueryStorage", "ReadRows")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsResponse.getDefaultInstance())) + .setSchemaDescriptor(new BigQueryStorageMethodDescriptorSupplier("ReadRows")) + .build(); + } + } + } + return getReadRowsMethod; + } + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getBatchCreateReadSessionStreamsMethod()} instead. + public static final io.grpc.MethodDescriptor METHOD_BATCH_CREATE_READ_SESSION_STREAMS = getBatchCreateReadSessionStreamsMethodHelper(); + + private static volatile io.grpc.MethodDescriptor getBatchCreateReadSessionStreamsMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor getBatchCreateReadSessionStreamsMethod() { + return getBatchCreateReadSessionStreamsMethodHelper(); + } + + private static io.grpc.MethodDescriptor getBatchCreateReadSessionStreamsMethodHelper() { + io.grpc.MethodDescriptor getBatchCreateReadSessionStreamsMethod; + if ((getBatchCreateReadSessionStreamsMethod = BigQueryStorageGrpc.getBatchCreateReadSessionStreamsMethod) == null) { + synchronized (BigQueryStorageGrpc.class) { + if ((getBatchCreateReadSessionStreamsMethod = BigQueryStorageGrpc.getBatchCreateReadSessionStreamsMethod) == null) { + BigQueryStorageGrpc.getBatchCreateReadSessionStreamsMethod = getBatchCreateReadSessionStreamsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "google.cloud.bigquery.storage.v1beta1.BigQueryStorage", "BatchCreateReadSessionStreams")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsResponse.getDefaultInstance())) + .setSchemaDescriptor(new BigQueryStorageMethodDescriptorSupplier("BatchCreateReadSessionStreams")) + .build(); + } + } + } + return getBatchCreateReadSessionStreamsMethod; + } + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getFinalizeStreamMethod()} instead. + public static final io.grpc.MethodDescriptor METHOD_FINALIZE_STREAM = getFinalizeStreamMethodHelper(); + + private static volatile io.grpc.MethodDescriptor getFinalizeStreamMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor getFinalizeStreamMethod() { + return getFinalizeStreamMethodHelper(); + } + + private static io.grpc.MethodDescriptor getFinalizeStreamMethodHelper() { + io.grpc.MethodDescriptor getFinalizeStreamMethod; + if ((getFinalizeStreamMethod = BigQueryStorageGrpc.getFinalizeStreamMethod) == null) { + synchronized (BigQueryStorageGrpc.class) { + if ((getFinalizeStreamMethod = BigQueryStorageGrpc.getFinalizeStreamMethod) == null) { + BigQueryStorageGrpc.getFinalizeStreamMethod = getFinalizeStreamMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "google.cloud.bigquery.storage.v1beta1.BigQueryStorage", "FinalizeStream")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.bigquery.storage.v1beta1.Storage.FinalizeStreamRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new BigQueryStorageMethodDescriptorSupplier("FinalizeStream")) + .build(); + } + } + } + return getFinalizeStreamMethod; + } + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getSplitReadStreamMethod()} instead. + public static final io.grpc.MethodDescriptor METHOD_SPLIT_READ_STREAM = getSplitReadStreamMethodHelper(); + + private static volatile io.grpc.MethodDescriptor getSplitReadStreamMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor getSplitReadStreamMethod() { + return getSplitReadStreamMethodHelper(); + } + + private static io.grpc.MethodDescriptor getSplitReadStreamMethodHelper() { + io.grpc.MethodDescriptor getSplitReadStreamMethod; + if ((getSplitReadStreamMethod = BigQueryStorageGrpc.getSplitReadStreamMethod) == null) { + synchronized (BigQueryStorageGrpc.class) { + if ((getSplitReadStreamMethod = BigQueryStorageGrpc.getSplitReadStreamMethod) == null) { + BigQueryStorageGrpc.getSplitReadStreamMethod = getSplitReadStreamMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "google.cloud.bigquery.storage.v1beta1.BigQueryStorage", "SplitReadStream")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamResponse.getDefaultInstance())) + .setSchemaDescriptor(new BigQueryStorageMethodDescriptorSupplier("SplitReadStream")) + .build(); + } + } + } + return getSplitReadStreamMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static BigQueryStorageStub newStub(io.grpc.Channel channel) { + return new BigQueryStorageStub(channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static BigQueryStorageBlockingStub newBlockingStub( + io.grpc.Channel channel) { + return new BigQueryStorageBlockingStub(channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static BigQueryStorageFutureStub newFutureStub( + io.grpc.Channel channel) { + return new BigQueryStorageFutureStub(channel); + } + + /** + *
+   * 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 responseObserver) { + asyncUnimplementedUnaryCall(getCreateReadSessionMethodHelper(), responseObserver); + } + + /** + *
+     * 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 responseObserver) { + asyncUnimplementedUnaryCall(getReadRowsMethodHelper(), responseObserver); + } + + /** + *
+     * 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 responseObserver) { + asyncUnimplementedUnaryCall(getBatchCreateReadSessionStreamsMethodHelper(), responseObserver); + } + + /** + *
+     * 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 responseObserver) { + asyncUnimplementedUnaryCall(getFinalizeStreamMethodHelper(), responseObserver); + } + + /** + *
+     * 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 responseObserver) { + asyncUnimplementedUnaryCall(getSplitReadStreamMethodHelper(), responseObserver); + } + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateReadSessionMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.bigquery.storage.v1beta1.Storage.CreateReadSessionRequest, + com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession>( + this, METHODID_CREATE_READ_SESSION))) + .addMethod( + getReadRowsMethodHelper(), + asyncServerStreamingCall( + new MethodHandlers< + com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsRequest, + com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsResponse>( + this, METHODID_READ_ROWS))) + .addMethod( + getBatchCreateReadSessionStreamsMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsRequest, + com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsResponse>( + this, METHODID_BATCH_CREATE_READ_SESSION_STREAMS))) + .addMethod( + getFinalizeStreamMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.bigquery.storage.v1beta1.Storage.FinalizeStreamRequest, + com.google.protobuf.Empty>( + this, METHODID_FINALIZE_STREAM))) + .addMethod( + getSplitReadStreamMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamRequest, + com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamResponse>( + this, METHODID_SPLIT_READ_STREAM))) + .build(); + } + } + + /** + *
+   * 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 { + private BigQueryStorageStub(io.grpc.Channel channel) { + super(channel); + } + + private BigQueryStorageStub(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected BigQueryStorageStub build(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + return new BigQueryStorageStub(channel, callOptions); + } + + /** + *
+     * 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 responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCreateReadSessionMethodHelper(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * 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 responseObserver) { + asyncServerStreamingCall( + getChannel().newCall(getReadRowsMethodHelper(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * 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 responseObserver) { + asyncUnaryCall( + getChannel().newCall(getBatchCreateReadSessionStreamsMethodHelper(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * 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 responseObserver) { + asyncUnaryCall( + getChannel().newCall(getFinalizeStreamMethodHelper(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * 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 responseObserver) { + asyncUnaryCall( + getChannel().newCall(getSplitReadStreamMethodHelper(), getCallOptions()), request, responseObserver); + } + } + + /** + *
+   * 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 { + private BigQueryStorageBlockingStub(io.grpc.Channel channel) { + super(channel); + } + + private BigQueryStorageBlockingStub(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected BigQueryStorageBlockingStub build(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + return new BigQueryStorageBlockingStub(channel, callOptions); + } + + /** + *
+     * 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 readRows( + com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsRequest request) { + return blockingServerStreamingCall( + getChannel(), getReadRowsMethodHelper(), getCallOptions(), request); + } + + /** + *
+     * 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 { + private BigQueryStorageFutureStub(io.grpc.Channel channel) { + super(channel); + } + + private BigQueryStorageFutureStub(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected BigQueryStorageFutureStub build(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + return new BigQueryStorageFutureStub(channel, callOptions); + } + + /** + *
+     * 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 createReadSession( + com.google.cloud.bigquery.storage.v1beta1.Storage.CreateReadSessionRequest request) { + return futureUnaryCall( + getChannel().newCall(getCreateReadSessionMethodHelper(), getCallOptions()), request); + } + + /** + *
+     * 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 batchCreateReadSessionStreams( + com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsRequest request) { + return futureUnaryCall( + getChannel().newCall(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.common.util.concurrent.ListenableFuture finalizeStream( + com.google.cloud.bigquery.storage.v1beta1.Storage.FinalizeStreamRequest request) { + return futureUnaryCall( + getChannel().newCall(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.common.util.concurrent.ListenableFuture splitReadStream( + com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamRequest request) { + return futureUnaryCall( + getChannel().newCall(getSplitReadStreamMethodHelper(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_READ_SESSION = 0; + private static final int METHODID_READ_ROWS = 1; + private static final int METHODID_BATCH_CREATE_READ_SESSION_STREAMS = 2; + private static final int METHODID_FINALIZE_STREAM = 3; + private static final int METHODID_SPLIT_READ_STREAM = 4; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final BigQueryStorageImplBase serviceImpl; + private final int methodId; + + MethodHandlers(BigQueryStorageImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CREATE_READ_SESSION: + serviceImpl.createReadSession((com.google.cloud.bigquery.storage.v1beta1.Storage.CreateReadSessionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_READ_ROWS: + serviceImpl.readRows((com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_BATCH_CREATE_READ_SESSION_STREAMS: + serviceImpl.batchCreateReadSessionStreams((com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_FINALIZE_STREAM: + serviceImpl.finalizeStream((com.google.cloud.bigquery.storage.v1beta1.Storage.FinalizeStreamRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SPLIT_READ_STREAM: + serviceImpl.splitReadStream((com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private static abstract class BigQueryStorageBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + BigQueryStorageBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.bigquery.storage.v1beta1.Storage.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("BigQueryStorage"); + } + } + + private static final class BigQueryStorageFileDescriptorSupplier + extends BigQueryStorageBaseDescriptorSupplier { + BigQueryStorageFileDescriptorSupplier() {} + } + + private static final class BigQueryStorageMethodDescriptorSupplier + extends BigQueryStorageBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + BigQueryStorageMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (BigQueryStorageGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new BigQueryStorageFileDescriptorSupplier()) + .addMethod(getCreateReadSessionMethodHelper()) + .addMethod(getReadRowsMethodHelper()) + .addMethod(getBatchCreateReadSessionStreamsMethodHelper()) + .addMethod(getFinalizeStreamMethodHelper()) + .addMethod(getSplitReadStreamMethodHelper()) + .build(); + } + } + } + return result; + } +} diff --git a/google-api-grpc/pom.xml b/google-api-grpc/pom.xml index 8b5f0ec2c1aa..17c7c89c1753 100644 --- a/google-api-grpc/pom.xml +++ b/google-api-grpc/pom.xml @@ -181,6 +181,16 @@ grpc-google-cloud-bigquerydatatransfer-v1 0.34.1-SNAPSHOT + + com.google.api.grpc + proto-google-cloud-bigquerystorage-v1beta1 + 0.34.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-bigquerystorage-v1beta1 + 0.34.1-SNAPSHOT + com.google.api.grpc proto-google-cloud-container-v1 @@ -613,6 +623,7 @@ grpc-google-cloud-asset-v1beta1 grpc-google-cloud-automl-v1beta1 grpc-google-cloud-bigquerydatatransfer-v1 + grpc-google-cloud-bigquerystorage-v1beta1 grpc-google-cloud-bigtable-admin-v2 grpc-google-cloud-bigtable-v2 grpc-google-cloud-container-v1 @@ -661,6 +672,7 @@ proto-google-cloud-asset-v1beta1 proto-google-cloud-automl-v1beta1 proto-google-cloud-bigquerydatatransfer-v1 + proto-google-cloud-bigquerystorage-v1beta1 proto-google-cloud-bigtable-admin-v2 proto-google-cloud-bigtable-v2 proto-google-cloud-container-v1 diff --git a/google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/LICENSE b/google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/LICENSE new file mode 100644 index 000000000000..a8ee855de2aa --- /dev/null +++ b/google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + https://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/build.gradle b/google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/build.gradle new file mode 100644 index 000000000000..9c6c7e7a3829 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/build.gradle @@ -0,0 +1,52 @@ +buildscript { + repositories { + mavenCentral() + } +} + +apply plugin: 'java' + +description = 'PROTO library for proto-google-cloud-bigquerystorage-v1beta1' +group = 'com.google.api.grpc' +version = '0.0.0-SNAPSHOT' +sourceCompatibility = 1.7 +targetCompatibility = 1.7 + +repositories { + mavenCentral() + mavenLocal() +} + +dependencies { + compile 'com.google.protobuf:protobuf-java:3.5.1' + compile 'com.google.api:api-common:1.6.0' + compile 'com.google.api.grpc:proto-google-common-protos:1.12.0' +} + +sourceSets { + main { + resources { + srcDir 'src/main/proto' + } + java { + srcDir 'src/main/java' + } + } +} + +task javadocJar(type: Jar) { + classifier = 'javadoc' + from javadoc +} + +task sourcesJar(type: Jar) { + classifier = 'sources' + from sourceSets.main.allSource +} + +artifacts { + archives javadocJar, sourcesJar +} + +compileJava.options.encoding = 'UTF-8' +javadoc.options.encoding = 'UTF-8' \ No newline at end of file diff --git a/google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/pom.xml b/google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/pom.xml new file mode 100644 index 000000000000..90cddbacd77d --- /dev/null +++ b/google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/pom.xml @@ -0,0 +1,31 @@ + + 4.0.0 + proto-google-cloud-bigquerystorage-v1beta1 + 0.34.1-SNAPSHOT + proto-google-cloud-bigquerystorage-v1beta1 + PROTO library for proto-google-cloud-bigquerystorage-v1beta1 + + com.google.api.grpc + google-api-grpc + 0.34.1-SNAPSHOT + + + + com.google.protobuf + protobuf-java + compile + + + com.google.api + api-common + compile + + + com.google.api.grpc + proto-google-common-protos + compile + + + \ No newline at end of file diff --git a/google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/src/main/java/com/google/cloud/bigquery/storage/v1beta1/AvroProto.java b/google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/src/main/java/com/google/cloud/bigquery/storage/v1beta1/AvroProto.java new file mode 100644 index 000000000000..01b814fd1cb6 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/src/main/java/com/google/cloud/bigquery/storage/v1beta1/AvroProto.java @@ -0,0 +1,1267 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/bigquery/storage/v1beta1/avro.proto + +package com.google.cloud.bigquery.storage.v1beta1; + +public final class AvroProto { + private AvroProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface AvroSchemaOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.storage.v1beta1.AvroSchema) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * 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 implements + // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.storage.v1beta1.AvroSchema) + com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchemaOrBuilder { + 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); + } + + // Construct using com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + schema_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.bigquery.storage.v1beta1.AvroProto.internal_static_google_cloud_bigquery_storage_v1beta1_AvroSchema_descriptor; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema getDefaultInstanceForType() { + return com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema build() { + com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema buildPartial() { + com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema result = new com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema(this); + result.schema_ = schema_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema) { + return mergeFrom((com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema other) { + if (other == com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema.getDefaultInstance()) return this; + if (!other.getSchema().isEmpty()) { + schema_ = other.schema_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private 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)) { + 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 + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AvroSchema parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AvroSchema(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface AvroRowsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.storage.v1beta1.AvroRows) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * 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 implements + // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.storage.v1beta1.AvroRows) + com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRowsOrBuilder { + 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); + } + + // Construct using com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + serializedBinaryRows_ = com.google.protobuf.ByteString.EMPTY; + + rowCount_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.bigquery.storage.v1beta1.AvroProto.internal_static_google_cloud_bigquery_storage_v1beta1_AvroRows_descriptor; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows getDefaultInstanceForType() { + return com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows build() { + com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows buildPartial() { + com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows result = new com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows(this); + result.serializedBinaryRows_ = serializedBinaryRows_; + result.rowCount_ = rowCount_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows) { + return mergeFrom((com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows other) { + if (other == com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows.getDefaultInstance()) return this; + if (other.getSerializedBinaryRows() != com.google.protobuf.ByteString.EMPTY) { + setSerializedBinaryRows(other.getSerializedBinaryRows()); + } + if (other.getRowCount() != 0L) { + setRowCount(other.getRowCount()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.ByteString serializedBinaryRows_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+       * 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 + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AvroRows parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AvroRows(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_bigquery_storage_v1beta1_AvroSchema_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_bigquery_storage_v1beta1_AvroSchema_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_bigquery_storage_v1beta1_AvroRows_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_bigquery_storage_v1beta1_AvroRows_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n0google/cloud/bigquery/storage/v1beta1/" + + "avro.proto\022%google.cloud.bigquery.storag" + + "e.v1beta1\"\034\n\nAvroSchema\022\016\n\006schema\030\001 \001(\t\"" + + "=\n\010AvroRows\022\036\n\026serialized_binary_rows\030\001 " + + "\001(\014\022\021\n\trow_count\030\002 \001(\003B\204\001\n)com.google.cl" + + "oud.bigquery.storage.v1beta1B\tAvroProtoZ" + + "Lgoogle.golang.org/genproto/googleapis/c" + + "loud/bigquery/storage/v1beta1;storageb\006p" + + "roto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_google_cloud_bigquery_storage_v1beta1_AvroSchema_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_bigquery_storage_v1beta1_AvroSchema_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_bigquery_storage_v1beta1_AvroSchema_descriptor, + new java.lang.String[] { "Schema", }); + internal_static_google_cloud_bigquery_storage_v1beta1_AvroRows_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_bigquery_storage_v1beta1_AvroRows_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_bigquery_storage_v1beta1_AvroRows_descriptor, + new java.lang.String[] { "SerializedBinaryRows", "RowCount", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/src/main/java/com/google/cloud/bigquery/storage/v1beta1/ReadOptions.java b/google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/src/main/java/com/google/cloud/bigquery/storage/v1beta1/ReadOptions.java new file mode 100644 index 000000000000..c0dc7b3e4f91 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/src/main/java/com/google/cloud/bigquery/storage/v1beta1/ReadOptions.java @@ -0,0 +1,1004 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/bigquery/storage/v1beta1/read_options.proto + +package com.google.cloud.bigquery.storage.v1beta1; + +public final class ReadOptions { + private ReadOptions() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface TableReadOptionsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.storage.v1beta1.TableReadOptions) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * 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 + getSelectedFieldsList(); + /** + *
+     * 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 implements + // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.storage.v1beta1.TableReadOptions) + com.google.cloud.bigquery.storage.v1beta1.ReadOptions.TableReadOptionsOrBuilder { + 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); + } + + // Construct using com.google.cloud.bigquery.storage.v1beta1.ReadOptions.TableReadOptions.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + selectedFields_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + rowRestriction_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.bigquery.storage.v1beta1.ReadOptions.internal_static_google_cloud_bigquery_storage_v1beta1_TableReadOptions_descriptor; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.ReadOptions.TableReadOptions getDefaultInstanceForType() { + return com.google.cloud.bigquery.storage.v1beta1.ReadOptions.TableReadOptions.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.ReadOptions.TableReadOptions build() { + com.google.cloud.bigquery.storage.v1beta1.ReadOptions.TableReadOptions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.ReadOptions.TableReadOptions buildPartial() { + com.google.cloud.bigquery.storage.v1beta1.ReadOptions.TableReadOptions result = new com.google.cloud.bigquery.storage.v1beta1.ReadOptions.TableReadOptions(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + selectedFields_ = selectedFields_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.selectedFields_ = selectedFields_; + result.rowRestriction_ = rowRestriction_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.bigquery.storage.v1beta1.ReadOptions.TableReadOptions) { + return mergeFrom((com.google.cloud.bigquery.storage.v1beta1.ReadOptions.TableReadOptions)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.bigquery.storage.v1beta1.ReadOptions.TableReadOptions other) { + if (other == com.google.cloud.bigquery.storage.v1beta1.ReadOptions.TableReadOptions.getDefaultInstance()) return this; + if (!other.selectedFields_.isEmpty()) { + if (selectedFields_.isEmpty()) { + selectedFields_ = other.selectedFields_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSelectedFieldsIsMutable(); + selectedFields_.addAll(other.selectedFields_); + } + onChanged(); + } + if (!other.getRowRestriction().isEmpty()) { + rowRestriction_ = other.rowRestriction_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.bigquery.storage.v1beta1.ReadOptions.TableReadOptions parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.bigquery.storage.v1beta1.ReadOptions.TableReadOptions) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringList selectedFields_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureSelectedFieldsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + selectedFields_ = new com.google.protobuf.LazyStringArrayList(selectedFields_); + bitField0_ |= 0x00000001; + } + } + /** + *
+       * 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 values) { + ensureSelectedFieldsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, selectedFields_); + 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 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 + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TableReadOptions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TableReadOptions(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.ReadOptions.TableReadOptions getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_bigquery_storage_v1beta1_TableReadOptions_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_bigquery_storage_v1beta1_TableReadOptions_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n8google/cloud/bigquery/storage/v1beta1/" + + "read_options.proto\022%google.cloud.bigquer" + + "y.storage.v1beta1\"D\n\020TableReadOptions\022\027\n" + + "\017selected_fields\030\001 \003(\t\022\027\n\017row_restrictio" + + "n\030\002 \001(\tBy\n)com.google.cloud.bigquery.sto" + + "rage.v1beta1ZLgoogle.golang.org/genproto" + + "/googleapis/cloud/bigquery/storage/v1bet" + + "a1;storageb\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_google_cloud_bigquery_storage_v1beta1_TableReadOptions_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_bigquery_storage_v1beta1_TableReadOptions_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_bigquery_storage_v1beta1_TableReadOptions_descriptor, + new java.lang.String[] { "SelectedFields", "RowRestriction", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/src/main/java/com/google/cloud/bigquery/storage/v1beta1/Storage.java b/google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/src/main/java/com/google/cloud/bigquery/storage/v1beta1/Storage.java new file mode 100644 index 000000000000..b5abc716ecac --- /dev/null +++ b/google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/src/main/java/com/google/cloud/bigquery/storage/v1beta1/Storage.java @@ -0,0 +1,12499 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/bigquery/storage/v1beta1/storage.proto + +package com.google.cloud.bigquery.storage.v1beta1; + +public final class Storage { + private Storage() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + /** + *
+   * 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 + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + DataFormat> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DataFormat findValueByNumber(int number) { + return DataFormat.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.bigquery.storage.v1beta1.Storage.getDescriptor().getEnumTypes().get(0); + } + + private static final DataFormat[] VALUES = values(); + + public static DataFormat valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DataFormat(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.bigquery.storage.v1beta1.DataFormat) + } + + public interface StreamOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.storage.v1beta1.Stream) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * 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 implements + // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.storage.v1beta1.Stream) + com.google.cloud.bigquery.storage.v1beta1.Storage.StreamOrBuilder { + 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); + } + + // Construct using com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + rowCount_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.bigquery.storage.v1beta1.Storage.internal_static_google_cloud_bigquery_storage_v1beta1_Stream_descriptor; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.Stream getDefaultInstanceForType() { + return com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.Stream build() { + com.google.cloud.bigquery.storage.v1beta1.Storage.Stream result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.Stream buildPartial() { + com.google.cloud.bigquery.storage.v1beta1.Storage.Stream result = new com.google.cloud.bigquery.storage.v1beta1.Storage.Stream(this); + result.name_ = name_; + result.rowCount_ = rowCount_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.bigquery.storage.v1beta1.Storage.Stream) { + return mergeFrom((com.google.cloud.bigquery.storage.v1beta1.Storage.Stream)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.bigquery.storage.v1beta1.Storage.Stream other) { + if (other == com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.getRowCount() != 0L) { + setRowCount(other.getRowCount()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.bigquery.storage.v1beta1.Storage.Stream parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.bigquery.storage.v1beta1.Storage.Stream) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private 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)) { + 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 + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Stream parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Stream(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.Stream getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface StreamPositionOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.storage.v1beta1.StreamPosition) + com.google.protobuf.MessageOrBuilder { + + /** + * .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 implements + // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.storage.v1beta1.StreamPosition) + com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPositionOrBuilder { + 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); + } + + // Construct using com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPosition.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (streamBuilder_ == null) { + stream_ = null; + } else { + stream_ = null; + streamBuilder_ = null; + } + offset_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.bigquery.storage.v1beta1.Storage.internal_static_google_cloud_bigquery_storage_v1beta1_StreamPosition_descriptor; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPosition getDefaultInstanceForType() { + return com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPosition.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPosition build() { + com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPosition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPosition buildPartial() { + com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPosition result = new com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPosition(this); + if (streamBuilder_ == null) { + result.stream_ = stream_; + } else { + result.stream_ = streamBuilder_.build(); + } + result.offset_ = offset_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPosition) { + return mergeFrom((com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPosition)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPosition other) { + if (other == com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPosition.getDefaultInstance()) return this; + if (other.hasStream()) { + mergeStream(other.getStream()); + } + if (other.getOffset() != 0L) { + setOffset(other.getOffset()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPosition parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPosition) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.bigquery.storage.v1beta1.Storage.Stream stream_ = 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> streamBuilder_; + /** + * .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 + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StreamPosition parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StreamPosition(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPosition getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ReadSessionOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.storage.v1beta1.ReadSession) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * 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 + getStreamsList(); + /** + *
+     * 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 + 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(); + mutable_bitField0_ |= 0x00000008; + } + streams_.add( + input.readMessage(com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.parser(), extensionRegistry)); + break; + } + case 42: { + com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema.Builder subBuilder = null; + if (schemaCase_ == 5) { + subBuilder = ((com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema) schema_).toBuilder(); + } + schema_ = + input.readMessage(com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema) schema_); + schema_ = subBuilder.buildPartial(); + } + schemaCase_ = 5; + break; + } + case 58: { + 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 66: { + 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; + } + 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_ & 0x00000008) == 0x00000008)) { + streams_ = java.util.Collections.unmodifiableList(streams_); + } + 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_ReadSession_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_ReadSession_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession.class, com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession.Builder.class); + } + + private int bitField0_; + private int schemaCase_ = 0; + private java.lang.Object schema_; + public enum SchemaCase + implements com.google.protobuf.Internal.EnumLite { + AVRO_SCHEMA(5), + SCHEMA_NOT_SET(0); + private final int value; + private SchemaCase(int value) { + this.value = value; + } + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SchemaCase valueOf(int value) { + return forNumber(value); + } + + public static SchemaCase forNumber(int value) { + switch (value) { + case 5: return AVRO_SCHEMA; + case 0: return SCHEMA_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public SchemaCase + getSchemaCase() { + return SchemaCase.forNumber( + schemaCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+     * 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_; + /** + *
+     * Streams associated with this session.
+     * 
+ * + * repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 4; + */ + public java.util.List getStreamsList() { + return streams_; + } + /** + *
+     * Streams associated with this session.
+     * 
+ * + * repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 4; + */ + public java.util.List + 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 implements + // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.storage.v1beta1.ReadSession) + com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSessionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.bigquery.storage.v1beta1.Storage.internal_static_google_cloud_bigquery_storage_v1beta1_ReadSession_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_ReadSession_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession.class, com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession.Builder.class); + } + + // Construct using com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getStreamsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (expireTimeBuilder_ == null) { + expireTime_ = null; + } else { + expireTime_ = null; + expireTimeBuilder_ = null; + } + if (streamsBuilder_ == null) { + streams_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + streamsBuilder_.clear(); + } + if (tableReferenceBuilder_ == null) { + tableReference_ = null; + } else { + tableReference_ = null; + tableReferenceBuilder_ = null; + } + if (tableModifiersBuilder_ == null) { + tableModifiers_ = null; + } else { + tableModifiers_ = null; + tableModifiersBuilder_ = null; + } + schemaCase_ = 0; + schema_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.bigquery.storage.v1beta1.Storage.internal_static_google_cloud_bigquery_storage_v1beta1_ReadSession_descriptor; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession getDefaultInstanceForType() { + return com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession build() { + com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession buildPartial() { + com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession result = new com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.name_ = name_; + if (expireTimeBuilder_ == null) { + result.expireTime_ = expireTime_; + } else { + result.expireTime_ = expireTimeBuilder_.build(); + } + if (schemaCase_ == 5) { + if (avroSchemaBuilder_ == null) { + result.schema_ = schema_; + } else { + result.schema_ = avroSchemaBuilder_.build(); + } + } + if (streamsBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008)) { + streams_ = java.util.Collections.unmodifiableList(streams_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.streams_ = streams_; + } else { + result.streams_ = streamsBuilder_.build(); + } + if (tableReferenceBuilder_ == null) { + result.tableReference_ = tableReference_; + } else { + result.tableReference_ = tableReferenceBuilder_.build(); + } + if (tableModifiersBuilder_ == null) { + result.tableModifiers_ = tableModifiers_; + } else { + result.tableModifiers_ = tableModifiersBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + result.schemaCase_ = schemaCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession) { + return mergeFrom((com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession other) { + if (other == com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasExpireTime()) { + mergeExpireTime(other.getExpireTime()); + } + if (streamsBuilder_ == null) { + if (!other.streams_.isEmpty()) { + if (streams_.isEmpty()) { + streams_ = other.streams_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureStreamsIsMutable(); + streams_.addAll(other.streams_); + } + onChanged(); + } + } else { + if (!other.streams_.isEmpty()) { + if (streamsBuilder_.isEmpty()) { + streamsBuilder_.dispose(); + streamsBuilder_ = null; + streams_ = other.streams_; + bitField0_ = (bitField0_ & ~0x00000008); + streamsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getStreamsFieldBuilder() : null; + } else { + streamsBuilder_.addAllMessages(other.streams_); + } + } + } + if (other.hasTableReference()) { + mergeTableReference(other.getTableReference()); + } + if (other.hasTableModifiers()) { + mergeTableModifiers(other.getTableModifiers()); + } + switch (other.getSchemaCase()) { + case AVRO_SCHEMA: { + mergeAvroSchema(other.getAvroSchema()); + break; + } + case SCHEMA_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int schemaCase_ = 0; + private java.lang.Object schema_; + public SchemaCase + getSchemaCase() { + return SchemaCase.forNumber( + schemaCase_); + } + + public Builder clearSchema() { + schemaCase_ = 0; + schema_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+       * 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_ = + java.util.Collections.emptyList(); + private void ensureStreamsIsMutable() { + if (!((bitField0_ & 0x00000008) == 0x00000008)) { + streams_ = new java.util.ArrayList(streams_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + 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> streamsBuilder_; + + /** + *
+       * Streams associated with this session.
+       * 
+ * + * repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 4; + */ + public java.util.List getStreamsList() { + if (streamsBuilder_ == null) { + return java.util.Collections.unmodifiableList(streams_); + } else { + return streamsBuilder_.getMessageList(); + } + } + /** + *
+       * 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 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 + 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 + getStreamsBuilderList() { + return getStreamsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + 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> + getStreamsFieldBuilder() { + if (streamsBuilder_ == null) { + streamsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + 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>( + streams_, + ((bitField0_ & 0x00000008) == 0x00000008), + getParentForChildren(), + isClean()); + streams_ = null; + } + return streamsBuilder_; + } + + private com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference tableReference_ = null; + 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> tableReferenceBuilder_; + /** + *
+       * 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 + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReadSession parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ReadSession(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface CreateReadSessionRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.storage.v1beta1.CreateReadSessionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * 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 implements + // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.storage.v1beta1.CreateReadSessionRequest) + com.google.cloud.bigquery.storage.v1beta1.Storage.CreateReadSessionRequestOrBuilder { + 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); + } + + // Construct using com.google.cloud.bigquery.storage.v1beta1.Storage.CreateReadSessionRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (tableReferenceBuilder_ == null) { + tableReference_ = null; + } else { + tableReference_ = null; + tableReferenceBuilder_ = null; + } + parent_ = ""; + + if (tableModifiersBuilder_ == null) { + tableModifiers_ = null; + } else { + tableModifiers_ = null; + tableModifiersBuilder_ = null; + } + requestedStreams_ = 0; + + if (readOptionsBuilder_ == null) { + readOptions_ = null; + } else { + readOptions_ = null; + readOptionsBuilder_ = null; + } + format_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.bigquery.storage.v1beta1.Storage.internal_static_google_cloud_bigquery_storage_v1beta1_CreateReadSessionRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.CreateReadSessionRequest getDefaultInstanceForType() { + return com.google.cloud.bigquery.storage.v1beta1.Storage.CreateReadSessionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.CreateReadSessionRequest build() { + com.google.cloud.bigquery.storage.v1beta1.Storage.CreateReadSessionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.CreateReadSessionRequest buildPartial() { + com.google.cloud.bigquery.storage.v1beta1.Storage.CreateReadSessionRequest result = new com.google.cloud.bigquery.storage.v1beta1.Storage.CreateReadSessionRequest(this); + if (tableReferenceBuilder_ == null) { + result.tableReference_ = tableReference_; + } else { + result.tableReference_ = tableReferenceBuilder_.build(); + } + result.parent_ = parent_; + if (tableModifiersBuilder_ == null) { + result.tableModifiers_ = tableModifiers_; + } else { + result.tableModifiers_ = tableModifiersBuilder_.build(); + } + result.requestedStreams_ = requestedStreams_; + if (readOptionsBuilder_ == null) { + result.readOptions_ = readOptions_; + } else { + result.readOptions_ = readOptionsBuilder_.build(); + } + result.format_ = format_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.bigquery.storage.v1beta1.Storage.CreateReadSessionRequest) { + return mergeFrom((com.google.cloud.bigquery.storage.v1beta1.Storage.CreateReadSessionRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.bigquery.storage.v1beta1.Storage.CreateReadSessionRequest other) { + if (other == com.google.cloud.bigquery.storage.v1beta1.Storage.CreateReadSessionRequest.getDefaultInstance()) return this; + if (other.hasTableReference()) { + mergeTableReference(other.getTableReference()); + } + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasTableModifiers()) { + mergeTableModifiers(other.getTableModifiers()); + } + if (other.getRequestedStreams() != 0) { + setRequestedStreams(other.getRequestedStreams()); + } + if (other.hasReadOptions()) { + mergeReadOptions(other.getReadOptions()); + } + if (other.format_ != 0) { + setFormatValue(other.getFormatValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.bigquery.storage.v1beta1.Storage.CreateReadSessionRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.bigquery.storage.v1beta1.Storage.CreateReadSessionRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference tableReference_ = null; + 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> tableReferenceBuilder_; + /** + *
+       * 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 + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateReadSessionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateReadSessionRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.CreateReadSessionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ReadRowsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.storage.v1beta1.ReadRowsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * 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 implements + // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.storage.v1beta1.ReadRowsRequest) + com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsRequestOrBuilder { + 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); + } + + // Construct using com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (readPositionBuilder_ == null) { + readPosition_ = null; + } else { + readPosition_ = null; + readPositionBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.bigquery.storage.v1beta1.Storage.internal_static_google_cloud_bigquery_storage_v1beta1_ReadRowsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsRequest getDefaultInstanceForType() { + return com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsRequest build() { + com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsRequest buildPartial() { + com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsRequest result = new com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsRequest(this); + if (readPositionBuilder_ == null) { + result.readPosition_ = readPosition_; + } else { + result.readPosition_ = readPositionBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsRequest) { + return mergeFrom((com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsRequest other) { + if (other == com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsRequest.getDefaultInstance()) return this; + if (other.hasReadPosition()) { + mergeReadPosition(other.getReadPosition()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPosition readPosition_ = null; + 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> readPositionBuilder_; + /** + *
+       * 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 + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReadRowsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ReadRowsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface StreamStatusOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.storage.v1beta1.StreamStatus) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * 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 implements + // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.storage.v1beta1.StreamStatus) + com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatusOrBuilder { + 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); + } + + // Construct using com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + estimatedRowCount_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.bigquery.storage.v1beta1.Storage.internal_static_google_cloud_bigquery_storage_v1beta1_StreamStatus_descriptor; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus getDefaultInstanceForType() { + return com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus build() { + com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus buildPartial() { + com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus result = new com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus(this); + result.estimatedRowCount_ = estimatedRowCount_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus) { + return mergeFrom((com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus other) { + if (other == com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus.getDefaultInstance()) return this; + if (other.getEstimatedRowCount() != 0L) { + setEstimatedRowCount(other.getEstimatedRowCount()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + 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_; + } + /** + *
+       * 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 + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StreamStatus parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StreamStatus(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.StreamStatus getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ThrottleStatusOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.storage.v1beta1.ThrottleStatus) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * 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 implements + // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.storage.v1beta1.ThrottleStatus) + com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatusOrBuilder { + 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); + } + + // Construct using com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + throttlePercent_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.bigquery.storage.v1beta1.Storage.internal_static_google_cloud_bigquery_storage_v1beta1_ThrottleStatus_descriptor; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus getDefaultInstanceForType() { + return com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus build() { + com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus buildPartial() { + com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus result = new com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus(this); + result.throttlePercent_ = throttlePercent_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus) { + return mergeFrom((com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus other) { + if (other == com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus.getDefaultInstance()) return this; + if (other.getThrottlePercent() != 0) { + setThrottlePercent(other.getThrottlePercent()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + 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_; + } + /** + *
+       * 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 + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ThrottleStatus parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ThrottleStatus(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.ThrottleStatus getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ReadRowsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.storage.v1beta1.ReadRowsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * 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 implements + // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.storage.v1beta1.ReadRowsResponse) + com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsResponseOrBuilder { + 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); + } + + // Construct using com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (statusBuilder_ == null) { + status_ = null; + } else { + status_ = null; + statusBuilder_ = null; + } + if (throttleStatusBuilder_ == null) { + throttleStatus_ = null; + } else { + throttleStatus_ = null; + throttleStatusBuilder_ = null; + } + rowsCase_ = 0; + rows_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.bigquery.storage.v1beta1.Storage.internal_static_google_cloud_bigquery_storage_v1beta1_ReadRowsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsResponse getDefaultInstanceForType() { + return com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsResponse build() { + com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsResponse buildPartial() { + com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsResponse result = new com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsResponse(this); + if (rowsCase_ == 3) { + if (avroRowsBuilder_ == null) { + result.rows_ = rows_; + } else { + result.rows_ = avroRowsBuilder_.build(); + } + } + if (statusBuilder_ == null) { + result.status_ = status_; + } else { + result.status_ = statusBuilder_.build(); + } + if (throttleStatusBuilder_ == null) { + result.throttleStatus_ = throttleStatus_; + } else { + result.throttleStatus_ = throttleStatusBuilder_.build(); + } + result.rowsCase_ = rowsCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsResponse) { + return mergeFrom((com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsResponse other) { + if (other == com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsResponse.getDefaultInstance()) return this; + if (other.hasStatus()) { + mergeStatus(other.getStatus()); + } + if (other.hasThrottleStatus()) { + mergeThrottleStatus(other.getThrottleStatus()); + } + switch (other.getRowsCase()) { + case AVRO_ROWS: { + mergeAvroRows(other.getAvroRows()); + break; + } + case ROWS_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int rowsCase_ = 0; + private java.lang.Object rows_; + public RowsCase + getRowsCase() { + return RowsCase.forNumber( + rowsCase_); + } + + public Builder clearRows() { + rowsCase_ = 0; + rows_ = null; + onChanged(); + return this; + } + + + 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> avroRowsBuilder_; + /** + *
+       * 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 + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReadRowsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ReadRowsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface BatchCreateReadSessionStreamsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.storage.v1beta1.BatchCreateReadSessionStreamsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * 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 implements + // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.storage.v1beta1.BatchCreateReadSessionStreamsRequest) + com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsRequestOrBuilder { + 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); + } + + // Construct using com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (sessionBuilder_ == null) { + session_ = null; + } else { + session_ = null; + sessionBuilder_ = null; + } + requestedStreams_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.bigquery.storage.v1beta1.Storage.internal_static_google_cloud_bigquery_storage_v1beta1_BatchCreateReadSessionStreamsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsRequest getDefaultInstanceForType() { + return com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsRequest build() { + com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsRequest buildPartial() { + com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsRequest result = new com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsRequest(this); + if (sessionBuilder_ == null) { + result.session_ = session_; + } else { + result.session_ = sessionBuilder_.build(); + } + result.requestedStreams_ = requestedStreams_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsRequest) { + return mergeFrom((com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsRequest other) { + if (other == com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsRequest.getDefaultInstance()) return this; + if (other.hasSession()) { + mergeSession(other.getSession()); + } + if (other.getRequestedStreams() != 0) { + setRequestedStreams(other.getRequestedStreams()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession session_ = null; + 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> sessionBuilder_; + /** + *
+       * 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 + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchCreateReadSessionStreamsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchCreateReadSessionStreamsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface BatchCreateReadSessionStreamsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.storage.v1beta1.BatchCreateReadSessionStreamsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Newly added streams.
+     * 
+ * + * repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 1; + */ + java.util.List + getStreamsList(); + /** + *
+     * 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 + 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(); + mutable_bitField0_ |= 0x00000001; + } + streams_.add( + input.readMessage(com.google.cloud.bigquery.storage.v1beta1.Storage.Stream.parser(), extensionRegistry)); + 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)) { + streams_ = java.util.Collections.unmodifiableList(streams_); + } + 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_BatchCreateReadSessionStreamsResponse_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_BatchCreateReadSessionStreamsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsResponse.class, com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsResponse.Builder.class); + } + + public static final int STREAMS_FIELD_NUMBER = 1; + private java.util.List streams_; + /** + *
+     * Newly added streams.
+     * 
+ * + * repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 1; + */ + public java.util.List getStreamsList() { + return streams_; + } + /** + *
+     * Newly added streams.
+     * 
+ * + * repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 1; + */ + public java.util.List + 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 implements + // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.storage.v1beta1.BatchCreateReadSessionStreamsResponse) + com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.bigquery.storage.v1beta1.Storage.internal_static_google_cloud_bigquery_storage_v1beta1_BatchCreateReadSessionStreamsResponse_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_BatchCreateReadSessionStreamsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsResponse.class, com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsResponse.Builder.class); + } + + // Construct using com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getStreamsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (streamsBuilder_ == null) { + streams_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + streamsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.bigquery.storage.v1beta1.Storage.internal_static_google_cloud_bigquery_storage_v1beta1_BatchCreateReadSessionStreamsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsResponse getDefaultInstanceForType() { + return com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsResponse build() { + com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsResponse buildPartial() { + com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsResponse result = new com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsResponse(this); + int from_bitField0_ = bitField0_; + if (streamsBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + streams_ = java.util.Collections.unmodifiableList(streams_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.streams_ = streams_; + } else { + result.streams_ = streamsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsResponse) { + return mergeFrom((com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsResponse other) { + if (other == com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsResponse.getDefaultInstance()) return this; + if (streamsBuilder_ == null) { + if (!other.streams_.isEmpty()) { + if (streams_.isEmpty()) { + streams_ = other.streams_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureStreamsIsMutable(); + streams_.addAll(other.streams_); + } + onChanged(); + } + } else { + if (!other.streams_.isEmpty()) { + if (streamsBuilder_.isEmpty()) { + streamsBuilder_.dispose(); + streamsBuilder_ = null; + streams_ = other.streams_; + bitField0_ = (bitField0_ & ~0x00000001); + streamsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getStreamsFieldBuilder() : null; + } else { + streamsBuilder_.addAllMessages(other.streams_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List streams_ = + java.util.Collections.emptyList(); + private void ensureStreamsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + streams_ = new java.util.ArrayList(streams_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + 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> streamsBuilder_; + + /** + *
+       * Newly added streams.
+       * 
+ * + * repeated .google.cloud.bigquery.storage.v1beta1.Stream streams = 1; + */ + public java.util.List getStreamsList() { + if (streamsBuilder_ == null) { + return java.util.Collections.unmodifiableList(streams_); + } else { + return streamsBuilder_.getMessageList(); + } + } + /** + *
+       * 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 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 + 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 + getStreamsBuilderList() { + return getStreamsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + 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> + getStreamsFieldBuilder() { + if (streamsBuilder_ == null) { + streamsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + 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>( + streams_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + streams_ = null; + } + return streamsBuilder_; + } + @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.BatchCreateReadSessionStreamsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.bigquery.storage.v1beta1.BatchCreateReadSessionStreamsResponse) + private static final com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsResponse(); + } + + public static com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchCreateReadSessionStreamsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchCreateReadSessionStreamsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.BatchCreateReadSessionStreamsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface FinalizeStreamRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.storage.v1beta1.FinalizeStreamRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * 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 implements + // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.storage.v1beta1.FinalizeStreamRequest) + com.google.cloud.bigquery.storage.v1beta1.Storage.FinalizeStreamRequestOrBuilder { + 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); + } + + // Construct using com.google.cloud.bigquery.storage.v1beta1.Storage.FinalizeStreamRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (streamBuilder_ == null) { + stream_ = null; + } else { + stream_ = null; + streamBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.bigquery.storage.v1beta1.Storage.internal_static_google_cloud_bigquery_storage_v1beta1_FinalizeStreamRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.FinalizeStreamRequest getDefaultInstanceForType() { + return com.google.cloud.bigquery.storage.v1beta1.Storage.FinalizeStreamRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.FinalizeStreamRequest build() { + com.google.cloud.bigquery.storage.v1beta1.Storage.FinalizeStreamRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.FinalizeStreamRequest buildPartial() { + com.google.cloud.bigquery.storage.v1beta1.Storage.FinalizeStreamRequest result = new com.google.cloud.bigquery.storage.v1beta1.Storage.FinalizeStreamRequest(this); + if (streamBuilder_ == null) { + result.stream_ = stream_; + } else { + result.stream_ = streamBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.bigquery.storage.v1beta1.Storage.FinalizeStreamRequest) { + return mergeFrom((com.google.cloud.bigquery.storage.v1beta1.Storage.FinalizeStreamRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.bigquery.storage.v1beta1.Storage.FinalizeStreamRequest other) { + if (other == com.google.cloud.bigquery.storage.v1beta1.Storage.FinalizeStreamRequest.getDefaultInstance()) return this; + if (other.hasStream()) { + mergeStream(other.getStream()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.bigquery.storage.v1beta1.Storage.FinalizeStreamRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.bigquery.storage.v1beta1.Storage.FinalizeStreamRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.bigquery.storage.v1beta1.Storage.Stream stream_ = 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> streamBuilder_; + /** + *
+       * 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 + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FinalizeStreamRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FinalizeStreamRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.FinalizeStreamRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SplitReadStreamRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.storage.v1beta1.SplitReadStreamRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * 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 implements + // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.storage.v1beta1.SplitReadStreamRequest) + com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamRequestOrBuilder { + 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); + } + + // Construct using com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (originalStreamBuilder_ == null) { + originalStream_ = null; + } else { + originalStream_ = null; + originalStreamBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.bigquery.storage.v1beta1.Storage.internal_static_google_cloud_bigquery_storage_v1beta1_SplitReadStreamRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamRequest getDefaultInstanceForType() { + return com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamRequest build() { + com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamRequest buildPartial() { + com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamRequest result = new com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamRequest(this); + if (originalStreamBuilder_ == null) { + result.originalStream_ = originalStream_; + } else { + result.originalStream_ = originalStreamBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamRequest) { + return mergeFrom((com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamRequest other) { + if (other == com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamRequest.getDefaultInstance()) return this; + if (other.hasOriginalStream()) { + mergeOriginalStream(other.getOriginalStream()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.bigquery.storage.v1beta1.Storage.Stream originalStream_ = 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> originalStreamBuilder_; + /** + *
+       * 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 + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SplitReadStreamRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SplitReadStreamRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SplitReadStreamResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.storage.v1beta1.SplitReadStreamResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * 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 implements + // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.storage.v1beta1.SplitReadStreamResponse) + com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamResponseOrBuilder { + 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); + } + + // Construct using com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (primaryStreamBuilder_ == null) { + primaryStream_ = null; + } else { + primaryStream_ = null; + primaryStreamBuilder_ = null; + } + if (remainderStreamBuilder_ == null) { + remainderStream_ = null; + } else { + remainderStream_ = null; + remainderStreamBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.bigquery.storage.v1beta1.Storage.internal_static_google_cloud_bigquery_storage_v1beta1_SplitReadStreamResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamResponse getDefaultInstanceForType() { + return com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamResponse build() { + com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamResponse buildPartial() { + com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamResponse result = new com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamResponse(this); + if (primaryStreamBuilder_ == null) { + result.primaryStream_ = primaryStream_; + } else { + result.primaryStream_ = primaryStreamBuilder_.build(); + } + if (remainderStreamBuilder_ == null) { + result.remainderStream_ = remainderStream_; + } else { + result.remainderStream_ = remainderStreamBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamResponse) { + return mergeFrom((com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamResponse other) { + if (other == com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamResponse.getDefaultInstance()) return this; + if (other.hasPrimaryStream()) { + mergePrimaryStream(other.getPrimaryStream()); + } + if (other.hasRemainderStream()) { + mergeRemainderStream(other.getRemainderStream()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.bigquery.storage.v1beta1.Storage.Stream primaryStream_ = 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> primaryStreamBuilder_; + /** + *
+       * 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 + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SplitReadStreamResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SplitReadStreamResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.Storage.SplitReadStreamResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_bigquery_storage_v1beta1_Stream_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_bigquery_storage_v1beta1_Stream_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_bigquery_storage_v1beta1_StreamPosition_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_bigquery_storage_v1beta1_StreamPosition_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_bigquery_storage_v1beta1_ReadSession_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_bigquery_storage_v1beta1_ReadSession_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_bigquery_storage_v1beta1_CreateReadSessionRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_bigquery_storage_v1beta1_CreateReadSessionRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_bigquery_storage_v1beta1_ReadRowsRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_bigquery_storage_v1beta1_ReadRowsRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_bigquery_storage_v1beta1_StreamStatus_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_bigquery_storage_v1beta1_StreamStatus_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_bigquery_storage_v1beta1_ThrottleStatus_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_bigquery_storage_v1beta1_ThrottleStatus_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_bigquery_storage_v1beta1_ReadRowsResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_bigquery_storage_v1beta1_ReadRowsResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_bigquery_storage_v1beta1_BatchCreateReadSessionStreamsRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_bigquery_storage_v1beta1_BatchCreateReadSessionStreamsRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_bigquery_storage_v1beta1_BatchCreateReadSessionStreamsResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_bigquery_storage_v1beta1_BatchCreateReadSessionStreamsResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_bigquery_storage_v1beta1_FinalizeStreamRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_bigquery_storage_v1beta1_FinalizeStreamRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_bigquery_storage_v1beta1_SplitReadStreamRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_bigquery_storage_v1beta1_SplitReadStreamRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_bigquery_storage_v1beta1_SplitReadStreamResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_bigquery_storage_v1beta1_SplitReadStreamResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n3google/cloud/bigquery/storage/v1beta1/" + + "storage.proto\022%google.cloud.bigquery.sto" + + "rage.v1beta1\0320google/cloud/bigquery/stor" + + "age/v1beta1/avro.proto\0328google/cloud/big" + + "query/storage/v1beta1/read_options.proto" + + "\032;google/cloud/bigquery/storage/v1beta1/" + + "table_reference.proto\032\033google/protobuf/e" + + "mpty.proto\032\037google/protobuf/timestamp.pr" + + "oto\")\n\006Stream\022\014\n\004name\030\001 \001(\t\022\021\n\trow_count" + + "\030\002 \001(\003\"_\n\016StreamPosition\022=\n\006stream\030\001 \001(\013" + + "2-.google.cloud.bigquery.storage.v1beta1" + + ".Stream\022\016\n\006offset\030\002 \001(\003\"\200\003\n\013ReadSession\022" + + "\014\n\004name\030\001 \001(\t\022/\n\013expire_time\030\002 \001(\0132\032.goo" + + "gle.protobuf.Timestamp\022H\n\013avro_schema\030\005 " + + "\001(\01321.google.cloud.bigquery.storage.v1be" + + "ta1.AvroSchemaH\000\022>\n\007streams\030\004 \003(\0132-.goog" + + "le.cloud.bigquery.storage.v1beta1.Stream" + + "\022N\n\017table_reference\030\007 \001(\01325.google.cloud" + + ".bigquery.storage.v1beta1.TableReference" + + "\022N\n\017table_modifiers\030\010 \001(\01325.google.cloud" + + ".bigquery.storage.v1beta1.TableModifiers" + + "B\010\n\006schema\"\367\002\n\030CreateReadSessionRequest\022" + + "N\n\017table_reference\030\001 \001(\01325.google.cloud." + + "bigquery.storage.v1beta1.TableReference\022" + + "\016\n\006parent\030\006 \001(\t\022N\n\017table_modifiers\030\002 \001(\013" + + "25.google.cloud.bigquery.storage.v1beta1" + + ".TableModifiers\022\031\n\021requested_streams\030\003 \001" + + "(\005\022M\n\014read_options\030\004 \001(\01327.google.cloud." + + "bigquery.storage.v1beta1.TableReadOption" + + "s\022A\n\006format\030\005 \001(\01621.google.cloud.bigquer" + + "y.storage.v1beta1.DataFormat\"_\n\017ReadRows" + + "Request\022L\n\rread_position\030\001 \001(\01325.google." + + "cloud.bigquery.storage.v1beta1.StreamPos" + + "ition\"+\n\014StreamStatus\022\033\n\023estimated_row_c" + + "ount\030\001 \001(\003\"*\n\016ThrottleStatus\022\030\n\020throttle" + + "_percent\030\001 \001(\005\"\365\001\n\020ReadRowsResponse\022D\n\ta" + + "vro_rows\030\003 \001(\0132/.google.cloud.bigquery.s" + + "torage.v1beta1.AvroRowsH\000\022C\n\006status\030\002 \001(" + + "\01323.google.cloud.bigquery.storage.v1beta" + + "1.StreamStatus\022N\n\017throttle_status\030\005 \001(\0132" + + "5.google.cloud.bigquery.storage.v1beta1." + + "ThrottleStatusB\006\n\004rows\"\206\001\n$BatchCreateRe" + + "adSessionStreamsRequest\022C\n\007session\030\001 \001(\013" + + "22.google.cloud.bigquery.storage.v1beta1" + + ".ReadSession\022\031\n\021requested_streams\030\002 \001(\005\"" + + "g\n%BatchCreateReadSessionStreamsResponse" + + "\022>\n\007streams\030\001 \003(\0132-.google.cloud.bigquer" + + "y.storage.v1beta1.Stream\"V\n\025FinalizeStre" + + "amRequest\022=\n\006stream\030\002 \001(\0132-.google.cloud" + + ".bigquery.storage.v1beta1.Stream\"`\n\026Spli" + + "tReadStreamRequest\022F\n\017original_stream\030\001 " + + "\001(\0132-.google.cloud.bigquery.storage.v1be" + + "ta1.Stream\"\251\001\n\027SplitReadStreamResponse\022E" + + "\n\016primary_stream\030\001 \001(\0132-.google.cloud.bi" + + "gquery.storage.v1beta1.Stream\022G\n\020remaind" + + "er_stream\030\002 \001(\0132-.google.cloud.bigquery." + + "storage.v1beta1.Stream*3\n\nDataFormat\022\033\n\027" + + "DATA_FORMAT_UNSPECIFIED\020\000\022\010\n\004AVRO\020\0012\335\005\n\017" + + "BigQueryStorage\022\212\001\n\021CreateReadSession\022?." + + "google.cloud.bigquery.storage.v1beta1.Cr" + + "eateReadSessionRequest\0322.google.cloud.bi" + + "gquery.storage.v1beta1.ReadSession\"\000\022\177\n\010" + + "ReadRows\0226.google.cloud.bigquery.storage" + + ".v1beta1.ReadRowsRequest\0327.google.cloud." + + "bigquery.storage.v1beta1.ReadRowsRespons" + + "e\"\0000\001\022\274\001\n\035BatchCreateReadSessionStreams\022" + + "K.google.cloud.bigquery.storage.v1beta1." + + "BatchCreateReadSessionStreamsRequest\032L.g" + + "oogle.cloud.bigquery.storage.v1beta1.Bat" + + "chCreateReadSessionStreamsResponse\"\000\022h\n\016" + + "FinalizeStream\022<.google.cloud.bigquery.s" + + "torage.v1beta1.FinalizeStreamRequest\032\026.g" + + "oogle.protobuf.Empty\"\000\022\222\001\n\017SplitReadStre" + + "am\022=.google.cloud.bigquery.storage.v1bet" + + "a1.SplitReadStreamRequest\032>.google.cloud" + + ".bigquery.storage.v1beta1.SplitReadStrea" + + "mResponse\"\000By\n)com.google.cloud.bigquery" + + ".storage.v1beta1ZLgoogle.golang.org/genp" + + "roto/googleapis/cloud/bigquery/storage/v" + + "1beta1;storageb\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.cloud.bigquery.storage.v1beta1.AvroProto.getDescriptor(), + com.google.cloud.bigquery.storage.v1beta1.ReadOptions.getDescriptor(), + com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }, assigner); + internal_static_google_cloud_bigquery_storage_v1beta1_Stream_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_bigquery_storage_v1beta1_Stream_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_bigquery_storage_v1beta1_Stream_descriptor, + new java.lang.String[] { "Name", "RowCount", }); + internal_static_google_cloud_bigquery_storage_v1beta1_StreamPosition_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_bigquery_storage_v1beta1_StreamPosition_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_bigquery_storage_v1beta1_StreamPosition_descriptor, + new java.lang.String[] { "Stream", "Offset", }); + internal_static_google_cloud_bigquery_storage_v1beta1_ReadSession_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_bigquery_storage_v1beta1_ReadSession_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_bigquery_storage_v1beta1_ReadSession_descriptor, + new java.lang.String[] { "Name", "ExpireTime", "AvroSchema", "Streams", "TableReference", "TableModifiers", "Schema", }); + internal_static_google_cloud_bigquery_storage_v1beta1_CreateReadSessionRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_bigquery_storage_v1beta1_CreateReadSessionRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_bigquery_storage_v1beta1_CreateReadSessionRequest_descriptor, + new java.lang.String[] { "TableReference", "Parent", "TableModifiers", "RequestedStreams", "ReadOptions", "Format", }); + internal_static_google_cloud_bigquery_storage_v1beta1_ReadRowsRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_bigquery_storage_v1beta1_ReadRowsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_bigquery_storage_v1beta1_ReadRowsRequest_descriptor, + new java.lang.String[] { "ReadPosition", }); + internal_static_google_cloud_bigquery_storage_v1beta1_StreamStatus_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_bigquery_storage_v1beta1_StreamStatus_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_bigquery_storage_v1beta1_StreamStatus_descriptor, + new java.lang.String[] { "EstimatedRowCount", }); + internal_static_google_cloud_bigquery_storage_v1beta1_ThrottleStatus_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_bigquery_storage_v1beta1_ThrottleStatus_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_bigquery_storage_v1beta1_ThrottleStatus_descriptor, + new java.lang.String[] { "ThrottlePercent", }); + internal_static_google_cloud_bigquery_storage_v1beta1_ReadRowsResponse_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_bigquery_storage_v1beta1_ReadRowsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_bigquery_storage_v1beta1_ReadRowsResponse_descriptor, + new java.lang.String[] { "AvroRows", "Status", "ThrottleStatus", "Rows", }); + internal_static_google_cloud_bigquery_storage_v1beta1_BatchCreateReadSessionStreamsRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_bigquery_storage_v1beta1_BatchCreateReadSessionStreamsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_bigquery_storage_v1beta1_BatchCreateReadSessionStreamsRequest_descriptor, + new java.lang.String[] { "Session", "RequestedStreams", }); + internal_static_google_cloud_bigquery_storage_v1beta1_BatchCreateReadSessionStreamsResponse_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_bigquery_storage_v1beta1_BatchCreateReadSessionStreamsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_bigquery_storage_v1beta1_BatchCreateReadSessionStreamsResponse_descriptor, + new java.lang.String[] { "Streams", }); + internal_static_google_cloud_bigquery_storage_v1beta1_FinalizeStreamRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_bigquery_storage_v1beta1_FinalizeStreamRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_bigquery_storage_v1beta1_FinalizeStreamRequest_descriptor, + new java.lang.String[] { "Stream", }); + internal_static_google_cloud_bigquery_storage_v1beta1_SplitReadStreamRequest_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_bigquery_storage_v1beta1_SplitReadStreamRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_bigquery_storage_v1beta1_SplitReadStreamRequest_descriptor, + new java.lang.String[] { "OriginalStream", }); + internal_static_google_cloud_bigquery_storage_v1beta1_SplitReadStreamResponse_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_bigquery_storage_v1beta1_SplitReadStreamResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_bigquery_storage_v1beta1_SplitReadStreamResponse_descriptor, + new java.lang.String[] { "PrimaryStream", "RemainderStream", }); + com.google.cloud.bigquery.storage.v1beta1.AvroProto.getDescriptor(); + com.google.cloud.bigquery.storage.v1beta1.ReadOptions.getDescriptor(); + com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/src/main/java/com/google/cloud/bigquery/storage/v1beta1/TableReferenceProto.java b/google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/src/main/java/com/google/cloud/bigquery/storage/v1beta1/TableReferenceProto.java new file mode 100644 index 000000000000..6a6b549adb22 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/src/main/java/com/google/cloud/bigquery/storage/v1beta1/TableReferenceProto.java @@ -0,0 +1,1692 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/bigquery/storage/v1beta1/table_reference.proto + +package com.google.cloud.bigquery.storage.v1beta1; + +public final class TableReferenceProto { + private TableReferenceProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface TableReferenceOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.storage.v1beta1.TableReference) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * 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 implements + // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.storage.v1beta1.TableReference) + com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReferenceOrBuilder { + 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); + } + + // Construct using com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + projectId_ = ""; + + datasetId_ = ""; + + tableId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.internal_static_google_cloud_bigquery_storage_v1beta1_TableReference_descriptor; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference getDefaultInstanceForType() { + return com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference build() { + com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference buildPartial() { + com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference result = new com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference(this); + result.projectId_ = projectId_; + result.datasetId_ = datasetId_; + result.tableId_ = tableId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference) { + return mergeFrom((com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference other) { + if (other == com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference.getDefaultInstance()) return this; + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + onChanged(); + } + if (!other.getDatasetId().isEmpty()) { + datasetId_ = other.datasetId_; + onChanged(); + } + if (!other.getTableId().isEmpty()) { + tableId_ = other.tableId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private 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)) { + 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 + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TableReference parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TableReference(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface TableModifiersOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.storage.v1beta1.TableModifiers) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * 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 implements + // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.storage.v1beta1.TableModifiers) + com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiersOrBuilder { + 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); + } + + // Construct using com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (snapshotTimeBuilder_ == null) { + snapshotTime_ = null; + } else { + snapshotTime_ = null; + snapshotTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.internal_static_google_cloud_bigquery_storage_v1beta1_TableModifiers_descriptor; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers getDefaultInstanceForType() { + return com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers build() { + com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers buildPartial() { + com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers result = new com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers(this); + if (snapshotTimeBuilder_ == null) { + result.snapshotTime_ = snapshotTime_; + } else { + result.snapshotTime_ = snapshotTimeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers) { + return mergeFrom((com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers other) { + if (other == com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers.getDefaultInstance()) return this; + if (other.hasSnapshotTime()) { + mergeSnapshotTime(other.getSnapshotTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.Timestamp snapshotTime_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> snapshotTimeBuilder_; + /** + *
+       * 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.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TableModifiers parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TableModifiers(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableModifiers getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_bigquery_storage_v1beta1_TableReference_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_bigquery_storage_v1beta1_TableReference_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_bigquery_storage_v1beta1_TableModifiers_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_bigquery_storage_v1beta1_TableModifiers_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n;google/cloud/bigquery/storage/v1beta1/" + + "table_reference.proto\022%google.cloud.bigq" + + "uery.storage.v1beta1\032\037google/protobuf/ti" + + "mestamp.proto\"J\n\016TableReference\022\022\n\nproje" + + "ct_id\030\001 \001(\t\022\022\n\ndataset_id\030\002 \001(\t\022\020\n\010table" + + "_id\030\003 \001(\t\"C\n\016TableModifiers\0221\n\rsnapshot_" + + "time\030\001 \001(\0132\032.google.protobuf.TimestampB\216" + + "\001\n)com.google.cloud.bigquery.storage.v1b" + + "eta1B\023TableReferenceProtoZLgoogle.golang" + + ".org/genproto/googleapis/cloud/bigquery/" + + "storage/v1beta1;storageb\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.TimestampProto.getDescriptor(), + }, assigner); + internal_static_google_cloud_bigquery_storage_v1beta1_TableReference_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_bigquery_storage_v1beta1_TableReference_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_bigquery_storage_v1beta1_TableReference_descriptor, + new java.lang.String[] { "ProjectId", "DatasetId", "TableId", }); + internal_static_google_cloud_bigquery_storage_v1beta1_TableModifiers_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_bigquery_storage_v1beta1_TableModifiers_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_bigquery_storage_v1beta1_TableModifiers_descriptor, + new java.lang.String[] { "SnapshotTime", }); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/src/main/proto/google/cloud/bigquery/storage/v1beta1/avro.proto b/google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/src/main/proto/google/cloud/bigquery/storage/v1beta1/avro.proto new file mode 100644 index 000000000000..b75de8f266f1 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/src/main/proto/google/cloud/bigquery/storage/v1beta1/avro.proto @@ -0,0 +1,39 @@ +// 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 +// +// http://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. +// + +syntax = "proto3"; + +package google.cloud.bigquery.storage.v1beta1; + +option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1beta1;storage"; +option java_outer_classname = "AvroProto"; +option java_package = "com.google.cloud.bigquery.storage.v1beta1"; + + +// Avro schema. +message AvroSchema { + // Json serialized schema, as described at + // https://avro.apache.org/docs/1.8.1/spec.html + string schema = 1; +} + +// Avro rows. +message AvroRows { + // Binary serialized rows in a block. + bytes serialized_binary_rows = 1; + + // The count of rows in the returning block. + int64 row_count = 2; +} diff --git a/google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/src/main/proto/google/cloud/bigquery/storage/v1beta1/read_options.proto b/google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/src/main/proto/google/cloud/bigquery/storage/v1beta1/read_options.proto new file mode 100644 index 000000000000..84307ce475e9 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/src/main/proto/google/cloud/bigquery/storage/v1beta1/read_options.proto @@ -0,0 +1,39 @@ +// 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 +// +// http://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. +// + +syntax = "proto3"; + +package google.cloud.bigquery.storage.v1beta1; + +option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1beta1;storage"; +option java_package = "com.google.cloud.bigquery.storage.v1beta1"; + + +// Options dictating how we read a table. +message TableReadOptions { + // 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; + + // 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; +} diff --git a/google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/src/main/proto/google/cloud/bigquery/storage/v1beta1/storage.proto b/google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/src/main/proto/google/cloud/bigquery/storage/v1beta1/storage.proto new file mode 100644 index 000000000000..a81e8344d21f --- /dev/null +++ b/google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/src/main/proto/google/cloud/bigquery/storage/v1beta1/storage.proto @@ -0,0 +1,249 @@ +// 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 +// +// http://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. +// + +syntax = "proto3"; + +package google.cloud.bigquery.storage.v1beta1; + +import "google/cloud/bigquery/storage/v1beta1/avro.proto"; +import "google/cloud/bigquery/storage/v1beta1/read_options.proto"; +import "google/cloud/bigquery/storage/v1beta1/table_reference.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1beta1;storage"; +option java_package = "com.google.cloud.bigquery.storage.v1beta1"; + + +// BigQuery storage API. +// +// The BigQuery storage API can be used to read data stored in BigQuery. +service BigQueryStorage { + // 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. + rpc CreateReadSession(CreateReadSessionRequest) returns (ReadSession) { + } + + // 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. + rpc ReadRows(ReadRowsRequest) returns (stream ReadRowsResponse) { + } + + // 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. + rpc BatchCreateReadSessionStreams(BatchCreateReadSessionStreamsRequest) returns (BatchCreateReadSessionStreamsResponse) { + } + + // 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. + rpc FinalizeStream(FinalizeStreamRequest) returns (google.protobuf.Empty) { + } + + // 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. + rpc SplitReadStream(SplitReadStreamRequest) returns (SplitReadStreamResponse) { + } +} + +message Stream { + // Name of the stream. In the form + // `/projects/{project_id}/stream/{stream_id}` + string name = 1; + + // Rows in the stream. + int64 row_count = 2; +} + +message StreamPosition { + Stream stream = 1; + + // Position in the stream. + int64 offset = 2; +} + +message ReadSession { + // Unique identifier for the session. In the form + // `projects/{project_id}/sessions/{session_id}` + string name = 1; + + // 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; + + // The schema for the read. If read_options.selected_fields is set, the + // schema may be different from the table schema as it will only contain + // the selected fields. + oneof schema { + // Avro schema. + AvroSchema avro_schema = 5; + } + + // Streams associated with this session. + repeated Stream streams = 4; + + // Table that this ReadSession is reading from. + TableReference table_reference = 7; + + // Any modifiers which are applied when reading from the specified table. + TableModifiers table_modifiers = 8; +} + +message CreateReadSessionRequest { + // Required. Reference to the table to read. + TableReference table_reference = 1; + + // 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; + + // Optional. Any modifiers to the Table (e.g. snapshot timestamp). + TableModifiers table_modifiers = 2; + + // 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; + + // Optional. Read options for this session (e.g. column selection, filters). + TableReadOptions read_options = 4; + + // Data output format. Currently default to Avro. + DataFormat format = 5; +} + +message ReadRowsRequest { + // 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. + StreamPosition read_position = 1; +} + +message StreamStatus { + // 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; +} + +// Information on if the current connection is being throttled. +message ThrottleStatus { + // How much this connection is being throttled. + // 0 is no throttling, 100 is completely throttled. + int32 throttle_percent = 1; +} + +message ReadRowsResponse { + oneof rows { + // Serialized row data in AVRO format. + AvroRows avro_rows = 3; + } + + // Estimated stream statistics. + StreamStatus status = 2; + + // Throttling status. If unset, the latest response still describes + // the current throttling status. + ThrottleStatus throttle_status = 5; +} + +message BatchCreateReadSessionStreamsRequest { + // Required. Must be a non-expired session obtained from a call to + // CreateReadSession. Only the name field needs to be set. + ReadSession session = 1; + + // 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; +} + +message BatchCreateReadSessionStreamsResponse { + // Newly added streams. + repeated Stream streams = 1; +} + +message FinalizeStreamRequest { + // Stream to finalize. + Stream stream = 2; +} + +message SplitReadStreamRequest { + // Stream to split. + Stream original_stream = 1; +} + +message SplitReadStreamResponse { + // Primary stream. Will contain the beginning portion of + // |original_stream|. + Stream primary_stream = 1; + + // Remainder stream. Will contain the tail of |original_stream|. + Stream remainder_stream = 2; +} + +// Data format for input or output data. +enum DataFormat { + DATA_FORMAT_UNSPECIFIED = 0; + + // Avro is a standard open source row based file format. + // See https://avro.apache.org/ for more details. + AVRO = 1; +} diff --git a/google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/src/main/proto/google/cloud/bigquery/storage/v1beta1/table_reference.proto b/google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/src/main/proto/google/cloud/bigquery/storage/v1beta1/table_reference.proto new file mode 100644 index 000000000000..a493fac91b0e --- /dev/null +++ b/google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/src/main/proto/google/cloud/bigquery/storage/v1beta1/table_reference.proto @@ -0,0 +1,43 @@ +// 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 +// +// http://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. +// + +syntax = "proto3"; + +package google.cloud.bigquery.storage.v1beta1; + +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1beta1;storage"; +option java_outer_classname = "TableReferenceProto"; +option java_package = "com.google.cloud.bigquery.storage.v1beta1"; + + +// Table reference that includes just the 3 strings needed to identify a table. +message TableReference { + // The assigned project ID of the project. + string project_id = 1; + + // The ID of the dataset in the above project. + string dataset_id = 2; + + // The ID of the table in the above dataset. + string table_id = 3; +} + +// All fields in this message optional. +message TableModifiers { + // The snapshot time of the table. If not set, interpreted as now. + google.protobuf.Timestamp snapshot_time = 1; +} diff --git a/google-cloud-bom/pom.xml b/google-cloud-bom/pom.xml index 345d7cdb97b4..5ff02a1b88c7 100644 --- a/google-cloud-bom/pom.xml +++ b/google-cloud-bom/pom.xml @@ -274,6 +274,16 @@ grpc-google-cloud-bigquerydatatransfer-v1 0.34.1-SNAPSHOT
+ + com.google.api.grpc + proto-google-cloud-bigquerystorage-v1beta1 + 0.34.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-bigquerystorage-v1beta1 + 0.34.1-SNAPSHOT + com.google.cloud google-cloud-compute diff --git a/google-cloud-clients/google-cloud-bigquerystorage/README.md b/google-cloud-clients/google-cloud-bigquerystorage/README.md new file mode 100644 index 000000000000..cc56b93c57ea --- /dev/null +++ b/google-cloud-clients/google-cloud-bigquerystorage/README.md @@ -0,0 +1,100 @@ +Google Cloud BigQuery Storage Java Client +================================== + +Java idiomatic client for Cloud BigQuery Storage. + +[![Kokoro CI](http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/master.svg)](http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/master.html) +[![Maven](https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-bigquerystorage.svg)]( https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-bigquerystorage.svg) + +- [Client Library Documentation][bigquerystorage-client-lib-docs] + +> Note: This client is a work-in-progress, and may occasionally +> make backwards-incompatible changes. + +Quickstart +---------- + +[//]: # ({x-version-update-start:google-cloud-bigquerystorage:released}) +Add this to your pom.xml file +```xml + + com.google.cloud + google-cloud-bigquerystorage + 0.69.0-alpha + +``` +If you are using Gradle, add this to your dependencies +```Groovy +compile 'com.google.cloud:google-cloud-bigquerystorage:0.69.0-alpha' +``` +If you are using SBT, add this to your dependencies +```Scala +libraryDependencies += "com.google.cloud" % "google-cloud-bigquerystorage" % "0.69.0-alpha" +``` +[//]: # ({x-version-update-end}) + +Authentication +-------------- + +See the [Authentication](https://github.com/googleapis/google-cloud-java#authentication) section in the base directory's README. + +About Cloud BigQuery Storage +--------------------- + +Cloud BigQuery Storage is an API for reading data stored in BigQuery. This API provides direct, high-throughput read +access to existing BigQuery tables, supports parallel access with automatic liquid sharding, and allows fine-grained +control over what data is returned. + + +See the [Cloud BigQuery Storage client library docs][bigquerystorage-client-lib-docs] to learn how to read date stored +in BigQuery using this library. + +Getting Started + +#### Installation and setup +You'll need to obtain the `google-cloud-bigquerystorage` library. See the [Quickstart](#quickstart) section +to add `google-cloud-bigquerystorage` as a dependency in your code. + +Transport +--------- +Cloud BigQuery Storage uses gRPC for the transport layer. + +Java Versions +------------- + +Java 7 or above is required for using this client. + +Testing +------- + +This library has tools to help make tests for code using Cloud BigQuery Storage. + +Versioning +---------- + +This library follows [Semantic Versioning](http://semver.org/). + +It is currently in major version zero (``0.y.z``), which means that anything +may change at any time and the public API should not be considered +stable. + +Contributing +------------ + +Contributions to this library are always welcome and highly encouraged. + +See `google-cloud`'s [CONTRIBUTING] documentation and the [shared documentation](https://github.com/googleapis/google-cloud-common/blob/master/contributing/readme.md#how-to-contribute-to-gcloud) for more information on how to get started. + +Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. See [Code of Conduct][code-of-conduct] for more information. + +License +------- + +Apache 2.0 - See [LICENSE] for more information. + + +[CONTRIBUTING]:https://github.com/googleapis/google-cloud-java/blob/master/CONTRIBUTING.md +[code-of-conduct]:https://github.com/googleapis/google-cloud-java/blob/master/CODE_OF_CONDUCT.md#contributor-code-of-conduct +[LICENSE]: https://github.com/googleapis/google-cloud-java/blob/master/LICENSE + +[bigquerystorage-client-lib-docs]: https://googleapis.github.io/google-cloud-java/google-cloud-clients/apidocs/index.html?com/google/cloud/bigquerystorage/v1/package-summary.html diff --git a/google-cloud-clients/google-cloud-bigquerystorage/pom.xml b/google-cloud-clients/google-cloud-bigquerystorage/pom.xml new file mode 100644 index 000000000000..18eb892c1ac9 --- /dev/null +++ b/google-cloud-clients/google-cloud-bigquerystorage/pom.xml @@ -0,0 +1,80 @@ + + + 4.0.0 + google-cloud-bigquerystorage + 0.69.1-alpha-SNAPSHOT + jar + Google Cloud Bigquery Storage + https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-bigquerystorage + + bigquery storage fill in later + + + com.google.cloud + google-cloud-clients + 0.69.1-alpha-SNAPSHOT + + + google-cloud-bigquerystorage + + + + ${project.groupId} + google-cloud-core + + + ${project.groupId} + google-cloud-core-grpc + + + com.google.api.grpc + proto-google-cloud-bigquerystorage-v1beta1 + + + com.google.api.grpc + grpc-google-cloud-bigquerystorage-v1beta1 + + + com.google.api + gax-grpc + 1.34.0 + test + + + com.google.api + gax-grpc + 1.34.0 + testlib + test + + + com.google.api + gax + 0.4.0 + test + + + com.google.api + gax + 1.34.0 + test + + + + junit + junit + 4.12 + test + + + com.google.api + gax + 1.34.0 + + + com.google.api + gax-grpc + 1.34.0 + + + \ No newline at end of file diff --git a/google-cloud-clients/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/BaseBigQueryStorageClient.java b/google-cloud-clients/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/BaseBigQueryStorageClient.java new file mode 100644 index 000000000000..4a8a32169f8c --- /dev/null +++ b/google-cloud-clients/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/BaseBigQueryStorageClient.java @@ -0,0 +1,620 @@ +/* + * 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; + +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.cloud.bigquery.storage.v1beta1.Storage.Stream; +import com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference; +import com.google.cloud.bigquery.storage.v1beta1.stub.BigQueryStorageStub; +import com.google.cloud.bigquery.storage.v1beta1.stub.BigQueryStorageStubSettings; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND SERVICE +/** + * Service Description: BigQuery storage API. + * + *

The 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: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

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 UnaryCallable createReadSessionCallable() { + return stub.createReadSessionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * 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. + * + *

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 ServerStreamingCallable readRowsCallable() { + return stub.readRowsCallable(); + } + + // 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;
+   *   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 UnaryCallable finalizeStreamCallable() { + return stub.finalizeStreamCallable(); + } + + // 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();
+   *   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 UnaryCallable + splitReadStreamCallable() { + return stub.splitReadStreamCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-clients/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/BaseBigQueryStorageSettings.java b/google-cloud-clients/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/BaseBigQueryStorageSettings.java new file mode 100644 index 000000000000..5516289421bf --- /dev/null +++ b/google-cloud-clients/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/BaseBigQueryStorageSettings.java @@ -0,0 +1,235 @@ +/* + * 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; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +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.cloud.bigquery.storage.v1beta1.stub.BigQueryStorageStubSettings; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Settings class to configure an instance of {@link BaseBigQueryStorageClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (bigquerystorage.googleapis.com) and default port (443) are + * used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

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 ClientSettings { + /** Returns the object with the settings used for calls to createReadSession. */ + public UnaryCallSettings createReadSessionSettings() { + return ((BigQueryStorageStubSettings) getStubSettings()).createReadSessionSettings(); + } + + /** Returns the object with the settings used for calls to readRows. */ + public ServerStreamingCallSettings readRowsSettings() { + return ((BigQueryStorageStubSettings) getStubSettings()).readRowsSettings(); + } + + /** Returns the object with the settings used for calls to batchCreateReadSessionStreams. */ + public UnaryCallSettings< + BatchCreateReadSessionStreamsRequest, BatchCreateReadSessionStreamsResponse> + batchCreateReadSessionStreamsSettings() { + return ((BigQueryStorageStubSettings) getStubSettings()) + .batchCreateReadSessionStreamsSettings(); + } + + /** Returns the object with the settings used for calls to finalizeStream. */ + public UnaryCallSettings finalizeStreamSettings() { + return ((BigQueryStorageStubSettings) getStubSettings()).finalizeStreamSettings(); + } + + /** Returns the object with the settings used for calls to splitReadStream. */ + public UnaryCallSettings + splitReadStreamSettings() { + return ((BigQueryStorageStubSettings) getStubSettings()).splitReadStreamSettings(); + } + + public static final BaseBigQueryStorageSettings create(BigQueryStorageStubSettings stub) + throws IOException { + return new BaseBigQueryStorageSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return BigQueryStorageStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return BigQueryStorageStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return BigQueryStorageStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return BigQueryStorageStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return BigQueryStorageStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return BigQueryStorageStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return BigQueryStorageStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected BaseBigQueryStorageSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for BaseBigQueryStorageSettings. */ + public static class Builder extends ClientSettings.Builder { + protected Builder() throws IOException { + this((ClientContext) null); + } + + protected Builder(ClientContext clientContext) { + super(BigQueryStorageStubSettings.newBuilder(clientContext)); + } + + private static Builder createDefault() { + return new Builder(BigQueryStorageStubSettings.newBuilder()); + } + + protected Builder(BaseBigQueryStorageSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(BigQueryStorageStubSettings.Builder stubSettings) { + super(stubSettings); + } + + public BigQueryStorageStubSettings.Builder getStubSettingsBuilder() { + return ((BigQueryStorageStubSettings.Builder) getStubSettings()); + } + + // NEXT_MAJOR_VER: remove 'throws Exception' + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to createReadSession. */ + public UnaryCallSettings.Builder + createReadSessionSettings() { + return getStubSettingsBuilder().createReadSessionSettings(); + } + + /** Returns the builder for the settings used for calls to readRows. */ + public ServerStreamingCallSettings.Builder + readRowsSettings() { + return getStubSettingsBuilder().readRowsSettings(); + } + + /** Returns the builder for the settings used for calls to batchCreateReadSessionStreams. */ + public UnaryCallSettings.Builder< + BatchCreateReadSessionStreamsRequest, BatchCreateReadSessionStreamsResponse> + batchCreateReadSessionStreamsSettings() { + return getStubSettingsBuilder().batchCreateReadSessionStreamsSettings(); + } + + /** Returns the builder for the settings used for calls to finalizeStream. */ + public UnaryCallSettings.Builder finalizeStreamSettings() { + return getStubSettingsBuilder().finalizeStreamSettings(); + } + + /** Returns the builder for the settings used for calls to splitReadStream. */ + public UnaryCallSettings.Builder + splitReadStreamSettings() { + return getStubSettingsBuilder().splitReadStreamSettings(); + } + + @Override + public BaseBigQueryStorageSettings build() throws IOException { + return new BaseBigQueryStorageSettings(this); + } + } +} diff --git a/google-cloud-clients/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/package-info.java b/google-cloud-clients/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/package-info.java new file mode 100644 index 000000000000..7e77b32fa65b --- /dev/null +++ b/google-cloud-clients/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/package-info.java @@ -0,0 +1,41 @@ +/* + * 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. + */ + +/** + * A client to BigQuery Storage API. + * + *

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: + * + *

+ * 
+ * try (BaseBigQueryStorageClient baseBigQueryStorageClient = BaseBigQueryStorageClient.create()) {
+ *   TableReference tableReference = TableReference.newBuilder().build();
+ *   String parent = "";
+ *   int requestedStreams = 0;
+ *   ReadSession response = baseBigQueryStorageClient.createReadSession(tableReference, parent, requestedStreams);
+ * }
+ * 
+ * 
+ */ +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. + * + *

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 createReadSessionCallable() { + throw new UnsupportedOperationException("Not implemented: createReadSessionCallable()"); + } + + public ServerStreamingCallable readRowsCallable() { + throw new UnsupportedOperationException("Not implemented: readRowsCallable()"); + } + + public UnaryCallable + batchCreateReadSessionStreamsCallable() { + throw new UnsupportedOperationException( + "Not implemented: batchCreateReadSessionStreamsCallable()"); + } + + public UnaryCallable finalizeStreamCallable() { + throw new UnsupportedOperationException("Not implemented: finalizeStreamCallable()"); + } + + public UnaryCallable splitReadStreamCallable() { + throw new UnsupportedOperationException("Not implemented: splitReadStreamCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-clients/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/stub/BigQueryStorageStubSettings.java b/google-cloud-clients/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/stub/BigQueryStorageStubSettings.java new file mode 100644 index 000000000000..0079499b29be --- /dev/null +++ b/google-cloud-clients/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/stub/BigQueryStorageStubSettings.java @@ -0,0 +1,387 @@ +/* + * 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.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +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.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Settings class to configure an instance of {@link BigQueryStorageStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (bigquerystorage.googleapis.com) and default port (443) are + * used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

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: + * + *

+ * 
+ * BigQueryStorageStubSettings.Builder baseBigQueryStorageSettingsBuilder =
+ *     BigQueryStorageStubSettings.newBuilder();
+ * baseBigQueryStorageSettingsBuilder.createReadSessionSettings().getRetrySettings().toBuilder()
+ *     .setTotalTimeout(Duration.ofSeconds(30));
+ * BigQueryStorageStubSettings baseBigQueryStorageSettings = baseBigQueryStorageSettingsBuilder.build();
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class BigQueryStorageStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/bigquery") + .add("https://www.googleapis.com/auth/cloud-platform") + .build(); + + private final UnaryCallSettings createReadSessionSettings; + private final ServerStreamingCallSettings readRowsSettings; + private final UnaryCallSettings< + BatchCreateReadSessionStreamsRequest, BatchCreateReadSessionStreamsResponse> + batchCreateReadSessionStreamsSettings; + private final UnaryCallSettings finalizeStreamSettings; + private final UnaryCallSettings + splitReadStreamSettings; + + /** Returns the object with the settings used for calls to createReadSession. */ + public UnaryCallSettings createReadSessionSettings() { + return createReadSessionSettings; + } + + /** Returns the object with the settings used for calls to readRows. */ + public ServerStreamingCallSettings readRowsSettings() { + return readRowsSettings; + } + + /** Returns the object with the settings used for calls to batchCreateReadSessionStreams. */ + public UnaryCallSettings< + BatchCreateReadSessionStreamsRequest, BatchCreateReadSessionStreamsResponse> + batchCreateReadSessionStreamsSettings() { + return batchCreateReadSessionStreamsSettings; + } + + /** Returns the object with the settings used for calls to finalizeStream. */ + public UnaryCallSettings finalizeStreamSettings() { + return finalizeStreamSettings; + } + + /** Returns the object with the settings used for calls to splitReadStream. */ + public UnaryCallSettings + splitReadStreamSettings() { + return splitReadStreamSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public BigQueryStorageStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcBigQueryStorageStub.create(this); + } else { + throw new UnsupportedOperationException( + "Transport not supported: " + getTransportChannelProvider().getTransportName()); + } + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "bigquerystorage.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(BigQueryStorageStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected BigQueryStorageStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createReadSessionSettings = settingsBuilder.createReadSessionSettings().build(); + readRowsSettings = settingsBuilder.readRowsSettings().build(); + batchCreateReadSessionStreamsSettings = + settingsBuilder.batchCreateReadSessionStreamsSettings().build(); + finalizeStreamSettings = settingsBuilder.finalizeStreamSettings().build(); + splitReadStreamSettings = settingsBuilder.splitReadStreamSettings().build(); + } + + /** Builder for BigQueryStorageStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + + private final UnaryCallSettings.Builder + createReadSessionSettings; + private final ServerStreamingCallSettings.Builder + readRowsSettings; + private final UnaryCallSettings.Builder< + BatchCreateReadSessionStreamsRequest, BatchCreateReadSessionStreamsResponse> + batchCreateReadSessionStreamsSettings; + private final UnaryCallSettings.Builder finalizeStreamSettings; + private final UnaryCallSettings.Builder + splitReadStreamSettings; + + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "idempotent", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + definitions.put("non_idempotent", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(20000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(20000L)) + .setTotalTimeout(Duration.ofMillis(600000L)) + .build(); + definitions.put("default", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this((ClientContext) null); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createReadSessionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + readRowsSettings = ServerStreamingCallSettings.newBuilder(); + + batchCreateReadSessionStreamsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + finalizeStreamSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + splitReadStreamSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createReadSessionSettings, + batchCreateReadSessionStreamsSettings, + finalizeStreamSettings, + splitReadStreamSettings); + + initDefaults(this); + } + + private static Builder createDefault() { + Builder builder = new Builder((ClientContext) null); + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + + builder + .createReadSessionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .readRowsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .batchCreateReadSessionStreamsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .finalizeStreamSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .splitReadStreamSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + return builder; + } + + protected Builder(BigQueryStorageStubSettings settings) { + super(settings); + + createReadSessionSettings = settings.createReadSessionSettings.toBuilder(); + readRowsSettings = settings.readRowsSettings.toBuilder(); + batchCreateReadSessionStreamsSettings = + settings.batchCreateReadSessionStreamsSettings.toBuilder(); + finalizeStreamSettings = settings.finalizeStreamSettings.toBuilder(); + splitReadStreamSettings = settings.splitReadStreamSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createReadSessionSettings, + batchCreateReadSessionStreamsSettings, + finalizeStreamSettings, + splitReadStreamSettings); + } + + // NEXT_MAJOR_VER: remove 'throws Exception' + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to createReadSession. */ + public UnaryCallSettings.Builder + createReadSessionSettings() { + return createReadSessionSettings; + } + + /** Returns the builder for the settings used for calls to readRows. */ + public ServerStreamingCallSettings.Builder + readRowsSettings() { + return readRowsSettings; + } + + /** Returns the builder for the settings used for calls to batchCreateReadSessionStreams. */ + public UnaryCallSettings.Builder< + BatchCreateReadSessionStreamsRequest, BatchCreateReadSessionStreamsResponse> + batchCreateReadSessionStreamsSettings() { + return batchCreateReadSessionStreamsSettings; + } + + /** Returns the builder for the settings used for calls to finalizeStream. */ + public UnaryCallSettings.Builder finalizeStreamSettings() { + return finalizeStreamSettings; + } + + /** Returns the builder for the settings used for calls to splitReadStream. */ + public UnaryCallSettings.Builder + splitReadStreamSettings() { + return splitReadStreamSettings; + } + + @Override + public BigQueryStorageStubSettings build() throws IOException { + return new BigQueryStorageStubSettings(this); + } + } +} diff --git a/google-cloud-clients/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/stub/GrpcBigQueryStorageCallableFactory.java b/google-cloud-clients/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/stub/GrpcBigQueryStorageCallableFactory.java new file mode 100644 index 000000000000..bc7975a06826 --- /dev/null +++ b/google-cloud-clients/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/stub/GrpcBigQueryStorageCallableFactory.java @@ -0,0 +1,116 @@ +/* + * 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.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * gRPC callable factory implementation for BigQuery Storage API. + * + *

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 UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings pagedCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable( + grpcCallSettings, pagedCallSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings batchingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, batchingCallSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings operationCallSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, operationCallSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } +} diff --git a/google-cloud-clients/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/stub/GrpcBigQueryStorageStub.java b/google-cloud-clients/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/stub/GrpcBigQueryStorageStub.java new file mode 100644 index 000000000000..a676ee3e2eca --- /dev/null +++ b/google-cloud-clients/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/stub/GrpcBigQueryStorageStub.java @@ -0,0 +1,314 @@ +/* + * 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.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsExtractor; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.bigquery.storage.v1beta1.Storage.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.common.collect.ImmutableMap; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * gRPC stub implementation for BigQuery Storage API. + * + *

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 + createReadSessionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.bigquery.storage.v1beta1.BigQueryStorage/CreateReadSession") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateReadSessionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ReadSession.getDefaultInstance())) + .build(); + private static final MethodDescriptor + readRowsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName("google.cloud.bigquery.storage.v1beta1.BigQueryStorage/ReadRows") + .setRequestMarshaller(ProtoUtils.marshaller(ReadRowsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ReadRowsResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor< + BatchCreateReadSessionStreamsRequest, BatchCreateReadSessionStreamsResponse> + batchCreateReadSessionStreamsMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.bigquery.storage.v1beta1.BigQueryStorage/BatchCreateReadSessionStreams") + .setRequestMarshaller( + ProtoUtils.marshaller(BatchCreateReadSessionStreamsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(BatchCreateReadSessionStreamsResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor + finalizeStreamMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.bigquery.storage.v1beta1.BigQueryStorage/FinalizeStream") + .setRequestMarshaller( + ProtoUtils.marshaller(FinalizeStreamRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + private static final MethodDescriptor + splitReadStreamMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.bigquery.storage.v1beta1.BigQueryStorage/SplitReadStream") + .setRequestMarshaller( + ProtoUtils.marshaller(SplitReadStreamRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(SplitReadStreamResponse.getDefaultInstance())) + .build(); + + private final BackgroundResource backgroundResources; + + private final UnaryCallable createReadSessionCallable; + private final ServerStreamingCallable readRowsCallable; + private final UnaryCallable< + BatchCreateReadSessionStreamsRequest, BatchCreateReadSessionStreamsResponse> + batchCreateReadSessionStreamsCallable; + private final UnaryCallable finalizeStreamCallable; + private final UnaryCallable + splitReadStreamCallable; + + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcBigQueryStorageStub create(BigQueryStorageStubSettings settings) + throws IOException { + return new GrpcBigQueryStorageStub(settings, ClientContext.create(settings)); + } + + public static final GrpcBigQueryStorageStub create(ClientContext clientContext) + throws IOException { + return new GrpcBigQueryStorageStub( + BigQueryStorageStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcBigQueryStorageStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcBigQueryStorageStub( + BigQueryStorageStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcBigQueryStorageStub, 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 GrpcBigQueryStorageStub( + BigQueryStorageStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcBigQueryStorageCallableFactory()); + } + + /** + * Constructs an instance of GrpcBigQueryStorageStub, 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 GrpcBigQueryStorageStub( + BigQueryStorageStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + GrpcCallSettings createReadSessionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createReadSessionMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateReadSessionRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "table_reference.project_id", + String.valueOf(request.getTableReference().getProjectId())); + params.put( + "table_reference.dataset_id", + String.valueOf(request.getTableReference().getDatasetId())); + return params.build(); + } + }) + .build(); + GrpcCallSettings readRowsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(readRowsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ReadRowsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "read_position.stream.name", + String.valueOf(request.getReadPosition().getStream().getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + batchCreateReadSessionStreamsTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(batchCreateReadSessionStreamsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract( + BatchCreateReadSessionStreamsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("session.name", String.valueOf(request.getSession().getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings finalizeStreamTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(finalizeStreamMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(FinalizeStreamRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("stream.name", String.valueOf(request.getStream().getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + splitReadStreamTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(splitReadStreamMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(SplitReadStreamRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "original_stream.name", + String.valueOf(request.getOriginalStream().getName())); + return params.build(); + } + }) + .build(); + + this.createReadSessionCallable = + callableFactory.createUnaryCallable( + createReadSessionTransportSettings, + settings.createReadSessionSettings(), + clientContext); + this.readRowsCallable = + callableFactory.createServerStreamingCallable( + readRowsTransportSettings, settings.readRowsSettings(), clientContext); + this.batchCreateReadSessionStreamsCallable = + callableFactory.createUnaryCallable( + batchCreateReadSessionStreamsTransportSettings, + settings.batchCreateReadSessionStreamsSettings(), + clientContext); + this.finalizeStreamCallable = + callableFactory.createUnaryCallable( + finalizeStreamTransportSettings, settings.finalizeStreamSettings(), clientContext); + this.splitReadStreamCallable = + callableFactory.createUnaryCallable( + splitReadStreamTransportSettings, settings.splitReadStreamSettings(), clientContext); + + backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public UnaryCallable createReadSessionCallable() { + return createReadSessionCallable; + } + + public ServerStreamingCallable readRowsCallable() { + return readRowsCallable; + } + + public UnaryCallable + batchCreateReadSessionStreamsCallable() { + return batchCreateReadSessionStreamsCallable; + } + + public UnaryCallable finalizeStreamCallable() { + return finalizeStreamCallable; + } + + public UnaryCallable splitReadStreamCallable() { + return splitReadStreamCallable; + } + + @Override + public final void close() { + shutdown(); + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-clients/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta1/BaseBigQueryStorageClientTest.java b/google-cloud-clients/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta1/BaseBigQueryStorageClientTest.java new file mode 100644 index 000000000000..81156db13902 --- /dev/null +++ b/google-cloud-clients/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta1/BaseBigQueryStorageClientTest.java @@ -0,0 +1,296 @@ +/* + * 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; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.grpc.testing.MockStreamObserver; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StatusCode; +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.cloud.bigquery.storage.v1beta1.Storage.Stream; +import com.google.cloud.bigquery.storage.v1beta1.Storage.StreamPosition; +import com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference; +import com.google.protobuf.Empty; +import com.google.protobuf.GeneratedMessageV3; +import io.grpc.Status; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.ExecutionException; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@javax.annotation.Generated("by GAPIC") +public class BaseBigQueryStorageClientTest { + private static MockBigQueryStorage mockBigQueryStorage; + private static MockServiceHelper serviceHelper; + private BaseBigQueryStorageClient client; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockBigQueryStorage = new MockBigQueryStorage(); + serviceHelper = + new MockServiceHelper("in-process-1", Arrays.asList(mockBigQueryStorage)); + serviceHelper.start(); + } + + @AfterClass + public static void stopServer() { + serviceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + serviceHelper.reset(); + channelProvider = serviceHelper.createChannelProvider(); + BaseBigQueryStorageSettings settings = + BaseBigQueryStorageSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = BaseBigQueryStorageClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + @SuppressWarnings("all") + public void createReadSessionTest() { + String name = "name3373707"; + ReadSession expectedResponse = ReadSession.newBuilder().setName(name).build(); + mockBigQueryStorage.addResponse(expectedResponse); + + TableReference tableReference = TableReference.newBuilder().build(); + String parent = "parent-995424086"; + int requestedStreams = 1017221410; + + ReadSession actualResponse = client.createReadSession(tableReference, parent, requestedStreams); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBigQueryStorage.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateReadSessionRequest actualRequest = (CreateReadSessionRequest) actualRequests.get(0); + + Assert.assertEquals(tableReference, actualRequest.getTableReference()); + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(requestedStreams, actualRequest.getRequestedStreams()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void createReadSessionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockBigQueryStorage.addException(exception); + + try { + TableReference tableReference = TableReference.newBuilder().build(); + String parent = "parent-995424086"; + int requestedStreams = 1017221410; + + client.createReadSession(tableReference, parent, requestedStreams); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void readRowsTest() throws Exception { + ReadRowsResponse expectedResponse = ReadRowsResponse.newBuilder().build(); + mockBigQueryStorage.addResponse(expectedResponse); + StreamPosition readPosition = StreamPosition.newBuilder().build(); + ReadRowsRequest request = ReadRowsRequest.newBuilder().setReadPosition(readPosition).build(); + + MockStreamObserver responseObserver = new MockStreamObserver<>(); + + ServerStreamingCallable callable = client.readRowsCallable(); + callable.serverStreamingCall(request, responseObserver); + + List actualResponses = responseObserver.future().get(); + Assert.assertEquals(1, actualResponses.size()); + Assert.assertEquals(expectedResponse, actualResponses.get(0)); + } + + @Test + @SuppressWarnings("all") + public void readRowsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockBigQueryStorage.addException(exception); + StreamPosition readPosition = StreamPosition.newBuilder().build(); + ReadRowsRequest request = ReadRowsRequest.newBuilder().setReadPosition(readPosition).build(); + + MockStreamObserver responseObserver = new MockStreamObserver<>(); + + ServerStreamingCallable callable = client.readRowsCallable(); + callable.serverStreamingCall(request, responseObserver); + + try { + List actualResponses = responseObserver.future().get(); + Assert.fail("No exception thrown"); + } catch (ExecutionException e) { + Assert.assertTrue(e.getCause() instanceof InvalidArgumentException); + InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + @SuppressWarnings("all") + public void batchCreateReadSessionStreamsTest() { + BatchCreateReadSessionStreamsResponse expectedResponse = + BatchCreateReadSessionStreamsResponse.newBuilder().build(); + mockBigQueryStorage.addResponse(expectedResponse); + + ReadSession session = ReadSession.newBuilder().build(); + int requestedStreams = 1017221410; + + BatchCreateReadSessionStreamsResponse actualResponse = + client.batchCreateReadSessionStreams(session, requestedStreams); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBigQueryStorage.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchCreateReadSessionStreamsRequest actualRequest = + (BatchCreateReadSessionStreamsRequest) actualRequests.get(0); + + Assert.assertEquals(session, actualRequest.getSession()); + Assert.assertEquals(requestedStreams, actualRequest.getRequestedStreams()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void batchCreateReadSessionStreamsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockBigQueryStorage.addException(exception); + + try { + ReadSession session = ReadSession.newBuilder().build(); + int requestedStreams = 1017221410; + + client.batchCreateReadSessionStreams(session, requestedStreams); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void finalizeStreamTest() { + Empty expectedResponse = Empty.newBuilder().build(); + mockBigQueryStorage.addResponse(expectedResponse); + + Stream stream = Stream.newBuilder().build(); + + client.finalizeStream(stream); + + List actualRequests = mockBigQueryStorage.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + FinalizeStreamRequest actualRequest = (FinalizeStreamRequest) actualRequests.get(0); + + Assert.assertEquals(stream, actualRequest.getStream()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void finalizeStreamExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockBigQueryStorage.addException(exception); + + try { + Stream stream = Stream.newBuilder().build(); + + client.finalizeStream(stream); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void splitReadStreamTest() { + SplitReadStreamResponse expectedResponse = SplitReadStreamResponse.newBuilder().build(); + mockBigQueryStorage.addResponse(expectedResponse); + + Stream originalStream = Stream.newBuilder().build(); + + SplitReadStreamResponse actualResponse = client.splitReadStream(originalStream); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBigQueryStorage.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SplitReadStreamRequest actualRequest = (SplitReadStreamRequest) actualRequests.get(0); + + Assert.assertEquals(originalStream, actualRequest.getOriginalStream()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void splitReadStreamExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockBigQueryStorage.addException(exception); + + try { + Stream originalStream = Stream.newBuilder().build(); + + client.splitReadStream(originalStream); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } +} diff --git a/google-cloud-clients/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta1/MockBigQueryStorage.java b/google-cloud-clients/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta1/MockBigQueryStorage.java new file mode 100644 index 000000000000..3d8ca1ebc69e --- /dev/null +++ b/google-cloud-clients/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta1/MockBigQueryStorage.java @@ -0,0 +1,57 @@ +/* + * 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; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.GeneratedMessageV3; +import io.grpc.ServerServiceDefinition; +import java.util.List; + +@javax.annotation.Generated("by GAPIC") +@BetaApi +public class MockBigQueryStorage implements MockGrpcService { + private final MockBigQueryStorageImpl serviceImpl; + + public MockBigQueryStorage() { + serviceImpl = new MockBigQueryStorageImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(GeneratedMessageV3 response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/google-cloud-clients/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta1/MockBigQueryStorageImpl.java b/google-cloud-clients/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta1/MockBigQueryStorageImpl.java new file mode 100644 index 000000000000..313d8d086246 --- /dev/null +++ b/google-cloud-clients/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta1/MockBigQueryStorageImpl.java @@ -0,0 +1,143 @@ +/* + * 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; + +import com.google.api.core.BetaApi; +import com.google.cloud.bigquery.storage.v1beta1.BigQueryStorageGrpc.BigQueryStorageImplBase; +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 com.google.protobuf.GeneratedMessageV3; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; + +@javax.annotation.Generated("by GAPIC") +@BetaApi +public class MockBigQueryStorageImpl extends BigQueryStorageImplBase { + private ArrayList requests; + private Queue responses; + + public MockBigQueryStorageImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(GeneratedMessageV3 response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void createReadSession( + CreateReadSessionRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ReadSession) { + requests.add(request); + responseObserver.onNext((ReadSession) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void readRows(ReadRowsRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ReadRowsResponse) { + requests.add(request); + responseObserver.onNext((ReadRowsResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void batchCreateReadSessionStreams( + BatchCreateReadSessionStreamsRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof BatchCreateReadSessionStreamsResponse) { + requests.add(request); + responseObserver.onNext((BatchCreateReadSessionStreamsResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void finalizeStream( + FinalizeStreamRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext((Empty) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void splitReadStream( + SplitReadStreamRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof SplitReadStreamResponse) { + requests.add(request); + responseObserver.onNext((SplitReadStreamResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } +} diff --git a/google-cloud-clients/google-cloud-bigquerystorage/synth.py b/google-cloud-clients/google-cloud-bigquerystorage/synth.py new file mode 100644 index 000000000000..80e1256098cb --- /dev/null +++ b/google-cloud-clients/google-cloud-bigquerystorage/synth.py @@ -0,0 +1,31 @@ +# 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 +# +# http://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. +"""This script is used to synthesize generated parts of this library.""" + +import synthtool as s +import synthtool.gcp as gcp + +gapic = gcp.GAPICGenerator() +common_templates = gcp.CommonTemplates() + +for version in ["v1beta1"]: + library = gapic.java_library( + service='bigquerystorage', + version=version, + config_path=f'/google/cloud/bigquery/storage/artman_bigquerystorage_{version}.yaml', + artman_output_name='') + + s.copy(library / f'gapic-google-cloud-bigquerystorage-{version}/src', 'src') + s.copy(library / f'grpc-google-cloud-bigquerystorage-{version}/src', f'../../google-api-grpc/grpc-google-cloud-bigquerystorage-{version}/src') + s.copy(library / f'proto-google-cloud-bigquerystorage-{version}/src', f'../../google-api-grpc/proto-google-cloud-bigquerystorage-{version}/src') diff --git a/google-cloud-clients/pom.xml b/google-cloud-clients/pom.xml index 97c69f93b1ab..a00287c15aa0 100644 --- a/google-cloud-clients/pom.xml +++ b/google-cloud-clients/pom.xml @@ -413,6 +413,7 @@ google-cloud-bigtable-admin google-cloud-bigquery google-cloud-bigquerydatatransfer + google-cloud-bigquerystorage google-cloud-compute google-cloud-container google-cloud-containeranalysis @@ -748,7 +749,7 @@ Stub packages - com.google.cloud.asset.v1beta1.stub:com.google.cloud.automl.v1beta1.stub:com.google.cloud.bigquery.datatransfer.v1.stub:com.google.cloud.bigtable.admin.v2.stub:com.google.cloud.bigtable.data.v2.stub*:com.google.cloud.compute.v1.stub:com.google.cloud.container.v1.stub:com.google.cloud.devtools.containeranalysis.v1beta1.stub:com.google.cloud.dataproc.v1.stub:com.google.cloud.dataproc.v1beta2.stub:com.google.cloud.dlp.v2beta1.stub:com.google.cloud.dlp.v2.stub:com.google.cloud.dialogflow.v2beta1.stub:com.google.cloud.dialogflow.v2.stub:com.google.cloud.errorreporting.v1beta1.stub:com.google.cloud.firestore.v1beta1.stub:com.google.cloud.iot.v1.stub:com.google.cloud.kms.v1.stub:com.google.cloud.language.v1beta2.stub:com.google.cloud.language.v1.stub:com.google.cloud.logging.v2.stub:com.google.cloud.monitoring.v3.stub:com.google.cloud.oslogin.v1.stub:com.google.cloud.pubsub.v1.stub:com.google.cloud.redis.v1beta1.stub:com.google.cloud.redis.v1.stub:com.google.cloud.scheduler.v1beta1.stub:com.google.cloud.spanner.admin.database.v1.stub:com.google.cloud.spanner.admin.instance.v1.stub:com.google.cloud.spanner.v1.stub:com.google.cloud.speech.v1beta1.stub:com.google.cloud.speech.v1p1beta1.stub:com.google.cloud.speech.v1.stub:com.google.cloud.tasks.v2beta2.stub:com.google.cloud.texttospeech.v1beta1.stub:com.google.cloud.texttospeech.v1.stub:com.google.cloud.trace.v1.stub:com.google.cloud.trace.v2.stub:com.google.cloud.videointelligence.v1beta1.stub:com.google.cloud.videointelligence.v1beta2.stub:com.google.cloud.videointelligence.v1.stub:com.google.cloud.videointelligence.v1p1beta1.stub:com.google.cloud.videointelligence.v1p2beta1.stub:com.google.cloud.vision.v1.stub:com.google.cloud.vision.v1p1beta1.stub:com.google.cloud.vision.v1p2beta1.stub:com.google.cloud.vision.v1p3beta1.stub:com.google.cloud.websecurityscanner.v1alpha.stub + com.google.cloud.asset.v1beta1.stub:com.google.cloud.automl.v1beta1.stub:com.google.cloud.bigquery.datatransfer.v1.stub:com.google.cloud.bigquery.storage.v1beta1.stub:com.google.cloud.bigtable.admin.v2.stub:com.google.cloud.bigtable.data.v2.stub*:com.google.cloud.compute.v1.stub:com.google.cloud.container.v1.stub:com.google.cloud.devtools.containeranalysis.v1beta1.stub:com.google.cloud.dataproc.v1.stub:com.google.cloud.dataproc.v1beta2.stub:com.google.cloud.dlp.v2beta1.stub:com.google.cloud.dlp.v2.stub:com.google.cloud.dialogflow.v2beta1.stub:com.google.cloud.dialogflow.v2.stub:com.google.cloud.errorreporting.v1beta1.stub:com.google.cloud.firestore.v1beta1.stub:com.google.cloud.iot.v1.stub:com.google.cloud.kms.v1.stub:com.google.cloud.language.v1beta2.stub:com.google.cloud.language.v1.stub:com.google.cloud.logging.v2.stub:com.google.cloud.monitoring.v3.stub:com.google.cloud.oslogin.v1.stub:com.google.cloud.pubsub.v1.stub:com.google.cloud.redis.v1beta1.stub:com.google.cloud.redis.v1.stub:com.google.cloud.scheduler.v1beta1.stub:com.google.cloud.spanner.admin.database.v1.stub:com.google.cloud.spanner.admin.instance.v1.stub:com.google.cloud.spanner.v1.stub:com.google.cloud.speech.v1beta1.stub:com.google.cloud.speech.v1p1beta1.stub:com.google.cloud.speech.v1.stub:com.google.cloud.tasks.v2beta2.stub:com.google.cloud.texttospeech.v1beta1.stub:com.google.cloud.texttospeech.v1.stub:com.google.cloud.trace.v1.stub:com.google.cloud.trace.v2.stub:com.google.cloud.videointelligence.v1beta1.stub:com.google.cloud.videointelligence.v1beta2.stub:com.google.cloud.videointelligence.v1.stub:com.google.cloud.videointelligence.v1p1beta1.stub:com.google.cloud.videointelligence.v1p2beta1.stub:com.google.cloud.vision.v1.stub:com.google.cloud.vision.v1p1beta1.stub:com.google.cloud.vision.v1p2beta1.stub:com.google.cloud.vision.v1p3beta1.stub:com.google.cloud.websecurityscanner.v1alpha.stub Deprecated packages @@ -855,7 +856,7 @@ Stub packages - com.google.cloud.automl.v1beta1.stub:com.google.cloud.bigquery.datatransfer.v1.stub:com.google.cloud.bigtable.admin.v2.stub:com.google.cloud.bigtable.data.v2.stub*:com.google.cloud.compute.v1.stub:com.google.cloud.container.v1.stub:com.google.cloud.dataproc.v1.stub:com.google.cloud.dataproc.v1beta2.stub:com.google.cloud.dlp.v2beta1.stub:com.google.cloud.dlp.v2.stub:com.google.cloud.dialogflow.v2beta1.stub:com.google.cloud.dialogflow.v2.stub:com.google.cloud.errorreporting.v1beta1.stub:com.google.cloud.firestore.v1beta1.stub:com.google.cloud.iot.v1.stub:com.google.cloud.kms.v1.stub:com.google.cloud.language.v1beta2.stub:com.google.cloud.language.v1.stub:com.google.cloud.logging.v2.stub:com.google.cloud.monitoring.v3.stub:com.google.cloud.oslogin.v1.stub:com.google.cloud.pubsub.v1.stub:com.google.cloud.redis.v1beta1.stub:com.google.cloud.scheduler.v1beta1.stub:com.google.cloud.spanner.admin.database.v1.stub:com.google.cloud.spanner.admin.instance.v1.stub:com.google.cloud.spanner.v1.stub:com.google.cloud.speech.v1beta1.stub:com.google.cloud.speech.v1p1beta1.stub:com.google.cloud.speech.v1.stub:com.google.cloud.tasks.v2beta2.stub:com.google.cloud.texttospeech.v1beta1.stub:com.google.cloud.texttospeech.v1.stub:com.google.cloud.trace.v1.stub:com.google.cloud.trace.v2.stub:com.google.cloud.videointelligence.v1beta1.stub:com.google.cloud.videointelligence.v1beta2.stub:com.google.cloud.videointelligence.v1.stub:com.google.cloud.videointelligence.v1p1beta1.stub:com.google.cloud.vision.v1.stub:com.google.cloud.vision.v1p1beta1.stub:com.google.cloud.vision.v1p2beta1.stub:com.google.cloud.vision.v1p3beta1.stub:com.google.cloud.websecurityscanner.v1alpha.stub + com.google.cloud.automl.v1beta1.stub:com.google.cloud.bigquery.datatransfer.v1.stub:com.google.cloud.bigquery.storage.v1beta1.stub:com.google.cloud.bigtable.admin.v2.stub:com.google.cloud.bigtable.data.v2.stub*:com.google.cloud.compute.v1.stub:com.google.cloud.container.v1.stub:com.google.cloud.dataproc.v1.stub:com.google.cloud.dataproc.v1beta2.stub:com.google.cloud.dlp.v2beta1.stub:com.google.cloud.dlp.v2.stub:com.google.cloud.dialogflow.v2beta1.stub:com.google.cloud.dialogflow.v2.stub:com.google.cloud.errorreporting.v1beta1.stub:com.google.cloud.firestore.v1beta1.stub:com.google.cloud.iot.v1.stub:com.google.cloud.kms.v1.stub:com.google.cloud.language.v1beta2.stub:com.google.cloud.language.v1.stub:com.google.cloud.logging.v2.stub:com.google.cloud.monitoring.v3.stub:com.google.cloud.oslogin.v1.stub:com.google.cloud.pubsub.v1.stub:com.google.cloud.redis.v1beta1.stub:com.google.cloud.scheduler.v1beta1.stub:com.google.cloud.spanner.admin.database.v1.stub:com.google.cloud.spanner.admin.instance.v1.stub:com.google.cloud.spanner.v1.stub:com.google.cloud.speech.v1beta1.stub:com.google.cloud.speech.v1p1beta1.stub:com.google.cloud.speech.v1.stub:com.google.cloud.tasks.v2beta2.stub:com.google.cloud.texttospeech.v1beta1.stub:com.google.cloud.texttospeech.v1.stub:com.google.cloud.trace.v1.stub:com.google.cloud.trace.v2.stub:com.google.cloud.videointelligence.v1beta1.stub:com.google.cloud.videointelligence.v1beta2.stub:com.google.cloud.videointelligence.v1.stub:com.google.cloud.videointelligence.v1p1beta1.stub:com.google.cloud.vision.v1.stub:com.google.cloud.vision.v1p1beta1.stub:com.google.cloud.vision.v1p2beta1.stub:com.google.cloud.vision.v1p3beta1.stub:com.google.cloud.websecurityscanner.v1alpha.stub Deprecated packages