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 (DocumentProcessorServiceClient documentProcessorServiceClient = DocumentProcessorServiceClient.create()) {
+ * ProcessorName name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
+ * ProcessResponse response = documentProcessorServiceClient.processDocument(name);
+ * }
+ *
+ *
+ *
+ * Note: close() needs to be called on the documentProcessorServiceClient object to clean up + * resources such as threads. In the example above, try-with-resources is used, which automatically + * calls close(). + * + *
The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *
See the individual methods for example code. + * + *
Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *
This class can be customized by passing in a custom instance of + * DocumentProcessorServiceSettings to create(). For example: + * + *
To customize credentials: + * + *
+ *
+ * DocumentProcessorServiceSettings documentProcessorServiceSettings =
+ * DocumentProcessorServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create(documentProcessorServiceSettings);
+ *
+ *
+ *
+ * To customize the endpoint:
+ *
+ *
+ *
+ * DocumentProcessorServiceSettings documentProcessorServiceSettings =
+ * DocumentProcessorServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create(documentProcessorServiceSettings);
+ *
+ *
+ */
+@Generated("by gapic-generator")
+@BetaApi
+public class DocumentProcessorServiceClient implements BackgroundResource {
+ private final DocumentProcessorServiceSettings settings;
+ private final DocumentProcessorServiceStub stub;
+ private final OperationsClient operationsClient;
+
+ /** Constructs an instance of DocumentProcessorServiceClient with default settings. */
+ public static final DocumentProcessorServiceClient create() throws IOException {
+ return create(DocumentProcessorServiceSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of DocumentProcessorServiceClient, 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 DocumentProcessorServiceClient create(
+ DocumentProcessorServiceSettings settings) throws IOException {
+ return new DocumentProcessorServiceClient(settings);
+ }
+
+ /**
+ * Constructs an instance of DocumentProcessorServiceClient, using the given stub for making
+ * calls. This is for advanced usage - prefer to use DocumentProcessorServiceSettings}.
+ */
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public static final DocumentProcessorServiceClient create(DocumentProcessorServiceStub stub) {
+ return new DocumentProcessorServiceClient(stub);
+ }
+
+ /**
+ * Constructs an instance of DocumentProcessorServiceClient, 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 DocumentProcessorServiceClient(DocumentProcessorServiceSettings settings)
+ throws IOException {
+ this.settings = settings;
+ this.stub = ((DocumentProcessorServiceStubSettings) settings.getStubSettings()).createStub();
+ this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ protected DocumentProcessorServiceClient(DocumentProcessorServiceStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
+ }
+
+ public final DocumentProcessorServiceSettings getSettings() {
+ return settings;
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public DocumentProcessorServiceStub getStub() {
+ return stub;
+ }
+
+ /**
+ * Returns the OperationsClient that can be used to query the status of a long-running operation
+ * returned by another API method call.
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationsClient getOperationsClient() {
+ return operationsClient;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Processes a single document.
+ *
+ * Sample code: + * + *
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient = DocumentProcessorServiceClient.create()) {
+ * ProcessorName name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
+ * ProcessResponse response = documentProcessorServiceClient.processDocument(name);
+ * }
+ *
+ *
+ * @param name Required. The processor resource name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ProcessResponse processDocument(ProcessorName name) {
+ ProcessRequest request =
+ ProcessRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return processDocument(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Processes a single document.
+ *
+ * Sample code: + * + *
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient = DocumentProcessorServiceClient.create()) {
+ * ProcessorName name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
+ * ProcessResponse response = documentProcessorServiceClient.processDocument(name.toString());
+ * }
+ *
+ *
+ * @param name Required. The processor resource name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ProcessResponse processDocument(String name) {
+ ProcessRequest request = ProcessRequest.newBuilder().setName(name).build();
+ return processDocument(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Processes a single document.
+ *
+ * Sample code: + * + *
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient = DocumentProcessorServiceClient.create()) {
+ * ProcessorName name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
+ * ProcessRequest request = ProcessRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * ProcessResponse response = documentProcessorServiceClient.processDocument(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 ProcessResponse processDocument(ProcessRequest request) {
+ return processDocumentCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Processes a single document.
+ *
+ * Sample code: + * + *
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient = DocumentProcessorServiceClient.create()) {
+ * ProcessorName name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
+ * ProcessRequest request = ProcessRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * ApiFuture<ProcessResponse> future = documentProcessorServiceClient.processDocumentCallable().futureCall(request);
+ * // Do something
+ * ProcessResponse response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallableSample code: + * + *
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient = DocumentProcessorServiceClient.create()) {
+ * ProcessorName name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
+ * BatchProcessResponse response = documentProcessorServiceClient.batchProcessDocumentsAsync(name).get();
+ * }
+ *
+ *
+ * @param name Required. The processor resource name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFutureSample code: + * + *
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient = DocumentProcessorServiceClient.create()) {
+ * ProcessorName name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
+ * BatchProcessResponse response = documentProcessorServiceClient.batchProcessDocumentsAsync(name.toString()).get();
+ * }
+ *
+ *
+ * @param name Required. The processor resource name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFutureSample code: + * + *
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient = DocumentProcessorServiceClient.create()) {
+ * ProcessorName name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
+ * BatchProcessRequest request = BatchProcessRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * BatchProcessResponse response = documentProcessorServiceClient.batchProcessDocumentsAsync(request).get();
+ * }
+ *
+ *
+ * @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
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFutureSample code: + * + *
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient = DocumentProcessorServiceClient.create()) {
+ * ProcessorName name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
+ * BatchProcessRequest request = BatchProcessRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * OperationFuture<BatchProcessResponse, BatchProcessMetadata> future = documentProcessorServiceClient.batchProcessDocumentsOperationCallable().futureCall(request);
+ * // Do something
+ * BatchProcessResponse response = future.get();
+ * }
+ *
+ */
+ @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+ public final OperationCallableSample code: + * + *
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient = DocumentProcessorServiceClient.create()) {
+ * ProcessorName name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
+ * BatchProcessRequest request = BatchProcessRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * ApiFuture<Operation> future = documentProcessorServiceClient.batchProcessDocumentsCallable().futureCall(request);
+ * // Do something
+ * Operation response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallableSample code: + * + *
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient = DocumentProcessorServiceClient.create()) {
+ * HumanReviewConfigName humanReviewConfig = HumanReviewConfigName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
+ * ReviewDocumentResponse response = documentProcessorServiceClient.reviewDocumentAsync(humanReviewConfig).get();
+ * }
+ *
+ *
+ * @param humanReviewConfig Required. The resource name of the HumanReviewConfig that the document
+ * will be reviewed with.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFutureSample code: + * + *
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient = DocumentProcessorServiceClient.create()) {
+ * HumanReviewConfigName humanReviewConfig = HumanReviewConfigName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
+ * ReviewDocumentResponse response = documentProcessorServiceClient.reviewDocumentAsync(humanReviewConfig.toString()).get();
+ * }
+ *
+ *
+ * @param humanReviewConfig Required. The resource name of the HumanReviewConfig that the document
+ * will be reviewed with.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFutureSample code: + * + *
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient = DocumentProcessorServiceClient.create()) {
+ * HumanReviewConfigName humanReviewConfig = HumanReviewConfigName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
+ * ReviewDocumentRequest request = ReviewDocumentRequest.newBuilder()
+ * .setHumanReviewConfig(humanReviewConfig.toString())
+ * .build();
+ * ReviewDocumentResponse response = documentProcessorServiceClient.reviewDocumentAsync(request).get();
+ * }
+ *
+ *
+ * @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
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFutureSample code: + * + *
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient = DocumentProcessorServiceClient.create()) {
+ * HumanReviewConfigName humanReviewConfig = HumanReviewConfigName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
+ * ReviewDocumentRequest request = ReviewDocumentRequest.newBuilder()
+ * .setHumanReviewConfig(humanReviewConfig.toString())
+ * .build();
+ * OperationFuture<ReviewDocumentResponse, ReviewDocumentOperationMetadata> future = documentProcessorServiceClient.reviewDocumentOperationCallable().futureCall(request);
+ * // Do something
+ * ReviewDocumentResponse response = future.get();
+ * }
+ *
+ */
+ @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+ public final OperationCallable<
+ ReviewDocumentRequest, ReviewDocumentResponse, ReviewDocumentOperationMetadata>
+ reviewDocumentOperationCallable() {
+ return stub.reviewDocumentOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Send a document for Human Review. The input document should be processed by the specified
+ * processor.
+ *
+ * Sample code: + * + *
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient = DocumentProcessorServiceClient.create()) {
+ * HumanReviewConfigName humanReviewConfig = HumanReviewConfigName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
+ * ReviewDocumentRequest request = ReviewDocumentRequest.newBuilder()
+ * .setHumanReviewConfig(humanReviewConfig.toString())
+ * .build();
+ * ApiFuture<Operation> future = documentProcessorServiceClient.reviewDocumentCallable().futureCall(request);
+ * // Do something
+ * Operation response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallableThe default instance has everything set to sensible defaults: + * + *
The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *
For example, to set the total timeout of processDocument to 30 seconds: + * + *
+ *
+ * DocumentProcessorServiceSettings.Builder documentProcessorServiceSettingsBuilder =
+ * DocumentProcessorServiceSettings.newBuilder();
+ * documentProcessorServiceSettingsBuilder
+ * .processDocumentSettings()
+ * .setRetrySettings(
+ * documentProcessorServiceSettingsBuilder.processDocumentSettings().getRetrySettings().toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * DocumentProcessorServiceSettings documentProcessorServiceSettings = documentProcessorServiceSettingsBuilder.build();
+ *
+ *
+ */
+@Generated("by gapic-generator")
+@BetaApi
+public class DocumentProcessorServiceSettings
+ extends ClientSettingsNote: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction The interfaces provided are listed below, along with usage samples.
+ *
+ * ============================== DocumentProcessorServiceClient ==============================
+ *
+ * Service Description: Service to call Cloud DocumentAI to process documents according to the
+ * processor's definition. Processors are built using state-of-the-art Google AI such as natural
+ * language, computer vision, and translation to extract structured information from unstructured or
+ * semi-structured documents.
+ *
+ * Sample for DocumentProcessorServiceClient:
+ *
+ * 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 DocumentProcessorServiceStub implements BackgroundResource {
+
+ @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+ public OperationsStub getOperationsStub() {
+ throw new UnsupportedOperationException("Not implemented: getOperationsStub()");
+ }
+
+ public UnaryCallable The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the total timeout of processDocument to 30 seconds:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction This class is for advanced usage.
+ */
+@Generated("by gapic-generator")
+@BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+public class GrpcDocumentProcessorServiceCallableFactory implements GrpcStubCallableFactory {
+ @Override
+ public This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator")
+@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+public class GrpcDocumentProcessorServiceStub extends DocumentProcessorServiceStub {
+
+ private static final MethodDescriptor
+ *
+ */
+@Generated("by gapic-generator")
+package com.google.cloud.documentai.v1beta3;
+
+import javax.annotation.Generated;
diff --git a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/DocumentProcessorServiceStub.java b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/DocumentProcessorServiceStub.java
new file mode 100644
index 00000000..a408e717
--- /dev/null
+++ b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/DocumentProcessorServiceStub.java
@@ -0,0 +1,77 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.google.cloud.documentai.v1beta3.stub;
+
+import com.google.api.core.BetaApi;
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.documentai.v1beta3.BatchProcessMetadata;
+import com.google.cloud.documentai.v1beta3.BatchProcessRequest;
+import com.google.cloud.documentai.v1beta3.BatchProcessResponse;
+import com.google.cloud.documentai.v1beta3.ProcessRequest;
+import com.google.cloud.documentai.v1beta3.ProcessResponse;
+import com.google.cloud.documentai.v1beta3.ReviewDocumentOperationMetadata;
+import com.google.cloud.documentai.v1beta3.ReviewDocumentRequest;
+import com.google.cloud.documentai.v1beta3.ReviewDocumentResponse;
+import com.google.longrunning.Operation;
+import com.google.longrunning.stub.OperationsStub;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS
+/**
+ * Base stub class for Cloud Document AI API.
+ *
+ *
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient = DocumentProcessorServiceClient.create()) {
+ * ProcessorName name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
+ * ProcessResponse response = documentProcessorServiceClient.processDocument(name);
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ */
+@Generated("by gapic-generator")
+@BetaApi
+public class DocumentProcessorServiceStubSettings
+ extends StubSettings
+ * DocumentProcessorServiceStubSettings.Builder documentProcessorServiceSettingsBuilder =
+ * DocumentProcessorServiceStubSettings.newBuilder();
+ * documentProcessorServiceSettingsBuilder
+ * .processDocumentSettings()
+ * .setRetrySettings(
+ * documentProcessorServiceSettingsBuilder.processDocumentSettings().getRetrySettings().toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * DocumentProcessorServiceStubSettings documentProcessorServiceSettings = documentProcessorServiceSettingsBuilder.build();
+ *
+ *
+ * The long running operation metadata for batch process method. + *+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.BatchProcessMetadata} + */ +public final class BatchProcessMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.BatchProcessMetadata) + BatchProcessMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchProcessMetadata.newBuilder() to construct. + private BatchProcessMetadata(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private BatchProcessMetadata() { + state_ = 0; + stateMessage_ = ""; + individualProcessStatuses_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchProcessMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchProcessMetadata( + 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: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + stateMessage_ = s; + break; + } + case 26: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + individualProcessStatuses_ = + new java.util.ArrayList< + com.google.cloud.documentai.v1beta3.BatchProcessMetadata + .IndividualProcessStatus>(); + mutable_bitField0_ |= 0x00000001; + } + individualProcessStatuses_.add( + input.readMessage( + com.google.cloud.documentai.v1beta3.BatchProcessMetadata + .IndividualProcessStatus.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + individualProcessStatuses_ = + java.util.Collections.unmodifiableList(individualProcessStatuses_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_BatchProcessMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_BatchProcessMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.BatchProcessMetadata.class, + com.google.cloud.documentai.v1beta3.BatchProcessMetadata.Builder.class); + } + + /** + * + * + *
+ * Possible states of the batch processing operation. + *+ * + * Protobuf enum {@code google.cloud.documentai.v1beta3.BatchProcessMetadata.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+ * The default value. This value is used if the state is omitted. + *+ * + *
STATE_UNSPECIFIED = 0;
+ */
+ STATE_UNSPECIFIED(0),
+ /**
+ *
+ *
+ * + * Request operation is waiting for scheduling. + *+ * + *
WAITING = 1;
+ */
+ WAITING(1),
+ /**
+ *
+ *
+ * + * Request is being processed. + *+ * + *
RUNNING = 2;
+ */
+ RUNNING(2),
+ /**
+ *
+ *
+ * + * The batch processing completed successfully. + *+ * + *
SUCCEEDED = 3;
+ */
+ SUCCEEDED(3),
+ /**
+ *
+ *
+ * + * The batch processing was being cancelled. + *+ * + *
CANCELLING = 4;
+ */
+ CANCELLING(4),
+ /**
+ *
+ *
+ * + * The batch processing was cancelled. + *+ * + *
CANCELLED = 5;
+ */
+ CANCELLED(5),
+ /**
+ *
+ *
+ * + * The batch processing has failed. + *+ * + *
FAILED = 6;
+ */
+ FAILED(6),
+ UNRECOGNIZED(-1),
+ ;
+
+ /**
+ *
+ *
+ * + * The default value. This value is used if the state is omitted. + *+ * + *
STATE_UNSPECIFIED = 0;
+ */
+ public static final int STATE_UNSPECIFIED_VALUE = 0;
+ /**
+ *
+ *
+ * + * Request operation is waiting for scheduling. + *+ * + *
WAITING = 1;
+ */
+ public static final int WAITING_VALUE = 1;
+ /**
+ *
+ *
+ * + * Request is being processed. + *+ * + *
RUNNING = 2;
+ */
+ public static final int RUNNING_VALUE = 2;
+ /**
+ *
+ *
+ * + * The batch processing completed successfully. + *+ * + *
SUCCEEDED = 3;
+ */
+ public static final int SUCCEEDED_VALUE = 3;
+ /**
+ *
+ *
+ * + * The batch processing was being cancelled. + *+ * + *
CANCELLING = 4;
+ */
+ public static final int CANCELLING_VALUE = 4;
+ /**
+ *
+ *
+ * + * The batch processing was cancelled. + *+ * + *
CANCELLED = 5;
+ */
+ public static final int CANCELLED_VALUE = 5;
+ /**
+ *
+ *
+ * + * The batch processing has failed. + *+ * + *
FAILED = 6;
+ */
+ public static final int FAILED_VALUE = 6;
+
+ public final int getNumber() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalArgumentException(
+ "Can't get the number of an unknown enum value.");
+ }
+ return value;
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static State valueOf(int value) {
+ return forNumber(value);
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ */
+ public static State forNumber(int value) {
+ switch (value) {
+ case 0:
+ return STATE_UNSPECIFIED;
+ case 1:
+ return WAITING;
+ case 2:
+ return RUNNING;
+ case 3:
+ return SUCCEEDED;
+ case 4:
+ return CANCELLING;
+ case 5:
+ return CANCELLED;
+ case 6:
+ return FAILED;
+ default:
+ return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap+ * The source of the document, same as the [input_gcs_source] field in the + * request when the batch process started. The batch process is started by + * take snapshot of that document, since a user can move or change that + * document during the process. + *+ * + *
string input_gcs_source = 1;
+ *
+ * @return The inputGcsSource.
+ */
+ java.lang.String getInputGcsSource();
+ /**
+ *
+ *
+ * + * The source of the document, same as the [input_gcs_source] field in the + * request when the batch process started. The batch process is started by + * take snapshot of that document, since a user can move or change that + * document during the process. + *+ * + *
string input_gcs_source = 1;
+ *
+ * @return The bytes for inputGcsSource.
+ */
+ com.google.protobuf.ByteString getInputGcsSourceBytes();
+
+ /**
+ *
+ *
+ * + * The status of the processing of the document. + *+ * + *
.google.rpc.Status status = 2;
+ *
+ * @return Whether the status field is set.
+ */
+ boolean hasStatus();
+ /**
+ *
+ *
+ * + * The status of the processing of the document. + *+ * + *
.google.rpc.Status status = 2;
+ *
+ * @return The status.
+ */
+ com.google.rpc.Status getStatus();
+ /**
+ *
+ *
+ * + * The status of the processing of the document. + *+ * + *
.google.rpc.Status status = 2;
+ */
+ com.google.rpc.StatusOrBuilder getStatusOrBuilder();
+
+ /**
+ *
+ *
+ * + * The output_gcs_destination (in the request as 'output_gcs_destination') + * of the processed document if it was successful, otherwise empty. + *+ * + *
string output_gcs_destination = 3;
+ *
+ * @return The outputGcsDestination.
+ */
+ java.lang.String getOutputGcsDestination();
+ /**
+ *
+ *
+ * + * The output_gcs_destination (in the request as 'output_gcs_destination') + * of the processed document if it was successful, otherwise empty. + *+ * + *
string output_gcs_destination = 3;
+ *
+ * @return The bytes for outputGcsDestination.
+ */
+ com.google.protobuf.ByteString getOutputGcsDestinationBytes();
+
+ /**
+ *
+ *
+ * + * The name of the operation triggered by the processed document. If the + * human review process is not triggered, this field will be empty. It has + * the same response type and metadata as the long running operation + * returned by ReviewDocument method. + *+ * + *
string human_review_operation = 4;
+ *
+ * @return The humanReviewOperation.
+ */
+ java.lang.String getHumanReviewOperation();
+ /**
+ *
+ *
+ * + * The name of the operation triggered by the processed document. If the + * human review process is not triggered, this field will be empty. It has + * the same response type and metadata as the long running operation + * returned by ReviewDocument method. + *+ * + *
string human_review_operation = 4;
+ *
+ * @return The bytes for humanReviewOperation.
+ */
+ com.google.protobuf.ByteString getHumanReviewOperationBytes();
+ }
+ /**
+ *
+ *
+ * + * The status of a each individual document in the batch process. + *+ * + * Protobuf type {@code + * google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus} + */ + public static final class IndividualProcessStatus extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus) + IndividualProcessStatusOrBuilder { + private static final long serialVersionUID = 0L; + // Use IndividualProcessStatus.newBuilder() to construct. + private IndividualProcessStatus(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private IndividualProcessStatus() { + inputGcsSource_ = ""; + outputGcsDestination_ = ""; + humanReviewOperation_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IndividualProcessStatus(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private IndividualProcessStatus( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + inputGcsSource_ = s; + break; + } + case 18: + { + com.google.rpc.Status.Builder subBuilder = null; + if (status_ != null) { + subBuilder = status_.toBuilder(); + } + status_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(status_); + status_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + outputGcsDestination_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + humanReviewOperation_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_BatchProcessMetadata_IndividualProcessStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_BatchProcessMetadata_IndividualProcessStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus + .class, + com.google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus + .Builder.class); + } + + public static final int INPUT_GCS_SOURCE_FIELD_NUMBER = 1; + private volatile java.lang.Object inputGcsSource_; + /** + * + * + *
+ * The source of the document, same as the [input_gcs_source] field in the + * request when the batch process started. The batch process is started by + * take snapshot of that document, since a user can move or change that + * document during the process. + *+ * + *
string input_gcs_source = 1;
+ *
+ * @return The inputGcsSource.
+ */
+ @java.lang.Override
+ public java.lang.String getInputGcsSource() {
+ java.lang.Object ref = inputGcsSource_;
+ 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();
+ inputGcsSource_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * The source of the document, same as the [input_gcs_source] field in the + * request when the batch process started. The batch process is started by + * take snapshot of that document, since a user can move or change that + * document during the process. + *+ * + *
string input_gcs_source = 1;
+ *
+ * @return The bytes for inputGcsSource.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getInputGcsSourceBytes() {
+ java.lang.Object ref = inputGcsSource_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ inputGcsSource_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int STATUS_FIELD_NUMBER = 2;
+ private com.google.rpc.Status status_;
+ /**
+ *
+ *
+ * + * The status of the processing of the document. + *+ * + *
.google.rpc.Status status = 2;
+ *
+ * @return Whether the status field is set.
+ */
+ @java.lang.Override
+ public boolean hasStatus() {
+ return status_ != null;
+ }
+ /**
+ *
+ *
+ * + * The status of the processing of the document. + *+ * + *
.google.rpc.Status status = 2;
+ *
+ * @return The status.
+ */
+ @java.lang.Override
+ public com.google.rpc.Status getStatus() {
+ return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_;
+ }
+ /**
+ *
+ *
+ * + * The status of the processing of the document. + *+ * + *
.google.rpc.Status status = 2;
+ */
+ @java.lang.Override
+ public com.google.rpc.StatusOrBuilder getStatusOrBuilder() {
+ return getStatus();
+ }
+
+ public static final int OUTPUT_GCS_DESTINATION_FIELD_NUMBER = 3;
+ private volatile java.lang.Object outputGcsDestination_;
+ /**
+ *
+ *
+ * + * The output_gcs_destination (in the request as 'output_gcs_destination') + * of the processed document if it was successful, otherwise empty. + *+ * + *
string output_gcs_destination = 3;
+ *
+ * @return The outputGcsDestination.
+ */
+ @java.lang.Override
+ public java.lang.String getOutputGcsDestination() {
+ java.lang.Object ref = outputGcsDestination_;
+ 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();
+ outputGcsDestination_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * The output_gcs_destination (in the request as 'output_gcs_destination') + * of the processed document if it was successful, otherwise empty. + *+ * + *
string output_gcs_destination = 3;
+ *
+ * @return The bytes for outputGcsDestination.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getOutputGcsDestinationBytes() {
+ java.lang.Object ref = outputGcsDestination_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ outputGcsDestination_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int HUMAN_REVIEW_OPERATION_FIELD_NUMBER = 4;
+ private volatile java.lang.Object humanReviewOperation_;
+ /**
+ *
+ *
+ * + * The name of the operation triggered by the processed document. If the + * human review process is not triggered, this field will be empty. It has + * the same response type and metadata as the long running operation + * returned by ReviewDocument method. + *+ * + *
string human_review_operation = 4;
+ *
+ * @return The humanReviewOperation.
+ */
+ @java.lang.Override
+ public java.lang.String getHumanReviewOperation() {
+ java.lang.Object ref = humanReviewOperation_;
+ 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();
+ humanReviewOperation_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * The name of the operation triggered by the processed document. If the + * human review process is not triggered, this field will be empty. It has + * the same response type and metadata as the long running operation + * returned by ReviewDocument method. + *+ * + *
string human_review_operation = 4;
+ *
+ * @return The bytes for humanReviewOperation.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getHumanReviewOperationBytes() {
+ java.lang.Object ref = humanReviewOperation_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ humanReviewOperation_ = 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 (!getInputGcsSourceBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, inputGcsSource_);
+ }
+ if (status_ != null) {
+ output.writeMessage(2, getStatus());
+ }
+ if (!getOutputGcsDestinationBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, outputGcsDestination_);
+ }
+ if (!getHumanReviewOperationBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 4, humanReviewOperation_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getInputGcsSourceBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, inputGcsSource_);
+ }
+ if (status_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStatus());
+ }
+ if (!getOutputGcsDestinationBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, outputGcsDestination_);
+ }
+ if (!getHumanReviewOperationBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, humanReviewOperation_);
+ }
+ 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.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus other =
+ (com.google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus) obj;
+
+ if (!getInputGcsSource().equals(other.getInputGcsSource())) return false;
+ if (hasStatus() != other.hasStatus()) return false;
+ if (hasStatus()) {
+ if (!getStatus().equals(other.getStatus())) return false;
+ }
+ if (!getOutputGcsDestination().equals(other.getOutputGcsDestination())) return false;
+ if (!getHumanReviewOperation().equals(other.getHumanReviewOperation())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + INPUT_GCS_SOURCE_FIELD_NUMBER;
+ hash = (53 * hash) + getInputGcsSource().hashCode();
+ if (hasStatus()) {
+ hash = (37 * hash) + STATUS_FIELD_NUMBER;
+ hash = (53 * hash) + getStatus().hashCode();
+ }
+ hash = (37 * hash) + OUTPUT_GCS_DESTINATION_FIELD_NUMBER;
+ hash = (53 * hash) + getOutputGcsDestination().hashCode();
+ hash = (37 * hash) + HUMAN_REVIEW_OPERATION_FIELD_NUMBER;
+ hash = (53 * hash) + getHumanReviewOperation().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus
+ parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus
+ 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.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus
+ parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus
+ 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.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus
+ parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus
+ parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus
+ parseFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus
+ 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.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus
+ parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus
+ 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.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus
+ parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus
+ 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.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus
+ 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;
+ }
+ /**
+ *
+ *
+ * + * The status of a each individual document in the batch process. + *+ * + * Protobuf type {@code + * google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The source of the document, same as the [input_gcs_source] field in the + * request when the batch process started. The batch process is started by + * take snapshot of that document, since a user can move or change that + * document during the process. + *+ * + *
string input_gcs_source = 1;
+ *
+ * @return The inputGcsSource.
+ */
+ public java.lang.String getInputGcsSource() {
+ java.lang.Object ref = inputGcsSource_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ inputGcsSource_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The source of the document, same as the [input_gcs_source] field in the + * request when the batch process started. The batch process is started by + * take snapshot of that document, since a user can move or change that + * document during the process. + *+ * + *
string input_gcs_source = 1;
+ *
+ * @return The bytes for inputGcsSource.
+ */
+ public com.google.protobuf.ByteString getInputGcsSourceBytes() {
+ java.lang.Object ref = inputGcsSource_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ inputGcsSource_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The source of the document, same as the [input_gcs_source] field in the + * request when the batch process started. The batch process is started by + * take snapshot of that document, since a user can move or change that + * document during the process. + *+ * + *
string input_gcs_source = 1;
+ *
+ * @param value The inputGcsSource to set.
+ * @return This builder for chaining.
+ */
+ public Builder setInputGcsSource(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ inputGcsSource_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The source of the document, same as the [input_gcs_source] field in the + * request when the batch process started. The batch process is started by + * take snapshot of that document, since a user can move or change that + * document during the process. + *+ * + *
string input_gcs_source = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearInputGcsSource() {
+
+ inputGcsSource_ = getDefaultInstance().getInputGcsSource();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The source of the document, same as the [input_gcs_source] field in the + * request when the batch process started. The batch process is started by + * take snapshot of that document, since a user can move or change that + * document during the process. + *+ * + *
string input_gcs_source = 1;
+ *
+ * @param value The bytes for inputGcsSource to set.
+ * @return This builder for chaining.
+ */
+ public Builder setInputGcsSourceBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ inputGcsSource_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.rpc.Status status_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>
+ statusBuilder_;
+ /**
+ *
+ *
+ * + * The status of the processing of the document. + *+ * + *
.google.rpc.Status status = 2;
+ *
+ * @return Whether the status field is set.
+ */
+ public boolean hasStatus() {
+ return statusBuilder_ != null || status_ != null;
+ }
+ /**
+ *
+ *
+ * + * The status of the processing of the document. + *+ * + *
.google.rpc.Status status = 2;
+ *
+ * @return The status.
+ */
+ public com.google.rpc.Status getStatus() {
+ if (statusBuilder_ == null) {
+ return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_;
+ } else {
+ return statusBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * The status of the processing of the document. + *+ * + *
.google.rpc.Status status = 2;
+ */
+ public Builder setStatus(com.google.rpc.Status value) {
+ if (statusBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ status_ = value;
+ onChanged();
+ } else {
+ statusBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The status of the processing of the document. + *+ * + *
.google.rpc.Status status = 2;
+ */
+ public Builder setStatus(com.google.rpc.Status.Builder builderForValue) {
+ if (statusBuilder_ == null) {
+ status_ = builderForValue.build();
+ onChanged();
+ } else {
+ statusBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The status of the processing of the document. + *+ * + *
.google.rpc.Status status = 2;
+ */
+ public Builder mergeStatus(com.google.rpc.Status value) {
+ if (statusBuilder_ == null) {
+ if (status_ != null) {
+ status_ = com.google.rpc.Status.newBuilder(status_).mergeFrom(value).buildPartial();
+ } else {
+ status_ = value;
+ }
+ onChanged();
+ } else {
+ statusBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The status of the processing of the document. + *+ * + *
.google.rpc.Status status = 2;
+ */
+ public Builder clearStatus() {
+ if (statusBuilder_ == null) {
+ status_ = null;
+ onChanged();
+ } else {
+ status_ = null;
+ statusBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The status of the processing of the document. + *+ * + *
.google.rpc.Status status = 2;
+ */
+ public com.google.rpc.Status.Builder getStatusBuilder() {
+
+ onChanged();
+ return getStatusFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * The status of the processing of the document. + *+ * + *
.google.rpc.Status status = 2;
+ */
+ public com.google.rpc.StatusOrBuilder getStatusOrBuilder() {
+ if (statusBuilder_ != null) {
+ return statusBuilder_.getMessageOrBuilder();
+ } else {
+ return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_;
+ }
+ }
+ /**
+ *
+ *
+ * + * The status of the processing of the document. + *+ * + *
.google.rpc.Status status = 2;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>
+ getStatusFieldBuilder() {
+ if (statusBuilder_ == null) {
+ statusBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.rpc.Status,
+ com.google.rpc.Status.Builder,
+ com.google.rpc.StatusOrBuilder>(getStatus(), getParentForChildren(), isClean());
+ status_ = null;
+ }
+ return statusBuilder_;
+ }
+
+ private java.lang.Object outputGcsDestination_ = "";
+ /**
+ *
+ *
+ * + * The output_gcs_destination (in the request as 'output_gcs_destination') + * of the processed document if it was successful, otherwise empty. + *+ * + *
string output_gcs_destination = 3;
+ *
+ * @return The outputGcsDestination.
+ */
+ public java.lang.String getOutputGcsDestination() {
+ java.lang.Object ref = outputGcsDestination_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ outputGcsDestination_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The output_gcs_destination (in the request as 'output_gcs_destination') + * of the processed document if it was successful, otherwise empty. + *+ * + *
string output_gcs_destination = 3;
+ *
+ * @return The bytes for outputGcsDestination.
+ */
+ public com.google.protobuf.ByteString getOutputGcsDestinationBytes() {
+ java.lang.Object ref = outputGcsDestination_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ outputGcsDestination_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The output_gcs_destination (in the request as 'output_gcs_destination') + * of the processed document if it was successful, otherwise empty. + *+ * + *
string output_gcs_destination = 3;
+ *
+ * @param value The outputGcsDestination to set.
+ * @return This builder for chaining.
+ */
+ public Builder setOutputGcsDestination(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ outputGcsDestination_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The output_gcs_destination (in the request as 'output_gcs_destination') + * of the processed document if it was successful, otherwise empty. + *+ * + *
string output_gcs_destination = 3;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearOutputGcsDestination() {
+
+ outputGcsDestination_ = getDefaultInstance().getOutputGcsDestination();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The output_gcs_destination (in the request as 'output_gcs_destination') + * of the processed document if it was successful, otherwise empty. + *+ * + *
string output_gcs_destination = 3;
+ *
+ * @param value The bytes for outputGcsDestination to set.
+ * @return This builder for chaining.
+ */
+ public Builder setOutputGcsDestinationBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ outputGcsDestination_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object humanReviewOperation_ = "";
+ /**
+ *
+ *
+ * + * The name of the operation triggered by the processed document. If the + * human review process is not triggered, this field will be empty. It has + * the same response type and metadata as the long running operation + * returned by ReviewDocument method. + *+ * + *
string human_review_operation = 4;
+ *
+ * @return The humanReviewOperation.
+ */
+ public java.lang.String getHumanReviewOperation() {
+ java.lang.Object ref = humanReviewOperation_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ humanReviewOperation_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The name of the operation triggered by the processed document. If the + * human review process is not triggered, this field will be empty. It has + * the same response type and metadata as the long running operation + * returned by ReviewDocument method. + *+ * + *
string human_review_operation = 4;
+ *
+ * @return The bytes for humanReviewOperation.
+ */
+ public com.google.protobuf.ByteString getHumanReviewOperationBytes() {
+ java.lang.Object ref = humanReviewOperation_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ humanReviewOperation_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The name of the operation triggered by the processed document. If the + * human review process is not triggered, this field will be empty. It has + * the same response type and metadata as the long running operation + * returned by ReviewDocument method. + *+ * + *
string human_review_operation = 4;
+ *
+ * @param value The humanReviewOperation to set.
+ * @return This builder for chaining.
+ */
+ public Builder setHumanReviewOperation(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ humanReviewOperation_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The name of the operation triggered by the processed document. If the + * human review process is not triggered, this field will be empty. It has + * the same response type and metadata as the long running operation + * returned by ReviewDocument method. + *+ * + *
string human_review_operation = 4;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearHumanReviewOperation() {
+
+ humanReviewOperation_ = getDefaultInstance().getHumanReviewOperation();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The name of the operation triggered by the processed document. If the + * human review process is not triggered, this field will be empty. It has + * the same response type and metadata as the long running operation + * returned by ReviewDocument method. + *+ * + *
string human_review_operation = 4;
+ *
+ * @param value The bytes for humanReviewOperation to set.
+ * @return This builder for chaining.
+ */
+ public Builder setHumanReviewOperationBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ humanReviewOperation_ = value;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus)
+ private static final com.google.cloud.documentai.v1beta3.BatchProcessMetadata
+ .IndividualProcessStatus
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE =
+ new com.google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus();
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The state of the current batch processing. + *+ * + *
.google.cloud.documentai.v1beta3.BatchProcessMetadata.State state = 1;
+ *
+ * @return The enum numeric value on the wire for state.
+ */
+ @java.lang.Override
+ public int getStateValue() {
+ return state_;
+ }
+ /**
+ *
+ *
+ * + * The state of the current batch processing. + *+ * + *
.google.cloud.documentai.v1beta3.BatchProcessMetadata.State state = 1;
+ *
+ * @return The state.
+ */
+ @java.lang.Override
+ public com.google.cloud.documentai.v1beta3.BatchProcessMetadata.State getState() {
+ @SuppressWarnings("deprecation")
+ com.google.cloud.documentai.v1beta3.BatchProcessMetadata.State result =
+ com.google.cloud.documentai.v1beta3.BatchProcessMetadata.State.valueOf(state_);
+ return result == null
+ ? com.google.cloud.documentai.v1beta3.BatchProcessMetadata.State.UNRECOGNIZED
+ : result;
+ }
+
+ public static final int STATE_MESSAGE_FIELD_NUMBER = 2;
+ private volatile java.lang.Object stateMessage_;
+ /**
+ *
+ *
+ * + * A message providing more details about the current state of processing. + * For example, the error message if the operation is failed. + *+ * + *
string state_message = 2;
+ *
+ * @return The stateMessage.
+ */
+ @java.lang.Override
+ public java.lang.String getStateMessage() {
+ java.lang.Object ref = stateMessage_;
+ 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();
+ stateMessage_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * A message providing more details about the current state of processing. + * For example, the error message if the operation is failed. + *+ * + *
string state_message = 2;
+ *
+ * @return The bytes for stateMessage.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getStateMessageBytes() {
+ java.lang.Object ref = stateMessage_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ stateMessage_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int CREATE_TIME_FIELD_NUMBER = 3;
+ private com.google.protobuf.Timestamp createTime_;
+ /**
+ *
+ *
+ * + * The creation time of the operation. + *+ * + *
.google.protobuf.Timestamp create_time = 3;
+ *
+ * @return Whether the createTime field is set.
+ */
+ @java.lang.Override
+ public boolean hasCreateTime() {
+ return createTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * The creation time of the operation. + *+ * + *
.google.protobuf.Timestamp create_time = 3;
+ *
+ * @return The createTime.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Timestamp getCreateTime() {
+ return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
+ }
+ /**
+ *
+ *
+ * + * The creation time of the operation. + *+ * + *
.google.protobuf.Timestamp create_time = 3;
+ */
+ @java.lang.Override
+ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
+ return getCreateTime();
+ }
+
+ public static final int UPDATE_TIME_FIELD_NUMBER = 4;
+ private com.google.protobuf.Timestamp updateTime_;
+ /**
+ *
+ *
+ * + * The last update time of the operation. + *+ * + *
.google.protobuf.Timestamp update_time = 4;
+ *
+ * @return Whether the updateTime field is set.
+ */
+ @java.lang.Override
+ public boolean hasUpdateTime() {
+ return updateTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * The last update time of the operation. + *+ * + *
.google.protobuf.Timestamp update_time = 4;
+ *
+ * @return The updateTime.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Timestamp getUpdateTime() {
+ return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_;
+ }
+ /**
+ *
+ *
+ * + * The last update time of the operation. + *+ * + *
.google.protobuf.Timestamp update_time = 4;
+ */
+ @java.lang.Override
+ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
+ return getUpdateTime();
+ }
+
+ public static final int INDIVIDUAL_PROCESS_STATUSES_FIELD_NUMBER = 5;
+ private java.util.List<
+ com.google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus>
+ individualProcessStatuses_;
+ /**
+ *
+ *
+ * + * The list of response details of each document. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus individual_process_statuses = 5;
+ *
+ */
+ @java.lang.Override
+ public java.util.List<
+ com.google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus>
+ getIndividualProcessStatusesList() {
+ return individualProcessStatuses_;
+ }
+ /**
+ *
+ *
+ * + * The list of response details of each document. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus individual_process_statuses = 5;
+ *
+ */
+ @java.lang.Override
+ public java.util.List<
+ ? extends
+ com.google.cloud.documentai.v1beta3.BatchProcessMetadata
+ .IndividualProcessStatusOrBuilder>
+ getIndividualProcessStatusesOrBuilderList() {
+ return individualProcessStatuses_;
+ }
+ /**
+ *
+ *
+ * + * The list of response details of each document. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus individual_process_statuses = 5;
+ *
+ */
+ @java.lang.Override
+ public int getIndividualProcessStatusesCount() {
+ return individualProcessStatuses_.size();
+ }
+ /**
+ *
+ *
+ * + * The list of response details of each document. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus individual_process_statuses = 5;
+ *
+ */
+ @java.lang.Override
+ public com.google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus
+ getIndividualProcessStatuses(int index) {
+ return individualProcessStatuses_.get(index);
+ }
+ /**
+ *
+ *
+ * + * The list of response details of each document. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus individual_process_statuses = 5;
+ *
+ */
+ @java.lang.Override
+ public com.google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatusOrBuilder
+ getIndividualProcessStatusesOrBuilder(int index) {
+ return individualProcessStatuses_.get(index);
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (state_
+ != com.google.cloud.documentai.v1beta3.BatchProcessMetadata.State.STATE_UNSPECIFIED
+ .getNumber()) {
+ output.writeEnum(1, state_);
+ }
+ if (!getStateMessageBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, stateMessage_);
+ }
+ if (createTime_ != null) {
+ output.writeMessage(3, getCreateTime());
+ }
+ if (updateTime_ != null) {
+ output.writeMessage(4, getUpdateTime());
+ }
+ for (int i = 0; i < individualProcessStatuses_.size(); i++) {
+ output.writeMessage(5, individualProcessStatuses_.get(i));
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (state_
+ != com.google.cloud.documentai.v1beta3.BatchProcessMetadata.State.STATE_UNSPECIFIED
+ .getNumber()) {
+ size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, state_);
+ }
+ if (!getStateMessageBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, stateMessage_);
+ }
+ if (createTime_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCreateTime());
+ }
+ if (updateTime_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUpdateTime());
+ }
+ for (int i = 0; i < individualProcessStatuses_.size(); i++) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 5, individualProcessStatuses_.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.documentai.v1beta3.BatchProcessMetadata)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.documentai.v1beta3.BatchProcessMetadata other =
+ (com.google.cloud.documentai.v1beta3.BatchProcessMetadata) obj;
+
+ if (state_ != other.state_) return false;
+ if (!getStateMessage().equals(other.getStateMessage())) return false;
+ if (hasCreateTime() != other.hasCreateTime()) return false;
+ if (hasCreateTime()) {
+ if (!getCreateTime().equals(other.getCreateTime())) return false;
+ }
+ if (hasUpdateTime() != other.hasUpdateTime()) return false;
+ if (hasUpdateTime()) {
+ if (!getUpdateTime().equals(other.getUpdateTime())) return false;
+ }
+ if (!getIndividualProcessStatusesList().equals(other.getIndividualProcessStatusesList()))
+ return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + STATE_FIELD_NUMBER;
+ hash = (53 * hash) + state_;
+ hash = (37 * hash) + STATE_MESSAGE_FIELD_NUMBER;
+ hash = (53 * hash) + getStateMessage().hashCode();
+ if (hasCreateTime()) {
+ hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + getCreateTime().hashCode();
+ }
+ if (hasUpdateTime()) {
+ hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + getUpdateTime().hashCode();
+ }
+ if (getIndividualProcessStatusesCount() > 0) {
+ hash = (37 * hash) + INDIVIDUAL_PROCESS_STATUSES_FIELD_NUMBER;
+ hash = (53 * hash) + getIndividualProcessStatusesList().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BatchProcessMetadata parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BatchProcessMetadata 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.documentai.v1beta3.BatchProcessMetadata parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BatchProcessMetadata 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.documentai.v1beta3.BatchProcessMetadata parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BatchProcessMetadata parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BatchProcessMetadata parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BatchProcessMetadata 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.documentai.v1beta3.BatchProcessMetadata parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BatchProcessMetadata 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.documentai.v1beta3.BatchProcessMetadata parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BatchProcessMetadata 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.documentai.v1beta3.BatchProcessMetadata 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;
+ }
+ /**
+ *
+ *
+ * + * The long running operation metadata for batch process method. + *+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.BatchProcessMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The state of the current batch processing. + *+ * + *
.google.cloud.documentai.v1beta3.BatchProcessMetadata.State state = 1;
+ *
+ * @return The enum numeric value on the wire for state.
+ */
+ @java.lang.Override
+ public int getStateValue() {
+ return state_;
+ }
+ /**
+ *
+ *
+ * + * The state of the current batch processing. + *+ * + *
.google.cloud.documentai.v1beta3.BatchProcessMetadata.State state = 1;
+ *
+ * @param value The enum numeric value on the wire for state to set.
+ * @return This builder for chaining.
+ */
+ public Builder setStateValue(int value) {
+
+ state_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The state of the current batch processing. + *+ * + *
.google.cloud.documentai.v1beta3.BatchProcessMetadata.State state = 1;
+ *
+ * @return The state.
+ */
+ @java.lang.Override
+ public com.google.cloud.documentai.v1beta3.BatchProcessMetadata.State getState() {
+ @SuppressWarnings("deprecation")
+ com.google.cloud.documentai.v1beta3.BatchProcessMetadata.State result =
+ com.google.cloud.documentai.v1beta3.BatchProcessMetadata.State.valueOf(state_);
+ return result == null
+ ? com.google.cloud.documentai.v1beta3.BatchProcessMetadata.State.UNRECOGNIZED
+ : result;
+ }
+ /**
+ *
+ *
+ * + * The state of the current batch processing. + *+ * + *
.google.cloud.documentai.v1beta3.BatchProcessMetadata.State state = 1;
+ *
+ * @param value The state to set.
+ * @return This builder for chaining.
+ */
+ public Builder setState(com.google.cloud.documentai.v1beta3.BatchProcessMetadata.State value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ state_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The state of the current batch processing. + *+ * + *
.google.cloud.documentai.v1beta3.BatchProcessMetadata.State state = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearState() {
+
+ state_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object stateMessage_ = "";
+ /**
+ *
+ *
+ * + * A message providing more details about the current state of processing. + * For example, the error message if the operation is failed. + *+ * + *
string state_message = 2;
+ *
+ * @return The stateMessage.
+ */
+ public java.lang.String getStateMessage() {
+ java.lang.Object ref = stateMessage_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ stateMessage_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * A message providing more details about the current state of processing. + * For example, the error message if the operation is failed. + *+ * + *
string state_message = 2;
+ *
+ * @return The bytes for stateMessage.
+ */
+ public com.google.protobuf.ByteString getStateMessageBytes() {
+ java.lang.Object ref = stateMessage_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ stateMessage_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * A message providing more details about the current state of processing. + * For example, the error message if the operation is failed. + *+ * + *
string state_message = 2;
+ *
+ * @param value The stateMessage to set.
+ * @return This builder for chaining.
+ */
+ public Builder setStateMessage(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ stateMessage_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A message providing more details about the current state of processing. + * For example, the error message if the operation is failed. + *+ * + *
string state_message = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearStateMessage() {
+
+ stateMessage_ = getDefaultInstance().getStateMessage();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A message providing more details about the current state of processing. + * For example, the error message if the operation is failed. + *+ * + *
string state_message = 2;
+ *
+ * @param value The bytes for stateMessage to set.
+ * @return This builder for chaining.
+ */
+ public Builder setStateMessageBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ stateMessage_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.Timestamp createTime_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ createTimeBuilder_;
+ /**
+ *
+ *
+ * + * The creation time of the operation. + *+ * + *
.google.protobuf.Timestamp create_time = 3;
+ *
+ * @return Whether the createTime field is set.
+ */
+ public boolean hasCreateTime() {
+ return createTimeBuilder_ != null || createTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * The creation time of the operation. + *+ * + *
.google.protobuf.Timestamp create_time = 3;
+ *
+ * @return The createTime.
+ */
+ public com.google.protobuf.Timestamp getCreateTime() {
+ if (createTimeBuilder_ == null) {
+ return createTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : createTime_;
+ } else {
+ return createTimeBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * The creation time of the operation. + *+ * + *
.google.protobuf.Timestamp create_time = 3;
+ */
+ public Builder setCreateTime(com.google.protobuf.Timestamp value) {
+ if (createTimeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ createTime_ = value;
+ onChanged();
+ } else {
+ createTimeBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The creation time of the operation. + *+ * + *
.google.protobuf.Timestamp create_time = 3;
+ */
+ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (createTimeBuilder_ == null) {
+ createTime_ = builderForValue.build();
+ onChanged();
+ } else {
+ createTimeBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The creation time of the operation. + *+ * + *
.google.protobuf.Timestamp create_time = 3;
+ */
+ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) {
+ if (createTimeBuilder_ == null) {
+ if (createTime_ != null) {
+ createTime_ =
+ com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial();
+ } else {
+ createTime_ = value;
+ }
+ onChanged();
+ } else {
+ createTimeBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The creation time of the operation. + *+ * + *
.google.protobuf.Timestamp create_time = 3;
+ */
+ public Builder clearCreateTime() {
+ if (createTimeBuilder_ == null) {
+ createTime_ = null;
+ onChanged();
+ } else {
+ createTime_ = null;
+ createTimeBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The creation time of the operation. + *+ * + *
.google.protobuf.Timestamp create_time = 3;
+ */
+ public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() {
+
+ onChanged();
+ return getCreateTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * The creation time of the operation. + *+ * + *
.google.protobuf.Timestamp create_time = 3;
+ */
+ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
+ if (createTimeBuilder_ != null) {
+ return createTimeBuilder_.getMessageOrBuilder();
+ } else {
+ return createTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : createTime_;
+ }
+ }
+ /**
+ *
+ *
+ * + * The creation time of the operation. + *+ * + *
.google.protobuf.Timestamp create_time = 3;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ getCreateTimeFieldBuilder() {
+ if (createTimeBuilder_ == null) {
+ createTimeBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>(
+ getCreateTime(), getParentForChildren(), isClean());
+ createTime_ = null;
+ }
+ return createTimeBuilder_;
+ }
+
+ private com.google.protobuf.Timestamp updateTime_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ updateTimeBuilder_;
+ /**
+ *
+ *
+ * + * The last update time of the operation. + *+ * + *
.google.protobuf.Timestamp update_time = 4;
+ *
+ * @return Whether the updateTime field is set.
+ */
+ public boolean hasUpdateTime() {
+ return updateTimeBuilder_ != null || updateTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * The last update time of the operation. + *+ * + *
.google.protobuf.Timestamp update_time = 4;
+ *
+ * @return The updateTime.
+ */
+ public com.google.protobuf.Timestamp getUpdateTime() {
+ if (updateTimeBuilder_ == null) {
+ return updateTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : updateTime_;
+ } else {
+ return updateTimeBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * The last update time of the operation. + *+ * + *
.google.protobuf.Timestamp update_time = 4;
+ */
+ public Builder setUpdateTime(com.google.protobuf.Timestamp value) {
+ if (updateTimeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ updateTime_ = value;
+ onChanged();
+ } else {
+ updateTimeBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The last update time of the operation. + *+ * + *
.google.protobuf.Timestamp update_time = 4;
+ */
+ public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (updateTimeBuilder_ == null) {
+ updateTime_ = builderForValue.build();
+ onChanged();
+ } else {
+ updateTimeBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The last update time of the operation. + *+ * + *
.google.protobuf.Timestamp update_time = 4;
+ */
+ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) {
+ if (updateTimeBuilder_ == null) {
+ if (updateTime_ != null) {
+ updateTime_ =
+ com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial();
+ } else {
+ updateTime_ = value;
+ }
+ onChanged();
+ } else {
+ updateTimeBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The last update time of the operation. + *+ * + *
.google.protobuf.Timestamp update_time = 4;
+ */
+ public Builder clearUpdateTime() {
+ if (updateTimeBuilder_ == null) {
+ updateTime_ = null;
+ onChanged();
+ } else {
+ updateTime_ = null;
+ updateTimeBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The last update time of the operation. + *+ * + *
.google.protobuf.Timestamp update_time = 4;
+ */
+ public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() {
+
+ onChanged();
+ return getUpdateTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * The last update time of the operation. + *+ * + *
.google.protobuf.Timestamp update_time = 4;
+ */
+ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
+ if (updateTimeBuilder_ != null) {
+ return updateTimeBuilder_.getMessageOrBuilder();
+ } else {
+ return updateTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : updateTime_;
+ }
+ }
+ /**
+ *
+ *
+ * + * The last update time of the operation. + *+ * + *
.google.protobuf.Timestamp update_time = 4;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ getUpdateTimeFieldBuilder() {
+ if (updateTimeBuilder_ == null) {
+ updateTimeBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>(
+ getUpdateTime(), getParentForChildren(), isClean());
+ updateTime_ = null;
+ }
+ return updateTimeBuilder_;
+ }
+
+ private java.util.List<
+ com.google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus>
+ individualProcessStatuses_ = java.util.Collections.emptyList();
+
+ private void ensureIndividualProcessStatusesIsMutable() {
+ if (!((bitField0_ & 0x00000001) != 0)) {
+ individualProcessStatuses_ =
+ new java.util.ArrayList<
+ com.google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus>(
+ individualProcessStatuses_);
+ bitField0_ |= 0x00000001;
+ }
+ }
+
+ private com.google.protobuf.RepeatedFieldBuilderV3<
+ com.google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus,
+ com.google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus
+ .Builder,
+ com.google.cloud.documentai.v1beta3.BatchProcessMetadata
+ .IndividualProcessStatusOrBuilder>
+ individualProcessStatusesBuilder_;
+
+ /**
+ *
+ *
+ * + * The list of response details of each document. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus individual_process_statuses = 5;
+ *
+ */
+ public java.util.List<
+ com.google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus>
+ getIndividualProcessStatusesList() {
+ if (individualProcessStatusesBuilder_ == null) {
+ return java.util.Collections.unmodifiableList(individualProcessStatuses_);
+ } else {
+ return individualProcessStatusesBuilder_.getMessageList();
+ }
+ }
+ /**
+ *
+ *
+ * + * The list of response details of each document. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus individual_process_statuses = 5;
+ *
+ */
+ public int getIndividualProcessStatusesCount() {
+ if (individualProcessStatusesBuilder_ == null) {
+ return individualProcessStatuses_.size();
+ } else {
+ return individualProcessStatusesBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ *
+ * + * The list of response details of each document. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus individual_process_statuses = 5;
+ *
+ */
+ public com.google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus
+ getIndividualProcessStatuses(int index) {
+ if (individualProcessStatusesBuilder_ == null) {
+ return individualProcessStatuses_.get(index);
+ } else {
+ return individualProcessStatusesBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * The list of response details of each document. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus individual_process_statuses = 5;
+ *
+ */
+ public Builder setIndividualProcessStatuses(
+ int index,
+ com.google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus value) {
+ if (individualProcessStatusesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureIndividualProcessStatusesIsMutable();
+ individualProcessStatuses_.set(index, value);
+ onChanged();
+ } else {
+ individualProcessStatusesBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The list of response details of each document. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus individual_process_statuses = 5;
+ *
+ */
+ public Builder setIndividualProcessStatuses(
+ int index,
+ com.google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus.Builder
+ builderForValue) {
+ if (individualProcessStatusesBuilder_ == null) {
+ ensureIndividualProcessStatusesIsMutable();
+ individualProcessStatuses_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ individualProcessStatusesBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The list of response details of each document. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus individual_process_statuses = 5;
+ *
+ */
+ public Builder addIndividualProcessStatuses(
+ com.google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus value) {
+ if (individualProcessStatusesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureIndividualProcessStatusesIsMutable();
+ individualProcessStatuses_.add(value);
+ onChanged();
+ } else {
+ individualProcessStatusesBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The list of response details of each document. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus individual_process_statuses = 5;
+ *
+ */
+ public Builder addIndividualProcessStatuses(
+ int index,
+ com.google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus value) {
+ if (individualProcessStatusesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureIndividualProcessStatusesIsMutable();
+ individualProcessStatuses_.add(index, value);
+ onChanged();
+ } else {
+ individualProcessStatusesBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The list of response details of each document. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus individual_process_statuses = 5;
+ *
+ */
+ public Builder addIndividualProcessStatuses(
+ com.google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus.Builder
+ builderForValue) {
+ if (individualProcessStatusesBuilder_ == null) {
+ ensureIndividualProcessStatusesIsMutable();
+ individualProcessStatuses_.add(builderForValue.build());
+ onChanged();
+ } else {
+ individualProcessStatusesBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The list of response details of each document. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus individual_process_statuses = 5;
+ *
+ */
+ public Builder addIndividualProcessStatuses(
+ int index,
+ com.google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus.Builder
+ builderForValue) {
+ if (individualProcessStatusesBuilder_ == null) {
+ ensureIndividualProcessStatusesIsMutable();
+ individualProcessStatuses_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ individualProcessStatusesBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The list of response details of each document. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus individual_process_statuses = 5;
+ *
+ */
+ public Builder addAllIndividualProcessStatuses(
+ java.lang.Iterable<
+ ? extends
+ com.google.cloud.documentai.v1beta3.BatchProcessMetadata
+ .IndividualProcessStatus>
+ values) {
+ if (individualProcessStatusesBuilder_ == null) {
+ ensureIndividualProcessStatusesIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, individualProcessStatuses_);
+ onChanged();
+ } else {
+ individualProcessStatusesBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The list of response details of each document. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus individual_process_statuses = 5;
+ *
+ */
+ public Builder clearIndividualProcessStatuses() {
+ if (individualProcessStatusesBuilder_ == null) {
+ individualProcessStatuses_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ individualProcessStatusesBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The list of response details of each document. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus individual_process_statuses = 5;
+ *
+ */
+ public Builder removeIndividualProcessStatuses(int index) {
+ if (individualProcessStatusesBuilder_ == null) {
+ ensureIndividualProcessStatusesIsMutable();
+ individualProcessStatuses_.remove(index);
+ onChanged();
+ } else {
+ individualProcessStatusesBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The list of response details of each document. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus individual_process_statuses = 5;
+ *
+ */
+ public com.google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus.Builder
+ getIndividualProcessStatusesBuilder(int index) {
+ return getIndividualProcessStatusesFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ *
+ * + * The list of response details of each document. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus individual_process_statuses = 5;
+ *
+ */
+ public com.google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatusOrBuilder
+ getIndividualProcessStatusesOrBuilder(int index) {
+ if (individualProcessStatusesBuilder_ == null) {
+ return individualProcessStatuses_.get(index);
+ } else {
+ return individualProcessStatusesBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * The list of response details of each document. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus individual_process_statuses = 5;
+ *
+ */
+ public java.util.List<
+ ? extends
+ com.google.cloud.documentai.v1beta3.BatchProcessMetadata
+ .IndividualProcessStatusOrBuilder>
+ getIndividualProcessStatusesOrBuilderList() {
+ if (individualProcessStatusesBuilder_ != null) {
+ return individualProcessStatusesBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(individualProcessStatuses_);
+ }
+ }
+ /**
+ *
+ *
+ * + * The list of response details of each document. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus individual_process_statuses = 5;
+ *
+ */
+ public com.google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus.Builder
+ addIndividualProcessStatusesBuilder() {
+ return getIndividualProcessStatusesFieldBuilder()
+ .addBuilder(
+ com.google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus
+ .getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * The list of response details of each document. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus individual_process_statuses = 5;
+ *
+ */
+ public com.google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus.Builder
+ addIndividualProcessStatusesBuilder(int index) {
+ return getIndividualProcessStatusesFieldBuilder()
+ .addBuilder(
+ index,
+ com.google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus
+ .getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * The list of response details of each document. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus individual_process_statuses = 5;
+ *
+ */
+ public java.util.List<
+ com.google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus
+ .Builder>
+ getIndividualProcessStatusesBuilderList() {
+ return getIndividualProcessStatusesFieldBuilder().getBuilderList();
+ }
+
+ private com.google.protobuf.RepeatedFieldBuilderV3<
+ com.google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus,
+ com.google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus
+ .Builder,
+ com.google.cloud.documentai.v1beta3.BatchProcessMetadata
+ .IndividualProcessStatusOrBuilder>
+ getIndividualProcessStatusesFieldBuilder() {
+ if (individualProcessStatusesBuilder_ == null) {
+ individualProcessStatusesBuilder_ =
+ new com.google.protobuf.RepeatedFieldBuilderV3<
+ com.google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus,
+ com.google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus
+ .Builder,
+ com.google.cloud.documentai.v1beta3.BatchProcessMetadata
+ .IndividualProcessStatusOrBuilder>(
+ individualProcessStatuses_,
+ ((bitField0_ & 0x00000001) != 0),
+ getParentForChildren(),
+ isClean());
+ individualProcessStatuses_ = null;
+ }
+ return individualProcessStatusesBuilder_;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.BatchProcessMetadata)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.BatchProcessMetadata)
+ private static final com.google.cloud.documentai.v1beta3.BatchProcessMetadata DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta3.BatchProcessMetadata();
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BatchProcessMetadata getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The state of the current batch processing. + *+ * + *
.google.cloud.documentai.v1beta3.BatchProcessMetadata.State state = 1;
+ *
+ * @return The enum numeric value on the wire for state.
+ */
+ int getStateValue();
+ /**
+ *
+ *
+ * + * The state of the current batch processing. + *+ * + *
.google.cloud.documentai.v1beta3.BatchProcessMetadata.State state = 1;
+ *
+ * @return The state.
+ */
+ com.google.cloud.documentai.v1beta3.BatchProcessMetadata.State getState();
+
+ /**
+ *
+ *
+ * + * A message providing more details about the current state of processing. + * For example, the error message if the operation is failed. + *+ * + *
string state_message = 2;
+ *
+ * @return The stateMessage.
+ */
+ java.lang.String getStateMessage();
+ /**
+ *
+ *
+ * + * A message providing more details about the current state of processing. + * For example, the error message if the operation is failed. + *+ * + *
string state_message = 2;
+ *
+ * @return The bytes for stateMessage.
+ */
+ com.google.protobuf.ByteString getStateMessageBytes();
+
+ /**
+ *
+ *
+ * + * The creation time of the operation. + *+ * + *
.google.protobuf.Timestamp create_time = 3;
+ *
+ * @return Whether the createTime field is set.
+ */
+ boolean hasCreateTime();
+ /**
+ *
+ *
+ * + * The creation time of the operation. + *+ * + *
.google.protobuf.Timestamp create_time = 3;
+ *
+ * @return The createTime.
+ */
+ com.google.protobuf.Timestamp getCreateTime();
+ /**
+ *
+ *
+ * + * The creation time of the operation. + *+ * + *
.google.protobuf.Timestamp create_time = 3;
+ */
+ com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder();
+
+ /**
+ *
+ *
+ * + * The last update time of the operation. + *+ * + *
.google.protobuf.Timestamp update_time = 4;
+ *
+ * @return Whether the updateTime field is set.
+ */
+ boolean hasUpdateTime();
+ /**
+ *
+ *
+ * + * The last update time of the operation. + *+ * + *
.google.protobuf.Timestamp update_time = 4;
+ *
+ * @return The updateTime.
+ */
+ com.google.protobuf.Timestamp getUpdateTime();
+ /**
+ *
+ *
+ * + * The last update time of the operation. + *+ * + *
.google.protobuf.Timestamp update_time = 4;
+ */
+ com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder();
+
+ /**
+ *
+ *
+ * + * The list of response details of each document. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus individual_process_statuses = 5;
+ *
+ */
+ java.util.List+ * The list of response details of each document. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus individual_process_statuses = 5;
+ *
+ */
+ com.google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus
+ getIndividualProcessStatuses(int index);
+ /**
+ *
+ *
+ * + * The list of response details of each document. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus individual_process_statuses = 5;
+ *
+ */
+ int getIndividualProcessStatusesCount();
+ /**
+ *
+ *
+ * + * The list of response details of each document. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus individual_process_statuses = 5;
+ *
+ */
+ java.util.List<
+ ? extends
+ com.google.cloud.documentai.v1beta3.BatchProcessMetadata
+ .IndividualProcessStatusOrBuilder>
+ getIndividualProcessStatusesOrBuilderList();
+ /**
+ *
+ *
+ * + * The list of response details of each document. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus individual_process_statuses = 5;
+ *
+ */
+ com.google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatusOrBuilder
+ getIndividualProcessStatusesOrBuilder(int index);
+}
diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessRequest.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessRequest.java
new file mode 100644
index 00000000..32095281
--- /dev/null
+++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessRequest.java
@@ -0,0 +1,3117 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/documentai/v1beta3/document_processor_service.proto
+
+package com.google.cloud.documentai.v1beta3;
+
+/**
+ *
+ *
+ * + * Request message for batch process document method. + *+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.BatchProcessRequest} + */ +public final class BatchProcessRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.BatchProcessRequest) + BatchProcessRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchProcessRequest.newBuilder() to construct. + private BatchProcessRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private BatchProcessRequest() { + name_ = ""; + inputConfigs_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchProcessRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchProcessRequest( + 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: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + inputConfigs_ = + new java.util.ArrayList< + com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig>(); + mutable_bitField0_ |= 0x00000001; + } + inputConfigs_.add( + input.readMessage( + com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig + .parser(), + extensionRegistry)); + break; + } + case 26: + { + com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig.Builder + subBuilder = null; + if (outputConfig_ != null) { + subBuilder = outputConfig_.toBuilder(); + } + outputConfig_ = + input.readMessage( + com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(outputConfig_); + outputConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + inputConfigs_ = java.util.Collections.unmodifiableList(inputConfigs_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_BatchProcessRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_BatchProcessRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.BatchProcessRequest.class, + com.google.cloud.documentai.v1beta3.BatchProcessRequest.Builder.class); + } + + public interface BatchInputConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+ * The Cloud Storage location as the source of the document. + *+ * + *
string gcs_source = 1;
+ *
+ * @return The gcsSource.
+ */
+ java.lang.String getGcsSource();
+ /**
+ *
+ *
+ * + * The Cloud Storage location as the source of the document. + *+ * + *
string gcs_source = 1;
+ *
+ * @return The bytes for gcsSource.
+ */
+ com.google.protobuf.ByteString getGcsSourceBytes();
+
+ /**
+ *
+ *
+ * + * Mimetype of the input. If the input is a raw document, the supported + * mimetypes are application/pdf, image/tiff, and image/gif. + * If the input is a [Document] proto, the type should be application/json. + *+ * + *
string mime_type = 2;
+ *
+ * @return The mimeType.
+ */
+ java.lang.String getMimeType();
+ /**
+ *
+ *
+ * + * Mimetype of the input. If the input is a raw document, the supported + * mimetypes are application/pdf, image/tiff, and image/gif. + * If the input is a [Document] proto, the type should be application/json. + *+ * + *
string mime_type = 2;
+ *
+ * @return The bytes for mimeType.
+ */
+ com.google.protobuf.ByteString getMimeTypeBytes();
+ }
+ /**
+ *
+ *
+ * + * The message for input config in batch process. + *+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig} + */ + public static final class BatchInputConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig) + BatchInputConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchInputConfig.newBuilder() to construct. + private BatchInputConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private BatchInputConfig() { + gcsSource_ = ""; + mimeType_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchInputConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchInputConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + gcsSource_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + mimeType_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_BatchProcessRequest_BatchInputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_BatchProcessRequest_BatchInputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig.class, + com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig.Builder + .class); + } + + public static final int GCS_SOURCE_FIELD_NUMBER = 1; + private volatile java.lang.Object gcsSource_; + /** + * + * + *
+ * The Cloud Storage location as the source of the document. + *+ * + *
string gcs_source = 1;
+ *
+ * @return The gcsSource.
+ */
+ @java.lang.Override
+ public java.lang.String getGcsSource() {
+ java.lang.Object ref = gcsSource_;
+ 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();
+ gcsSource_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * The Cloud Storage location as the source of the document. + *+ * + *
string gcs_source = 1;
+ *
+ * @return The bytes for gcsSource.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getGcsSourceBytes() {
+ java.lang.Object ref = gcsSource_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ gcsSource_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int MIME_TYPE_FIELD_NUMBER = 2;
+ private volatile java.lang.Object mimeType_;
+ /**
+ *
+ *
+ * + * Mimetype of the input. If the input is a raw document, the supported + * mimetypes are application/pdf, image/tiff, and image/gif. + * If the input is a [Document] proto, the type should be application/json. + *+ * + *
string mime_type = 2;
+ *
+ * @return The mimeType.
+ */
+ @java.lang.Override
+ public java.lang.String getMimeType() {
+ java.lang.Object ref = mimeType_;
+ 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();
+ mimeType_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Mimetype of the input. If the input is a raw document, the supported + * mimetypes are application/pdf, image/tiff, and image/gif. + * If the input is a [Document] proto, the type should be application/json. + *+ * + *
string mime_type = 2;
+ *
+ * @return The bytes for mimeType.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getMimeTypeBytes() {
+ java.lang.Object ref = mimeType_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ mimeType_ = 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 (!getGcsSourceBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, gcsSource_);
+ }
+ if (!getMimeTypeBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, mimeType_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getGcsSourceBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, gcsSource_);
+ }
+ if (!getMimeTypeBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, mimeType_);
+ }
+ 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.documentai.v1beta3.BatchProcessRequest.BatchInputConfig)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig other =
+ (com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig) obj;
+
+ if (!getGcsSource().equals(other.getGcsSource())) return false;
+ if (!getMimeType().equals(other.getMimeType())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + GCS_SOURCE_FIELD_NUMBER;
+ hash = (53 * hash) + getGcsSource().hashCode();
+ hash = (37 * hash) + MIME_TYPE_FIELD_NUMBER;
+ hash = (53 * hash) + getMimeType().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig
+ parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig
+ 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.documentai.v1beta3.BatchProcessRequest.BatchInputConfig
+ parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig
+ 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.documentai.v1beta3.BatchProcessRequest.BatchInputConfig
+ parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig
+ parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig
+ parseFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig
+ 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.documentai.v1beta3.BatchProcessRequest.BatchInputConfig
+ parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig
+ 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.documentai.v1beta3.BatchProcessRequest.BatchInputConfig
+ parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig
+ 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.documentai.v1beta3.BatchProcessRequest.BatchInputConfig 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;
+ }
+ /**
+ *
+ *
+ * + * The message for input config in batch process. + *+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The Cloud Storage location as the source of the document. + *+ * + *
string gcs_source = 1;
+ *
+ * @return The gcsSource.
+ */
+ public java.lang.String getGcsSource() {
+ java.lang.Object ref = gcsSource_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ gcsSource_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The Cloud Storage location as the source of the document. + *+ * + *
string gcs_source = 1;
+ *
+ * @return The bytes for gcsSource.
+ */
+ public com.google.protobuf.ByteString getGcsSourceBytes() {
+ java.lang.Object ref = gcsSource_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ gcsSource_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The Cloud Storage location as the source of the document. + *+ * + *
string gcs_source = 1;
+ *
+ * @param value The gcsSource to set.
+ * @return This builder for chaining.
+ */
+ public Builder setGcsSource(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ gcsSource_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The Cloud Storage location as the source of the document. + *+ * + *
string gcs_source = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearGcsSource() {
+
+ gcsSource_ = getDefaultInstance().getGcsSource();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The Cloud Storage location as the source of the document. + *+ * + *
string gcs_source = 1;
+ *
+ * @param value The bytes for gcsSource to set.
+ * @return This builder for chaining.
+ */
+ public Builder setGcsSourceBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ gcsSource_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object mimeType_ = "";
+ /**
+ *
+ *
+ * + * Mimetype of the input. If the input is a raw document, the supported + * mimetypes are application/pdf, image/tiff, and image/gif. + * If the input is a [Document] proto, the type should be application/json. + *+ * + *
string mime_type = 2;
+ *
+ * @return The mimeType.
+ */
+ public java.lang.String getMimeType() {
+ java.lang.Object ref = mimeType_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ mimeType_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Mimetype of the input. If the input is a raw document, the supported + * mimetypes are application/pdf, image/tiff, and image/gif. + * If the input is a [Document] proto, the type should be application/json. + *+ * + *
string mime_type = 2;
+ *
+ * @return The bytes for mimeType.
+ */
+ public com.google.protobuf.ByteString getMimeTypeBytes() {
+ java.lang.Object ref = mimeType_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ mimeType_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Mimetype of the input. If the input is a raw document, the supported + * mimetypes are application/pdf, image/tiff, and image/gif. + * If the input is a [Document] proto, the type should be application/json. + *+ * + *
string mime_type = 2;
+ *
+ * @param value The mimeType to set.
+ * @return This builder for chaining.
+ */
+ public Builder setMimeType(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ mimeType_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Mimetype of the input. If the input is a raw document, the supported + * mimetypes are application/pdf, image/tiff, and image/gif. + * If the input is a [Document] proto, the type should be application/json. + *+ * + *
string mime_type = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearMimeType() {
+
+ mimeType_ = getDefaultInstance().getMimeType();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Mimetype of the input. If the input is a raw document, the supported + * mimetypes are application/pdf, image/tiff, and image/gif. + * If the input is a [Document] proto, the type should be application/json. + *+ * + *
string mime_type = 2;
+ *
+ * @param value The bytes for mimeType to set.
+ * @return This builder for chaining.
+ */
+ public Builder setMimeTypeBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ mimeType_ = value;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig)
+ private static final com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE =
+ new com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig();
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The output Cloud Storage directory to put the processed documents. + *+ * + *
string gcs_destination = 1;
+ *
+ * @return The gcsDestination.
+ */
+ java.lang.String getGcsDestination();
+ /**
+ *
+ *
+ * + * The output Cloud Storage directory to put the processed documents. + *+ * + *
string gcs_destination = 1;
+ *
+ * @return The bytes for gcsDestination.
+ */
+ com.google.protobuf.ByteString getGcsDestinationBytes();
+ }
+ /**
+ *
+ *
+ * + * The message for output config in batch process. + *+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig} + */ + public static final class BatchOutputConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig) + BatchOutputConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchOutputConfig.newBuilder() to construct. + private BatchOutputConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private BatchOutputConfig() { + gcsDestination_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchOutputConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchOutputConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + gcsDestination_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_BatchProcessRequest_BatchOutputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_BatchProcessRequest_BatchOutputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig.class, + com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig.Builder + .class); + } + + public static final int GCS_DESTINATION_FIELD_NUMBER = 1; + private volatile java.lang.Object gcsDestination_; + /** + * + * + *
+ * The output Cloud Storage directory to put the processed documents. + *+ * + *
string gcs_destination = 1;
+ *
+ * @return The gcsDestination.
+ */
+ @java.lang.Override
+ public java.lang.String getGcsDestination() {
+ java.lang.Object ref = gcsDestination_;
+ 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();
+ gcsDestination_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * The output Cloud Storage directory to put the processed documents. + *+ * + *
string gcs_destination = 1;
+ *
+ * @return The bytes for gcsDestination.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getGcsDestinationBytes() {
+ java.lang.Object ref = gcsDestination_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ gcsDestination_ = 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 (!getGcsDestinationBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, gcsDestination_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getGcsDestinationBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, gcsDestination_);
+ }
+ 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.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig other =
+ (com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig) obj;
+
+ if (!getGcsDestination().equals(other.getGcsDestination())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + GCS_DESTINATION_FIELD_NUMBER;
+ hash = (53 * hash) + getGcsDestination().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig
+ parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig
+ 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.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig
+ parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig
+ 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.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig
+ parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig
+ parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig
+ parseFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig
+ 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.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig
+ parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig
+ 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.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig
+ parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig
+ 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.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig 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;
+ }
+ /**
+ *
+ *
+ * + * The message for output config in batch process. + *+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The output Cloud Storage directory to put the processed documents. + *+ * + *
string gcs_destination = 1;
+ *
+ * @return The gcsDestination.
+ */
+ public java.lang.String getGcsDestination() {
+ java.lang.Object ref = gcsDestination_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ gcsDestination_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The output Cloud Storage directory to put the processed documents. + *+ * + *
string gcs_destination = 1;
+ *
+ * @return The bytes for gcsDestination.
+ */
+ public com.google.protobuf.ByteString getGcsDestinationBytes() {
+ java.lang.Object ref = gcsDestination_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ gcsDestination_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The output Cloud Storage directory to put the processed documents. + *+ * + *
string gcs_destination = 1;
+ *
+ * @param value The gcsDestination to set.
+ * @return This builder for chaining.
+ */
+ public Builder setGcsDestination(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ gcsDestination_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The output Cloud Storage directory to put the processed documents. + *+ * + *
string gcs_destination = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearGcsDestination() {
+
+ gcsDestination_ = getDefaultInstance().getGcsDestination();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The output Cloud Storage directory to put the processed documents. + *+ * + *
string gcs_destination = 1;
+ *
+ * @param value The bytes for gcsDestination to set.
+ * @return This builder for chaining.
+ */
+ public Builder setGcsDestinationBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ gcsDestination_ = value;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig)
+ private static final com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE =
+ new com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig();
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Required. The processor resource name. + *+ * + *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The name.
+ */
+ @java.lang.Override
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The processor resource name. + *+ * + *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The bytes for name.
+ */
+ @java.lang.Override
+ 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 INPUT_CONFIGS_FIELD_NUMBER = 2;
+ private java.util.List+ * The input config for each single document in the batch process. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2;
+ *
+ */
+ @java.lang.Override
+ public java.util.List+ * The input config for each single document in the batch process. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2;
+ *
+ */
+ @java.lang.Override
+ public java.util.List<
+ ? extends
+ com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfigOrBuilder>
+ getInputConfigsOrBuilderList() {
+ return inputConfigs_;
+ }
+ /**
+ *
+ *
+ * + * The input config for each single document in the batch process. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2;
+ *
+ */
+ @java.lang.Override
+ public int getInputConfigsCount() {
+ return inputConfigs_.size();
+ }
+ /**
+ *
+ *
+ * + * The input config for each single document in the batch process. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2;
+ *
+ */
+ @java.lang.Override
+ public com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig getInputConfigs(
+ int index) {
+ return inputConfigs_.get(index);
+ }
+ /**
+ *
+ *
+ * + * The input config for each single document in the batch process. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2;
+ *
+ */
+ @java.lang.Override
+ public com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfigOrBuilder
+ getInputConfigsOrBuilder(int index) {
+ return inputConfigs_.get(index);
+ }
+
+ public static final int OUTPUT_CONFIG_FIELD_NUMBER = 3;
+ private com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig outputConfig_;
+ /**
+ *
+ *
+ * + * The overall output config for batch process. + *+ * + *
.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig output_config = 3;
+ *
+ *
+ * @return Whether the outputConfig field is set.
+ */
+ @java.lang.Override
+ public boolean hasOutputConfig() {
+ return outputConfig_ != null;
+ }
+ /**
+ *
+ *
+ * + * The overall output config for batch process. + *+ * + *
.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig output_config = 3;
+ *
+ *
+ * @return The outputConfig.
+ */
+ @java.lang.Override
+ public com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig
+ getOutputConfig() {
+ return outputConfig_ == null
+ ? com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig
+ .getDefaultInstance()
+ : outputConfig_;
+ }
+ /**
+ *
+ *
+ * + * The overall output config for batch process. + *+ * + *
.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig output_config = 3;
+ *
+ */
+ @java.lang.Override
+ public com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfigOrBuilder
+ getOutputConfigOrBuilder() {
+ return getOutputConfig();
+ }
+
+ 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_);
+ }
+ for (int i = 0; i < inputConfigs_.size(); i++) {
+ output.writeMessage(2, inputConfigs_.get(i));
+ }
+ if (outputConfig_ != null) {
+ output.writeMessage(3, getOutputConfig());
+ }
+ 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_);
+ }
+ for (int i = 0; i < inputConfigs_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, inputConfigs_.get(i));
+ }
+ if (outputConfig_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getOutputConfig());
+ }
+ 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.documentai.v1beta3.BatchProcessRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.documentai.v1beta3.BatchProcessRequest other =
+ (com.google.cloud.documentai.v1beta3.BatchProcessRequest) obj;
+
+ if (!getName().equals(other.getName())) return false;
+ if (!getInputConfigsList().equals(other.getInputConfigsList())) return false;
+ if (hasOutputConfig() != other.hasOutputConfig()) return false;
+ if (hasOutputConfig()) {
+ if (!getOutputConfig().equals(other.getOutputConfig())) return false;
+ }
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getName().hashCode();
+ if (getInputConfigsCount() > 0) {
+ hash = (37 * hash) + INPUT_CONFIGS_FIELD_NUMBER;
+ hash = (53 * hash) + getInputConfigsList().hashCode();
+ }
+ if (hasOutputConfig()) {
+ hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER;
+ hash = (53 * hash) + getOutputConfig().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BatchProcessRequest parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BatchProcessRequest 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.documentai.v1beta3.BatchProcessRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BatchProcessRequest 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.documentai.v1beta3.BatchProcessRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BatchProcessRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BatchProcessRequest parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BatchProcessRequest 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.documentai.v1beta3.BatchProcessRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BatchProcessRequest 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.documentai.v1beta3.BatchProcessRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BatchProcessRequest 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.documentai.v1beta3.BatchProcessRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * Request message for batch process document method. + *+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.BatchProcessRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Required. The processor resource name. + *+ * + *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The name.
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The processor resource name. + *+ * + *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The bytes for name.
+ */
+ public com.google.protobuf.ByteString getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The processor resource name. + *+ * + *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param value The name to set.
+ * @return This builder for chaining.
+ */
+ public Builder setName(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The processor resource name. + *+ * + *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearName() {
+
+ name_ = getDefaultInstance().getName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The processor resource name. + *+ * + *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param value The bytes for name to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNameBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.util.List+ * The input config for each single document in the batch process. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2;
+ *
+ */
+ public java.util.List+ * The input config for each single document in the batch process. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2;
+ *
+ */
+ public int getInputConfigsCount() {
+ if (inputConfigsBuilder_ == null) {
+ return inputConfigs_.size();
+ } else {
+ return inputConfigsBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ *
+ * + * The input config for each single document in the batch process. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2;
+ *
+ */
+ public com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig getInputConfigs(
+ int index) {
+ if (inputConfigsBuilder_ == null) {
+ return inputConfigs_.get(index);
+ } else {
+ return inputConfigsBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * The input config for each single document in the batch process. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2;
+ *
+ */
+ public Builder setInputConfigs(
+ int index, com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig value) {
+ if (inputConfigsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureInputConfigsIsMutable();
+ inputConfigs_.set(index, value);
+ onChanged();
+ } else {
+ inputConfigsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The input config for each single document in the batch process. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2;
+ *
+ */
+ public Builder setInputConfigs(
+ int index,
+ com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig.Builder
+ builderForValue) {
+ if (inputConfigsBuilder_ == null) {
+ ensureInputConfigsIsMutable();
+ inputConfigs_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ inputConfigsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The input config for each single document in the batch process. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2;
+ *
+ */
+ public Builder addInputConfigs(
+ com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig value) {
+ if (inputConfigsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureInputConfigsIsMutable();
+ inputConfigs_.add(value);
+ onChanged();
+ } else {
+ inputConfigsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The input config for each single document in the batch process. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2;
+ *
+ */
+ public Builder addInputConfigs(
+ int index, com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig value) {
+ if (inputConfigsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureInputConfigsIsMutable();
+ inputConfigs_.add(index, value);
+ onChanged();
+ } else {
+ inputConfigsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The input config for each single document in the batch process. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2;
+ *
+ */
+ public Builder addInputConfigs(
+ com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig.Builder
+ builderForValue) {
+ if (inputConfigsBuilder_ == null) {
+ ensureInputConfigsIsMutable();
+ inputConfigs_.add(builderForValue.build());
+ onChanged();
+ } else {
+ inputConfigsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The input config for each single document in the batch process. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2;
+ *
+ */
+ public Builder addInputConfigs(
+ int index,
+ com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig.Builder
+ builderForValue) {
+ if (inputConfigsBuilder_ == null) {
+ ensureInputConfigsIsMutable();
+ inputConfigs_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ inputConfigsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The input config for each single document in the batch process. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2;
+ *
+ */
+ public Builder addAllInputConfigs(
+ java.lang.Iterable<
+ ? extends com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig>
+ values) {
+ if (inputConfigsBuilder_ == null) {
+ ensureInputConfigsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, inputConfigs_);
+ onChanged();
+ } else {
+ inputConfigsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The input config for each single document in the batch process. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2;
+ *
+ */
+ public Builder clearInputConfigs() {
+ if (inputConfigsBuilder_ == null) {
+ inputConfigs_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ inputConfigsBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The input config for each single document in the batch process. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2;
+ *
+ */
+ public Builder removeInputConfigs(int index) {
+ if (inputConfigsBuilder_ == null) {
+ ensureInputConfigsIsMutable();
+ inputConfigs_.remove(index);
+ onChanged();
+ } else {
+ inputConfigsBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The input config for each single document in the batch process. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2;
+ *
+ */
+ public com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig.Builder
+ getInputConfigsBuilder(int index) {
+ return getInputConfigsFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ *
+ * + * The input config for each single document in the batch process. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2;
+ *
+ */
+ public com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfigOrBuilder
+ getInputConfigsOrBuilder(int index) {
+ if (inputConfigsBuilder_ == null) {
+ return inputConfigs_.get(index);
+ } else {
+ return inputConfigsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * The input config for each single document in the batch process. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2;
+ *
+ */
+ public java.util.List<
+ ? extends
+ com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfigOrBuilder>
+ getInputConfigsOrBuilderList() {
+ if (inputConfigsBuilder_ != null) {
+ return inputConfigsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(inputConfigs_);
+ }
+ }
+ /**
+ *
+ *
+ * + * The input config for each single document in the batch process. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2;
+ *
+ */
+ public com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig.Builder
+ addInputConfigsBuilder() {
+ return getInputConfigsFieldBuilder()
+ .addBuilder(
+ com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig
+ .getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * The input config for each single document in the batch process. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2;
+ *
+ */
+ public com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig.Builder
+ addInputConfigsBuilder(int index) {
+ return getInputConfigsFieldBuilder()
+ .addBuilder(
+ index,
+ com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig
+ .getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * The input config for each single document in the batch process. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2;
+ *
+ */
+ public java.util.List<
+ com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig.Builder>
+ getInputConfigsBuilderList() {
+ return getInputConfigsFieldBuilder().getBuilderList();
+ }
+
+ private com.google.protobuf.RepeatedFieldBuilderV3<
+ com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig,
+ com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig.Builder,
+ com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfigOrBuilder>
+ getInputConfigsFieldBuilder() {
+ if (inputConfigsBuilder_ == null) {
+ inputConfigsBuilder_ =
+ new com.google.protobuf.RepeatedFieldBuilderV3<
+ com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig,
+ com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig.Builder,
+ com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfigOrBuilder>(
+ inputConfigs_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean());
+ inputConfigs_ = null;
+ }
+ return inputConfigsBuilder_;
+ }
+
+ private com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig outputConfig_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig,
+ com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig.Builder,
+ com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfigOrBuilder>
+ outputConfigBuilder_;
+ /**
+ *
+ *
+ * + * The overall output config for batch process. + *+ * + *
+ * .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig output_config = 3;
+ *
+ *
+ * @return Whether the outputConfig field is set.
+ */
+ public boolean hasOutputConfig() {
+ return outputConfigBuilder_ != null || outputConfig_ != null;
+ }
+ /**
+ *
+ *
+ * + * The overall output config for batch process. + *+ * + *
+ * .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig output_config = 3;
+ *
+ *
+ * @return The outputConfig.
+ */
+ public com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig
+ getOutputConfig() {
+ if (outputConfigBuilder_ == null) {
+ return outputConfig_ == null
+ ? com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig
+ .getDefaultInstance()
+ : outputConfig_;
+ } else {
+ return outputConfigBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * The overall output config for batch process. + *+ * + *
+ * .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig output_config = 3;
+ *
+ */
+ public Builder setOutputConfig(
+ com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig value) {
+ if (outputConfigBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ outputConfig_ = value;
+ onChanged();
+ } else {
+ outputConfigBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The overall output config for batch process. + *+ * + *
+ * .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig output_config = 3;
+ *
+ */
+ public Builder setOutputConfig(
+ com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig.Builder
+ builderForValue) {
+ if (outputConfigBuilder_ == null) {
+ outputConfig_ = builderForValue.build();
+ onChanged();
+ } else {
+ outputConfigBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The overall output config for batch process. + *+ * + *
+ * .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig output_config = 3;
+ *
+ */
+ public Builder mergeOutputConfig(
+ com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig value) {
+ if (outputConfigBuilder_ == null) {
+ if (outputConfig_ != null) {
+ outputConfig_ =
+ com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig.newBuilder(
+ outputConfig_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ outputConfig_ = value;
+ }
+ onChanged();
+ } else {
+ outputConfigBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The overall output config for batch process. + *+ * + *
+ * .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig output_config = 3;
+ *
+ */
+ public Builder clearOutputConfig() {
+ if (outputConfigBuilder_ == null) {
+ outputConfig_ = null;
+ onChanged();
+ } else {
+ outputConfig_ = null;
+ outputConfigBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The overall output config for batch process. + *+ * + *
+ * .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig output_config = 3;
+ *
+ */
+ public com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig.Builder
+ getOutputConfigBuilder() {
+
+ onChanged();
+ return getOutputConfigFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * The overall output config for batch process. + *+ * + *
+ * .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig output_config = 3;
+ *
+ */
+ public com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfigOrBuilder
+ getOutputConfigOrBuilder() {
+ if (outputConfigBuilder_ != null) {
+ return outputConfigBuilder_.getMessageOrBuilder();
+ } else {
+ return outputConfig_ == null
+ ? com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig
+ .getDefaultInstance()
+ : outputConfig_;
+ }
+ }
+ /**
+ *
+ *
+ * + * The overall output config for batch process. + *+ * + *
+ * .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig output_config = 3;
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig,
+ com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig.Builder,
+ com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfigOrBuilder>
+ getOutputConfigFieldBuilder() {
+ if (outputConfigBuilder_ == null) {
+ outputConfigBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig,
+ com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig.Builder,
+ com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfigOrBuilder>(
+ getOutputConfig(), getParentForChildren(), isClean());
+ outputConfig_ = null;
+ }
+ return outputConfigBuilder_;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.BatchProcessRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.BatchProcessRequest)
+ private static final com.google.cloud.documentai.v1beta3.BatchProcessRequest DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta3.BatchProcessRequest();
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BatchProcessRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Required. The processor resource name. + *+ * + *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The name.
+ */
+ java.lang.String getName();
+ /**
+ *
+ *
+ * + * Required. The processor resource name. + *+ * + *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The bytes for name.
+ */
+ com.google.protobuf.ByteString getNameBytes();
+
+ /**
+ *
+ *
+ * + * The input config for each single document in the batch process. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2;
+ *
+ */
+ java.util.List+ * The input config for each single document in the batch process. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2;
+ *
+ */
+ com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig getInputConfigs(
+ int index);
+ /**
+ *
+ *
+ * + * The input config for each single document in the batch process. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2;
+ *
+ */
+ int getInputConfigsCount();
+ /**
+ *
+ *
+ * + * The input config for each single document in the batch process. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2;
+ *
+ */
+ java.util.List<
+ ? extends
+ com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfigOrBuilder>
+ getInputConfigsOrBuilderList();
+ /**
+ *
+ *
+ * + * The input config for each single document in the batch process. + *+ * + *
+ * repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2;
+ *
+ */
+ com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfigOrBuilder
+ getInputConfigsOrBuilder(int index);
+
+ /**
+ *
+ *
+ * + * The overall output config for batch process. + *+ * + *
.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig output_config = 3;
+ *
+ *
+ * @return Whether the outputConfig field is set.
+ */
+ boolean hasOutputConfig();
+ /**
+ *
+ *
+ * + * The overall output config for batch process. + *+ * + *
.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig output_config = 3;
+ *
+ *
+ * @return The outputConfig.
+ */
+ com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig getOutputConfig();
+ /**
+ *
+ *
+ * + * The overall output config for batch process. + *+ * + *
.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig output_config = 3;
+ *
+ */
+ com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfigOrBuilder
+ getOutputConfigOrBuilder();
+}
diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessResponse.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessResponse.java
new file mode 100644
index 00000000..c3b019cf
--- /dev/null
+++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessResponse.java
@@ -0,0 +1,457 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/documentai/v1beta3/document_processor_service.proto
+
+package com.google.cloud.documentai.v1beta3;
+
+/**
+ *
+ *
+ * + * Response message for batch process document method. + *+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.BatchProcessResponse} + */ +public final class BatchProcessResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.BatchProcessResponse) + BatchProcessResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchProcessResponse.newBuilder() to construct. + private BatchProcessResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private BatchProcessResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchProcessResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchProcessResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_BatchProcessResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_BatchProcessResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.BatchProcessResponse.class, + com.google.cloud.documentai.v1beta3.BatchProcessResponse.Builder.class); + } + + 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 { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + 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.documentai.v1beta3.BatchProcessResponse)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.BatchProcessResponse other = + (com.google.cloud.documentai.v1beta3.BatchProcessResponse) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.BatchProcessResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.BatchProcessResponse 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.documentai.v1beta3.BatchProcessResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.BatchProcessResponse 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.documentai.v1beta3.BatchProcessResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.BatchProcessResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.BatchProcessResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.BatchProcessResponse 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.documentai.v1beta3.BatchProcessResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.BatchProcessResponse 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.documentai.v1beta3.BatchProcessResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.BatchProcessResponse 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.documentai.v1beta3.BatchProcessResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+ * Response message for batch process document method. + *+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.BatchProcessResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * A bounding polygon for the detected image annotation. + *+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.BoundingPoly} + */ +public final class BoundingPoly extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.BoundingPoly) + BoundingPolyOrBuilder { + private static final long serialVersionUID = 0L; + // Use BoundingPoly.newBuilder() to construct. + private BoundingPoly(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private BoundingPoly() { + vertices_ = java.util.Collections.emptyList(); + normalizedVertices_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BoundingPoly(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BoundingPoly( + 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) != 0)) { + vertices_ = new java.util.ArrayList
+ * The bounding polygon vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.Vertex vertices = 1;
+ */
+ @java.lang.Override
+ public java.util.List+ * The bounding polygon vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.Vertex vertices = 1;
+ */
+ @java.lang.Override
+ public java.util.List extends com.google.cloud.documentai.v1beta3.VertexOrBuilder>
+ getVerticesOrBuilderList() {
+ return vertices_;
+ }
+ /**
+ *
+ *
+ * + * The bounding polygon vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.Vertex vertices = 1;
+ */
+ @java.lang.Override
+ public int getVerticesCount() {
+ return vertices_.size();
+ }
+ /**
+ *
+ *
+ * + * The bounding polygon vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.Vertex vertices = 1;
+ */
+ @java.lang.Override
+ public com.google.cloud.documentai.v1beta3.Vertex getVertices(int index) {
+ return vertices_.get(index);
+ }
+ /**
+ *
+ *
+ * + * The bounding polygon vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.Vertex vertices = 1;
+ */
+ @java.lang.Override
+ public com.google.cloud.documentai.v1beta3.VertexOrBuilder getVerticesOrBuilder(int index) {
+ return vertices_.get(index);
+ }
+
+ public static final int NORMALIZED_VERTICES_FIELD_NUMBER = 2;
+ private java.util.List+ * The bounding polygon normalized vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.NormalizedVertex normalized_vertices = 2;
+ *
+ */
+ @java.lang.Override
+ public java.util.List+ * The bounding polygon normalized vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.NormalizedVertex normalized_vertices = 2;
+ *
+ */
+ @java.lang.Override
+ public java.util.List extends com.google.cloud.documentai.v1beta3.NormalizedVertexOrBuilder>
+ getNormalizedVerticesOrBuilderList() {
+ return normalizedVertices_;
+ }
+ /**
+ *
+ *
+ * + * The bounding polygon normalized vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.NormalizedVertex normalized_vertices = 2;
+ *
+ */
+ @java.lang.Override
+ public int getNormalizedVerticesCount() {
+ return normalizedVertices_.size();
+ }
+ /**
+ *
+ *
+ * + * The bounding polygon normalized vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.NormalizedVertex normalized_vertices = 2;
+ *
+ */
+ @java.lang.Override
+ public com.google.cloud.documentai.v1beta3.NormalizedVertex getNormalizedVertices(int index) {
+ return normalizedVertices_.get(index);
+ }
+ /**
+ *
+ *
+ * + * The bounding polygon normalized vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.NormalizedVertex normalized_vertices = 2;
+ *
+ */
+ @java.lang.Override
+ public com.google.cloud.documentai.v1beta3.NormalizedVertexOrBuilder
+ getNormalizedVerticesOrBuilder(int index) {
+ return normalizedVertices_.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 < vertices_.size(); i++) {
+ output.writeMessage(1, vertices_.get(i));
+ }
+ for (int i = 0; i < normalizedVertices_.size(); i++) {
+ output.writeMessage(2, normalizedVertices_.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 < vertices_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, vertices_.get(i));
+ }
+ for (int i = 0; i < normalizedVertices_.size(); i++) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(2, normalizedVertices_.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.documentai.v1beta3.BoundingPoly)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.documentai.v1beta3.BoundingPoly other =
+ (com.google.cloud.documentai.v1beta3.BoundingPoly) obj;
+
+ if (!getVerticesList().equals(other.getVerticesList())) return false;
+ if (!getNormalizedVerticesList().equals(other.getNormalizedVerticesList())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (getVerticesCount() > 0) {
+ hash = (37 * hash) + VERTICES_FIELD_NUMBER;
+ hash = (53 * hash) + getVerticesList().hashCode();
+ }
+ if (getNormalizedVerticesCount() > 0) {
+ hash = (37 * hash) + NORMALIZED_VERTICES_FIELD_NUMBER;
+ hash = (53 * hash) + getNormalizedVerticesList().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BoundingPoly parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BoundingPoly 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.documentai.v1beta3.BoundingPoly parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BoundingPoly 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.documentai.v1beta3.BoundingPoly parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BoundingPoly parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BoundingPoly parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BoundingPoly 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.documentai.v1beta3.BoundingPoly parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BoundingPoly 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.documentai.v1beta3.BoundingPoly parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.BoundingPoly 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.documentai.v1beta3.BoundingPoly 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;
+ }
+ /**
+ *
+ *
+ * + * A bounding polygon for the detected image annotation. + *+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.BoundingPoly} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The bounding polygon vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.Vertex vertices = 1;
+ */
+ public java.util.List+ * The bounding polygon vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.Vertex vertices = 1;
+ */
+ public int getVerticesCount() {
+ if (verticesBuilder_ == null) {
+ return vertices_.size();
+ } else {
+ return verticesBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ *
+ * + * The bounding polygon vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.Vertex vertices = 1;
+ */
+ public com.google.cloud.documentai.v1beta3.Vertex getVertices(int index) {
+ if (verticesBuilder_ == null) {
+ return vertices_.get(index);
+ } else {
+ return verticesBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * The bounding polygon vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.Vertex vertices = 1;
+ */
+ public Builder setVertices(int index, com.google.cloud.documentai.v1beta3.Vertex value) {
+ if (verticesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureVerticesIsMutable();
+ vertices_.set(index, value);
+ onChanged();
+ } else {
+ verticesBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The bounding polygon vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.Vertex vertices = 1;
+ */
+ public Builder setVertices(
+ int index, com.google.cloud.documentai.v1beta3.Vertex.Builder builderForValue) {
+ if (verticesBuilder_ == null) {
+ ensureVerticesIsMutable();
+ vertices_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ verticesBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The bounding polygon vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.Vertex vertices = 1;
+ */
+ public Builder addVertices(com.google.cloud.documentai.v1beta3.Vertex value) {
+ if (verticesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureVerticesIsMutable();
+ vertices_.add(value);
+ onChanged();
+ } else {
+ verticesBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The bounding polygon vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.Vertex vertices = 1;
+ */
+ public Builder addVertices(int index, com.google.cloud.documentai.v1beta3.Vertex value) {
+ if (verticesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureVerticesIsMutable();
+ vertices_.add(index, value);
+ onChanged();
+ } else {
+ verticesBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The bounding polygon vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.Vertex vertices = 1;
+ */
+ public Builder addVertices(com.google.cloud.documentai.v1beta3.Vertex.Builder builderForValue) {
+ if (verticesBuilder_ == null) {
+ ensureVerticesIsMutable();
+ vertices_.add(builderForValue.build());
+ onChanged();
+ } else {
+ verticesBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The bounding polygon vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.Vertex vertices = 1;
+ */
+ public Builder addVertices(
+ int index, com.google.cloud.documentai.v1beta3.Vertex.Builder builderForValue) {
+ if (verticesBuilder_ == null) {
+ ensureVerticesIsMutable();
+ vertices_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ verticesBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The bounding polygon vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.Vertex vertices = 1;
+ */
+ public Builder addAllVertices(
+ java.lang.Iterable extends com.google.cloud.documentai.v1beta3.Vertex> values) {
+ if (verticesBuilder_ == null) {
+ ensureVerticesIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, vertices_);
+ onChanged();
+ } else {
+ verticesBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The bounding polygon vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.Vertex vertices = 1;
+ */
+ public Builder clearVertices() {
+ if (verticesBuilder_ == null) {
+ vertices_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ verticesBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The bounding polygon vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.Vertex vertices = 1;
+ */
+ public Builder removeVertices(int index) {
+ if (verticesBuilder_ == null) {
+ ensureVerticesIsMutable();
+ vertices_.remove(index);
+ onChanged();
+ } else {
+ verticesBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The bounding polygon vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.Vertex vertices = 1;
+ */
+ public com.google.cloud.documentai.v1beta3.Vertex.Builder getVerticesBuilder(int index) {
+ return getVerticesFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ *
+ * + * The bounding polygon vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.Vertex vertices = 1;
+ */
+ public com.google.cloud.documentai.v1beta3.VertexOrBuilder getVerticesOrBuilder(int index) {
+ if (verticesBuilder_ == null) {
+ return vertices_.get(index);
+ } else {
+ return verticesBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * The bounding polygon vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.Vertex vertices = 1;
+ */
+ public java.util.List extends com.google.cloud.documentai.v1beta3.VertexOrBuilder>
+ getVerticesOrBuilderList() {
+ if (verticesBuilder_ != null) {
+ return verticesBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(vertices_);
+ }
+ }
+ /**
+ *
+ *
+ * + * The bounding polygon vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.Vertex vertices = 1;
+ */
+ public com.google.cloud.documentai.v1beta3.Vertex.Builder addVerticesBuilder() {
+ return getVerticesFieldBuilder()
+ .addBuilder(com.google.cloud.documentai.v1beta3.Vertex.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * The bounding polygon vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.Vertex vertices = 1;
+ */
+ public com.google.cloud.documentai.v1beta3.Vertex.Builder addVerticesBuilder(int index) {
+ return getVerticesFieldBuilder()
+ .addBuilder(index, com.google.cloud.documentai.v1beta3.Vertex.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * The bounding polygon vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.Vertex vertices = 1;
+ */
+ public java.util.List+ * The bounding polygon normalized vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.NormalizedVertex normalized_vertices = 2;
+ *
+ */
+ public java.util.List+ * The bounding polygon normalized vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.NormalizedVertex normalized_vertices = 2;
+ *
+ */
+ public int getNormalizedVerticesCount() {
+ if (normalizedVerticesBuilder_ == null) {
+ return normalizedVertices_.size();
+ } else {
+ return normalizedVerticesBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ *
+ * + * The bounding polygon normalized vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.NormalizedVertex normalized_vertices = 2;
+ *
+ */
+ public com.google.cloud.documentai.v1beta3.NormalizedVertex getNormalizedVertices(int index) {
+ if (normalizedVerticesBuilder_ == null) {
+ return normalizedVertices_.get(index);
+ } else {
+ return normalizedVerticesBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * The bounding polygon normalized vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.NormalizedVertex normalized_vertices = 2;
+ *
+ */
+ public Builder setNormalizedVertices(
+ int index, com.google.cloud.documentai.v1beta3.NormalizedVertex value) {
+ if (normalizedVerticesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureNormalizedVerticesIsMutable();
+ normalizedVertices_.set(index, value);
+ onChanged();
+ } else {
+ normalizedVerticesBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The bounding polygon normalized vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.NormalizedVertex normalized_vertices = 2;
+ *
+ */
+ public Builder setNormalizedVertices(
+ int index, com.google.cloud.documentai.v1beta3.NormalizedVertex.Builder builderForValue) {
+ if (normalizedVerticesBuilder_ == null) {
+ ensureNormalizedVerticesIsMutable();
+ normalizedVertices_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ normalizedVerticesBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The bounding polygon normalized vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.NormalizedVertex normalized_vertices = 2;
+ *
+ */
+ public Builder addNormalizedVertices(
+ com.google.cloud.documentai.v1beta3.NormalizedVertex value) {
+ if (normalizedVerticesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureNormalizedVerticesIsMutable();
+ normalizedVertices_.add(value);
+ onChanged();
+ } else {
+ normalizedVerticesBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The bounding polygon normalized vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.NormalizedVertex normalized_vertices = 2;
+ *
+ */
+ public Builder addNormalizedVertices(
+ int index, com.google.cloud.documentai.v1beta3.NormalizedVertex value) {
+ if (normalizedVerticesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureNormalizedVerticesIsMutable();
+ normalizedVertices_.add(index, value);
+ onChanged();
+ } else {
+ normalizedVerticesBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The bounding polygon normalized vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.NormalizedVertex normalized_vertices = 2;
+ *
+ */
+ public Builder addNormalizedVertices(
+ com.google.cloud.documentai.v1beta3.NormalizedVertex.Builder builderForValue) {
+ if (normalizedVerticesBuilder_ == null) {
+ ensureNormalizedVerticesIsMutable();
+ normalizedVertices_.add(builderForValue.build());
+ onChanged();
+ } else {
+ normalizedVerticesBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The bounding polygon normalized vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.NormalizedVertex normalized_vertices = 2;
+ *
+ */
+ public Builder addNormalizedVertices(
+ int index, com.google.cloud.documentai.v1beta3.NormalizedVertex.Builder builderForValue) {
+ if (normalizedVerticesBuilder_ == null) {
+ ensureNormalizedVerticesIsMutable();
+ normalizedVertices_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ normalizedVerticesBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The bounding polygon normalized vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.NormalizedVertex normalized_vertices = 2;
+ *
+ */
+ public Builder addAllNormalizedVertices(
+ java.lang.Iterable extends com.google.cloud.documentai.v1beta3.NormalizedVertex> values) {
+ if (normalizedVerticesBuilder_ == null) {
+ ensureNormalizedVerticesIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, normalizedVertices_);
+ onChanged();
+ } else {
+ normalizedVerticesBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The bounding polygon normalized vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.NormalizedVertex normalized_vertices = 2;
+ *
+ */
+ public Builder clearNormalizedVertices() {
+ if (normalizedVerticesBuilder_ == null) {
+ normalizedVertices_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ } else {
+ normalizedVerticesBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The bounding polygon normalized vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.NormalizedVertex normalized_vertices = 2;
+ *
+ */
+ public Builder removeNormalizedVertices(int index) {
+ if (normalizedVerticesBuilder_ == null) {
+ ensureNormalizedVerticesIsMutable();
+ normalizedVertices_.remove(index);
+ onChanged();
+ } else {
+ normalizedVerticesBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The bounding polygon normalized vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.NormalizedVertex normalized_vertices = 2;
+ *
+ */
+ public com.google.cloud.documentai.v1beta3.NormalizedVertex.Builder
+ getNormalizedVerticesBuilder(int index) {
+ return getNormalizedVerticesFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ *
+ * + * The bounding polygon normalized vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.NormalizedVertex normalized_vertices = 2;
+ *
+ */
+ public com.google.cloud.documentai.v1beta3.NormalizedVertexOrBuilder
+ getNormalizedVerticesOrBuilder(int index) {
+ if (normalizedVerticesBuilder_ == null) {
+ return normalizedVertices_.get(index);
+ } else {
+ return normalizedVerticesBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * The bounding polygon normalized vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.NormalizedVertex normalized_vertices = 2;
+ *
+ */
+ public java.util.List extends com.google.cloud.documentai.v1beta3.NormalizedVertexOrBuilder>
+ getNormalizedVerticesOrBuilderList() {
+ if (normalizedVerticesBuilder_ != null) {
+ return normalizedVerticesBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(normalizedVertices_);
+ }
+ }
+ /**
+ *
+ *
+ * + * The bounding polygon normalized vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.NormalizedVertex normalized_vertices = 2;
+ *
+ */
+ public com.google.cloud.documentai.v1beta3.NormalizedVertex.Builder
+ addNormalizedVerticesBuilder() {
+ return getNormalizedVerticesFieldBuilder()
+ .addBuilder(com.google.cloud.documentai.v1beta3.NormalizedVertex.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * The bounding polygon normalized vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.NormalizedVertex normalized_vertices = 2;
+ *
+ */
+ public com.google.cloud.documentai.v1beta3.NormalizedVertex.Builder
+ addNormalizedVerticesBuilder(int index) {
+ return getNormalizedVerticesFieldBuilder()
+ .addBuilder(
+ index, com.google.cloud.documentai.v1beta3.NormalizedVertex.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * The bounding polygon normalized vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.NormalizedVertex normalized_vertices = 2;
+ *
+ */
+ public java.util.List+ * The bounding polygon vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.Vertex vertices = 1;
+ */
+ java.util.List+ * The bounding polygon vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.Vertex vertices = 1;
+ */
+ com.google.cloud.documentai.v1beta3.Vertex getVertices(int index);
+ /**
+ *
+ *
+ * + * The bounding polygon vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.Vertex vertices = 1;
+ */
+ int getVerticesCount();
+ /**
+ *
+ *
+ * + * The bounding polygon vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.Vertex vertices = 1;
+ */
+ java.util.List extends com.google.cloud.documentai.v1beta3.VertexOrBuilder>
+ getVerticesOrBuilderList();
+ /**
+ *
+ *
+ * + * The bounding polygon vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.Vertex vertices = 1;
+ */
+ com.google.cloud.documentai.v1beta3.VertexOrBuilder getVerticesOrBuilder(int index);
+
+ /**
+ *
+ *
+ * + * The bounding polygon normalized vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.NormalizedVertex normalized_vertices = 2;
+ *
+ */
+ java.util.List+ * The bounding polygon normalized vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.NormalizedVertex normalized_vertices = 2;
+ *
+ */
+ com.google.cloud.documentai.v1beta3.NormalizedVertex getNormalizedVertices(int index);
+ /**
+ *
+ *
+ * + * The bounding polygon normalized vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.NormalizedVertex normalized_vertices = 2;
+ *
+ */
+ int getNormalizedVerticesCount();
+ /**
+ *
+ *
+ * + * The bounding polygon normalized vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.NormalizedVertex normalized_vertices = 2;
+ *
+ */
+ java.util.List extends com.google.cloud.documentai.v1beta3.NormalizedVertexOrBuilder>
+ getNormalizedVerticesOrBuilderList();
+ /**
+ *
+ *
+ * + * The bounding polygon normalized vertices. + *+ * + *
repeated .google.cloud.documentai.v1beta3.NormalizedVertex normalized_vertices = 2;
+ *
+ */
+ com.google.cloud.documentai.v1beta3.NormalizedVertexOrBuilder getNormalizedVerticesOrBuilder(
+ int index);
+}
diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/Document.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/Document.java
new file mode 100644
index 00000000..bc73806c
--- /dev/null
+++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/Document.java
@@ -0,0 +1,59654 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/documentai/v1beta3/document.proto
+
+package com.google.cloud.documentai.v1beta3;
+
+/**
+ *
+ *
+ * + * Document represents the canonical document resource in Document Understanding + * AI. + * It is an interchange format that provides insights into documents and allows + * for collaboration between users and Document Understanding AI to iterate and + * optimize for quality. + *+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.Document} + */ +public final class Document extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.Document) + DocumentOrBuilder { + private static final long serialVersionUID = 0L; + // Use Document.newBuilder() to construct. + private Document(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private Document() { + mimeType_ = ""; + text_ = ""; + textStyles_ = java.util.Collections.emptyList(); + pages_ = java.util.Collections.emptyList(); + entities_ = java.util.Collections.emptyList(); + entityRelations_ = java.util.Collections.emptyList(); + translations_ = java.util.Collections.emptyList(); + textChanges_ = java.util.Collections.emptyList(); + revisions_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Document(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Document( + 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(); + sourceCase_ = 1; + source_ = s; + break; + } + case 18: + { + sourceCase_ = 2; + source_ = input.readBytes(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + mimeType_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + text_ = s; + break; + } + case 42: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + textStyles_ = + new java.util.ArrayList
+ * The 0-based index of this shard. + *+ * + *
int64 shard_index = 1;
+ *
+ * @return The shardIndex.
+ */
+ long getShardIndex();
+
+ /**
+ *
+ *
+ * + * Total number of shards. + *+ * + *
int64 shard_count = 2;
+ *
+ * @return The shardCount.
+ */
+ long getShardCount();
+
+ /**
+ *
+ *
+ * + * The index of the first character in [Document.text][google.cloud.documentai.v1beta3.Document.text] in the overall + * document global text. + *+ * + *
int64 text_offset = 3;
+ *
+ * @return The textOffset.
+ */
+ long getTextOffset();
+ }
+ /**
+ *
+ *
+ * + * For a large document, sharding may be performed to produce several + * document shards. Each document shard contains this field to detail which + * shard it is. + *+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.Document.ShardInfo} + */ + public static final class ShardInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.Document.ShardInfo) + ShardInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use ShardInfo.newBuilder() to construct. + private ShardInfo(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private ShardInfo() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ShardInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ShardInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + shardIndex_ = input.readInt64(); + break; + } + case 16: + { + shardCount_ = input.readInt64(); + break; + } + case 24: + { + textOffset_ = input.readInt64(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_ShardInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_ShardInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.Document.ShardInfo.class, + com.google.cloud.documentai.v1beta3.Document.ShardInfo.Builder.class); + } + + public static final int SHARD_INDEX_FIELD_NUMBER = 1; + private long shardIndex_; + /** + * + * + *
+ * The 0-based index of this shard. + *+ * + *
int64 shard_index = 1;
+ *
+ * @return The shardIndex.
+ */
+ @java.lang.Override
+ public long getShardIndex() {
+ return shardIndex_;
+ }
+
+ public static final int SHARD_COUNT_FIELD_NUMBER = 2;
+ private long shardCount_;
+ /**
+ *
+ *
+ * + * Total number of shards. + *+ * + *
int64 shard_count = 2;
+ *
+ * @return The shardCount.
+ */
+ @java.lang.Override
+ public long getShardCount() {
+ return shardCount_;
+ }
+
+ public static final int TEXT_OFFSET_FIELD_NUMBER = 3;
+ private long textOffset_;
+ /**
+ *
+ *
+ * + * The index of the first character in [Document.text][google.cloud.documentai.v1beta3.Document.text] in the overall + * document global text. + *+ * + *
int64 text_offset = 3;
+ *
+ * @return The textOffset.
+ */
+ @java.lang.Override
+ public long getTextOffset() {
+ return textOffset_;
+ }
+
+ 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 (shardIndex_ != 0L) {
+ output.writeInt64(1, shardIndex_);
+ }
+ if (shardCount_ != 0L) {
+ output.writeInt64(2, shardCount_);
+ }
+ if (textOffset_ != 0L) {
+ output.writeInt64(3, textOffset_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (shardIndex_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, shardIndex_);
+ }
+ if (shardCount_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, shardCount_);
+ }
+ if (textOffset_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, textOffset_);
+ }
+ 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.documentai.v1beta3.Document.ShardInfo)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.documentai.v1beta3.Document.ShardInfo other =
+ (com.google.cloud.documentai.v1beta3.Document.ShardInfo) obj;
+
+ if (getShardIndex() != other.getShardIndex()) return false;
+ if (getShardCount() != other.getShardCount()) return false;
+ if (getTextOffset() != other.getTextOffset()) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + SHARD_INDEX_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getShardIndex());
+ hash = (37 * hash) + SHARD_COUNT_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getShardCount());
+ hash = (37 * hash) + TEXT_OFFSET_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTextOffset());
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.documentai.v1beta3.Document.ShardInfo parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.Document.ShardInfo 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.documentai.v1beta3.Document.ShardInfo parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.Document.ShardInfo 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.documentai.v1beta3.Document.ShardInfo parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.Document.ShardInfo parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.Document.ShardInfo parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.Document.ShardInfo 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.documentai.v1beta3.Document.ShardInfo parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.Document.ShardInfo 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.documentai.v1beta3.Document.ShardInfo parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.Document.ShardInfo 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.documentai.v1beta3.Document.ShardInfo 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;
+ }
+ /**
+ *
+ *
+ * + * For a large document, sharding may be performed to produce several + * document shards. Each document shard contains this field to detail which + * shard it is. + *+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.Document.ShardInfo} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The 0-based index of this shard. + *+ * + *
int64 shard_index = 1;
+ *
+ * @return The shardIndex.
+ */
+ @java.lang.Override
+ public long getShardIndex() {
+ return shardIndex_;
+ }
+ /**
+ *
+ *
+ * + * The 0-based index of this shard. + *+ * + *
int64 shard_index = 1;
+ *
+ * @param value The shardIndex to set.
+ * @return This builder for chaining.
+ */
+ public Builder setShardIndex(long value) {
+
+ shardIndex_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The 0-based index of this shard. + *+ * + *
int64 shard_index = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearShardIndex() {
+
+ shardIndex_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private long shardCount_;
+ /**
+ *
+ *
+ * + * Total number of shards. + *+ * + *
int64 shard_count = 2;
+ *
+ * @return The shardCount.
+ */
+ @java.lang.Override
+ public long getShardCount() {
+ return shardCount_;
+ }
+ /**
+ *
+ *
+ * + * Total number of shards. + *+ * + *
int64 shard_count = 2;
+ *
+ * @param value The shardCount to set.
+ * @return This builder for chaining.
+ */
+ public Builder setShardCount(long value) {
+
+ shardCount_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Total number of shards. + *+ * + *
int64 shard_count = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearShardCount() {
+
+ shardCount_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private long textOffset_;
+ /**
+ *
+ *
+ * + * The index of the first character in [Document.text][google.cloud.documentai.v1beta3.Document.text] in the overall + * document global text. + *+ * + *
int64 text_offset = 3;
+ *
+ * @return The textOffset.
+ */
+ @java.lang.Override
+ public long getTextOffset() {
+ return textOffset_;
+ }
+ /**
+ *
+ *
+ * + * The index of the first character in [Document.text][google.cloud.documentai.v1beta3.Document.text] in the overall + * document global text. + *+ * + *
int64 text_offset = 3;
+ *
+ * @param value The textOffset to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTextOffset(long value) {
+
+ textOffset_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The index of the first character in [Document.text][google.cloud.documentai.v1beta3.Document.text] in the overall + * document global text. + *+ * + *
int64 text_offset = 3;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearTextOffset() {
+
+ textOffset_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.Document.ShardInfo)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.Document.ShardInfo)
+ private static final com.google.cloud.documentai.v1beta3.Document.ShardInfo DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta3.Document.ShardInfo();
+ }
+
+ public static com.google.cloud.documentai.v1beta3.Document.ShardInfo getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta3.Document.text]. + *+ * + *
.google.cloud.documentai.v1beta3.Document.TextAnchor text_anchor = 1;
+ *
+ * @return Whether the textAnchor field is set.
+ */
+ boolean hasTextAnchor();
+ /**
+ *
+ *
+ * + * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta3.Document.text]. + *+ * + *
.google.cloud.documentai.v1beta3.Document.TextAnchor text_anchor = 1;
+ *
+ * @return The textAnchor.
+ */
+ com.google.cloud.documentai.v1beta3.Document.TextAnchor getTextAnchor();
+ /**
+ *
+ *
+ * + * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta3.Document.text]. + *+ * + *
.google.cloud.documentai.v1beta3.Document.TextAnchor text_anchor = 1;
+ */
+ com.google.cloud.documentai.v1beta3.Document.TextAnchorOrBuilder getTextAnchorOrBuilder();
+
+ /**
+ *
+ *
+ * + * Text color. + *+ * + *
.google.type.Color color = 2;
+ *
+ * @return Whether the color field is set.
+ */
+ boolean hasColor();
+ /**
+ *
+ *
+ * + * Text color. + *+ * + *
.google.type.Color color = 2;
+ *
+ * @return The color.
+ */
+ com.google.type.Color getColor();
+ /**
+ *
+ *
+ * + * Text color. + *+ * + *
.google.type.Color color = 2;
+ */
+ com.google.type.ColorOrBuilder getColorOrBuilder();
+
+ /**
+ *
+ *
+ * + * Text background color. + *+ * + *
.google.type.Color background_color = 3;
+ *
+ * @return Whether the backgroundColor field is set.
+ */
+ boolean hasBackgroundColor();
+ /**
+ *
+ *
+ * + * Text background color. + *+ * + *
.google.type.Color background_color = 3;
+ *
+ * @return The backgroundColor.
+ */
+ com.google.type.Color getBackgroundColor();
+ /**
+ *
+ *
+ * + * Text background color. + *+ * + *
.google.type.Color background_color = 3;
+ */
+ com.google.type.ColorOrBuilder getBackgroundColorOrBuilder();
+
+ /**
+ *
+ *
+ * + * Font weight. Possible values are normal, bold, bolder, and lighter. + * https://www.w3schools.com/cssref/pr_font_weight.asp + *+ * + *
string font_weight = 4;
+ *
+ * @return The fontWeight.
+ */
+ java.lang.String getFontWeight();
+ /**
+ *
+ *
+ * + * Font weight. Possible values are normal, bold, bolder, and lighter. + * https://www.w3schools.com/cssref/pr_font_weight.asp + *+ * + *
string font_weight = 4;
+ *
+ * @return The bytes for fontWeight.
+ */
+ com.google.protobuf.ByteString getFontWeightBytes();
+
+ /**
+ *
+ *
+ * + * Text style. Possible values are normal, italic, and oblique. + * https://www.w3schools.com/cssref/pr_font_font-style.asp + *+ * + *
string text_style = 5;
+ *
+ * @return The textStyle.
+ */
+ java.lang.String getTextStyle();
+ /**
+ *
+ *
+ * + * Text style. Possible values are normal, italic, and oblique. + * https://www.w3schools.com/cssref/pr_font_font-style.asp + *+ * + *
string text_style = 5;
+ *
+ * @return The bytes for textStyle.
+ */
+ com.google.protobuf.ByteString getTextStyleBytes();
+
+ /**
+ *
+ *
+ * + * Text decoration. Follows CSS standard. + * <text-decoration-line> <text-decoration-color> <text-decoration-style> + * https://www.w3schools.com/cssref/pr_text_text-decoration.asp + *+ * + *
string text_decoration = 6;
+ *
+ * @return The textDecoration.
+ */
+ java.lang.String getTextDecoration();
+ /**
+ *
+ *
+ * + * Text decoration. Follows CSS standard. + * <text-decoration-line> <text-decoration-color> <text-decoration-style> + * https://www.w3schools.com/cssref/pr_text_text-decoration.asp + *+ * + *
string text_decoration = 6;
+ *
+ * @return The bytes for textDecoration.
+ */
+ com.google.protobuf.ByteString getTextDecorationBytes();
+
+ /**
+ *
+ *
+ * + * Font size. + *+ * + *
.google.cloud.documentai.v1beta3.Document.Style.FontSize font_size = 7;
+ *
+ * @return Whether the fontSize field is set.
+ */
+ boolean hasFontSize();
+ /**
+ *
+ *
+ * + * Font size. + *+ * + *
.google.cloud.documentai.v1beta3.Document.Style.FontSize font_size = 7;
+ *
+ * @return The fontSize.
+ */
+ com.google.cloud.documentai.v1beta3.Document.Style.FontSize getFontSize();
+ /**
+ *
+ *
+ * + * Font size. + *+ * + *
.google.cloud.documentai.v1beta3.Document.Style.FontSize font_size = 7;
+ */
+ com.google.cloud.documentai.v1beta3.Document.Style.FontSizeOrBuilder getFontSizeOrBuilder();
+ }
+ /**
+ *
+ *
+ * + * Annotation for common text style attributes. This adheres to CSS + * conventions as much as possible. + *+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.Document.Style} + */ + public static final class Style extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.Document.Style) + StyleOrBuilder { + private static final long serialVersionUID = 0L; + // Use Style.newBuilder() to construct. + private Style(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private Style() { + fontWeight_ = ""; + textStyle_ = ""; + textDecoration_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Style(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Style( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.documentai.v1beta3.Document.TextAnchor.Builder subBuilder = null; + if (textAnchor_ != null) { + subBuilder = textAnchor_.toBuilder(); + } + textAnchor_ = + input.readMessage( + com.google.cloud.documentai.v1beta3.Document.TextAnchor.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(textAnchor_); + textAnchor_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.type.Color.Builder subBuilder = null; + if (color_ != null) { + subBuilder = color_.toBuilder(); + } + color_ = input.readMessage(com.google.type.Color.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(color_); + color_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + com.google.type.Color.Builder subBuilder = null; + if (backgroundColor_ != null) { + subBuilder = backgroundColor_.toBuilder(); + } + backgroundColor_ = + input.readMessage(com.google.type.Color.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(backgroundColor_); + backgroundColor_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + fontWeight_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + textStyle_ = s; + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + textDecoration_ = s; + break; + } + case 58: + { + com.google.cloud.documentai.v1beta3.Document.Style.FontSize.Builder subBuilder = + null; + if (fontSize_ != null) { + subBuilder = fontSize_.toBuilder(); + } + fontSize_ = + input.readMessage( + com.google.cloud.documentai.v1beta3.Document.Style.FontSize.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(fontSize_); + fontSize_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_Style_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_Style_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.Document.Style.class, + com.google.cloud.documentai.v1beta3.Document.Style.Builder.class); + } + + public interface FontSizeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.Document.Style.FontSize) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+ * Font size for the text. + *+ * + *
float size = 1;
+ *
+ * @return The size.
+ */
+ float getSize();
+
+ /**
+ *
+ *
+ * + * Unit for the font size. Follows CSS naming (in, px, pt, etc.). + *+ * + *
string unit = 2;
+ *
+ * @return The unit.
+ */
+ java.lang.String getUnit();
+ /**
+ *
+ *
+ * + * Unit for the font size. Follows CSS naming (in, px, pt, etc.). + *+ * + *
string unit = 2;
+ *
+ * @return The bytes for unit.
+ */
+ com.google.protobuf.ByteString getUnitBytes();
+ }
+ /**
+ *
+ *
+ * + * Font size with unit. + *+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.Document.Style.FontSize} + */ + public static final class FontSize extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.Document.Style.FontSize) + FontSizeOrBuilder { + private static final long serialVersionUID = 0L; + // Use FontSize.newBuilder() to construct. + private FontSize(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private FontSize() { + unit_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FontSize(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private FontSize( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: + { + size_ = input.readFloat(); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + unit_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_Style_FontSize_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_Style_FontSize_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.Document.Style.FontSize.class, + com.google.cloud.documentai.v1beta3.Document.Style.FontSize.Builder.class); + } + + public static final int SIZE_FIELD_NUMBER = 1; + private float size_; + /** + * + * + *
+ * Font size for the text. + *+ * + *
float size = 1;
+ *
+ * @return The size.
+ */
+ @java.lang.Override
+ public float getSize() {
+ return size_;
+ }
+
+ public static final int UNIT_FIELD_NUMBER = 2;
+ private volatile java.lang.Object unit_;
+ /**
+ *
+ *
+ * + * Unit for the font size. Follows CSS naming (in, px, pt, etc.). + *+ * + *
string unit = 2;
+ *
+ * @return The unit.
+ */
+ @java.lang.Override
+ public java.lang.String getUnit() {
+ java.lang.Object ref = unit_;
+ 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();
+ unit_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Unit for the font size. Follows CSS naming (in, px, pt, etc.). + *+ * + *
string unit = 2;
+ *
+ * @return The bytes for unit.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getUnitBytes() {
+ java.lang.Object ref = unit_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ unit_ = 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 (size_ != 0F) {
+ output.writeFloat(1, size_);
+ }
+ if (!getUnitBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, unit_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (size_ != 0F) {
+ size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, size_);
+ }
+ if (!getUnitBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, unit_);
+ }
+ 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.documentai.v1beta3.Document.Style.FontSize)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.documentai.v1beta3.Document.Style.FontSize other =
+ (com.google.cloud.documentai.v1beta3.Document.Style.FontSize) obj;
+
+ if (java.lang.Float.floatToIntBits(getSize())
+ != java.lang.Float.floatToIntBits(other.getSize())) return false;
+ if (!getUnit().equals(other.getUnit())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + SIZE_FIELD_NUMBER;
+ hash = (53 * hash) + java.lang.Float.floatToIntBits(getSize());
+ hash = (37 * hash) + UNIT_FIELD_NUMBER;
+ hash = (53 * hash) + getUnit().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.documentai.v1beta3.Document.Style.FontSize parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.Document.Style.FontSize 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.documentai.v1beta3.Document.Style.FontSize parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.Document.Style.FontSize 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.documentai.v1beta3.Document.Style.FontSize parseFrom(
+ byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.Document.Style.FontSize parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.Document.Style.FontSize parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.Document.Style.FontSize 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.documentai.v1beta3.Document.Style.FontSize parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.Document.Style.FontSize 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.documentai.v1beta3.Document.Style.FontSize parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.Document.Style.FontSize 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.documentai.v1beta3.Document.Style.FontSize 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;
+ }
+ /**
+ *
+ *
+ * + * Font size with unit. + *+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.Document.Style.FontSize} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Font size for the text. + *+ * + *
float size = 1;
+ *
+ * @return The size.
+ */
+ @java.lang.Override
+ public float getSize() {
+ return size_;
+ }
+ /**
+ *
+ *
+ * + * Font size for the text. + *+ * + *
float size = 1;
+ *
+ * @param value The size to set.
+ * @return This builder for chaining.
+ */
+ public Builder setSize(float value) {
+
+ size_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Font size for the text. + *+ * + *
float size = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearSize() {
+
+ size_ = 0F;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object unit_ = "";
+ /**
+ *
+ *
+ * + * Unit for the font size. Follows CSS naming (in, px, pt, etc.). + *+ * + *
string unit = 2;
+ *
+ * @return The unit.
+ */
+ public java.lang.String getUnit() {
+ java.lang.Object ref = unit_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ unit_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Unit for the font size. Follows CSS naming (in, px, pt, etc.). + *+ * + *
string unit = 2;
+ *
+ * @return The bytes for unit.
+ */
+ public com.google.protobuf.ByteString getUnitBytes() {
+ java.lang.Object ref = unit_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ unit_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Unit for the font size. Follows CSS naming (in, px, pt, etc.). + *+ * + *
string unit = 2;
+ *
+ * @param value The unit to set.
+ * @return This builder for chaining.
+ */
+ public Builder setUnit(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ unit_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Unit for the font size. Follows CSS naming (in, px, pt, etc.). + *+ * + *
string unit = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearUnit() {
+
+ unit_ = getDefaultInstance().getUnit();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Unit for the font size. Follows CSS naming (in, px, pt, etc.). + *+ * + *
string unit = 2;
+ *
+ * @param value The bytes for unit to set.
+ * @return This builder for chaining.
+ */
+ public Builder setUnitBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ unit_ = value;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.Document.Style.FontSize)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.Document.Style.FontSize)
+ private static final com.google.cloud.documentai.v1beta3.Document.Style.FontSize
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta3.Document.Style.FontSize();
+ }
+
+ public static com.google.cloud.documentai.v1beta3.Document.Style.FontSize
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta3.Document.text]. + *+ * + *
.google.cloud.documentai.v1beta3.Document.TextAnchor text_anchor = 1;
+ *
+ * @return Whether the textAnchor field is set.
+ */
+ @java.lang.Override
+ public boolean hasTextAnchor() {
+ return textAnchor_ != null;
+ }
+ /**
+ *
+ *
+ * + * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta3.Document.text]. + *+ * + *
.google.cloud.documentai.v1beta3.Document.TextAnchor text_anchor = 1;
+ *
+ * @return The textAnchor.
+ */
+ @java.lang.Override
+ public com.google.cloud.documentai.v1beta3.Document.TextAnchor getTextAnchor() {
+ return textAnchor_ == null
+ ? com.google.cloud.documentai.v1beta3.Document.TextAnchor.getDefaultInstance()
+ : textAnchor_;
+ }
+ /**
+ *
+ *
+ * + * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta3.Document.text]. + *+ * + *
.google.cloud.documentai.v1beta3.Document.TextAnchor text_anchor = 1;
+ */
+ @java.lang.Override
+ public com.google.cloud.documentai.v1beta3.Document.TextAnchorOrBuilder
+ getTextAnchorOrBuilder() {
+ return getTextAnchor();
+ }
+
+ public static final int COLOR_FIELD_NUMBER = 2;
+ private com.google.type.Color color_;
+ /**
+ *
+ *
+ * + * Text color. + *+ * + *
.google.type.Color color = 2;
+ *
+ * @return Whether the color field is set.
+ */
+ @java.lang.Override
+ public boolean hasColor() {
+ return color_ != null;
+ }
+ /**
+ *
+ *
+ * + * Text color. + *+ * + *
.google.type.Color color = 2;
+ *
+ * @return The color.
+ */
+ @java.lang.Override
+ public com.google.type.Color getColor() {
+ return color_ == null ? com.google.type.Color.getDefaultInstance() : color_;
+ }
+ /**
+ *
+ *
+ * + * Text color. + *+ * + *
.google.type.Color color = 2;
+ */
+ @java.lang.Override
+ public com.google.type.ColorOrBuilder getColorOrBuilder() {
+ return getColor();
+ }
+
+ public static final int BACKGROUND_COLOR_FIELD_NUMBER = 3;
+ private com.google.type.Color backgroundColor_;
+ /**
+ *
+ *
+ * + * Text background color. + *+ * + *
.google.type.Color background_color = 3;
+ *
+ * @return Whether the backgroundColor field is set.
+ */
+ @java.lang.Override
+ public boolean hasBackgroundColor() {
+ return backgroundColor_ != null;
+ }
+ /**
+ *
+ *
+ * + * Text background color. + *+ * + *
.google.type.Color background_color = 3;
+ *
+ * @return The backgroundColor.
+ */
+ @java.lang.Override
+ public com.google.type.Color getBackgroundColor() {
+ return backgroundColor_ == null
+ ? com.google.type.Color.getDefaultInstance()
+ : backgroundColor_;
+ }
+ /**
+ *
+ *
+ * + * Text background color. + *+ * + *
.google.type.Color background_color = 3;
+ */
+ @java.lang.Override
+ public com.google.type.ColorOrBuilder getBackgroundColorOrBuilder() {
+ return getBackgroundColor();
+ }
+
+ public static final int FONT_WEIGHT_FIELD_NUMBER = 4;
+ private volatile java.lang.Object fontWeight_;
+ /**
+ *
+ *
+ * + * Font weight. Possible values are normal, bold, bolder, and lighter. + * https://www.w3schools.com/cssref/pr_font_weight.asp + *+ * + *
string font_weight = 4;
+ *
+ * @return The fontWeight.
+ */
+ @java.lang.Override
+ public java.lang.String getFontWeight() {
+ java.lang.Object ref = fontWeight_;
+ 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();
+ fontWeight_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Font weight. Possible values are normal, bold, bolder, and lighter. + * https://www.w3schools.com/cssref/pr_font_weight.asp + *+ * + *
string font_weight = 4;
+ *
+ * @return The bytes for fontWeight.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getFontWeightBytes() {
+ java.lang.Object ref = fontWeight_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ fontWeight_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int TEXT_STYLE_FIELD_NUMBER = 5;
+ private volatile java.lang.Object textStyle_;
+ /**
+ *
+ *
+ * + * Text style. Possible values are normal, italic, and oblique. + * https://www.w3schools.com/cssref/pr_font_font-style.asp + *+ * + *
string text_style = 5;
+ *
+ * @return The textStyle.
+ */
+ @java.lang.Override
+ public java.lang.String getTextStyle() {
+ java.lang.Object ref = textStyle_;
+ 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();
+ textStyle_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Text style. Possible values are normal, italic, and oblique. + * https://www.w3schools.com/cssref/pr_font_font-style.asp + *+ * + *
string text_style = 5;
+ *
+ * @return The bytes for textStyle.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getTextStyleBytes() {
+ java.lang.Object ref = textStyle_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ textStyle_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int TEXT_DECORATION_FIELD_NUMBER = 6;
+ private volatile java.lang.Object textDecoration_;
+ /**
+ *
+ *
+ * + * Text decoration. Follows CSS standard. + * <text-decoration-line> <text-decoration-color> <text-decoration-style> + * https://www.w3schools.com/cssref/pr_text_text-decoration.asp + *+ * + *
string text_decoration = 6;
+ *
+ * @return The textDecoration.
+ */
+ @java.lang.Override
+ public java.lang.String getTextDecoration() {
+ java.lang.Object ref = textDecoration_;
+ 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();
+ textDecoration_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Text decoration. Follows CSS standard. + * <text-decoration-line> <text-decoration-color> <text-decoration-style> + * https://www.w3schools.com/cssref/pr_text_text-decoration.asp + *+ * + *
string text_decoration = 6;
+ *
+ * @return The bytes for textDecoration.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getTextDecorationBytes() {
+ java.lang.Object ref = textDecoration_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ textDecoration_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int FONT_SIZE_FIELD_NUMBER = 7;
+ private com.google.cloud.documentai.v1beta3.Document.Style.FontSize fontSize_;
+ /**
+ *
+ *
+ * + * Font size. + *+ * + *
.google.cloud.documentai.v1beta3.Document.Style.FontSize font_size = 7;
+ *
+ * @return Whether the fontSize field is set.
+ */
+ @java.lang.Override
+ public boolean hasFontSize() {
+ return fontSize_ != null;
+ }
+ /**
+ *
+ *
+ * + * Font size. + *+ * + *
.google.cloud.documentai.v1beta3.Document.Style.FontSize font_size = 7;
+ *
+ * @return The fontSize.
+ */
+ @java.lang.Override
+ public com.google.cloud.documentai.v1beta3.Document.Style.FontSize getFontSize() {
+ return fontSize_ == null
+ ? com.google.cloud.documentai.v1beta3.Document.Style.FontSize.getDefaultInstance()
+ : fontSize_;
+ }
+ /**
+ *
+ *
+ * + * Font size. + *+ * + *
.google.cloud.documentai.v1beta3.Document.Style.FontSize font_size = 7;
+ */
+ @java.lang.Override
+ public com.google.cloud.documentai.v1beta3.Document.Style.FontSizeOrBuilder
+ getFontSizeOrBuilder() {
+ return getFontSize();
+ }
+
+ 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 (textAnchor_ != null) {
+ output.writeMessage(1, getTextAnchor());
+ }
+ if (color_ != null) {
+ output.writeMessage(2, getColor());
+ }
+ if (backgroundColor_ != null) {
+ output.writeMessage(3, getBackgroundColor());
+ }
+ if (!getFontWeightBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 4, fontWeight_);
+ }
+ if (!getTextStyleBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 5, textStyle_);
+ }
+ if (!getTextDecorationBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 6, textDecoration_);
+ }
+ if (fontSize_ != null) {
+ output.writeMessage(7, getFontSize());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (textAnchor_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTextAnchor());
+ }
+ if (color_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getColor());
+ }
+ if (backgroundColor_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getBackgroundColor());
+ }
+ if (!getFontWeightBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, fontWeight_);
+ }
+ if (!getTextStyleBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, textStyle_);
+ }
+ if (!getTextDecorationBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, textDecoration_);
+ }
+ if (fontSize_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getFontSize());
+ }
+ 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.documentai.v1beta3.Document.Style)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.documentai.v1beta3.Document.Style other =
+ (com.google.cloud.documentai.v1beta3.Document.Style) obj;
+
+ if (hasTextAnchor() != other.hasTextAnchor()) return false;
+ if (hasTextAnchor()) {
+ if (!getTextAnchor().equals(other.getTextAnchor())) return false;
+ }
+ if (hasColor() != other.hasColor()) return false;
+ if (hasColor()) {
+ if (!getColor().equals(other.getColor())) return false;
+ }
+ if (hasBackgroundColor() != other.hasBackgroundColor()) return false;
+ if (hasBackgroundColor()) {
+ if (!getBackgroundColor().equals(other.getBackgroundColor())) return false;
+ }
+ if (!getFontWeight().equals(other.getFontWeight())) return false;
+ if (!getTextStyle().equals(other.getTextStyle())) return false;
+ if (!getTextDecoration().equals(other.getTextDecoration())) return false;
+ if (hasFontSize() != other.hasFontSize()) return false;
+ if (hasFontSize()) {
+ if (!getFontSize().equals(other.getFontSize())) return false;
+ }
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasTextAnchor()) {
+ hash = (37 * hash) + TEXT_ANCHOR_FIELD_NUMBER;
+ hash = (53 * hash) + getTextAnchor().hashCode();
+ }
+ if (hasColor()) {
+ hash = (37 * hash) + COLOR_FIELD_NUMBER;
+ hash = (53 * hash) + getColor().hashCode();
+ }
+ if (hasBackgroundColor()) {
+ hash = (37 * hash) + BACKGROUND_COLOR_FIELD_NUMBER;
+ hash = (53 * hash) + getBackgroundColor().hashCode();
+ }
+ hash = (37 * hash) + FONT_WEIGHT_FIELD_NUMBER;
+ hash = (53 * hash) + getFontWeight().hashCode();
+ hash = (37 * hash) + TEXT_STYLE_FIELD_NUMBER;
+ hash = (53 * hash) + getTextStyle().hashCode();
+ hash = (37 * hash) + TEXT_DECORATION_FIELD_NUMBER;
+ hash = (53 * hash) + getTextDecoration().hashCode();
+ if (hasFontSize()) {
+ hash = (37 * hash) + FONT_SIZE_FIELD_NUMBER;
+ hash = (53 * hash) + getFontSize().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.documentai.v1beta3.Document.Style parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.Document.Style 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.documentai.v1beta3.Document.Style parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.Document.Style 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.documentai.v1beta3.Document.Style parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.Document.Style parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.Document.Style parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.Document.Style 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.documentai.v1beta3.Document.Style parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.Document.Style 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.documentai.v1beta3.Document.Style parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.Document.Style 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.documentai.v1beta3.Document.Style 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;
+ }
+ /**
+ *
+ *
+ * + * Annotation for common text style attributes. This adheres to CSS + * conventions as much as possible. + *+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.Document.Style} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta3.Document.text]. + *+ * + *
.google.cloud.documentai.v1beta3.Document.TextAnchor text_anchor = 1;
+ *
+ * @return Whether the textAnchor field is set.
+ */
+ public boolean hasTextAnchor() {
+ return textAnchorBuilder_ != null || textAnchor_ != null;
+ }
+ /**
+ *
+ *
+ * + * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta3.Document.text]. + *+ * + *
.google.cloud.documentai.v1beta3.Document.TextAnchor text_anchor = 1;
+ *
+ * @return The textAnchor.
+ */
+ public com.google.cloud.documentai.v1beta3.Document.TextAnchor getTextAnchor() {
+ if (textAnchorBuilder_ == null) {
+ return textAnchor_ == null
+ ? com.google.cloud.documentai.v1beta3.Document.TextAnchor.getDefaultInstance()
+ : textAnchor_;
+ } else {
+ return textAnchorBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta3.Document.text]. + *+ * + *
.google.cloud.documentai.v1beta3.Document.TextAnchor text_anchor = 1;
+ */
+ public Builder setTextAnchor(com.google.cloud.documentai.v1beta3.Document.TextAnchor value) {
+ if (textAnchorBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ textAnchor_ = value;
+ onChanged();
+ } else {
+ textAnchorBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta3.Document.text]. + *+ * + *
.google.cloud.documentai.v1beta3.Document.TextAnchor text_anchor = 1;
+ */
+ public Builder setTextAnchor(
+ com.google.cloud.documentai.v1beta3.Document.TextAnchor.Builder builderForValue) {
+ if (textAnchorBuilder_ == null) {
+ textAnchor_ = builderForValue.build();
+ onChanged();
+ } else {
+ textAnchorBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta3.Document.text]. + *+ * + *
.google.cloud.documentai.v1beta3.Document.TextAnchor text_anchor = 1;
+ */
+ public Builder mergeTextAnchor(
+ com.google.cloud.documentai.v1beta3.Document.TextAnchor value) {
+ if (textAnchorBuilder_ == null) {
+ if (textAnchor_ != null) {
+ textAnchor_ =
+ com.google.cloud.documentai.v1beta3.Document.TextAnchor.newBuilder(textAnchor_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ textAnchor_ = value;
+ }
+ onChanged();
+ } else {
+ textAnchorBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta3.Document.text]. + *+ * + *
.google.cloud.documentai.v1beta3.Document.TextAnchor text_anchor = 1;
+ */
+ public Builder clearTextAnchor() {
+ if (textAnchorBuilder_ == null) {
+ textAnchor_ = null;
+ onChanged();
+ } else {
+ textAnchor_ = null;
+ textAnchorBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta3.Document.text]. + *+ * + *
.google.cloud.documentai.v1beta3.Document.TextAnchor text_anchor = 1;
+ */
+ public com.google.cloud.documentai.v1beta3.Document.TextAnchor.Builder
+ getTextAnchorBuilder() {
+
+ onChanged();
+ return getTextAnchorFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta3.Document.text]. + *+ * + *
.google.cloud.documentai.v1beta3.Document.TextAnchor text_anchor = 1;
+ */
+ public com.google.cloud.documentai.v1beta3.Document.TextAnchorOrBuilder
+ getTextAnchorOrBuilder() {
+ if (textAnchorBuilder_ != null) {
+ return textAnchorBuilder_.getMessageOrBuilder();
+ } else {
+ return textAnchor_ == null
+ ? com.google.cloud.documentai.v1beta3.Document.TextAnchor.getDefaultInstance()
+ : textAnchor_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta3.Document.text]. + *+ * + *
.google.cloud.documentai.v1beta3.Document.TextAnchor text_anchor = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.documentai.v1beta3.Document.TextAnchor,
+ com.google.cloud.documentai.v1beta3.Document.TextAnchor.Builder,
+ com.google.cloud.documentai.v1beta3.Document.TextAnchorOrBuilder>
+ getTextAnchorFieldBuilder() {
+ if (textAnchorBuilder_ == null) {
+ textAnchorBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.documentai.v1beta3.Document.TextAnchor,
+ com.google.cloud.documentai.v1beta3.Document.TextAnchor.Builder,
+ com.google.cloud.documentai.v1beta3.Document.TextAnchorOrBuilder>(
+ getTextAnchor(), getParentForChildren(), isClean());
+ textAnchor_ = null;
+ }
+ return textAnchorBuilder_;
+ }
+
+ private com.google.type.Color color_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder>
+ colorBuilder_;
+ /**
+ *
+ *
+ * + * Text color. + *+ * + *
.google.type.Color color = 2;
+ *
+ * @return Whether the color field is set.
+ */
+ public boolean hasColor() {
+ return colorBuilder_ != null || color_ != null;
+ }
+ /**
+ *
+ *
+ * + * Text color. + *+ * + *
.google.type.Color color = 2;
+ *
+ * @return The color.
+ */
+ public com.google.type.Color getColor() {
+ if (colorBuilder_ == null) {
+ return color_ == null ? com.google.type.Color.getDefaultInstance() : color_;
+ } else {
+ return colorBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Text color. + *+ * + *
.google.type.Color color = 2;
+ */
+ public Builder setColor(com.google.type.Color value) {
+ if (colorBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ color_ = value;
+ onChanged();
+ } else {
+ colorBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Text color. + *+ * + *
.google.type.Color color = 2;
+ */
+ public Builder setColor(com.google.type.Color.Builder builderForValue) {
+ if (colorBuilder_ == null) {
+ color_ = builderForValue.build();
+ onChanged();
+ } else {
+ colorBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Text color. + *+ * + *
.google.type.Color color = 2;
+ */
+ public Builder mergeColor(com.google.type.Color value) {
+ if (colorBuilder_ == null) {
+ if (color_ != null) {
+ color_ = com.google.type.Color.newBuilder(color_).mergeFrom(value).buildPartial();
+ } else {
+ color_ = value;
+ }
+ onChanged();
+ } else {
+ colorBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Text color. + *+ * + *
.google.type.Color color = 2;
+ */
+ public Builder clearColor() {
+ if (colorBuilder_ == null) {
+ color_ = null;
+ onChanged();
+ } else {
+ color_ = null;
+ colorBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Text color. + *+ * + *
.google.type.Color color = 2;
+ */
+ public com.google.type.Color.Builder getColorBuilder() {
+
+ onChanged();
+ return getColorFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Text color. + *+ * + *
.google.type.Color color = 2;
+ */
+ public com.google.type.ColorOrBuilder getColorOrBuilder() {
+ if (colorBuilder_ != null) {
+ return colorBuilder_.getMessageOrBuilder();
+ } else {
+ return color_ == null ? com.google.type.Color.getDefaultInstance() : color_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Text color. + *+ * + *
.google.type.Color color = 2;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder>
+ getColorFieldBuilder() {
+ if (colorBuilder_ == null) {
+ colorBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.type.Color,
+ com.google.type.Color.Builder,
+ com.google.type.ColorOrBuilder>(getColor(), getParentForChildren(), isClean());
+ color_ = null;
+ }
+ return colorBuilder_;
+ }
+
+ private com.google.type.Color backgroundColor_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder>
+ backgroundColorBuilder_;
+ /**
+ *
+ *
+ * + * Text background color. + *+ * + *
.google.type.Color background_color = 3;
+ *
+ * @return Whether the backgroundColor field is set.
+ */
+ public boolean hasBackgroundColor() {
+ return backgroundColorBuilder_ != null || backgroundColor_ != null;
+ }
+ /**
+ *
+ *
+ * + * Text background color. + *+ * + *
.google.type.Color background_color = 3;
+ *
+ * @return The backgroundColor.
+ */
+ public com.google.type.Color getBackgroundColor() {
+ if (backgroundColorBuilder_ == null) {
+ return backgroundColor_ == null
+ ? com.google.type.Color.getDefaultInstance()
+ : backgroundColor_;
+ } else {
+ return backgroundColorBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Text background color. + *+ * + *
.google.type.Color background_color = 3;
+ */
+ public Builder setBackgroundColor(com.google.type.Color value) {
+ if (backgroundColorBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ backgroundColor_ = value;
+ onChanged();
+ } else {
+ backgroundColorBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Text background color. + *+ * + *
.google.type.Color background_color = 3;
+ */
+ public Builder setBackgroundColor(com.google.type.Color.Builder builderForValue) {
+ if (backgroundColorBuilder_ == null) {
+ backgroundColor_ = builderForValue.build();
+ onChanged();
+ } else {
+ backgroundColorBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Text background color. + *+ * + *
.google.type.Color background_color = 3;
+ */
+ public Builder mergeBackgroundColor(com.google.type.Color value) {
+ if (backgroundColorBuilder_ == null) {
+ if (backgroundColor_ != null) {
+ backgroundColor_ =
+ com.google.type.Color.newBuilder(backgroundColor_).mergeFrom(value).buildPartial();
+ } else {
+ backgroundColor_ = value;
+ }
+ onChanged();
+ } else {
+ backgroundColorBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Text background color. + *+ * + *
.google.type.Color background_color = 3;
+ */
+ public Builder clearBackgroundColor() {
+ if (backgroundColorBuilder_ == null) {
+ backgroundColor_ = null;
+ onChanged();
+ } else {
+ backgroundColor_ = null;
+ backgroundColorBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Text background color. + *+ * + *
.google.type.Color background_color = 3;
+ */
+ public com.google.type.Color.Builder getBackgroundColorBuilder() {
+
+ onChanged();
+ return getBackgroundColorFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Text background color. + *+ * + *
.google.type.Color background_color = 3;
+ */
+ public com.google.type.ColorOrBuilder getBackgroundColorOrBuilder() {
+ if (backgroundColorBuilder_ != null) {
+ return backgroundColorBuilder_.getMessageOrBuilder();
+ } else {
+ return backgroundColor_ == null
+ ? com.google.type.Color.getDefaultInstance()
+ : backgroundColor_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Text background color. + *+ * + *
.google.type.Color background_color = 3;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder>
+ getBackgroundColorFieldBuilder() {
+ if (backgroundColorBuilder_ == null) {
+ backgroundColorBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.type.Color,
+ com.google.type.Color.Builder,
+ com.google.type.ColorOrBuilder>(
+ getBackgroundColor(), getParentForChildren(), isClean());
+ backgroundColor_ = null;
+ }
+ return backgroundColorBuilder_;
+ }
+
+ private java.lang.Object fontWeight_ = "";
+ /**
+ *
+ *
+ * + * Font weight. Possible values are normal, bold, bolder, and lighter. + * https://www.w3schools.com/cssref/pr_font_weight.asp + *+ * + *
string font_weight = 4;
+ *
+ * @return The fontWeight.
+ */
+ public java.lang.String getFontWeight() {
+ java.lang.Object ref = fontWeight_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ fontWeight_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Font weight. Possible values are normal, bold, bolder, and lighter. + * https://www.w3schools.com/cssref/pr_font_weight.asp + *+ * + *
string font_weight = 4;
+ *
+ * @return The bytes for fontWeight.
+ */
+ public com.google.protobuf.ByteString getFontWeightBytes() {
+ java.lang.Object ref = fontWeight_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ fontWeight_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Font weight. Possible values are normal, bold, bolder, and lighter. + * https://www.w3schools.com/cssref/pr_font_weight.asp + *+ * + *
string font_weight = 4;
+ *
+ * @param value The fontWeight to set.
+ * @return This builder for chaining.
+ */
+ public Builder setFontWeight(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ fontWeight_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Font weight. Possible values are normal, bold, bolder, and lighter. + * https://www.w3schools.com/cssref/pr_font_weight.asp + *+ * + *
string font_weight = 4;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearFontWeight() {
+
+ fontWeight_ = getDefaultInstance().getFontWeight();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Font weight. Possible values are normal, bold, bolder, and lighter. + * https://www.w3schools.com/cssref/pr_font_weight.asp + *+ * + *
string font_weight = 4;
+ *
+ * @param value The bytes for fontWeight to set.
+ * @return This builder for chaining.
+ */
+ public Builder setFontWeightBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ fontWeight_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object textStyle_ = "";
+ /**
+ *
+ *
+ * + * Text style. Possible values are normal, italic, and oblique. + * https://www.w3schools.com/cssref/pr_font_font-style.asp + *+ * + *
string text_style = 5;
+ *
+ * @return The textStyle.
+ */
+ public java.lang.String getTextStyle() {
+ java.lang.Object ref = textStyle_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ textStyle_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Text style. Possible values are normal, italic, and oblique. + * https://www.w3schools.com/cssref/pr_font_font-style.asp + *+ * + *
string text_style = 5;
+ *
+ * @return The bytes for textStyle.
+ */
+ public com.google.protobuf.ByteString getTextStyleBytes() {
+ java.lang.Object ref = textStyle_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ textStyle_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Text style. Possible values are normal, italic, and oblique. + * https://www.w3schools.com/cssref/pr_font_font-style.asp + *+ * + *
string text_style = 5;
+ *
+ * @param value The textStyle to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTextStyle(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ textStyle_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Text style. Possible values are normal, italic, and oblique. + * https://www.w3schools.com/cssref/pr_font_font-style.asp + *+ * + *
string text_style = 5;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearTextStyle() {
+
+ textStyle_ = getDefaultInstance().getTextStyle();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Text style. Possible values are normal, italic, and oblique. + * https://www.w3schools.com/cssref/pr_font_font-style.asp + *+ * + *
string text_style = 5;
+ *
+ * @param value The bytes for textStyle to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTextStyleBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ textStyle_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object textDecoration_ = "";
+ /**
+ *
+ *
+ * + * Text decoration. Follows CSS standard. + * <text-decoration-line> <text-decoration-color> <text-decoration-style> + * https://www.w3schools.com/cssref/pr_text_text-decoration.asp + *+ * + *
string text_decoration = 6;
+ *
+ * @return The textDecoration.
+ */
+ public java.lang.String getTextDecoration() {
+ java.lang.Object ref = textDecoration_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ textDecoration_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Text decoration. Follows CSS standard. + * <text-decoration-line> <text-decoration-color> <text-decoration-style> + * https://www.w3schools.com/cssref/pr_text_text-decoration.asp + *+ * + *
string text_decoration = 6;
+ *
+ * @return The bytes for textDecoration.
+ */
+ public com.google.protobuf.ByteString getTextDecorationBytes() {
+ java.lang.Object ref = textDecoration_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ textDecoration_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Text decoration. Follows CSS standard. + * <text-decoration-line> <text-decoration-color> <text-decoration-style> + * https://www.w3schools.com/cssref/pr_text_text-decoration.asp + *+ * + *
string text_decoration = 6;
+ *
+ * @param value The textDecoration to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTextDecoration(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ textDecoration_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Text decoration. Follows CSS standard. + * <text-decoration-line> <text-decoration-color> <text-decoration-style> + * https://www.w3schools.com/cssref/pr_text_text-decoration.asp + *+ * + *
string text_decoration = 6;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearTextDecoration() {
+
+ textDecoration_ = getDefaultInstance().getTextDecoration();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Text decoration. Follows CSS standard. + * <text-decoration-line> <text-decoration-color> <text-decoration-style> + * https://www.w3schools.com/cssref/pr_text_text-decoration.asp + *+ * + *
string text_decoration = 6;
+ *
+ * @param value The bytes for textDecoration to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTextDecorationBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ textDecoration_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.cloud.documentai.v1beta3.Document.Style.FontSize fontSize_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.documentai.v1beta3.Document.Style.FontSize,
+ com.google.cloud.documentai.v1beta3.Document.Style.FontSize.Builder,
+ com.google.cloud.documentai.v1beta3.Document.Style.FontSizeOrBuilder>
+ fontSizeBuilder_;
+ /**
+ *
+ *
+ * + * Font size. + *+ * + *
.google.cloud.documentai.v1beta3.Document.Style.FontSize font_size = 7;
+ *
+ * @return Whether the fontSize field is set.
+ */
+ public boolean hasFontSize() {
+ return fontSizeBuilder_ != null || fontSize_ != null;
+ }
+ /**
+ *
+ *
+ * + * Font size. + *+ * + *
.google.cloud.documentai.v1beta3.Document.Style.FontSize font_size = 7;
+ *
+ * @return The fontSize.
+ */
+ public com.google.cloud.documentai.v1beta3.Document.Style.FontSize getFontSize() {
+ if (fontSizeBuilder_ == null) {
+ return fontSize_ == null
+ ? com.google.cloud.documentai.v1beta3.Document.Style.FontSize.getDefaultInstance()
+ : fontSize_;
+ } else {
+ return fontSizeBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Font size. + *+ * + *
.google.cloud.documentai.v1beta3.Document.Style.FontSize font_size = 7;
+ */
+ public Builder setFontSize(
+ com.google.cloud.documentai.v1beta3.Document.Style.FontSize value) {
+ if (fontSizeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ fontSize_ = value;
+ onChanged();
+ } else {
+ fontSizeBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Font size. + *+ * + *
.google.cloud.documentai.v1beta3.Document.Style.FontSize font_size = 7;
+ */
+ public Builder setFontSize(
+ com.google.cloud.documentai.v1beta3.Document.Style.FontSize.Builder builderForValue) {
+ if (fontSizeBuilder_ == null) {
+ fontSize_ = builderForValue.build();
+ onChanged();
+ } else {
+ fontSizeBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Font size. + *+ * + *
.google.cloud.documentai.v1beta3.Document.Style.FontSize font_size = 7;
+ */
+ public Builder mergeFontSize(
+ com.google.cloud.documentai.v1beta3.Document.Style.FontSize value) {
+ if (fontSizeBuilder_ == null) {
+ if (fontSize_ != null) {
+ fontSize_ =
+ com.google.cloud.documentai.v1beta3.Document.Style.FontSize.newBuilder(fontSize_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ fontSize_ = value;
+ }
+ onChanged();
+ } else {
+ fontSizeBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Font size. + *+ * + *
.google.cloud.documentai.v1beta3.Document.Style.FontSize font_size = 7;
+ */
+ public Builder clearFontSize() {
+ if (fontSizeBuilder_ == null) {
+ fontSize_ = null;
+ onChanged();
+ } else {
+ fontSize_ = null;
+ fontSizeBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Font size. + *+ * + *
.google.cloud.documentai.v1beta3.Document.Style.FontSize font_size = 7;
+ */
+ public com.google.cloud.documentai.v1beta3.Document.Style.FontSize.Builder
+ getFontSizeBuilder() {
+
+ onChanged();
+ return getFontSizeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Font size. + *+ * + *
.google.cloud.documentai.v1beta3.Document.Style.FontSize font_size = 7;
+ */
+ public com.google.cloud.documentai.v1beta3.Document.Style.FontSizeOrBuilder
+ getFontSizeOrBuilder() {
+ if (fontSizeBuilder_ != null) {
+ return fontSizeBuilder_.getMessageOrBuilder();
+ } else {
+ return fontSize_ == null
+ ? com.google.cloud.documentai.v1beta3.Document.Style.FontSize.getDefaultInstance()
+ : fontSize_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Font size. + *+ * + *
.google.cloud.documentai.v1beta3.Document.Style.FontSize font_size = 7;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.documentai.v1beta3.Document.Style.FontSize,
+ com.google.cloud.documentai.v1beta3.Document.Style.FontSize.Builder,
+ com.google.cloud.documentai.v1beta3.Document.Style.FontSizeOrBuilder>
+ getFontSizeFieldBuilder() {
+ if (fontSizeBuilder_ == null) {
+ fontSizeBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.documentai.v1beta3.Document.Style.FontSize,
+ com.google.cloud.documentai.v1beta3.Document.Style.FontSize.Builder,
+ com.google.cloud.documentai.v1beta3.Document.Style.FontSizeOrBuilder>(
+ getFontSize(), getParentForChildren(), isClean());
+ fontSize_ = null;
+ }
+ return fontSizeBuilder_;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.Document.Style)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.Document.Style)
+ private static final com.google.cloud.documentai.v1beta3.Document.Style DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta3.Document.Style();
+ }
+
+ public static com.google.cloud.documentai.v1beta3.Document.Style getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser