From 02050426e9d69f17bc3a4e376086108f0d48ec28 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 20 Jul 2023 13:47:16 -0400 Subject: [PATCH] feat!: [documentai] removed id field from Document message (#9642) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat!: removed id field from Document message feat: added http configuration and document publishing for v1beta2 feat: added ImportDocuments, GetDocument and BatchDeleteDocuments RPCs for v1beta3 PiperOrigin-RevId: 548236986 Source-Link: https://github.com/googleapis/googleapis/commit/237b3c1ff2d951fd34f45a7b62d1ca5f31305fd7 Source-Link: https://github.com/googleapis/googleapis-gen/commit/29f701c9f344e196fbb81a81e65f90ddba5a06f3 Copy-Tag: eyJwIjoiamF2YS1kb2N1bWVudC1haS8uT3dsQm90LnlhbWwiLCJoIjoiMjlmNzAxYzlmMzQ0ZTE5NmZiYjgxYTgxZTY1ZjkwZGRiYTVhMDZmMyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- java-document-ai/README.md | 4 +- .../v1/DocumentProcessorServiceClient.java | 5 + .../DocumentUnderstandingServiceClient.java | 250 + .../DocumentUnderstandingServiceSettings.java | 30 + .../documentai/v1beta2/gapic_metadata.json | 6 + .../DocumentUnderstandingServiceStub.java | 19 + ...umentUnderstandingServiceStubSettings.java | 126 +- .../GrpcDocumentUnderstandingServiceStub.java | 74 + .../DocumentProcessorServiceClient.java | 4 +- .../v1beta3/DocumentServiceClient.java | 398 +- .../v1beta3/DocumentServiceSettings.java | 67 +- .../documentai/v1beta3/gapic_metadata.json | 9 + .../documentai/v1beta3/package-info.java | 4 +- .../v1beta3/stub/DocumentServiceStub.java | 32 + .../stub/DocumentServiceStubSettings.java | 188 +- .../v1beta3/stub/GrpcDocumentServiceStub.java | 129 + .../stub/HttpJsonDocumentServiceStub.java | 227 + ...ocumentUnderstandingServiceClientTest.java | 115 +- .../documentai/v1beta2/MockLocations.java | 59 + .../documentai/v1beta2/MockLocationsImpl.java | 105 + .../DocumentServiceClientHttpJsonTest.java | 240 +- .../v1beta3/DocumentServiceClientTest.java | 208 +- .../v1beta3/MockDocumentServiceImpl.java | 63 + .../v1beta3/DocumentServiceGrpc.java | 359 +- .../documentai/v1/BatchProcessRequest.java | 267 + .../v1/BatchProcessRequestOrBuilder.java | 35 + .../documentai/v1/DocumentAiProcessor.java | 72 +- .../v1/DocumentAiProcessorService.java | 624 +- .../cloud/documentai/v1/DocumentIoProto.java | 47 +- .../google/cloud/documentai/v1/OcrConfig.java | 2291 + .../documentai/v1/OcrConfigOrBuilder.java | 190 + .../cloud/documentai/v1/ProcessOptions.java | 716 + .../v1/ProcessOptionsOrBuilder.java | 63 + .../cloud/documentai/v1/ProcessRequest.java | 600 +- .../v1/ProcessRequestOrBuilder.java | 70 + .../cloud/documentai/v1/ProcessorVersion.java | 16 +- .../v1/ProcessorVersionOrBuilder.java | 4 +- .../v1/TrainProcessorVersionRequest.java | 1371 +- ...TrainProcessorVersionRequestOrBuilder.java | 47 + .../cloud/documentai/v1/document_io.proto | 41 + .../v1/document_processor_service.proto | 38 + .../cloud/documentai/v1/processor.proto | 4 +- .../cloud/documentai/v1beta2/Barcode.java | 1211 + .../documentai/v1beta2/BarcodeOrBuilder.java | 164 + .../documentai/v1beta2/BarcodeProto.java | 68 + .../cloud/documentai/v1beta2/Document.java | 72689 +++++++++++----- .../documentai/v1beta2/DocumentAiProto.java | 152 +- .../documentai/v1beta2/DocumentOrBuilder.java | 274 +- .../documentai/v1beta2/DocumentProto.java | 636 +- .../v1beta2/FormExtractionParams.java | 313 +- .../FormExtractionParamsOrBuilder.java | 69 +- .../cloud/documentai/v1beta2/InputConfig.java | 77 +- .../v1beta2/InputConfigOrBuilder.java | 22 +- .../documentai/v1beta2/KeyValuePairHint.java | 4 +- .../documentai/v1beta2/NormalizedVertex.java | 8 +- .../v1beta2/NormalizedVertexOrBuilder.java | 2 +- .../v1beta2/ProcessDocumentRequest.java | 72 +- .../ProcessDocumentRequestOrBuilder.java | 18 +- .../v1beta2/TableExtractionParams.java | 39 +- .../TableExtractionParamsOrBuilder.java | 12 +- .../cloud/documentai/v1beta2/Vertex.java | 8 +- .../documentai/v1beta2/VertexOrBuilder.java | 2 +- .../cloud/documentai/v1beta2/barcode.proto | 69 + .../cloud/documentai/v1beta2/document.proto | 685 +- .../v1beta2/document_understanding.proto | 49 +- .../cloud/documentai/v1beta2/geometry.proto | 7 +- .../v1beta3/BatchDatasetDocuments.java | 2237 + .../BatchDatasetDocumentsOrBuilder.java | 113 + .../v1beta3/BatchDeleteDocumentsMetadata.java | 2603 + ...BatchDeleteDocumentsMetadataOrBuilder.java | 157 + .../v1beta3/BatchDeleteDocumentsRequest.java | 963 + .../BatchDeleteDocumentsRequestOrBuilder.java | 104 + .../v1beta3/BatchDeleteDocumentsResponse.java | 438 + ...BatchDeleteDocumentsResponseOrBuilder.java | 24 + .../v1beta3/BatchProcessMetadata.java | 18 +- .../v1beta3/BatchProcessRequest.java | 8 +- .../v1beta3/BatchProcessRequestOrBuilder.java | 4 +- .../cloud/documentai/v1beta3/DatasetName.java | 223 + .../documentai/v1beta3/DatasetProto.java | 174 +- .../documentai/v1beta3/DatasetSplitType.java | 203 + .../v1beta3/DocumentAiDocumentService.java | 361 +- .../v1beta3/DocumentAiProcessor.java | 74 +- .../v1beta3/DocumentAiProcessorService.java | 767 +- .../cloud/documentai/v1beta3/DocumentId.java | 2983 + .../v1beta3/DocumentIdOrBuilder.java | 140 + .../documentai/v1beta3/DocumentPageRange.java | 628 + .../v1beta3/DocumentPageRangeOrBuilder.java | 51 + .../documentai/v1beta3/DocumentProto.java | 33 +- .../v1beta3/GetDocumentRequest.java | 1472 + .../v1beta3/GetDocumentRequestOrBuilder.java | 175 + .../v1beta3/GetDocumentResponse.java | 603 + .../v1beta3/GetDocumentResponseOrBuilder.java | 40 + .../v1beta3/ImportDocumentsMetadata.java | 4308 + .../ImportDocumentsMetadataOrBuilder.java | 210 + .../v1beta3/ImportDocumentsRequest.java | 3462 + .../ImportDocumentsRequestOrBuilder.java | 132 + .../v1beta3/ImportDocumentsResponse.java | 432 + .../ImportDocumentsResponseOrBuilder.java | 24 + .../documentai/v1beta3/ProcessRequest.java | 377 +- .../v1beta3/ProcessRequestOrBuilder.java | 39 +- .../documentai/v1beta3/ProcessResponse.java | 14 +- .../v1beta3/ProcessResponseOrBuilder.java | 4 +- .../documentai/v1beta3/ProcessorVersion.java | 16 +- .../v1beta3/ProcessorVersionOrBuilder.java | 4 +- .../v1beta3/ReviewDocumentRequest.java | 8 +- .../ReviewDocumentRequestOrBuilder.java | 4 +- .../cloud/documentai/v1beta3/RevisionRef.java | 1386 + .../v1beta3/RevisionRefOrBuilder.java | 144 + .../cloud/documentai/v1beta3/dataset.proto | 53 + .../cloud/documentai/v1beta3/document.proto | 32 + .../v1beta3/document_processor_service.proto | 3 + .../documentai/v1beta3/document_service.proto | 213 + .../cloud/documentai/v1beta3/processor.proto | 4 +- .../AsyncBatchProcessDocuments.java | 2 + .../AsyncBatchProcessDocumentsLRO.java | 2 + .../SyncBatchProcessDocuments.java | 2 + .../processdocument/AsyncProcessDocument.java | 2 + .../processdocument/SyncProcessDocument.java | 2 + .../getlocation/AsyncGetLocation.java | 47 + .../getlocation/SyncGetLocation.java | 43 + .../listlocations/AsyncListLocations.java | 55 + .../AsyncListLocationsPaged.java | 63 + .../listlocations/SyncListLocations.java | 52 + .../SyncBatchProcessDocumentsString.java | 4 +- .../SyncProcessDocumentString.java | 4 +- .../AsyncBatchDeleteDocuments.java | 51 + .../AsyncBatchDeleteDocumentsLRO.java | 52 + .../SyncBatchDeleteDocuments.java | 48 + .../SyncBatchDeleteDocumentsString.java | 42 + .../getdocument/AsyncGetDocument.java | 56 + .../getdocument/SyncGetDocument.java | 52 + .../SyncGetDocumentDatasetname.java | 42 + .../getdocument/SyncGetDocumentString.java | 42 + .../importdocuments/AsyncImportDocuments.java | 53 + .../AsyncImportDocumentsLRO.java | 54 + .../importdocuments/SyncImportDocuments.java | 49 + .../SyncImportDocumentsDatasetname.java | 42 + .../SyncImportDocumentsString.java | 42 + .../SyncGetDocument.java} | 14 +- .../SyncGetDocument.java} | 14 +- 140 files changed, 88196 insertions(+), 24067 deletions(-) create mode 100644 java-document-ai/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta2/MockLocations.java create mode 100644 java-document-ai/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta2/MockLocationsImpl.java create mode 100644 java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/OcrConfig.java create mode 100644 java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/OcrConfigOrBuilder.java create mode 100644 java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessOptions.java create mode 100644 java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessOptionsOrBuilder.java create mode 100644 java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/Barcode.java create mode 100644 java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/BarcodeOrBuilder.java create mode 100644 java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/BarcodeProto.java create mode 100644 java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/proto/google/cloud/documentai/v1beta2/barcode.proto create mode 100644 java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchDatasetDocuments.java create mode 100644 java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchDatasetDocumentsOrBuilder.java create mode 100644 java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchDeleteDocumentsMetadata.java create mode 100644 java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchDeleteDocumentsMetadataOrBuilder.java create mode 100644 java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchDeleteDocumentsRequest.java create mode 100644 java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchDeleteDocumentsRequestOrBuilder.java create mode 100644 java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchDeleteDocumentsResponse.java create mode 100644 java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchDeleteDocumentsResponseOrBuilder.java create mode 100644 java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DatasetName.java create mode 100644 java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DatasetSplitType.java create mode 100644 java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentId.java create mode 100644 java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentIdOrBuilder.java create mode 100644 java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentPageRange.java create mode 100644 java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentPageRangeOrBuilder.java create mode 100644 java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/GetDocumentRequest.java create mode 100644 java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/GetDocumentRequestOrBuilder.java create mode 100644 java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/GetDocumentResponse.java create mode 100644 java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/GetDocumentResponseOrBuilder.java create mode 100644 java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ImportDocumentsMetadata.java create mode 100644 java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ImportDocumentsMetadataOrBuilder.java create mode 100644 java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ImportDocumentsRequest.java create mode 100644 java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ImportDocumentsRequestOrBuilder.java create mode 100644 java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ImportDocumentsResponse.java create mode 100644 java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ImportDocumentsResponseOrBuilder.java create mode 100644 java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/RevisionRef.java create mode 100644 java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/RevisionRefOrBuilder.java create mode 100644 java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta2/documentunderstandingservice/getlocation/AsyncGetLocation.java create mode 100644 java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta2/documentunderstandingservice/getlocation/SyncGetLocation.java create mode 100644 java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta2/documentunderstandingservice/listlocations/AsyncListLocations.java create mode 100644 java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta2/documentunderstandingservice/listlocations/AsyncListLocationsPaged.java create mode 100644 java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta2/documentunderstandingservice/listlocations/SyncListLocations.java create mode 100644 java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/batchdeletedocuments/AsyncBatchDeleteDocuments.java create mode 100644 java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/batchdeletedocuments/AsyncBatchDeleteDocumentsLRO.java create mode 100644 java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/batchdeletedocuments/SyncBatchDeleteDocuments.java create mode 100644 java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/batchdeletedocuments/SyncBatchDeleteDocumentsString.java create mode 100644 java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/getdocument/AsyncGetDocument.java create mode 100644 java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/getdocument/SyncGetDocument.java create mode 100644 java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/getdocument/SyncGetDocumentDatasetname.java create mode 100644 java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/getdocument/SyncGetDocumentString.java create mode 100644 java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/importdocuments/AsyncImportDocuments.java create mode 100644 java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/importdocuments/AsyncImportDocumentsLRO.java create mode 100644 java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/importdocuments/SyncImportDocuments.java create mode 100644 java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/importdocuments/SyncImportDocumentsDatasetname.java create mode 100644 java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/importdocuments/SyncImportDocumentsString.java rename java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservicesettings/{getdatasetschema/SyncGetDatasetSchema.java => getdocument/SyncGetDocument.java} (87%) rename java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/stub/documentservicestubsettings/{getdatasetschema/SyncGetDatasetSchema.java => getdocument/SyncGetDocument.java} (87%) diff --git a/java-document-ai/README.md b/java-document-ai/README.md index 4c3c46c07811..b90c440e5ce9 100644 --- a/java-document-ai/README.md +++ b/java-document-ai/README.md @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.17.0 + 26.19.0 pom import @@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-document-ai.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-document-ai/2.23.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-document-ai/2.25.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/DocumentProcessorServiceClient.java b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/DocumentProcessorServiceClient.java index 51873b4c19dd..5a747e1d0239 100644 --- a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/DocumentProcessorServiceClient.java +++ b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/DocumentProcessorServiceClient.java @@ -306,6 +306,7 @@ public final ProcessResponse processDocument(String name) { * .setName(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString()) * .setSkipHumanReview(true) * .setFieldMask(FieldMask.newBuilder().build()) + * .setProcessOptions(ProcessOptions.newBuilder().build()) * .build(); * ProcessResponse response = documentProcessorServiceClient.processDocument(request); * } @@ -337,6 +338,7 @@ public final ProcessResponse processDocument(ProcessRequest request) { * .setName(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString()) * .setSkipHumanReview(true) * .setFieldMask(FieldMask.newBuilder().build()) + * .setProcessOptions(ProcessOptions.newBuilder().build()) * .build(); * ApiFuture future = * documentProcessorServiceClient.processDocumentCallable().futureCall(request); @@ -440,6 +442,7 @@ public final UnaryCallable processDocumentCalla * .setInputDocuments(BatchDocumentsInputConfig.newBuilder().build()) * .setDocumentOutputConfig(DocumentOutputConfig.newBuilder().build()) * .setSkipHumanReview(true) + * .setProcessOptions(ProcessOptions.newBuilder().build()) * .build(); * BatchProcessResponse response = * documentProcessorServiceClient.batchProcessDocumentsAsync(request).get(); @@ -475,6 +478,7 @@ public final UnaryCallable processDocumentCalla * .setInputDocuments(BatchDocumentsInputConfig.newBuilder().build()) * .setDocumentOutputConfig(DocumentOutputConfig.newBuilder().build()) * .setSkipHumanReview(true) + * .setProcessOptions(ProcessOptions.newBuilder().build()) * .build(); * OperationFuture future = * documentProcessorServiceClient @@ -511,6 +515,7 @@ public final UnaryCallable processDocumentCalla * .setInputDocuments(BatchDocumentsInputConfig.newBuilder().build()) * .setDocumentOutputConfig(DocumentOutputConfig.newBuilder().build()) * .setSkipHumanReview(true) + * .setProcessOptions(ProcessOptions.newBuilder().build()) * .build(); * ApiFuture future = * documentProcessorServiceClient.batchProcessDocumentsCallable().futureCall(request); diff --git a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/DocumentUnderstandingServiceClient.java b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/DocumentUnderstandingServiceClient.java index 0f7eda8ebd55..f17fdf37ba4a 100644 --- a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/DocumentUnderstandingServiceClient.java +++ b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/DocumentUnderstandingServiceClient.java @@ -16,13 +16,24 @@ package com.google.cloud.documentai.v1beta2; +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; import com.google.api.core.BetaApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.documentai.v1beta2.stub.DocumentUnderstandingServiceStub; import com.google.cloud.documentai.v1beta2.stub.DocumentUnderstandingServiceStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.util.concurrent.MoreExecutors; import com.google.longrunning.Operation; import com.google.longrunning.OperationsClient; import java.io.IOException; @@ -393,6 +404,169 @@ public final UnaryCallable processDocumentCall return stub.processDocumentCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentUnderstandingServiceClient documentUnderstandingServiceClient =
+   *     DocumentUnderstandingServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element :
+   *       documentUnderstandingServiceClient.listLocations(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @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 ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentUnderstandingServiceClient documentUnderstandingServiceClient =
+   *     DocumentUnderstandingServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       documentUnderstandingServiceClient.listLocationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Location element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentUnderstandingServiceClient documentUnderstandingServiceClient =
+   *     DocumentUnderstandingServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response =
+   *         documentUnderstandingServiceClient.listLocationsCallable().call(request);
+   *     for (Location element : response.getLocationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentUnderstandingServiceClient documentUnderstandingServiceClient =
+   *     DocumentUnderstandingServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = documentUnderstandingServiceClient.getLocation(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 Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentUnderstandingServiceClient documentUnderstandingServiceClient =
+   *     DocumentUnderstandingServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       documentUnderstandingServiceClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + @Override public final void close() { stub.close(); @@ -422,4 +596,80 @@ public void shutdownNow() { public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { return stub.awaitTermination(duration, unit); } + + public static class ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + PageContext context, + ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + PageContext context, + ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } } diff --git a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/DocumentUnderstandingServiceSettings.java b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/DocumentUnderstandingServiceSettings.java index 61b9e23282cb..f221324cf7f9 100644 --- a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/DocumentUnderstandingServiceSettings.java +++ b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/DocumentUnderstandingServiceSettings.java @@ -16,6 +16,8 @@ package com.google.cloud.documentai.v1beta2; +import static com.google.cloud.documentai.v1beta2.DocumentUnderstandingServiceClient.ListLocationsPagedResponse; + import com.google.api.core.ApiFunction; import com.google.api.core.BetaApi; import com.google.api.gax.core.GoogleCredentialsProvider; @@ -25,9 +27,14 @@ import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.ClientSettings; import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; import com.google.cloud.documentai.v1beta2.stub.DocumentUnderstandingServiceStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; import com.google.longrunning.Operation; import java.io.IOException; import java.util.List; @@ -96,6 +103,17 @@ public UnaryCallSettings processDocumentSettin return ((DocumentUnderstandingServiceStubSettings) getStubSettings()).processDocumentSettings(); } + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((DocumentUnderstandingServiceStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((DocumentUnderstandingServiceStubSettings) getStubSettings()).getLocationSettings(); + } + public static final DocumentUnderstandingServiceSettings create( DocumentUnderstandingServiceStubSettings stub) throws IOException { return new DocumentUnderstandingServiceSettings.Builder(stub.toBuilder()).build(); @@ -212,6 +230,18 @@ public UnaryCallSettings.Builder processDocume return getStubSettingsBuilder().processDocumentSettings(); } + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + @Override public DocumentUnderstandingServiceSettings build() throws IOException { return new DocumentUnderstandingServiceSettings(this); diff --git a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/gapic_metadata.json b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/gapic_metadata.json index 4704ea7c6d17..1f6cdb878067 100644 --- a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/gapic_metadata.json +++ b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/gapic_metadata.json @@ -13,6 +13,12 @@ "BatchProcessDocuments": { "methods": ["batchProcessDocumentsAsync", "batchProcessDocumentsAsync", "batchProcessDocumentsOperationCallable", "batchProcessDocumentsCallable"] }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, "ProcessDocument": { "methods": ["processDocument", "processDocumentCallable"] } diff --git a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/stub/DocumentUnderstandingServiceStub.java b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/stub/DocumentUnderstandingServiceStub.java index be8e9e7e22b0..ac2cba35f23c 100644 --- a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/stub/DocumentUnderstandingServiceStub.java +++ b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/stub/DocumentUnderstandingServiceStub.java @@ -16,6 +16,8 @@ package com.google.cloud.documentai.v1beta2.stub; +import static com.google.cloud.documentai.v1beta2.DocumentUnderstandingServiceClient.ListLocationsPagedResponse; + import com.google.api.core.BetaApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.rpc.OperationCallable; @@ -25,6 +27,10 @@ import com.google.cloud.documentai.v1beta2.Document; import com.google.cloud.documentai.v1beta2.OperationMetadata; import com.google.cloud.documentai.v1beta2.ProcessDocumentRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; import com.google.longrunning.Operation; import com.google.longrunning.stub.OperationsStub; import javax.annotation.Generated; @@ -58,6 +64,19 @@ public UnaryCallable processDocumentCallable() throw new UnsupportedOperationException("Not implemented: processDocumentCallable()"); } + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + @Override public abstract void close(); } diff --git a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/stub/DocumentUnderstandingServiceStubSettings.java b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/stub/DocumentUnderstandingServiceStubSettings.java index 05da7fe6edbf..d7fb3827fbdb 100644 --- a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/stub/DocumentUnderstandingServiceStubSettings.java +++ b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/stub/DocumentUnderstandingServiceStubSettings.java @@ -16,7 +16,10 @@ package com.google.cloud.documentai.v1beta2.stub; +import static com.google.cloud.documentai.v1beta2.DocumentUnderstandingServiceClient.ListLocationsPagedResponse; + import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; import com.google.api.core.BetaApi; import com.google.api.gax.core.GaxProperties; import com.google.api.gax.core.GoogleCredentialsProvider; @@ -28,18 +31,28 @@ import com.google.api.gax.longrunning.OperationSnapshot; import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; import com.google.api.gax.rpc.StatusCode; import com.google.api.gax.rpc.StubSettings; import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.documentai.v1beta2.BatchProcessDocumentsRequest; import com.google.cloud.documentai.v1beta2.BatchProcessDocumentsResponse; import com.google.cloud.documentai.v1beta2.Document; import com.google.cloud.documentai.v1beta2.OperationMetadata; import com.google.cloud.documentai.v1beta2.ProcessDocumentRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; @@ -102,6 +115,63 @@ public class DocumentUnderstandingServiceStubSettings BatchProcessDocumentsRequest, BatchProcessDocumentsResponse, OperationMetadata> batchProcessDocumentsOperationSettings; private final UnaryCallSettings processDocumentSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList() == null + ? ImmutableList.of() + : payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; /** Returns the object with the settings used for calls to batchProcessDocuments. */ public UnaryCallSettings @@ -121,6 +191,17 @@ public UnaryCallSettings processDocumentSettin return processDocumentSettings; } + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + public DocumentUnderstandingServiceStub createStub() throws IOException { if (getTransportChannelProvider() .getTransportName() @@ -201,6 +282,8 @@ protected DocumentUnderstandingServiceStubSettings(Builder settingsBuilder) thro batchProcessDocumentsOperationSettings = settingsBuilder.batchProcessDocumentsOperationSettings().build(); processDocumentSettings = settingsBuilder.processDocumentSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); } /** Builder for DocumentUnderstandingServiceStubSettings. */ @@ -214,6 +297,10 @@ public static class Builder batchProcessDocumentsOperationSettings; private final UnaryCallSettings.Builder processDocumentSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -225,6 +312,7 @@ public static class Builder ImmutableSet.copyOf( Lists.newArrayList( StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); RETRYABLE_CODE_DEFINITIONS = definitions.build(); } @@ -244,6 +332,8 @@ public static class Builder .setTotalTimeout(Duration.ofMillis(120000L)) .build(); definitions.put("retry_policy_0_params", settings); + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); RETRY_PARAM_DEFINITIONS = definitions.build(); } @@ -257,10 +347,15 @@ protected Builder(ClientContext clientContext) { batchProcessDocumentsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); batchProcessDocumentsOperationSettings = OperationCallSettings.newBuilder(); processDocumentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( - batchProcessDocumentsSettings, processDocumentSettings); + batchProcessDocumentsSettings, + processDocumentSettings, + listLocationsSettings, + getLocationSettings); initDefaults(this); } @@ -271,10 +366,15 @@ protected Builder(DocumentUnderstandingServiceStubSettings settings) { batchProcessDocumentsOperationSettings = settings.batchProcessDocumentsOperationSettings.toBuilder(); processDocumentSettings = settings.processDocumentSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( - batchProcessDocumentsSettings, processDocumentSettings); + batchProcessDocumentsSettings, + processDocumentSettings, + listLocationsSettings, + getLocationSettings); } private static Builder createDefault() { @@ -301,6 +401,16 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder .batchProcessDocumentsOperationSettings() .setInitialCallSettings( @@ -364,6 +474,18 @@ public UnaryCallSettings.Builder processDocume return processDocumentSettings; } + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + @Override public DocumentUnderstandingServiceStubSettings build() throws IOException { return new DocumentUnderstandingServiceStubSettings(this); diff --git a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/stub/GrpcDocumentUnderstandingServiceStub.java b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/stub/GrpcDocumentUnderstandingServiceStub.java index 654b81b3e91b..99f5bec9f706 100644 --- a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/stub/GrpcDocumentUnderstandingServiceStub.java +++ b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/stub/GrpcDocumentUnderstandingServiceStub.java @@ -16,6 +16,8 @@ package com.google.cloud.documentai.v1beta2.stub; +import static com.google.cloud.documentai.v1beta2.DocumentUnderstandingServiceClient.ListLocationsPagedResponse; + import com.google.api.core.BetaApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.core.BackgroundResourceAggregation; @@ -30,6 +32,10 @@ import com.google.cloud.documentai.v1beta2.Document; import com.google.cloud.documentai.v1beta2.OperationMetadata; import com.google.cloud.documentai.v1beta2.ProcessDocumentRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; import com.google.longrunning.Operation; import com.google.longrunning.stub.GrpcOperationsStub; import io.grpc.MethodDescriptor; @@ -69,12 +75,35 @@ public class GrpcDocumentUnderstandingServiceStub extends DocumentUnderstandingS .setResponseMarshaller(ProtoUtils.marshaller(Document.getDefaultInstance())) .build(); + private static final MethodDescriptor + listLocationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .build(); + private final UnaryCallable batchProcessDocumentsCallable; private final OperationCallable< BatchProcessDocumentsRequest, BatchProcessDocumentsResponse, OperationMetadata> batchProcessDocumentsOperationCallable; private final UnaryCallable processDocumentCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; @@ -144,6 +173,26 @@ protected GrpcDocumentUnderstandingServiceStub( return builder.build(); }) .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); this.batchProcessDocumentsCallable = callableFactory.createUnaryCallable( @@ -159,6 +208,15 @@ protected GrpcDocumentUnderstandingServiceStub( this.processDocumentCallable = callableFactory.createUnaryCallable( processDocumentTransportSettings, settings.processDocumentSettings(), clientContext); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -185,6 +243,22 @@ public UnaryCallable processDocumentCallable() return processDocumentCallable; } + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + @Override public final void close() { try { diff --git a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceClient.java b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceClient.java index 1e43f32f072b..08f306996cd2 100644 --- a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceClient.java +++ b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceClient.java @@ -267,7 +267,7 @@ public final ProcessResponse processDocument(ResourceName name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (DocumentProcessorServiceClient documentProcessorServiceClient = * DocumentProcessorServiceClient.create()) { - * String name = DatasetSchemaName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString(); + * String name = DatasetName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString(); * ProcessResponse response = documentProcessorServiceClient.processDocument(name); * } * } @@ -403,7 +403,7 @@ public final UnaryCallable processDocumentCalla * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (DocumentProcessorServiceClient documentProcessorServiceClient = * DocumentProcessorServiceClient.create()) { - * String name = DatasetSchemaName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString(); + * String name = DatasetName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString(); * BatchProcessResponse response = * documentProcessorServiceClient.batchProcessDocumentsAsync(name).get(); * } diff --git a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/DocumentServiceClient.java b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/DocumentServiceClient.java index 639e94ee0733..0c242639e79b 100644 --- a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/DocumentServiceClient.java +++ b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/DocumentServiceClient.java @@ -56,8 +56,8 @@ * // - It may require specifying regional endpoints when creating the service client as shown in * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) { - * DatasetSchemaName name = DatasetSchemaName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]"); - * DatasetSchema response = documentServiceClient.getDatasetSchema(name); + * DatasetName dataset = DatasetName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]"); + * GetDocumentResponse response = documentServiceClient.getDocument(dataset); * } * } * @@ -331,6 +331,400 @@ public final UnaryCallable updateDatasetCallabl return stub.updateDatasetCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Import documents into a dataset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+   *   DatasetName dataset = DatasetName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
+   *   ImportDocumentsResponse response = documentServiceClient.importDocumentsAsync(dataset).get();
+   * }
+   * }
+ * + * @param dataset Required. The dataset resource name. Format: + * projects/{project}/locations/{location}/processors/{processor}/dataset + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + importDocumentsAsync(DatasetName dataset) { + ImportDocumentsRequest request = + ImportDocumentsRequest.newBuilder() + .setDataset(dataset == null ? null : dataset.toString()) + .build(); + return importDocumentsAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Import documents into a dataset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+   *   String dataset = DatasetName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString();
+   *   ImportDocumentsResponse response = documentServiceClient.importDocumentsAsync(dataset).get();
+   * }
+   * }
+ * + * @param dataset Required. The dataset resource name. Format: + * projects/{project}/locations/{location}/processors/{processor}/dataset + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + importDocumentsAsync(String dataset) { + ImportDocumentsRequest request = + ImportDocumentsRequest.newBuilder().setDataset(dataset).build(); + return importDocumentsAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Import documents into a dataset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+   *   ImportDocumentsRequest request =
+   *       ImportDocumentsRequest.newBuilder()
+   *           .setDataset(DatasetName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString())
+   *           .addAllBatchDocumentsImportConfigs(
+   *               new ArrayList())
+   *           .build();
+   *   ImportDocumentsResponse response = documentServiceClient.importDocumentsAsync(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 + */ + public final OperationFuture + importDocumentsAsync(ImportDocumentsRequest request) { + return importDocumentsOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Import documents into a dataset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+   *   ImportDocumentsRequest request =
+   *       ImportDocumentsRequest.newBuilder()
+   *           .setDataset(DatasetName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString())
+   *           .addAllBatchDocumentsImportConfigs(
+   *               new ArrayList())
+   *           .build();
+   *   OperationFuture future =
+   *       documentServiceClient.importDocumentsOperationCallable().futureCall(request);
+   *   // Do something.
+   *   ImportDocumentsResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + ImportDocumentsRequest, ImportDocumentsResponse, ImportDocumentsMetadata> + importDocumentsOperationCallable() { + return stub.importDocumentsOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Import documents into a dataset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+   *   ImportDocumentsRequest request =
+   *       ImportDocumentsRequest.newBuilder()
+   *           .setDataset(DatasetName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString())
+   *           .addAllBatchDocumentsImportConfigs(
+   *               new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       documentServiceClient.importDocumentsCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable importDocumentsCallable() { + return stub.importDocumentsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns relevant fields present in the requested document. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+   *   DatasetName dataset = DatasetName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
+   *   GetDocumentResponse response = documentServiceClient.getDocument(dataset);
+   * }
+   * }
+ * + * @param dataset Required. The resource name of the dataset that the document belongs to . + * Format: projects/{project}/locations/{location}/processors/{processor}/dataset + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final GetDocumentResponse getDocument(DatasetName dataset) { + GetDocumentRequest request = + GetDocumentRequest.newBuilder() + .setDataset(dataset == null ? null : dataset.toString()) + .build(); + return getDocument(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns relevant fields present in the requested document. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+   *   String dataset = DatasetName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString();
+   *   GetDocumentResponse response = documentServiceClient.getDocument(dataset);
+   * }
+   * }
+ * + * @param dataset Required. The resource name of the dataset that the document belongs to . + * Format: projects/{project}/locations/{location}/processors/{processor}/dataset + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final GetDocumentResponse getDocument(String dataset) { + GetDocumentRequest request = GetDocumentRequest.newBuilder().setDataset(dataset).build(); + return getDocument(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns relevant fields present in the requested document. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+   *   GetDocumentRequest request =
+   *       GetDocumentRequest.newBuilder()
+   *           .setDataset(DatasetName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString())
+   *           .setDocumentId(DocumentId.newBuilder().build())
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .setPageRange(DocumentPageRange.newBuilder().build())
+   *           .build();
+   *   GetDocumentResponse response = documentServiceClient.getDocument(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 GetDocumentResponse getDocument(GetDocumentRequest request) { + return getDocumentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns relevant fields present in the requested document. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+   *   GetDocumentRequest request =
+   *       GetDocumentRequest.newBuilder()
+   *           .setDataset(DatasetName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString())
+   *           .setDocumentId(DocumentId.newBuilder().build())
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .setPageRange(DocumentPageRange.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       documentServiceClient.getDocumentCallable().futureCall(request);
+   *   // Do something.
+   *   GetDocumentResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getDocumentCallable() { + return stub.getDocumentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a set of documents. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+   *   String dataset = "dataset1443214456";
+   *   BatchDeleteDocumentsResponse response =
+   *       documentServiceClient.batchDeleteDocumentsAsync(dataset).get();
+   * }
+   * }
+ * + * @param dataset Required. The dataset resource name. Format: + * projects/{project}/locations/{location}/processors/{processor}/dataset + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + batchDeleteDocumentsAsync(String dataset) { + BatchDeleteDocumentsRequest request = + BatchDeleteDocumentsRequest.newBuilder().setDataset(dataset).build(); + return batchDeleteDocumentsAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a set of documents. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+   *   BatchDeleteDocumentsRequest request =
+   *       BatchDeleteDocumentsRequest.newBuilder()
+   *           .setDataset("dataset1443214456")
+   *           .setDatasetDocuments(BatchDatasetDocuments.newBuilder().build())
+   *           .build();
+   *   BatchDeleteDocumentsResponse response =
+   *       documentServiceClient.batchDeleteDocumentsAsync(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 + */ + public final OperationFuture + batchDeleteDocumentsAsync(BatchDeleteDocumentsRequest request) { + return batchDeleteDocumentsOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a set of documents. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+   *   BatchDeleteDocumentsRequest request =
+   *       BatchDeleteDocumentsRequest.newBuilder()
+   *           .setDataset("dataset1443214456")
+   *           .setDatasetDocuments(BatchDatasetDocuments.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       documentServiceClient.batchDeleteDocumentsOperationCallable().futureCall(request);
+   *   // Do something.
+   *   BatchDeleteDocumentsResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + BatchDeleteDocumentsRequest, BatchDeleteDocumentsResponse, BatchDeleteDocumentsMetadata> + batchDeleteDocumentsOperationCallable() { + return stub.batchDeleteDocumentsOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a set of documents. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+   *   BatchDeleteDocumentsRequest request =
+   *       BatchDeleteDocumentsRequest.newBuilder()
+   *           .setDataset("dataset1443214456")
+   *           .setDatasetDocuments(BatchDatasetDocuments.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       documentServiceClient.batchDeleteDocumentsCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + batchDeleteDocumentsCallable() { + return stub.batchDeleteDocumentsCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets the `DatasetSchema` of a `Dataset`. diff --git a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/DocumentServiceSettings.java b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/DocumentServiceSettings.java index fcbd2828a62d..14fbc4552b22 100644 --- a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/DocumentServiceSettings.java +++ b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/DocumentServiceSettings.java @@ -56,7 +56,7 @@ *

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 getDatasetSchema to 30 seconds: + *

For example, to set the total timeout of getDocument to 30 seconds: * *

{@code
  * // This snippet has been automatically generated and should be regarded as a code template only.
@@ -67,10 +67,10 @@
  * DocumentServiceSettings.Builder documentServiceSettingsBuilder =
  *     DocumentServiceSettings.newBuilder();
  * documentServiceSettingsBuilder
- *     .getDatasetSchemaSettings()
+ *     .getDocumentSettings()
  *     .setRetrySettings(
  *         documentServiceSettingsBuilder
- *             .getDatasetSchemaSettings()
+ *             .getDocumentSettings()
  *             .getRetrySettings()
  *             .toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
@@ -93,6 +93,36 @@ public UnaryCallSettings updateDatasetSettings(
     return ((DocumentServiceStubSettings) getStubSettings()).updateDatasetOperationSettings();
   }
 
+  /** Returns the object with the settings used for calls to importDocuments. */
+  public UnaryCallSettings importDocumentsSettings() {
+    return ((DocumentServiceStubSettings) getStubSettings()).importDocumentsSettings();
+  }
+
+  /** Returns the object with the settings used for calls to importDocuments. */
+  public OperationCallSettings<
+          ImportDocumentsRequest, ImportDocumentsResponse, ImportDocumentsMetadata>
+      importDocumentsOperationSettings() {
+    return ((DocumentServiceStubSettings) getStubSettings()).importDocumentsOperationSettings();
+  }
+
+  /** Returns the object with the settings used for calls to getDocument. */
+  public UnaryCallSettings getDocumentSettings() {
+    return ((DocumentServiceStubSettings) getStubSettings()).getDocumentSettings();
+  }
+
+  /** Returns the object with the settings used for calls to batchDeleteDocuments. */
+  public UnaryCallSettings batchDeleteDocumentsSettings() {
+    return ((DocumentServiceStubSettings) getStubSettings()).batchDeleteDocumentsSettings();
+  }
+
+  /** Returns the object with the settings used for calls to batchDeleteDocuments. */
+  public OperationCallSettings<
+          BatchDeleteDocumentsRequest, BatchDeleteDocumentsResponse, BatchDeleteDocumentsMetadata>
+      batchDeleteDocumentsOperationSettings() {
+    return ((DocumentServiceStubSettings) getStubSettings())
+        .batchDeleteDocumentsOperationSettings();
+  }
+
   /** Returns the object with the settings used for calls to getDatasetSchema. */
   public UnaryCallSettings getDatasetSchemaSettings() {
     return ((DocumentServiceStubSettings) getStubSettings()).getDatasetSchemaSettings();
@@ -242,6 +272,37 @@ public UnaryCallSettings.Builder updateDatasetS
       return getStubSettingsBuilder().updateDatasetOperationSettings();
     }
 
+    /** Returns the builder for the settings used for calls to importDocuments. */
+    public UnaryCallSettings.Builder importDocumentsSettings() {
+      return getStubSettingsBuilder().importDocumentsSettings();
+    }
+
+    /** Returns the builder for the settings used for calls to importDocuments. */
+    public OperationCallSettings.Builder<
+            ImportDocumentsRequest, ImportDocumentsResponse, ImportDocumentsMetadata>
+        importDocumentsOperationSettings() {
+      return getStubSettingsBuilder().importDocumentsOperationSettings();
+    }
+
+    /** Returns the builder for the settings used for calls to getDocument. */
+    public UnaryCallSettings.Builder
+        getDocumentSettings() {
+      return getStubSettingsBuilder().getDocumentSettings();
+    }
+
+    /** Returns the builder for the settings used for calls to batchDeleteDocuments. */
+    public UnaryCallSettings.Builder
+        batchDeleteDocumentsSettings() {
+      return getStubSettingsBuilder().batchDeleteDocumentsSettings();
+    }
+
+    /** Returns the builder for the settings used for calls to batchDeleteDocuments. */
+    public OperationCallSettings.Builder<
+            BatchDeleteDocumentsRequest, BatchDeleteDocumentsResponse, BatchDeleteDocumentsMetadata>
+        batchDeleteDocumentsOperationSettings() {
+      return getStubSettingsBuilder().batchDeleteDocumentsOperationSettings();
+    }
+
     /** Returns the builder for the settings used for calls to getDatasetSchema. */
     public UnaryCallSettings.Builder
         getDatasetSchemaSettings() {
diff --git a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/gapic_metadata.json b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/gapic_metadata.json
index f3dad60bf858..2902801e5736 100644
--- a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/gapic_metadata.json
+++ b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/gapic_metadata.json
@@ -94,12 +94,21 @@
         "grpc": {
           "libraryClient": "DocumentServiceClient",
           "rpcs": {
+            "BatchDeleteDocuments": {
+              "methods": ["batchDeleteDocumentsAsync", "batchDeleteDocumentsAsync", "batchDeleteDocumentsOperationCallable", "batchDeleteDocumentsCallable"]
+            },
             "GetDatasetSchema": {
               "methods": ["getDatasetSchema", "getDatasetSchema", "getDatasetSchema", "getDatasetSchemaCallable"]
             },
+            "GetDocument": {
+              "methods": ["getDocument", "getDocument", "getDocument", "getDocumentCallable"]
+            },
             "GetLocation": {
               "methods": ["getLocation", "getLocationCallable"]
             },
+            "ImportDocuments": {
+              "methods": ["importDocumentsAsync", "importDocumentsAsync", "importDocumentsAsync", "importDocumentsOperationCallable", "importDocumentsCallable"]
+            },
             "ListLocations": {
               "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"]
             },
diff --git a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/package-info.java b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/package-info.java
index d40b13c216a0..8d619e5f36df 100644
--- a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/package-info.java
+++ b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/package-info.java
@@ -54,8 +54,8 @@
  * // - It may require specifying regional endpoints when creating the service client as shown in
  * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
- *   DatasetSchemaName name = DatasetSchemaName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
- *   DatasetSchema response = documentServiceClient.getDatasetSchema(name);
+ *   DatasetName dataset = DatasetName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
+ *   GetDocumentResponse response = documentServiceClient.getDocument(dataset);
  * }
  * }
*/ diff --git a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/DocumentServiceStub.java b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/DocumentServiceStub.java index 2d1755e20c7d..6001caa1e81a 100644 --- a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/DocumentServiceStub.java +++ b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/DocumentServiceStub.java @@ -22,9 +22,17 @@ 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.BatchDeleteDocumentsMetadata; +import com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest; +import com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsResponse; import com.google.cloud.documentai.v1beta3.Dataset; import com.google.cloud.documentai.v1beta3.DatasetSchema; import com.google.cloud.documentai.v1beta3.GetDatasetSchemaRequest; +import com.google.cloud.documentai.v1beta3.GetDocumentRequest; +import com.google.cloud.documentai.v1beta3.GetDocumentResponse; +import com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata; +import com.google.cloud.documentai.v1beta3.ImportDocumentsRequest; +import com.google.cloud.documentai.v1beta3.ImportDocumentsResponse; import com.google.cloud.documentai.v1beta3.UpdateDatasetOperationMetadata; import com.google.cloud.documentai.v1beta3.UpdateDatasetRequest; import com.google.cloud.documentai.v1beta3.UpdateDatasetSchemaRequest; @@ -63,6 +71,30 @@ public UnaryCallable updateDatasetCallable() { throw new UnsupportedOperationException("Not implemented: updateDatasetCallable()"); } + public OperationCallable + importDocumentsOperationCallable() { + throw new UnsupportedOperationException("Not implemented: importDocumentsOperationCallable()"); + } + + public UnaryCallable importDocumentsCallable() { + throw new UnsupportedOperationException("Not implemented: importDocumentsCallable()"); + } + + public UnaryCallable getDocumentCallable() { + throw new UnsupportedOperationException("Not implemented: getDocumentCallable()"); + } + + public OperationCallable< + BatchDeleteDocumentsRequest, BatchDeleteDocumentsResponse, BatchDeleteDocumentsMetadata> + batchDeleteDocumentsOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: batchDeleteDocumentsOperationCallable()"); + } + + public UnaryCallable batchDeleteDocumentsCallable() { + throw new UnsupportedOperationException("Not implemented: batchDeleteDocumentsCallable()"); + } + public UnaryCallable getDatasetSchemaCallable() { throw new UnsupportedOperationException("Not implemented: getDatasetSchemaCallable()"); } diff --git a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/DocumentServiceStubSettings.java b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/DocumentServiceStubSettings.java index 10f3ef710be1..2b994b189b0b 100644 --- a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/DocumentServiceStubSettings.java +++ b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/DocumentServiceStubSettings.java @@ -47,9 +47,17 @@ import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata; +import com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest; +import com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsResponse; import com.google.cloud.documentai.v1beta3.Dataset; import com.google.cloud.documentai.v1beta3.DatasetSchema; import com.google.cloud.documentai.v1beta3.GetDatasetSchemaRequest; +import com.google.cloud.documentai.v1beta3.GetDocumentRequest; +import com.google.cloud.documentai.v1beta3.GetDocumentResponse; +import com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata; +import com.google.cloud.documentai.v1beta3.ImportDocumentsRequest; +import com.google.cloud.documentai.v1beta3.ImportDocumentsResponse; import com.google.cloud.documentai.v1beta3.UpdateDatasetOperationMetadata; import com.google.cloud.documentai.v1beta3.UpdateDatasetRequest; import com.google.cloud.documentai.v1beta3.UpdateDatasetSchemaRequest; @@ -82,7 +90,7 @@ *

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 getDatasetSchema to 30 seconds: + *

For example, to set the total timeout of getDocument to 30 seconds: * *

{@code
  * // This snippet has been automatically generated and should be regarded as a code template only.
@@ -93,10 +101,10 @@
  * DocumentServiceStubSettings.Builder documentServiceSettingsBuilder =
  *     DocumentServiceStubSettings.newBuilder();
  * documentServiceSettingsBuilder
- *     .getDatasetSchemaSettings()
+ *     .getDocumentSettings()
  *     .setRetrySettings(
  *         documentServiceSettingsBuilder
- *             .getDatasetSchemaSettings()
+ *             .getDocumentSettings()
  *             .getRetrySettings()
  *             .toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
@@ -114,6 +122,16 @@ public class DocumentServiceStubSettings extends StubSettings updateDatasetSettings;
   private final OperationCallSettings
       updateDatasetOperationSettings;
+  private final UnaryCallSettings importDocumentsSettings;
+  private final OperationCallSettings<
+          ImportDocumentsRequest, ImportDocumentsResponse, ImportDocumentsMetadata>
+      importDocumentsOperationSettings;
+  private final UnaryCallSettings getDocumentSettings;
+  private final UnaryCallSettings
+      batchDeleteDocumentsSettings;
+  private final OperationCallSettings<
+          BatchDeleteDocumentsRequest, BatchDeleteDocumentsResponse, BatchDeleteDocumentsMetadata>
+      batchDeleteDocumentsOperationSettings;
   private final UnaryCallSettings getDatasetSchemaSettings;
   private final UnaryCallSettings
       updateDatasetSchemaSettings;
@@ -186,6 +204,35 @@ public UnaryCallSettings updateDatasetSettings(
     return updateDatasetOperationSettings;
   }
 
+  /** Returns the object with the settings used for calls to importDocuments. */
+  public UnaryCallSettings importDocumentsSettings() {
+    return importDocumentsSettings;
+  }
+
+  /** Returns the object with the settings used for calls to importDocuments. */
+  public OperationCallSettings<
+          ImportDocumentsRequest, ImportDocumentsResponse, ImportDocumentsMetadata>
+      importDocumentsOperationSettings() {
+    return importDocumentsOperationSettings;
+  }
+
+  /** Returns the object with the settings used for calls to getDocument. */
+  public UnaryCallSettings getDocumentSettings() {
+    return getDocumentSettings;
+  }
+
+  /** Returns the object with the settings used for calls to batchDeleteDocuments. */
+  public UnaryCallSettings batchDeleteDocumentsSettings() {
+    return batchDeleteDocumentsSettings;
+  }
+
+  /** Returns the object with the settings used for calls to batchDeleteDocuments. */
+  public OperationCallSettings<
+          BatchDeleteDocumentsRequest, BatchDeleteDocumentsResponse, BatchDeleteDocumentsMetadata>
+      batchDeleteDocumentsOperationSettings() {
+    return batchDeleteDocumentsOperationSettings;
+  }
+
   /** Returns the object with the settings used for calls to getDatasetSchema. */
   public UnaryCallSettings getDatasetSchemaSettings() {
     return getDatasetSchemaSettings;
@@ -316,6 +363,12 @@ protected DocumentServiceStubSettings(Builder settingsBuilder) throws IOExceptio
 
     updateDatasetSettings = settingsBuilder.updateDatasetSettings().build();
     updateDatasetOperationSettings = settingsBuilder.updateDatasetOperationSettings().build();
+    importDocumentsSettings = settingsBuilder.importDocumentsSettings().build();
+    importDocumentsOperationSettings = settingsBuilder.importDocumentsOperationSettings().build();
+    getDocumentSettings = settingsBuilder.getDocumentSettings().build();
+    batchDeleteDocumentsSettings = settingsBuilder.batchDeleteDocumentsSettings().build();
+    batchDeleteDocumentsOperationSettings =
+        settingsBuilder.batchDeleteDocumentsOperationSettings().build();
     getDatasetSchemaSettings = settingsBuilder.getDatasetSchemaSettings().build();
     updateDatasetSchemaSettings = settingsBuilder.updateDatasetSchemaSettings().build();
     listLocationsSettings = settingsBuilder.listLocationsSettings().build();
@@ -329,6 +382,18 @@ public static class Builder extends StubSettings.Builder
         updateDatasetOperationSettings;
+    private final UnaryCallSettings.Builder
+        importDocumentsSettings;
+    private final OperationCallSettings.Builder<
+            ImportDocumentsRequest, ImportDocumentsResponse, ImportDocumentsMetadata>
+        importDocumentsOperationSettings;
+    private final UnaryCallSettings.Builder
+        getDocumentSettings;
+    private final UnaryCallSettings.Builder
+        batchDeleteDocumentsSettings;
+    private final OperationCallSettings.Builder<
+            BatchDeleteDocumentsRequest, BatchDeleteDocumentsResponse, BatchDeleteDocumentsMetadata>
+        batchDeleteDocumentsOperationSettings;
     private final UnaryCallSettings.Builder
         getDatasetSchemaSettings;
     private final UnaryCallSettings.Builder
@@ -366,6 +431,11 @@ protected Builder(ClientContext clientContext) {
 
       updateDatasetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
       updateDatasetOperationSettings = OperationCallSettings.newBuilder();
+      importDocumentsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+      importDocumentsOperationSettings = OperationCallSettings.newBuilder();
+      getDocumentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+      batchDeleteDocumentsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+      batchDeleteDocumentsOperationSettings = OperationCallSettings.newBuilder();
       getDatasetSchemaSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
       updateDatasetSchemaSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
       listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT);
@@ -374,6 +444,9 @@ protected Builder(ClientContext clientContext) {
       unaryMethodSettingsBuilders =
           ImmutableList.>of(
               updateDatasetSettings,
+              importDocumentsSettings,
+              getDocumentSettings,
+              batchDeleteDocumentsSettings,
               getDatasetSchemaSettings,
               updateDatasetSchemaSettings,
               listLocationsSettings,
@@ -386,6 +459,12 @@ protected Builder(DocumentServiceStubSettings settings) {
 
       updateDatasetSettings = settings.updateDatasetSettings.toBuilder();
       updateDatasetOperationSettings = settings.updateDatasetOperationSettings.toBuilder();
+      importDocumentsSettings = settings.importDocumentsSettings.toBuilder();
+      importDocumentsOperationSettings = settings.importDocumentsOperationSettings.toBuilder();
+      getDocumentSettings = settings.getDocumentSettings.toBuilder();
+      batchDeleteDocumentsSettings = settings.batchDeleteDocumentsSettings.toBuilder();
+      batchDeleteDocumentsOperationSettings =
+          settings.batchDeleteDocumentsOperationSettings.toBuilder();
       getDatasetSchemaSettings = settings.getDatasetSchemaSettings.toBuilder();
       updateDatasetSchemaSettings = settings.updateDatasetSchemaSettings.toBuilder();
       listLocationsSettings = settings.listLocationsSettings.toBuilder();
@@ -394,6 +473,9 @@ protected Builder(DocumentServiceStubSettings settings) {
       unaryMethodSettingsBuilders =
           ImmutableList.>of(
               updateDatasetSettings,
+              importDocumentsSettings,
+              getDocumentSettings,
+              batchDeleteDocumentsSettings,
               getDatasetSchemaSettings,
               updateDatasetSchemaSettings,
               listLocationsSettings,
@@ -432,6 +514,21 @@ private static Builder initDefaults(Builder builder) {
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
 
+      builder
+          .importDocumentsSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+      builder
+          .getDocumentSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+      builder
+          .batchDeleteDocumentsSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
       builder
           .getDatasetSchemaSettings()
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
@@ -477,6 +574,56 @@ private static Builder initDefaults(Builder builder) {
                       .setTotalTimeout(Duration.ofMillis(300000L))
                       .build()));
 
+      builder
+          .importDocumentsOperationSettings()
+          .setInitialCallSettings(
+              UnaryCallSettings
+                  .newUnaryCallSettingsBuilder()
+                  .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+                  .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"))
+                  .build())
+          .setResponseTransformer(
+              ProtoOperationTransformers.ResponseTransformer.create(ImportDocumentsResponse.class))
+          .setMetadataTransformer(
+              ProtoOperationTransformers.MetadataTransformer.create(ImportDocumentsMetadata.class))
+          .setPollingAlgorithm(
+              OperationTimedPollAlgorithm.create(
+                  RetrySettings.newBuilder()
+                      .setInitialRetryDelay(Duration.ofMillis(5000L))
+                      .setRetryDelayMultiplier(1.5)
+                      .setMaxRetryDelay(Duration.ofMillis(45000L))
+                      .setInitialRpcTimeout(Duration.ZERO)
+                      .setRpcTimeoutMultiplier(1.0)
+                      .setMaxRpcTimeout(Duration.ZERO)
+                      .setTotalTimeout(Duration.ofMillis(300000L))
+                      .build()));
+
+      builder
+          .batchDeleteDocumentsOperationSettings()
+          .setInitialCallSettings(
+              UnaryCallSettings
+                  .newUnaryCallSettingsBuilder()
+                  .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+                  .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"))
+                  .build())
+          .setResponseTransformer(
+              ProtoOperationTransformers.ResponseTransformer.create(
+                  BatchDeleteDocumentsResponse.class))
+          .setMetadataTransformer(
+              ProtoOperationTransformers.MetadataTransformer.create(
+                  BatchDeleteDocumentsMetadata.class))
+          .setPollingAlgorithm(
+              OperationTimedPollAlgorithm.create(
+                  RetrySettings.newBuilder()
+                      .setInitialRetryDelay(Duration.ofMillis(5000L))
+                      .setRetryDelayMultiplier(1.5)
+                      .setMaxRetryDelay(Duration.ofMillis(45000L))
+                      .setInitialRpcTimeout(Duration.ZERO)
+                      .setRpcTimeoutMultiplier(1.0)
+                      .setMaxRpcTimeout(Duration.ZERO)
+                      .setTotalTimeout(Duration.ofMillis(300000L))
+                      .build()));
+
       return builder;
     }
 
@@ -509,6 +656,41 @@ public UnaryCallSettings.Builder updateDatasetS
       return updateDatasetOperationSettings;
     }
 
+    /** Returns the builder for the settings used for calls to importDocuments. */
+    public UnaryCallSettings.Builder importDocumentsSettings() {
+      return importDocumentsSettings;
+    }
+
+    /** Returns the builder for the settings used for calls to importDocuments. */
+    @BetaApi(
+        "The surface for use by generated code is not stable yet and may change in the future.")
+    public OperationCallSettings.Builder<
+            ImportDocumentsRequest, ImportDocumentsResponse, ImportDocumentsMetadata>
+        importDocumentsOperationSettings() {
+      return importDocumentsOperationSettings;
+    }
+
+    /** Returns the builder for the settings used for calls to getDocument. */
+    public UnaryCallSettings.Builder
+        getDocumentSettings() {
+      return getDocumentSettings;
+    }
+
+    /** Returns the builder for the settings used for calls to batchDeleteDocuments. */
+    public UnaryCallSettings.Builder
+        batchDeleteDocumentsSettings() {
+      return batchDeleteDocumentsSettings;
+    }
+
+    /** Returns the builder for the settings used for calls to batchDeleteDocuments. */
+    @BetaApi(
+        "The surface for use by generated code is not stable yet and may change in the future.")
+    public OperationCallSettings.Builder<
+            BatchDeleteDocumentsRequest, BatchDeleteDocumentsResponse, BatchDeleteDocumentsMetadata>
+        batchDeleteDocumentsOperationSettings() {
+      return batchDeleteDocumentsOperationSettings;
+    }
+
     /** Returns the builder for the settings used for calls to getDatasetSchema. */
     public UnaryCallSettings.Builder
         getDatasetSchemaSettings() {
diff --git a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/GrpcDocumentServiceStub.java b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/GrpcDocumentServiceStub.java
index af8922df392b..c48b0e9647eb 100644
--- a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/GrpcDocumentServiceStub.java
+++ b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/GrpcDocumentServiceStub.java
@@ -27,9 +27,17 @@
 import com.google.api.gax.rpc.OperationCallable;
 import com.google.api.gax.rpc.RequestParamsBuilder;
 import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata;
+import com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest;
+import com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsResponse;
 import com.google.cloud.documentai.v1beta3.Dataset;
 import com.google.cloud.documentai.v1beta3.DatasetSchema;
 import com.google.cloud.documentai.v1beta3.GetDatasetSchemaRequest;
+import com.google.cloud.documentai.v1beta3.GetDocumentRequest;
+import com.google.cloud.documentai.v1beta3.GetDocumentResponse;
+import com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata;
+import com.google.cloud.documentai.v1beta3.ImportDocumentsRequest;
+import com.google.cloud.documentai.v1beta3.ImportDocumentsResponse;
 import com.google.cloud.documentai.v1beta3.UpdateDatasetOperationMetadata;
 import com.google.cloud.documentai.v1beta3.UpdateDatasetRequest;
 import com.google.cloud.documentai.v1beta3.UpdateDatasetSchemaRequest;
@@ -64,6 +72,37 @@ public class GrpcDocumentServiceStub extends DocumentServiceStub {
               .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
               .build();
 
+  private static final MethodDescriptor
+      importDocumentsMethodDescriptor =
+          MethodDescriptor.newBuilder()
+              .setType(MethodDescriptor.MethodType.UNARY)
+              .setFullMethodName("google.cloud.documentai.v1beta3.DocumentService/ImportDocuments")
+              .setRequestMarshaller(
+                  ProtoUtils.marshaller(ImportDocumentsRequest.getDefaultInstance()))
+              .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
+              .build();
+
+  private static final MethodDescriptor
+      getDocumentMethodDescriptor =
+          MethodDescriptor.newBuilder()
+              .setType(MethodDescriptor.MethodType.UNARY)
+              .setFullMethodName("google.cloud.documentai.v1beta3.DocumentService/GetDocument")
+              .setRequestMarshaller(ProtoUtils.marshaller(GetDocumentRequest.getDefaultInstance()))
+              .setResponseMarshaller(
+                  ProtoUtils.marshaller(GetDocumentResponse.getDefaultInstance()))
+              .build();
+
+  private static final MethodDescriptor
+      batchDeleteDocumentsMethodDescriptor =
+          MethodDescriptor.newBuilder()
+              .setType(MethodDescriptor.MethodType.UNARY)
+              .setFullMethodName(
+                  "google.cloud.documentai.v1beta3.DocumentService/BatchDeleteDocuments")
+              .setRequestMarshaller(
+                  ProtoUtils.marshaller(BatchDeleteDocumentsRequest.getDefaultInstance()))
+              .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
+              .build();
+
   private static final MethodDescriptor
       getDatasetSchemaMethodDescriptor =
           MethodDescriptor.newBuilder()
@@ -107,6 +146,15 @@ public class GrpcDocumentServiceStub extends DocumentServiceStub {
   private final UnaryCallable updateDatasetCallable;
   private final OperationCallable
       updateDatasetOperationCallable;
+  private final UnaryCallable importDocumentsCallable;
+  private final OperationCallable<
+          ImportDocumentsRequest, ImportDocumentsResponse, ImportDocumentsMetadata>
+      importDocumentsOperationCallable;
+  private final UnaryCallable getDocumentCallable;
+  private final UnaryCallable batchDeleteDocumentsCallable;
+  private final OperationCallable<
+          BatchDeleteDocumentsRequest, BatchDeleteDocumentsResponse, BatchDeleteDocumentsMetadata>
+      batchDeleteDocumentsOperationCallable;
   private final UnaryCallable getDatasetSchemaCallable;
   private final UnaryCallable
       updateDatasetSchemaCallable;
@@ -169,6 +217,36 @@ protected GrpcDocumentServiceStub(
                   return builder.build();
                 })
             .build();
+    GrpcCallSettings importDocumentsTransportSettings =
+        GrpcCallSettings.newBuilder()
+            .setMethodDescriptor(importDocumentsMethodDescriptor)
+            .setParamsExtractor(
+                request -> {
+                  RequestParamsBuilder builder = RequestParamsBuilder.create();
+                  builder.add("dataset", String.valueOf(request.getDataset()));
+                  return builder.build();
+                })
+            .build();
+    GrpcCallSettings getDocumentTransportSettings =
+        GrpcCallSettings.newBuilder()
+            .setMethodDescriptor(getDocumentMethodDescriptor)
+            .setParamsExtractor(
+                request -> {
+                  RequestParamsBuilder builder = RequestParamsBuilder.create();
+                  builder.add("dataset", String.valueOf(request.getDataset()));
+                  return builder.build();
+                })
+            .build();
+    GrpcCallSettings batchDeleteDocumentsTransportSettings =
+        GrpcCallSettings.newBuilder()
+            .setMethodDescriptor(batchDeleteDocumentsMethodDescriptor)
+            .setParamsExtractor(
+                request -> {
+                  RequestParamsBuilder builder = RequestParamsBuilder.create();
+                  builder.add("dataset", String.valueOf(request.getDataset()));
+                  return builder.build();
+                })
+            .build();
     GrpcCallSettings getDatasetSchemaTransportSettings =
         GrpcCallSettings.newBuilder()
             .setMethodDescriptor(getDatasetSchemaMethodDescriptor)
@@ -222,6 +300,29 @@ protected GrpcDocumentServiceStub(
             settings.updateDatasetOperationSettings(),
             clientContext,
             operationsStub);
+    this.importDocumentsCallable =
+        callableFactory.createUnaryCallable(
+            importDocumentsTransportSettings, settings.importDocumentsSettings(), clientContext);
+    this.importDocumentsOperationCallable =
+        callableFactory.createOperationCallable(
+            importDocumentsTransportSettings,
+            settings.importDocumentsOperationSettings(),
+            clientContext,
+            operationsStub);
+    this.getDocumentCallable =
+        callableFactory.createUnaryCallable(
+            getDocumentTransportSettings, settings.getDocumentSettings(), clientContext);
+    this.batchDeleteDocumentsCallable =
+        callableFactory.createUnaryCallable(
+            batchDeleteDocumentsTransportSettings,
+            settings.batchDeleteDocumentsSettings(),
+            clientContext);
+    this.batchDeleteDocumentsOperationCallable =
+        callableFactory.createOperationCallable(
+            batchDeleteDocumentsTransportSettings,
+            settings.batchDeleteDocumentsOperationSettings(),
+            clientContext,
+            operationsStub);
     this.getDatasetSchemaCallable =
         callableFactory.createUnaryCallable(
             getDatasetSchemaTransportSettings, settings.getDatasetSchemaSettings(), clientContext);
@@ -259,6 +360,34 @@ public UnaryCallable updateDatasetCallable() {
     return updateDatasetOperationCallable;
   }
 
+  @Override
+  public UnaryCallable importDocumentsCallable() {
+    return importDocumentsCallable;
+  }
+
+  @Override
+  public OperationCallable
+      importDocumentsOperationCallable() {
+    return importDocumentsOperationCallable;
+  }
+
+  @Override
+  public UnaryCallable getDocumentCallable() {
+    return getDocumentCallable;
+  }
+
+  @Override
+  public UnaryCallable batchDeleteDocumentsCallable() {
+    return batchDeleteDocumentsCallable;
+  }
+
+  @Override
+  public OperationCallable<
+          BatchDeleteDocumentsRequest, BatchDeleteDocumentsResponse, BatchDeleteDocumentsMetadata>
+      batchDeleteDocumentsOperationCallable() {
+    return batchDeleteDocumentsOperationCallable;
+  }
+
   @Override
   public UnaryCallable getDatasetSchemaCallable() {
     return getDatasetSchemaCallable;
diff --git a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/HttpJsonDocumentServiceStub.java b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/HttpJsonDocumentServiceStub.java
index f0ce8f9e63bf..174e0369c123 100644
--- a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/HttpJsonDocumentServiceStub.java
+++ b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/HttpJsonDocumentServiceStub.java
@@ -35,9 +35,17 @@
 import com.google.api.gax.rpc.OperationCallable;
 import com.google.api.gax.rpc.RequestParamsBuilder;
 import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata;
+import com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest;
+import com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsResponse;
 import com.google.cloud.documentai.v1beta3.Dataset;
 import com.google.cloud.documentai.v1beta3.DatasetSchema;
 import com.google.cloud.documentai.v1beta3.GetDatasetSchemaRequest;
+import com.google.cloud.documentai.v1beta3.GetDocumentRequest;
+import com.google.cloud.documentai.v1beta3.GetDocumentResponse;
+import com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata;
+import com.google.cloud.documentai.v1beta3.ImportDocumentsRequest;
+import com.google.cloud.documentai.v1beta3.ImportDocumentsResponse;
 import com.google.cloud.documentai.v1beta3.UpdateDatasetOperationMetadata;
 import com.google.cloud.documentai.v1beta3.UpdateDatasetRequest;
 import com.google.cloud.documentai.v1beta3.UpdateDatasetSchemaRequest;
@@ -67,7 +75,11 @@
 public class HttpJsonDocumentServiceStub extends DocumentServiceStub {
   private static final TypeRegistry typeRegistry =
       TypeRegistry.newBuilder()
+          .add(ImportDocumentsMetadata.getDescriptor())
           .add(Dataset.getDescriptor())
+          .add(BatchDeleteDocumentsResponse.getDescriptor())
+          .add(ImportDocumentsResponse.getDescriptor())
+          .add(BatchDeleteDocumentsMetadata.getDescriptor())
           .add(UpdateDatasetOperationMetadata.getDescriptor())
           .build();
 
@@ -113,6 +125,124 @@ public class HttpJsonDocumentServiceStub extends DocumentServiceStub {
                       HttpJsonOperationSnapshot.create(response))
               .build();
 
+  private static final ApiMethodDescriptor
+      importDocumentsMethodDescriptor =
+          ApiMethodDescriptor.newBuilder()
+              .setFullMethodName("google.cloud.documentai.v1beta3.DocumentService/ImportDocuments")
+              .setHttpMethod("POST")
+              .setType(ApiMethodDescriptor.MethodType.UNARY)
+              .setRequestFormatter(
+                  ProtoMessageRequestFormatter.newBuilder()
+                      .setPath(
+                          "/v1beta3/{dataset=projects/*/locations/*/processors/*/dataset}:importDocuments",
+                          request -> {
+                            Map fields = new HashMap<>();
+                            ProtoRestSerializer serializer =
+                                ProtoRestSerializer.create();
+                            serializer.putPathParam(fields, "dataset", request.getDataset());
+                            return fields;
+                          })
+                      .setQueryParamsExtractor(
+                          request -> {
+                            Map> fields = new HashMap<>();
+                            ProtoRestSerializer serializer =
+                                ProtoRestSerializer.create();
+                            serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+                            return fields;
+                          })
+                      .setRequestBodyExtractor(
+                          request ->
+                              ProtoRestSerializer.create()
+                                  .toBody("*", request.toBuilder().clearDataset().build(), true))
+                      .build())
+              .setResponseParser(
+                  ProtoMessageResponseParser.newBuilder()
+                      .setDefaultInstance(Operation.getDefaultInstance())
+                      .setDefaultTypeRegistry(typeRegistry)
+                      .build())
+              .setOperationSnapshotFactory(
+                  (ImportDocumentsRequest request, Operation response) ->
+                      HttpJsonOperationSnapshot.create(response))
+              .build();
+
+  private static final ApiMethodDescriptor
+      getDocumentMethodDescriptor =
+          ApiMethodDescriptor.newBuilder()
+              .setFullMethodName("google.cloud.documentai.v1beta3.DocumentService/GetDocument")
+              .setHttpMethod("GET")
+              .setType(ApiMethodDescriptor.MethodType.UNARY)
+              .setRequestFormatter(
+                  ProtoMessageRequestFormatter.newBuilder()
+                      .setPath(
+                          "/v1beta3/{dataset=projects/*/locations/*/processors/*/dataset}:getDocument",
+                          request -> {
+                            Map fields = new HashMap<>();
+                            ProtoRestSerializer serializer =
+                                ProtoRestSerializer.create();
+                            serializer.putPathParam(fields, "dataset", request.getDataset());
+                            return fields;
+                          })
+                      .setQueryParamsExtractor(
+                          request -> {
+                            Map> fields = new HashMap<>();
+                            ProtoRestSerializer serializer =
+                                ProtoRestSerializer.create();
+                            serializer.putQueryParam(fields, "documentId", request.getDocumentId());
+                            serializer.putQueryParam(fields, "pageRange", request.getPageRange());
+                            serializer.putQueryParam(fields, "readMask", request.getReadMask());
+                            serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+                            return fields;
+                          })
+                      .setRequestBodyExtractor(request -> null)
+                      .build())
+              .setResponseParser(
+                  ProtoMessageResponseParser.newBuilder()
+                      .setDefaultInstance(GetDocumentResponse.getDefaultInstance())
+                      .setDefaultTypeRegistry(typeRegistry)
+                      .build())
+              .build();
+
+  private static final ApiMethodDescriptor
+      batchDeleteDocumentsMethodDescriptor =
+          ApiMethodDescriptor.newBuilder()
+              .setFullMethodName(
+                  "google.cloud.documentai.v1beta3.DocumentService/BatchDeleteDocuments")
+              .setHttpMethod("POST")
+              .setType(ApiMethodDescriptor.MethodType.UNARY)
+              .setRequestFormatter(
+                  ProtoMessageRequestFormatter.newBuilder()
+                      .setPath(
+                          "/v1beta3/{dataset=projects/*/locations/*/processors/*/dataset}:batchDeleteDocuments",
+                          request -> {
+                            Map fields = new HashMap<>();
+                            ProtoRestSerializer serializer =
+                                ProtoRestSerializer.create();
+                            serializer.putPathParam(fields, "dataset", request.getDataset());
+                            return fields;
+                          })
+                      .setQueryParamsExtractor(
+                          request -> {
+                            Map> fields = new HashMap<>();
+                            ProtoRestSerializer serializer =
+                                ProtoRestSerializer.create();
+                            serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+                            return fields;
+                          })
+                      .setRequestBodyExtractor(
+                          request ->
+                              ProtoRestSerializer.create()
+                                  .toBody("*", request.toBuilder().clearDataset().build(), true))
+                      .build())
+              .setResponseParser(
+                  ProtoMessageResponseParser.newBuilder()
+                      .setDefaultInstance(Operation.getDefaultInstance())
+                      .setDefaultTypeRegistry(typeRegistry)
+                      .build())
+              .setOperationSnapshotFactory(
+                  (BatchDeleteDocumentsRequest request, Operation response) ->
+                      HttpJsonOperationSnapshot.create(response))
+              .build();
+
   private static final ApiMethodDescriptor
       getDatasetSchemaMethodDescriptor =
           ApiMethodDescriptor.newBuilder()
@@ -262,6 +392,15 @@ public class HttpJsonDocumentServiceStub extends DocumentServiceStub {
   private final UnaryCallable updateDatasetCallable;
   private final OperationCallable
       updateDatasetOperationCallable;
+  private final UnaryCallable importDocumentsCallable;
+  private final OperationCallable<
+          ImportDocumentsRequest, ImportDocumentsResponse, ImportDocumentsMetadata>
+      importDocumentsOperationCallable;
+  private final UnaryCallable getDocumentCallable;
+  private final UnaryCallable batchDeleteDocumentsCallable;
+  private final OperationCallable<
+          BatchDeleteDocumentsRequest, BatchDeleteDocumentsResponse, BatchDeleteDocumentsMetadata>
+      batchDeleteDocumentsOperationCallable;
   private final UnaryCallable getDatasetSchemaCallable;
   private final UnaryCallable
       updateDatasetSchemaCallable;
@@ -359,6 +498,40 @@ protected HttpJsonDocumentServiceStub(
                   return builder.build();
                 })
             .build();
+    HttpJsonCallSettings importDocumentsTransportSettings =
+        HttpJsonCallSettings.newBuilder()
+            .setMethodDescriptor(importDocumentsMethodDescriptor)
+            .setTypeRegistry(typeRegistry)
+            .setParamsExtractor(
+                request -> {
+                  RequestParamsBuilder builder = RequestParamsBuilder.create();
+                  builder.add("dataset", String.valueOf(request.getDataset()));
+                  return builder.build();
+                })
+            .build();
+    HttpJsonCallSettings getDocumentTransportSettings =
+        HttpJsonCallSettings.newBuilder()
+            .setMethodDescriptor(getDocumentMethodDescriptor)
+            .setTypeRegistry(typeRegistry)
+            .setParamsExtractor(
+                request -> {
+                  RequestParamsBuilder builder = RequestParamsBuilder.create();
+                  builder.add("dataset", String.valueOf(request.getDataset()));
+                  return builder.build();
+                })
+            .build();
+    HttpJsonCallSettings
+        batchDeleteDocumentsTransportSettings =
+            HttpJsonCallSettings.newBuilder()
+                .setMethodDescriptor(batchDeleteDocumentsMethodDescriptor)
+                .setTypeRegistry(typeRegistry)
+                .setParamsExtractor(
+                    request -> {
+                      RequestParamsBuilder builder = RequestParamsBuilder.create();
+                      builder.add("dataset", String.valueOf(request.getDataset()));
+                      return builder.build();
+                    })
+                .build();
     HttpJsonCallSettings getDatasetSchemaTransportSettings =
         HttpJsonCallSettings.newBuilder()
             .setMethodDescriptor(getDatasetSchemaMethodDescriptor)
@@ -417,6 +590,29 @@ protected HttpJsonDocumentServiceStub(
             settings.updateDatasetOperationSettings(),
             clientContext,
             httpJsonOperationsStub);
+    this.importDocumentsCallable =
+        callableFactory.createUnaryCallable(
+            importDocumentsTransportSettings, settings.importDocumentsSettings(), clientContext);
+    this.importDocumentsOperationCallable =
+        callableFactory.createOperationCallable(
+            importDocumentsTransportSettings,
+            settings.importDocumentsOperationSettings(),
+            clientContext,
+            httpJsonOperationsStub);
+    this.getDocumentCallable =
+        callableFactory.createUnaryCallable(
+            getDocumentTransportSettings, settings.getDocumentSettings(), clientContext);
+    this.batchDeleteDocumentsCallable =
+        callableFactory.createUnaryCallable(
+            batchDeleteDocumentsTransportSettings,
+            settings.batchDeleteDocumentsSettings(),
+            clientContext);
+    this.batchDeleteDocumentsOperationCallable =
+        callableFactory.createOperationCallable(
+            batchDeleteDocumentsTransportSettings,
+            settings.batchDeleteDocumentsOperationSettings(),
+            clientContext,
+            httpJsonOperationsStub);
     this.getDatasetSchemaCallable =
         callableFactory.createUnaryCallable(
             getDatasetSchemaTransportSettings, settings.getDatasetSchemaSettings(), clientContext);
@@ -443,6 +639,9 @@ protected HttpJsonDocumentServiceStub(
   public static List getMethodDescriptors() {
     List methodDescriptors = new ArrayList<>();
     methodDescriptors.add(updateDatasetMethodDescriptor);
+    methodDescriptors.add(importDocumentsMethodDescriptor);
+    methodDescriptors.add(getDocumentMethodDescriptor);
+    methodDescriptors.add(batchDeleteDocumentsMethodDescriptor);
     methodDescriptors.add(getDatasetSchemaMethodDescriptor);
     methodDescriptors.add(updateDatasetSchemaMethodDescriptor);
     methodDescriptors.add(listLocationsMethodDescriptor);
@@ -465,6 +664,34 @@ public UnaryCallable updateDatasetCallable() {
     return updateDatasetOperationCallable;
   }
 
+  @Override
+  public UnaryCallable importDocumentsCallable() {
+    return importDocumentsCallable;
+  }
+
+  @Override
+  public OperationCallable
+      importDocumentsOperationCallable() {
+    return importDocumentsOperationCallable;
+  }
+
+  @Override
+  public UnaryCallable getDocumentCallable() {
+    return getDocumentCallable;
+  }
+
+  @Override
+  public UnaryCallable batchDeleteDocumentsCallable() {
+    return batchDeleteDocumentsCallable;
+  }
+
+  @Override
+  public OperationCallable<
+          BatchDeleteDocumentsRequest, BatchDeleteDocumentsResponse, BatchDeleteDocumentsMetadata>
+      batchDeleteDocumentsOperationCallable() {
+    return batchDeleteDocumentsOperationCallable;
+  }
+
   @Override
   public UnaryCallable getDatasetSchemaCallable() {
     return getDatasetSchemaCallable;
diff --git a/java-document-ai/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta2/DocumentUnderstandingServiceClientTest.java b/java-document-ai/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta2/DocumentUnderstandingServiceClientTest.java
index b3ae971361f8..9e7ac1ff8fd6 100644
--- a/java-document-ai/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta2/DocumentUnderstandingServiceClientTest.java
+++ b/java-document-ai/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta2/DocumentUnderstandingServiceClientTest.java
@@ -16,6 +16,8 @@
 
 package com.google.cloud.documentai.v1beta2;
 
+import static com.google.cloud.documentai.v1beta2.DocumentUnderstandingServiceClient.ListLocationsPagedResponse;
+
 import com.google.api.gax.core.NoCredentialsProvider;
 import com.google.api.gax.grpc.GaxGrpcProperties;
 import com.google.api.gax.grpc.testing.LocalChannelProvider;
@@ -24,6 +26,11 @@
 import com.google.api.gax.rpc.ApiClientHeaderProvider;
 import com.google.api.gax.rpc.InvalidArgumentException;
 import com.google.api.gax.rpc.StatusCode;
+import com.google.cloud.location.GetLocationRequest;
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.ListLocationsResponse;
+import com.google.cloud.location.Location;
+import com.google.common.collect.Lists;
 import com.google.longrunning.Operation;
 import com.google.protobuf.AbstractMessage;
 import com.google.protobuf.Any;
@@ -32,6 +39,7 @@
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.HashMap;
 import java.util.List;
 import java.util.UUID;
 import java.util.concurrent.ExecutionException;
@@ -46,6 +54,7 @@
 @Generated("by gapic-generator-java")
 public class DocumentUnderstandingServiceClientTest {
   private static MockDocumentUnderstandingService mockDocumentUnderstandingService;
+  private static MockLocations mockLocations;
   private static MockServiceHelper mockServiceHelper;
   private LocalChannelProvider channelProvider;
   private DocumentUnderstandingServiceClient client;
@@ -53,10 +62,11 @@ public class DocumentUnderstandingServiceClientTest {
   @BeforeClass
   public static void startStaticServer() {
     mockDocumentUnderstandingService = new MockDocumentUnderstandingService();
+    mockLocations = new MockLocations();
     mockServiceHelper =
         new MockServiceHelper(
             UUID.randomUUID().toString(),
-            Arrays.asList(mockDocumentUnderstandingService));
+            Arrays.asList(mockDocumentUnderstandingService, mockLocations));
     mockServiceHelper.start();
   }
 
@@ -140,9 +150,11 @@ public void processDocumentTest() throws Exception {
             .addAllPages(new ArrayList())
             .addAllEntities(new ArrayList())
             .addAllEntityRelations(new ArrayList())
+            .addAllTextChanges(new ArrayList())
             .setShardInfo(Document.ShardInfo.newBuilder().build())
             .addAllLabels(new ArrayList())
             .setError(Status.newBuilder().build())
+            .addAllRevisions(new ArrayList())
             .build();
     mockDocumentUnderstandingService.addResponse(expectedResponse);
 
@@ -207,4 +219,105 @@ public void processDocumentExceptionTest() throws Exception {
       // Expected exception.
     }
   }
+
+  @Test
+  public void listLocationsTest() throws Exception {
+    Location responsesElement = Location.newBuilder().build();
+    ListLocationsResponse expectedResponse =
+        ListLocationsResponse.newBuilder()
+            .setNextPageToken("")
+            .addAllLocations(Arrays.asList(responsesElement))
+            .build();
+    mockLocations.addResponse(expectedResponse);
+
+    ListLocationsRequest request =
+        ListLocationsRequest.newBuilder()
+            .setName("name3373707")
+            .setFilter("filter-1274492040")
+            .setPageSize(883849137)
+            .setPageToken("pageToken873572522")
+            .build();
+
+    ListLocationsPagedResponse pagedListResponse = client.listLocations(request);
+
+    List resources = Lists.newArrayList(pagedListResponse.iterateAll());
+
+    Assert.assertEquals(1, resources.size());
+    Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0));
+
+    List actualRequests = mockLocations.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    ListLocationsRequest actualRequest = ((ListLocationsRequest) actualRequests.get(0));
+
+    Assert.assertEquals(request.getName(), actualRequest.getName());
+    Assert.assertEquals(request.getFilter(), actualRequest.getFilter());
+    Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize());
+    Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  public void listLocationsExceptionTest() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+    mockLocations.addException(exception);
+
+    try {
+      ListLocationsRequest request =
+          ListLocationsRequest.newBuilder()
+              .setName("name3373707")
+              .setFilter("filter-1274492040")
+              .setPageSize(883849137)
+              .setPageToken("pageToken873572522")
+              .build();
+      client.listLocations(request);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception.
+    }
+  }
+
+  @Test
+  public void getLocationTest() throws Exception {
+    Location expectedResponse =
+        Location.newBuilder()
+            .setName("name3373707")
+            .setLocationId("locationId1541836720")
+            .setDisplayName("displayName1714148973")
+            .putAllLabels(new HashMap())
+            .setMetadata(Any.newBuilder().build())
+            .build();
+    mockLocations.addResponse(expectedResponse);
+
+    GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+
+    Location actualResponse = client.getLocation(request);
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockLocations.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    GetLocationRequest actualRequest = ((GetLocationRequest) actualRequests.get(0));
+
+    Assert.assertEquals(request.getName(), actualRequest.getName());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  public void getLocationExceptionTest() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+    mockLocations.addException(exception);
+
+    try {
+      GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+      client.getLocation(request);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception.
+    }
+  }
 }
diff --git a/java-document-ai/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta2/MockLocations.java b/java-document-ai/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta2/MockLocations.java
new file mode 100644
index 000000000000..9d069e894a54
--- /dev/null
+++ b/java-document-ai/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta2/MockLocations.java
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2023 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.v1beta2;
+
+import com.google.api.core.BetaApi;
+import com.google.api.gax.grpc.testing.MockGrpcService;
+import com.google.protobuf.AbstractMessage;
+import io.grpc.ServerServiceDefinition;
+import java.util.List;
+import javax.annotation.Generated;
+
+@BetaApi
+@Generated("by gapic-generator-java")
+public class MockLocations implements MockGrpcService {
+  private final MockLocationsImpl serviceImpl;
+
+  public MockLocations() {
+    serviceImpl = new MockLocationsImpl();
+  }
+
+  @Override
+  public List getRequests() {
+    return serviceImpl.getRequests();
+  }
+
+  @Override
+  public void addResponse(AbstractMessage response) {
+    serviceImpl.addResponse(response);
+  }
+
+  @Override
+  public void addException(Exception exception) {
+    serviceImpl.addException(exception);
+  }
+
+  @Override
+  public ServerServiceDefinition getServiceDefinition() {
+    return serviceImpl.bindService();
+  }
+
+  @Override
+  public void reset() {
+    serviceImpl.reset();
+  }
+}
diff --git a/java-document-ai/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta2/MockLocationsImpl.java b/java-document-ai/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta2/MockLocationsImpl.java
new file mode 100644
index 000000000000..d8dc15bcd4b4
--- /dev/null
+++ b/java-document-ai/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta2/MockLocationsImpl.java
@@ -0,0 +1,105 @@
+/*
+ * Copyright 2023 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.v1beta2;
+
+import com.google.api.core.BetaApi;
+import com.google.cloud.location.GetLocationRequest;
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.ListLocationsResponse;
+import com.google.cloud.location.Location;
+import com.google.cloud.location.LocationsGrpc.LocationsImplBase;
+import com.google.protobuf.AbstractMessage;
+import io.grpc.stub.StreamObserver;
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Queue;
+import javax.annotation.Generated;
+
+@BetaApi
+@Generated("by gapic-generator-java")
+public class MockLocationsImpl extends LocationsImplBase {
+  private List requests;
+  private Queue responses;
+
+  public MockLocationsImpl() {
+    requests = new ArrayList<>();
+    responses = new LinkedList<>();
+  }
+
+  public List getRequests() {
+    return requests;
+  }
+
+  public void addResponse(AbstractMessage response) {
+    responses.add(response);
+  }
+
+  public void setResponses(List responses) {
+    this.responses = new LinkedList(responses);
+  }
+
+  public void addException(Exception exception) {
+    responses.add(exception);
+  }
+
+  public void reset() {
+    requests = new ArrayList<>();
+    responses = new LinkedList<>();
+  }
+
+  @Override
+  public void listLocations(
+      ListLocationsRequest request, StreamObserver responseObserver) {
+    Object response = responses.poll();
+    if (response instanceof ListLocationsResponse) {
+      requests.add(request);
+      responseObserver.onNext(((ListLocationsResponse) response));
+      responseObserver.onCompleted();
+    } else if (response instanceof Exception) {
+      responseObserver.onError(((Exception) response));
+    } else {
+      responseObserver.onError(
+          new IllegalArgumentException(
+              String.format(
+                  "Unrecognized response type %s for method ListLocations, expected %s or %s",
+                  response == null ? "null" : response.getClass().getName(),
+                  ListLocationsResponse.class.getName(),
+                  Exception.class.getName())));
+    }
+  }
+
+  @Override
+  public void getLocation(GetLocationRequest request, StreamObserver responseObserver) {
+    Object response = responses.poll();
+    if (response instanceof Location) {
+      requests.add(request);
+      responseObserver.onNext(((Location) response));
+      responseObserver.onCompleted();
+    } else if (response instanceof Exception) {
+      responseObserver.onError(((Exception) response));
+    } else {
+      responseObserver.onError(
+          new IllegalArgumentException(
+              String.format(
+                  "Unrecognized response type %s for method GetLocation, expected %s or %s",
+                  response == null ? "null" : response.getClass().getName(),
+                  Location.class.getName(),
+                  Exception.class.getName())));
+    }
+  }
+}
diff --git a/java-document-ai/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta3/DocumentServiceClientHttpJsonTest.java b/java-document-ai/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta3/DocumentServiceClientHttpJsonTest.java
index fc73c0cd913a..fb6436dfc936 100644
--- a/java-document-ai/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta3/DocumentServiceClientHttpJsonTest.java
+++ b/java-document-ai/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta3/DocumentServiceClientHttpJsonTest.java
@@ -86,7 +86,10 @@ public void tearDown() throws Exception {
 
   @Test
   public void updateDatasetTest() throws Exception {
-    Dataset expectedResponse = Dataset.newBuilder().setName("name3373707").build();
+    Dataset expectedResponse =
+        Dataset.newBuilder()
+            .setName(DatasetName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString())
+            .build();
     Operation resultOperation =
         Operation.newBuilder()
             .setName("updateDatasetTest")
@@ -97,8 +100,7 @@ public void updateDatasetTest() throws Exception {
 
     Dataset dataset =
         Dataset.newBuilder()
-            .setName(
-                "projects/project-2550/locations/location-2550/processors/processor-2550/dataset")
+            .setName(DatasetName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString())
             .build();
     FieldMask updateMask = FieldMask.newBuilder().build();
 
@@ -130,8 +132,7 @@ public void updateDatasetExceptionTest() throws Exception {
     try {
       Dataset dataset =
           Dataset.newBuilder()
-              .setName(
-                  "projects/project-2550/locations/location-2550/processors/processor-2550/dataset")
+              .setName(DatasetName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString())
               .build();
       FieldMask updateMask = FieldMask.newBuilder().build();
       client.updateDatasetAsync(dataset, updateMask).get();
@@ -140,6 +141,235 @@ public void updateDatasetExceptionTest() throws Exception {
     }
   }
 
+  @Test
+  public void importDocumentsTest() throws Exception {
+    ImportDocumentsResponse expectedResponse = ImportDocumentsResponse.newBuilder().build();
+    Operation resultOperation =
+        Operation.newBuilder()
+            .setName("importDocumentsTest")
+            .setDone(true)
+            .setResponse(Any.pack(expectedResponse))
+            .build();
+    mockService.addResponse(resultOperation);
+
+    DatasetName dataset = DatasetName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
+
+    ImportDocumentsResponse actualResponse = client.importDocumentsAsync(dataset).get();
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockService.getRequestPaths();
+    Assert.assertEquals(1, actualRequests.size());
+
+    String apiClientHeaderKey =
+        mockService
+            .getRequestHeaders()
+            .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey())
+            .iterator()
+            .next();
+    Assert.assertTrue(
+        GaxHttpJsonProperties.getDefaultApiClientHeaderPattern()
+            .matcher(apiClientHeaderKey)
+            .matches());
+  }
+
+  @Test
+  public void importDocumentsExceptionTest() throws Exception {
+    ApiException exception =
+        ApiExceptionFactory.createException(
+            new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false);
+    mockService.addException(exception);
+
+    try {
+      DatasetName dataset = DatasetName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
+      client.importDocumentsAsync(dataset).get();
+      Assert.fail("No exception raised");
+    } catch (ExecutionException e) {
+    }
+  }
+
+  @Test
+  public void importDocumentsTest2() throws Exception {
+    ImportDocumentsResponse expectedResponse = ImportDocumentsResponse.newBuilder().build();
+    Operation resultOperation =
+        Operation.newBuilder()
+            .setName("importDocumentsTest")
+            .setDone(true)
+            .setResponse(Any.pack(expectedResponse))
+            .build();
+    mockService.addResponse(resultOperation);
+
+    String dataset =
+        "projects/project-9539/locations/location-9539/processors/processor-9539/dataset";
+
+    ImportDocumentsResponse actualResponse = client.importDocumentsAsync(dataset).get();
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockService.getRequestPaths();
+    Assert.assertEquals(1, actualRequests.size());
+
+    String apiClientHeaderKey =
+        mockService
+            .getRequestHeaders()
+            .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey())
+            .iterator()
+            .next();
+    Assert.assertTrue(
+        GaxHttpJsonProperties.getDefaultApiClientHeaderPattern()
+            .matcher(apiClientHeaderKey)
+            .matches());
+  }
+
+  @Test
+  public void importDocumentsExceptionTest2() throws Exception {
+    ApiException exception =
+        ApiExceptionFactory.createException(
+            new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false);
+    mockService.addException(exception);
+
+    try {
+      String dataset =
+          "projects/project-9539/locations/location-9539/processors/processor-9539/dataset";
+      client.importDocumentsAsync(dataset).get();
+      Assert.fail("No exception raised");
+    } catch (ExecutionException e) {
+    }
+  }
+
+  @Test
+  public void getDocumentTest() throws Exception {
+    GetDocumentResponse expectedResponse =
+        GetDocumentResponse.newBuilder().setDocument(Document.newBuilder().build()).build();
+    mockService.addResponse(expectedResponse);
+
+    DatasetName dataset = DatasetName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
+
+    GetDocumentResponse actualResponse = client.getDocument(dataset);
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockService.getRequestPaths();
+    Assert.assertEquals(1, actualRequests.size());
+
+    String apiClientHeaderKey =
+        mockService
+            .getRequestHeaders()
+            .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey())
+            .iterator()
+            .next();
+    Assert.assertTrue(
+        GaxHttpJsonProperties.getDefaultApiClientHeaderPattern()
+            .matcher(apiClientHeaderKey)
+            .matches());
+  }
+
+  @Test
+  public void getDocumentExceptionTest() throws Exception {
+    ApiException exception =
+        ApiExceptionFactory.createException(
+            new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false);
+    mockService.addException(exception);
+
+    try {
+      DatasetName dataset = DatasetName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
+      client.getDocument(dataset);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception.
+    }
+  }
+
+  @Test
+  public void getDocumentTest2() throws Exception {
+    GetDocumentResponse expectedResponse =
+        GetDocumentResponse.newBuilder().setDocument(Document.newBuilder().build()).build();
+    mockService.addResponse(expectedResponse);
+
+    String dataset =
+        "projects/project-9539/locations/location-9539/processors/processor-9539/dataset";
+
+    GetDocumentResponse actualResponse = client.getDocument(dataset);
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockService.getRequestPaths();
+    Assert.assertEquals(1, actualRequests.size());
+
+    String apiClientHeaderKey =
+        mockService
+            .getRequestHeaders()
+            .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey())
+            .iterator()
+            .next();
+    Assert.assertTrue(
+        GaxHttpJsonProperties.getDefaultApiClientHeaderPattern()
+            .matcher(apiClientHeaderKey)
+            .matches());
+  }
+
+  @Test
+  public void getDocumentExceptionTest2() throws Exception {
+    ApiException exception =
+        ApiExceptionFactory.createException(
+            new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false);
+    mockService.addException(exception);
+
+    try {
+      String dataset =
+          "projects/project-9539/locations/location-9539/processors/processor-9539/dataset";
+      client.getDocument(dataset);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception.
+    }
+  }
+
+  @Test
+  public void batchDeleteDocumentsTest() throws Exception {
+    BatchDeleteDocumentsResponse expectedResponse =
+        BatchDeleteDocumentsResponse.newBuilder().build();
+    Operation resultOperation =
+        Operation.newBuilder()
+            .setName("batchDeleteDocumentsTest")
+            .setDone(true)
+            .setResponse(Any.pack(expectedResponse))
+            .build();
+    mockService.addResponse(resultOperation);
+
+    String dataset =
+        "projects/project-9539/locations/location-9539/processors/processor-9539/dataset";
+
+    BatchDeleteDocumentsResponse actualResponse = client.batchDeleteDocumentsAsync(dataset).get();
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockService.getRequestPaths();
+    Assert.assertEquals(1, actualRequests.size());
+
+    String apiClientHeaderKey =
+        mockService
+            .getRequestHeaders()
+            .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey())
+            .iterator()
+            .next();
+    Assert.assertTrue(
+        GaxHttpJsonProperties.getDefaultApiClientHeaderPattern()
+            .matcher(apiClientHeaderKey)
+            .matches());
+  }
+
+  @Test
+  public void batchDeleteDocumentsExceptionTest() throws Exception {
+    ApiException exception =
+        ApiExceptionFactory.createException(
+            new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false);
+    mockService.addException(exception);
+
+    try {
+      String dataset =
+          "projects/project-9539/locations/location-9539/processors/processor-9539/dataset";
+      client.batchDeleteDocumentsAsync(dataset).get();
+      Assert.fail("No exception raised");
+    } catch (ExecutionException e) {
+    }
+  }
+
   @Test
   public void getDatasetSchemaTest() throws Exception {
     DatasetSchema expectedResponse =
diff --git a/java-document-ai/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta3/DocumentServiceClientTest.java b/java-document-ai/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta3/DocumentServiceClientTest.java
index 719c1fcc8f38..3c0e30804142 100644
--- a/java-document-ai/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta3/DocumentServiceClientTest.java
+++ b/java-document-ai/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta3/DocumentServiceClientTest.java
@@ -93,7 +93,10 @@ public void tearDown() throws Exception {
 
   @Test
   public void updateDatasetTest() throws Exception {
-    Dataset expectedResponse = Dataset.newBuilder().setName("name3373707").build();
+    Dataset expectedResponse =
+        Dataset.newBuilder()
+            .setName(DatasetName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString())
+            .build();
     Operation resultOperation =
         Operation.newBuilder()
             .setName("updateDatasetTest")
@@ -137,6 +140,209 @@ public void updateDatasetExceptionTest() throws Exception {
     }
   }
 
+  @Test
+  public void importDocumentsTest() throws Exception {
+    ImportDocumentsResponse expectedResponse = ImportDocumentsResponse.newBuilder().build();
+    Operation resultOperation =
+        Operation.newBuilder()
+            .setName("importDocumentsTest")
+            .setDone(true)
+            .setResponse(Any.pack(expectedResponse))
+            .build();
+    mockDocumentService.addResponse(resultOperation);
+
+    DatasetName dataset = DatasetName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
+
+    ImportDocumentsResponse actualResponse = client.importDocumentsAsync(dataset).get();
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockDocumentService.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    ImportDocumentsRequest actualRequest = ((ImportDocumentsRequest) actualRequests.get(0));
+
+    Assert.assertEquals(dataset.toString(), actualRequest.getDataset());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  public void importDocumentsExceptionTest() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+    mockDocumentService.addException(exception);
+
+    try {
+      DatasetName dataset = DatasetName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
+      client.importDocumentsAsync(dataset).get();
+      Assert.fail("No exception raised");
+    } catch (ExecutionException e) {
+      Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass());
+      InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause());
+      Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode());
+    }
+  }
+
+  @Test
+  public void importDocumentsTest2() throws Exception {
+    ImportDocumentsResponse expectedResponse = ImportDocumentsResponse.newBuilder().build();
+    Operation resultOperation =
+        Operation.newBuilder()
+            .setName("importDocumentsTest")
+            .setDone(true)
+            .setResponse(Any.pack(expectedResponse))
+            .build();
+    mockDocumentService.addResponse(resultOperation);
+
+    String dataset = "dataset1443214456";
+
+    ImportDocumentsResponse actualResponse = client.importDocumentsAsync(dataset).get();
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockDocumentService.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    ImportDocumentsRequest actualRequest = ((ImportDocumentsRequest) actualRequests.get(0));
+
+    Assert.assertEquals(dataset, actualRequest.getDataset());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  public void importDocumentsExceptionTest2() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+    mockDocumentService.addException(exception);
+
+    try {
+      String dataset = "dataset1443214456";
+      client.importDocumentsAsync(dataset).get();
+      Assert.fail("No exception raised");
+    } catch (ExecutionException e) {
+      Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass());
+      InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause());
+      Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode());
+    }
+  }
+
+  @Test
+  public void getDocumentTest() throws Exception {
+    GetDocumentResponse expectedResponse =
+        GetDocumentResponse.newBuilder().setDocument(Document.newBuilder().build()).build();
+    mockDocumentService.addResponse(expectedResponse);
+
+    DatasetName dataset = DatasetName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
+
+    GetDocumentResponse actualResponse = client.getDocument(dataset);
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockDocumentService.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    GetDocumentRequest actualRequest = ((GetDocumentRequest) actualRequests.get(0));
+
+    Assert.assertEquals(dataset.toString(), actualRequest.getDataset());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  public void getDocumentExceptionTest() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+    mockDocumentService.addException(exception);
+
+    try {
+      DatasetName dataset = DatasetName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
+      client.getDocument(dataset);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception.
+    }
+  }
+
+  @Test
+  public void getDocumentTest2() throws Exception {
+    GetDocumentResponse expectedResponse =
+        GetDocumentResponse.newBuilder().setDocument(Document.newBuilder().build()).build();
+    mockDocumentService.addResponse(expectedResponse);
+
+    String dataset = "dataset1443214456";
+
+    GetDocumentResponse actualResponse = client.getDocument(dataset);
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockDocumentService.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    GetDocumentRequest actualRequest = ((GetDocumentRequest) actualRequests.get(0));
+
+    Assert.assertEquals(dataset, actualRequest.getDataset());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  public void getDocumentExceptionTest2() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+    mockDocumentService.addException(exception);
+
+    try {
+      String dataset = "dataset1443214456";
+      client.getDocument(dataset);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception.
+    }
+  }
+
+  @Test
+  public void batchDeleteDocumentsTest() throws Exception {
+    BatchDeleteDocumentsResponse expectedResponse =
+        BatchDeleteDocumentsResponse.newBuilder().build();
+    Operation resultOperation =
+        Operation.newBuilder()
+            .setName("batchDeleteDocumentsTest")
+            .setDone(true)
+            .setResponse(Any.pack(expectedResponse))
+            .build();
+    mockDocumentService.addResponse(resultOperation);
+
+    String dataset = "dataset1443214456";
+
+    BatchDeleteDocumentsResponse actualResponse = client.batchDeleteDocumentsAsync(dataset).get();
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockDocumentService.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    BatchDeleteDocumentsRequest actualRequest =
+        ((BatchDeleteDocumentsRequest) actualRequests.get(0));
+
+    Assert.assertEquals(dataset, actualRequest.getDataset());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  public void batchDeleteDocumentsExceptionTest() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+    mockDocumentService.addException(exception);
+
+    try {
+      String dataset = "dataset1443214456";
+      client.batchDeleteDocumentsAsync(dataset).get();
+      Assert.fail("No exception raised");
+    } catch (ExecutionException e) {
+      Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass());
+      InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause());
+      Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode());
+    }
+  }
+
   @Test
   public void getDatasetSchemaTest() throws Exception {
     DatasetSchema expectedResponse =
diff --git a/java-document-ai/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta3/MockDocumentServiceImpl.java b/java-document-ai/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta3/MockDocumentServiceImpl.java
index 6f8fb5085724..73fcd49d809c 100644
--- a/java-document-ai/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta3/MockDocumentServiceImpl.java
+++ b/java-document-ai/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta3/MockDocumentServiceImpl.java
@@ -80,6 +80,69 @@ public void updateDataset(
     }
   }
 
+  @Override
+  public void importDocuments(
+      ImportDocumentsRequest request, StreamObserver responseObserver) {
+    Object response = responses.poll();
+    if (response instanceof Operation) {
+      requests.add(request);
+      responseObserver.onNext(((Operation) response));
+      responseObserver.onCompleted();
+    } else if (response instanceof Exception) {
+      responseObserver.onError(((Exception) response));
+    } else {
+      responseObserver.onError(
+          new IllegalArgumentException(
+              String.format(
+                  "Unrecognized response type %s for method ImportDocuments, expected %s or %s",
+                  response == null ? "null" : response.getClass().getName(),
+                  Operation.class.getName(),
+                  Exception.class.getName())));
+    }
+  }
+
+  @Override
+  public void getDocument(
+      GetDocumentRequest request, StreamObserver responseObserver) {
+    Object response = responses.poll();
+    if (response instanceof GetDocumentResponse) {
+      requests.add(request);
+      responseObserver.onNext(((GetDocumentResponse) response));
+      responseObserver.onCompleted();
+    } else if (response instanceof Exception) {
+      responseObserver.onError(((Exception) response));
+    } else {
+      responseObserver.onError(
+          new IllegalArgumentException(
+              String.format(
+                  "Unrecognized response type %s for method GetDocument, expected %s or %s",
+                  response == null ? "null" : response.getClass().getName(),
+                  GetDocumentResponse.class.getName(),
+                  Exception.class.getName())));
+    }
+  }
+
+  @Override
+  public void batchDeleteDocuments(
+      BatchDeleteDocumentsRequest request, StreamObserver responseObserver) {
+    Object response = responses.poll();
+    if (response instanceof Operation) {
+      requests.add(request);
+      responseObserver.onNext(((Operation) response));
+      responseObserver.onCompleted();
+    } else if (response instanceof Exception) {
+      responseObserver.onError(((Exception) response));
+    } else {
+      responseObserver.onError(
+          new IllegalArgumentException(
+              String.format(
+                  "Unrecognized response type %s for method BatchDeleteDocuments, expected %s or %s",
+                  response == null ? "null" : response.getClass().getName(),
+                  Operation.class.getName(),
+                  Exception.class.getName())));
+    }
+  }
+
   @Override
   public void getDatasetSchema(
       GetDatasetSchemaRequest request, StreamObserver responseObserver) {
diff --git a/java-document-ai/grpc-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentServiceGrpc.java b/java-document-ai/grpc-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentServiceGrpc.java
index c95de0257aa3..66243980d9b0 100644
--- a/java-document-ai/grpc-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentServiceGrpc.java
+++ b/java-document-ai/grpc-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentServiceGrpc.java
@@ -81,6 +81,148 @@ private DocumentServiceGrpc() {}
     return getUpdateDatasetMethod;
   }
 
+  private static volatile io.grpc.MethodDescriptor<
+          com.google.cloud.documentai.v1beta3.ImportDocumentsRequest,
+          com.google.longrunning.Operation>
+      getImportDocumentsMethod;
+
+  @io.grpc.stub.annotations.RpcMethod(
+      fullMethodName = SERVICE_NAME + '/' + "ImportDocuments",
+      requestType = com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.class,
+      responseType = com.google.longrunning.Operation.class,
+      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
+  public static io.grpc.MethodDescriptor<
+          com.google.cloud.documentai.v1beta3.ImportDocumentsRequest,
+          com.google.longrunning.Operation>
+      getImportDocumentsMethod() {
+    io.grpc.MethodDescriptor<
+            com.google.cloud.documentai.v1beta3.ImportDocumentsRequest,
+            com.google.longrunning.Operation>
+        getImportDocumentsMethod;
+    if ((getImportDocumentsMethod = DocumentServiceGrpc.getImportDocumentsMethod) == null) {
+      synchronized (DocumentServiceGrpc.class) {
+        if ((getImportDocumentsMethod = DocumentServiceGrpc.getImportDocumentsMethod) == null) {
+          DocumentServiceGrpc.getImportDocumentsMethod =
+              getImportDocumentsMethod =
+                  io.grpc.MethodDescriptor
+                      .
+                          newBuilder()
+                      .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
+                      .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ImportDocuments"))
+                      .setSampledToLocalTracing(true)
+                      .setRequestMarshaller(
+                          io.grpc.protobuf.ProtoUtils.marshaller(
+                              com.google.cloud.documentai.v1beta3.ImportDocumentsRequest
+                                  .getDefaultInstance()))
+                      .setResponseMarshaller(
+                          io.grpc.protobuf.ProtoUtils.marshaller(
+                              com.google.longrunning.Operation.getDefaultInstance()))
+                      .setSchemaDescriptor(
+                          new DocumentServiceMethodDescriptorSupplier("ImportDocuments"))
+                      .build();
+        }
+      }
+    }
+    return getImportDocumentsMethod;
+  }
+
+  private static volatile io.grpc.MethodDescriptor<
+          com.google.cloud.documentai.v1beta3.GetDocumentRequest,
+          com.google.cloud.documentai.v1beta3.GetDocumentResponse>
+      getGetDocumentMethod;
+
+  @io.grpc.stub.annotations.RpcMethod(
+      fullMethodName = SERVICE_NAME + '/' + "GetDocument",
+      requestType = com.google.cloud.documentai.v1beta3.GetDocumentRequest.class,
+      responseType = com.google.cloud.documentai.v1beta3.GetDocumentResponse.class,
+      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
+  public static io.grpc.MethodDescriptor<
+          com.google.cloud.documentai.v1beta3.GetDocumentRequest,
+          com.google.cloud.documentai.v1beta3.GetDocumentResponse>
+      getGetDocumentMethod() {
+    io.grpc.MethodDescriptor<
+            com.google.cloud.documentai.v1beta3.GetDocumentRequest,
+            com.google.cloud.documentai.v1beta3.GetDocumentResponse>
+        getGetDocumentMethod;
+    if ((getGetDocumentMethod = DocumentServiceGrpc.getGetDocumentMethod) == null) {
+      synchronized (DocumentServiceGrpc.class) {
+        if ((getGetDocumentMethod = DocumentServiceGrpc.getGetDocumentMethod) == null) {
+          DocumentServiceGrpc.getGetDocumentMethod =
+              getGetDocumentMethod =
+                  io.grpc.MethodDescriptor
+                      .
+                          newBuilder()
+                      .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
+                      .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetDocument"))
+                      .setSampledToLocalTracing(true)
+                      .setRequestMarshaller(
+                          io.grpc.protobuf.ProtoUtils.marshaller(
+                              com.google.cloud.documentai.v1beta3.GetDocumentRequest
+                                  .getDefaultInstance()))
+                      .setResponseMarshaller(
+                          io.grpc.protobuf.ProtoUtils.marshaller(
+                              com.google.cloud.documentai.v1beta3.GetDocumentResponse
+                                  .getDefaultInstance()))
+                      .setSchemaDescriptor(
+                          new DocumentServiceMethodDescriptorSupplier("GetDocument"))
+                      .build();
+        }
+      }
+    }
+    return getGetDocumentMethod;
+  }
+
+  private static volatile io.grpc.MethodDescriptor<
+          com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest,
+          com.google.longrunning.Operation>
+      getBatchDeleteDocumentsMethod;
+
+  @io.grpc.stub.annotations.RpcMethod(
+      fullMethodName = SERVICE_NAME + '/' + "BatchDeleteDocuments",
+      requestType = com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest.class,
+      responseType = com.google.longrunning.Operation.class,
+      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
+  public static io.grpc.MethodDescriptor<
+          com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest,
+          com.google.longrunning.Operation>
+      getBatchDeleteDocumentsMethod() {
+    io.grpc.MethodDescriptor<
+            com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest,
+            com.google.longrunning.Operation>
+        getBatchDeleteDocumentsMethod;
+    if ((getBatchDeleteDocumentsMethod = DocumentServiceGrpc.getBatchDeleteDocumentsMethod)
+        == null) {
+      synchronized (DocumentServiceGrpc.class) {
+        if ((getBatchDeleteDocumentsMethod = DocumentServiceGrpc.getBatchDeleteDocumentsMethod)
+            == null) {
+          DocumentServiceGrpc.getBatchDeleteDocumentsMethod =
+              getBatchDeleteDocumentsMethod =
+                  io.grpc.MethodDescriptor
+                      .
+                          newBuilder()
+                      .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
+                      .setFullMethodName(
+                          generateFullMethodName(SERVICE_NAME, "BatchDeleteDocuments"))
+                      .setSampledToLocalTracing(true)
+                      .setRequestMarshaller(
+                          io.grpc.protobuf.ProtoUtils.marshaller(
+                              com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest
+                                  .getDefaultInstance()))
+                      .setResponseMarshaller(
+                          io.grpc.protobuf.ProtoUtils.marshaller(
+                              com.google.longrunning.Operation.getDefaultInstance()))
+                      .setSchemaDescriptor(
+                          new DocumentServiceMethodDescriptorSupplier("BatchDeleteDocuments"))
+                      .build();
+        }
+      }
+    }
+    return getBatchDeleteDocumentsMethod;
+  }
+
   private static volatile io.grpc.MethodDescriptor<
           com.google.cloud.documentai.v1beta3.GetDatasetSchemaRequest,
           com.google.cloud.documentai.v1beta3.DatasetSchema>
@@ -241,6 +383,49 @@ default void updateDataset(
           getUpdateDatasetMethod(), responseObserver);
     }
 
+    /**
+     *
+     *
+     * 
+     * Import documents into a dataset.
+     * 
+ */ + default void importDocuments( + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getImportDocumentsMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns relevant fields present in the requested document.
+     * 
+ */ + default void getDocument( + com.google.cloud.documentai.v1beta3.GetDocumentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetDocumentMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a set of documents.
+     * 
+ */ + default void batchDeleteDocuments( + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getBatchDeleteDocumentsMethod(), responseObserver); + } + /** * * @@ -322,6 +507,55 @@ public void updateDataset( responseObserver); } + /** + * + * + *
+     * Import documents into a dataset.
+     * 
+ */ + public void importDocuments( + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getImportDocumentsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns relevant fields present in the requested document.
+     * 
+ */ + public void getDocument( + com.google.cloud.documentai.v1beta3.GetDocumentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetDocumentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a set of documents.
+     * 
+ */ + public void batchDeleteDocuments( + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getBatchDeleteDocumentsMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -389,6 +623,45 @@ public com.google.longrunning.Operation updateDataset( getChannel(), getUpdateDatasetMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Import documents into a dataset.
+     * 
+ */ + public com.google.longrunning.Operation importDocuments( + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getImportDocumentsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns relevant fields present in the requested document.
+     * 
+ */ + public com.google.cloud.documentai.v1beta3.GetDocumentResponse getDocument( + com.google.cloud.documentai.v1beta3.GetDocumentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetDocumentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a set of documents.
+     * 
+ */ + public com.google.longrunning.Operation batchDeleteDocuments( + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getBatchDeleteDocumentsMethod(), getCallOptions(), request); + } + /** * * @@ -448,6 +721,47 @@ protected DocumentServiceFutureStub build( getChannel().newCall(getUpdateDatasetMethod(), getCallOptions()), request); } + /** + * + * + *
+     * Import documents into a dataset.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + importDocuments(com.google.cloud.documentai.v1beta3.ImportDocumentsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getImportDocumentsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Returns relevant fields present in the requested document.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.documentai.v1beta3.GetDocumentResponse> + getDocument(com.google.cloud.documentai.v1beta3.GetDocumentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetDocumentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a set of documents.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + batchDeleteDocuments( + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getBatchDeleteDocumentsMethod(), getCallOptions()), request); + } + /** * * @@ -479,8 +793,11 @@ protected DocumentServiceFutureStub build( } private static final int METHODID_UPDATE_DATASET = 0; - private static final int METHODID_GET_DATASET_SCHEMA = 1; - private static final int METHODID_UPDATE_DATASET_SCHEMA = 2; + private static final int METHODID_IMPORT_DOCUMENTS = 1; + private static final int METHODID_GET_DOCUMENT = 2; + private static final int METHODID_BATCH_DELETE_DOCUMENTS = 3; + private static final int METHODID_GET_DATASET_SCHEMA = 4; + private static final int METHODID_UPDATE_DATASET_SCHEMA = 5; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -504,6 +821,22 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.documentai.v1beta3.UpdateDatasetRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_IMPORT_DOCUMENTS: + serviceImpl.importDocuments( + (com.google.cloud.documentai.v1beta3.ImportDocumentsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_DOCUMENT: + serviceImpl.getDocument( + (com.google.cloud.documentai.v1beta3.GetDocumentRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_BATCH_DELETE_DOCUMENTS: + serviceImpl.batchDeleteDocuments( + (com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; case METHODID_GET_DATASET_SCHEMA: serviceImpl.getDatasetSchema( (com.google.cloud.documentai.v1beta3.GetDatasetSchemaRequest) request, @@ -540,6 +873,25 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser new MethodHandlers< com.google.cloud.documentai.v1beta3.UpdateDatasetRequest, com.google.longrunning.Operation>(service, METHODID_UPDATE_DATASET))) + .addMethod( + getImportDocumentsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest, + com.google.longrunning.Operation>(service, METHODID_IMPORT_DOCUMENTS))) + .addMethod( + getGetDocumentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.documentai.v1beta3.GetDocumentRequest, + com.google.cloud.documentai.v1beta3.GetDocumentResponse>( + service, METHODID_GET_DOCUMENT))) + .addMethod( + getBatchDeleteDocumentsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest, + com.google.longrunning.Operation>(service, METHODID_BATCH_DELETE_DOCUMENTS))) .addMethod( getGetDatasetSchemaMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -606,6 +958,9 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new DocumentServiceFileDescriptorSupplier()) .addMethod(getUpdateDatasetMethod()) + .addMethod(getImportDocumentsMethod()) + .addMethod(getGetDocumentMethod()) + .addMethod(getBatchDeleteDocumentsMethod()) .addMethod(getGetDatasetSchemaMethod()) .addMethod(getUpdateDatasetSchemaMethod()) .build(); diff --git a/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/BatchProcessRequest.java b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/BatchProcessRequest.java index b79840a97c2a..bfba9edd0a9c 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/BatchProcessRequest.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/BatchProcessRequest.java @@ -261,6 +261,56 @@ public boolean getSkipHumanReview() { return skipHumanReview_; } + public static final int PROCESS_OPTIONS_FIELD_NUMBER = 7; + private com.google.cloud.documentai.v1.ProcessOptions processOptions_; + /** + * + * + *
+   * Inference-time options for the process API
+   * 
+ * + * .google.cloud.documentai.v1.ProcessOptions process_options = 7; + * + * @return Whether the processOptions field is set. + */ + @java.lang.Override + public boolean hasProcessOptions() { + return processOptions_ != null; + } + /** + * + * + *
+   * Inference-time options for the process API
+   * 
+ * + * .google.cloud.documentai.v1.ProcessOptions process_options = 7; + * + * @return The processOptions. + */ + @java.lang.Override + public com.google.cloud.documentai.v1.ProcessOptions getProcessOptions() { + return processOptions_ == null + ? com.google.cloud.documentai.v1.ProcessOptions.getDefaultInstance() + : processOptions_; + } + /** + * + * + *
+   * Inference-time options for the process API
+   * 
+ * + * .google.cloud.documentai.v1.ProcessOptions process_options = 7; + */ + @java.lang.Override + public com.google.cloud.documentai.v1.ProcessOptionsOrBuilder getProcessOptionsOrBuilder() { + return processOptions_ == null + ? com.google.cloud.documentai.v1.ProcessOptions.getDefaultInstance() + : processOptions_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -287,6 +337,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (documentOutputConfig_ != null) { output.writeMessage(6, getDocumentOutputConfig()); } + if (processOptions_ != null) { + output.writeMessage(7, getProcessOptions()); + } getUnknownFields().writeTo(output); } @@ -309,6 +362,9 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getDocumentOutputConfig()); } + if (processOptions_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getProcessOptions()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -335,6 +391,10 @@ public boolean equals(final java.lang.Object obj) { if (!getDocumentOutputConfig().equals(other.getDocumentOutputConfig())) return false; } if (getSkipHumanReview() != other.getSkipHumanReview()) return false; + if (hasProcessOptions() != other.hasProcessOptions()) return false; + if (hasProcessOptions()) { + if (!getProcessOptions().equals(other.getProcessOptions())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -358,6 +418,10 @@ public int hashCode() { } hash = (37 * hash) + SKIP_HUMAN_REVIEW_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSkipHumanReview()); + if (hasProcessOptions()) { + hash = (37 * hash) + PROCESS_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getProcessOptions().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -510,6 +574,11 @@ public Builder clear() { documentOutputConfigBuilder_ = null; } skipHumanReview_ = false; + processOptions_ = null; + if (processOptionsBuilder_ != null) { + processOptionsBuilder_.dispose(); + processOptionsBuilder_ = null; + } return this; } @@ -562,6 +631,10 @@ private void buildPartial0(com.google.cloud.documentai.v1.BatchProcessRequest re if (((from_bitField0_ & 0x00000008) != 0)) { result.skipHumanReview_ = skipHumanReview_; } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.processOptions_ = + processOptionsBuilder_ == null ? processOptions_ : processOptionsBuilder_.build(); + } } @java.lang.Override @@ -624,6 +697,9 @@ public Builder mergeFrom(com.google.cloud.documentai.v1.BatchProcessRequest othe if (other.getSkipHumanReview() != false) { setSkipHumanReview(other.getSkipHumanReview()); } + if (other.hasProcessOptions()) { + mergeProcessOptions(other.getProcessOptions()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -675,6 +751,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; break; } // case 50 + case 58: + { + input.readMessage(getProcessOptionsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 58 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1305,6 +1387,191 @@ public Builder clearSkipHumanReview() { return this; } + private com.google.cloud.documentai.v1.ProcessOptions processOptions_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1.ProcessOptions, + com.google.cloud.documentai.v1.ProcessOptions.Builder, + com.google.cloud.documentai.v1.ProcessOptionsOrBuilder> + processOptionsBuilder_; + /** + * + * + *
+     * Inference-time options for the process API
+     * 
+ * + * .google.cloud.documentai.v1.ProcessOptions process_options = 7; + * + * @return Whether the processOptions field is set. + */ + public boolean hasProcessOptions() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Inference-time options for the process API
+     * 
+ * + * .google.cloud.documentai.v1.ProcessOptions process_options = 7; + * + * @return The processOptions. + */ + public com.google.cloud.documentai.v1.ProcessOptions getProcessOptions() { + if (processOptionsBuilder_ == null) { + return processOptions_ == null + ? com.google.cloud.documentai.v1.ProcessOptions.getDefaultInstance() + : processOptions_; + } else { + return processOptionsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Inference-time options for the process API
+     * 
+ * + * .google.cloud.documentai.v1.ProcessOptions process_options = 7; + */ + public Builder setProcessOptions(com.google.cloud.documentai.v1.ProcessOptions value) { + if (processOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + processOptions_ = value; + } else { + processOptionsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Inference-time options for the process API
+     * 
+ * + * .google.cloud.documentai.v1.ProcessOptions process_options = 7; + */ + public Builder setProcessOptions( + com.google.cloud.documentai.v1.ProcessOptions.Builder builderForValue) { + if (processOptionsBuilder_ == null) { + processOptions_ = builderForValue.build(); + } else { + processOptionsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Inference-time options for the process API
+     * 
+ * + * .google.cloud.documentai.v1.ProcessOptions process_options = 7; + */ + public Builder mergeProcessOptions(com.google.cloud.documentai.v1.ProcessOptions value) { + if (processOptionsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && processOptions_ != null + && processOptions_ + != com.google.cloud.documentai.v1.ProcessOptions.getDefaultInstance()) { + getProcessOptionsBuilder().mergeFrom(value); + } else { + processOptions_ = value; + } + } else { + processOptionsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Inference-time options for the process API
+     * 
+ * + * .google.cloud.documentai.v1.ProcessOptions process_options = 7; + */ + public Builder clearProcessOptions() { + bitField0_ = (bitField0_ & ~0x00000010); + processOptions_ = null; + if (processOptionsBuilder_ != null) { + processOptionsBuilder_.dispose(); + processOptionsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Inference-time options for the process API
+     * 
+ * + * .google.cloud.documentai.v1.ProcessOptions process_options = 7; + */ + public com.google.cloud.documentai.v1.ProcessOptions.Builder getProcessOptionsBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getProcessOptionsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Inference-time options for the process API
+     * 
+ * + * .google.cloud.documentai.v1.ProcessOptions process_options = 7; + */ + public com.google.cloud.documentai.v1.ProcessOptionsOrBuilder getProcessOptionsOrBuilder() { + if (processOptionsBuilder_ != null) { + return processOptionsBuilder_.getMessageOrBuilder(); + } else { + return processOptions_ == null + ? com.google.cloud.documentai.v1.ProcessOptions.getDefaultInstance() + : processOptions_; + } + } + /** + * + * + *
+     * Inference-time options for the process API
+     * 
+ * + * .google.cloud.documentai.v1.ProcessOptions process_options = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1.ProcessOptions, + com.google.cloud.documentai.v1.ProcessOptions.Builder, + com.google.cloud.documentai.v1.ProcessOptionsOrBuilder> + getProcessOptionsFieldBuilder() { + if (processOptionsBuilder_ == null) { + processOptionsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1.ProcessOptions, + com.google.cloud.documentai.v1.ProcessOptions.Builder, + com.google.cloud.documentai.v1.ProcessOptionsOrBuilder>( + getProcessOptions(), getParentForChildren(), isClean()); + processOptions_ = null; + } + return processOptionsBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/BatchProcessRequestOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/BatchProcessRequestOrBuilder.java index 234086b43bfc..2ec9be3228b4 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/BatchProcessRequestOrBuilder.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/BatchProcessRequestOrBuilder.java @@ -157,4 +157,39 @@ public interface BatchProcessRequestOrBuilder * @return The skipHumanReview. */ boolean getSkipHumanReview(); + + /** + * + * + *
+   * Inference-time options for the process API
+   * 
+ * + * .google.cloud.documentai.v1.ProcessOptions process_options = 7; + * + * @return Whether the processOptions field is set. + */ + boolean hasProcessOptions(); + /** + * + * + *
+   * Inference-time options for the process API
+   * 
+ * + * .google.cloud.documentai.v1.ProcessOptions process_options = 7; + * + * @return The processOptions. + */ + com.google.cloud.documentai.v1.ProcessOptions getProcessOptions(); + /** + * + * + *
+   * Inference-time options for the process API
+   * 
+ * + * .google.cloud.documentai.v1.ProcessOptions process_options = 7; + */ + com.google.cloud.documentai.v1.ProcessOptionsOrBuilder getProcessOptionsOrBuilder(); } diff --git a/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/DocumentAiProcessor.java b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/DocumentAiProcessor.java index eb133d5d1863..97f7a6c3407e 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/DocumentAiProcessor.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/DocumentAiProcessor.java @@ -54,7 +54,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "source.proto\0320google/cloud/documentai/v1" + "/document_schema.proto\032+google/cloud/doc" + "umentai/v1/evaluation.proto\032\037google/prot" - + "obuf/timestamp.proto\"\260\007\n\020ProcessorVersio" + + "obuf/timestamp.proto\"\266\007\n\020ProcessorVersio" + "n\022\014\n\004name\030\001 \001(\t\022\024\n\014display_name\030\002 \001(\t\022C\n" + "\017document_schema\030\014 \001(\0132*.google.cloud.do" + "cumentai.v1.DocumentSchema\022A\n\005state\030\006 \001(" @@ -63,41 +63,41 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "gle.protobuf.Timestamp\022J\n\021latest_evaluat" + "ion\030\010 \001(\0132/.google.cloud.documentai.v1.E" + "valuationReference\022\024\n\014kms_key_name\030\t \001(\t" - + "\022\034\n\024kms_key_version_name\030\n \001(\t\022\026\n\016google" - + "_managed\030\013 \001(\010\022V\n\020deprecation_info\030\r \001(\013" - + "2<.google.cloud.documentai.v1.ProcessorV" - + "ersion.DeprecationInfo\032\237\001\n\017DeprecationIn" - + "fo\0224\n\020deprecation_time\030\001 \001(\0132\032.google.pr" - + "otobuf.Timestamp\022V\n\035replacement_processo" - + "r_version\030\002 \001(\tB/\372A,\n*documentai.googlea" - + "pis.com/ProcessorVersion\"\223\001\n\005State\022\025\n\021ST" - + "ATE_UNSPECIFIED\020\000\022\014\n\010DEPLOYED\020\001\022\r\n\tDEPLO" - + "YING\020\002\022\016\n\nUNDEPLOYED\020\003\022\017\n\013UNDEPLOYING\020\004\022" - + "\014\n\010CREATING\020\005\022\014\n\010DELETING\020\006\022\n\n\006FAILED\020\007\022" - + "\r\n\tIMPORTING\020\010:\226\001\352A\222\001\n*documentai.google" - + "apis.com/ProcessorVersion\022dprojects/{pro" - + "ject}/locations/{location}/processors/{p" - + "rocessor}/processorVersions/{processor_v" - + "ersion}\"\254\004\n\tProcessor\022\023\n\004name\030\001 \001(\tB\005\342A\002" - + "\005\003\022\014\n\004type\030\002 \001(\t\022\024\n\014display_name\030\003 \001(\t\022@" - + "\n\005state\030\004 \001(\0162+.google.cloud.documentai." - + "v1.Processor.StateB\004\342A\001\003\022R\n\031default_proc" - + "essor_version\030\t \001(\tB/\372A,\n*documentai.goo" - + "gleapis.com/ProcessorVersion\022\037\n\020process_" - + "endpoint\030\006 \001(\tB\005\342A\002\003\005\022/\n\013create_time\030\007 \001" - + "(\0132\032.google.protobuf.Timestamp\022\024\n\014kms_ke" - + "y_name\030\010 \001(\t\"~\n\005State\022\025\n\021STATE_UNSPECIFI" - + "ED\020\000\022\013\n\007ENABLED\020\001\022\014\n\010DISABLED\020\002\022\014\n\010ENABL" - + "ING\020\003\022\r\n\tDISABLING\020\004\022\014\n\010CREATING\020\005\022\n\n\006FA" - + "ILED\020\006\022\014\n\010DELETING\020\007:h\352Ae\n#documentai.go" - + "ogleapis.com/Processor\022>projects/{projec" - + "t}/locations/{location}/processors/{proc" - + "essor}B\321\001\n\036com.google.cloud.documentai.v" - + "1B\023DocumentAiProcessorP\001Z>cloud.google.c" - + "om/go/documentai/apiv1/documentaipb;docu" - + "mentaipb\252\002\032Google.Cloud.DocumentAI.V1\312\002\032" - + "Google\\Cloud\\DocumentAI\\V1\352\002\035Google::Clo" - + "ud::DocumentAI::V1b\006proto3" + + "\022\034\n\024kms_key_version_name\030\n \001(\t\022\034\n\016google" + + "_managed\030\013 \001(\010B\004\342A\001\003\022V\n\020deprecation_info" + + "\030\r \001(\0132<.google.cloud.documentai.v1.Proc" + + "essorVersion.DeprecationInfo\032\237\001\n\017Depreca" + + "tionInfo\0224\n\020deprecation_time\030\001 \001(\0132\032.goo" + + "gle.protobuf.Timestamp\022V\n\035replacement_pr" + + "ocessor_version\030\002 \001(\tB/\372A,\n*documentai.g" + + "oogleapis.com/ProcessorVersion\"\223\001\n\005State" + + "\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n\010DEPLOYED\020\001\022\r\n" + + "\tDEPLOYING\020\002\022\016\n\nUNDEPLOYED\020\003\022\017\n\013UNDEPLOY" + + "ING\020\004\022\014\n\010CREATING\020\005\022\014\n\010DELETING\020\006\022\n\n\006FAI" + + "LED\020\007\022\r\n\tIMPORTING\020\010:\226\001\352A\222\001\n*documentai." + + "googleapis.com/ProcessorVersion\022dproject" + + "s/{project}/locations/{location}/process" + + "ors/{processor}/processorVersions/{proce" + + "ssor_version}\"\254\004\n\tProcessor\022\023\n\004name\030\001 \001(" + + "\tB\005\342A\002\005\003\022\014\n\004type\030\002 \001(\t\022\024\n\014display_name\030\003" + + " \001(\t\022@\n\005state\030\004 \001(\0162+.google.cloud.docum" + + "entai.v1.Processor.StateB\004\342A\001\003\022R\n\031defaul" + + "t_processor_version\030\t \001(\tB/\372A,\n*document" + + "ai.googleapis.com/ProcessorVersion\022\037\n\020pr" + + "ocess_endpoint\030\006 \001(\tB\005\342A\002\003\005\022/\n\013create_ti" + + "me\030\007 \001(\0132\032.google.protobuf.Timestamp\022\024\n\014" + + "kms_key_name\030\010 \001(\t\"~\n\005State\022\025\n\021STATE_UNS" + + "PECIFIED\020\000\022\013\n\007ENABLED\020\001\022\014\n\010DISABLED\020\002\022\014\n" + + "\010ENABLING\020\003\022\r\n\tDISABLING\020\004\022\014\n\010CREATING\020\005" + + "\022\n\n\006FAILED\020\006\022\014\n\010DELETING\020\007:h\352Ae\n#documen" + + "tai.googleapis.com/Processor\022>projects/{" + + "project}/locations/{location}/processors" + + "/{processor}B\321\001\n\036com.google.cloud.docume" + + "ntai.v1B\023DocumentAiProcessorP\001Z>cloud.go" + + "ogle.com/go/documentai/apiv1/documentaip" + + "b;documentaipb\252\002\032Google.Cloud.DocumentAI" + + ".V1\312\002\032Google\\Cloud\\DocumentAI\\V1\352\002\035Googl" + + "e::Cloud::DocumentAI::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/DocumentAiProcessorService.java b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/DocumentAiProcessorService.java index 46f599a73fcb..e79793318c94 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/DocumentAiProcessorService.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/DocumentAiProcessorService.java @@ -27,6 +27,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1_ProcessOptions_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1_ProcessOptions_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_documentai_v1_ProcessRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -187,6 +191,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_documentai_v1_TrainProcessorVersionRequest_InputData_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_documentai_v1_TrainProcessorVersionRequest_InputData_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1_TrainProcessorVersionRequest_CustomDocumentExtractionOptions_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1_TrainProcessorVersionRequest_CustomDocumentExtractionOptions_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_documentai_v1_TrainProcessorVersionResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -261,29 +269,36 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "tions.proto\032\033google/protobuf/empty.proto" + "\032 google/protobuf/field_mask.proto\032\037goog" + "le/protobuf/timestamp.proto\032\027google/rpc/" - + "status.proto\"\201\002\n\016ProcessRequest\022?\n\017inlin" - + "e_document\030\004 \001(\0132$.google.cloud.document" - + "ai.v1.DocumentH\000\022?\n\014raw_document\030\005 \001(\0132\'" - + ".google.cloud.documentai.v1.RawDocumentH" - + "\000\022\030\n\004name\030\001 \001(\tB\n\342A\001\002\372A\003\n\001*\022\031\n\021skip_huma" - + "n_review\030\003 \001(\010\022.\n\nfield_mask\030\006 \001(\0132\032.goo" - + "gle.protobuf.FieldMaskB\010\n\006source\"\356\001\n\021Hum" - + "anReviewStatus\022B\n\005state\030\001 \001(\01623.google.c" - + "loud.documentai.v1.HumanReviewStatus.Sta" - + "te\022\025\n\rstate_message\030\002 \001(\t\022\036\n\026human_revie" - + "w_operation\030\003 \001(\t\"^\n\005State\022\025\n\021STATE_UNSP" - + "ECIFIED\020\000\022\013\n\007SKIPPED\020\001\022\025\n\021VALIDATION_PAS" - + "SED\020\002\022\017\n\013IN_PROGRESS\020\003\022\t\n\005ERROR\020\004\"\225\001\n\017Pr" - + "ocessResponse\0226\n\010document\030\001 \001(\0132$.google" - + ".cloud.documentai.v1.Document\022J\n\023human_r" - + "eview_status\030\003 \001(\0132-.google.cloud.docume" - + "ntai.v1.HumanReviewStatus\"\354\001\n\023BatchProce" - + "ssRequest\022\030\n\004name\030\001 \001(\tB\n\342A\001\002\372A\003\n\001*\022N\n\017i" - + "nput_documents\030\005 \001(\01325.google.cloud.docu" - + "mentai.v1.BatchDocumentsInputConfig\022P\n\026d" - + "ocument_output_config\030\006 \001(\01320.google.clo" - + "ud.documentai.v1.DocumentOutputConfig\022\031\n" - + "\021skip_human_review\030\004 \001(\010\"\026\n\024BatchProcess" + + "status.proto\"K\n\016ProcessOptions\0229\n\nocr_co" + + "nfig\030\001 \001(\0132%.google.cloud.documentai.v1." + + "OcrConfig\"\207\003\n\016ProcessRequest\022?\n\017inline_d" + + "ocument\030\004 \001(\0132$.google.cloud.documentai." + + "v1.DocumentH\000\022?\n\014raw_document\030\005 \001(\0132\'.go" + + "ogle.cloud.documentai.v1.RawDocumentH\000\022?" + + "\n\014gcs_document\030\010 \001(\0132\'.google.cloud.docu" + + "mentai.v1.GcsDocumentH\000\022\030\n\004name\030\001 \001(\tB\n\342" + + "A\001\002\372A\003\n\001*\022\031\n\021skip_human_review\030\003 \001(\010\022.\n\n" + + "field_mask\030\006 \001(\0132\032.google.protobuf.Field" + + "Mask\022C\n\017process_options\030\007 \001(\0132*.google.c" + + "loud.documentai.v1.ProcessOptionsB\010\n\006sou" + + "rce\"\356\001\n\021HumanReviewStatus\022B\n\005state\030\001 \001(\016" + + "23.google.cloud.documentai.v1.HumanRevie" + + "wStatus.State\022\025\n\rstate_message\030\002 \001(\t\022\036\n\026" + + "human_review_operation\030\003 \001(\t\"^\n\005State\022\025\n" + + "\021STATE_UNSPECIFIED\020\000\022\013\n\007SKIPPED\020\001\022\025\n\021VAL" + + "IDATION_PASSED\020\002\022\017\n\013IN_PROGRESS\020\003\022\t\n\005ERR" + + "OR\020\004\"\225\001\n\017ProcessResponse\0226\n\010document\030\001 \001" + + "(\0132$.google.cloud.documentai.v1.Document" + + "\022J\n\023human_review_status\030\003 \001(\0132-.google.c" + + "loud.documentai.v1.HumanReviewStatus\"\261\002\n" + + "\023BatchProcessRequest\022\030\n\004name\030\001 \001(\tB\n\342A\001\002" + + "\372A\003\n\001*\022N\n\017input_documents\030\005 \001(\01325.google" + + ".cloud.documentai.v1.BatchDocumentsInput" + + "Config\022P\n\026document_output_config\030\006 \001(\01320" + + ".google.cloud.documentai.v1.DocumentOutp" + + "utConfig\022\031\n\021skip_human_review\030\004 \001(\010\022C\n\017p" + + "rocess_options\030\007 \001(\0132*.google.cloud.docu" + + "mentai.v1.ProcessOptions\"\026\n\024BatchProcess" + "Response\"\377\004\n\024BatchProcessMetadata\022E\n\005sta" + "te\030\001 \001(\01626.google.cloud.documentai.v1.Ba" + "tchProcessMetadata.State\022\025\n\rstate_messag" @@ -377,217 +392,227 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "sponse\"r\n\"SetDefaultProcessorVersionMeta" + "data\022L\n\017common_metadata\030\001 \001(\01323.google.c" + "loud.documentai.v1.CommonOperationMetada" - + "ta\"\252\004\n\034TrainProcessorVersionRequest\022<\n\006p" - + "arent\030\001 \001(\tB,\342A\001\002\372A%\n#documentai.googlea" - + "pis.com/Processor\022M\n\021processor_version\030\002" - + " \001(\0132,.google.cloud.documentai.v1.Proces" - + "sorVersionB\004\342A\001\002\022I\n\017document_schema\030\n \001(" - + "\0132*.google.cloud.documentai.v1.DocumentS" - + "chemaB\004\342A\001\001\022\\\n\ninput_data\030\004 \001(\0132B.google" - + ".cloud.documentai.v1.TrainProcessorVersi" - + "onRequest.InputDataB\004\342A\001\001\022$\n\026base_proces" - + "sor_version\030\010 \001(\tB\004\342A\001\001\032\255\001\n\tInputData\022Q\n" - + "\022training_documents\030\003 \001(\01325.google.cloud" - + ".documentai.v1.BatchDocumentsInputConfig" - + "\022M\n\016test_documents\030\004 \001(\01325.google.cloud." - + "documentai.v1.BatchDocumentsInputConfig\"" - + ":\n\035TrainProcessorVersionResponse\022\031\n\021proc" - + "essor_version\030\001 \001(\t\"\367\003\n\035TrainProcessorVe" - + "rsionMetadata\022L\n\017common_metadata\030\001 \001(\01323" - + ".google.cloud.documentai.v1.CommonOperat" - + "ionMetadata\022p\n\033training_dataset_validati" - + "on\030\002 \001(\0132K.google.cloud.documentai.v1.Tr" - + "ainProcessorVersionMetadata.DatasetValid" - + "ation\022l\n\027test_dataset_validation\030\003 \001(\0132K" + + "ta\"\305\007\n\034TrainProcessorVersionRequest\022\206\001\n\"" + + "custom_document_extraction_options\030\005 \001(\013" + + "2X.google.cloud.documentai.v1.TrainProce" + + "ssorVersionRequest.CustomDocumentExtract" + + "ionOptionsH\000\022<\n\006parent\030\001 \001(\tB,\342A\001\002\372A%\n#d" + + "ocumentai.googleapis.com/Processor\022M\n\021pr" + + "ocessor_version\030\002 \001(\0132,.google.cloud.doc" + + "umentai.v1.ProcessorVersionB\004\342A\001\002\022I\n\017doc" + + "ument_schema\030\n \001(\0132*.google.cloud.docume" + + "ntai.v1.DocumentSchemaB\004\342A\001\001\022\\\n\ninput_da" + + "ta\030\004 \001(\0132B.google.cloud.documentai.v1.Tr" + + "ainProcessorVersionRequest.InputDataB\004\342A" + + "\001\001\022$\n\026base_processor_version\030\010 \001(\tB\004\342A\001\001" + + "\032\255\001\n\tInputData\022Q\n\022training_documents\030\003 \001" + + "(\01325.google.cloud.documentai.v1.BatchDoc" + + "umentsInputConfig\022M\n\016test_documents\030\004 \001(" + + "\01325.google.cloud.documentai.v1.BatchDocu" + + "mentsInputConfig\032\374\001\n\037CustomDocumentExtra" + + "ctionOptions\022\200\001\n\017training_method\030\003 \001(\0162g" + ".google.cloud.documentai.v1.TrainProcess" - + "orVersionMetadata.DatasetValidation\032\247\001\n\021" - + "DatasetValidation\022\034\n\024document_error_coun" - + "t\030\003 \001(\005\022\033\n\023dataset_error_count\030\004 \001(\005\022+\n\017" - + "document_errors\030\001 \003(\0132\022.google.rpc.Statu" - + "s\022*\n\016dataset_errors\030\002 \003(\0132\022.google.rpc.S" - + "tatus\"\217\003\n\025ReviewDocumentRequest\022?\n\017inlin" - + "e_document\030\004 \001(\0132$.google.cloud.document" - + "ai.v1.DocumentH\000\022Q\n\023human_review_config\030" - + "\001 \001(\tB4\342A\001\002\372A-\n+documentai.googleapis.co" - + "m/HumanReviewConfig\022 \n\030enable_schema_val" - + "idation\030\003 \001(\010\022L\n\010priority\030\005 \001(\0162:.google" - + ".cloud.documentai.v1.ReviewDocumentReque" - + "st.Priority\022C\n\017document_schema\030\006 \001(\0132*.g" - + "oogle.cloud.documentai.v1.DocumentSchema" - + "\"#\n\010Priority\022\013\n\007DEFAULT\020\000\022\n\n\006URGENT\020\001B\010\n" - + "\006source\"\321\001\n\026ReviewDocumentResponse\022\027\n\017gc" - + "s_destination\030\001 \001(\t\022G\n\005state\030\002 \001(\01628.goo" - + "gle.cloud.documentai.v1.ReviewDocumentRe" - + "sponse.State\022\030\n\020rejection_reason\030\003 \001(\t\";" - + "\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n\010REJECT" - + "ED\020\001\022\r\n\tSUCCEEDED\020\002\"\204\001\n\037ReviewDocumentOp" - + "erationMetadata\022L\n\017common_metadata\030\005 \001(\013" - + "23.google.cloud.documentai.v1.CommonOper" - + "ationMetadata\022\023\n\013question_id\030\006 \001(\t\"\314\001\n\037E" - + "valuateProcessorVersionRequest\022N\n\021proces" - + "sor_version\030\001 \001(\tB3\342A\001\002\372A,\n*documentai.g" - + "oogleapis.com/ProcessorVersion\022Y\n\024evalua" - + "tion_documents\030\003 \001(\01325.google.cloud.docu" - + "mentai.v1.BatchDocumentsInputConfigB\004\342A\001" - + "\001\"p\n EvaluateProcessorVersionMetadata\022L\n" - + "\017common_metadata\030\001 \001(\01323.google.cloud.do" - + "cumentai.v1.CommonOperationMetadata\"6\n E" - + "valuateProcessorVersionResponse\022\022\n\nevalu" - + "ation\030\002 \001(\t\"S\n\024GetEvaluationRequest\022;\n\004n" - + "ame\030\001 \001(\tB-\342A\001\002\372A&\n$documentai.googleapi" - + "s.com/Evaluation\"\204\001\n\026ListEvaluationsRequ" - + "est\022C\n\006parent\030\001 \001(\tB3\342A\001\002\372A,\n*documentai" - + ".googleapis.com/ProcessorVersion\022\021\n\tpage" - + "_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"o\n\027ListE" - + "valuationsResponse\022;\n\013evaluations\030\001 \003(\0132" - + "&.google.cloud.documentai.v1.Evaluation\022" - + "\027\n\017next_page_token\030\002 \001(\t2\234*\n\030DocumentPro" - + "cessorService\022\207\002\n\017ProcessDocument\022*.goog" - + "le.cloud.documentai.v1.ProcessRequest\032+." - + "google.cloud.documentai.v1.ProcessRespon" - + "se\"\232\001\332A\004name\202\323\344\223\002\214\001\"6/v1/{name=projects/" - + "*/locations/*/processors/*}:process:\001*ZO" - + "\"J/v1/{name=projects/*/locations/*/proce" - + "ssors/*/processorVersions/*}:process:\001*\022" - + "\275\002\n\025BatchProcessDocuments\022/.google.cloud" - + ".documentai.v1.BatchProcessRequest\032\035.goo" - + "gle.longrunning.Operation\"\323\001\312A,\n\024BatchPr" - + "ocessResponse\022\024BatchProcessMetadata\332A\004na" - + "me\202\323\344\223\002\226\001\";/v1/{name=projects/*/location" - + "s/*/processors/*}:batchProcess:\001*ZT\"O/v1" + + "orVersionRequest.CustomDocumentExtractio" + + "nOptions.TrainingMethod\"V\n\016TrainingMetho" + + "d\022\037\n\033TRAINING_METHOD_UNSPECIFIED\020\000\022\017\n\013MO" + + "DEL_BASED\020\001\022\022\n\016TEMPLATE_BASED\020\002B\021\n\017proce" + + "ssor_flags\":\n\035TrainProcessorVersionRespo" + + "nse\022\031\n\021processor_version\030\001 \001(\t\"\367\003\n\035Train" + + "ProcessorVersionMetadata\022L\n\017common_metad" + + "ata\030\001 \001(\01323.google.cloud.documentai.v1.C" + + "ommonOperationMetadata\022p\n\033training_datas" + + "et_validation\030\002 \001(\0132K.google.cloud.docum" + + "entai.v1.TrainProcessorVersionMetadata.D" + + "atasetValidation\022l\n\027test_dataset_validat" + + "ion\030\003 \001(\0132K.google.cloud.documentai.v1.T" + + "rainProcessorVersionMetadata.DatasetVali" + + "dation\032\247\001\n\021DatasetValidation\022\034\n\024document" + + "_error_count\030\003 \001(\005\022\033\n\023dataset_error_coun" + + "t\030\004 \001(\005\022+\n\017document_errors\030\001 \003(\0132\022.googl" + + "e.rpc.Status\022*\n\016dataset_errors\030\002 \003(\0132\022.g" + + "oogle.rpc.Status\"\217\003\n\025ReviewDocumentReque" + + "st\022?\n\017inline_document\030\004 \001(\0132$.google.clo" + + "ud.documentai.v1.DocumentH\000\022Q\n\023human_rev" + + "iew_config\030\001 \001(\tB4\342A\001\002\372A-\n+documentai.go" + + "ogleapis.com/HumanReviewConfig\022 \n\030enable" + + "_schema_validation\030\003 \001(\010\022L\n\010priority\030\005 \001" + + "(\0162:.google.cloud.documentai.v1.ReviewDo" + + "cumentRequest.Priority\022C\n\017document_schem" + + "a\030\006 \001(\0132*.google.cloud.documentai.v1.Doc" + + "umentSchema\"#\n\010Priority\022\013\n\007DEFAULT\020\000\022\n\n\006" + + "URGENT\020\001B\010\n\006source\"\321\001\n\026ReviewDocumentRes" + + "ponse\022\027\n\017gcs_destination\030\001 \001(\t\022G\n\005state\030" + + "\002 \001(\01628.google.cloud.documentai.v1.Revie" + + "wDocumentResponse.State\022\030\n\020rejection_rea" + + "son\030\003 \001(\t\";\n\005State\022\025\n\021STATE_UNSPECIFIED\020" + + "\000\022\014\n\010REJECTED\020\001\022\r\n\tSUCCEEDED\020\002\"\204\001\n\037Revie" + + "wDocumentOperationMetadata\022L\n\017common_met" + + "adata\030\005 \001(\01323.google.cloud.documentai.v1" + + ".CommonOperationMetadata\022\023\n\013question_id\030" + + "\006 \001(\t\"\314\001\n\037EvaluateProcessorVersionReques" + + "t\022N\n\021processor_version\030\001 \001(\tB3\342A\001\002\372A,\n*d" + + "ocumentai.googleapis.com/ProcessorVersio" + + "n\022Y\n\024evaluation_documents\030\003 \001(\01325.google" + + ".cloud.documentai.v1.BatchDocumentsInput" + + "ConfigB\004\342A\001\001\"p\n EvaluateProcessorVersion" + + "Metadata\022L\n\017common_metadata\030\001 \001(\01323.goog" + + "le.cloud.documentai.v1.CommonOperationMe" + + "tadata\"6\n EvaluateProcessorVersionRespon" + + "se\022\022\n\nevaluation\030\002 \001(\t\"S\n\024GetEvaluationR" + + "equest\022;\n\004name\030\001 \001(\tB-\342A\001\002\372A&\n$documenta" + + "i.googleapis.com/Evaluation\"\204\001\n\026ListEval" + + "uationsRequest\022C\n\006parent\030\001 \001(\tB3\342A\001\002\372A,\n" + + "*documentai.googleapis.com/ProcessorVers" + + "ion\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001" + + "(\t\"o\n\027ListEvaluationsResponse\022;\n\013evaluat" + + "ions\030\001 \003(\0132&.google.cloud.documentai.v1." + + "Evaluation\022\027\n\017next_page_token\030\002 \001(\t2\234*\n\030" + + "DocumentProcessorService\022\207\002\n\017ProcessDocu" + + "ment\022*.google.cloud.documentai.v1.Proces" + + "sRequest\032+.google.cloud.documentai.v1.Pr" + + "ocessResponse\"\232\001\332A\004name\202\323\344\223\002\214\001\"6/v1/{nam" + + "e=projects/*/locations/*/processors/*}:p" + + "rocess:\001*ZO\"J/v1/{name=projects/*/locati" + + "ons/*/processors/*/processorVersions/*}:" + + "process:\001*\022\275\002\n\025BatchProcessDocuments\022/.g" + + "oogle.cloud.documentai.v1.BatchProcessRe" + + "quest\032\035.google.longrunning.Operation\"\323\001\312" + + "A,\n\024BatchProcessResponse\022\024BatchProcessMe" + + "tadata\332A\004name\202\323\344\223\002\226\001\";/v1/{name=projects" + + "/*/locations/*/processors/*}:batchProces" + + "s:\001*ZT\"O/v1/{name=projects/*/locations/*" + + "/processors/*/processorVersions/*}:batch" + + "Process:\001*\022\320\001\n\023FetchProcessorTypes\0226.goo" + + "gle.cloud.documentai.v1.FetchProcessorTy" + + "pesRequest\0327.google.cloud.documentai.v1." + + "FetchProcessorTypesResponse\"H\332A\006parent\202\323" + + "\344\223\0029\0227/v1/{parent=projects/*/locations/*" + + "}:fetchProcessorTypes\022\310\001\n\022ListProcessorT" + + "ypes\0225.google.cloud.documentai.v1.ListPr" + + "ocessorTypesRequest\0326.google.cloud.docum" + + "entai.v1.ListProcessorTypesResponse\"C\332A\006" + + "parent\202\323\344\223\0024\0222/v1/{parent=projects/*/loc" + + "ations/*}/processorTypes\022\265\001\n\020GetProcesso" + + "rType\0223.google.cloud.documentai.v1.GetPr" + + "ocessorTypeRequest\032).google.cloud.docume" + + "ntai.v1.ProcessorType\"A\332A\004name\202\323\344\223\0024\0222/v" + + "1/{name=projects/*/locations/*/processor" + + "Types/*}\022\270\001\n\016ListProcessors\0221.google.clo" + + "ud.documentai.v1.ListProcessorsRequest\0322" + + ".google.cloud.documentai.v1.ListProcesso" + + "rsResponse\"?\332A\006parent\202\323\344\223\0020\022./v1/{parent" + + "=projects/*/locations/*}/processors\022\245\001\n\014" + + "GetProcessor\022/.google.cloud.documentai.v" + + "1.GetProcessorRequest\032%.google.cloud.doc" + + "umentai.v1.Processor\"=\332A\004name\202\323\344\223\0020\022./v1" + "/{name=projects/*/locations/*/processors" - + "/*/processorVersions/*}:batchProcess:\001*\022" - + "\320\001\n\023FetchProcessorTypes\0226.google.cloud.d" - + "ocumentai.v1.FetchProcessorTypesRequest\032" - + "7.google.cloud.documentai.v1.FetchProces" - + "sorTypesResponse\"H\332A\006parent\202\323\344\223\0029\0227/v1/{" - + "parent=projects/*/locations/*}:fetchProc" - + "essorTypes\022\310\001\n\022ListProcessorTypes\0225.goog" - + "le.cloud.documentai.v1.ListProcessorType" - + "sRequest\0326.google.cloud.documentai.v1.Li" - + "stProcessorTypesResponse\"C\332A\006parent\202\323\344\223\002" - + "4\0222/v1/{parent=projects/*/locations/*}/p" - + "rocessorTypes\022\265\001\n\020GetProcessorType\0223.goo" - + "gle.cloud.documentai.v1.GetProcessorType" - + "Request\032).google.cloud.documentai.v1.Pro" - + "cessorType\"A\332A\004name\202\323\344\223\0024\0222/v1/{name=pro" - + "jects/*/locations/*/processorTypes/*}\022\270\001" - + "\n\016ListProcessors\0221.google.cloud.document" - + "ai.v1.ListProcessorsRequest\0322.google.clo" - + "ud.documentai.v1.ListProcessorsResponse\"" - + "?\332A\006parent\202\323\344\223\0020\022./v1/{parent=projects/*" - + "/locations/*}/processors\022\245\001\n\014GetProcesso" - + "r\022/.google.cloud.documentai.v1.GetProces" - + "sorRequest\032%.google.cloud.documentai.v1." - + "Processor\"=\332A\004name\202\323\344\223\0020\022./v1/{name=proj" - + "ects/*/locations/*/processors/*}\022\242\002\n\025Tra" - + "inProcessorVersion\0228.google.cloud.docume" - + "ntai.v1.TrainProcessorVersionRequest\032\035.g" - + "oogle.longrunning.Operation\"\257\001\312A>\n\035Train" - + "ProcessorVersionResponse\022\035TrainProcessor" - + "VersionMetadata\332A\030parent,processor_versi" - + "on\202\323\344\223\002M\"H/v1/{parent=projects/*/locatio" - + "ns/*/processors/*}/processorVersions:tra" - + "in:\001*\022\316\001\n\023GetProcessorVersion\0226.google.c" - + "loud.documentai.v1.GetProcessorVersionRe" - + "quest\032,.google.cloud.documentai.v1.Proce" - + "ssorVersion\"Q\332A\004name\202\323\344\223\002D\022B/v1/{name=pr" - + "ojects/*/locations/*/processors/*/proces" - + "sorVersions/*}\022\341\001\n\025ListProcessorVersions" - + "\0228.google.cloud.documentai.v1.ListProces" - + "sorVersionsRequest\0329.google.cloud.docume" - + "ntai.v1.ListProcessorVersionsResponse\"S\332" - + "A\006parent\202\323\344\223\002D\022B/v1/{parent=projects/*/l" - + "ocations/*/processors/*}/processorVersio" - + "ns\022\200\002\n\026DeleteProcessorVersion\0229.google.c" - + "loud.documentai.v1.DeleteProcessorVersio" - + "nRequest\032\035.google.longrunning.Operation\"" - + "\213\001\312A7\n\025google.protobuf.Empty\022\036DeleteProc" - + "essorVersionMetadata\332A\004name\202\323\344\223\002D*B/v1/{" - + "name=projects/*/locations/*/processors/*" - + "/processorVersions/*}\022\223\002\n\026DeployProcesso" - + "rVersion\0229.google.cloud.documentai.v1.De" - + "ployProcessorVersionRequest\032\035.google.lon" - + "grunning.Operation\"\236\001\312A@\n\036DeployProcesso" - + "rVersionResponse\022\036DeployProcessorVersion" - + "Metadata\332A\004name\202\323\344\223\002N\"I/v1/{name=project" - + "s/*/locations/*/processors/*/processorVe" - + "rsions/*}:deploy:\001*\022\235\002\n\030UndeployProcesso" - + "rVersion\022;.google.cloud.documentai.v1.Un" - + "deployProcessorVersionRequest\032\035.google.l" - + "ongrunning.Operation\"\244\001\312AD\n UndeployProc" - + "essorVersionResponse\022 UndeployProcessorV" - + "ersionMetadata\332A\004name\202\323\344\223\002P\"K/v1/{name=p" - + "rojects/*/locations/*/processors/*/proce" - + "ssorVersions/*}:undeploy:\001*\022\302\001\n\017CreatePr" - + "ocessor\0222.google.cloud.documentai.v1.Cre" - + "ateProcessorRequest\032%.google.cloud.docum" - + "entai.v1.Processor\"T\332A\020parent,processor\202" - + "\323\344\223\002;\"./v1/{parent=projects/*/locations/" - + "*}/processors:\tprocessor\022\326\001\n\017DeleteProce" - + "ssor\0222.google.cloud.documentai.v1.Delete" - + "ProcessorRequest\032\035.google.longrunning.Op" - + "eration\"p\312A0\n\025google.protobuf.Empty\022\027Del" - + "eteProcessorMetadata\332A\004name\202\323\344\223\0020*./v1/{" - + "name=projects/*/locations/*/processors/*" - + "}\022\333\001\n\017EnableProcessor\0222.google.cloud.doc" - + "umentai.v1.EnableProcessorRequest\032\035.goog" - + "le.longrunning.Operation\"u\312A2\n\027EnablePro" - + "cessorResponse\022\027EnableProcessorMetadata\202" - + "\323\344\223\002:\"5/v1/{name=projects/*/locations/*/" - + "processors/*}:enable:\001*\022\340\001\n\020DisableProce" - + "ssor\0223.google.cloud.documentai.v1.Disabl" - + "eProcessorRequest\032\035.google.longrunning.O" - + "peration\"x\312A4\n\030DisableProcessorResponse\022" - + "\030DisableProcessorMetadata\202\323\344\223\002;\"6/v1/{na" - + "me=projects/*/locations/*/processors/*}:" - + "disable:\001*\022\241\002\n\032SetDefaultProcessorVersio" - + "n\022=.google.cloud.documentai.v1.SetDefaul" - + "tProcessorVersionRequest\032\035.google.longru" - + "nning.Operation\"\244\001\312AH\n\"SetDefaultProcess" - + "orVersionResponse\022\"SetDefaultProcessorVe" - + "rsionMetadata\202\323\344\223\002S\"N/v1/{processor=proj" - + "ects/*/locations/*/processors/*}:setDefa" - + "ultProcessorVersion:\001*\022\240\002\n\016ReviewDocumen" - + "t\0221.google.cloud.documentai.v1.ReviewDoc" - + "umentRequest\032\035.google.longrunning.Operat" - + "ion\"\273\001\312A9\n\026ReviewDocumentResponse\022\037Revie" - + "wDocumentOperationMetadata\332A\023human_revie" - + "w_config\202\323\344\223\002c\"^/v1/{human_review_config" - + "=projects/*/locations/*/processors/*/hum" - + "anReviewConfig}:reviewDocument:\001*\022\307\002\n\030Ev" - + "aluateProcessorVersion\022;.google.cloud.do" - + "cumentai.v1.EvaluateProcessorVersionRequ" - + "est\032\035.google.longrunning.Operation\"\316\001\312AD" - + "\n EvaluateProcessorVersionResponse\022 Eval" - + "uateProcessorVersionMetadata\332A\021processor" - + "_version\202\323\344\223\002m\"h/v1/{processor_version=p" - + "rojects/*/locations/*/processors/*/proce" - + "ssorVersions/*}:evaluateProcessorVersion" - + ":\001*\022\312\001\n\rGetEvaluation\0220.google.cloud.doc" - + "umentai.v1.GetEvaluationRequest\032&.google" - + ".cloud.documentai.v1.Evaluation\"_\332A\004name" - + "\202\323\344\223\002R\022P/v1/{name=projects/*/locations/*" - + "/processors/*/processorVersions/*/evalua" - + "tions/*}\022\335\001\n\017ListEvaluations\0222.google.cl" - + "oud.documentai.v1.ListEvaluationsRequest" - + "\0323.google.cloud.documentai.v1.ListEvalua" - + "tionsResponse\"a\332A\006parent\202\323\344\223\002R\022P/v1/{par" - + "ent=projects/*/locations/*/processors/*/" - + "processorVersions/*}/evaluations\032M\312A\031doc" - + "umentai.googleapis.com\322A.https://www.goo" - + "gleapis.com/auth/cloud-platformB\252\003\n\036com." - + "google.cloud.documentai.v1B\032DocumentAiPr" - + "ocessorServiceP\001Z>cloud.google.com/go/do" - + "cumentai/apiv1/documentaipb;documentaipb" - + "\252\002\032Google.Cloud.DocumentAI.V1\312\002\032Google\\C" - + "loud\\DocumentAI\\V1\352\002\035Google::Cloud::Docu" - + "mentAI::V1\352A\177\n+documentai.googleapis.com" - + "/HumanReviewConfig\022Pprojects/{project}/l" - + "ocations/{location}/processors/{processo" - + "r}/humanReviewConfig\352AM\n\"documentai.goog" - + "leapis.com/Location\022\'projects/{project}/" - + "locations/{location}b\006proto3" + + "/*}\022\242\002\n\025TrainProcessorVersion\0228.google.c" + + "loud.documentai.v1.TrainProcessorVersion" + + "Request\032\035.google.longrunning.Operation\"\257" + + "\001\312A>\n\035TrainProcessorVersionResponse\022\035Tra" + + "inProcessorVersionMetadata\332A\030parent,proc" + + "essor_version\202\323\344\223\002M\"H/v1/{parent=project" + + "s/*/locations/*/processors/*}/processorV" + + "ersions:train:\001*\022\316\001\n\023GetProcessorVersion" + + "\0226.google.cloud.documentai.v1.GetProcess" + + "orVersionRequest\032,.google.cloud.document" + + "ai.v1.ProcessorVersion\"Q\332A\004name\202\323\344\223\002D\022B/" + + "v1/{name=projects/*/locations/*/processo" + + "rs/*/processorVersions/*}\022\341\001\n\025ListProces" + + "sorVersions\0228.google.cloud.documentai.v1" + + ".ListProcessorVersionsRequest\0329.google.c" + + "loud.documentai.v1.ListProcessorVersions" + + "Response\"S\332A\006parent\202\323\344\223\002D\022B/v1/{parent=p" + + "rojects/*/locations/*/processors/*}/proc" + + "essorVersions\022\200\002\n\026DeleteProcessorVersion" + + "\0229.google.cloud.documentai.v1.DeleteProc" + + "essorVersionRequest\032\035.google.longrunning" + + ".Operation\"\213\001\312A7\n\025google.protobuf.Empty\022" + + "\036DeleteProcessorVersionMetadata\332A\004name\202\323" + + "\344\223\002D*B/v1/{name=projects/*/locations/*/p" + + "rocessors/*/processorVersions/*}\022\223\002\n\026Dep" + + "loyProcessorVersion\0229.google.cloud.docum" + + "entai.v1.DeployProcessorVersionRequest\032\035" + + ".google.longrunning.Operation\"\236\001\312A@\n\036Dep" + + "loyProcessorVersionResponse\022\036DeployProce" + + "ssorVersionMetadata\332A\004name\202\323\344\223\002N\"I/v1/{n" + + "ame=projects/*/locations/*/processors/*/" + + "processorVersions/*}:deploy:\001*\022\235\002\n\030Undep" + + "loyProcessorVersion\022;.google.cloud.docum" + + "entai.v1.UndeployProcessorVersionRequest" + + "\032\035.google.longrunning.Operation\"\244\001\312AD\n U" + + "ndeployProcessorVersionResponse\022 Undeplo" + + "yProcessorVersionMetadata\332A\004name\202\323\344\223\002P\"K" + + "/v1/{name=projects/*/locations/*/process" + + "ors/*/processorVersions/*}:undeploy:\001*\022\302" + + "\001\n\017CreateProcessor\0222.google.cloud.docume" + + "ntai.v1.CreateProcessorRequest\032%.google." + + "cloud.documentai.v1.Processor\"T\332A\020parent" + + ",processor\202\323\344\223\002;\"./v1/{parent=projects/*" + + "/locations/*}/processors:\tprocessor\022\326\001\n\017" + + "DeleteProcessor\0222.google.cloud.documenta" + + "i.v1.DeleteProcessorRequest\032\035.google.lon" + + "grunning.Operation\"p\312A0\n\025google.protobuf" + + ".Empty\022\027DeleteProcessorMetadata\332A\004name\202\323" + + "\344\223\0020*./v1/{name=projects/*/locations/*/p" + + "rocessors/*}\022\333\001\n\017EnableProcessor\0222.googl" + + "e.cloud.documentai.v1.EnableProcessorReq" + + "uest\032\035.google.longrunning.Operation\"u\312A2" + + "\n\027EnableProcessorResponse\022\027EnableProcess" + + "orMetadata\202\323\344\223\002:\"5/v1/{name=projects/*/l" + + "ocations/*/processors/*}:enable:\001*\022\340\001\n\020D" + + "isableProcessor\0223.google.cloud.documenta" + + "i.v1.DisableProcessorRequest\032\035.google.lo" + + "ngrunning.Operation\"x\312A4\n\030DisableProcess" + + "orResponse\022\030DisableProcessorMetadata\202\323\344\223" + + "\002;\"6/v1/{name=projects/*/locations/*/pro" + + "cessors/*}:disable:\001*\022\241\002\n\032SetDefaultProc" + + "essorVersion\022=.google.cloud.documentai.v" + + "1.SetDefaultProcessorVersionRequest\032\035.go" + + "ogle.longrunning.Operation\"\244\001\312AH\n\"SetDef" + + "aultProcessorVersionResponse\022\"SetDefault" + + "ProcessorVersionMetadata\202\323\344\223\002S\"N/v1/{pro" + + "cessor=projects/*/locations/*/processors" + + "/*}:setDefaultProcessorVersion:\001*\022\240\002\n\016Re" + + "viewDocument\0221.google.cloud.documentai.v" + + "1.ReviewDocumentRequest\032\035.google.longrun" + + "ning.Operation\"\273\001\312A9\n\026ReviewDocumentResp" + + "onse\022\037ReviewDocumentOperationMetadata\332A\023" + + "human_review_config\202\323\344\223\002c\"^/v1/{human_re" + + "view_config=projects/*/locations/*/proce" + + "ssors/*/humanReviewConfig}:reviewDocumen" + + "t:\001*\022\307\002\n\030EvaluateProcessorVersion\022;.goog" + + "le.cloud.documentai.v1.EvaluateProcessor" + + "VersionRequest\032\035.google.longrunning.Oper" + + "ation\"\316\001\312AD\n EvaluateProcessorVersionRes" + + "ponse\022 EvaluateProcessorVersionMetadata\332" + + "A\021processor_version\202\323\344\223\002m\"h/v1/{processo" + + "r_version=projects/*/locations/*/process" + + "ors/*/processorVersions/*}:evaluateProce" + + "ssorVersion:\001*\022\312\001\n\rGetEvaluation\0220.googl" + + "e.cloud.documentai.v1.GetEvaluationReque" + + "st\032&.google.cloud.documentai.v1.Evaluati" + + "on\"_\332A\004name\202\323\344\223\002R\022P/v1/{name=projects/*/" + + "locations/*/processors/*/processorVersio" + + "ns/*/evaluations/*}\022\335\001\n\017ListEvaluations\022" + + "2.google.cloud.documentai.v1.ListEvaluat" + + "ionsRequest\0323.google.cloud.documentai.v1" + + ".ListEvaluationsResponse\"a\332A\006parent\202\323\344\223\002" + + "R\022P/v1/{parent=projects/*/locations/*/pr" + + "ocessors/*/processorVersions/*}/evaluati" + + "ons\032M\312A\031documentai.googleapis.com\322A.http" + + "s://www.googleapis.com/auth/cloud-platfo" + + "rmB\252\003\n\036com.google.cloud.documentai.v1B\032D" + + "ocumentAiProcessorServiceP\001Z>cloud.googl" + + "e.com/go/documentai/apiv1/documentaipb;d" + + "ocumentaipb\252\002\032Google.Cloud.DocumentAI.V1" + + "\312\002\032Google\\Cloud\\DocumentAI\\V1\352\002\035Google::" + + "Cloud::DocumentAI::V1\352A\177\n+documentai.goo" + + "gleapis.com/HumanReviewConfig\022Pprojects/" + + "{project}/locations/{location}/processor" + + "s/{processor}/humanReviewConfig\352AM\n\"docu" + + "mentai.googleapis.com/Location\022\'projects" + + "/{project}/locations/{location}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -610,16 +635,31 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.protobuf.TimestampProto.getDescriptor(), com.google.rpc.StatusProto.getDescriptor(), }); - internal_static_google_cloud_documentai_v1_ProcessRequest_descriptor = + internal_static_google_cloud_documentai_v1_ProcessOptions_descriptor = getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_documentai_v1_ProcessOptions_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1_ProcessOptions_descriptor, + new java.lang.String[] { + "OcrConfig", + }); + internal_static_google_cloud_documentai_v1_ProcessRequest_descriptor = + getDescriptor().getMessageTypes().get(1); internal_static_google_cloud_documentai_v1_ProcessRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_ProcessRequest_descriptor, new java.lang.String[] { - "InlineDocument", "RawDocument", "Name", "SkipHumanReview", "FieldMask", "Source", + "InlineDocument", + "RawDocument", + "GcsDocument", + "Name", + "SkipHumanReview", + "FieldMask", + "ProcessOptions", + "Source", }); internal_static_google_cloud_documentai_v1_HumanReviewStatus_descriptor = - getDescriptor().getMessageTypes().get(1); + getDescriptor().getMessageTypes().get(2); internal_static_google_cloud_documentai_v1_HumanReviewStatus_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_HumanReviewStatus_descriptor, @@ -627,7 +667,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "State", "StateMessage", "HumanReviewOperation", }); internal_static_google_cloud_documentai_v1_ProcessResponse_descriptor = - getDescriptor().getMessageTypes().get(2); + getDescriptor().getMessageTypes().get(3); internal_static_google_cloud_documentai_v1_ProcessResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_ProcessResponse_descriptor, @@ -635,21 +675,21 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Document", "HumanReviewStatus", }); internal_static_google_cloud_documentai_v1_BatchProcessRequest_descriptor = - getDescriptor().getMessageTypes().get(3); + getDescriptor().getMessageTypes().get(4); internal_static_google_cloud_documentai_v1_BatchProcessRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_BatchProcessRequest_descriptor, new java.lang.String[] { - "Name", "InputDocuments", "DocumentOutputConfig", "SkipHumanReview", + "Name", "InputDocuments", "DocumentOutputConfig", "SkipHumanReview", "ProcessOptions", }); internal_static_google_cloud_documentai_v1_BatchProcessResponse_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageTypes().get(5); internal_static_google_cloud_documentai_v1_BatchProcessResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_BatchProcessResponse_descriptor, new java.lang.String[] {}); internal_static_google_cloud_documentai_v1_BatchProcessMetadata_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageTypes().get(6); internal_static_google_cloud_documentai_v1_BatchProcessMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_BatchProcessMetadata_descriptor, @@ -667,7 +707,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "InputGcsSource", "Status", "OutputGcsDestination", "HumanReviewStatus", }); internal_static_google_cloud_documentai_v1_FetchProcessorTypesRequest_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageTypes().get(7); internal_static_google_cloud_documentai_v1_FetchProcessorTypesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_FetchProcessorTypesRequest_descriptor, @@ -675,7 +715,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", }); internal_static_google_cloud_documentai_v1_FetchProcessorTypesResponse_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(8); internal_static_google_cloud_documentai_v1_FetchProcessorTypesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_FetchProcessorTypesResponse_descriptor, @@ -683,7 +723,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ProcessorTypes", }); internal_static_google_cloud_documentai_v1_ListProcessorTypesRequest_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(9); internal_static_google_cloud_documentai_v1_ListProcessorTypesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_ListProcessorTypesRequest_descriptor, @@ -691,7 +731,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", }); internal_static_google_cloud_documentai_v1_ListProcessorTypesResponse_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(10); internal_static_google_cloud_documentai_v1_ListProcessorTypesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_ListProcessorTypesResponse_descriptor, @@ -699,7 +739,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ProcessorTypes", "NextPageToken", }); internal_static_google_cloud_documentai_v1_ListProcessorsRequest_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(11); internal_static_google_cloud_documentai_v1_ListProcessorsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_ListProcessorsRequest_descriptor, @@ -707,7 +747,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", }); internal_static_google_cloud_documentai_v1_ListProcessorsResponse_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageTypes().get(12); internal_static_google_cloud_documentai_v1_ListProcessorsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_ListProcessorsResponse_descriptor, @@ -715,7 +755,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Processors", "NextPageToken", }); internal_static_google_cloud_documentai_v1_GetProcessorTypeRequest_descriptor = - getDescriptor().getMessageTypes().get(12); + getDescriptor().getMessageTypes().get(13); internal_static_google_cloud_documentai_v1_GetProcessorTypeRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_GetProcessorTypeRequest_descriptor, @@ -723,7 +763,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_documentai_v1_GetProcessorRequest_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageTypes().get(14); internal_static_google_cloud_documentai_v1_GetProcessorRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_GetProcessorRequest_descriptor, @@ -731,7 +771,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_documentai_v1_GetProcessorVersionRequest_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageTypes().get(15); internal_static_google_cloud_documentai_v1_GetProcessorVersionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_GetProcessorVersionRequest_descriptor, @@ -739,7 +779,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_documentai_v1_ListProcessorVersionsRequest_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(16); internal_static_google_cloud_documentai_v1_ListProcessorVersionsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_ListProcessorVersionsRequest_descriptor, @@ -747,7 +787,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", }); internal_static_google_cloud_documentai_v1_ListProcessorVersionsResponse_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(17); internal_static_google_cloud_documentai_v1_ListProcessorVersionsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_ListProcessorVersionsResponse_descriptor, @@ -755,7 +795,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ProcessorVersions", "NextPageToken", }); internal_static_google_cloud_documentai_v1_DeleteProcessorVersionRequest_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageTypes().get(18); internal_static_google_cloud_documentai_v1_DeleteProcessorVersionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_DeleteProcessorVersionRequest_descriptor, @@ -763,7 +803,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_documentai_v1_DeleteProcessorVersionMetadata_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageTypes().get(19); internal_static_google_cloud_documentai_v1_DeleteProcessorVersionMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_DeleteProcessorVersionMetadata_descriptor, @@ -771,7 +811,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "CommonMetadata", }); internal_static_google_cloud_documentai_v1_DeployProcessorVersionRequest_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageTypes().get(20); internal_static_google_cloud_documentai_v1_DeployProcessorVersionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_DeployProcessorVersionRequest_descriptor, @@ -779,13 +819,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_documentai_v1_DeployProcessorVersionResponse_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageTypes().get(21); internal_static_google_cloud_documentai_v1_DeployProcessorVersionResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_DeployProcessorVersionResponse_descriptor, new java.lang.String[] {}); internal_static_google_cloud_documentai_v1_DeployProcessorVersionMetadata_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageTypes().get(22); internal_static_google_cloud_documentai_v1_DeployProcessorVersionMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_DeployProcessorVersionMetadata_descriptor, @@ -793,7 +833,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "CommonMetadata", }); internal_static_google_cloud_documentai_v1_UndeployProcessorVersionRequest_descriptor = - getDescriptor().getMessageTypes().get(22); + getDescriptor().getMessageTypes().get(23); internal_static_google_cloud_documentai_v1_UndeployProcessorVersionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_UndeployProcessorVersionRequest_descriptor, @@ -801,13 +841,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_documentai_v1_UndeployProcessorVersionResponse_descriptor = - getDescriptor().getMessageTypes().get(23); + getDescriptor().getMessageTypes().get(24); internal_static_google_cloud_documentai_v1_UndeployProcessorVersionResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_UndeployProcessorVersionResponse_descriptor, new java.lang.String[] {}); internal_static_google_cloud_documentai_v1_UndeployProcessorVersionMetadata_descriptor = - getDescriptor().getMessageTypes().get(24); + getDescriptor().getMessageTypes().get(25); internal_static_google_cloud_documentai_v1_UndeployProcessorVersionMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_UndeployProcessorVersionMetadata_descriptor, @@ -815,7 +855,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "CommonMetadata", }); internal_static_google_cloud_documentai_v1_CreateProcessorRequest_descriptor = - getDescriptor().getMessageTypes().get(25); + getDescriptor().getMessageTypes().get(26); internal_static_google_cloud_documentai_v1_CreateProcessorRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_CreateProcessorRequest_descriptor, @@ -823,7 +863,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "Processor", }); internal_static_google_cloud_documentai_v1_DeleteProcessorRequest_descriptor = - getDescriptor().getMessageTypes().get(26); + getDescriptor().getMessageTypes().get(27); internal_static_google_cloud_documentai_v1_DeleteProcessorRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_DeleteProcessorRequest_descriptor, @@ -831,7 +871,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_documentai_v1_DeleteProcessorMetadata_descriptor = - getDescriptor().getMessageTypes().get(27); + getDescriptor().getMessageTypes().get(28); internal_static_google_cloud_documentai_v1_DeleteProcessorMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_DeleteProcessorMetadata_descriptor, @@ -839,7 +879,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "CommonMetadata", }); internal_static_google_cloud_documentai_v1_EnableProcessorRequest_descriptor = - getDescriptor().getMessageTypes().get(28); + getDescriptor().getMessageTypes().get(29); internal_static_google_cloud_documentai_v1_EnableProcessorRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_EnableProcessorRequest_descriptor, @@ -847,13 +887,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_documentai_v1_EnableProcessorResponse_descriptor = - getDescriptor().getMessageTypes().get(29); + getDescriptor().getMessageTypes().get(30); internal_static_google_cloud_documentai_v1_EnableProcessorResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_EnableProcessorResponse_descriptor, new java.lang.String[] {}); internal_static_google_cloud_documentai_v1_EnableProcessorMetadata_descriptor = - getDescriptor().getMessageTypes().get(30); + getDescriptor().getMessageTypes().get(31); internal_static_google_cloud_documentai_v1_EnableProcessorMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_EnableProcessorMetadata_descriptor, @@ -861,7 +901,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "CommonMetadata", }); internal_static_google_cloud_documentai_v1_DisableProcessorRequest_descriptor = - getDescriptor().getMessageTypes().get(31); + getDescriptor().getMessageTypes().get(32); internal_static_google_cloud_documentai_v1_DisableProcessorRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_DisableProcessorRequest_descriptor, @@ -869,13 +909,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_documentai_v1_DisableProcessorResponse_descriptor = - getDescriptor().getMessageTypes().get(32); + getDescriptor().getMessageTypes().get(33); internal_static_google_cloud_documentai_v1_DisableProcessorResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_DisableProcessorResponse_descriptor, new java.lang.String[] {}); internal_static_google_cloud_documentai_v1_DisableProcessorMetadata_descriptor = - getDescriptor().getMessageTypes().get(33); + getDescriptor().getMessageTypes().get(34); internal_static_google_cloud_documentai_v1_DisableProcessorMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_DisableProcessorMetadata_descriptor, @@ -883,7 +923,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "CommonMetadata", }); internal_static_google_cloud_documentai_v1_SetDefaultProcessorVersionRequest_descriptor = - getDescriptor().getMessageTypes().get(34); + getDescriptor().getMessageTypes().get(35); internal_static_google_cloud_documentai_v1_SetDefaultProcessorVersionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_SetDefaultProcessorVersionRequest_descriptor, @@ -891,13 +931,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Processor", "DefaultProcessorVersion", }); internal_static_google_cloud_documentai_v1_SetDefaultProcessorVersionResponse_descriptor = - getDescriptor().getMessageTypes().get(35); + getDescriptor().getMessageTypes().get(36); internal_static_google_cloud_documentai_v1_SetDefaultProcessorVersionResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_SetDefaultProcessorVersionResponse_descriptor, new java.lang.String[] {}); internal_static_google_cloud_documentai_v1_SetDefaultProcessorVersionMetadata_descriptor = - getDescriptor().getMessageTypes().get(36); + getDescriptor().getMessageTypes().get(37); internal_static_google_cloud_documentai_v1_SetDefaultProcessorVersionMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_SetDefaultProcessorVersionMetadata_descriptor, @@ -905,12 +945,18 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "CommonMetadata", }); internal_static_google_cloud_documentai_v1_TrainProcessorVersionRequest_descriptor = - getDescriptor().getMessageTypes().get(37); + getDescriptor().getMessageTypes().get(38); internal_static_google_cloud_documentai_v1_TrainProcessorVersionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_TrainProcessorVersionRequest_descriptor, new java.lang.String[] { - "Parent", "ProcessorVersion", "DocumentSchema", "InputData", "BaseProcessorVersion", + "CustomDocumentExtractionOptions", + "Parent", + "ProcessorVersion", + "DocumentSchema", + "InputData", + "BaseProcessorVersion", + "ProcessorFlags", }); internal_static_google_cloud_documentai_v1_TrainProcessorVersionRequest_InputData_descriptor = internal_static_google_cloud_documentai_v1_TrainProcessorVersionRequest_descriptor @@ -922,8 +968,18 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "TrainingDocuments", "TestDocuments", }); + internal_static_google_cloud_documentai_v1_TrainProcessorVersionRequest_CustomDocumentExtractionOptions_descriptor = + internal_static_google_cloud_documentai_v1_TrainProcessorVersionRequest_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_documentai_v1_TrainProcessorVersionRequest_CustomDocumentExtractionOptions_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1_TrainProcessorVersionRequest_CustomDocumentExtractionOptions_descriptor, + new java.lang.String[] { + "TrainingMethod", + }); internal_static_google_cloud_documentai_v1_TrainProcessorVersionResponse_descriptor = - getDescriptor().getMessageTypes().get(38); + getDescriptor().getMessageTypes().get(39); internal_static_google_cloud_documentai_v1_TrainProcessorVersionResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_TrainProcessorVersionResponse_descriptor, @@ -931,7 +987,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ProcessorVersion", }); internal_static_google_cloud_documentai_v1_TrainProcessorVersionMetadata_descriptor = - getDescriptor().getMessageTypes().get(39); + getDescriptor().getMessageTypes().get(40); internal_static_google_cloud_documentai_v1_TrainProcessorVersionMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_TrainProcessorVersionMetadata_descriptor, @@ -949,7 +1005,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DocumentErrorCount", "DatasetErrorCount", "DocumentErrors", "DatasetErrors", }); internal_static_google_cloud_documentai_v1_ReviewDocumentRequest_descriptor = - getDescriptor().getMessageTypes().get(40); + getDescriptor().getMessageTypes().get(41); internal_static_google_cloud_documentai_v1_ReviewDocumentRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_ReviewDocumentRequest_descriptor, @@ -962,7 +1018,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Source", }); internal_static_google_cloud_documentai_v1_ReviewDocumentResponse_descriptor = - getDescriptor().getMessageTypes().get(41); + getDescriptor().getMessageTypes().get(42); internal_static_google_cloud_documentai_v1_ReviewDocumentResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_ReviewDocumentResponse_descriptor, @@ -970,7 +1026,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "GcsDestination", "State", "RejectionReason", }); internal_static_google_cloud_documentai_v1_ReviewDocumentOperationMetadata_descriptor = - getDescriptor().getMessageTypes().get(42); + getDescriptor().getMessageTypes().get(43); internal_static_google_cloud_documentai_v1_ReviewDocumentOperationMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_ReviewDocumentOperationMetadata_descriptor, @@ -978,7 +1034,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "CommonMetadata", "QuestionId", }); internal_static_google_cloud_documentai_v1_EvaluateProcessorVersionRequest_descriptor = - getDescriptor().getMessageTypes().get(43); + getDescriptor().getMessageTypes().get(44); internal_static_google_cloud_documentai_v1_EvaluateProcessorVersionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_EvaluateProcessorVersionRequest_descriptor, @@ -986,7 +1042,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ProcessorVersion", "EvaluationDocuments", }); internal_static_google_cloud_documentai_v1_EvaluateProcessorVersionMetadata_descriptor = - getDescriptor().getMessageTypes().get(44); + getDescriptor().getMessageTypes().get(45); internal_static_google_cloud_documentai_v1_EvaluateProcessorVersionMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_EvaluateProcessorVersionMetadata_descriptor, @@ -994,7 +1050,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "CommonMetadata", }); internal_static_google_cloud_documentai_v1_EvaluateProcessorVersionResponse_descriptor = - getDescriptor().getMessageTypes().get(45); + getDescriptor().getMessageTypes().get(46); internal_static_google_cloud_documentai_v1_EvaluateProcessorVersionResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_EvaluateProcessorVersionResponse_descriptor, @@ -1002,7 +1058,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Evaluation", }); internal_static_google_cloud_documentai_v1_GetEvaluationRequest_descriptor = - getDescriptor().getMessageTypes().get(46); + getDescriptor().getMessageTypes().get(47); internal_static_google_cloud_documentai_v1_GetEvaluationRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_GetEvaluationRequest_descriptor, @@ -1010,7 +1066,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_documentai_v1_ListEvaluationsRequest_descriptor = - getDescriptor().getMessageTypes().get(47); + getDescriptor().getMessageTypes().get(48); internal_static_google_cloud_documentai_v1_ListEvaluationsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_ListEvaluationsRequest_descriptor, @@ -1018,7 +1074,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", }); internal_static_google_cloud_documentai_v1_ListEvaluationsResponse_descriptor = - getDescriptor().getMessageTypes().get(48); + getDescriptor().getMessageTypes().get(49); internal_static_google_cloud_documentai_v1_ListEvaluationsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_ListEvaluationsResponse_descriptor, diff --git a/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/DocumentIoProto.java b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/DocumentIoProto.java index c662abacfc50..d24f94451219 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/DocumentIoProto.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/DocumentIoProto.java @@ -59,6 +59,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_documentai_v1_DocumentOutputConfig_GcsOutputConfig_ShardingConfig_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_documentai_v1_DocumentOutputConfig_GcsOutputConfig_ShardingConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1_OcrConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1_OcrConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1_OcrConfig_Hints_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1_OcrConfig_Hints_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -90,12 +98,18 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "utputConfig.GcsOutputConfig.ShardingConf" + "ig\032@\n\016ShardingConfig\022\027\n\017pages_per_shard\030" + "\001 \001(\005\022\025\n\rpages_overlap\030\002 \001(\005B\r\n\013destinat" - + "ionB\315\001\n\036com.google.cloud.documentai.v1B\017" - + "DocumentIoProtoP\001Z>cloud.google.com/go/d" - + "ocumentai/apiv1/documentaipb;documentaip" - + "b\252\002\032Google.Cloud.DocumentAI.V1\312\002\032Google\\" - + "Cloud\\DocumentAI\\V1\352\002\035Google::Cloud::Doc" - + "umentAI::V1b\006proto3" + + "ion\"\201\002\n\tOcrConfig\022:\n\005hints\030\002 \001(\0132+.googl" + + "e.cloud.documentai.v1.OcrConfig.Hints\022!\n" + + "\031enable_native_pdf_parsing\030\003 \001(\010\022#\n\033enab" + + "le_image_quality_scores\030\004 \001(\010\022\034\n\024advance" + + "d_ocr_options\030\005 \003(\t\022\025\n\renable_symbol\030\006 \001" + + "(\010\022\032\n\022compute_style_info\030\010 \001(\010\032\037\n\005Hints\022" + + "\026\n\016language_hints\030\001 \003(\tB\315\001\n\036com.google.c" + + "loud.documentai.v1B\017DocumentIoProtoP\001Z>c" + + "loud.google.com/go/documentai/apiv1/docu" + + "mentaipb;documentaipb\252\002\032Google.Cloud.Doc" + + "umentAI.V1\312\002\032Google\\Cloud\\DocumentAI\\V1\352" + + "\002\035Google::Cloud::DocumentAI::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -171,6 +185,27 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "PagesPerShard", "PagesOverlap", }); + internal_static_google_cloud_documentai_v1_OcrConfig_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_documentai_v1_OcrConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1_OcrConfig_descriptor, + new java.lang.String[] { + "Hints", + "EnableNativePdfParsing", + "EnableImageQualityScores", + "AdvancedOcrOptions", + "EnableSymbol", + "ComputeStyleInfo", + }); + internal_static_google_cloud_documentai_v1_OcrConfig_Hints_descriptor = + internal_static_google_cloud_documentai_v1_OcrConfig_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_documentai_v1_OcrConfig_Hints_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1_OcrConfig_Hints_descriptor, + new java.lang.String[] { + "LanguageHints", + }); com.google.protobuf.FieldMaskProto.getDescriptor(); } diff --git a/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/OcrConfig.java b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/OcrConfig.java new file mode 100644 index 000000000000..d28b9513fcc4 --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/OcrConfig.java @@ -0,0 +1,2291 @@ +/* + * Copyright 2023 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/v1/document_io.proto + +package com.google.cloud.documentai.v1; + +/** + * + * + *
+ * Config for Document OCR.
+ * 
+ * + * Protobuf type {@code google.cloud.documentai.v1.OcrConfig} + */ +public final class OcrConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1.OcrConfig) + OcrConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use OcrConfig.newBuilder() to construct. + private OcrConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OcrConfig() { + advancedOcrOptions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OcrConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1.DocumentIoProto + .internal_static_google_cloud_documentai_v1_OcrConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1.DocumentIoProto + .internal_static_google_cloud_documentai_v1_OcrConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1.OcrConfig.class, + com.google.cloud.documentai.v1.OcrConfig.Builder.class); + } + + public interface HintsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1.OcrConfig.Hints) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * List of BCP-47 language codes to use for OCR. In most cases, not
+     * specifying it yields the best results since it enables automatic language
+     * detection. For languages based on the Latin alphabet, setting hints is
+     * not needed. In rare cases, when the language of the text in the
+     * image is known, setting a hint will help get better results (although it
+     * will be a significant hindrance if the hint is wrong).
+     * 
+ * + * repeated string language_hints = 1; + * + * @return A list containing the languageHints. + */ + java.util.List getLanguageHintsList(); + /** + * + * + *
+     * List of BCP-47 language codes to use for OCR. In most cases, not
+     * specifying it yields the best results since it enables automatic language
+     * detection. For languages based on the Latin alphabet, setting hints is
+     * not needed. In rare cases, when the language of the text in the
+     * image is known, setting a hint will help get better results (although it
+     * will be a significant hindrance if the hint is wrong).
+     * 
+ * + * repeated string language_hints = 1; + * + * @return The count of languageHints. + */ + int getLanguageHintsCount(); + /** + * + * + *
+     * List of BCP-47 language codes to use for OCR. In most cases, not
+     * specifying it yields the best results since it enables automatic language
+     * detection. For languages based on the Latin alphabet, setting hints is
+     * not needed. In rare cases, when the language of the text in the
+     * image is known, setting a hint will help get better results (although it
+     * will be a significant hindrance if the hint is wrong).
+     * 
+ * + * repeated string language_hints = 1; + * + * @param index The index of the element to return. + * @return The languageHints at the given index. + */ + java.lang.String getLanguageHints(int index); + /** + * + * + *
+     * List of BCP-47 language codes to use for OCR. In most cases, not
+     * specifying it yields the best results since it enables automatic language
+     * detection. For languages based on the Latin alphabet, setting hints is
+     * not needed. In rare cases, when the language of the text in the
+     * image is known, setting a hint will help get better results (although it
+     * will be a significant hindrance if the hint is wrong).
+     * 
+ * + * repeated string language_hints = 1; + * + * @param index The index of the value to return. + * @return The bytes of the languageHints at the given index. + */ + com.google.protobuf.ByteString getLanguageHintsBytes(int index); + } + /** + * + * + *
+   * Hints for OCR Engine
+   * 
+ * + * Protobuf type {@code google.cloud.documentai.v1.OcrConfig.Hints} + */ + public static final class Hints extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1.OcrConfig.Hints) + HintsOrBuilder { + private static final long serialVersionUID = 0L; + // Use Hints.newBuilder() to construct. + private Hints(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Hints() { + languageHints_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Hints(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1.DocumentIoProto + .internal_static_google_cloud_documentai_v1_OcrConfig_Hints_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1.DocumentIoProto + .internal_static_google_cloud_documentai_v1_OcrConfig_Hints_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1.OcrConfig.Hints.class, + com.google.cloud.documentai.v1.OcrConfig.Hints.Builder.class); + } + + public static final int LANGUAGE_HINTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList languageHints_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+     * List of BCP-47 language codes to use for OCR. In most cases, not
+     * specifying it yields the best results since it enables automatic language
+     * detection. For languages based on the Latin alphabet, setting hints is
+     * not needed. In rare cases, when the language of the text in the
+     * image is known, setting a hint will help get better results (although it
+     * will be a significant hindrance if the hint is wrong).
+     * 
+ * + * repeated string language_hints = 1; + * + * @return A list containing the languageHints. + */ + public com.google.protobuf.ProtocolStringList getLanguageHintsList() { + return languageHints_; + } + /** + * + * + *
+     * List of BCP-47 language codes to use for OCR. In most cases, not
+     * specifying it yields the best results since it enables automatic language
+     * detection. For languages based on the Latin alphabet, setting hints is
+     * not needed. In rare cases, when the language of the text in the
+     * image is known, setting a hint will help get better results (although it
+     * will be a significant hindrance if the hint is wrong).
+     * 
+ * + * repeated string language_hints = 1; + * + * @return The count of languageHints. + */ + public int getLanguageHintsCount() { + return languageHints_.size(); + } + /** + * + * + *
+     * List of BCP-47 language codes to use for OCR. In most cases, not
+     * specifying it yields the best results since it enables automatic language
+     * detection. For languages based on the Latin alphabet, setting hints is
+     * not needed. In rare cases, when the language of the text in the
+     * image is known, setting a hint will help get better results (although it
+     * will be a significant hindrance if the hint is wrong).
+     * 
+ * + * repeated string language_hints = 1; + * + * @param index The index of the element to return. + * @return The languageHints at the given index. + */ + public java.lang.String getLanguageHints(int index) { + return languageHints_.get(index); + } + /** + * + * + *
+     * List of BCP-47 language codes to use for OCR. In most cases, not
+     * specifying it yields the best results since it enables automatic language
+     * detection. For languages based on the Latin alphabet, setting hints is
+     * not needed. In rare cases, when the language of the text in the
+     * image is known, setting a hint will help get better results (although it
+     * will be a significant hindrance if the hint is wrong).
+     * 
+ * + * repeated string language_hints = 1; + * + * @param index The index of the value to return. + * @return The bytes of the languageHints at the given index. + */ + public com.google.protobuf.ByteString getLanguageHintsBytes(int index) { + return languageHints_.getByteString(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 < languageHints_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, languageHints_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < languageHints_.size(); i++) { + dataSize += computeStringSizeNoTag(languageHints_.getRaw(i)); + } + size += dataSize; + size += 1 * getLanguageHintsList().size(); + } + size += getUnknownFields().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.v1.OcrConfig.Hints)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1.OcrConfig.Hints other = + (com.google.cloud.documentai.v1.OcrConfig.Hints) obj; + + if (!getLanguageHintsList().equals(other.getLanguageHintsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getLanguageHintsCount() > 0) { + hash = (37 * hash) + LANGUAGE_HINTS_FIELD_NUMBER; + hash = (53 * hash) + getLanguageHintsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1.OcrConfig.Hints parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1.OcrConfig.Hints 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.v1.OcrConfig.Hints parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1.OcrConfig.Hints 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.v1.OcrConfig.Hints parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1.OcrConfig.Hints parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1.OcrConfig.Hints parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1.OcrConfig.Hints 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.v1.OcrConfig.Hints parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1.OcrConfig.Hints 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.v1.OcrConfig.Hints parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1.OcrConfig.Hints 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.v1.OcrConfig.Hints 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; + } + /** + * + * + *
+     * Hints for OCR Engine
+     * 
+ * + * Protobuf type {@code google.cloud.documentai.v1.OcrConfig.Hints} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1.OcrConfig.Hints) + com.google.cloud.documentai.v1.OcrConfig.HintsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1.DocumentIoProto + .internal_static_google_cloud_documentai_v1_OcrConfig_Hints_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1.DocumentIoProto + .internal_static_google_cloud_documentai_v1_OcrConfig_Hints_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1.OcrConfig.Hints.class, + com.google.cloud.documentai.v1.OcrConfig.Hints.Builder.class); + } + + // Construct using com.google.cloud.documentai.v1.OcrConfig.Hints.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + languageHints_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1.DocumentIoProto + .internal_static_google_cloud_documentai_v1_OcrConfig_Hints_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1.OcrConfig.Hints getDefaultInstanceForType() { + return com.google.cloud.documentai.v1.OcrConfig.Hints.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1.OcrConfig.Hints build() { + com.google.cloud.documentai.v1.OcrConfig.Hints result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1.OcrConfig.Hints buildPartial() { + com.google.cloud.documentai.v1.OcrConfig.Hints result = + new com.google.cloud.documentai.v1.OcrConfig.Hints(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.documentai.v1.OcrConfig.Hints result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + languageHints_.makeImmutable(); + result.languageHints_ = languageHints_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1.OcrConfig.Hints) { + return mergeFrom((com.google.cloud.documentai.v1.OcrConfig.Hints) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.documentai.v1.OcrConfig.Hints other) { + if (other == com.google.cloud.documentai.v1.OcrConfig.Hints.getDefaultInstance()) + return this; + if (!other.languageHints_.isEmpty()) { + if (languageHints_.isEmpty()) { + languageHints_ = other.languageHints_; + bitField0_ |= 0x00000001; + } else { + ensureLanguageHintsIsMutable(); + languageHints_.addAll(other.languageHints_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + 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(); + ensureLanguageHintsIsMutable(); + languageHints_.add(s); + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList languageHints_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureLanguageHintsIsMutable() { + if (!languageHints_.isModifiable()) { + languageHints_ = new com.google.protobuf.LazyStringArrayList(languageHints_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+       * List of BCP-47 language codes to use for OCR. In most cases, not
+       * specifying it yields the best results since it enables automatic language
+       * detection. For languages based on the Latin alphabet, setting hints is
+       * not needed. In rare cases, when the language of the text in the
+       * image is known, setting a hint will help get better results (although it
+       * will be a significant hindrance if the hint is wrong).
+       * 
+ * + * repeated string language_hints = 1; + * + * @return A list containing the languageHints. + */ + public com.google.protobuf.ProtocolStringList getLanguageHintsList() { + languageHints_.makeImmutable(); + return languageHints_; + } + /** + * + * + *
+       * List of BCP-47 language codes to use for OCR. In most cases, not
+       * specifying it yields the best results since it enables automatic language
+       * detection. For languages based on the Latin alphabet, setting hints is
+       * not needed. In rare cases, when the language of the text in the
+       * image is known, setting a hint will help get better results (although it
+       * will be a significant hindrance if the hint is wrong).
+       * 
+ * + * repeated string language_hints = 1; + * + * @return The count of languageHints. + */ + public int getLanguageHintsCount() { + return languageHints_.size(); + } + /** + * + * + *
+       * List of BCP-47 language codes to use for OCR. In most cases, not
+       * specifying it yields the best results since it enables automatic language
+       * detection. For languages based on the Latin alphabet, setting hints is
+       * not needed. In rare cases, when the language of the text in the
+       * image is known, setting a hint will help get better results (although it
+       * will be a significant hindrance if the hint is wrong).
+       * 
+ * + * repeated string language_hints = 1; + * + * @param index The index of the element to return. + * @return The languageHints at the given index. + */ + public java.lang.String getLanguageHints(int index) { + return languageHints_.get(index); + } + /** + * + * + *
+       * List of BCP-47 language codes to use for OCR. In most cases, not
+       * specifying it yields the best results since it enables automatic language
+       * detection. For languages based on the Latin alphabet, setting hints is
+       * not needed. In rare cases, when the language of the text in the
+       * image is known, setting a hint will help get better results (although it
+       * will be a significant hindrance if the hint is wrong).
+       * 
+ * + * repeated string language_hints = 1; + * + * @param index The index of the value to return. + * @return The bytes of the languageHints at the given index. + */ + public com.google.protobuf.ByteString getLanguageHintsBytes(int index) { + return languageHints_.getByteString(index); + } + /** + * + * + *
+       * List of BCP-47 language codes to use for OCR. In most cases, not
+       * specifying it yields the best results since it enables automatic language
+       * detection. For languages based on the Latin alphabet, setting hints is
+       * not needed. In rare cases, when the language of the text in the
+       * image is known, setting a hint will help get better results (although it
+       * will be a significant hindrance if the hint is wrong).
+       * 
+ * + * repeated string language_hints = 1; + * + * @param index The index to set the value at. + * @param value The languageHints to set. + * @return This builder for chaining. + */ + public Builder setLanguageHints(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLanguageHintsIsMutable(); + languageHints_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * List of BCP-47 language codes to use for OCR. In most cases, not
+       * specifying it yields the best results since it enables automatic language
+       * detection. For languages based on the Latin alphabet, setting hints is
+       * not needed. In rare cases, when the language of the text in the
+       * image is known, setting a hint will help get better results (although it
+       * will be a significant hindrance if the hint is wrong).
+       * 
+ * + * repeated string language_hints = 1; + * + * @param value The languageHints to add. + * @return This builder for chaining. + */ + public Builder addLanguageHints(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLanguageHintsIsMutable(); + languageHints_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * List of BCP-47 language codes to use for OCR. In most cases, not
+       * specifying it yields the best results since it enables automatic language
+       * detection. For languages based on the Latin alphabet, setting hints is
+       * not needed. In rare cases, when the language of the text in the
+       * image is known, setting a hint will help get better results (although it
+       * will be a significant hindrance if the hint is wrong).
+       * 
+ * + * repeated string language_hints = 1; + * + * @param values The languageHints to add. + * @return This builder for chaining. + */ + public Builder addAllLanguageHints(java.lang.Iterable values) { + ensureLanguageHintsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, languageHints_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * List of BCP-47 language codes to use for OCR. In most cases, not
+       * specifying it yields the best results since it enables automatic language
+       * detection. For languages based on the Latin alphabet, setting hints is
+       * not needed. In rare cases, when the language of the text in the
+       * image is known, setting a hint will help get better results (although it
+       * will be a significant hindrance if the hint is wrong).
+       * 
+ * + * repeated string language_hints = 1; + * + * @return This builder for chaining. + */ + public Builder clearLanguageHints() { + languageHints_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+       * List of BCP-47 language codes to use for OCR. In most cases, not
+       * specifying it yields the best results since it enables automatic language
+       * detection. For languages based on the Latin alphabet, setting hints is
+       * not needed. In rare cases, when the language of the text in the
+       * image is known, setting a hint will help get better results (although it
+       * will be a significant hindrance if the hint is wrong).
+       * 
+ * + * repeated string language_hints = 1; + * + * @param value The bytes of the languageHints to add. + * @return This builder for chaining. + */ + public Builder addLanguageHintsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureLanguageHintsIsMutable(); + languageHints_.add(value); + bitField0_ |= 0x00000001; + 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.v1.OcrConfig.Hints) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1.OcrConfig.Hints) + private static final com.google.cloud.documentai.v1.OcrConfig.Hints DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1.OcrConfig.Hints(); + } + + public static com.google.cloud.documentai.v1.OcrConfig.Hints getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Hints parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1.OcrConfig.Hints getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int HINTS_FIELD_NUMBER = 2; + private com.google.cloud.documentai.v1.OcrConfig.Hints hints_; + /** + * + * + *
+   * Hints for the OCR model.
+   * 
+ * + * .google.cloud.documentai.v1.OcrConfig.Hints hints = 2; + * + * @return Whether the hints field is set. + */ + @java.lang.Override + public boolean hasHints() { + return hints_ != null; + } + /** + * + * + *
+   * Hints for the OCR model.
+   * 
+ * + * .google.cloud.documentai.v1.OcrConfig.Hints hints = 2; + * + * @return The hints. + */ + @java.lang.Override + public com.google.cloud.documentai.v1.OcrConfig.Hints getHints() { + return hints_ == null + ? com.google.cloud.documentai.v1.OcrConfig.Hints.getDefaultInstance() + : hints_; + } + /** + * + * + *
+   * Hints for the OCR model.
+   * 
+ * + * .google.cloud.documentai.v1.OcrConfig.Hints hints = 2; + */ + @java.lang.Override + public com.google.cloud.documentai.v1.OcrConfig.HintsOrBuilder getHintsOrBuilder() { + return hints_ == null + ? com.google.cloud.documentai.v1.OcrConfig.Hints.getDefaultInstance() + : hints_; + } + + public static final int ENABLE_NATIVE_PDF_PARSING_FIELD_NUMBER = 3; + private boolean enableNativePdfParsing_ = false; + /** + * + * + *
+   * Enables special handling for PDFs with existing text information. Results
+   * in better text extraction quality in such PDF inputs.
+   * 
+ * + * bool enable_native_pdf_parsing = 3; + * + * @return The enableNativePdfParsing. + */ + @java.lang.Override + public boolean getEnableNativePdfParsing() { + return enableNativePdfParsing_; + } + + public static final int ENABLE_IMAGE_QUALITY_SCORES_FIELD_NUMBER = 4; + private boolean enableImageQualityScores_ = false; + /** + * + * + *
+   * Enables intelligent document quality scores after OCR. Can help with
+   * diagnosing why OCR responses are of poor quality for a given input.
+   * Adds additional latency comparable to regular OCR to the process call.
+   * 
+ * + * bool enable_image_quality_scores = 4; + * + * @return The enableImageQualityScores. + */ + @java.lang.Override + public boolean getEnableImageQualityScores() { + return enableImageQualityScores_; + } + + public static final int ADVANCED_OCR_OPTIONS_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList advancedOcrOptions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * A list of advanced OCR options to further fine-tune OCR behavior. Current
+   * valid values are:
+   *
+   * - `legacy_layout`: a heuristics layout detection algorithm, which serves as
+   * an alternative to the current ML-based layout detection algorithm.
+   * Customers can choose the best suitable layout algorithm based on their
+   * situation.
+   * 
+ * + * repeated string advanced_ocr_options = 5; + * + * @return A list containing the advancedOcrOptions. + */ + public com.google.protobuf.ProtocolStringList getAdvancedOcrOptionsList() { + return advancedOcrOptions_; + } + /** + * + * + *
+   * A list of advanced OCR options to further fine-tune OCR behavior. Current
+   * valid values are:
+   *
+   * - `legacy_layout`: a heuristics layout detection algorithm, which serves as
+   * an alternative to the current ML-based layout detection algorithm.
+   * Customers can choose the best suitable layout algorithm based on their
+   * situation.
+   * 
+ * + * repeated string advanced_ocr_options = 5; + * + * @return The count of advancedOcrOptions. + */ + public int getAdvancedOcrOptionsCount() { + return advancedOcrOptions_.size(); + } + /** + * + * + *
+   * A list of advanced OCR options to further fine-tune OCR behavior. Current
+   * valid values are:
+   *
+   * - `legacy_layout`: a heuristics layout detection algorithm, which serves as
+   * an alternative to the current ML-based layout detection algorithm.
+   * Customers can choose the best suitable layout algorithm based on their
+   * situation.
+   * 
+ * + * repeated string advanced_ocr_options = 5; + * + * @param index The index of the element to return. + * @return The advancedOcrOptions at the given index. + */ + public java.lang.String getAdvancedOcrOptions(int index) { + return advancedOcrOptions_.get(index); + } + /** + * + * + *
+   * A list of advanced OCR options to further fine-tune OCR behavior. Current
+   * valid values are:
+   *
+   * - `legacy_layout`: a heuristics layout detection algorithm, which serves as
+   * an alternative to the current ML-based layout detection algorithm.
+   * Customers can choose the best suitable layout algorithm based on their
+   * situation.
+   * 
+ * + * repeated string advanced_ocr_options = 5; + * + * @param index The index of the value to return. + * @return The bytes of the advancedOcrOptions at the given index. + */ + public com.google.protobuf.ByteString getAdvancedOcrOptionsBytes(int index) { + return advancedOcrOptions_.getByteString(index); + } + + public static final int ENABLE_SYMBOL_FIELD_NUMBER = 6; + private boolean enableSymbol_ = false; + /** + * + * + *
+   * Includes symbol level OCR information if set to true.
+   * 
+ * + * bool enable_symbol = 6; + * + * @return The enableSymbol. + */ + @java.lang.Override + public boolean getEnableSymbol() { + return enableSymbol_; + } + + public static final int COMPUTE_STYLE_INFO_FIELD_NUMBER = 8; + private boolean computeStyleInfo_ = false; + /** + * + * + *
+   * Turn on font id model and returns font style information.
+   * 
+ * + * bool compute_style_info = 8; + * + * @return The computeStyleInfo. + */ + @java.lang.Override + public boolean getComputeStyleInfo() { + return computeStyleInfo_; + } + + 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 (hints_ != null) { + output.writeMessage(2, getHints()); + } + if (enableNativePdfParsing_ != false) { + output.writeBool(3, enableNativePdfParsing_); + } + if (enableImageQualityScores_ != false) { + output.writeBool(4, enableImageQualityScores_); + } + for (int i = 0; i < advancedOcrOptions_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, advancedOcrOptions_.getRaw(i)); + } + if (enableSymbol_ != false) { + output.writeBool(6, enableSymbol_); + } + if (computeStyleInfo_ != false) { + output.writeBool(8, computeStyleInfo_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (hints_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getHints()); + } + if (enableNativePdfParsing_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, enableNativePdfParsing_); + } + if (enableImageQualityScores_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, enableImageQualityScores_); + } + { + int dataSize = 0; + for (int i = 0; i < advancedOcrOptions_.size(); i++) { + dataSize += computeStringSizeNoTag(advancedOcrOptions_.getRaw(i)); + } + size += dataSize; + size += 1 * getAdvancedOcrOptionsList().size(); + } + if (enableSymbol_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, enableSymbol_); + } + if (computeStyleInfo_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(8, computeStyleInfo_); + } + size += getUnknownFields().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.v1.OcrConfig)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1.OcrConfig other = (com.google.cloud.documentai.v1.OcrConfig) obj; + + if (hasHints() != other.hasHints()) return false; + if (hasHints()) { + if (!getHints().equals(other.getHints())) return false; + } + if (getEnableNativePdfParsing() != other.getEnableNativePdfParsing()) return false; + if (getEnableImageQualityScores() != other.getEnableImageQualityScores()) return false; + if (!getAdvancedOcrOptionsList().equals(other.getAdvancedOcrOptionsList())) return false; + if (getEnableSymbol() != other.getEnableSymbol()) return false; + if (getComputeStyleInfo() != other.getComputeStyleInfo()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasHints()) { + hash = (37 * hash) + HINTS_FIELD_NUMBER; + hash = (53 * hash) + getHints().hashCode(); + } + hash = (37 * hash) + ENABLE_NATIVE_PDF_PARSING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableNativePdfParsing()); + hash = (37 * hash) + ENABLE_IMAGE_QUALITY_SCORES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableImageQualityScores()); + if (getAdvancedOcrOptionsCount() > 0) { + hash = (37 * hash) + ADVANCED_OCR_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getAdvancedOcrOptionsList().hashCode(); + } + hash = (37 * hash) + ENABLE_SYMBOL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableSymbol()); + hash = (37 * hash) + COMPUTE_STYLE_INFO_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getComputeStyleInfo()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1.OcrConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1.OcrConfig 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.v1.OcrConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1.OcrConfig 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.v1.OcrConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1.OcrConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1.OcrConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1.OcrConfig 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.v1.OcrConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1.OcrConfig 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.v1.OcrConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1.OcrConfig 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.v1.OcrConfig 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; + } + /** + * + * + *
+   * Config for Document OCR.
+   * 
+ * + * Protobuf type {@code google.cloud.documentai.v1.OcrConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1.OcrConfig) + com.google.cloud.documentai.v1.OcrConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1.DocumentIoProto + .internal_static_google_cloud_documentai_v1_OcrConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1.DocumentIoProto + .internal_static_google_cloud_documentai_v1_OcrConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1.OcrConfig.class, + com.google.cloud.documentai.v1.OcrConfig.Builder.class); + } + + // Construct using com.google.cloud.documentai.v1.OcrConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + hints_ = null; + if (hintsBuilder_ != null) { + hintsBuilder_.dispose(); + hintsBuilder_ = null; + } + enableNativePdfParsing_ = false; + enableImageQualityScores_ = false; + advancedOcrOptions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + enableSymbol_ = false; + computeStyleInfo_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1.DocumentIoProto + .internal_static_google_cloud_documentai_v1_OcrConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1.OcrConfig getDefaultInstanceForType() { + return com.google.cloud.documentai.v1.OcrConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1.OcrConfig build() { + com.google.cloud.documentai.v1.OcrConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1.OcrConfig buildPartial() { + com.google.cloud.documentai.v1.OcrConfig result = + new com.google.cloud.documentai.v1.OcrConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.documentai.v1.OcrConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.hints_ = hintsBuilder_ == null ? hints_ : hintsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.enableNativePdfParsing_ = enableNativePdfParsing_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.enableImageQualityScores_ = enableImageQualityScores_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + advancedOcrOptions_.makeImmutable(); + result.advancedOcrOptions_ = advancedOcrOptions_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.enableSymbol_ = enableSymbol_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.computeStyleInfo_ = computeStyleInfo_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1.OcrConfig) { + return mergeFrom((com.google.cloud.documentai.v1.OcrConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.documentai.v1.OcrConfig other) { + if (other == com.google.cloud.documentai.v1.OcrConfig.getDefaultInstance()) return this; + if (other.hasHints()) { + mergeHints(other.getHints()); + } + if (other.getEnableNativePdfParsing() != false) { + setEnableNativePdfParsing(other.getEnableNativePdfParsing()); + } + if (other.getEnableImageQualityScores() != false) { + setEnableImageQualityScores(other.getEnableImageQualityScores()); + } + if (!other.advancedOcrOptions_.isEmpty()) { + if (advancedOcrOptions_.isEmpty()) { + advancedOcrOptions_ = other.advancedOcrOptions_; + bitField0_ |= 0x00000008; + } else { + ensureAdvancedOcrOptionsIsMutable(); + advancedOcrOptions_.addAll(other.advancedOcrOptions_); + } + onChanged(); + } + if (other.getEnableSymbol() != false) { + setEnableSymbol(other.getEnableSymbol()); + } + if (other.getComputeStyleInfo() != false) { + setComputeStyleInfo(other.getComputeStyleInfo()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + input.readMessage(getHintsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 18 + case 24: + { + enableNativePdfParsing_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 24 + case 32: + { + enableImageQualityScores_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 32 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAdvancedOcrOptionsIsMutable(); + advancedOcrOptions_.add(s); + break; + } // case 42 + case 48: + { + enableSymbol_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 48 + case 64: + { + computeStyleInfo_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 64 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.documentai.v1.OcrConfig.Hints hints_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1.OcrConfig.Hints, + com.google.cloud.documentai.v1.OcrConfig.Hints.Builder, + com.google.cloud.documentai.v1.OcrConfig.HintsOrBuilder> + hintsBuilder_; + /** + * + * + *
+     * Hints for the OCR model.
+     * 
+ * + * .google.cloud.documentai.v1.OcrConfig.Hints hints = 2; + * + * @return Whether the hints field is set. + */ + public boolean hasHints() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Hints for the OCR model.
+     * 
+ * + * .google.cloud.documentai.v1.OcrConfig.Hints hints = 2; + * + * @return The hints. + */ + public com.google.cloud.documentai.v1.OcrConfig.Hints getHints() { + if (hintsBuilder_ == null) { + return hints_ == null + ? com.google.cloud.documentai.v1.OcrConfig.Hints.getDefaultInstance() + : hints_; + } else { + return hintsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Hints for the OCR model.
+     * 
+ * + * .google.cloud.documentai.v1.OcrConfig.Hints hints = 2; + */ + public Builder setHints(com.google.cloud.documentai.v1.OcrConfig.Hints value) { + if (hintsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + hints_ = value; + } else { + hintsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Hints for the OCR model.
+     * 
+ * + * .google.cloud.documentai.v1.OcrConfig.Hints hints = 2; + */ + public Builder setHints( + com.google.cloud.documentai.v1.OcrConfig.Hints.Builder builderForValue) { + if (hintsBuilder_ == null) { + hints_ = builderForValue.build(); + } else { + hintsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Hints for the OCR model.
+     * 
+ * + * .google.cloud.documentai.v1.OcrConfig.Hints hints = 2; + */ + public Builder mergeHints(com.google.cloud.documentai.v1.OcrConfig.Hints value) { + if (hintsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && hints_ != null + && hints_ != com.google.cloud.documentai.v1.OcrConfig.Hints.getDefaultInstance()) { + getHintsBuilder().mergeFrom(value); + } else { + hints_ = value; + } + } else { + hintsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Hints for the OCR model.
+     * 
+ * + * .google.cloud.documentai.v1.OcrConfig.Hints hints = 2; + */ + public Builder clearHints() { + bitField0_ = (bitField0_ & ~0x00000001); + hints_ = null; + if (hintsBuilder_ != null) { + hintsBuilder_.dispose(); + hintsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Hints for the OCR model.
+     * 
+ * + * .google.cloud.documentai.v1.OcrConfig.Hints hints = 2; + */ + public com.google.cloud.documentai.v1.OcrConfig.Hints.Builder getHintsBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getHintsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Hints for the OCR model.
+     * 
+ * + * .google.cloud.documentai.v1.OcrConfig.Hints hints = 2; + */ + public com.google.cloud.documentai.v1.OcrConfig.HintsOrBuilder getHintsOrBuilder() { + if (hintsBuilder_ != null) { + return hintsBuilder_.getMessageOrBuilder(); + } else { + return hints_ == null + ? com.google.cloud.documentai.v1.OcrConfig.Hints.getDefaultInstance() + : hints_; + } + } + /** + * + * + *
+     * Hints for the OCR model.
+     * 
+ * + * .google.cloud.documentai.v1.OcrConfig.Hints hints = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1.OcrConfig.Hints, + com.google.cloud.documentai.v1.OcrConfig.Hints.Builder, + com.google.cloud.documentai.v1.OcrConfig.HintsOrBuilder> + getHintsFieldBuilder() { + if (hintsBuilder_ == null) { + hintsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1.OcrConfig.Hints, + com.google.cloud.documentai.v1.OcrConfig.Hints.Builder, + com.google.cloud.documentai.v1.OcrConfig.HintsOrBuilder>( + getHints(), getParentForChildren(), isClean()); + hints_ = null; + } + return hintsBuilder_; + } + + private boolean enableNativePdfParsing_; + /** + * + * + *
+     * Enables special handling for PDFs with existing text information. Results
+     * in better text extraction quality in such PDF inputs.
+     * 
+ * + * bool enable_native_pdf_parsing = 3; + * + * @return The enableNativePdfParsing. + */ + @java.lang.Override + public boolean getEnableNativePdfParsing() { + return enableNativePdfParsing_; + } + /** + * + * + *
+     * Enables special handling for PDFs with existing text information. Results
+     * in better text extraction quality in such PDF inputs.
+     * 
+ * + * bool enable_native_pdf_parsing = 3; + * + * @param value The enableNativePdfParsing to set. + * @return This builder for chaining. + */ + public Builder setEnableNativePdfParsing(boolean value) { + + enableNativePdfParsing_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Enables special handling for PDFs with existing text information. Results
+     * in better text extraction quality in such PDF inputs.
+     * 
+ * + * bool enable_native_pdf_parsing = 3; + * + * @return This builder for chaining. + */ + public Builder clearEnableNativePdfParsing() { + bitField0_ = (bitField0_ & ~0x00000002); + enableNativePdfParsing_ = false; + onChanged(); + return this; + } + + private boolean enableImageQualityScores_; + /** + * + * + *
+     * Enables intelligent document quality scores after OCR. Can help with
+     * diagnosing why OCR responses are of poor quality for a given input.
+     * Adds additional latency comparable to regular OCR to the process call.
+     * 
+ * + * bool enable_image_quality_scores = 4; + * + * @return The enableImageQualityScores. + */ + @java.lang.Override + public boolean getEnableImageQualityScores() { + return enableImageQualityScores_; + } + /** + * + * + *
+     * Enables intelligent document quality scores after OCR. Can help with
+     * diagnosing why OCR responses are of poor quality for a given input.
+     * Adds additional latency comparable to regular OCR to the process call.
+     * 
+ * + * bool enable_image_quality_scores = 4; + * + * @param value The enableImageQualityScores to set. + * @return This builder for chaining. + */ + public Builder setEnableImageQualityScores(boolean value) { + + enableImageQualityScores_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Enables intelligent document quality scores after OCR. Can help with
+     * diagnosing why OCR responses are of poor quality for a given input.
+     * Adds additional latency comparable to regular OCR to the process call.
+     * 
+ * + * bool enable_image_quality_scores = 4; + * + * @return This builder for chaining. + */ + public Builder clearEnableImageQualityScores() { + bitField0_ = (bitField0_ & ~0x00000004); + enableImageQualityScores_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList advancedOcrOptions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureAdvancedOcrOptionsIsMutable() { + if (!advancedOcrOptions_.isModifiable()) { + advancedOcrOptions_ = new com.google.protobuf.LazyStringArrayList(advancedOcrOptions_); + } + bitField0_ |= 0x00000008; + } + /** + * + * + *
+     * A list of advanced OCR options to further fine-tune OCR behavior. Current
+     * valid values are:
+     *
+     * - `legacy_layout`: a heuristics layout detection algorithm, which serves as
+     * an alternative to the current ML-based layout detection algorithm.
+     * Customers can choose the best suitable layout algorithm based on their
+     * situation.
+     * 
+ * + * repeated string advanced_ocr_options = 5; + * + * @return A list containing the advancedOcrOptions. + */ + public com.google.protobuf.ProtocolStringList getAdvancedOcrOptionsList() { + advancedOcrOptions_.makeImmutable(); + return advancedOcrOptions_; + } + /** + * + * + *
+     * A list of advanced OCR options to further fine-tune OCR behavior. Current
+     * valid values are:
+     *
+     * - `legacy_layout`: a heuristics layout detection algorithm, which serves as
+     * an alternative to the current ML-based layout detection algorithm.
+     * Customers can choose the best suitable layout algorithm based on their
+     * situation.
+     * 
+ * + * repeated string advanced_ocr_options = 5; + * + * @return The count of advancedOcrOptions. + */ + public int getAdvancedOcrOptionsCount() { + return advancedOcrOptions_.size(); + } + /** + * + * + *
+     * A list of advanced OCR options to further fine-tune OCR behavior. Current
+     * valid values are:
+     *
+     * - `legacy_layout`: a heuristics layout detection algorithm, which serves as
+     * an alternative to the current ML-based layout detection algorithm.
+     * Customers can choose the best suitable layout algorithm based on their
+     * situation.
+     * 
+ * + * repeated string advanced_ocr_options = 5; + * + * @param index The index of the element to return. + * @return The advancedOcrOptions at the given index. + */ + public java.lang.String getAdvancedOcrOptions(int index) { + return advancedOcrOptions_.get(index); + } + /** + * + * + *
+     * A list of advanced OCR options to further fine-tune OCR behavior. Current
+     * valid values are:
+     *
+     * - `legacy_layout`: a heuristics layout detection algorithm, which serves as
+     * an alternative to the current ML-based layout detection algorithm.
+     * Customers can choose the best suitable layout algorithm based on their
+     * situation.
+     * 
+ * + * repeated string advanced_ocr_options = 5; + * + * @param index The index of the value to return. + * @return The bytes of the advancedOcrOptions at the given index. + */ + public com.google.protobuf.ByteString getAdvancedOcrOptionsBytes(int index) { + return advancedOcrOptions_.getByteString(index); + } + /** + * + * + *
+     * A list of advanced OCR options to further fine-tune OCR behavior. Current
+     * valid values are:
+     *
+     * - `legacy_layout`: a heuristics layout detection algorithm, which serves as
+     * an alternative to the current ML-based layout detection algorithm.
+     * Customers can choose the best suitable layout algorithm based on their
+     * situation.
+     * 
+ * + * repeated string advanced_ocr_options = 5; + * + * @param index The index to set the value at. + * @param value The advancedOcrOptions to set. + * @return This builder for chaining. + */ + public Builder setAdvancedOcrOptions(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdvancedOcrOptionsIsMutable(); + advancedOcrOptions_.set(index, value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * A list of advanced OCR options to further fine-tune OCR behavior. Current
+     * valid values are:
+     *
+     * - `legacy_layout`: a heuristics layout detection algorithm, which serves as
+     * an alternative to the current ML-based layout detection algorithm.
+     * Customers can choose the best suitable layout algorithm based on their
+     * situation.
+     * 
+ * + * repeated string advanced_ocr_options = 5; + * + * @param value The advancedOcrOptions to add. + * @return This builder for chaining. + */ + public Builder addAdvancedOcrOptions(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdvancedOcrOptionsIsMutable(); + advancedOcrOptions_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * A list of advanced OCR options to further fine-tune OCR behavior. Current
+     * valid values are:
+     *
+     * - `legacy_layout`: a heuristics layout detection algorithm, which serves as
+     * an alternative to the current ML-based layout detection algorithm.
+     * Customers can choose the best suitable layout algorithm based on their
+     * situation.
+     * 
+ * + * repeated string advanced_ocr_options = 5; + * + * @param values The advancedOcrOptions to add. + * @return This builder for chaining. + */ + public Builder addAllAdvancedOcrOptions(java.lang.Iterable values) { + ensureAdvancedOcrOptionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, advancedOcrOptions_); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * A list of advanced OCR options to further fine-tune OCR behavior. Current
+     * valid values are:
+     *
+     * - `legacy_layout`: a heuristics layout detection algorithm, which serves as
+     * an alternative to the current ML-based layout detection algorithm.
+     * Customers can choose the best suitable layout algorithm based on their
+     * situation.
+     * 
+ * + * repeated string advanced_ocr_options = 5; + * + * @return This builder for chaining. + */ + public Builder clearAdvancedOcrOptions() { + advancedOcrOptions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * A list of advanced OCR options to further fine-tune OCR behavior. Current
+     * valid values are:
+     *
+     * - `legacy_layout`: a heuristics layout detection algorithm, which serves as
+     * an alternative to the current ML-based layout detection algorithm.
+     * Customers can choose the best suitable layout algorithm based on their
+     * situation.
+     * 
+ * + * repeated string advanced_ocr_options = 5; + * + * @param value The bytes of the advancedOcrOptions to add. + * @return This builder for chaining. + */ + public Builder addAdvancedOcrOptionsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAdvancedOcrOptionsIsMutable(); + advancedOcrOptions_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private boolean enableSymbol_; + /** + * + * + *
+     * Includes symbol level OCR information if set to true.
+     * 
+ * + * bool enable_symbol = 6; + * + * @return The enableSymbol. + */ + @java.lang.Override + public boolean getEnableSymbol() { + return enableSymbol_; + } + /** + * + * + *
+     * Includes symbol level OCR information if set to true.
+     * 
+ * + * bool enable_symbol = 6; + * + * @param value The enableSymbol to set. + * @return This builder for chaining. + */ + public Builder setEnableSymbol(boolean value) { + + enableSymbol_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Includes symbol level OCR information if set to true.
+     * 
+ * + * bool enable_symbol = 6; + * + * @return This builder for chaining. + */ + public Builder clearEnableSymbol() { + bitField0_ = (bitField0_ & ~0x00000010); + enableSymbol_ = false; + onChanged(); + return this; + } + + private boolean computeStyleInfo_; + /** + * + * + *
+     * Turn on font id model and returns font style information.
+     * 
+ * + * bool compute_style_info = 8; + * + * @return The computeStyleInfo. + */ + @java.lang.Override + public boolean getComputeStyleInfo() { + return computeStyleInfo_; + } + /** + * + * + *
+     * Turn on font id model and returns font style information.
+     * 
+ * + * bool compute_style_info = 8; + * + * @param value The computeStyleInfo to set. + * @return This builder for chaining. + */ + public Builder setComputeStyleInfo(boolean value) { + + computeStyleInfo_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Turn on font id model and returns font style information.
+     * 
+ * + * bool compute_style_info = 8; + * + * @return This builder for chaining. + */ + public Builder clearComputeStyleInfo() { + bitField0_ = (bitField0_ & ~0x00000020); + computeStyleInfo_ = false; + 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.v1.OcrConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1.OcrConfig) + private static final com.google.cloud.documentai.v1.OcrConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1.OcrConfig(); + } + + public static com.google.cloud.documentai.v1.OcrConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OcrConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1.OcrConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/OcrConfigOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/OcrConfigOrBuilder.java new file mode 100644 index 000000000000..f22a59c14862 --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/OcrConfigOrBuilder.java @@ -0,0 +1,190 @@ +/* + * Copyright 2023 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/v1/document_io.proto + +package com.google.cloud.documentai.v1; + +public interface OcrConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1.OcrConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Hints for the OCR model.
+   * 
+ * + * .google.cloud.documentai.v1.OcrConfig.Hints hints = 2; + * + * @return Whether the hints field is set. + */ + boolean hasHints(); + /** + * + * + *
+   * Hints for the OCR model.
+   * 
+ * + * .google.cloud.documentai.v1.OcrConfig.Hints hints = 2; + * + * @return The hints. + */ + com.google.cloud.documentai.v1.OcrConfig.Hints getHints(); + /** + * + * + *
+   * Hints for the OCR model.
+   * 
+ * + * .google.cloud.documentai.v1.OcrConfig.Hints hints = 2; + */ + com.google.cloud.documentai.v1.OcrConfig.HintsOrBuilder getHintsOrBuilder(); + + /** + * + * + *
+   * Enables special handling for PDFs with existing text information. Results
+   * in better text extraction quality in such PDF inputs.
+   * 
+ * + * bool enable_native_pdf_parsing = 3; + * + * @return The enableNativePdfParsing. + */ + boolean getEnableNativePdfParsing(); + + /** + * + * + *
+   * Enables intelligent document quality scores after OCR. Can help with
+   * diagnosing why OCR responses are of poor quality for a given input.
+   * Adds additional latency comparable to regular OCR to the process call.
+   * 
+ * + * bool enable_image_quality_scores = 4; + * + * @return The enableImageQualityScores. + */ + boolean getEnableImageQualityScores(); + + /** + * + * + *
+   * A list of advanced OCR options to further fine-tune OCR behavior. Current
+   * valid values are:
+   *
+   * - `legacy_layout`: a heuristics layout detection algorithm, which serves as
+   * an alternative to the current ML-based layout detection algorithm.
+   * Customers can choose the best suitable layout algorithm based on their
+   * situation.
+   * 
+ * + * repeated string advanced_ocr_options = 5; + * + * @return A list containing the advancedOcrOptions. + */ + java.util.List getAdvancedOcrOptionsList(); + /** + * + * + *
+   * A list of advanced OCR options to further fine-tune OCR behavior. Current
+   * valid values are:
+   *
+   * - `legacy_layout`: a heuristics layout detection algorithm, which serves as
+   * an alternative to the current ML-based layout detection algorithm.
+   * Customers can choose the best suitable layout algorithm based on their
+   * situation.
+   * 
+ * + * repeated string advanced_ocr_options = 5; + * + * @return The count of advancedOcrOptions. + */ + int getAdvancedOcrOptionsCount(); + /** + * + * + *
+   * A list of advanced OCR options to further fine-tune OCR behavior. Current
+   * valid values are:
+   *
+   * - `legacy_layout`: a heuristics layout detection algorithm, which serves as
+   * an alternative to the current ML-based layout detection algorithm.
+   * Customers can choose the best suitable layout algorithm based on their
+   * situation.
+   * 
+ * + * repeated string advanced_ocr_options = 5; + * + * @param index The index of the element to return. + * @return The advancedOcrOptions at the given index. + */ + java.lang.String getAdvancedOcrOptions(int index); + /** + * + * + *
+   * A list of advanced OCR options to further fine-tune OCR behavior. Current
+   * valid values are:
+   *
+   * - `legacy_layout`: a heuristics layout detection algorithm, which serves as
+   * an alternative to the current ML-based layout detection algorithm.
+   * Customers can choose the best suitable layout algorithm based on their
+   * situation.
+   * 
+ * + * repeated string advanced_ocr_options = 5; + * + * @param index The index of the value to return. + * @return The bytes of the advancedOcrOptions at the given index. + */ + com.google.protobuf.ByteString getAdvancedOcrOptionsBytes(int index); + + /** + * + * + *
+   * Includes symbol level OCR information if set to true.
+   * 
+ * + * bool enable_symbol = 6; + * + * @return The enableSymbol. + */ + boolean getEnableSymbol(); + + /** + * + * + *
+   * Turn on font id model and returns font style information.
+   * 
+ * + * bool compute_style_info = 8; + * + * @return The computeStyleInfo. + */ + boolean getComputeStyleInfo(); +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessOptions.java b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessOptions.java new file mode 100644 index 000000000000..dc23fcf37b38 --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessOptions.java @@ -0,0 +1,716 @@ +/* + * Copyright 2023 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/v1/document_processor_service.proto + +package com.google.cloud.documentai.v1; + +/** + * + * + *
+ * Options for Process API
+ * 
+ * + * Protobuf type {@code google.cloud.documentai.v1.ProcessOptions} + */ +public final class ProcessOptions extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1.ProcessOptions) + ProcessOptionsOrBuilder { + private static final long serialVersionUID = 0L; + // Use ProcessOptions.newBuilder() to construct. + private ProcessOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ProcessOptions() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ProcessOptions(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1_ProcessOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1_ProcessOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1.ProcessOptions.class, + com.google.cloud.documentai.v1.ProcessOptions.Builder.class); + } + + public static final int OCR_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.documentai.v1.OcrConfig ocrConfig_; + /** + * + * + *
+   * Only applicable to `OCR_PROCESSOR`. Returns error if set on other
+   * processor types.
+   * 
+ * + * .google.cloud.documentai.v1.OcrConfig ocr_config = 1; + * + * @return Whether the ocrConfig field is set. + */ + @java.lang.Override + public boolean hasOcrConfig() { + return ocrConfig_ != null; + } + /** + * + * + *
+   * Only applicable to `OCR_PROCESSOR`. Returns error if set on other
+   * processor types.
+   * 
+ * + * .google.cloud.documentai.v1.OcrConfig ocr_config = 1; + * + * @return The ocrConfig. + */ + @java.lang.Override + public com.google.cloud.documentai.v1.OcrConfig getOcrConfig() { + return ocrConfig_ == null + ? com.google.cloud.documentai.v1.OcrConfig.getDefaultInstance() + : ocrConfig_; + } + /** + * + * + *
+   * Only applicable to `OCR_PROCESSOR`. Returns error if set on other
+   * processor types.
+   * 
+ * + * .google.cloud.documentai.v1.OcrConfig ocr_config = 1; + */ + @java.lang.Override + public com.google.cloud.documentai.v1.OcrConfigOrBuilder getOcrConfigOrBuilder() { + return ocrConfig_ == null + ? com.google.cloud.documentai.v1.OcrConfig.getDefaultInstance() + : ocrConfig_; + } + + 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 (ocrConfig_ != null) { + output.writeMessage(1, getOcrConfig()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (ocrConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getOcrConfig()); + } + size += getUnknownFields().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.v1.ProcessOptions)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1.ProcessOptions other = + (com.google.cloud.documentai.v1.ProcessOptions) obj; + + if (hasOcrConfig() != other.hasOcrConfig()) return false; + if (hasOcrConfig()) { + if (!getOcrConfig().equals(other.getOcrConfig())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasOcrConfig()) { + hash = (37 * hash) + OCR_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getOcrConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1.ProcessOptions parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1.ProcessOptions 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.v1.ProcessOptions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1.ProcessOptions 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.v1.ProcessOptions parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1.ProcessOptions parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1.ProcessOptions parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1.ProcessOptions 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.v1.ProcessOptions parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1.ProcessOptions 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.v1.ProcessOptions parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1.ProcessOptions 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.v1.ProcessOptions prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Options for Process API
+   * 
+ * + * Protobuf type {@code google.cloud.documentai.v1.ProcessOptions} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1.ProcessOptions) + com.google.cloud.documentai.v1.ProcessOptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1_ProcessOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1_ProcessOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1.ProcessOptions.class, + com.google.cloud.documentai.v1.ProcessOptions.Builder.class); + } + + // Construct using com.google.cloud.documentai.v1.ProcessOptions.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + ocrConfig_ = null; + if (ocrConfigBuilder_ != null) { + ocrConfigBuilder_.dispose(); + ocrConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1_ProcessOptions_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1.ProcessOptions getDefaultInstanceForType() { + return com.google.cloud.documentai.v1.ProcessOptions.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1.ProcessOptions build() { + com.google.cloud.documentai.v1.ProcessOptions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1.ProcessOptions buildPartial() { + com.google.cloud.documentai.v1.ProcessOptions result = + new com.google.cloud.documentai.v1.ProcessOptions(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.documentai.v1.ProcessOptions result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.ocrConfig_ = ocrConfigBuilder_ == null ? ocrConfig_ : ocrConfigBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1.ProcessOptions) { + return mergeFrom((com.google.cloud.documentai.v1.ProcessOptions) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.documentai.v1.ProcessOptions other) { + if (other == com.google.cloud.documentai.v1.ProcessOptions.getDefaultInstance()) return this; + if (other.hasOcrConfig()) { + mergeOcrConfig(other.getOcrConfig()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getOcrConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.documentai.v1.OcrConfig ocrConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1.OcrConfig, + com.google.cloud.documentai.v1.OcrConfig.Builder, + com.google.cloud.documentai.v1.OcrConfigOrBuilder> + ocrConfigBuilder_; + /** + * + * + *
+     * Only applicable to `OCR_PROCESSOR`. Returns error if set on other
+     * processor types.
+     * 
+ * + * .google.cloud.documentai.v1.OcrConfig ocr_config = 1; + * + * @return Whether the ocrConfig field is set. + */ + public boolean hasOcrConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Only applicable to `OCR_PROCESSOR`. Returns error if set on other
+     * processor types.
+     * 
+ * + * .google.cloud.documentai.v1.OcrConfig ocr_config = 1; + * + * @return The ocrConfig. + */ + public com.google.cloud.documentai.v1.OcrConfig getOcrConfig() { + if (ocrConfigBuilder_ == null) { + return ocrConfig_ == null + ? com.google.cloud.documentai.v1.OcrConfig.getDefaultInstance() + : ocrConfig_; + } else { + return ocrConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Only applicable to `OCR_PROCESSOR`. Returns error if set on other
+     * processor types.
+     * 
+ * + * .google.cloud.documentai.v1.OcrConfig ocr_config = 1; + */ + public Builder setOcrConfig(com.google.cloud.documentai.v1.OcrConfig value) { + if (ocrConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ocrConfig_ = value; + } else { + ocrConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Only applicable to `OCR_PROCESSOR`. Returns error if set on other
+     * processor types.
+     * 
+ * + * .google.cloud.documentai.v1.OcrConfig ocr_config = 1; + */ + public Builder setOcrConfig(com.google.cloud.documentai.v1.OcrConfig.Builder builderForValue) { + if (ocrConfigBuilder_ == null) { + ocrConfig_ = builderForValue.build(); + } else { + ocrConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Only applicable to `OCR_PROCESSOR`. Returns error if set on other
+     * processor types.
+     * 
+ * + * .google.cloud.documentai.v1.OcrConfig ocr_config = 1; + */ + public Builder mergeOcrConfig(com.google.cloud.documentai.v1.OcrConfig value) { + if (ocrConfigBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && ocrConfig_ != null + && ocrConfig_ != com.google.cloud.documentai.v1.OcrConfig.getDefaultInstance()) { + getOcrConfigBuilder().mergeFrom(value); + } else { + ocrConfig_ = value; + } + } else { + ocrConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Only applicable to `OCR_PROCESSOR`. Returns error if set on other
+     * processor types.
+     * 
+ * + * .google.cloud.documentai.v1.OcrConfig ocr_config = 1; + */ + public Builder clearOcrConfig() { + bitField0_ = (bitField0_ & ~0x00000001); + ocrConfig_ = null; + if (ocrConfigBuilder_ != null) { + ocrConfigBuilder_.dispose(); + ocrConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Only applicable to `OCR_PROCESSOR`. Returns error if set on other
+     * processor types.
+     * 
+ * + * .google.cloud.documentai.v1.OcrConfig ocr_config = 1; + */ + public com.google.cloud.documentai.v1.OcrConfig.Builder getOcrConfigBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getOcrConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Only applicable to `OCR_PROCESSOR`. Returns error if set on other
+     * processor types.
+     * 
+ * + * .google.cloud.documentai.v1.OcrConfig ocr_config = 1; + */ + public com.google.cloud.documentai.v1.OcrConfigOrBuilder getOcrConfigOrBuilder() { + if (ocrConfigBuilder_ != null) { + return ocrConfigBuilder_.getMessageOrBuilder(); + } else { + return ocrConfig_ == null + ? com.google.cloud.documentai.v1.OcrConfig.getDefaultInstance() + : ocrConfig_; + } + } + /** + * + * + *
+     * Only applicable to `OCR_PROCESSOR`. Returns error if set on other
+     * processor types.
+     * 
+ * + * .google.cloud.documentai.v1.OcrConfig ocr_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1.OcrConfig, + com.google.cloud.documentai.v1.OcrConfig.Builder, + com.google.cloud.documentai.v1.OcrConfigOrBuilder> + getOcrConfigFieldBuilder() { + if (ocrConfigBuilder_ == null) { + ocrConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1.OcrConfig, + com.google.cloud.documentai.v1.OcrConfig.Builder, + com.google.cloud.documentai.v1.OcrConfigOrBuilder>( + getOcrConfig(), getParentForChildren(), isClean()); + ocrConfig_ = null; + } + return ocrConfigBuilder_; + } + + @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.v1.ProcessOptions) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1.ProcessOptions) + private static final com.google.cloud.documentai.v1.ProcessOptions DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1.ProcessOptions(); + } + + public static com.google.cloud.documentai.v1.ProcessOptions getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProcessOptions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1.ProcessOptions getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessOptionsOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessOptionsOrBuilder.java new file mode 100644 index 000000000000..c450ed5cd9c2 --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessOptionsOrBuilder.java @@ -0,0 +1,63 @@ +/* + * Copyright 2023 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/v1/document_processor_service.proto + +package com.google.cloud.documentai.v1; + +public interface ProcessOptionsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1.ProcessOptions) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Only applicable to `OCR_PROCESSOR`. Returns error if set on other
+   * processor types.
+   * 
+ * + * .google.cloud.documentai.v1.OcrConfig ocr_config = 1; + * + * @return Whether the ocrConfig field is set. + */ + boolean hasOcrConfig(); + /** + * + * + *
+   * Only applicable to `OCR_PROCESSOR`. Returns error if set on other
+   * processor types.
+   * 
+ * + * .google.cloud.documentai.v1.OcrConfig ocr_config = 1; + * + * @return The ocrConfig. + */ + com.google.cloud.documentai.v1.OcrConfig getOcrConfig(); + /** + * + * + *
+   * Only applicable to `OCR_PROCESSOR`. Returns error if set on other
+   * processor types.
+   * 
+ * + * .google.cloud.documentai.v1.OcrConfig ocr_config = 1; + */ + com.google.cloud.documentai.v1.OcrConfigOrBuilder getOcrConfigOrBuilder(); +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessRequest.java b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessRequest.java index 43afb063244b..a09ce67ae518 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessRequest.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessRequest.java @@ -75,6 +75,7 @@ public enum SourceCase com.google.protobuf.AbstractMessage.InternalOneOfEnum { INLINE_DOCUMENT(4), RAW_DOCUMENT(5), + GCS_DOCUMENT(8), SOURCE_NOT_SET(0); private final int value; @@ -97,6 +98,8 @@ public static SourceCase forNumber(int value) { return INLINE_DOCUMENT; case 5: return RAW_DOCUMENT; + case 8: + return GCS_DOCUMENT; case 0: return SOURCE_NOT_SET; default: @@ -215,6 +218,57 @@ public com.google.cloud.documentai.v1.RawDocumentOrBuilder getRawDocumentOrBuild return com.google.cloud.documentai.v1.RawDocument.getDefaultInstance(); } + public static final int GCS_DOCUMENT_FIELD_NUMBER = 8; + /** + * + * + *
+   * A raw document on Google Cloud Storage.
+   * 
+ * + * .google.cloud.documentai.v1.GcsDocument gcs_document = 8; + * + * @return Whether the gcsDocument field is set. + */ + @java.lang.Override + public boolean hasGcsDocument() { + return sourceCase_ == 8; + } + /** + * + * + *
+   * A raw document on Google Cloud Storage.
+   * 
+ * + * .google.cloud.documentai.v1.GcsDocument gcs_document = 8; + * + * @return The gcsDocument. + */ + @java.lang.Override + public com.google.cloud.documentai.v1.GcsDocument getGcsDocument() { + if (sourceCase_ == 8) { + return (com.google.cloud.documentai.v1.GcsDocument) source_; + } + return com.google.cloud.documentai.v1.GcsDocument.getDefaultInstance(); + } + /** + * + * + *
+   * A raw document on Google Cloud Storage.
+   * 
+ * + * .google.cloud.documentai.v1.GcsDocument gcs_document = 8; + */ + @java.lang.Override + public com.google.cloud.documentai.v1.GcsDocumentOrBuilder getGcsDocumentOrBuilder() { + if (sourceCase_ == 8) { + return (com.google.cloud.documentai.v1.GcsDocument) source_; + } + return com.google.cloud.documentai.v1.GcsDocument.getDefaultInstance(); + } + public static final int NAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -362,6 +416,56 @@ public com.google.protobuf.FieldMaskOrBuilder getFieldMaskOrBuilder() { return fieldMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : fieldMask_; } + public static final int PROCESS_OPTIONS_FIELD_NUMBER = 7; + private com.google.cloud.documentai.v1.ProcessOptions processOptions_; + /** + * + * + *
+   * Inference-time options for the process API
+   * 
+ * + * .google.cloud.documentai.v1.ProcessOptions process_options = 7; + * + * @return Whether the processOptions field is set. + */ + @java.lang.Override + public boolean hasProcessOptions() { + return processOptions_ != null; + } + /** + * + * + *
+   * Inference-time options for the process API
+   * 
+ * + * .google.cloud.documentai.v1.ProcessOptions process_options = 7; + * + * @return The processOptions. + */ + @java.lang.Override + public com.google.cloud.documentai.v1.ProcessOptions getProcessOptions() { + return processOptions_ == null + ? com.google.cloud.documentai.v1.ProcessOptions.getDefaultInstance() + : processOptions_; + } + /** + * + * + *
+   * Inference-time options for the process API
+   * 
+ * + * .google.cloud.documentai.v1.ProcessOptions process_options = 7; + */ + @java.lang.Override + public com.google.cloud.documentai.v1.ProcessOptionsOrBuilder getProcessOptionsOrBuilder() { + return processOptions_ == null + ? com.google.cloud.documentai.v1.ProcessOptions.getDefaultInstance() + : processOptions_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -391,6 +495,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (fieldMask_ != null) { output.writeMessage(6, getFieldMask()); } + if (processOptions_ != null) { + output.writeMessage(7, getProcessOptions()); + } + if (sourceCase_ == 8) { + output.writeMessage(8, (com.google.cloud.documentai.v1.GcsDocument) source_); + } getUnknownFields().writeTo(output); } @@ -419,6 +529,14 @@ public int getSerializedSize() { if (fieldMask_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getFieldMask()); } + if (processOptions_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getProcessOptions()); + } + if (sourceCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, (com.google.cloud.documentai.v1.GcsDocument) source_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -441,6 +559,10 @@ public boolean equals(final java.lang.Object obj) { if (hasFieldMask()) { if (!getFieldMask().equals(other.getFieldMask())) return false; } + if (hasProcessOptions() != other.hasProcessOptions()) return false; + if (hasProcessOptions()) { + if (!getProcessOptions().equals(other.getProcessOptions())) return false; + } if (!getSourceCase().equals(other.getSourceCase())) return false; switch (sourceCase_) { case 4: @@ -449,6 +571,9 @@ public boolean equals(final java.lang.Object obj) { case 5: if (!getRawDocument().equals(other.getRawDocument())) return false; break; + case 8: + if (!getGcsDocument().equals(other.getGcsDocument())) return false; + break; case 0: default: } @@ -471,6 +596,10 @@ public int hashCode() { hash = (37 * hash) + FIELD_MASK_FIELD_NUMBER; hash = (53 * hash) + getFieldMask().hashCode(); } + if (hasProcessOptions()) { + hash = (37 * hash) + PROCESS_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getProcessOptions().hashCode(); + } switch (sourceCase_) { case 4: hash = (37 * hash) + INLINE_DOCUMENT_FIELD_NUMBER; @@ -480,6 +609,10 @@ public int hashCode() { hash = (37 * hash) + RAW_DOCUMENT_FIELD_NUMBER; hash = (53 * hash) + getRawDocument().hashCode(); break; + case 8: + hash = (37 * hash) + GCS_DOCUMENT_FIELD_NUMBER; + hash = (53 * hash) + getGcsDocument().hashCode(); + break; case 0: default: } @@ -630,6 +763,9 @@ public Builder clear() { if (rawDocumentBuilder_ != null) { rawDocumentBuilder_.clear(); } + if (gcsDocumentBuilder_ != null) { + gcsDocumentBuilder_.clear(); + } name_ = ""; skipHumanReview_ = false; fieldMask_ = null; @@ -637,6 +773,11 @@ public Builder clear() { fieldMaskBuilder_.dispose(); fieldMaskBuilder_ = null; } + processOptions_ = null; + if (processOptionsBuilder_ != null) { + processOptionsBuilder_.dispose(); + processOptionsBuilder_ = null; + } sourceCase_ = 0; source_ = null; return this; @@ -676,15 +817,19 @@ public com.google.cloud.documentai.v1.ProcessRequest buildPartial() { private void buildPartial0(com.google.cloud.documentai.v1.ProcessRequest result) { int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000004) != 0)) { + if (((from_bitField0_ & 0x00000008) != 0)) { result.name_ = name_; } - if (((from_bitField0_ & 0x00000008) != 0)) { + if (((from_bitField0_ & 0x00000010) != 0)) { result.skipHumanReview_ = skipHumanReview_; } - if (((from_bitField0_ & 0x00000010) != 0)) { + if (((from_bitField0_ & 0x00000020) != 0)) { result.fieldMask_ = fieldMaskBuilder_ == null ? fieldMask_ : fieldMaskBuilder_.build(); } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.processOptions_ = + processOptionsBuilder_ == null ? processOptions_ : processOptionsBuilder_.build(); + } } private void buildPartialOneofs(com.google.cloud.documentai.v1.ProcessRequest result) { @@ -696,6 +841,9 @@ private void buildPartialOneofs(com.google.cloud.documentai.v1.ProcessRequest re if (sourceCase_ == 5 && rawDocumentBuilder_ != null) { result.source_ = rawDocumentBuilder_.build(); } + if (sourceCase_ == 8 && gcsDocumentBuilder_ != null) { + result.source_ = gcsDocumentBuilder_.build(); + } } @java.lang.Override @@ -745,7 +893,7 @@ public Builder mergeFrom(com.google.cloud.documentai.v1.ProcessRequest other) { if (other == com.google.cloud.documentai.v1.ProcessRequest.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); } if (other.getSkipHumanReview() != false) { @@ -754,6 +902,9 @@ public Builder mergeFrom(com.google.cloud.documentai.v1.ProcessRequest other) { if (other.hasFieldMask()) { mergeFieldMask(other.getFieldMask()); } + if (other.hasProcessOptions()) { + mergeProcessOptions(other.getProcessOptions()); + } switch (other.getSourceCase()) { case INLINE_DOCUMENT: { @@ -765,6 +916,11 @@ public Builder mergeFrom(com.google.cloud.documentai.v1.ProcessRequest other) { mergeRawDocument(other.getRawDocument()); break; } + case GCS_DOCUMENT: + { + mergeGcsDocument(other.getGcsDocument()); + break; + } case SOURCE_NOT_SET: { break; @@ -799,13 +955,13 @@ public Builder mergeFrom( case 10: { name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; break; } // case 10 case 24: { skipHumanReview_ = input.readBool(); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; break; } // case 24 case 34: @@ -823,9 +979,21 @@ public Builder mergeFrom( case 50: { input.readMessage(getFieldMaskFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; break; } // case 50 + case 58: + { + input.readMessage(getProcessOptionsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + input.readMessage(getGcsDocumentFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 8; + break; + } // case 66 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1277,6 +1445,215 @@ public com.google.cloud.documentai.v1.RawDocumentOrBuilder getRawDocumentOrBuild return rawDocumentBuilder_; } + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1.GcsDocument, + com.google.cloud.documentai.v1.GcsDocument.Builder, + com.google.cloud.documentai.v1.GcsDocumentOrBuilder> + gcsDocumentBuilder_; + /** + * + * + *
+     * A raw document on Google Cloud Storage.
+     * 
+ * + * .google.cloud.documentai.v1.GcsDocument gcs_document = 8; + * + * @return Whether the gcsDocument field is set. + */ + @java.lang.Override + public boolean hasGcsDocument() { + return sourceCase_ == 8; + } + /** + * + * + *
+     * A raw document on Google Cloud Storage.
+     * 
+ * + * .google.cloud.documentai.v1.GcsDocument gcs_document = 8; + * + * @return The gcsDocument. + */ + @java.lang.Override + public com.google.cloud.documentai.v1.GcsDocument getGcsDocument() { + if (gcsDocumentBuilder_ == null) { + if (sourceCase_ == 8) { + return (com.google.cloud.documentai.v1.GcsDocument) source_; + } + return com.google.cloud.documentai.v1.GcsDocument.getDefaultInstance(); + } else { + if (sourceCase_ == 8) { + return gcsDocumentBuilder_.getMessage(); + } + return com.google.cloud.documentai.v1.GcsDocument.getDefaultInstance(); + } + } + /** + * + * + *
+     * A raw document on Google Cloud Storage.
+     * 
+ * + * .google.cloud.documentai.v1.GcsDocument gcs_document = 8; + */ + public Builder setGcsDocument(com.google.cloud.documentai.v1.GcsDocument value) { + if (gcsDocumentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + gcsDocumentBuilder_.setMessage(value); + } + sourceCase_ = 8; + return this; + } + /** + * + * + *
+     * A raw document on Google Cloud Storage.
+     * 
+ * + * .google.cloud.documentai.v1.GcsDocument gcs_document = 8; + */ + public Builder setGcsDocument( + com.google.cloud.documentai.v1.GcsDocument.Builder builderForValue) { + if (gcsDocumentBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + gcsDocumentBuilder_.setMessage(builderForValue.build()); + } + sourceCase_ = 8; + return this; + } + /** + * + * + *
+     * A raw document on Google Cloud Storage.
+     * 
+ * + * .google.cloud.documentai.v1.GcsDocument gcs_document = 8; + */ + public Builder mergeGcsDocument(com.google.cloud.documentai.v1.GcsDocument value) { + if (gcsDocumentBuilder_ == null) { + if (sourceCase_ == 8 + && source_ != com.google.cloud.documentai.v1.GcsDocument.getDefaultInstance()) { + source_ = + com.google.cloud.documentai.v1.GcsDocument.newBuilder( + (com.google.cloud.documentai.v1.GcsDocument) source_) + .mergeFrom(value) + .buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + if (sourceCase_ == 8) { + gcsDocumentBuilder_.mergeFrom(value); + } else { + gcsDocumentBuilder_.setMessage(value); + } + } + sourceCase_ = 8; + return this; + } + /** + * + * + *
+     * A raw document on Google Cloud Storage.
+     * 
+ * + * .google.cloud.documentai.v1.GcsDocument gcs_document = 8; + */ + public Builder clearGcsDocument() { + if (gcsDocumentBuilder_ == null) { + if (sourceCase_ == 8) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 8) { + sourceCase_ = 0; + source_ = null; + } + gcsDocumentBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A raw document on Google Cloud Storage.
+     * 
+ * + * .google.cloud.documentai.v1.GcsDocument gcs_document = 8; + */ + public com.google.cloud.documentai.v1.GcsDocument.Builder getGcsDocumentBuilder() { + return getGcsDocumentFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A raw document on Google Cloud Storage.
+     * 
+ * + * .google.cloud.documentai.v1.GcsDocument gcs_document = 8; + */ + @java.lang.Override + public com.google.cloud.documentai.v1.GcsDocumentOrBuilder getGcsDocumentOrBuilder() { + if ((sourceCase_ == 8) && (gcsDocumentBuilder_ != null)) { + return gcsDocumentBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 8) { + return (com.google.cloud.documentai.v1.GcsDocument) source_; + } + return com.google.cloud.documentai.v1.GcsDocument.getDefaultInstance(); + } + } + /** + * + * + *
+     * A raw document on Google Cloud Storage.
+     * 
+ * + * .google.cloud.documentai.v1.GcsDocument gcs_document = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1.GcsDocument, + com.google.cloud.documentai.v1.GcsDocument.Builder, + com.google.cloud.documentai.v1.GcsDocumentOrBuilder> + getGcsDocumentFieldBuilder() { + if (gcsDocumentBuilder_ == null) { + if (!(sourceCase_ == 8)) { + source_ = com.google.cloud.documentai.v1.GcsDocument.getDefaultInstance(); + } + gcsDocumentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1.GcsDocument, + com.google.cloud.documentai.v1.GcsDocument.Builder, + com.google.cloud.documentai.v1.GcsDocumentOrBuilder>( + (com.google.cloud.documentai.v1.GcsDocument) source_, + getParentForChildren(), + isClean()); + source_ = null; + } + sourceCase_ = 8; + onChanged(); + return gcsDocumentBuilder_; + } + private java.lang.Object name_ = ""; /** * @@ -1372,7 +1749,7 @@ public Builder setName(java.lang.String value) { throw new NullPointerException(); } name_ = value; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -1400,7 +1777,7 @@ public Builder setName(java.lang.String value) { */ public Builder clearName() { name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } @@ -1433,7 +1810,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); name_ = value; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -1471,7 +1848,7 @@ public boolean getSkipHumanReview() { public Builder setSkipHumanReview(boolean value) { skipHumanReview_ = value; - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -1488,7 +1865,7 @@ public Builder setSkipHumanReview(boolean value) { * @return This builder for chaining. */ public Builder clearSkipHumanReview() { - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); skipHumanReview_ = false; onChanged(); return this; @@ -1515,7 +1892,7 @@ public Builder clearSkipHumanReview() { * @return Whether the fieldMask field is set. */ public boolean hasFieldMask() { - return ((bitField0_ & 0x00000010) != 0); + return ((bitField0_ & 0x00000020) != 0); } /** * @@ -1559,7 +1936,7 @@ public Builder setFieldMask(com.google.protobuf.FieldMask value) { } else { fieldMaskBuilder_.setMessage(value); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -1581,7 +1958,7 @@ public Builder setFieldMask(com.google.protobuf.FieldMask.Builder builderForValu } else { fieldMaskBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -1599,7 +1976,7 @@ public Builder setFieldMask(com.google.protobuf.FieldMask.Builder builderForValu */ public Builder mergeFieldMask(com.google.protobuf.FieldMask value) { if (fieldMaskBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) + if (((bitField0_ & 0x00000020) != 0) && fieldMask_ != null && fieldMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { getFieldMaskBuilder().mergeFrom(value); @@ -1609,7 +1986,7 @@ public Builder mergeFieldMask(com.google.protobuf.FieldMask value) { } else { fieldMaskBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -1626,7 +2003,7 @@ public Builder mergeFieldMask(com.google.protobuf.FieldMask value) { * .google.protobuf.FieldMask field_mask = 6; */ public Builder clearFieldMask() { - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000020); fieldMask_ = null; if (fieldMaskBuilder_ != null) { fieldMaskBuilder_.dispose(); @@ -1648,7 +2025,7 @@ public Builder clearFieldMask() { * .google.protobuf.FieldMask field_mask = 6; */ public com.google.protobuf.FieldMask.Builder getFieldMaskBuilder() { - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return getFieldMaskFieldBuilder().getBuilder(); } @@ -1700,6 +2077,191 @@ public com.google.protobuf.FieldMaskOrBuilder getFieldMaskOrBuilder() { return fieldMaskBuilder_; } + private com.google.cloud.documentai.v1.ProcessOptions processOptions_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1.ProcessOptions, + com.google.cloud.documentai.v1.ProcessOptions.Builder, + com.google.cloud.documentai.v1.ProcessOptionsOrBuilder> + processOptionsBuilder_; + /** + * + * + *
+     * Inference-time options for the process API
+     * 
+ * + * .google.cloud.documentai.v1.ProcessOptions process_options = 7; + * + * @return Whether the processOptions field is set. + */ + public boolean hasProcessOptions() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * Inference-time options for the process API
+     * 
+ * + * .google.cloud.documentai.v1.ProcessOptions process_options = 7; + * + * @return The processOptions. + */ + public com.google.cloud.documentai.v1.ProcessOptions getProcessOptions() { + if (processOptionsBuilder_ == null) { + return processOptions_ == null + ? com.google.cloud.documentai.v1.ProcessOptions.getDefaultInstance() + : processOptions_; + } else { + return processOptionsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Inference-time options for the process API
+     * 
+ * + * .google.cloud.documentai.v1.ProcessOptions process_options = 7; + */ + public Builder setProcessOptions(com.google.cloud.documentai.v1.ProcessOptions value) { + if (processOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + processOptions_ = value; + } else { + processOptionsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Inference-time options for the process API
+     * 
+ * + * .google.cloud.documentai.v1.ProcessOptions process_options = 7; + */ + public Builder setProcessOptions( + com.google.cloud.documentai.v1.ProcessOptions.Builder builderForValue) { + if (processOptionsBuilder_ == null) { + processOptions_ = builderForValue.build(); + } else { + processOptionsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Inference-time options for the process API
+     * 
+ * + * .google.cloud.documentai.v1.ProcessOptions process_options = 7; + */ + public Builder mergeProcessOptions(com.google.cloud.documentai.v1.ProcessOptions value) { + if (processOptionsBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && processOptions_ != null + && processOptions_ + != com.google.cloud.documentai.v1.ProcessOptions.getDefaultInstance()) { + getProcessOptionsBuilder().mergeFrom(value); + } else { + processOptions_ = value; + } + } else { + processOptionsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Inference-time options for the process API
+     * 
+ * + * .google.cloud.documentai.v1.ProcessOptions process_options = 7; + */ + public Builder clearProcessOptions() { + bitField0_ = (bitField0_ & ~0x00000040); + processOptions_ = null; + if (processOptionsBuilder_ != null) { + processOptionsBuilder_.dispose(); + processOptionsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Inference-time options for the process API
+     * 
+ * + * .google.cloud.documentai.v1.ProcessOptions process_options = 7; + */ + public com.google.cloud.documentai.v1.ProcessOptions.Builder getProcessOptionsBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getProcessOptionsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Inference-time options for the process API
+     * 
+ * + * .google.cloud.documentai.v1.ProcessOptions process_options = 7; + */ + public com.google.cloud.documentai.v1.ProcessOptionsOrBuilder getProcessOptionsOrBuilder() { + if (processOptionsBuilder_ != null) { + return processOptionsBuilder_.getMessageOrBuilder(); + } else { + return processOptions_ == null + ? com.google.cloud.documentai.v1.ProcessOptions.getDefaultInstance() + : processOptions_; + } + } + /** + * + * + *
+     * Inference-time options for the process API
+     * 
+ * + * .google.cloud.documentai.v1.ProcessOptions process_options = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1.ProcessOptions, + com.google.cloud.documentai.v1.ProcessOptions.Builder, + com.google.cloud.documentai.v1.ProcessOptionsOrBuilder> + getProcessOptionsFieldBuilder() { + if (processOptionsBuilder_ == null) { + processOptionsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1.ProcessOptions, + com.google.cloud.documentai.v1.ProcessOptions.Builder, + com.google.cloud.documentai.v1.ProcessOptionsOrBuilder>( + getProcessOptions(), getParentForChildren(), isClean()); + processOptions_ = null; + } + return processOptionsBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessRequestOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessRequestOrBuilder.java index dff7ebcf50d3..0b6cbec365a1 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessRequestOrBuilder.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessRequestOrBuilder.java @@ -93,6 +93,41 @@ public interface ProcessRequestOrBuilder */ com.google.cloud.documentai.v1.RawDocumentOrBuilder getRawDocumentOrBuilder(); + /** + * + * + *
+   * A raw document on Google Cloud Storage.
+   * 
+ * + * .google.cloud.documentai.v1.GcsDocument gcs_document = 8; + * + * @return Whether the gcsDocument field is set. + */ + boolean hasGcsDocument(); + /** + * + * + *
+   * A raw document on Google Cloud Storage.
+   * 
+ * + * .google.cloud.documentai.v1.GcsDocument gcs_document = 8; + * + * @return The gcsDocument. + */ + com.google.cloud.documentai.v1.GcsDocument getGcsDocument(); + /** + * + * + *
+   * A raw document on Google Cloud Storage.
+   * 
+ * + * .google.cloud.documentai.v1.GcsDocument gcs_document = 8; + */ + com.google.cloud.documentai.v1.GcsDocumentOrBuilder getGcsDocumentOrBuilder(); + /** * * @@ -198,5 +233,40 @@ public interface ProcessRequestOrBuilder */ com.google.protobuf.FieldMaskOrBuilder getFieldMaskOrBuilder(); + /** + * + * + *
+   * Inference-time options for the process API
+   * 
+ * + * .google.cloud.documentai.v1.ProcessOptions process_options = 7; + * + * @return Whether the processOptions field is set. + */ + boolean hasProcessOptions(); + /** + * + * + *
+   * Inference-time options for the process API
+   * 
+ * + * .google.cloud.documentai.v1.ProcessOptions process_options = 7; + * + * @return The processOptions. + */ + com.google.cloud.documentai.v1.ProcessOptions getProcessOptions(); + /** + * + * + *
+   * Inference-time options for the process API
+   * 
+ * + * .google.cloud.documentai.v1.ProcessOptions process_options = 7; + */ + com.google.cloud.documentai.v1.ProcessOptionsOrBuilder getProcessOptionsOrBuilder(); + com.google.cloud.documentai.v1.ProcessRequest.SourceCase getSourceCase(); } diff --git a/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessorVersion.java b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessorVersion.java index 80a9843881d4..080accab954d 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessorVersion.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessorVersion.java @@ -1720,10 +1720,10 @@ public com.google.protobuf.ByteString getKmsKeyVersionNameBytes() { * * *
-   * Denotes that this `ProcessorVersion` is managed by Google.
+   * Output only. Denotes that this `ProcessorVersion` is managed by Google.
    * 
* - * bool google_managed = 11; + * bool google_managed = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The googleManaged. */ @@ -3462,10 +3462,10 @@ public Builder setKmsKeyVersionNameBytes(com.google.protobuf.ByteString value) { * * *
-     * Denotes that this `ProcessorVersion` is managed by Google.
+     * Output only. Denotes that this `ProcessorVersion` is managed by Google.
      * 
* - * bool google_managed = 11; + * bool google_managed = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The googleManaged. */ @@ -3477,10 +3477,10 @@ public boolean getGoogleManaged() { * * *
-     * Denotes that this `ProcessorVersion` is managed by Google.
+     * Output only. Denotes that this `ProcessorVersion` is managed by Google.
      * 
* - * bool google_managed = 11; + * bool google_managed = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @param value The googleManaged to set. * @return This builder for chaining. @@ -3496,10 +3496,10 @@ public Builder setGoogleManaged(boolean value) { * * *
-     * Denotes that this `ProcessorVersion` is managed by Google.
+     * Output only. Denotes that this `ProcessorVersion` is managed by Google.
      * 
* - * bool google_managed = 11; + * bool google_managed = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return This builder for chaining. */ diff --git a/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessorVersionOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessorVersionOrBuilder.java index 3d88117ec04c..5f20b105f498 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessorVersionOrBuilder.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessorVersionOrBuilder.java @@ -261,10 +261,10 @@ public interface ProcessorVersionOrBuilder * * *
-   * Denotes that this `ProcessorVersion` is managed by Google.
+   * Output only. Denotes that this `ProcessorVersion` is managed by Google.
    * 
* - * bool google_managed = 11; + * bool google_managed = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The googleManaged. */ diff --git a/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/TrainProcessorVersionRequest.java b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/TrainProcessorVersionRequest.java index fbe56c69bd4b..b64e8f5b0dd4 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/TrainProcessorVersionRequest.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/TrainProcessorVersionRequest.java @@ -1136,6 +1136,955 @@ public com.google.protobuf.Parser getParserForType() { } } + public interface CustomDocumentExtractionOptionsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Training method to use for CDE training.
+     * 
+ * + * + * .google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions.TrainingMethod training_method = 3; + * + * + * @return The enum numeric value on the wire for trainingMethod. + */ + int getTrainingMethodValue(); + /** + * + * + *
+     * Training method to use for CDE training.
+     * 
+ * + * + * .google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions.TrainingMethod training_method = 3; + * + * + * @return The trainingMethod. + */ + com.google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions + .TrainingMethod + getTrainingMethod(); + } + /** + * + * + *
+   * Options to control the training of the Custom Document Extraction (CDE)
+   * Processor.
+   * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions} + */ + public static final class CustomDocumentExtractionOptions + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions) + CustomDocumentExtractionOptionsOrBuilder { + private static final long serialVersionUID = 0L; + // Use CustomDocumentExtractionOptions.newBuilder() to construct. + private CustomDocumentExtractionOptions( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CustomDocumentExtractionOptions() { + trainingMethod_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CustomDocumentExtractionOptions(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1_TrainProcessorVersionRequest_CustomDocumentExtractionOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1_TrainProcessorVersionRequest_CustomDocumentExtractionOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions.class, + com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions.Builder.class); + } + + /** + * + * + *
+     * Training Method for CDE. TRAINING_METHOD_UNSPECIFIED will fallback to
+     * MODEL_BASED.
+     * 
+ * + * Protobuf enum {@code + * google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions.TrainingMethod} + */ + public enum TrainingMethod implements com.google.protobuf.ProtocolMessageEnum { + /** TRAINING_METHOD_UNSPECIFIED = 0; */ + TRAINING_METHOD_UNSPECIFIED(0), + /** MODEL_BASED = 1; */ + MODEL_BASED(1), + /** TEMPLATE_BASED = 2; */ + TEMPLATE_BASED(2), + UNRECOGNIZED(-1), + ; + + /** TRAINING_METHOD_UNSPECIFIED = 0; */ + public static final int TRAINING_METHOD_UNSPECIFIED_VALUE = 0; + /** MODEL_BASED = 1; */ + public static final int MODEL_BASED_VALUE = 1; + /** TEMPLATE_BASED = 2; */ + public static final int TEMPLATE_BASED_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TrainingMethod 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 TrainingMethod forNumber(int value) { + switch (value) { + case 0: + return TRAINING_METHOD_UNSPECIFIED; + case 1: + return MODEL_BASED; + case 2: + return TEMPLATE_BASED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public TrainingMethod findValueByNumber(int number) { + return TrainingMethod.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final TrainingMethod[] VALUES = values(); + + public static TrainingMethod valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private TrainingMethod(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions.TrainingMethod) + } + + public static final int TRAINING_METHOD_FIELD_NUMBER = 3; + private int trainingMethod_ = 0; + /** + * + * + *
+     * Training method to use for CDE training.
+     * 
+ * + * + * .google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions.TrainingMethod training_method = 3; + * + * + * @return The enum numeric value on the wire for trainingMethod. + */ + @java.lang.Override + public int getTrainingMethodValue() { + return trainingMethod_; + } + /** + * + * + *
+     * Training method to use for CDE training.
+     * 
+ * + * + * .google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions.TrainingMethod training_method = 3; + * + * + * @return The trainingMethod. + */ + @java.lang.Override + public com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions.TrainingMethod + getTrainingMethod() { + com.google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions + .TrainingMethod + result = + com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions.TrainingMethod.forNumber(trainingMethod_); + return result == null + ? com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions.TrainingMethod.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (trainingMethod_ + != com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions.TrainingMethod.TRAINING_METHOD_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, trainingMethod_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (trainingMethod_ + != com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions.TrainingMethod.TRAINING_METHOD_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, trainingMethod_); + } + size += getUnknownFields().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.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions + other = + (com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions) + obj; + + if (trainingMethod_ != other.trainingMethod_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + TRAINING_METHOD_FIELD_NUMBER; + hash = (53 * hash) + trainingMethod_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions + 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.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions + 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.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions + 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.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions + 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.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions + 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.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Options to control the training of the Custom Document Extraction (CDE)
+     * Processor.
+     * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions) + com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1_TrainProcessorVersionRequest_CustomDocumentExtractionOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1_TrainProcessorVersionRequest_CustomDocumentExtractionOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions.class, + com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions.Builder.class); + } + + // Construct using + // com.google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + trainingMethod_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1_TrainProcessorVersionRequest_CustomDocumentExtractionOptions_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions + build() { + com.google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions + buildPartial() { + com.google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions + result = + new com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.trainingMethod_ = trainingMethod_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions) { + return mergeFrom( + (com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions + other) { + if (other + == com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions.getDefaultInstance()) return this; + if (other.trainingMethod_ != 0) { + setTrainingMethodValue(other.getTrainingMethodValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 24: + { + trainingMethod_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int trainingMethod_ = 0; + /** + * + * + *
+       * Training method to use for CDE training.
+       * 
+ * + * + * .google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions.TrainingMethod training_method = 3; + * + * + * @return The enum numeric value on the wire for trainingMethod. + */ + @java.lang.Override + public int getTrainingMethodValue() { + return trainingMethod_; + } + /** + * + * + *
+       * Training method to use for CDE training.
+       * 
+ * + * + * .google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions.TrainingMethod training_method = 3; + * + * + * @param value The enum numeric value on the wire for trainingMethod to set. + * @return This builder for chaining. + */ + public Builder setTrainingMethodValue(int value) { + trainingMethod_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Training method to use for CDE training.
+       * 
+ * + * + * .google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions.TrainingMethod training_method = 3; + * + * + * @return The trainingMethod. + */ + @java.lang.Override + public com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions.TrainingMethod + getTrainingMethod() { + com.google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions + .TrainingMethod + result = + com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions.TrainingMethod.forNumber(trainingMethod_); + return result == null + ? com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions.TrainingMethod.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Training method to use for CDE training.
+       * 
+ * + * + * .google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions.TrainingMethod training_method = 3; + * + * + * @param value The trainingMethod to set. + * @return This builder for chaining. + */ + public Builder setTrainingMethod( + com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions.TrainingMethod + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + trainingMethod_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Training method to use for CDE training.
+       * 
+ * + * + * .google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions.TrainingMethod training_method = 3; + * + * + * @return This builder for chaining. + */ + public Builder clearTrainingMethod() { + bitField0_ = (bitField0_ & ~0x00000001); + trainingMethod_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions) + private static final com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions(); + } + + public static com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CustomDocumentExtractionOptions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int processorFlagsCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object processorFlags_; + + public enum ProcessorFlagsCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + CUSTOM_DOCUMENT_EXTRACTION_OPTIONS(5), + PROCESSORFLAGS_NOT_SET(0); + private final int value; + + private ProcessorFlagsCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ProcessorFlagsCase valueOf(int value) { + return forNumber(value); + } + + public static ProcessorFlagsCase forNumber(int value) { + switch (value) { + case 5: + return CUSTOM_DOCUMENT_EXTRACTION_OPTIONS; + case 0: + return PROCESSORFLAGS_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ProcessorFlagsCase getProcessorFlagsCase() { + return ProcessorFlagsCase.forNumber(processorFlagsCase_); + } + + public static final int CUSTOM_DOCUMENT_EXTRACTION_OPTIONS_FIELD_NUMBER = 5; + /** + * + * + *
+   * Options to control Custom Document Extraction (CDE) Processor.
+   * 
+ * + * + * .google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions custom_document_extraction_options = 5; + * + * + * @return Whether the customDocumentExtractionOptions field is set. + */ + @java.lang.Override + public boolean hasCustomDocumentExtractionOptions() { + return processorFlagsCase_ == 5; + } + /** + * + * + *
+   * Options to control Custom Document Extraction (CDE) Processor.
+   * 
+ * + * + * .google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions custom_document_extraction_options = 5; + * + * + * @return The customDocumentExtractionOptions. + */ + @java.lang.Override + public com.google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions + getCustomDocumentExtractionOptions() { + if (processorFlagsCase_ == 5) { + return (com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions) + processorFlags_; + } + return com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions.getDefaultInstance(); + } + /** + * + * + *
+   * Options to control Custom Document Extraction (CDE) Processor.
+   * 
+ * + * + * .google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions custom_document_extraction_options = 5; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptionsOrBuilder + getCustomDocumentExtractionOptionsOrBuilder() { + if (processorFlagsCase_ == 5) { + return (com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions) + processorFlags_; + } + return com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions.getDefaultInstance(); + } + public static final int PARENT_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -1445,6 +2394,13 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (inputData_ != null) { output.writeMessage(4, getInputData()); } + if (processorFlagsCase_ == 5) { + output.writeMessage( + 5, + (com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions) + processorFlags_); + } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(baseProcessorVersion_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 8, baseProcessorVersion_); } @@ -1469,6 +2425,14 @@ public int getSerializedSize() { if (inputData_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getInputData()); } + if (processorFlagsCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, + (com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions) + processorFlags_); + } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(baseProcessorVersion_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, baseProcessorVersion_); } @@ -1505,6 +2469,15 @@ public boolean equals(final java.lang.Object obj) { if (!getInputData().equals(other.getInputData())) return false; } if (!getBaseProcessorVersion().equals(other.getBaseProcessorVersion())) return false; + if (!getProcessorFlagsCase().equals(other.getProcessorFlagsCase())) return false; + switch (processorFlagsCase_) { + case 5: + if (!getCustomDocumentExtractionOptions() + .equals(other.getCustomDocumentExtractionOptions())) return false; + break; + case 0: + default: + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1532,6 +2505,14 @@ public int hashCode() { } hash = (37 * hash) + BASE_PROCESSOR_VERSION_FIELD_NUMBER; hash = (53 * hash) + getBaseProcessorVersion().hashCode(); + switch (processorFlagsCase_) { + case 5: + hash = (37 * hash) + CUSTOM_DOCUMENT_EXTRACTION_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getCustomDocumentExtractionOptions().hashCode(); + break; + case 0: + default: + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1674,6 +2655,9 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { public Builder clear() { super.clear(); bitField0_ = 0; + if (customDocumentExtractionOptionsBuilder_ != null) { + customDocumentExtractionOptionsBuilder_.clear(); + } parent_ = ""; processorVersion_ = null; if (processorVersionBuilder_ != null) { @@ -1691,6 +2675,8 @@ public Builder clear() { inputDataBuilder_ = null; } baseProcessorVersion_ = ""; + processorFlagsCase_ = 0; + processorFlags_ = null; return this; } @@ -1721,31 +2707,41 @@ public com.google.cloud.documentai.v1.TrainProcessorVersionRequest buildPartial( if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); onBuilt(); return result; } private void buildPartial0(com.google.cloud.documentai.v1.TrainProcessorVersionRequest result) { int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { + if (((from_bitField0_ & 0x00000002) != 0)) { result.parent_ = parent_; } - if (((from_bitField0_ & 0x00000002) != 0)) { + if (((from_bitField0_ & 0x00000004) != 0)) { result.processorVersion_ = processorVersionBuilder_ == null ? processorVersion_ : processorVersionBuilder_.build(); } - if (((from_bitField0_ & 0x00000004) != 0)) { + if (((from_bitField0_ & 0x00000008) != 0)) { result.documentSchema_ = documentSchemaBuilder_ == null ? documentSchema_ : documentSchemaBuilder_.build(); } - if (((from_bitField0_ & 0x00000008) != 0)) { + if (((from_bitField0_ & 0x00000010) != 0)) { result.inputData_ = inputDataBuilder_ == null ? inputData_ : inputDataBuilder_.build(); } - if (((from_bitField0_ & 0x00000010) != 0)) { + if (((from_bitField0_ & 0x00000020) != 0)) { result.baseProcessorVersion_ = baseProcessorVersion_; } } + private void buildPartialOneofs( + com.google.cloud.documentai.v1.TrainProcessorVersionRequest result) { + result.processorFlagsCase_ = processorFlagsCase_; + result.processorFlags_ = this.processorFlags_; + if (processorFlagsCase_ == 5 && customDocumentExtractionOptionsBuilder_ != null) { + result.processorFlags_ = customDocumentExtractionOptionsBuilder_.build(); + } + } + @java.lang.Override public Builder clone() { return super.clone(); @@ -1794,7 +2790,7 @@ public Builder mergeFrom(com.google.cloud.documentai.v1.TrainProcessorVersionReq return this; if (!other.getParent().isEmpty()) { parent_ = other.parent_; - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000002; onChanged(); } if (other.hasProcessorVersion()) { @@ -1808,9 +2804,20 @@ public Builder mergeFrom(com.google.cloud.documentai.v1.TrainProcessorVersionReq } if (!other.getBaseProcessorVersion().isEmpty()) { baseProcessorVersion_ = other.baseProcessorVersion_; - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); } + switch (other.getProcessorFlagsCase()) { + case CUSTOM_DOCUMENT_EXTRACTION_OPTIONS: + { + mergeCustomDocumentExtractionOptions(other.getCustomDocumentExtractionOptions()); + break; + } + case PROCESSORFLAGS_NOT_SET: + { + break; + } + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1840,32 +2847,40 @@ public Builder mergeFrom( case 10: { parent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000002; break; } // case 10 case 18: { input.readMessage( getProcessorVersionFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; break; } // case 18 case 34: { input.readMessage(getInputDataFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; break; } // case 34 + case 42: + { + input.readMessage( + getCustomDocumentExtractionOptionsFieldBuilder().getBuilder(), + extensionRegistry); + processorFlagsCase_ = 5; + break; + } // case 42 case 66: { baseProcessorVersion_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; break; } // case 66 case 82: { input.readMessage(getDocumentSchemaFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; break; } // case 82 default: @@ -1885,8 +2900,286 @@ public Builder mergeFrom( return this; } + private int processorFlagsCase_ = 0; + private java.lang.Object processorFlags_; + + public ProcessorFlagsCase getProcessorFlagsCase() { + return ProcessorFlagsCase.forNumber(processorFlagsCase_); + } + + public Builder clearProcessorFlags() { + processorFlagsCase_ = 0; + processorFlags_ = null; + onChanged(); + return this; + } + private int bitField0_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions, + com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions.Builder, + com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptionsOrBuilder> + customDocumentExtractionOptionsBuilder_; + /** + * + * + *
+     * Options to control Custom Document Extraction (CDE) Processor.
+     * 
+ * + * + * .google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions custom_document_extraction_options = 5; + * + * + * @return Whether the customDocumentExtractionOptions field is set. + */ + @java.lang.Override + public boolean hasCustomDocumentExtractionOptions() { + return processorFlagsCase_ == 5; + } + /** + * + * + *
+     * Options to control Custom Document Extraction (CDE) Processor.
+     * 
+ * + * + * .google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions custom_document_extraction_options = 5; + * + * + * @return The customDocumentExtractionOptions. + */ + @java.lang.Override + public com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions + getCustomDocumentExtractionOptions() { + if (customDocumentExtractionOptionsBuilder_ == null) { + if (processorFlagsCase_ == 5) { + return (com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions) + processorFlags_; + } + return com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions.getDefaultInstance(); + } else { + if (processorFlagsCase_ == 5) { + return customDocumentExtractionOptionsBuilder_.getMessage(); + } + return com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions.getDefaultInstance(); + } + } + /** + * + * + *
+     * Options to control Custom Document Extraction (CDE) Processor.
+     * 
+ * + * + * .google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions custom_document_extraction_options = 5; + * + */ + public Builder setCustomDocumentExtractionOptions( + com.google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions + value) { + if (customDocumentExtractionOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + processorFlags_ = value; + onChanged(); + } else { + customDocumentExtractionOptionsBuilder_.setMessage(value); + } + processorFlagsCase_ = 5; + return this; + } + /** + * + * + *
+     * Options to control Custom Document Extraction (CDE) Processor.
+     * 
+ * + * + * .google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions custom_document_extraction_options = 5; + * + */ + public Builder setCustomDocumentExtractionOptions( + com.google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions + .Builder + builderForValue) { + if (customDocumentExtractionOptionsBuilder_ == null) { + processorFlags_ = builderForValue.build(); + onChanged(); + } else { + customDocumentExtractionOptionsBuilder_.setMessage(builderForValue.build()); + } + processorFlagsCase_ = 5; + return this; + } + /** + * + * + *
+     * Options to control Custom Document Extraction (CDE) Processor.
+     * 
+ * + * + * .google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions custom_document_extraction_options = 5; + * + */ + public Builder mergeCustomDocumentExtractionOptions( + com.google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions + value) { + if (customDocumentExtractionOptionsBuilder_ == null) { + if (processorFlagsCase_ == 5 + && processorFlags_ + != com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions.getDefaultInstance()) { + processorFlags_ = + com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions.newBuilder( + (com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions) + processorFlags_) + .mergeFrom(value) + .buildPartial(); + } else { + processorFlags_ = value; + } + onChanged(); + } else { + if (processorFlagsCase_ == 5) { + customDocumentExtractionOptionsBuilder_.mergeFrom(value); + } else { + customDocumentExtractionOptionsBuilder_.setMessage(value); + } + } + processorFlagsCase_ = 5; + return this; + } + /** + * + * + *
+     * Options to control Custom Document Extraction (CDE) Processor.
+     * 
+ * + * + * .google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions custom_document_extraction_options = 5; + * + */ + public Builder clearCustomDocumentExtractionOptions() { + if (customDocumentExtractionOptionsBuilder_ == null) { + if (processorFlagsCase_ == 5) { + processorFlagsCase_ = 0; + processorFlags_ = null; + onChanged(); + } + } else { + if (processorFlagsCase_ == 5) { + processorFlagsCase_ = 0; + processorFlags_ = null; + } + customDocumentExtractionOptionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Options to control Custom Document Extraction (CDE) Processor.
+     * 
+ * + * + * .google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions custom_document_extraction_options = 5; + * + */ + public com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions.Builder + getCustomDocumentExtractionOptionsBuilder() { + return getCustomDocumentExtractionOptionsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Options to control Custom Document Extraction (CDE) Processor.
+     * 
+ * + * + * .google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions custom_document_extraction_options = 5; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptionsOrBuilder + getCustomDocumentExtractionOptionsOrBuilder() { + if ((processorFlagsCase_ == 5) && (customDocumentExtractionOptionsBuilder_ != null)) { + return customDocumentExtractionOptionsBuilder_.getMessageOrBuilder(); + } else { + if (processorFlagsCase_ == 5) { + return (com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions) + processorFlags_; + } + return com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions.getDefaultInstance(); + } + } + /** + * + * + *
+     * Options to control Custom Document Extraction (CDE) Processor.
+     * 
+ * + * + * .google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions custom_document_extraction_options = 5; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions, + com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions.Builder, + com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptionsOrBuilder> + getCustomDocumentExtractionOptionsFieldBuilder() { + if (customDocumentExtractionOptionsBuilder_ == null) { + if (!(processorFlagsCase_ == 5)) { + processorFlags_ = + com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions.getDefaultInstance(); + } + customDocumentExtractionOptionsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions, + com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions.Builder, + com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptionsOrBuilder>( + (com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptions) + processorFlags_, + getParentForChildren(), + isClean()); + processorFlags_ = null; + } + processorFlagsCase_ = 5; + onChanged(); + return customDocumentExtractionOptionsBuilder_; + } + private java.lang.Object parent_ = ""; /** * @@ -1961,7 +3254,7 @@ public Builder setParent(java.lang.String value) { throw new NullPointerException(); } parent_ = value; - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -1982,7 +3275,7 @@ public Builder setParent(java.lang.String value) { */ public Builder clearParent() { parent_ = getDefaultInstance().getParent(); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -2008,7 +3301,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); parent_ = value; - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -2033,7 +3326,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * @return Whether the processorVersion field is set. */ public boolean hasProcessorVersion() { - return ((bitField0_ & 0x00000002) != 0); + return ((bitField0_ & 0x00000004) != 0); } /** * @@ -2077,7 +3370,7 @@ public Builder setProcessorVersion(com.google.cloud.documentai.v1.ProcessorVersi } else { processorVersionBuilder_.setMessage(value); } - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -2099,7 +3392,7 @@ public Builder setProcessorVersion( } else { processorVersionBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -2116,7 +3409,7 @@ public Builder setProcessorVersion( */ public Builder mergeProcessorVersion(com.google.cloud.documentai.v1.ProcessorVersion value) { if (processorVersionBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) + if (((bitField0_ & 0x00000004) != 0) && processorVersion_ != null && processorVersion_ != com.google.cloud.documentai.v1.ProcessorVersion.getDefaultInstance()) { @@ -2127,7 +3420,7 @@ public Builder mergeProcessorVersion(com.google.cloud.documentai.v1.ProcessorVer } else { processorVersionBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -2143,7 +3436,7 @@ public Builder mergeProcessorVersion(com.google.cloud.documentai.v1.ProcessorVer * */ public Builder clearProcessorVersion() { - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000004); processorVersion_ = null; if (processorVersionBuilder_ != null) { processorVersionBuilder_.dispose(); @@ -2164,7 +3457,7 @@ public Builder clearProcessorVersion() { * */ public com.google.cloud.documentai.v1.ProcessorVersion.Builder getProcessorVersionBuilder() { - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; onChanged(); return getProcessorVersionFieldBuilder().getBuilder(); } @@ -2236,7 +3529,7 @@ public com.google.cloud.documentai.v1.ProcessorVersionOrBuilder getProcessorVers * @return Whether the documentSchema field is set. */ public boolean hasDocumentSchema() { - return ((bitField0_ & 0x00000004) != 0); + return ((bitField0_ & 0x00000008) != 0); } /** * @@ -2280,7 +3573,7 @@ public Builder setDocumentSchema(com.google.cloud.documentai.v1.DocumentSchema v } else { documentSchemaBuilder_.setMessage(value); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -2302,7 +3595,7 @@ public Builder setDocumentSchema( } else { documentSchemaBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -2319,7 +3612,7 @@ public Builder setDocumentSchema( */ public Builder mergeDocumentSchema(com.google.cloud.documentai.v1.DocumentSchema value) { if (documentSchemaBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) + if (((bitField0_ & 0x00000008) != 0) && documentSchema_ != null && documentSchema_ != com.google.cloud.documentai.v1.DocumentSchema.getDefaultInstance()) { @@ -2330,7 +3623,7 @@ public Builder mergeDocumentSchema(com.google.cloud.documentai.v1.DocumentSchema } else { documentSchemaBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -2346,7 +3639,7 @@ public Builder mergeDocumentSchema(com.google.cloud.documentai.v1.DocumentSchema * */ public Builder clearDocumentSchema() { - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); documentSchema_ = null; if (documentSchemaBuilder_ != null) { documentSchemaBuilder_.dispose(); @@ -2367,7 +3660,7 @@ public Builder clearDocumentSchema() { * */ public com.google.cloud.documentai.v1.DocumentSchema.Builder getDocumentSchemaBuilder() { - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return getDocumentSchemaFieldBuilder().getBuilder(); } @@ -2440,7 +3733,7 @@ public com.google.cloud.documentai.v1.DocumentSchemaOrBuilder getDocumentSchemaO * @return Whether the inputData field is set. */ public boolean hasInputData() { - return ((bitField0_ & 0x00000008) != 0); + return ((bitField0_ & 0x00000010) != 0); } /** * @@ -2488,7 +3781,7 @@ public Builder setInputData( } else { inputDataBuilder_.setMessage(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -2512,7 +3805,7 @@ public Builder setInputData( } else { inputDataBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -2531,7 +3824,7 @@ public Builder setInputData( public Builder mergeInputData( com.google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData value) { if (inputDataBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) + if (((bitField0_ & 0x00000010) != 0) && inputData_ != null && inputData_ != com.google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData @@ -2543,7 +3836,7 @@ public Builder mergeInputData( } else { inputDataBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -2560,7 +3853,7 @@ public Builder mergeInputData( * */ public Builder clearInputData() { - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); inputData_ = null; if (inputDataBuilder_ != null) { inputDataBuilder_.dispose(); @@ -2583,7 +3876,7 @@ public Builder clearInputData() { */ public com.google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData.Builder getInputDataBuilder() { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return getInputDataFieldBuilder().getBuilder(); } @@ -2707,7 +4000,7 @@ public Builder setBaseProcessorVersion(java.lang.String value) { throw new NullPointerException(); } baseProcessorVersion_ = value; - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2726,7 +4019,7 @@ public Builder setBaseProcessorVersion(java.lang.String value) { */ public Builder clearBaseProcessorVersion() { baseProcessorVersion_ = getDefaultInstance().getBaseProcessorVersion(); - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000020); onChanged(); return this; } @@ -2750,7 +4043,7 @@ public Builder setBaseProcessorVersionBytes(com.google.protobuf.ByteString value } checkByteStringIsUtf8(value); baseProcessorVersion_ = value; - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } diff --git a/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/TrainProcessorVersionRequestOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/TrainProcessorVersionRequestOrBuilder.java index a152020e58d2..f83b64732dd6 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/TrainProcessorVersionRequestOrBuilder.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/TrainProcessorVersionRequestOrBuilder.java @@ -23,6 +23,50 @@ public interface TrainProcessorVersionRequestOrBuilder // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1.TrainProcessorVersionRequest) com.google.protobuf.MessageOrBuilder { + /** + * + * + *
+   * Options to control Custom Document Extraction (CDE) Processor.
+   * 
+ * + * + * .google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions custom_document_extraction_options = 5; + * + * + * @return Whether the customDocumentExtractionOptions field is set. + */ + boolean hasCustomDocumentExtractionOptions(); + /** + * + * + *
+   * Options to control Custom Document Extraction (CDE) Processor.
+   * 
+ * + * + * .google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions custom_document_extraction_options = 5; + * + * + * @return The customDocumentExtractionOptions. + */ + com.google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions + getCustomDocumentExtractionOptions(); + /** + * + * + *
+   * Options to control Custom Document Extraction (CDE) Processor.
+   * 
+ * + * + * .google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions custom_document_extraction_options = 5; + * + */ + com.google.cloud.documentai.v1.TrainProcessorVersionRequest + .CustomDocumentExtractionOptionsOrBuilder + getCustomDocumentExtractionOptionsOrBuilder(); + /** * * @@ -211,4 +255,7 @@ public interface TrainProcessorVersionRequestOrBuilder * @return The bytes for baseProcessorVersion. */ com.google.protobuf.ByteString getBaseProcessorVersionBytes(); + + com.google.cloud.documentai.v1.TrainProcessorVersionRequest.ProcessorFlagsCase + getProcessorFlagsCase(); } diff --git a/java-document-ai/proto-google-cloud-document-ai-v1/src/main/proto/google/cloud/documentai/v1/document_io.proto b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/proto/google/cloud/documentai/v1/document_io.proto index 48adefbb98ba..6c2be1117342 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1/src/main/proto/google/cloud/documentai/v1/document_io.proto +++ b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/proto/google/cloud/documentai/v1/document_io.proto @@ -101,3 +101,44 @@ message DocumentOutputConfig { GcsOutputConfig gcs_output_config = 1; } } + +// Config for Document OCR. +message OcrConfig { + // Hints for OCR Engine + message Hints { + // List of BCP-47 language codes to use for OCR. In most cases, not + // specifying it yields the best results since it enables automatic language + // detection. For languages based on the Latin alphabet, setting hints is + // not needed. In rare cases, when the language of the text in the + // image is known, setting a hint will help get better results (although it + // will be a significant hindrance if the hint is wrong). + repeated string language_hints = 1; + } + + // Hints for the OCR model. + Hints hints = 2; + + // Enables special handling for PDFs with existing text information. Results + // in better text extraction quality in such PDF inputs. + bool enable_native_pdf_parsing = 3; + + // Enables intelligent document quality scores after OCR. Can help with + // diagnosing why OCR responses are of poor quality for a given input. + // Adds additional latency comparable to regular OCR to the process call. + bool enable_image_quality_scores = 4; + + // A list of advanced OCR options to further fine-tune OCR behavior. Current + // valid values are: + // + // - `legacy_layout`: a heuristics layout detection algorithm, which serves as + // an alternative to the current ML-based layout detection algorithm. + // Customers can choose the best suitable layout algorithm based on their + // situation. + repeated string advanced_ocr_options = 5; + + // Includes symbol level OCR information if set to true. + bool enable_symbol = 6; + + // Turn on font id model and returns font style information. + bool compute_style_info = 8; +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1/src/main/proto/google/cloud/documentai/v1/document_processor_service.proto b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/proto/google/cloud/documentai/v1/document_processor_service.proto index 915f0fd64381..03c3d4090ba6 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1/src/main/proto/google/cloud/documentai/v1/document_processor_service.proto +++ b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/proto/google/cloud/documentai/v1/document_processor_service.proto @@ -326,6 +326,13 @@ service DocumentProcessorService { } } +// Options for Process API +message ProcessOptions { + // Only applicable to `OCR_PROCESSOR`. Returns error if set on other + // processor types. + OcrConfig ocr_config = 1; +} + // Request message for the // [ProcessDocument][google.cloud.documentai.v1.DocumentProcessorService.ProcessDocument] // method. @@ -337,6 +344,9 @@ message ProcessRequest { // A raw document content (bytes). RawDocument raw_document = 5; + + // A raw document on Google Cloud Storage. + GcsDocument gcs_document = 8; } // Required. The resource name of the @@ -363,6 +373,9 @@ message ProcessRequest { // output. Only supports top-level document and pages field, so it must be in // the form of `{document_field_name}` or `pages.{page_field_name}`. google.protobuf.FieldMask field_mask = 6; + + // Inference-time options for the process API + ProcessOptions process_options = 7; } // The status of human review on a processed document. @@ -443,6 +456,9 @@ message BatchProcessRequest { // Whether human review should be skipped for this request. Default to // `false`. bool skip_human_review = 4; + + // Inference-time options for the process API + ProcessOptions process_options = 7; } // Response message for @@ -895,6 +911,28 @@ message TrainProcessorVersionRequest { BatchDocumentsInputConfig test_documents = 4; } + // Options to control the training of the Custom Document Extraction (CDE) + // Processor. + message CustomDocumentExtractionOptions { + // Training Method for CDE. TRAINING_METHOD_UNSPECIFIED will fallback to + // MODEL_BASED. + enum TrainingMethod { + TRAINING_METHOD_UNSPECIFIED = 0; + + MODEL_BASED = 1; + + TEMPLATE_BASED = 2; + } + + // Training method to use for CDE training. + TrainingMethod training_method = 3; + } + + oneof processor_flags { + // Options to control Custom Document Extraction (CDE) Processor. + CustomDocumentExtractionOptions custom_document_extraction_options = 5; + } + // Required. The parent (project, location and processor) to create the new // version for. Format: // `projects/{project}/locations/{location}/processors/{processor}`. diff --git a/java-document-ai/proto-google-cloud-document-ai-v1/src/main/proto/google/cloud/documentai/v1/processor.proto b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/proto/google/cloud/documentai/v1/processor.proto index 68b99bcbd956..9d3746e7e741 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1/src/main/proto/google/cloud/documentai/v1/processor.proto +++ b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/proto/google/cloud/documentai/v1/processor.proto @@ -108,8 +108,8 @@ message ProcessorVersion { // The KMS key version with which data is encrypted. string kms_key_version_name = 10; - // Denotes that this `ProcessorVersion` is managed by Google. - bool google_managed = 11; + // Output only. Denotes that this `ProcessorVersion` is managed by Google. + bool google_managed = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; // If set, information about the eventual deprecation of this version. DeprecationInfo deprecation_info = 13; diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/Barcode.java b/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/Barcode.java new file mode 100644 index 000000000000..d02fb62dcaed --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/Barcode.java @@ -0,0 +1,1211 @@ +/* + * Copyright 2023 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/v1beta2/barcode.proto + +package com.google.cloud.documentai.v1beta2; + +/** + * + * + *
+ * Encodes the detailed information of a barcode.
+ * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta2.Barcode} + */ +public final class Barcode extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Barcode) + BarcodeOrBuilder { + private static final long serialVersionUID = 0L; + // Use Barcode.newBuilder() to construct. + private Barcode(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Barcode() { + format_ = ""; + valueFormat_ = ""; + rawValue_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Barcode(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.BarcodeProto + .internal_static_google_cloud_documentai_v1beta2_Barcode_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.BarcodeProto + .internal_static_google_cloud_documentai_v1beta2_Barcode_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Barcode.class, + com.google.cloud.documentai.v1beta2.Barcode.Builder.class); + } + + public static final int FORMAT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object format_ = ""; + /** + * + * + *
+   * Format of a barcode.
+   * The supported formats are:
+   *
+   * - `CODE_128`: Code 128 type.
+   * - `CODE_39`: Code 39 type.
+   * - `CODE_93`: Code 93 type.
+   * - `CODABAR`: Codabar type.
+   * - `DATA_MATRIX`: 2D Data Matrix type.
+   * - `ITF`: ITF type.
+   * - `EAN_13`: EAN-13 type.
+   * - `EAN_8`: EAN-8 type.
+   * - `QR_CODE`: 2D QR code type.
+   * - `UPC_A`: UPC-A type.
+   * - `UPC_E`: UPC-E type.
+   * - `PDF417`: PDF417 type.
+   * - `AZTEC`: 2D Aztec code type.
+   * - `DATABAR`: GS1 DataBar code type.
+   * 
+ * + * string format = 1; + * + * @return The format. + */ + @java.lang.Override + public java.lang.String getFormat() { + java.lang.Object ref = format_; + 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(); + format_ = s; + return s; + } + } + /** + * + * + *
+   * Format of a barcode.
+   * The supported formats are:
+   *
+   * - `CODE_128`: Code 128 type.
+   * - `CODE_39`: Code 39 type.
+   * - `CODE_93`: Code 93 type.
+   * - `CODABAR`: Codabar type.
+   * - `DATA_MATRIX`: 2D Data Matrix type.
+   * - `ITF`: ITF type.
+   * - `EAN_13`: EAN-13 type.
+   * - `EAN_8`: EAN-8 type.
+   * - `QR_CODE`: 2D QR code type.
+   * - `UPC_A`: UPC-A type.
+   * - `UPC_E`: UPC-E type.
+   * - `PDF417`: PDF417 type.
+   * - `AZTEC`: 2D Aztec code type.
+   * - `DATABAR`: GS1 DataBar code type.
+   * 
+ * + * string format = 1; + * + * @return The bytes for format. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFormatBytes() { + java.lang.Object ref = format_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + format_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_FORMAT_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object valueFormat_ = ""; + /** + * + * + *
+   * Value format describes the format of the value that a barcode
+   * encodes.
+   * The supported formats are:
+   *
+   * - `CONTACT_INFO`: Contact information.
+   * - `EMAIL`: Email address.
+   * - `ISBN`: ISBN identifier.
+   * - `PHONE`: Phone number.
+   * - `PRODUCT`: Product.
+   * - `SMS`: SMS message.
+   * - `TEXT`: Text string.
+   * - `URL`: URL address.
+   * - `WIFI`: Wifi information.
+   * - `GEO`: Geo-localization.
+   * - `CALENDAR_EVENT`: Calendar event.
+   * - `DRIVER_LICENSE`: Driver's license.
+   * 
+ * + * string value_format = 2; + * + * @return The valueFormat. + */ + @java.lang.Override + public java.lang.String getValueFormat() { + java.lang.Object ref = valueFormat_; + 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(); + valueFormat_ = s; + return s; + } + } + /** + * + * + *
+   * Value format describes the format of the value that a barcode
+   * encodes.
+   * The supported formats are:
+   *
+   * - `CONTACT_INFO`: Contact information.
+   * - `EMAIL`: Email address.
+   * - `ISBN`: ISBN identifier.
+   * - `PHONE`: Phone number.
+   * - `PRODUCT`: Product.
+   * - `SMS`: SMS message.
+   * - `TEXT`: Text string.
+   * - `URL`: URL address.
+   * - `WIFI`: Wifi information.
+   * - `GEO`: Geo-localization.
+   * - `CALENDAR_EVENT`: Calendar event.
+   * - `DRIVER_LICENSE`: Driver's license.
+   * 
+ * + * string value_format = 2; + * + * @return The bytes for valueFormat. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValueFormatBytes() { + java.lang.Object ref = valueFormat_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + valueFormat_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RAW_VALUE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object rawValue_ = ""; + /** + * + * + *
+   * Raw value encoded in the barcode.
+   * For example: `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`.
+   * 
+ * + * string raw_value = 3; + * + * @return The rawValue. + */ + @java.lang.Override + public java.lang.String getRawValue() { + java.lang.Object ref = rawValue_; + 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(); + rawValue_ = s; + return s; + } + } + /** + * + * + *
+   * Raw value encoded in the barcode.
+   * For example: `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`.
+   * 
+ * + * string raw_value = 3; + * + * @return The bytes for rawValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRawValueBytes() { + java.lang.Object ref = rawValue_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + rawValue_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(format_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, format_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(valueFormat_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, valueFormat_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rawValue_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, rawValue_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(format_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, format_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(valueFormat_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, valueFormat_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rawValue_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, rawValue_); + } + size += getUnknownFields().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.v1beta2.Barcode)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta2.Barcode other = + (com.google.cloud.documentai.v1beta2.Barcode) obj; + + if (!getFormat().equals(other.getFormat())) return false; + if (!getValueFormat().equals(other.getValueFormat())) return false; + if (!getRawValue().equals(other.getRawValue())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + FORMAT_FIELD_NUMBER; + hash = (53 * hash) + getFormat().hashCode(); + hash = (37 * hash) + VALUE_FORMAT_FIELD_NUMBER; + hash = (53 * hash) + getValueFormat().hashCode(); + hash = (37 * hash) + RAW_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getRawValue().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta2.Barcode parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Barcode 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.v1beta2.Barcode parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Barcode 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.v1beta2.Barcode parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Barcode parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta2.Barcode parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Barcode 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.v1beta2.Barcode parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Barcode 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.v1beta2.Barcode parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Barcode 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.v1beta2.Barcode 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; + } + /** + * + * + *
+   * Encodes the detailed information of a barcode.
+   * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta2.Barcode} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Barcode) + com.google.cloud.documentai.v1beta2.BarcodeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.BarcodeProto + .internal_static_google_cloud_documentai_v1beta2_Barcode_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.BarcodeProto + .internal_static_google_cloud_documentai_v1beta2_Barcode_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Barcode.class, + com.google.cloud.documentai.v1beta2.Barcode.Builder.class); + } + + // Construct using com.google.cloud.documentai.v1beta2.Barcode.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + format_ = ""; + valueFormat_ = ""; + rawValue_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta2.BarcodeProto + .internal_static_google_cloud_documentai_v1beta2_Barcode_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Barcode getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta2.Barcode.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Barcode build() { + com.google.cloud.documentai.v1beta2.Barcode result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Barcode buildPartial() { + com.google.cloud.documentai.v1beta2.Barcode result = + new com.google.cloud.documentai.v1beta2.Barcode(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.documentai.v1beta2.Barcode result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.format_ = format_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.valueFormat_ = valueFormat_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.rawValue_ = rawValue_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta2.Barcode) { + return mergeFrom((com.google.cloud.documentai.v1beta2.Barcode) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.documentai.v1beta2.Barcode other) { + if (other == com.google.cloud.documentai.v1beta2.Barcode.getDefaultInstance()) return this; + if (!other.getFormat().isEmpty()) { + format_ = other.format_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getValueFormat().isEmpty()) { + valueFormat_ = other.valueFormat_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getRawValue().isEmpty()) { + rawValue_ = other.rawValue_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + format_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + valueFormat_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + rawValue_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object format_ = ""; + /** + * + * + *
+     * Format of a barcode.
+     * The supported formats are:
+     *
+     * - `CODE_128`: Code 128 type.
+     * - `CODE_39`: Code 39 type.
+     * - `CODE_93`: Code 93 type.
+     * - `CODABAR`: Codabar type.
+     * - `DATA_MATRIX`: 2D Data Matrix type.
+     * - `ITF`: ITF type.
+     * - `EAN_13`: EAN-13 type.
+     * - `EAN_8`: EAN-8 type.
+     * - `QR_CODE`: 2D QR code type.
+     * - `UPC_A`: UPC-A type.
+     * - `UPC_E`: UPC-E type.
+     * - `PDF417`: PDF417 type.
+     * - `AZTEC`: 2D Aztec code type.
+     * - `DATABAR`: GS1 DataBar code type.
+     * 
+ * + * string format = 1; + * + * @return The format. + */ + public java.lang.String getFormat() { + java.lang.Object ref = format_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + format_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Format of a barcode.
+     * The supported formats are:
+     *
+     * - `CODE_128`: Code 128 type.
+     * - `CODE_39`: Code 39 type.
+     * - `CODE_93`: Code 93 type.
+     * - `CODABAR`: Codabar type.
+     * - `DATA_MATRIX`: 2D Data Matrix type.
+     * - `ITF`: ITF type.
+     * - `EAN_13`: EAN-13 type.
+     * - `EAN_8`: EAN-8 type.
+     * - `QR_CODE`: 2D QR code type.
+     * - `UPC_A`: UPC-A type.
+     * - `UPC_E`: UPC-E type.
+     * - `PDF417`: PDF417 type.
+     * - `AZTEC`: 2D Aztec code type.
+     * - `DATABAR`: GS1 DataBar code type.
+     * 
+ * + * string format = 1; + * + * @return The bytes for format. + */ + public com.google.protobuf.ByteString getFormatBytes() { + java.lang.Object ref = format_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + format_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Format of a barcode.
+     * The supported formats are:
+     *
+     * - `CODE_128`: Code 128 type.
+     * - `CODE_39`: Code 39 type.
+     * - `CODE_93`: Code 93 type.
+     * - `CODABAR`: Codabar type.
+     * - `DATA_MATRIX`: 2D Data Matrix type.
+     * - `ITF`: ITF type.
+     * - `EAN_13`: EAN-13 type.
+     * - `EAN_8`: EAN-8 type.
+     * - `QR_CODE`: 2D QR code type.
+     * - `UPC_A`: UPC-A type.
+     * - `UPC_E`: UPC-E type.
+     * - `PDF417`: PDF417 type.
+     * - `AZTEC`: 2D Aztec code type.
+     * - `DATABAR`: GS1 DataBar code type.
+     * 
+ * + * string format = 1; + * + * @param value The format to set. + * @return This builder for chaining. + */ + public Builder setFormat(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + format_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Format of a barcode.
+     * The supported formats are:
+     *
+     * - `CODE_128`: Code 128 type.
+     * - `CODE_39`: Code 39 type.
+     * - `CODE_93`: Code 93 type.
+     * - `CODABAR`: Codabar type.
+     * - `DATA_MATRIX`: 2D Data Matrix type.
+     * - `ITF`: ITF type.
+     * - `EAN_13`: EAN-13 type.
+     * - `EAN_8`: EAN-8 type.
+     * - `QR_CODE`: 2D QR code type.
+     * - `UPC_A`: UPC-A type.
+     * - `UPC_E`: UPC-E type.
+     * - `PDF417`: PDF417 type.
+     * - `AZTEC`: 2D Aztec code type.
+     * - `DATABAR`: GS1 DataBar code type.
+     * 
+ * + * string format = 1; + * + * @return This builder for chaining. + */ + public Builder clearFormat() { + format_ = getDefaultInstance().getFormat(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Format of a barcode.
+     * The supported formats are:
+     *
+     * - `CODE_128`: Code 128 type.
+     * - `CODE_39`: Code 39 type.
+     * - `CODE_93`: Code 93 type.
+     * - `CODABAR`: Codabar type.
+     * - `DATA_MATRIX`: 2D Data Matrix type.
+     * - `ITF`: ITF type.
+     * - `EAN_13`: EAN-13 type.
+     * - `EAN_8`: EAN-8 type.
+     * - `QR_CODE`: 2D QR code type.
+     * - `UPC_A`: UPC-A type.
+     * - `UPC_E`: UPC-E type.
+     * - `PDF417`: PDF417 type.
+     * - `AZTEC`: 2D Aztec code type.
+     * - `DATABAR`: GS1 DataBar code type.
+     * 
+ * + * string format = 1; + * + * @param value The bytes for format to set. + * @return This builder for chaining. + */ + public Builder setFormatBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + format_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object valueFormat_ = ""; + /** + * + * + *
+     * Value format describes the format of the value that a barcode
+     * encodes.
+     * The supported formats are:
+     *
+     * - `CONTACT_INFO`: Contact information.
+     * - `EMAIL`: Email address.
+     * - `ISBN`: ISBN identifier.
+     * - `PHONE`: Phone number.
+     * - `PRODUCT`: Product.
+     * - `SMS`: SMS message.
+     * - `TEXT`: Text string.
+     * - `URL`: URL address.
+     * - `WIFI`: Wifi information.
+     * - `GEO`: Geo-localization.
+     * - `CALENDAR_EVENT`: Calendar event.
+     * - `DRIVER_LICENSE`: Driver's license.
+     * 
+ * + * string value_format = 2; + * + * @return The valueFormat. + */ + public java.lang.String getValueFormat() { + java.lang.Object ref = valueFormat_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + valueFormat_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Value format describes the format of the value that a barcode
+     * encodes.
+     * The supported formats are:
+     *
+     * - `CONTACT_INFO`: Contact information.
+     * - `EMAIL`: Email address.
+     * - `ISBN`: ISBN identifier.
+     * - `PHONE`: Phone number.
+     * - `PRODUCT`: Product.
+     * - `SMS`: SMS message.
+     * - `TEXT`: Text string.
+     * - `URL`: URL address.
+     * - `WIFI`: Wifi information.
+     * - `GEO`: Geo-localization.
+     * - `CALENDAR_EVENT`: Calendar event.
+     * - `DRIVER_LICENSE`: Driver's license.
+     * 
+ * + * string value_format = 2; + * + * @return The bytes for valueFormat. + */ + public com.google.protobuf.ByteString getValueFormatBytes() { + java.lang.Object ref = valueFormat_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + valueFormat_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Value format describes the format of the value that a barcode
+     * encodes.
+     * The supported formats are:
+     *
+     * - `CONTACT_INFO`: Contact information.
+     * - `EMAIL`: Email address.
+     * - `ISBN`: ISBN identifier.
+     * - `PHONE`: Phone number.
+     * - `PRODUCT`: Product.
+     * - `SMS`: SMS message.
+     * - `TEXT`: Text string.
+     * - `URL`: URL address.
+     * - `WIFI`: Wifi information.
+     * - `GEO`: Geo-localization.
+     * - `CALENDAR_EVENT`: Calendar event.
+     * - `DRIVER_LICENSE`: Driver's license.
+     * 
+ * + * string value_format = 2; + * + * @param value The valueFormat to set. + * @return This builder for chaining. + */ + public Builder setValueFormat(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + valueFormat_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Value format describes the format of the value that a barcode
+     * encodes.
+     * The supported formats are:
+     *
+     * - `CONTACT_INFO`: Contact information.
+     * - `EMAIL`: Email address.
+     * - `ISBN`: ISBN identifier.
+     * - `PHONE`: Phone number.
+     * - `PRODUCT`: Product.
+     * - `SMS`: SMS message.
+     * - `TEXT`: Text string.
+     * - `URL`: URL address.
+     * - `WIFI`: Wifi information.
+     * - `GEO`: Geo-localization.
+     * - `CALENDAR_EVENT`: Calendar event.
+     * - `DRIVER_LICENSE`: Driver's license.
+     * 
+ * + * string value_format = 2; + * + * @return This builder for chaining. + */ + public Builder clearValueFormat() { + valueFormat_ = getDefaultInstance().getValueFormat(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Value format describes the format of the value that a barcode
+     * encodes.
+     * The supported formats are:
+     *
+     * - `CONTACT_INFO`: Contact information.
+     * - `EMAIL`: Email address.
+     * - `ISBN`: ISBN identifier.
+     * - `PHONE`: Phone number.
+     * - `PRODUCT`: Product.
+     * - `SMS`: SMS message.
+     * - `TEXT`: Text string.
+     * - `URL`: URL address.
+     * - `WIFI`: Wifi information.
+     * - `GEO`: Geo-localization.
+     * - `CALENDAR_EVENT`: Calendar event.
+     * - `DRIVER_LICENSE`: Driver's license.
+     * 
+ * + * string value_format = 2; + * + * @param value The bytes for valueFormat to set. + * @return This builder for chaining. + */ + public Builder setValueFormatBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + valueFormat_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object rawValue_ = ""; + /** + * + * + *
+     * Raw value encoded in the barcode.
+     * For example: `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`.
+     * 
+ * + * string raw_value = 3; + * + * @return The rawValue. + */ + public java.lang.String getRawValue() { + java.lang.Object ref = rawValue_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rawValue_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Raw value encoded in the barcode.
+     * For example: `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`.
+     * 
+ * + * string raw_value = 3; + * + * @return The bytes for rawValue. + */ + public com.google.protobuf.ByteString getRawValueBytes() { + java.lang.Object ref = rawValue_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + rawValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Raw value encoded in the barcode.
+     * For example: `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`.
+     * 
+ * + * string raw_value = 3; + * + * @param value The rawValue to set. + * @return This builder for chaining. + */ + public Builder setRawValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + rawValue_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Raw value encoded in the barcode.
+     * For example: `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`.
+     * 
+ * + * string raw_value = 3; + * + * @return This builder for chaining. + */ + public Builder clearRawValue() { + rawValue_ = getDefaultInstance().getRawValue(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Raw value encoded in the barcode.
+     * For example: `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`.
+     * 
+ * + * string raw_value = 3; + * + * @param value The bytes for rawValue to set. + * @return This builder for chaining. + */ + public Builder setRawValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + rawValue_ = value; + bitField0_ |= 0x00000004; + 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.v1beta2.Barcode) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Barcode) + private static final com.google.cloud.documentai.v1beta2.Barcode DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta2.Barcode(); + } + + public static com.google.cloud.documentai.v1beta2.Barcode getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Barcode parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Barcode getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/BarcodeOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/BarcodeOrBuilder.java new file mode 100644 index 000000000000..480dcdcbd180 --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/BarcodeOrBuilder.java @@ -0,0 +1,164 @@ +/* + * Copyright 2023 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/v1beta2/barcode.proto + +package com.google.cloud.documentai.v1beta2; + +public interface BarcodeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Barcode) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Format of a barcode.
+   * The supported formats are:
+   *
+   * - `CODE_128`: Code 128 type.
+   * - `CODE_39`: Code 39 type.
+   * - `CODE_93`: Code 93 type.
+   * - `CODABAR`: Codabar type.
+   * - `DATA_MATRIX`: 2D Data Matrix type.
+   * - `ITF`: ITF type.
+   * - `EAN_13`: EAN-13 type.
+   * - `EAN_8`: EAN-8 type.
+   * - `QR_CODE`: 2D QR code type.
+   * - `UPC_A`: UPC-A type.
+   * - `UPC_E`: UPC-E type.
+   * - `PDF417`: PDF417 type.
+   * - `AZTEC`: 2D Aztec code type.
+   * - `DATABAR`: GS1 DataBar code type.
+   * 
+ * + * string format = 1; + * + * @return The format. + */ + java.lang.String getFormat(); + /** + * + * + *
+   * Format of a barcode.
+   * The supported formats are:
+   *
+   * - `CODE_128`: Code 128 type.
+   * - `CODE_39`: Code 39 type.
+   * - `CODE_93`: Code 93 type.
+   * - `CODABAR`: Codabar type.
+   * - `DATA_MATRIX`: 2D Data Matrix type.
+   * - `ITF`: ITF type.
+   * - `EAN_13`: EAN-13 type.
+   * - `EAN_8`: EAN-8 type.
+   * - `QR_CODE`: 2D QR code type.
+   * - `UPC_A`: UPC-A type.
+   * - `UPC_E`: UPC-E type.
+   * - `PDF417`: PDF417 type.
+   * - `AZTEC`: 2D Aztec code type.
+   * - `DATABAR`: GS1 DataBar code type.
+   * 
+ * + * string format = 1; + * + * @return The bytes for format. + */ + com.google.protobuf.ByteString getFormatBytes(); + + /** + * + * + *
+   * Value format describes the format of the value that a barcode
+   * encodes.
+   * The supported formats are:
+   *
+   * - `CONTACT_INFO`: Contact information.
+   * - `EMAIL`: Email address.
+   * - `ISBN`: ISBN identifier.
+   * - `PHONE`: Phone number.
+   * - `PRODUCT`: Product.
+   * - `SMS`: SMS message.
+   * - `TEXT`: Text string.
+   * - `URL`: URL address.
+   * - `WIFI`: Wifi information.
+   * - `GEO`: Geo-localization.
+   * - `CALENDAR_EVENT`: Calendar event.
+   * - `DRIVER_LICENSE`: Driver's license.
+   * 
+ * + * string value_format = 2; + * + * @return The valueFormat. + */ + java.lang.String getValueFormat(); + /** + * + * + *
+   * Value format describes the format of the value that a barcode
+   * encodes.
+   * The supported formats are:
+   *
+   * - `CONTACT_INFO`: Contact information.
+   * - `EMAIL`: Email address.
+   * - `ISBN`: ISBN identifier.
+   * - `PHONE`: Phone number.
+   * - `PRODUCT`: Product.
+   * - `SMS`: SMS message.
+   * - `TEXT`: Text string.
+   * - `URL`: URL address.
+   * - `WIFI`: Wifi information.
+   * - `GEO`: Geo-localization.
+   * - `CALENDAR_EVENT`: Calendar event.
+   * - `DRIVER_LICENSE`: Driver's license.
+   * 
+ * + * string value_format = 2; + * + * @return The bytes for valueFormat. + */ + com.google.protobuf.ByteString getValueFormatBytes(); + + /** + * + * + *
+   * Raw value encoded in the barcode.
+   * For example: `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`.
+   * 
+ * + * string raw_value = 3; + * + * @return The rawValue. + */ + java.lang.String getRawValue(); + /** + * + * + *
+   * Raw value encoded in the barcode.
+   * For example: `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`.
+   * 
+ * + * string raw_value = 3; + * + * @return The bytes for rawValue. + */ + com.google.protobuf.ByteString getRawValueBytes(); +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/BarcodeProto.java b/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/BarcodeProto.java new file mode 100644 index 000000000000..03ed8b9733e5 --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/BarcodeProto.java @@ -0,0 +1,68 @@ +/* + * Copyright 2023 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/v1beta2/barcode.proto + +package com.google.cloud.documentai.v1beta2; + +public final class BarcodeProto { + private BarcodeProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta2_Barcode_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta2_Barcode_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n-google/cloud/documentai/v1beta2/barcod" + + "e.proto\022\037google.cloud.documentai.v1beta2" + + "\"B\n\007Barcode\022\016\n\006format\030\001 \001(\t\022\024\n\014value_for" + + "mat\030\002 \001(\t\022\021\n\traw_value\030\003 \001(\tB\343\001\n#com.goo" + + "gle.cloud.documentai.v1beta2B\014BarcodePro" + + "toP\001ZCcloud.google.com/go/documentai/api" + + "v1beta2/documentaipb;documentaipb\252\002\037Goog" + + "le.Cloud.DocumentAI.V1Beta2\312\002\037Google\\Clo" + + "ud\\DocumentAI\\V1beta2\352\002\"Google::Cloud::D" + + "ocumentAI::V1beta2b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + internal_static_google_cloud_documentai_v1beta2_Barcode_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_documentai_v1beta2_Barcode_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta2_Barcode_descriptor, + new java.lang.String[] { + "Format", "ValueFormat", "RawValue", + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/Document.java b/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/Document.java index 112eeaad8d91..0cd54fce65dc 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/Document.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/Document.java @@ -22,11 +22,10 @@ * * *
- * 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.
+ * Document represents the canonical document resource in Document AI. It is an
+ * interchange format that provides insights into documents and allows for
+ * collaboration between users and Document AI to iterate and optimize for
+ * quality.
  * 
* * Protobuf type {@code google.cloud.documentai.v1beta2.Document} @@ -48,7 +47,9 @@ private Document() { pages_ = java.util.Collections.emptyList(); entities_ = java.util.Collections.emptyList(); entityRelations_ = java.util.Collections.emptyList(); + textChanges_ = java.util.Collections.emptyList(); labels_ = java.util.Collections.emptyList(); + revisions_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -107,8 +108,9 @@ public interface ShardInfoOrBuilder * * *
-     * The index of the first character in [Document.text][google.cloud.documentai.v1beta2.Document.text] in the overall
-     * document global text.
+     * The index of the first character in
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text] in the
+     * overall document global text.
      * 
* * int64 text_offset = 3; @@ -203,8 +205,9 @@ public long getShardCount() { * * *
-     * The index of the first character in [Document.text][google.cloud.documentai.v1beta2.Document.text] in the overall
-     * document global text.
+     * The index of the first character in
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text] in the
+     * overall document global text.
      * 
* * int64 text_offset = 3; @@ -718,8 +721,9 @@ public Builder clearShardCount() { * * *
-       * The index of the first character in [Document.text][google.cloud.documentai.v1beta2.Document.text] in the overall
-       * document global text.
+       * The index of the first character in
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text] in the
+       * overall document global text.
        * 
* * int64 text_offset = 3; @@ -734,8 +738,9 @@ public long getTextOffset() { * * *
-       * The index of the first character in [Document.text][google.cloud.documentai.v1beta2.Document.text] in the overall
-       * document global text.
+       * The index of the first character in
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text] in the
+       * overall document global text.
        * 
* * int64 text_offset = 3; @@ -754,8 +759,9 @@ public Builder setTextOffset(long value) { * * *
-       * The index of the first character in [Document.text][google.cloud.documentai.v1beta2.Document.text] in the overall
-       * document global text.
+       * The index of the first character in
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text] in the
+       * overall document global text.
        * 
* * int64 text_offset = 3; @@ -938,9 +944,10 @@ public interface LabelOrBuilder * *
    * Label attaches schema information and/or other metadata to segments within
-   * a [Document][google.cloud.documentai.v1beta2.Document]. Multiple [Label][google.cloud.documentai.v1beta2.Document.Label]s on a single field can denote either
-   * different labels, different instances of the same label created at
-   * different times, or some combination of both.
+   * a [Document][google.cloud.documentai.v1beta2.Document]. Multiple
+   * [Label][google.cloud.documentai.v1beta2.Document.Label]s on a single field
+   * can denote either different labels, different instances of the same label
+   * created at different times, or some combination of both.
    * 
* * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Label} @@ -1380,9 +1387,10 @@ protected Builder newBuilderForType( * *
      * Label attaches schema information and/or other metadata to segments within
-     * a [Document][google.cloud.documentai.v1beta2.Document]. Multiple [Label][google.cloud.documentai.v1beta2.Document.Label]s on a single field can denote either
-     * different labels, different instances of the same label created at
-     * different times, or some combination of both.
+     * a [Document][google.cloud.documentai.v1beta2.Document]. Multiple
+     * [Label][google.cloud.documentai.v1beta2.Document.Label]s on a single field
+     * can denote either different labels, different instances of the same label
+     * created at different times, or some combination of both.
      * 
* * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Label} @@ -2024,7 +2032,8 @@ public interface StyleOrBuilder * * *
-     * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * Text anchor indexing into the
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].
      * 
* * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; @@ -2036,7 +2045,8 @@ public interface StyleOrBuilder * * *
-     * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * Text anchor indexing into the
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].
      * 
* * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; @@ -2048,7 +2058,8 @@ public interface StyleOrBuilder * * *
-     * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * Text anchor indexing into the
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].
      * 
* * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; @@ -2129,8 +2140,8 @@ public interface StyleOrBuilder * * *
-     * Font weight. Possible values are normal, bold, bolder, and lighter.
-     * https://www.w3schools.com/cssref/pr_font_weight.asp
+     * [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp).
+     * Possible values are `normal`, `bold`, `bolder`, and `lighter`.
      * 
* * string font_weight = 4; @@ -2142,8 +2153,8 @@ public interface StyleOrBuilder * * *
-     * Font weight. Possible values are normal, bold, bolder, and lighter.
-     * https://www.w3schools.com/cssref/pr_font_weight.asp
+     * [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp).
+     * Possible values are `normal`, `bold`, `bolder`, and `lighter`.
      * 
* * string font_weight = 4; @@ -2156,8 +2167,8 @@ public interface StyleOrBuilder * * *
-     * Text style. Possible values are normal, italic, and oblique.
-     * https://www.w3schools.com/cssref/pr_font_font-style.asp
+     * [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp).
+     * Possible values are `normal`, `italic`, and `oblique`.
      * 
* * string text_style = 5; @@ -2169,8 +2180,8 @@ public interface StyleOrBuilder * * *
-     * Text style. Possible values are normal, italic, and oblique.
-     * https://www.w3schools.com/cssref/pr_font_font-style.asp
+     * [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp).
+     * Possible values are `normal`, `italic`, and `oblique`.
      * 
* * string text_style = 5; @@ -2183,9 +2194,10 @@ public interface StyleOrBuilder * * *
-     * Text decoration. Follows CSS standard.
-     * <text-decoration-line> <text-decoration-color> <text-decoration-style>
-     * https://www.w3schools.com/cssref/pr_text_text-decoration.asp
+     * [Text
+     * decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp).
+     * Follows CSS standard. <text-decoration-line> <text-decoration-color>
+     * <text-decoration-style>
      * 
* * string text_decoration = 6; @@ -2197,9 +2209,10 @@ public interface StyleOrBuilder * * *
-     * Text decoration. Follows CSS standard.
-     * <text-decoration-line> <text-decoration-color> <text-decoration-style>
-     * https://www.w3schools.com/cssref/pr_text_text-decoration.asp
+     * [Text
+     * decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp).
+     * Follows CSS standard. <text-decoration-line> <text-decoration-color>
+     * <text-decoration-style>
      * 
* * string text_decoration = 6; @@ -2242,6 +2255,33 @@ public interface StyleOrBuilder * .google.cloud.documentai.v1beta2.Document.Style.FontSize font_size = 7; */ com.google.cloud.documentai.v1beta2.Document.Style.FontSizeOrBuilder getFontSizeOrBuilder(); + + /** + * + * + *
+     * Font family such as `Arial`, `Times New Roman`.
+     * https://www.w3schools.com/cssref/pr_font_font-family.asp
+     * 
+ * + * string font_family = 8; + * + * @return The fontFamily. + */ + java.lang.String getFontFamily(); + /** + * + * + *
+     * Font family such as `Arial`, `Times New Roman`.
+     * https://www.w3schools.com/cssref/pr_font_font-family.asp
+     * 
+ * + * string font_family = 8; + * + * @return The bytes for fontFamily. + */ + com.google.protobuf.ByteString getFontFamilyBytes(); } /** * @@ -2267,6 +2307,7 @@ private Style() { fontWeight_ = ""; textStyle_ = ""; textDecoration_ = ""; + fontFamily_ = ""; } @java.lang.Override @@ -2312,7 +2353,8 @@ public interface FontSizeOrBuilder * * *
-       * Unit for the font size. Follows CSS naming (in, px, pt, etc.).
+       * Unit for the font size. Follows CSS naming (such as `in`, `px`, and
+       * `pt`).
        * 
* * string unit = 2; @@ -2324,7 +2366,8 @@ public interface FontSizeOrBuilder * * *
-       * Unit for the font size. Follows CSS naming (in, px, pt, etc.).
+       * Unit for the font size. Follows CSS naming (such as `in`, `px`, and
+       * `pt`).
        * 
* * string unit = 2; @@ -2403,7 +2446,8 @@ public float getSize() { * * *
-       * Unit for the font size. Follows CSS naming (in, px, pt, etc.).
+       * Unit for the font size. Follows CSS naming (such as `in`, `px`, and
+       * `pt`).
        * 
* * string unit = 2; @@ -2426,7 +2470,8 @@ public java.lang.String getUnit() { * * *
-       * Unit for the font size. Follows CSS naming (in, px, pt, etc.).
+       * Unit for the font size. Follows CSS naming (such as `in`, `px`, and
+       * `pt`).
        * 
* * string unit = 2; @@ -2878,7 +2923,8 @@ public Builder clearSize() { * * *
-         * Unit for the font size. Follows CSS naming (in, px, pt, etc.).
+         * Unit for the font size. Follows CSS naming (such as `in`, `px`, and
+         * `pt`).
          * 
* * string unit = 2; @@ -2900,7 +2946,8 @@ public java.lang.String getUnit() { * * *
-         * Unit for the font size. Follows CSS naming (in, px, pt, etc.).
+         * Unit for the font size. Follows CSS naming (such as `in`, `px`, and
+         * `pt`).
          * 
* * string unit = 2; @@ -2922,7 +2969,8 @@ public com.google.protobuf.ByteString getUnitBytes() { * * *
-         * Unit for the font size. Follows CSS naming (in, px, pt, etc.).
+         * Unit for the font size. Follows CSS naming (such as `in`, `px`, and
+         * `pt`).
          * 
* * string unit = 2; @@ -2943,7 +2991,8 @@ public Builder setUnit(java.lang.String value) { * * *
-         * Unit for the font size. Follows CSS naming (in, px, pt, etc.).
+         * Unit for the font size. Follows CSS naming (such as `in`, `px`, and
+         * `pt`).
          * 
* * string unit = 2; @@ -2960,7 +3009,8 @@ public Builder clearUnit() { * * *
-         * Unit for the font size. Follows CSS naming (in, px, pt, etc.).
+         * Unit for the font size. Follows CSS naming (such as `in`, `px`, and
+         * `pt`).
          * 
* * string unit = 2; @@ -3052,7 +3102,8 @@ public com.google.protobuf.Parser getParserForType() { * * *
-     * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * Text anchor indexing into the
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].
      * 
* * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; @@ -3067,7 +3118,8 @@ public boolean hasTextAnchor() { * * *
-     * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * Text anchor indexing into the
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].
      * 
* * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; @@ -3084,7 +3136,8 @@ public com.google.cloud.documentai.v1beta2.Document.TextAnchor getTextAnchor() { * * *
-     * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * Text anchor indexing into the
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].
      * 
* * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; @@ -3201,8 +3254,8 @@ public com.google.type.ColorOrBuilder getBackgroundColorOrBuilder() { * * *
-     * Font weight. Possible values are normal, bold, bolder, and lighter.
-     * https://www.w3schools.com/cssref/pr_font_weight.asp
+     * [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp).
+     * Possible values are `normal`, `bold`, `bolder`, and `lighter`.
      * 
* * string font_weight = 4; @@ -3225,8 +3278,8 @@ public java.lang.String getFontWeight() { * * *
-     * Font weight. Possible values are normal, bold, bolder, and lighter.
-     * https://www.w3schools.com/cssref/pr_font_weight.asp
+     * [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp).
+     * Possible values are `normal`, `bold`, `bolder`, and `lighter`.
      * 
* * string font_weight = 4; @@ -3254,8 +3307,8 @@ public com.google.protobuf.ByteString getFontWeightBytes() { * * *
-     * Text style. Possible values are normal, italic, and oblique.
-     * https://www.w3schools.com/cssref/pr_font_font-style.asp
+     * [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp).
+     * Possible values are `normal`, `italic`, and `oblique`.
      * 
* * string text_style = 5; @@ -3278,8 +3331,8 @@ public java.lang.String getTextStyle() { * * *
-     * Text style. Possible values are normal, italic, and oblique.
-     * https://www.w3schools.com/cssref/pr_font_font-style.asp
+     * [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp).
+     * Possible values are `normal`, `italic`, and `oblique`.
      * 
* * string text_style = 5; @@ -3307,9 +3360,10 @@ public 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
+     * [Text
+     * decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp).
+     * Follows CSS standard. <text-decoration-line> <text-decoration-color>
+     * <text-decoration-style>
      * 
* * string text_decoration = 6; @@ -3332,9 +3386,10 @@ public 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
+     * [Text
+     * decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp).
+     * Follows CSS standard. <text-decoration-line> <text-decoration-color>
+     * <text-decoration-style>
      * 
* * string text_decoration = 6; @@ -3405,6 +3460,59 @@ public com.google.cloud.documentai.v1beta2.Document.Style.FontSize getFontSize() : fontSize_; } + public static final int FONT_FAMILY_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object fontFamily_ = ""; + /** + * + * + *
+     * Font family such as `Arial`, `Times New Roman`.
+     * https://www.w3schools.com/cssref/pr_font_font-family.asp
+     * 
+ * + * string font_family = 8; + * + * @return The fontFamily. + */ + @java.lang.Override + public java.lang.String getFontFamily() { + java.lang.Object ref = fontFamily_; + 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(); + fontFamily_ = s; + return s; + } + } + /** + * + * + *
+     * Font family such as `Arial`, `Times New Roman`.
+     * https://www.w3schools.com/cssref/pr_font_font-family.asp
+     * 
+ * + * string font_family = 8; + * + * @return The bytes for fontFamily. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFontFamilyBytes() { + java.lang.Object ref = fontFamily_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fontFamily_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -3440,6 +3548,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (fontSize_ != null) { output.writeMessage(7, getFontSize()); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fontFamily_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, fontFamily_); + } getUnknownFields().writeTo(output); } @@ -3470,6 +3581,9 @@ public int getSerializedSize() { if (fontSize_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getFontSize()); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fontFamily_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, fontFamily_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -3505,6 +3619,7 @@ public boolean equals(final java.lang.Object obj) { if (hasFontSize()) { if (!getFontSize().equals(other.getFontSize())) return false; } + if (!getFontFamily().equals(other.getFontFamily())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3538,6 +3653,8 @@ public int hashCode() { hash = (37 * hash) + FONT_SIZE_FIELD_NUMBER; hash = (53 * hash) + getFontSize().hashCode(); } + hash = (37 * hash) + FONT_FAMILY_FIELD_NUMBER; + hash = (53 * hash) + getFontFamily().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -3703,6 +3820,7 @@ public Builder clear() { fontSizeBuilder_.dispose(); fontSizeBuilder_ = null; } + fontFamily_ = ""; return this; } @@ -3762,6 +3880,9 @@ private void buildPartial0(com.google.cloud.documentai.v1beta2.Document.Style re if (((from_bitField0_ & 0x00000040) != 0)) { result.fontSize_ = fontSizeBuilder_ == null ? fontSize_ : fontSizeBuilder_.build(); } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.fontFamily_ = fontFamily_; + } } @java.lang.Override @@ -3839,6 +3960,11 @@ public Builder mergeFrom(com.google.cloud.documentai.v1beta2.Document.Style othe if (other.hasFontSize()) { mergeFontSize(other.getFontSize()); } + if (!other.getFontFamily().isEmpty()) { + fontFamily_ = other.fontFamily_; + bitField0_ |= 0x00000080; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -3908,6 +4034,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000040; break; } // case 58 + case 66: + { + fontFamily_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -3937,7 +4069,8 @@ public Builder mergeFrom( * * *
-       * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+       * Text anchor indexing into the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].
        * 
* * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; @@ -3951,7 +4084,8 @@ public boolean hasTextAnchor() { * * *
-       * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+       * Text anchor indexing into the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].
        * 
* * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; @@ -3971,7 +4105,8 @@ public com.google.cloud.documentai.v1beta2.Document.TextAnchor getTextAnchor() { * * *
-       * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+       * Text anchor indexing into the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].
        * 
* * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; @@ -3993,7 +4128,8 @@ public Builder setTextAnchor(com.google.cloud.documentai.v1beta2.Document.TextAn * * *
-       * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+       * Text anchor indexing into the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].
        * 
* * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; @@ -4013,7 +4149,8 @@ public Builder setTextAnchor( * * *
-       * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+       * Text anchor indexing into the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].
        * 
* * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; @@ -4040,7 +4177,8 @@ public Builder mergeTextAnchor( * * *
-       * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+       * Text anchor indexing into the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].
        * 
* * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; @@ -4059,7 +4197,8 @@ public Builder clearTextAnchor() { * * *
-       * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+       * Text anchor indexing into the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].
        * 
* * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; @@ -4074,7 +4213,8 @@ public Builder clearTextAnchor() { * * *
-       * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+       * Text anchor indexing into the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].
        * 
* * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; @@ -4093,7 +4233,8 @@ public Builder clearTextAnchor() { * * *
-       * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+       * Text anchor indexing into the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].
        * 
* * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; @@ -4473,8 +4614,8 @@ public com.google.type.ColorOrBuilder getBackgroundColorOrBuilder() { * * *
-       * Font weight. Possible values are normal, bold, bolder, and lighter.
-       * https://www.w3schools.com/cssref/pr_font_weight.asp
+       * [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp).
+       * Possible values are `normal`, `bold`, `bolder`, and `lighter`.
        * 
* * string font_weight = 4; @@ -4496,8 +4637,8 @@ public java.lang.String getFontWeight() { * * *
-       * Font weight. Possible values are normal, bold, bolder, and lighter.
-       * https://www.w3schools.com/cssref/pr_font_weight.asp
+       * [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp).
+       * Possible values are `normal`, `bold`, `bolder`, and `lighter`.
        * 
* * string font_weight = 4; @@ -4519,8 +4660,8 @@ public com.google.protobuf.ByteString getFontWeightBytes() { * * *
-       * Font weight. Possible values are normal, bold, bolder, and lighter.
-       * https://www.w3schools.com/cssref/pr_font_weight.asp
+       * [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp).
+       * Possible values are `normal`, `bold`, `bolder`, and `lighter`.
        * 
* * string font_weight = 4; @@ -4541,8 +4682,8 @@ public Builder setFontWeight(java.lang.String value) { * * *
-       * Font weight. Possible values are normal, bold, bolder, and lighter.
-       * https://www.w3schools.com/cssref/pr_font_weight.asp
+       * [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp).
+       * Possible values are `normal`, `bold`, `bolder`, and `lighter`.
        * 
* * string font_weight = 4; @@ -4559,8 +4700,8 @@ public Builder clearFontWeight() { * * *
-       * Font weight. Possible values are normal, bold, bolder, and lighter.
-       * https://www.w3schools.com/cssref/pr_font_weight.asp
+       * [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp).
+       * Possible values are `normal`, `bold`, `bolder`, and `lighter`.
        * 
* * string font_weight = 4; @@ -4584,8 +4725,8 @@ public Builder setFontWeightBytes(com.google.protobuf.ByteString value) { * * *
-       * Text style. Possible values are normal, italic, and oblique.
-       * https://www.w3schools.com/cssref/pr_font_font-style.asp
+       * [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp).
+       * Possible values are `normal`, `italic`, and `oblique`.
        * 
* * string text_style = 5; @@ -4607,8 +4748,8 @@ public java.lang.String getTextStyle() { * * *
-       * Text style. Possible values are normal, italic, and oblique.
-       * https://www.w3schools.com/cssref/pr_font_font-style.asp
+       * [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp).
+       * Possible values are `normal`, `italic`, and `oblique`.
        * 
* * string text_style = 5; @@ -4630,8 +4771,8 @@ public com.google.protobuf.ByteString getTextStyleBytes() { * * *
-       * Text style. Possible values are normal, italic, and oblique.
-       * https://www.w3schools.com/cssref/pr_font_font-style.asp
+       * [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp).
+       * Possible values are `normal`, `italic`, and `oblique`.
        * 
* * string text_style = 5; @@ -4652,8 +4793,8 @@ public Builder setTextStyle(java.lang.String value) { * * *
-       * Text style. Possible values are normal, italic, and oblique.
-       * https://www.w3schools.com/cssref/pr_font_font-style.asp
+       * [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp).
+       * Possible values are `normal`, `italic`, and `oblique`.
        * 
* * string text_style = 5; @@ -4670,8 +4811,8 @@ public Builder clearTextStyle() { * * *
-       * Text style. Possible values are normal, italic, and oblique.
-       * https://www.w3schools.com/cssref/pr_font_font-style.asp
+       * [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp).
+       * Possible values are `normal`, `italic`, and `oblique`.
        * 
* * string text_style = 5; @@ -4695,9 +4836,10 @@ public Builder setTextStyleBytes(com.google.protobuf.ByteString value) { * * *
-       * Text decoration. Follows CSS standard.
-       * <text-decoration-line> <text-decoration-color> <text-decoration-style>
-       * https://www.w3schools.com/cssref/pr_text_text-decoration.asp
+       * [Text
+       * decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp).
+       * Follows CSS standard. <text-decoration-line> <text-decoration-color>
+       * <text-decoration-style>
        * 
* * string text_decoration = 6; @@ -4719,9 +4861,10 @@ public 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
+       * [Text
+       * decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp).
+       * Follows CSS standard. <text-decoration-line> <text-decoration-color>
+       * <text-decoration-style>
        * 
* * string text_decoration = 6; @@ -4743,9 +4886,10 @@ public com.google.protobuf.ByteString getTextDecorationBytes() { * * *
-       * Text decoration. Follows CSS standard.
-       * <text-decoration-line> <text-decoration-color> <text-decoration-style>
-       * https://www.w3schools.com/cssref/pr_text_text-decoration.asp
+       * [Text
+       * decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp).
+       * Follows CSS standard. <text-decoration-line> <text-decoration-color>
+       * <text-decoration-style>
        * 
* * string text_decoration = 6; @@ -4766,9 +4910,10 @@ public Builder setTextDecoration(java.lang.String value) { * * *
-       * Text decoration. Follows CSS standard.
-       * <text-decoration-line> <text-decoration-color> <text-decoration-style>
-       * https://www.w3schools.com/cssref/pr_text_text-decoration.asp
+       * [Text
+       * decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp).
+       * Follows CSS standard. <text-decoration-line> <text-decoration-color>
+       * <text-decoration-style>
        * 
* * string text_decoration = 6; @@ -4785,9 +4930,10 @@ public Builder clearTextDecoration() { * * *
-       * Text decoration. Follows CSS standard.
-       * <text-decoration-line> <text-decoration-color> <text-decoration-style>
-       * https://www.w3schools.com/cssref/pr_text_text-decoration.asp
+       * [Text
+       * decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp).
+       * Follows CSS standard. <text-decoration-line> <text-decoration-color>
+       * <text-decoration-style>
        * 
* * string text_decoration = 6; @@ -4996,6 +5142,117 @@ public Builder clearFontSize() { return fontSizeBuilder_; } + private java.lang.Object fontFamily_ = ""; + /** + * + * + *
+       * Font family such as `Arial`, `Times New Roman`.
+       * https://www.w3schools.com/cssref/pr_font_font-family.asp
+       * 
+ * + * string font_family = 8; + * + * @return The fontFamily. + */ + public java.lang.String getFontFamily() { + java.lang.Object ref = fontFamily_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fontFamily_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Font family such as `Arial`, `Times New Roman`.
+       * https://www.w3schools.com/cssref/pr_font_font-family.asp
+       * 
+ * + * string font_family = 8; + * + * @return The bytes for fontFamily. + */ + public com.google.protobuf.ByteString getFontFamilyBytes() { + java.lang.Object ref = fontFamily_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fontFamily_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Font family such as `Arial`, `Times New Roman`.
+       * https://www.w3schools.com/cssref/pr_font_font-family.asp
+       * 
+ * + * string font_family = 8; + * + * @param value The fontFamily to set. + * @return This builder for chaining. + */ + public Builder setFontFamily(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + fontFamily_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+       * Font family such as `Arial`, `Times New Roman`.
+       * https://www.w3schools.com/cssref/pr_font_font-family.asp
+       * 
+ * + * string font_family = 8; + * + * @return This builder for chaining. + */ + public Builder clearFontFamily() { + fontFamily_ = getDefaultInstance().getFontFamily(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+       * Font family such as `Arial`, `Times New Roman`.
+       * https://www.w3schools.com/cssref/pr_font_font-family.asp
+       * 
+ * + * string font_family = 8; + * + * @param value The bytes for fontFamily to set. + * @return This builder for chaining. + */ + public Builder setFontFamilyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + fontFamily_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -5069,9 +5326,11 @@ public interface PageOrBuilder * * *
-     * 1-based index for current [Page][google.cloud.documentai.v1beta2.Document.Page] in a parent [Document][google.cloud.documentai.v1beta2.Document].
-     * Useful when a page is taken out of a [Document][google.cloud.documentai.v1beta2.Document] for individual
-     * processing.
+     * 1-based index for current
+     * [Page][google.cloud.documentai.v1beta2.Document.Page] in a parent
+     * [Document][google.cloud.documentai.v1beta2.Document]. Useful when a page
+     * is taken out of a [Document][google.cloud.documentai.v1beta2.Document]
+     * for individual processing.
      * 
* * int32 page_number = 1; @@ -5080,6 +5339,110 @@ public interface PageOrBuilder */ int getPageNumber(); + /** + * + * + *
+     * Rendered image for this page. This image is preprocessed to remove any
+     * skew, rotation, and distortions such that the annotation bounding boxes
+     * can be upright and axis-aligned.
+     * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Image image = 13; + * + * @return Whether the image field is set. + */ + boolean hasImage(); + /** + * + * + *
+     * Rendered image for this page. This image is preprocessed to remove any
+     * skew, rotation, and distortions such that the annotation bounding boxes
+     * can be upright and axis-aligned.
+     * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Image image = 13; + * + * @return The image. + */ + com.google.cloud.documentai.v1beta2.Document.Page.Image getImage(); + /** + * + * + *
+     * Rendered image for this page. This image is preprocessed to remove any
+     * skew, rotation, and distortions such that the annotation bounding boxes
+     * can be upright and axis-aligned.
+     * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Image image = 13; + */ + com.google.cloud.documentai.v1beta2.Document.Page.ImageOrBuilder getImageOrBuilder(); + + /** + * + * + *
+     * Transformation matrices that were applied to the original document image
+     * to produce
+     * [Page.image][google.cloud.documentai.v1beta2.Document.Page.image].
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Matrix transforms = 14; + */ + java.util.List getTransformsList(); + /** + * + * + *
+     * Transformation matrices that were applied to the original document image
+     * to produce
+     * [Page.image][google.cloud.documentai.v1beta2.Document.Page.image].
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Matrix transforms = 14; + */ + com.google.cloud.documentai.v1beta2.Document.Page.Matrix getTransforms(int index); + /** + * + * + *
+     * Transformation matrices that were applied to the original document image
+     * to produce
+     * [Page.image][google.cloud.documentai.v1beta2.Document.Page.image].
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Matrix transforms = 14; + */ + int getTransformsCount(); + /** + * + * + *
+     * Transformation matrices that were applied to the original document image
+     * to produce
+     * [Page.image][google.cloud.documentai.v1beta2.Document.Page.image].
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Matrix transforms = 14; + */ + java.util.List + getTransformsOrBuilderList(); + /** + * + * + *
+     * Transformation matrices that were applied to the original document image
+     * to produce
+     * [Page.image][google.cloud.documentai.v1beta2.Document.Page.image].
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Matrix transforms = 14; + */ + com.google.cloud.documentai.v1beta2.Document.Page.MatrixOrBuilder getTransformsOrBuilder( + int index); + /** * * @@ -5119,7 +5482,8 @@ public interface PageOrBuilder * * *
-     * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the page.
+     * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the
+     * page.
      * 
* * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 3; @@ -5131,7 +5495,8 @@ public interface PageOrBuilder * * *
-     * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the page.
+     * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the
+     * page.
      * 
* * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 3; @@ -5143,7 +5508,8 @@ public interface PageOrBuilder * * *
-     * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the page.
+     * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the
+     * page.
      * 
* * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 3; @@ -5629,6 +5995,215 @@ com.google.cloud.documentai.v1beta2.Document.Page.ParagraphOrBuilder getParagrap */ com.google.cloud.documentai.v1beta2.Document.Page.FormFieldOrBuilder getFormFieldsOrBuilder( int index); + + /** + * + * + *
+     * A list of visually detected symbols on the page.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Symbol symbols = 12; + */ + java.util.List getSymbolsList(); + /** + * + * + *
+     * A list of visually detected symbols on the page.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Symbol symbols = 12; + */ + com.google.cloud.documentai.v1beta2.Document.Page.Symbol getSymbols(int index); + /** + * + * + *
+     * A list of visually detected symbols on the page.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Symbol symbols = 12; + */ + int getSymbolsCount(); + /** + * + * + *
+     * A list of visually detected symbols on the page.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Symbol symbols = 12; + */ + java.util.List + getSymbolsOrBuilderList(); + /** + * + * + *
+     * A list of visually detected symbols on the page.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Symbol symbols = 12; + */ + com.google.cloud.documentai.v1beta2.Document.Page.SymbolOrBuilder getSymbolsOrBuilder( + int index); + + /** + * + * + *
+     * A list of detected barcodes.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode detected_barcodes = 15; + * + */ + java.util.List + getDetectedBarcodesList(); + /** + * + * + *
+     * A list of detected barcodes.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode detected_barcodes = 15; + * + */ + com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode getDetectedBarcodes( + int index); + /** + * + * + *
+     * A list of detected barcodes.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode detected_barcodes = 15; + * + */ + int getDetectedBarcodesCount(); + /** + * + * + *
+     * A list of detected barcodes.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode detected_barcodes = 15; + * + */ + java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcodeOrBuilder> + getDetectedBarcodesOrBuilderList(); + /** + * + * + *
+     * A list of detected barcodes.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode detected_barcodes = 15; + * + */ + com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcodeOrBuilder + getDetectedBarcodesOrBuilder(int index); + + /** + * + * + *
+     * Image quality scores.
+     * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores image_quality_scores = 17; + * + * + * @return Whether the imageQualityScores field is set. + */ + boolean hasImageQualityScores(); + /** + * + * + *
+     * Image quality scores.
+     * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores image_quality_scores = 17; + * + * + * @return The imageQualityScores. + */ + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores getImageQualityScores(); + /** + * + * + *
+     * Image quality scores.
+     * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores image_quality_scores = 17; + * + */ + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScoresOrBuilder + getImageQualityScoresOrBuilder(); + + /** + * + * + *
+     * The history of this page.
+     * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 16 [deprecated = true]; + * + * + * @deprecated google.cloud.documentai.v1beta2.Document.Page.provenance is deprecated. See + * google/cloud/documentai/v1beta2/document.proto;l=577 + * @return Whether the provenance field is set. + */ + @java.lang.Deprecated + boolean hasProvenance(); + /** + * + * + *
+     * The history of this page.
+     * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 16 [deprecated = true]; + * + * + * @deprecated google.cloud.documentai.v1beta2.Document.Page.provenance is deprecated. See + * google/cloud/documentai/v1beta2/document.proto;l=577 + * @return The provenance. + */ + @java.lang.Deprecated + com.google.cloud.documentai.v1beta2.Document.Provenance getProvenance(); + /** + * + * + *
+     * The history of this page.
+     * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 16 [deprecated = true]; + * + */ + @java.lang.Deprecated + com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder getProvenanceOrBuilder(); } /** * @@ -5650,6 +6225,7 @@ private Page(com.google.protobuf.GeneratedMessageV3.Builder builder) { } private Page() { + transforms_ = java.util.Collections.emptyList(); detectedLanguages_ = java.util.Collections.emptyList(); blocks_ = java.util.Collections.emptyList(); paragraphs_ = java.util.Collections.emptyList(); @@ -5658,6 +6234,8 @@ private Page() { visualElements_ = java.util.Collections.emptyList(); tables_ = java.util.Collections.emptyList(); formFields_ = java.util.Collections.emptyList(); + symbols_ = java.util.Collections.emptyList(); + detectedBarcodes_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -6544,615 +7122,231 @@ public com.google.protobuf.Parser getParserForType() { } } - public interface LayoutOrBuilder + public interface ImageOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.Page.Layout) + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.Page.Image) com.google.protobuf.MessageOrBuilder { /** * * *
-       * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-       * 
- * - * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; - * - * @return Whether the textAnchor field is set. - */ - boolean hasTextAnchor(); - /** - * - * - *
-       * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-       * 
- * - * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; - * - * @return The textAnchor. - */ - com.google.cloud.documentai.v1beta2.Document.TextAnchor getTextAnchor(); - /** - * - * - *
-       * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-       * 
- * - * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; - */ - com.google.cloud.documentai.v1beta2.Document.TextAnchorOrBuilder getTextAnchorOrBuilder(); - - /** - * - * - *
-       * Confidence of the current [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] within context of the object this
-       * layout is for. e.g. confidence can be for a single token, a table,
-       * a visual element, etc. depending on context. Range [0, 1].
+       * Raw byte content of the image.
        * 
* - * float confidence = 2; + * bytes content = 1; * - * @return The confidence. + * @return The content. */ - float getConfidence(); + com.google.protobuf.ByteString getContent(); /** * * *
-       * The bounding polygon for the [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
+       * Encoding [media type (MIME
+       * type)](https://www.iana.org/assignments/media-types/media-types.xhtml)
+       * for the image.
        * 
* - * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly = 3; + * string mime_type = 2; * - * @return Whether the boundingPoly field is set. + * @return The mimeType. */ - boolean hasBoundingPoly(); + java.lang.String getMimeType(); /** * * *
-       * The bounding polygon for the [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
+       * Encoding [media type (MIME
+       * type)](https://www.iana.org/assignments/media-types/media-types.xhtml)
+       * for the image.
        * 
* - * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly = 3; - * - * @return The boundingPoly. - */ - com.google.cloud.documentai.v1beta2.BoundingPoly getBoundingPoly(); - /** - * + * string mime_type = 2; * - *
-       * The bounding polygon for the [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
-       * 
- * - * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly = 3; + * @return The bytes for mimeType. */ - com.google.cloud.documentai.v1beta2.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); + com.google.protobuf.ByteString getMimeTypeBytes(); /** * * *
-       * Detected orientation for the [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
-       * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout.Orientation orientation = 4; - * - * - * @return The enum numeric value on the wire for orientation. - */ - int getOrientationValue(); - /** - * - * - *
-       * Detected orientation for the [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
+       * Width of the image in pixels.
        * 
* - * .google.cloud.documentai.v1beta2.Document.Page.Layout.Orientation orientation = 4; - * + * int32 width = 3; * - * @return The orientation. + * @return The width. */ - com.google.cloud.documentai.v1beta2.Document.Page.Layout.Orientation getOrientation(); + int getWidth(); /** * * *
-       * Optional. This is the identifier used by referencing [PageAnchor][google.cloud.documentai.v1beta2.Document.PageAnchor]s.
-       * 
- * - * string id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The id. - */ - java.lang.String getId(); - /** - * - * - *
-       * Optional. This is the identifier used by referencing [PageAnchor][google.cloud.documentai.v1beta2.Document.PageAnchor]s.
+       * Height of the image in pixels.
        * 
* - * string id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * int32 height = 4; * - * @return The bytes for id. + * @return The height. */ - com.google.protobuf.ByteString getIdBytes(); + int getHeight(); } /** * * *
-     * Visual element describing a layout unit on a page.
+     * Rendered image contents for this page.
      * 
* - * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.Layout} + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.Image} */ - public static final class Layout extends com.google.protobuf.GeneratedMessageV3 + public static final class Image extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.Page.Layout) - LayoutOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.Page.Image) + ImageOrBuilder { private static final long serialVersionUID = 0L; - // Use Layout.newBuilder() to construct. - private Layout(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use Image.newBuilder() to construct. + private Image(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private Layout() { - orientation_ = 0; - id_ = ""; + private Image() { + content_ = com.google.protobuf.ByteString.EMPTY; + mimeType_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Layout(); + return new Image(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_Layout_descriptor; + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Image_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_Layout_fieldAccessorTable + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Image_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1beta2.Document.Page.Layout.class, - com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder.class); - } - - /** - * - * - *
-       * Detected human reading orientation.
-       * 
- * - * Protobuf enum {@code google.cloud.documentai.v1beta2.Document.Page.Layout.Orientation} - */ - public enum Orientation implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-         * Unspecified orientation.
-         * 
- * - * ORIENTATION_UNSPECIFIED = 0; - */ - ORIENTATION_UNSPECIFIED(0), - /** - * - * - *
-         * Orientation is aligned with page up.
-         * 
- * - * PAGE_UP = 1; - */ - PAGE_UP(1), - /** - * - * - *
-         * Orientation is aligned with page right.
-         * Turn the head 90 degrees clockwise from upright to read.
-         * 
- * - * PAGE_RIGHT = 2; - */ - PAGE_RIGHT(2), - /** - * - * - *
-         * Orientation is aligned with page down.
-         * Turn the head 180 degrees from upright to read.
-         * 
- * - * PAGE_DOWN = 3; - */ - PAGE_DOWN(3), - /** - * - * - *
-         * Orientation is aligned with page left.
-         * Turn the head 90 degrees counterclockwise from upright to read.
-         * 
- * - * PAGE_LEFT = 4; - */ - PAGE_LEFT(4), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-         * Unspecified orientation.
-         * 
- * - * ORIENTATION_UNSPECIFIED = 0; - */ - public static final int ORIENTATION_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-         * Orientation is aligned with page up.
-         * 
- * - * PAGE_UP = 1; - */ - public static final int PAGE_UP_VALUE = 1; - /** - * - * - *
-         * Orientation is aligned with page right.
-         * Turn the head 90 degrees clockwise from upright to read.
-         * 
- * - * PAGE_RIGHT = 2; - */ - public static final int PAGE_RIGHT_VALUE = 2; - /** - * - * - *
-         * Orientation is aligned with page down.
-         * Turn the head 180 degrees from upright to read.
-         * 
- * - * PAGE_DOWN = 3; - */ - public static final int PAGE_DOWN_VALUE = 3; - /** - * - * - *
-         * Orientation is aligned with page left.
-         * Turn the head 90 degrees counterclockwise from upright to read.
-         * 
- * - * PAGE_LEFT = 4; - */ - public static final int PAGE_LEFT_VALUE = 4; - - 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 Orientation 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 Orientation forNumber(int value) { - switch (value) { - case 0: - return ORIENTATION_UNSPECIFIED; - case 1: - return PAGE_UP; - case 2: - return PAGE_RIGHT; - case 3: - return PAGE_DOWN; - case 4: - return PAGE_LEFT; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap - internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Orientation findValueByNumber(int number) { - return Orientation.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final Orientation[] VALUES = values(); - - public static Orientation valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Orientation(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.documentai.v1beta2.Document.Page.Layout.Orientation) + com.google.cloud.documentai.v1beta2.Document.Page.Image.class, + com.google.cloud.documentai.v1beta2.Document.Page.Image.Builder.class); } - public static final int TEXT_ANCHOR_FIELD_NUMBER = 1; - private com.google.cloud.documentai.v1beta2.Document.TextAnchor textAnchor_; - /** - * - * - *
-       * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-       * 
- * - * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; - * - * @return Whether the textAnchor field is set. - */ - @java.lang.Override - public boolean hasTextAnchor() { - return textAnchor_ != null; - } + public static final int CONTENT_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString content_ = com.google.protobuf.ByteString.EMPTY; /** * * *
-       * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+       * Raw byte content of the image.
        * 
* - * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; - * - * @return The textAnchor. - */ - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.TextAnchor getTextAnchor() { - return textAnchor_ == null - ? com.google.cloud.documentai.v1beta2.Document.TextAnchor.getDefaultInstance() - : textAnchor_; - } - /** - * + * bytes content = 1; * - *
-       * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-       * 
- * - * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; + * @return The content. */ @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.TextAnchorOrBuilder - getTextAnchorOrBuilder() { - return textAnchor_ == null - ? com.google.cloud.documentai.v1beta2.Document.TextAnchor.getDefaultInstance() - : textAnchor_; + public com.google.protobuf.ByteString getContent() { + return content_; } - public static final int CONFIDENCE_FIELD_NUMBER = 2; - private float confidence_ = 0F; - /** - * - * - *
-       * Confidence of the current [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] within context of the object this
-       * layout is for. e.g. confidence can be for a single token, a table,
-       * a visual element, etc. depending on context. Range [0, 1].
-       * 
- * - * float confidence = 2; - * - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } + public static final int MIME_TYPE_FIELD_NUMBER = 2; - public static final int BOUNDING_POLY_FIELD_NUMBER = 3; - private com.google.cloud.documentai.v1beta2.BoundingPoly boundingPoly_; + @SuppressWarnings("serial") + private volatile java.lang.Object mimeType_ = ""; /** * * *
-       * The bounding polygon for the [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
+       * Encoding [media type (MIME
+       * type)](https://www.iana.org/assignments/media-types/media-types.xhtml)
+       * for the image.
        * 
* - * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly = 3; + * string mime_type = 2; * - * @return Whether the boundingPoly field is set. + * @return The mimeType. */ @java.lang.Override - public boolean hasBoundingPoly() { - return boundingPoly_ != null; + 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; + } } /** * * *
-       * The bounding polygon for the [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
+       * Encoding [media type (MIME
+       * type)](https://www.iana.org/assignments/media-types/media-types.xhtml)
+       * for the image.
        * 
* - * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly = 3; - * - * @return The boundingPoly. - */ - @java.lang.Override - public com.google.cloud.documentai.v1beta2.BoundingPoly getBoundingPoly() { - return boundingPoly_ == null - ? com.google.cloud.documentai.v1beta2.BoundingPoly.getDefaultInstance() - : boundingPoly_; - } - /** - * + * string mime_type = 2; * - *
-       * The bounding polygon for the [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
-       * 
- * - * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly = 3; + * @return The bytes for mimeType. */ @java.lang.Override - public com.google.cloud.documentai.v1beta2.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - return boundingPoly_ == null - ? com.google.cloud.documentai.v1beta2.BoundingPoly.getDefaultInstance() - : boundingPoly_; + 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; + } } - public static final int ORIENTATION_FIELD_NUMBER = 4; - private int orientation_ = 0; - /** - * - * - *
-       * Detected orientation for the [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
-       * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout.Orientation orientation = 4; - * - * - * @return The enum numeric value on the wire for orientation. - */ - @java.lang.Override - public int getOrientationValue() { - return orientation_; - } + public static final int WIDTH_FIELD_NUMBER = 3; + private int width_ = 0; /** * * *
-       * Detected orientation for the [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
+       * Width of the image in pixels.
        * 
* - * .google.cloud.documentai.v1beta2.Document.Page.Layout.Orientation orientation = 4; - * + * int32 width = 3; * - * @return The orientation. + * @return The width. */ @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Layout.Orientation getOrientation() { - com.google.cloud.documentai.v1beta2.Document.Page.Layout.Orientation result = - com.google.cloud.documentai.v1beta2.Document.Page.Layout.Orientation.forNumber( - orientation_); - return result == null - ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.Orientation.UNRECOGNIZED - : result; + public int getWidth() { + return width_; } - public static final int ID_FIELD_NUMBER = 5; - - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - * - * - *
-       * Optional. This is the identifier used by referencing [PageAnchor][google.cloud.documentai.v1beta2.Document.PageAnchor]s.
-       * 
- * - * string id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - 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(); - id_ = s; - return s; - } - } + public static final int HEIGHT_FIELD_NUMBER = 4; + private int height_ = 0; /** * * *
-       * Optional. This is the identifier used by referencing [PageAnchor][google.cloud.documentai.v1beta2.Document.PageAnchor]s.
+       * Height of the image in pixels.
        * 
* - * string id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * int32 height = 4; * - * @return The bytes for id. + * @return The height. */ @java.lang.Override - public com.google.protobuf.ByteString getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public int getHeight() { + return height_; } private byte memoizedIsInitialized = -1; @@ -7169,23 +7363,17 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (textAnchor_ != null) { - output.writeMessage(1, getTextAnchor()); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - output.writeFloat(2, confidence_); + if (!content_.isEmpty()) { + output.writeBytes(1, content_); } - if (boundingPoly_ != null) { - output.writeMessage(3, getBoundingPoly()); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, mimeType_); } - if (orientation_ - != com.google.cloud.documentai.v1beta2.Document.Page.Layout.Orientation - .ORIENTATION_UNSPECIFIED - .getNumber()) { - output.writeEnum(4, orientation_); + if (width_ != 0) { + output.writeInt32(3, width_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, id_); + if (height_ != 0) { + output.writeInt32(4, height_); } getUnknownFields().writeTo(output); } @@ -7196,23 +7384,17 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (textAnchor_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTextAnchor()); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, confidence_); + if (!content_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(1, content_); } - if (boundingPoly_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getBoundingPoly()); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, mimeType_); } - if (orientation_ - != com.google.cloud.documentai.v1beta2.Document.Page.Layout.Orientation - .ORIENTATION_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, orientation_); + if (width_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, width_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, id_); + if (height_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, height_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -7224,24 +7406,16 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.documentai.v1beta2.Document.Page.Layout)) { + if (!(obj instanceof com.google.cloud.documentai.v1beta2.Document.Page.Image)) { return super.equals(obj); } - com.google.cloud.documentai.v1beta2.Document.Page.Layout other = - (com.google.cloud.documentai.v1beta2.Document.Page.Layout) obj; + com.google.cloud.documentai.v1beta2.Document.Page.Image other = + (com.google.cloud.documentai.v1beta2.Document.Page.Image) obj; - if (hasTextAnchor() != other.hasTextAnchor()) return false; - if (hasTextAnchor()) { - if (!getTextAnchor().equals(other.getTextAnchor())) return false; - } - if (java.lang.Float.floatToIntBits(getConfidence()) - != java.lang.Float.floatToIntBits(other.getConfidence())) return false; - if (hasBoundingPoly() != other.hasBoundingPoly()) return false; - if (hasBoundingPoly()) { - if (!getBoundingPoly().equals(other.getBoundingPoly())) return false; - } - if (orientation_ != other.orientation_) return false; - if (!getId().equals(other.getId())) return false; + if (!getContent().equals(other.getContent())) return false; + if (!getMimeType().equals(other.getMimeType())) return false; + if (getWidth() != other.getWidth()) return false; + if (getHeight() != other.getHeight()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -7253,90 +7427,84 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (hasTextAnchor()) { - hash = (37 * hash) + TEXT_ANCHOR_FIELD_NUMBER; - hash = (53 * hash) + getTextAnchor().hashCode(); - } - hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getConfidence()); - if (hasBoundingPoly()) { - hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; - hash = (53 * hash) + getBoundingPoly().hashCode(); - } - hash = (37 * hash) + ORIENTATION_FIELD_NUMBER; - hash = (53 * hash) + orientation_; - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + hash = (37 * hash) + MIME_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMimeType().hashCode(); + hash = (37 * hash) + WIDTH_FIELD_NUMBER; + hash = (53 * hash) + getWidth(); + hash = (37 * hash) + HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getHeight(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.documentai.v1beta2.Document.Page.Layout parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Image parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Layout parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Image 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.v1beta2.Document.Page.Layout parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Image parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Layout parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Image 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.v1beta2.Document.Page.Layout parseFrom(byte[] data) + public static com.google.cloud.documentai.v1beta2.Document.Page.Image parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Layout parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Image parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Layout parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Image parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Layout parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Image 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.v1beta2.Document.Page.Layout parseDelimitedFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Image parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Layout parseDelimitedFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Image 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.v1beta2.Document.Page.Layout parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Image parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Layout parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Image parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -7354,7 +7522,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.documentai.v1beta2.Document.Page.Layout prototype) { + com.google.cloud.documentai.v1beta2.Document.Page.Image prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -7373,32 +7541,32 @@ protected Builder newBuilderForType( * * *
-       * Visual element describing a layout unit on a page.
+       * Rendered image contents for this page.
        * 
* - * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.Layout} + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.Image} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.Page.Layout) - com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.Page.Image) + com.google.cloud.documentai.v1beta2.Document.Page.ImageOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_Layout_descriptor; + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Image_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_Layout_fieldAccessorTable + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Image_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1beta2.Document.Page.Layout.class, - com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder.class); + com.google.cloud.documentai.v1beta2.Document.Page.Image.class, + com.google.cloud.documentai.v1beta2.Document.Page.Image.Builder.class); } - // Construct using com.google.cloud.documentai.v1beta2.Document.Page.Layout.newBuilder() + // Construct using com.google.cloud.documentai.v1beta2.Document.Page.Image.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { @@ -7409,37 +7577,27 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { public Builder clear() { super.clear(); bitField0_ = 0; - textAnchor_ = null; - if (textAnchorBuilder_ != null) { - textAnchorBuilder_.dispose(); - textAnchorBuilder_ = null; - } - confidence_ = 0F; - boundingPoly_ = null; - if (boundingPolyBuilder_ != null) { - boundingPolyBuilder_.dispose(); - boundingPolyBuilder_ = null; - } - orientation_ = 0; - id_ = ""; + content_ = com.google.protobuf.ByteString.EMPTY; + mimeType_ = ""; + width_ = 0; + height_ = 0; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_Layout_descriptor; + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Image_descriptor; } @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Layout - getDefaultInstanceForType() { - return com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance(); + public com.google.cloud.documentai.v1beta2.Document.Page.Image getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta2.Document.Page.Image.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Layout build() { - com.google.cloud.documentai.v1beta2.Document.Page.Layout result = buildPartial(); + public com.google.cloud.documentai.v1beta2.Document.Page.Image build() { + com.google.cloud.documentai.v1beta2.Document.Page.Image result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -7447,9 +7605,9 @@ public com.google.cloud.documentai.v1beta2.Document.Page.Layout build() { } @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Layout buildPartial() { - com.google.cloud.documentai.v1beta2.Document.Page.Layout result = - new com.google.cloud.documentai.v1beta2.Document.Page.Layout(this); + public com.google.cloud.documentai.v1beta2.Document.Page.Image buildPartial() { + com.google.cloud.documentai.v1beta2.Document.Page.Image result = + new com.google.cloud.documentai.v1beta2.Document.Page.Image(this); if (bitField0_ != 0) { buildPartial0(result); } @@ -7457,25 +7615,19 @@ public com.google.cloud.documentai.v1beta2.Document.Page.Layout buildPartial() { return result; } - private void buildPartial0( - com.google.cloud.documentai.v1beta2.Document.Page.Layout result) { + private void buildPartial0(com.google.cloud.documentai.v1beta2.Document.Page.Image result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { - result.textAnchor_ = - textAnchorBuilder_ == null ? textAnchor_ : textAnchorBuilder_.build(); + result.content_ = content_; } if (((from_bitField0_ & 0x00000002) != 0)) { - result.confidence_ = confidence_; + result.mimeType_ = mimeType_; } if (((from_bitField0_ & 0x00000004) != 0)) { - result.boundingPoly_ = - boundingPolyBuilder_ == null ? boundingPoly_ : boundingPolyBuilder_.build(); + result.width_ = width_; } if (((from_bitField0_ & 0x00000008) != 0)) { - result.orientation_ = orientation_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.id_ = id_; + result.height_ = height_; } } @@ -7516,34 +7668,30 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.documentai.v1beta2.Document.Page.Layout) { - return mergeFrom((com.google.cloud.documentai.v1beta2.Document.Page.Layout) other); + if (other instanceof com.google.cloud.documentai.v1beta2.Document.Page.Image) { + return mergeFrom((com.google.cloud.documentai.v1beta2.Document.Page.Image) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.cloud.documentai.v1beta2.Document.Page.Layout other) { - if (other - == com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance()) + public Builder mergeFrom(com.google.cloud.documentai.v1beta2.Document.Page.Image other) { + if (other == com.google.cloud.documentai.v1beta2.Document.Page.Image.getDefaultInstance()) return this; - if (other.hasTextAnchor()) { - mergeTextAnchor(other.getTextAnchor()); - } - if (other.getConfidence() != 0F) { - setConfidence(other.getConfidence()); + if (other.getContent() != com.google.protobuf.ByteString.EMPTY) { + setContent(other.getContent()); } - if (other.hasBoundingPoly()) { - mergeBoundingPoly(other.getBoundingPoly()); + if (!other.getMimeType().isEmpty()) { + mimeType_ = other.mimeType_; + bitField0_ |= 0x00000002; + onChanged(); } - if (other.orientation_ != 0) { - setOrientationValue(other.getOrientationValue()); + if (other.getWidth() != 0) { + setWidth(other.getWidth()); } - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000010; - onChanged(); + if (other.getHeight() != 0) { + setHeight(other.getHeight()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -7573,35 +7721,28 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getTextAnchorFieldBuilder().getBuilder(), extensionRegistry); + content_ = input.readBytes(); bitField0_ |= 0x00000001; break; } // case 10 - case 21: + case 18: { - confidence_ = input.readFloat(); + mimeType_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; - } // case 21 - case 26: + } // case 18 + case 24: { - input.readMessage( - getBoundingPolyFieldBuilder().getBuilder(), extensionRegistry); + width_ = input.readInt32(); bitField0_ |= 0x00000004; break; - } // case 26 + } // case 24 case 32: { - orientation_ = input.readEnum(); + height_ = input.readInt32(); bitField0_ |= 0x00000008; break; } // case 32 - case 42: - { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 42 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -7621,85 +7762,39 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.documentai.v1beta2.Document.TextAnchor textAnchor_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.TextAnchor, - com.google.cloud.documentai.v1beta2.Document.TextAnchor.Builder, - com.google.cloud.documentai.v1beta2.Document.TextAnchorOrBuilder> - textAnchorBuilder_; - /** - * - * - *
-         * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-         * 
- * - * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; - * - * @return Whether the textAnchor field is set. - */ - public boolean hasTextAnchor() { - return ((bitField0_ & 0x00000001) != 0); - } + private com.google.protobuf.ByteString content_ = com.google.protobuf.ByteString.EMPTY; /** * * *
-         * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+         * Raw byte content of the image.
          * 
* - * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; + * bytes content = 1; * - * @return The textAnchor. + * @return The content. */ - public com.google.cloud.documentai.v1beta2.Document.TextAnchor getTextAnchor() { - if (textAnchorBuilder_ == null) { - return textAnchor_ == null - ? com.google.cloud.documentai.v1beta2.Document.TextAnchor.getDefaultInstance() - : textAnchor_; - } else { - return textAnchorBuilder_.getMessage(); - } + @java.lang.Override + public com.google.protobuf.ByteString getContent() { + return content_; } /** * * *
-         * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+         * Raw byte content of the image.
          * 
* - * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; - */ - public Builder setTextAnchor( - com.google.cloud.documentai.v1beta2.Document.TextAnchor value) { - if (textAnchorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - textAnchor_ = value; - } else { - textAnchorBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-         * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-         * 
+ * bytes content = 1; * - * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; + * @param value The content to set. + * @return This builder for chaining. */ - public Builder setTextAnchor( - com.google.cloud.documentai.v1beta2.Document.TextAnchor.Builder builderForValue) { - if (textAnchorBuilder_ == null) { - textAnchor_ = builderForValue.build(); - } else { - textAnchorBuilder_.setMessage(builderForValue.build()); + public Builder setContent(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } + content_ = value; bitField0_ |= 0x00000001; onChanged(); return this; @@ -7708,144 +7803,88 @@ public Builder setTextAnchor( * * *
-         * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+         * Raw byte content of the image.
          * 
* - * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; - */ - public Builder mergeTextAnchor( - com.google.cloud.documentai.v1beta2.Document.TextAnchor value) { - if (textAnchorBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && textAnchor_ != null - && textAnchor_ - != com.google.cloud.documentai.v1beta2.Document.TextAnchor - .getDefaultInstance()) { - getTextAnchorBuilder().mergeFrom(value); - } else { - textAnchor_ = value; - } - } else { - textAnchorBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-         * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-         * 
+ * bytes content = 1; * - * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; + * @return This builder for chaining. */ - public Builder clearTextAnchor() { + public Builder clearContent() { bitField0_ = (bitField0_ & ~0x00000001); - textAnchor_ = null; - if (textAnchorBuilder_ != null) { - textAnchorBuilder_.dispose(); - textAnchorBuilder_ = null; - } + content_ = getDefaultInstance().getContent(); onChanged(); return this; } + + private java.lang.Object mimeType_ = ""; /** * * *
-         * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+         * Encoding [media type (MIME
+         * type)](https://www.iana.org/assignments/media-types/media-types.xhtml)
+         * for the image.
          * 
* - * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; - */ - public com.google.cloud.documentai.v1beta2.Document.TextAnchor.Builder - getTextAnchorBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getTextAnchorFieldBuilder().getBuilder(); - } - /** - * - * - *
-         * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-         * 
+ * string mime_type = 2; * - * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; + * @return The mimeType. */ - public com.google.cloud.documentai.v1beta2.Document.TextAnchorOrBuilder - getTextAnchorOrBuilder() { - if (textAnchorBuilder_ != null) { - return textAnchorBuilder_.getMessageOrBuilder(); + 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 textAnchor_ == null - ? com.google.cloud.documentai.v1beta2.Document.TextAnchor.getDefaultInstance() - : textAnchor_; - } - } - /** - * - * - *
-         * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-         * 
- * - * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.TextAnchor, - com.google.cloud.documentai.v1beta2.Document.TextAnchor.Builder, - com.google.cloud.documentai.v1beta2.Document.TextAnchorOrBuilder> - getTextAnchorFieldBuilder() { - if (textAnchorBuilder_ == null) { - textAnchorBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.TextAnchor, - com.google.cloud.documentai.v1beta2.Document.TextAnchor.Builder, - com.google.cloud.documentai.v1beta2.Document.TextAnchorOrBuilder>( - getTextAnchor(), getParentForChildren(), isClean()); - textAnchor_ = null; + return (java.lang.String) ref; } - return textAnchorBuilder_; } - - private float confidence_; /** * * *
-         * Confidence of the current [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] within context of the object this
-         * layout is for. e.g. confidence can be for a single token, a table,
-         * a visual element, etc. depending on context. Range [0, 1].
+         * Encoding [media type (MIME
+         * type)](https://www.iana.org/assignments/media-types/media-types.xhtml)
+         * for the image.
          * 
* - * float confidence = 2; + * string mime_type = 2; * - * @return The confidence. + * @return The bytes for mimeType. */ - @java.lang.Override - public float getConfidence() { - return confidence_; + 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; + } } /** * * *
-         * Confidence of the current [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] within context of the object this
-         * layout is for. e.g. confidence can be for a single token, a table,
-         * a visual element, etc. depending on context. Range [0, 1].
+         * Encoding [media type (MIME
+         * type)](https://www.iana.org/assignments/media-types/media-types.xhtml)
+         * for the image.
          * 
* - * float confidence = 2; + * string mime_type = 2; * - * @param value The confidence to set. + * @param value The mimeType to set. * @return This builder for chaining. */ - public Builder setConfidence(float value) { - - confidence_ = value; + public Builder setMimeType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + mimeType_ = value; bitField0_ |= 0x00000002; onChanged(); return this; @@ -7854,286 +7893,131 @@ public Builder setConfidence(float value) { * * *
-         * Confidence of the current [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] within context of the object this
-         * layout is for. e.g. confidence can be for a single token, a table,
-         * a visual element, etc. depending on context. Range [0, 1].
+         * Encoding [media type (MIME
+         * type)](https://www.iana.org/assignments/media-types/media-types.xhtml)
+         * for the image.
          * 
* - * float confidence = 2; + * string mime_type = 2; * * @return This builder for chaining. */ - public Builder clearConfidence() { + public Builder clearMimeType() { + mimeType_ = getDefaultInstance().getMimeType(); bitField0_ = (bitField0_ & ~0x00000002); - confidence_ = 0F; onChanged(); return this; } - - private com.google.cloud.documentai.v1beta2.BoundingPoly boundingPoly_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.documentai.v1beta2.BoundingPoly, - com.google.cloud.documentai.v1beta2.BoundingPoly.Builder, - com.google.cloud.documentai.v1beta2.BoundingPolyOrBuilder> - boundingPolyBuilder_; - /** - * - * - *
-         * The bounding polygon for the [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
-         * 
- * - * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly = 3; - * - * @return Whether the boundingPoly field is set. - */ - public boolean hasBoundingPoly() { - return ((bitField0_ & 0x00000004) != 0); - } /** * * *
-         * The bounding polygon for the [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
+         * Encoding [media type (MIME
+         * type)](https://www.iana.org/assignments/media-types/media-types.xhtml)
+         * for the image.
          * 
* - * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly = 3; - * - * @return The boundingPoly. - */ - public com.google.cloud.documentai.v1beta2.BoundingPoly getBoundingPoly() { - if (boundingPolyBuilder_ == null) { - return boundingPoly_ == null - ? com.google.cloud.documentai.v1beta2.BoundingPoly.getDefaultInstance() - : boundingPoly_; - } else { - return boundingPolyBuilder_.getMessage(); - } - } - /** - * - * - *
-         * The bounding polygon for the [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
-         * 
+ * string mime_type = 2; * - * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly = 3; + * @param value The bytes for mimeType to set. + * @return This builder for chaining. */ - public Builder setBoundingPoly(com.google.cloud.documentai.v1beta2.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingPoly_ = value; - } else { - boundingPolyBuilder_.setMessage(value); + public Builder setMimeTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } - bitField0_ |= 0x00000004; + checkByteStringIsUtf8(value); + mimeType_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } + + private int width_; /** * * *
-         * The bounding polygon for the [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
+         * Width of the image in pixels.
          * 
* - * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly = 3; - */ - public Builder setBoundingPoly( - com.google.cloud.documentai.v1beta2.BoundingPoly.Builder builderForValue) { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = builderForValue.build(); - } else { - boundingPolyBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-         * The bounding polygon for the [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
-         * 
+ * int32 width = 3; * - * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly = 3; + * @return The width. */ - public Builder mergeBoundingPoly(com.google.cloud.documentai.v1beta2.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && boundingPoly_ != null - && boundingPoly_ - != com.google.cloud.documentai.v1beta2.BoundingPoly.getDefaultInstance()) { - getBoundingPolyBuilder().mergeFrom(value); - } else { - boundingPoly_ = value; - } - } else { - boundingPolyBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; + @java.lang.Override + public int getWidth() { + return width_; } /** * * *
-         * The bounding polygon for the [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
+         * Width of the image in pixels.
          * 
* - * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly = 3; - */ - public Builder clearBoundingPoly() { - bitField0_ = (bitField0_ & ~0x00000004); - boundingPoly_ = null; - if (boundingPolyBuilder_ != null) { - boundingPolyBuilder_.dispose(); - boundingPolyBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-         * The bounding polygon for the [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
-         * 
+ * int32 width = 3; * - * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly = 3; + * @param value The width to set. + * @return This builder for chaining. */ - public com.google.cloud.documentai.v1beta2.BoundingPoly.Builder getBoundingPolyBuilder() { + public Builder setWidth(int value) { + + width_ = value; bitField0_ |= 0x00000004; onChanged(); - return getBoundingPolyFieldBuilder().getBuilder(); - } - /** - * - * - *
-         * The bounding polygon for the [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
-         * 
- * - * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly = 3; - */ - public com.google.cloud.documentai.v1beta2.BoundingPolyOrBuilder - getBoundingPolyOrBuilder() { - if (boundingPolyBuilder_ != null) { - return boundingPolyBuilder_.getMessageOrBuilder(); - } else { - return boundingPoly_ == null - ? com.google.cloud.documentai.v1beta2.BoundingPoly.getDefaultInstance() - : boundingPoly_; - } - } - /** - * - * - *
-         * The bounding polygon for the [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
-         * 
- * - * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.documentai.v1beta2.BoundingPoly, - com.google.cloud.documentai.v1beta2.BoundingPoly.Builder, - com.google.cloud.documentai.v1beta2.BoundingPolyOrBuilder> - getBoundingPolyFieldBuilder() { - if (boundingPolyBuilder_ == null) { - boundingPolyBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.documentai.v1beta2.BoundingPoly, - com.google.cloud.documentai.v1beta2.BoundingPoly.Builder, - com.google.cloud.documentai.v1beta2.BoundingPolyOrBuilder>( - getBoundingPoly(), getParentForChildren(), isClean()); - boundingPoly_ = null; - } - return boundingPolyBuilder_; - } - - private int orientation_ = 0; - /** - * - * - *
-         * Detected orientation for the [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
-         * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout.Orientation orientation = 4; - * - * - * @return The enum numeric value on the wire for orientation. - */ - @java.lang.Override - public int getOrientationValue() { - return orientation_; + return this; } /** * * *
-         * Detected orientation for the [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
+         * Width of the image in pixels.
          * 
* - * .google.cloud.documentai.v1beta2.Document.Page.Layout.Orientation orientation = 4; - * + * int32 width = 3; * - * @param value The enum numeric value on the wire for orientation to set. * @return This builder for chaining. */ - public Builder setOrientationValue(int value) { - orientation_ = value; - bitField0_ |= 0x00000008; + public Builder clearWidth() { + bitField0_ = (bitField0_ & ~0x00000004); + width_ = 0; onChanged(); return this; } + + private int height_; /** * * *
-         * Detected orientation for the [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
+         * Height of the image in pixels.
          * 
* - * .google.cloud.documentai.v1beta2.Document.Page.Layout.Orientation orientation = 4; - * + * int32 height = 4; * - * @return The orientation. + * @return The height. */ @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Layout.Orientation - getOrientation() { - com.google.cloud.documentai.v1beta2.Document.Page.Layout.Orientation result = - com.google.cloud.documentai.v1beta2.Document.Page.Layout.Orientation.forNumber( - orientation_); - return result == null - ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.Orientation.UNRECOGNIZED - : result; + public int getHeight() { + return height_; } /** * * *
-         * Detected orientation for the [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
+         * Height of the image in pixels.
          * 
* - * .google.cloud.documentai.v1beta2.Document.Page.Layout.Orientation orientation = 4; - * + * int32 height = 4; * - * @param value The orientation to set. + * @param value The height to set. * @return This builder for chaining. */ - public Builder setOrientation( - com.google.cloud.documentai.v1beta2.Document.Page.Layout.Orientation value) { - if (value == null) { - throw new NullPointerException(); - } + public Builder setHeight(int value) { + + height_ = value; bitField0_ |= 0x00000008; - orientation_ = value.getNumber(); onChanged(); return this; } @@ -8141,131 +8025,24 @@ public Builder setOrientation( * * *
-         * Detected orientation for the [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
+         * Height of the image in pixels.
          * 
* - * .google.cloud.documentai.v1beta2.Document.Page.Layout.Orientation orientation = 4; - * + * int32 height = 4; * * @return This builder for chaining. */ - public Builder clearOrientation() { + public Builder clearHeight() { bitField0_ = (bitField0_ & ~0x00000008); - orientation_ = 0; + height_ = 0; onChanged(); return this; } - private java.lang.Object id_ = ""; - /** - * - * - *
-         * Optional. This is the identifier used by referencing [PageAnchor][google.cloud.documentai.v1beta2.Document.PageAnchor]s.
-         * 
- * - * string id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-         * Optional. This is the identifier used by referencing [PageAnchor][google.cloud.documentai.v1beta2.Document.PageAnchor]s.
-         * 
- * - * string id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for id. - */ - public com.google.protobuf.ByteString getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-         * Optional. This is the identifier used by referencing [PageAnchor][google.cloud.documentai.v1beta2.Document.PageAnchor]s.
-         * 
- * - * string id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - id_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-         * Optional. This is the identifier used by referencing [PageAnchor][google.cloud.documentai.v1beta2.Document.PageAnchor]s.
-         * 
- * - * string id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - * - * - *
-         * Optional. This is the identifier used by referencing [PageAnchor][google.cloud.documentai.v1beta2.Document.PageAnchor]s.
-         * 
- * - * string id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000010; - 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 setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -8274,25 +8051,24 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta2.Document.Page.Layout) + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta2.Document.Page.Image) } - // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.Page.Layout) - private static final com.google.cloud.documentai.v1beta2.Document.Page.Layout - DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.Page.Image) + private static final com.google.cloud.documentai.v1beta2.Document.Page.Image DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta2.Document.Page.Layout(); + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta2.Document.Page.Image(); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Layout getDefaultInstance() { + public static com.google.cloud.documentai.v1beta2.Document.Page.Image getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public Layout parsePartialFrom( + public Image parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -8312,307 +8088,199 @@ public Layout parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Layout getDefaultInstanceForType() { + public com.google.cloud.documentai.v1beta2.Document.Page.Image getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface BlockOrBuilder + public interface MatrixOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.Page.Block) + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.Page.Matrix) com.google.protobuf.MessageOrBuilder { /** * * *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Block][google.cloud.documentai.v1beta2.Document.Page.Block].
+       * Number of rows in the matrix.
        * 
* - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * int32 rows = 1; * - * @return Whether the layout field is set. + * @return The rows. */ - boolean hasLayout(); + int getRows(); + /** * * *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Block][google.cloud.documentai.v1beta2.Document.Page.Block].
+       * Number of columns in the matrix.
        * 
* - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; - * - * @return The layout. - */ - com.google.cloud.documentai.v1beta2.Document.Page.Layout getLayout(); - /** - * + * int32 cols = 2; * - *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Block][google.cloud.documentai.v1beta2.Document.Page.Block].
-       * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * @return The cols. */ - com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder getLayoutOrBuilder(); + int getCols(); /** * * *
-       * A list of detected languages together with confidence.
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; - * - */ - java.util.List - getDetectedLanguagesList(); - /** - * - * - *
-       * A list of detected languages together with confidence.
+       * This encodes information about what data type the matrix uses.
+       * For example, 0 (CV_8U) is an unsigned 8-bit image. For the full list
+       * of OpenCV primitive data types, please refer to
+       * https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html
        * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; - * - */ - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage getDetectedLanguages( - int index); - /** - * - * - *
-       * A list of detected languages together with confidence.
-       * 
+ * int32 type = 3; * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; - * + * @return The type. */ - int getDetectedLanguagesCount(); + int getType(); + /** * * *
-       * A list of detected languages together with confidence.
+       * The matrix data.
        * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; - * - */ - java.util.List< - ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> - getDetectedLanguagesOrBuilderList(); - /** - * - * - *
-       * A list of detected languages together with confidence.
-       * 
+ * bytes data = 4; * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; - * + * @return The data. */ - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder - getDetectedLanguagesOrBuilder(int index); + com.google.protobuf.ByteString getData(); } /** * * *
-     * A block has a set of lines (collected into paragraphs) that have a
-     * common line-spacing and orientation.
+     * Representation for transformation matrix, intended to be compatible and
+     * used with OpenCV format for image manipulation.
      * 
* - * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.Block} + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.Matrix} */ - public static final class Block extends com.google.protobuf.GeneratedMessageV3 + public static final class Matrix extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.Page.Block) - BlockOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.Page.Matrix) + MatrixOrBuilder { private static final long serialVersionUID = 0L; - // Use Block.newBuilder() to construct. - private Block(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use Matrix.newBuilder() to construct. + private Matrix(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private Block() { - detectedLanguages_ = java.util.Collections.emptyList(); + private Matrix() { + data_ = com.google.protobuf.ByteString.EMPTY; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Block(); + return new Matrix(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_Block_descriptor; + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Matrix_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_Block_fieldAccessorTable + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Matrix_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1beta2.Document.Page.Block.class, - com.google.cloud.documentai.v1beta2.Document.Page.Block.Builder.class); + com.google.cloud.documentai.v1beta2.Document.Page.Matrix.class, + com.google.cloud.documentai.v1beta2.Document.Page.Matrix.Builder.class); } - public static final int LAYOUT_FIELD_NUMBER = 1; - private com.google.cloud.documentai.v1beta2.Document.Page.Layout layout_; + public static final int ROWS_FIELD_NUMBER = 1; + private int rows_ = 0; /** * * *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Block][google.cloud.documentai.v1beta2.Document.Page.Block].
+       * Number of rows in the matrix.
        * 
* - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * int32 rows = 1; * - * @return Whether the layout field is set. + * @return The rows. */ @java.lang.Override - public boolean hasLayout() { - return layout_ != null; + public int getRows() { + return rows_; } + + public static final int COLS_FIELD_NUMBER = 2; + private int cols_ = 0; /** * * *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Block][google.cloud.documentai.v1beta2.Document.Page.Block].
+       * Number of columns in the matrix.
        * 
* - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; - * - * @return The layout. - */ - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Layout getLayout() { - return layout_ == null - ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() - : layout_; - } - /** - * - * - *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Block][google.cloud.documentai.v1beta2.Document.Page.Block].
-       * 
+ * int32 cols = 2; * - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * @return The cols. */ @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder - getLayoutOrBuilder() { - return layout_ == null - ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() - : layout_; + public int getCols() { + return cols_; } - public static final int DETECTED_LANGUAGES_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private java.util.List - detectedLanguages_; - /** - * - * - *
-       * A list of detected languages together with confidence.
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; - * - */ - @java.lang.Override - public java.util.List - getDetectedLanguagesList() { - return detectedLanguages_; - } + public static final int TYPE_FIELD_NUMBER = 3; + private int type_ = 0; /** * * *
-       * A list of detected languages together with confidence.
+       * This encodes information about what data type the matrix uses.
+       * For example, 0 (CV_8U) is an unsigned 8-bit image. For the full list
+       * of OpenCV primitive data types, please refer to
+       * https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html
        * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; - * - */ - @java.lang.Override - public java.util.List< - ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> - getDetectedLanguagesOrBuilderList() { - return detectedLanguages_; - } - /** - * - * - *
-       * A list of detected languages together with confidence.
-       * 
+ * int32 type = 3; * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; - * + * @return The type. */ @java.lang.Override - public int getDetectedLanguagesCount() { - return detectedLanguages_.size(); + public int getType() { + return type_; } + + public static final int DATA_FIELD_NUMBER = 4; + private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; /** * * *
-       * A list of detected languages together with confidence.
+       * The matrix data.
        * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; - * - */ - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage - getDetectedLanguages(int index) { - return detectedLanguages_.get(index); - } - /** - * - * - *
-       * A list of detected languages together with confidence.
-       * 
+ * bytes data = 4; * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; - * + * @return The data. */ @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder - getDetectedLanguagesOrBuilder(int index) { - return detectedLanguages_.get(index); + public com.google.protobuf.ByteString getData() { + return data_; } private byte memoizedIsInitialized = -1; @@ -8629,11 +8297,17 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (layout_ != null) { - output.writeMessage(1, getLayout()); + if (rows_ != 0) { + output.writeInt32(1, rows_); } - for (int i = 0; i < detectedLanguages_.size(); i++) { - output.writeMessage(2, detectedLanguages_.get(i)); + if (cols_ != 0) { + output.writeInt32(2, cols_); + } + if (type_ != 0) { + output.writeInt32(3, type_); + } + if (!data_.isEmpty()) { + output.writeBytes(4, data_); } getUnknownFields().writeTo(output); } @@ -8644,13 +8318,17 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (layout_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getLayout()); + if (rows_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, rows_); } - for (int i = 0; i < detectedLanguages_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, detectedLanguages_.get(i)); + if (cols_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, cols_); + } + if (type_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, type_); + } + if (!data_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(4, data_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -8662,17 +8340,16 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.documentai.v1beta2.Document.Page.Block)) { + if (!(obj instanceof com.google.cloud.documentai.v1beta2.Document.Page.Matrix)) { return super.equals(obj); } - com.google.cloud.documentai.v1beta2.Document.Page.Block other = - (com.google.cloud.documentai.v1beta2.Document.Page.Block) obj; + com.google.cloud.documentai.v1beta2.Document.Page.Matrix other = + (com.google.cloud.documentai.v1beta2.Document.Page.Matrix) obj; - if (hasLayout() != other.hasLayout()) return false; - if (hasLayout()) { - if (!getLayout().equals(other.getLayout())) return false; - } - if (!getDetectedLanguagesList().equals(other.getDetectedLanguagesList())) return false; + if (getRows() != other.getRows()) return false; + if (getCols() != other.getCols()) return false; + if (getType() != other.getType()) return false; + if (!getData().equals(other.getData())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -8684,84 +8361,84 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (hasLayout()) { - hash = (37 * hash) + LAYOUT_FIELD_NUMBER; - hash = (53 * hash) + getLayout().hashCode(); - } - if (getDetectedLanguagesCount() > 0) { - hash = (37 * hash) + DETECTED_LANGUAGES_FIELD_NUMBER; - hash = (53 * hash) + getDetectedLanguagesList().hashCode(); - } + hash = (37 * hash) + ROWS_FIELD_NUMBER; + hash = (53 * hash) + getRows(); + hash = (37 * hash) + COLS_FIELD_NUMBER; + hash = (53 * hash) + getCols(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType(); + hash = (37 * hash) + DATA_FIELD_NUMBER; + hash = (53 * hash) + getData().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.documentai.v1beta2.Document.Page.Block parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Matrix parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Block parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Matrix 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.v1beta2.Document.Page.Block parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Matrix parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Block parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Matrix 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.v1beta2.Document.Page.Block parseFrom(byte[] data) + public static com.google.cloud.documentai.v1beta2.Document.Page.Matrix parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Block parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Matrix parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Block parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Matrix parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Block parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Matrix 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.v1beta2.Document.Page.Block parseDelimitedFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Matrix parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Block parseDelimitedFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Matrix 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.v1beta2.Document.Page.Block parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Matrix parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Block parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Matrix parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -8779,7 +8456,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.documentai.v1beta2.Document.Page.Block prototype) { + com.google.cloud.documentai.v1beta2.Document.Page.Matrix prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -8798,33 +8475,33 @@ protected Builder newBuilderForType( * * *
-       * A block has a set of lines (collected into paragraphs) that have a
-       * common line-spacing and orientation.
+       * Representation for transformation matrix, intended to be compatible and
+       * used with OpenCV format for image manipulation.
        * 
* - * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.Block} + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.Matrix} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.Page.Block) - com.google.cloud.documentai.v1beta2.Document.Page.BlockOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.Page.Matrix) + com.google.cloud.documentai.v1beta2.Document.Page.MatrixOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_Block_descriptor; + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Matrix_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_Block_fieldAccessorTable + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Matrix_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1beta2.Document.Page.Block.class, - com.google.cloud.documentai.v1beta2.Document.Page.Block.Builder.class); + com.google.cloud.documentai.v1beta2.Document.Page.Matrix.class, + com.google.cloud.documentai.v1beta2.Document.Page.Matrix.Builder.class); } - // Construct using com.google.cloud.documentai.v1beta2.Document.Page.Block.newBuilder() + // Construct using com.google.cloud.documentai.v1beta2.Document.Page.Matrix.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { @@ -8835,35 +8512,28 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { public Builder clear() { super.clear(); bitField0_ = 0; - layout_ = null; - if (layoutBuilder_ != null) { - layoutBuilder_.dispose(); - layoutBuilder_ = null; - } - if (detectedLanguagesBuilder_ == null) { - detectedLanguages_ = java.util.Collections.emptyList(); - } else { - detectedLanguages_ = null; - detectedLanguagesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); + rows_ = 0; + cols_ = 0; + type_ = 0; + data_ = com.google.protobuf.ByteString.EMPTY; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_Block_descriptor; + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Matrix_descriptor; } @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Block getDefaultInstanceForType() { - return com.google.cloud.documentai.v1beta2.Document.Page.Block.getDefaultInstance(); + public com.google.cloud.documentai.v1beta2.Document.Page.Matrix + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta2.Document.Page.Matrix.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Block build() { - com.google.cloud.documentai.v1beta2.Document.Page.Block result = buildPartial(); + public com.google.cloud.documentai.v1beta2.Document.Page.Matrix build() { + com.google.cloud.documentai.v1beta2.Document.Page.Matrix result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -8871,10 +8541,9 @@ public com.google.cloud.documentai.v1beta2.Document.Page.Block build() { } @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Block buildPartial() { - com.google.cloud.documentai.v1beta2.Document.Page.Block result = - new com.google.cloud.documentai.v1beta2.Document.Page.Block(this); - buildPartialRepeatedFields(result); + public com.google.cloud.documentai.v1beta2.Document.Page.Matrix buildPartial() { + com.google.cloud.documentai.v1beta2.Document.Page.Matrix result = + new com.google.cloud.documentai.v1beta2.Document.Page.Matrix(this); if (bitField0_ != 0) { buildPartial0(result); } @@ -8882,23 +8551,20 @@ public com.google.cloud.documentai.v1beta2.Document.Page.Block buildPartial() { return result; } - private void buildPartialRepeatedFields( - com.google.cloud.documentai.v1beta2.Document.Page.Block result) { - if (detectedLanguagesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - detectedLanguages_ = java.util.Collections.unmodifiableList(detectedLanguages_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.detectedLanguages_ = detectedLanguages_; - } else { - result.detectedLanguages_ = detectedLanguagesBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.documentai.v1beta2.Document.Page.Block result) { + private void buildPartial0( + com.google.cloud.documentai.v1beta2.Document.Page.Matrix result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { - result.layout_ = layoutBuilder_ == null ? layout_ : layoutBuilder_.build(); + result.rows_ = rows_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.cols_ = cols_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.data_ = data_; } } @@ -8939,46 +8605,29 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.documentai.v1beta2.Document.Page.Block) { - return mergeFrom((com.google.cloud.documentai.v1beta2.Document.Page.Block) other); + if (other instanceof com.google.cloud.documentai.v1beta2.Document.Page.Matrix) { + return mergeFrom((com.google.cloud.documentai.v1beta2.Document.Page.Matrix) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.cloud.documentai.v1beta2.Document.Page.Block other) { - if (other == com.google.cloud.documentai.v1beta2.Document.Page.Block.getDefaultInstance()) + public Builder mergeFrom(com.google.cloud.documentai.v1beta2.Document.Page.Matrix other) { + if (other + == com.google.cloud.documentai.v1beta2.Document.Page.Matrix.getDefaultInstance()) return this; - if (other.hasLayout()) { - mergeLayout(other.getLayout()); + if (other.getRows() != 0) { + setRows(other.getRows()); } - if (detectedLanguagesBuilder_ == null) { - if (!other.detectedLanguages_.isEmpty()) { - if (detectedLanguages_.isEmpty()) { - detectedLanguages_ = other.detectedLanguages_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.addAll(other.detectedLanguages_); - } - onChanged(); - } - } else { - if (!other.detectedLanguages_.isEmpty()) { - if (detectedLanguagesBuilder_.isEmpty()) { - detectedLanguagesBuilder_.dispose(); - detectedLanguagesBuilder_ = null; - detectedLanguages_ = other.detectedLanguages_; - bitField0_ = (bitField0_ & ~0x00000002); - detectedLanguagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getDetectedLanguagesFieldBuilder() - : null; - } else { - detectedLanguagesBuilder_.addAllMessages(other.detectedLanguages_); - } - } + if (other.getCols() != 0) { + setCols(other.getCols()); + } + if (other.getType() != 0) { + setType(other.getType()); + } + if (other.getData() != com.google.protobuf.ByteString.EMPTY) { + setData(other.getData()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -9006,27 +8655,30 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: + case 8: { - input.readMessage(getLayoutFieldBuilder().getBuilder(), extensionRegistry); + rows_ = input.readInt32(); bitField0_ |= 0x00000001; break; - } // case 10 - case 18: + } // case 8 + case 16: { - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage m = - input.readMessage( - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage - .parser(), - extensionRegistry); - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(m); - } else { - detectedLanguagesBuilder_.addMessage(m); - } + cols_ = input.readInt32(); + bitField0_ |= 0x00000002; break; - } // case 18 + } // case 16 + case 24: + { + type_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + data_ = input.readBytes(); + bitField0_ |= 0x00000008; + break; + } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -9046,112 +8698,91 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.documentai.v1beta2.Document.Page.Layout layout_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Layout, - com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder> - layoutBuilder_; + private int rows_; /** * * *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Block][google.cloud.documentai.v1beta2.Document.Page.Block].
+         * Number of rows in the matrix.
          * 
* - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * int32 rows = 1; * - * @return Whether the layout field is set. + * @return The rows. */ - public boolean hasLayout() { - return ((bitField0_ & 0x00000001) != 0); + @java.lang.Override + public int getRows() { + return rows_; } /** * * *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Block][google.cloud.documentai.v1beta2.Document.Page.Block].
+         * Number of rows in the matrix.
          * 
* - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * int32 rows = 1; * - * @return The layout. + * @param value The rows to set. + * @return This builder for chaining. */ - public com.google.cloud.documentai.v1beta2.Document.Page.Layout getLayout() { - if (layoutBuilder_ == null) { - return layout_ == null - ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() - : layout_; - } else { - return layoutBuilder_.getMessage(); - } + public Builder setRows(int value) { + + rows_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; } /** * * *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Block][google.cloud.documentai.v1beta2.Document.Page.Block].
+         * Number of rows in the matrix.
          * 
* - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * int32 rows = 1; + * + * @return This builder for chaining. */ - public Builder setLayout(com.google.cloud.documentai.v1beta2.Document.Page.Layout value) { - if (layoutBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - layout_ = value; - } else { - layoutBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; + public Builder clearRows() { + bitField0_ = (bitField0_ & ~0x00000001); + rows_ = 0; onChanged(); return this; } + + private int cols_; /** * * *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Block][google.cloud.documentai.v1beta2.Document.Page.Block].
+         * Number of columns in the matrix.
          * 
* - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * int32 cols = 2; + * + * @return The cols. */ - public Builder setLayout( - com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder builderForValue) { - if (layoutBuilder_ == null) { - layout_ = builderForValue.build(); - } else { - layoutBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; + @java.lang.Override + public int getCols() { + return cols_; } /** * * *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Block][google.cloud.documentai.v1beta2.Document.Page.Block].
+         * Number of columns in the matrix.
          * 
* - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * int32 cols = 2; + * + * @param value The cols to set. + * @return This builder for chaining. */ - public Builder mergeLayout(com.google.cloud.documentai.v1beta2.Document.Page.Layout value) { - if (layoutBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && layout_ != null - && layout_ - != com.google.cloud.documentai.v1beta2.Document.Page.Layout - .getDefaultInstance()) { - getLayoutBuilder().mergeFrom(value); - } else { - layout_ = value; - } - } else { - layoutBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; + public Builder setCols(int value) { + + cols_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -9159,495 +8790,136 @@ public Builder mergeLayout(com.google.cloud.documentai.v1beta2.Document.Page.Lay * * *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Block][google.cloud.documentai.v1beta2.Document.Page.Block].
+         * Number of columns in the matrix.
          * 
* - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * int32 cols = 2; + * + * @return This builder for chaining. */ - public Builder clearLayout() { - bitField0_ = (bitField0_ & ~0x00000001); - layout_ = null; - if (layoutBuilder_ != null) { - layoutBuilder_.dispose(); - layoutBuilder_ = null; - } + public Builder clearCols() { + bitField0_ = (bitField0_ & ~0x00000002); + cols_ = 0; onChanged(); return this; } + + private int type_; /** * * *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Block][google.cloud.documentai.v1beta2.Document.Page.Block].
+         * This encodes information about what data type the matrix uses.
+         * For example, 0 (CV_8U) is an unsigned 8-bit image. For the full list
+         * of OpenCV primitive data types, please refer to
+         * https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html
          * 
* - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; - */ - public com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder getLayoutBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getLayoutFieldBuilder().getBuilder(); - } - /** - * - * - *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Block][google.cloud.documentai.v1beta2.Document.Page.Block].
-         * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; - */ - public com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder - getLayoutOrBuilder() { - if (layoutBuilder_ != null) { - return layoutBuilder_.getMessageOrBuilder(); - } else { - return layout_ == null - ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() - : layout_; - } - } - /** - * - * - *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Block][google.cloud.documentai.v1beta2.Document.Page.Block].
-         * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Layout, - com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder> - getLayoutFieldBuilder() { - if (layoutBuilder_ == null) { - layoutBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Layout, - com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder>( - getLayout(), getParentForChildren(), isClean()); - layout_ = null; - } - return layoutBuilder_; - } - - private java.util.List - detectedLanguages_ = java.util.Collections.emptyList(); - - private void ensureDetectedLanguagesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - detectedLanguages_ = - new java.util.ArrayList< - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage>( - detectedLanguages_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> - detectedLanguagesBuilder_; - - /** - * - * - *
-         * A list of detected languages together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; - * - */ - public java.util.List - getDetectedLanguagesList() { - if (detectedLanguagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(detectedLanguages_); - } else { - return detectedLanguagesBuilder_.getMessageList(); - } - } - /** - * - * - *
-         * A list of detected languages together with confidence.
-         * 
+ * int32 type = 3; * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; - * + * @return The type. */ - public int getDetectedLanguagesCount() { - if (detectedLanguagesBuilder_ == null) { - return detectedLanguages_.size(); - } else { - return detectedLanguagesBuilder_.getCount(); - } + @java.lang.Override + public int getType() { + return type_; } /** * * *
-         * A list of detected languages together with confidence.
+         * This encodes information about what data type the matrix uses.
+         * For example, 0 (CV_8U) is an unsigned 8-bit image. For the full list
+         * of OpenCV primitive data types, please refer to
+         * https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; - * - */ - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage - getDetectedLanguages(int index) { - if (detectedLanguagesBuilder_ == null) { - return detectedLanguages_.get(index); - } else { - return detectedLanguagesBuilder_.getMessage(index); - } - } - /** - * - * - *
-         * A list of detected languages together with confidence.
-         * 
+ * int32 type = 3; * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; - * + * @param value The type to set. + * @return This builder for chaining. */ - public Builder setDetectedLanguages( - int index, com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { - if (detectedLanguagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.set(index, value); - onChanged(); - } else { - detectedLanguagesBuilder_.setMessage(index, value); - } + public Builder setType(int value) { + + type_ = value; + bitField0_ |= 0x00000004; + onChanged(); return this; } /** * * *
-         * A list of detected languages together with confidence.
+         * This encodes information about what data type the matrix uses.
+         * For example, 0 (CV_8U) is an unsigned 8-bit image. For the full list
+         * of OpenCV primitive data types, please refer to
+         * https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; - * - */ - public Builder setDetectedLanguages( - int index, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder - builderForValue) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.set(index, builderForValue.build()); - onChanged(); - } else { - detectedLanguagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-         * A list of detected languages together with confidence.
-         * 
+ * int32 type = 3; * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; - * + * @return This builder for chaining. */ - public Builder addDetectedLanguages( - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { - if (detectedLanguagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(value); - onChanged(); - } else { - detectedLanguagesBuilder_.addMessage(value); - } + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000004); + type_ = 0; + onChanged(); return this; } + + private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; /** * * *
-         * A list of detected languages together with confidence.
+         * The matrix data.
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; - * - */ - public Builder addDetectedLanguages( - int index, com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { - if (detectedLanguagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(index, value); - onChanged(); - } else { - detectedLanguagesBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-         * A list of detected languages together with confidence.
-         * 
+ * bytes data = 4; * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; - * + * @return The data. */ - public Builder addDetectedLanguages( - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder - builderForValue) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(builderForValue.build()); - onChanged(); - } else { - detectedLanguagesBuilder_.addMessage(builderForValue.build()); - } - return this; + @java.lang.Override + public com.google.protobuf.ByteString getData() { + return data_; } /** * * *
-         * A list of detected languages together with confidence.
+         * The matrix data.
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; - * - */ - public Builder addDetectedLanguages( - int index, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder - builderForValue) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(index, builderForValue.build()); - onChanged(); - } else { - detectedLanguagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-         * A list of detected languages together with confidence.
-         * 
+ * bytes data = 4; * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; - * + * @param value The data to set. + * @return This builder for chaining. */ - public Builder addAllDetectedLanguages( - java.lang.Iterable< - ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage> - values) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, detectedLanguages_); - onChanged(); - } else { - detectedLanguagesBuilder_.addAllMessages(values); + public Builder setData(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } + data_ = value; + bitField0_ |= 0x00000008; + onChanged(); return this; } /** * * *
-         * A list of detected languages together with confidence.
+         * The matrix data.
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; - * - */ - public Builder clearDetectedLanguages() { - if (detectedLanguagesBuilder_ == null) { - detectedLanguages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - detectedLanguagesBuilder_.clear(); - } - return this; - } - /** - * - * - *
-         * A list of detected languages together with confidence.
-         * 
+ * bytes data = 4; * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; - * + * @return This builder for chaining. */ - public Builder removeDetectedLanguages(int index) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.remove(index); - onChanged(); - } else { - detectedLanguagesBuilder_.remove(index); - } + public Builder clearData() { + bitField0_ = (bitField0_ & ~0x00000008); + data_ = getDefaultInstance().getData(); + onChanged(); return this; } - /** - * - * - *
-         * A list of detected languages together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; - * - */ - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder - getDetectedLanguagesBuilder(int index) { - return getDetectedLanguagesFieldBuilder().getBuilder(index); - } - /** - * - * - *
-         * A list of detected languages together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; - * - */ - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder - getDetectedLanguagesOrBuilder(int index) { - if (detectedLanguagesBuilder_ == null) { - return detectedLanguages_.get(index); - } else { - return detectedLanguagesBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-         * A list of detected languages together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; - * - */ - public java.util.List< - ? extends - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> - getDetectedLanguagesOrBuilderList() { - if (detectedLanguagesBuilder_ != null) { - return detectedLanguagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(detectedLanguages_); - } - } - /** - * - * - *
-         * A list of detected languages together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; - * - */ - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder - addDetectedLanguagesBuilder() { - return getDetectedLanguagesFieldBuilder() - .addBuilder( - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage - .getDefaultInstance()); - } - /** - * - * - *
-         * A list of detected languages together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; - * - */ - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder - addDetectedLanguagesBuilder(int index) { - return getDetectedLanguagesFieldBuilder() - .addBuilder( - index, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage - .getDefaultInstance()); - } - /** - * - * - *
-         * A list of detected languages together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; - * - */ - public java.util.List< - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder> - getDetectedLanguagesBuilderList() { - return getDetectedLanguagesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> - getDetectedLanguagesFieldBuilder() { - if (detectedLanguagesBuilder_ == null) { - detectedLanguagesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder>( - detectedLanguages_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - detectedLanguages_ = null; - } - return detectedLanguagesBuilder_; - } @java.lang.Override public final Builder setUnknownFields( @@ -9661,24 +8933,25 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta2.Document.Page.Block) + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta2.Document.Page.Matrix) } - // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.Page.Block) - private static final com.google.cloud.documentai.v1beta2.Document.Page.Block DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.Page.Matrix) + private static final com.google.cloud.documentai.v1beta2.Document.Page.Matrix + DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta2.Document.Page.Block(); + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta2.Document.Page.Matrix(); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Block getDefaultInstance() { + public static com.google.cloud.documentai.v1beta2.Document.Page.Matrix getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public Block parsePartialFrom( + public Matrix parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -9698,306 +8971,573 @@ public Block parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Block getDefaultInstanceForType() { + public com.google.cloud.documentai.v1beta2.Document.Page.Matrix getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface ParagraphOrBuilder + public interface LayoutOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.Page.Paragraph) + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.Page.Layout) com.google.protobuf.MessageOrBuilder { /** * * *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Paragraph][google.cloud.documentai.v1beta2.Document.Page.Paragraph].
+       * Text anchor indexing into the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].
        * 
* - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; * - * @return Whether the layout field is set. + * @return Whether the textAnchor field is set. */ - boolean hasLayout(); + boolean hasTextAnchor(); /** * * *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Paragraph][google.cloud.documentai.v1beta2.Document.Page.Paragraph].
+       * Text anchor indexing into the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].
        * 
* - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; * - * @return The layout. + * @return The textAnchor. */ - com.google.cloud.documentai.v1beta2.Document.Page.Layout getLayout(); + com.google.cloud.documentai.v1beta2.Document.TextAnchor getTextAnchor(); /** * * *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Paragraph][google.cloud.documentai.v1beta2.Document.Page.Paragraph].
+       * Text anchor indexing into the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].
        * 
* - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; */ - com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder getLayoutOrBuilder(); + com.google.cloud.documentai.v1beta2.Document.TextAnchorOrBuilder getTextAnchorOrBuilder(); /** * * *
-       * A list of detected languages together with confidence.
+       * Confidence of the current
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] within
+       * context of the object this layout is for. e.g. confidence can be for a
+       * single token, a table, a visual element, etc. depending on context.
+       * Range `[0, 1]`.
        * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; - * + * float confidence = 2; + * + * @return The confidence. */ - java.util.List - getDetectedLanguagesList(); + float getConfidence(); + /** * * *
-       * A list of detected languages together with confidence.
+       * The bounding polygon for the
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
        * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; - * + * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly = 3; + * + * @return Whether the boundingPoly field is set. */ - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage getDetectedLanguages( - int index); + boolean hasBoundingPoly(); /** * * *
-       * A list of detected languages together with confidence.
+       * The bounding polygon for the
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
        * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; - * + * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly = 3; + * + * @return The boundingPoly. */ - int getDetectedLanguagesCount(); + com.google.cloud.documentai.v1beta2.BoundingPoly getBoundingPoly(); /** * * *
-       * A list of detected languages together with confidence.
+       * The bounding polygon for the
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
        * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; - * + * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly = 3; */ - java.util.List< - ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> - getDetectedLanguagesOrBuilderList(); + com.google.cloud.documentai.v1beta2.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); + /** * * *
-       * A list of detected languages together with confidence.
+       * Detected orientation for the
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
        * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; + * .google.cloud.documentai.v1beta2.Document.Page.Layout.Orientation orientation = 4; * + * + * @return The enum numeric value on the wire for orientation. */ - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder - getDetectedLanguagesOrBuilder(int index); + int getOrientationValue(); + /** + * + * + *
+       * Detected orientation for the
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout.Orientation orientation = 4; + * + * + * @return The orientation. + */ + com.google.cloud.documentai.v1beta2.Document.Page.Layout.Orientation getOrientation(); } /** * * *
-     * A collection of lines that a human would perceive as a paragraph.
+     * Visual element describing a layout unit on a page.
      * 
* - * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.Paragraph} + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.Layout} */ - public static final class Paragraph extends com.google.protobuf.GeneratedMessageV3 + public static final class Layout extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.Page.Paragraph) - ParagraphOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.Page.Layout) + LayoutOrBuilder { private static final long serialVersionUID = 0L; - // Use Paragraph.newBuilder() to construct. - private Paragraph(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use Layout.newBuilder() to construct. + private Layout(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private Paragraph() { - detectedLanguages_ = java.util.Collections.emptyList(); + private Layout() { + orientation_ = 0; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Paragraph(); + return new Layout(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_Paragraph_descriptor; + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Layout_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_Paragraph_fieldAccessorTable + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Layout_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1beta2.Document.Page.Paragraph.class, - com.google.cloud.documentai.v1beta2.Document.Page.Paragraph.Builder.class); + com.google.cloud.documentai.v1beta2.Document.Page.Layout.class, + com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder.class); } - public static final int LAYOUT_FIELD_NUMBER = 1; - private com.google.cloud.documentai.v1beta2.Document.Page.Layout layout_; /** * * *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Paragraph][google.cloud.documentai.v1beta2.Document.Page.Paragraph].
+       * Detected human reading orientation.
        * 
* - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * Protobuf enum {@code google.cloud.documentai.v1beta2.Document.Page.Layout.Orientation} + */ + public enum Orientation implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+         * Unspecified orientation.
+         * 
+ * + * ORIENTATION_UNSPECIFIED = 0; + */ + ORIENTATION_UNSPECIFIED(0), + /** + * + * + *
+         * Orientation is aligned with page up.
+         * 
+ * + * PAGE_UP = 1; + */ + PAGE_UP(1), + /** + * + * + *
+         * Orientation is aligned with page right.
+         * Turn the head 90 degrees clockwise from upright to read.
+         * 
+ * + * PAGE_RIGHT = 2; + */ + PAGE_RIGHT(2), + /** + * + * + *
+         * Orientation is aligned with page down.
+         * Turn the head 180 degrees from upright to read.
+         * 
+ * + * PAGE_DOWN = 3; + */ + PAGE_DOWN(3), + /** + * + * + *
+         * Orientation is aligned with page left.
+         * Turn the head 90 degrees counterclockwise from upright to read.
+         * 
+ * + * PAGE_LEFT = 4; + */ + PAGE_LEFT(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+         * Unspecified orientation.
+         * 
+ * + * ORIENTATION_UNSPECIFIED = 0; + */ + public static final int ORIENTATION_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+         * Orientation is aligned with page up.
+         * 
+ * + * PAGE_UP = 1; + */ + public static final int PAGE_UP_VALUE = 1; + /** + * + * + *
+         * Orientation is aligned with page right.
+         * Turn the head 90 degrees clockwise from upright to read.
+         * 
+ * + * PAGE_RIGHT = 2; + */ + public static final int PAGE_RIGHT_VALUE = 2; + /** + * + * + *
+         * Orientation is aligned with page down.
+         * Turn the head 180 degrees from upright to read.
+         * 
+ * + * PAGE_DOWN = 3; + */ + public static final int PAGE_DOWN_VALUE = 3; + /** + * + * + *
+         * Orientation is aligned with page left.
+         * Turn the head 90 degrees counterclockwise from upright to read.
+         * 
+ * + * PAGE_LEFT = 4; + */ + public static final int PAGE_LEFT_VALUE = 4; + + 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 Orientation 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 Orientation forNumber(int value) { + switch (value) { + case 0: + return ORIENTATION_UNSPECIFIED; + case 1: + return PAGE_UP; + case 2: + return PAGE_RIGHT; + case 3: + return PAGE_DOWN; + case 4: + return PAGE_LEFT; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Orientation findValueByNumber(int number) { + return Orientation.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Orientation[] VALUES = values(); + + public static Orientation valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Orientation(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.documentai.v1beta2.Document.Page.Layout.Orientation) + } + + public static final int TEXT_ANCHOR_FIELD_NUMBER = 1; + private com.google.cloud.documentai.v1beta2.Document.TextAnchor textAnchor_; + /** * - * @return Whether the layout field is set. + * + *
+       * Text anchor indexing into the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; + * + * @return Whether the textAnchor field is set. */ @java.lang.Override - public boolean hasLayout() { - return layout_ != null; + public boolean hasTextAnchor() { + return textAnchor_ != null; } /** * * *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Paragraph][google.cloud.documentai.v1beta2.Document.Page.Paragraph].
+       * Text anchor indexing into the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].
        * 
* - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; * - * @return The layout. + * @return The textAnchor. */ @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Layout getLayout() { - return layout_ == null - ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() - : layout_; + public com.google.cloud.documentai.v1beta2.Document.TextAnchor getTextAnchor() { + return textAnchor_ == null + ? com.google.cloud.documentai.v1beta2.Document.TextAnchor.getDefaultInstance() + : textAnchor_; } /** * * *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Paragraph][google.cloud.documentai.v1beta2.Document.Page.Paragraph].
+       * Text anchor indexing into the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].
        * 
* - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; */ @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder - getLayoutOrBuilder() { - return layout_ == null - ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() - : layout_; + public com.google.cloud.documentai.v1beta2.Document.TextAnchorOrBuilder + getTextAnchorOrBuilder() { + return textAnchor_ == null + ? com.google.cloud.documentai.v1beta2.Document.TextAnchor.getDefaultInstance() + : textAnchor_; } - public static final int DETECTED_LANGUAGES_FIELD_NUMBER = 2; + public static final int CONFIDENCE_FIELD_NUMBER = 2; + private float confidence_ = 0F; + /** + * + * + *
+       * Confidence of the current
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] within
+       * context of the object this layout is for. e.g. confidence can be for a
+       * single token, a table, a visual element, etc. depending on context.
+       * Range `[0, 1]`.
+       * 
+ * + * float confidence = 2; + * + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } - @SuppressWarnings("serial") - private java.util.List - detectedLanguages_; + public static final int BOUNDING_POLY_FIELD_NUMBER = 3; + private com.google.cloud.documentai.v1beta2.BoundingPoly boundingPoly_; /** * * *
-       * A list of detected languages together with confidence.
+       * The bounding polygon for the
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
        * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; - * + * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly = 3; + * + * @return Whether the boundingPoly field is set. */ @java.lang.Override - public java.util.List - getDetectedLanguagesList() { - return detectedLanguages_; + public boolean hasBoundingPoly() { + return boundingPoly_ != null; } /** * * *
-       * A list of detected languages together with confidence.
+       * The bounding polygon for the
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
        * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; - * + * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly = 3; + * + * @return The boundingPoly. */ @java.lang.Override - public java.util.List< - ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> - getDetectedLanguagesOrBuilderList() { - return detectedLanguages_; + public com.google.cloud.documentai.v1beta2.BoundingPoly getBoundingPoly() { + return boundingPoly_ == null + ? com.google.cloud.documentai.v1beta2.BoundingPoly.getDefaultInstance() + : boundingPoly_; } /** * * *
-       * A list of detected languages together with confidence.
+       * The bounding polygon for the
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
        * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; - * + * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly = 3; */ @java.lang.Override - public int getDetectedLanguagesCount() { - return detectedLanguages_.size(); + public com.google.cloud.documentai.v1beta2.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + return boundingPoly_ == null + ? com.google.cloud.documentai.v1beta2.BoundingPoly.getDefaultInstance() + : boundingPoly_; } + + public static final int ORIENTATION_FIELD_NUMBER = 4; + private int orientation_ = 0; /** * * *
-       * A list of detected languages together with confidence.
+       * Detected orientation for the
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
        * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; + * .google.cloud.documentai.v1beta2.Document.Page.Layout.Orientation orientation = 4; * + * + * @return The enum numeric value on the wire for orientation. */ @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage - getDetectedLanguages(int index) { - return detectedLanguages_.get(index); + public int getOrientationValue() { + return orientation_; } /** * * *
-       * A list of detected languages together with confidence.
+       * Detected orientation for the
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
        * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; + * .google.cloud.documentai.v1beta2.Document.Page.Layout.Orientation orientation = 4; * + * + * @return The orientation. */ @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder - getDetectedLanguagesOrBuilder(int index) { - return detectedLanguages_.get(index); + public com.google.cloud.documentai.v1beta2.Document.Page.Layout.Orientation getOrientation() { + com.google.cloud.documentai.v1beta2.Document.Page.Layout.Orientation result = + com.google.cloud.documentai.v1beta2.Document.Page.Layout.Orientation.forNumber( + orientation_); + return result == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.Orientation.UNRECOGNIZED + : result; } private byte memoizedIsInitialized = -1; @@ -10014,11 +9554,20 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (layout_ != null) { - output.writeMessage(1, getLayout()); + if (textAnchor_ != null) { + output.writeMessage(1, getTextAnchor()); } - for (int i = 0; i < detectedLanguages_.size(); i++) { - output.writeMessage(2, detectedLanguages_.get(i)); + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + output.writeFloat(2, confidence_); + } + if (boundingPoly_ != null) { + output.writeMessage(3, getBoundingPoly()); + } + if (orientation_ + != com.google.cloud.documentai.v1beta2.Document.Page.Layout.Orientation + .ORIENTATION_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, orientation_); } getUnknownFields().writeTo(output); } @@ -10029,13 +9578,20 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (layout_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getLayout()); + if (textAnchor_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTextAnchor()); } - for (int i = 0; i < detectedLanguages_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, detectedLanguages_.get(i)); + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, confidence_); + } + if (boundingPoly_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getBoundingPoly()); + } + if (orientation_ + != com.google.cloud.documentai.v1beta2.Document.Page.Layout.Orientation + .ORIENTATION_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, orientation_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -10047,17 +9603,23 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.documentai.v1beta2.Document.Page.Paragraph)) { + if (!(obj instanceof com.google.cloud.documentai.v1beta2.Document.Page.Layout)) { return super.equals(obj); } - com.google.cloud.documentai.v1beta2.Document.Page.Paragraph other = - (com.google.cloud.documentai.v1beta2.Document.Page.Paragraph) obj; + com.google.cloud.documentai.v1beta2.Document.Page.Layout other = + (com.google.cloud.documentai.v1beta2.Document.Page.Layout) obj; - if (hasLayout() != other.hasLayout()) return false; - if (hasLayout()) { - if (!getLayout().equals(other.getLayout())) return false; + if (hasTextAnchor() != other.hasTextAnchor()) return false; + if (hasTextAnchor()) { + if (!getTextAnchor().equals(other.getTextAnchor())) return false; } - if (!getDetectedLanguagesList().equals(other.getDetectedLanguagesList())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; + if (hasBoundingPoly()) { + if (!getBoundingPoly().equals(other.getBoundingPoly())) return false; + } + if (orientation_ != other.orientation_) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -10069,84 +9631,88 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (hasLayout()) { - hash = (37 * hash) + LAYOUT_FIELD_NUMBER; - hash = (53 * hash) + getLayout().hashCode(); + if (hasTextAnchor()) { + hash = (37 * hash) + TEXT_ANCHOR_FIELD_NUMBER; + hash = (53 * hash) + getTextAnchor().hashCode(); } - if (getDetectedLanguagesCount() > 0) { - hash = (37 * hash) + DETECTED_LANGUAGES_FIELD_NUMBER; - hash = (53 * hash) + getDetectedLanguagesList().hashCode(); + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getConfidence()); + if (hasBoundingPoly()) { + hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; + hash = (53 * hash) + getBoundingPoly().hashCode(); } + hash = (37 * hash) + ORIENTATION_FIELD_NUMBER; + hash = (53 * hash) + orientation_; hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.documentai.v1beta2.Document.Page.Paragraph parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Layout parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Paragraph parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Layout 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.v1beta2.Document.Page.Paragraph parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Layout parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Paragraph parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Layout 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.v1beta2.Document.Page.Paragraph parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.documentai.v1beta2.Document.Page.Layout parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Paragraph parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Layout parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Paragraph parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Layout parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Paragraph parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Layout 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.v1beta2.Document.Page.Paragraph parseDelimitedFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Layout parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Paragraph parseDelimitedFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Layout 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.v1beta2.Document.Page.Paragraph parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Layout parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Paragraph parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Layout parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -10164,7 +9730,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.documentai.v1beta2.Document.Page.Paragraph prototype) { + com.google.cloud.documentai.v1beta2.Document.Page.Layout prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -10183,32 +9749,32 @@ protected Builder newBuilderForType( * * *
-       * A collection of lines that a human would perceive as a paragraph.
+       * Visual element describing a layout unit on a page.
        * 
* - * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.Paragraph} + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.Layout} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.Page.Paragraph) - com.google.cloud.documentai.v1beta2.Document.Page.ParagraphOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.Page.Layout) + com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_Paragraph_descriptor; + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Layout_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_Paragraph_fieldAccessorTable + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Layout_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1beta2.Document.Page.Paragraph.class, - com.google.cloud.documentai.v1beta2.Document.Page.Paragraph.Builder.class); + com.google.cloud.documentai.v1beta2.Document.Page.Layout.class, + com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder.class); } - // Construct using com.google.cloud.documentai.v1beta2.Document.Page.Paragraph.newBuilder() + // Construct using com.google.cloud.documentai.v1beta2.Document.Page.Layout.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { @@ -10219,36 +9785,36 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { public Builder clear() { super.clear(); bitField0_ = 0; - layout_ = null; - if (layoutBuilder_ != null) { - layoutBuilder_.dispose(); - layoutBuilder_ = null; - } - if (detectedLanguagesBuilder_ == null) { - detectedLanguages_ = java.util.Collections.emptyList(); - } else { - detectedLanguages_ = null; - detectedLanguagesBuilder_.clear(); + textAnchor_ = null; + if (textAnchorBuilder_ != null) { + textAnchorBuilder_.dispose(); + textAnchorBuilder_ = null; } - bitField0_ = (bitField0_ & ~0x00000002); + confidence_ = 0F; + boundingPoly_ = null; + if (boundingPolyBuilder_ != null) { + boundingPolyBuilder_.dispose(); + boundingPolyBuilder_ = null; + } + orientation_ = 0; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_Paragraph_descriptor; + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Layout_descriptor; } @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Paragraph + public com.google.cloud.documentai.v1beta2.Document.Page.Layout getDefaultInstanceForType() { - return com.google.cloud.documentai.v1beta2.Document.Page.Paragraph.getDefaultInstance(); + return com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Paragraph build() { - com.google.cloud.documentai.v1beta2.Document.Page.Paragraph result = buildPartial(); + public com.google.cloud.documentai.v1beta2.Document.Page.Layout build() { + com.google.cloud.documentai.v1beta2.Document.Page.Layout result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -10256,10 +9822,9 @@ public com.google.cloud.documentai.v1beta2.Document.Page.Paragraph build() { } @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Paragraph buildPartial() { - com.google.cloud.documentai.v1beta2.Document.Page.Paragraph result = - new com.google.cloud.documentai.v1beta2.Document.Page.Paragraph(this); - buildPartialRepeatedFields(result); + public com.google.cloud.documentai.v1beta2.Document.Page.Layout buildPartial() { + com.google.cloud.documentai.v1beta2.Document.Page.Layout result = + new com.google.cloud.documentai.v1beta2.Document.Page.Layout(this); if (bitField0_ != 0) { buildPartial0(result); } @@ -10267,24 +9832,22 @@ public com.google.cloud.documentai.v1beta2.Document.Page.Paragraph buildPartial( return result; } - private void buildPartialRepeatedFields( - com.google.cloud.documentai.v1beta2.Document.Page.Paragraph result) { - if (detectedLanguagesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - detectedLanguages_ = java.util.Collections.unmodifiableList(detectedLanguages_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.detectedLanguages_ = detectedLanguages_; - } else { - result.detectedLanguages_ = detectedLanguagesBuilder_.build(); - } - } - private void buildPartial0( - com.google.cloud.documentai.v1beta2.Document.Page.Paragraph result) { + com.google.cloud.documentai.v1beta2.Document.Page.Layout result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { - result.layout_ = layoutBuilder_ == null ? layout_ : layoutBuilder_.build(); + result.textAnchor_ = + textAnchorBuilder_ == null ? textAnchor_ : textAnchorBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.confidence_ = confidence_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.boundingPoly_ = + boundingPolyBuilder_ == null ? boundingPoly_ : boundingPolyBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.orientation_ = orientation_; } } @@ -10325,48 +9888,29 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.documentai.v1beta2.Document.Page.Paragraph) { - return mergeFrom((com.google.cloud.documentai.v1beta2.Document.Page.Paragraph) other); + if (other instanceof com.google.cloud.documentai.v1beta2.Document.Page.Layout) { + return mergeFrom((com.google.cloud.documentai.v1beta2.Document.Page.Layout) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom( - com.google.cloud.documentai.v1beta2.Document.Page.Paragraph other) { + public Builder mergeFrom(com.google.cloud.documentai.v1beta2.Document.Page.Layout other) { if (other - == com.google.cloud.documentai.v1beta2.Document.Page.Paragraph.getDefaultInstance()) + == com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance()) return this; - if (other.hasLayout()) { - mergeLayout(other.getLayout()); + if (other.hasTextAnchor()) { + mergeTextAnchor(other.getTextAnchor()); } - if (detectedLanguagesBuilder_ == null) { - if (!other.detectedLanguages_.isEmpty()) { - if (detectedLanguages_.isEmpty()) { - detectedLanguages_ = other.detectedLanguages_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.addAll(other.detectedLanguages_); - } - onChanged(); - } - } else { - if (!other.detectedLanguages_.isEmpty()) { - if (detectedLanguagesBuilder_.isEmpty()) { - detectedLanguagesBuilder_.dispose(); - detectedLanguagesBuilder_ = null; - detectedLanguages_ = other.detectedLanguages_; - bitField0_ = (bitField0_ & ~0x00000002); - detectedLanguagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getDetectedLanguagesFieldBuilder() - : null; - } else { - detectedLanguagesBuilder_.addAllMessages(other.detectedLanguages_); - } - } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + if (other.hasBoundingPoly()) { + mergeBoundingPoly(other.getBoundingPoly()); + } + if (other.orientation_ != 0) { + setOrientationValue(other.getOrientationValue()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -10396,25 +9940,29 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getLayoutFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(getTextAnchorFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 - case 18: + case 21: { - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage m = - input.readMessage( - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage - .parser(), - extensionRegistry); - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(m); - } else { - detectedLanguagesBuilder_.addMessage(m); - } + confidence_ = input.readFloat(); + bitField0_ |= 0x00000002; break; - } // case 18 + } // case 21 + case 26: + { + input.readMessage( + getBoundingPolyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + orientation_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -10434,63 +9982,67 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.documentai.v1beta2.Document.Page.Layout layout_; + private com.google.cloud.documentai.v1beta2.Document.TextAnchor textAnchor_; private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Layout, - com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder> - layoutBuilder_; + com.google.cloud.documentai.v1beta2.Document.TextAnchor, + com.google.cloud.documentai.v1beta2.Document.TextAnchor.Builder, + com.google.cloud.documentai.v1beta2.Document.TextAnchorOrBuilder> + textAnchorBuilder_; /** * * *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Paragraph][google.cloud.documentai.v1beta2.Document.Page.Paragraph].
+         * Text anchor indexing into the
+         * [Document.text][google.cloud.documentai.v1beta2.Document.text].
          * 
* - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; * - * @return Whether the layout field is set. + * @return Whether the textAnchor field is set. */ - public boolean hasLayout() { + public boolean hasTextAnchor() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Paragraph][google.cloud.documentai.v1beta2.Document.Page.Paragraph].
+         * Text anchor indexing into the
+         * [Document.text][google.cloud.documentai.v1beta2.Document.text].
          * 
* - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; * - * @return The layout. + * @return The textAnchor. */ - public com.google.cloud.documentai.v1beta2.Document.Page.Layout getLayout() { - if (layoutBuilder_ == null) { - return layout_ == null - ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() - : layout_; + public com.google.cloud.documentai.v1beta2.Document.TextAnchor getTextAnchor() { + if (textAnchorBuilder_ == null) { + return textAnchor_ == null + ? com.google.cloud.documentai.v1beta2.Document.TextAnchor.getDefaultInstance() + : textAnchor_; } else { - return layoutBuilder_.getMessage(); + return textAnchorBuilder_.getMessage(); } } /** * * *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Paragraph][google.cloud.documentai.v1beta2.Document.Page.Paragraph].
+         * Text anchor indexing into the
+         * [Document.text][google.cloud.documentai.v1beta2.Document.text].
          * 
* - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; */ - public Builder setLayout(com.google.cloud.documentai.v1beta2.Document.Page.Layout value) { - if (layoutBuilder_ == null) { + public Builder setTextAnchor( + com.google.cloud.documentai.v1beta2.Document.TextAnchor value) { + if (textAnchorBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - layout_ = value; + textAnchor_ = value; } else { - layoutBuilder_.setMessage(value); + textAnchorBuilder_.setMessage(value); } bitField0_ |= 0x00000001; onChanged(); @@ -10500,17 +10052,18 @@ public Builder setLayout(com.google.cloud.documentai.v1beta2.Document.Page.Layou * * *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Paragraph][google.cloud.documentai.v1beta2.Document.Page.Paragraph].
+         * Text anchor indexing into the
+         * [Document.text][google.cloud.documentai.v1beta2.Document.text].
          * 
* - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; */ - public Builder setLayout( - com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder builderForValue) { - if (layoutBuilder_ == null) { - layout_ = builderForValue.build(); + public Builder setTextAnchor( + com.google.cloud.documentai.v1beta2.Document.TextAnchor.Builder builderForValue) { + if (textAnchorBuilder_ == null) { + textAnchor_ = builderForValue.build(); } else { - layoutBuilder_.setMessage(builderForValue.build()); + textAnchorBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; onChanged(); @@ -10520,24 +10073,26 @@ public Builder setLayout( * * *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Paragraph][google.cloud.documentai.v1beta2.Document.Page.Paragraph].
+         * Text anchor indexing into the
+         * [Document.text][google.cloud.documentai.v1beta2.Document.text].
          * 
* - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; */ - public Builder mergeLayout(com.google.cloud.documentai.v1beta2.Document.Page.Layout value) { - if (layoutBuilder_ == null) { + public Builder mergeTextAnchor( + com.google.cloud.documentai.v1beta2.Document.TextAnchor value) { + if (textAnchorBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0) - && layout_ != null - && layout_ - != com.google.cloud.documentai.v1beta2.Document.Page.Layout + && textAnchor_ != null + && textAnchor_ + != com.google.cloud.documentai.v1beta2.Document.TextAnchor .getDefaultInstance()) { - getLayoutBuilder().mergeFrom(value); + getTextAnchorBuilder().mergeFrom(value); } else { - layout_ = value; + textAnchor_ = value; } } else { - layoutBuilder_.mergeFrom(value); + textAnchorBuilder_.mergeFrom(value); } bitField0_ |= 0x00000001; onChanged(); @@ -10547,17 +10102,18 @@ public Builder mergeLayout(com.google.cloud.documentai.v1beta2.Document.Page.Lay * * *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Paragraph][google.cloud.documentai.v1beta2.Document.Page.Paragraph].
+         * Text anchor indexing into the
+         * [Document.text][google.cloud.documentai.v1beta2.Document.text].
          * 
* - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; */ - public Builder clearLayout() { + public Builder clearTextAnchor() { bitField0_ = (bitField0_ & ~0x00000001); - layout_ = null; - if (layoutBuilder_ != null) { - layoutBuilder_.dispose(); - layoutBuilder_ = null; + textAnchor_ = null; + if (textAnchorBuilder_ != null) { + textAnchorBuilder_.dispose(); + textAnchorBuilder_ = null; } onChanged(); return this; @@ -10566,475 +10122,428 @@ public Builder clearLayout() { * * *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Paragraph][google.cloud.documentai.v1beta2.Document.Page.Paragraph].
+         * Text anchor indexing into the
+         * [Document.text][google.cloud.documentai.v1beta2.Document.text].
          * 
* - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; */ - public com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder getLayoutBuilder() { + public com.google.cloud.documentai.v1beta2.Document.TextAnchor.Builder + getTextAnchorBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getLayoutFieldBuilder().getBuilder(); + return getTextAnchorFieldBuilder().getBuilder(); } /** * * *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Paragraph][google.cloud.documentai.v1beta2.Document.Page.Paragraph].
+         * Text anchor indexing into the
+         * [Document.text][google.cloud.documentai.v1beta2.Document.text].
          * 
* - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; */ - public com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder - getLayoutOrBuilder() { - if (layoutBuilder_ != null) { - return layoutBuilder_.getMessageOrBuilder(); + public com.google.cloud.documentai.v1beta2.Document.TextAnchorOrBuilder + getTextAnchorOrBuilder() { + if (textAnchorBuilder_ != null) { + return textAnchorBuilder_.getMessageOrBuilder(); } else { - return layout_ == null - ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() - : layout_; + return textAnchor_ == null + ? com.google.cloud.documentai.v1beta2.Document.TextAnchor.getDefaultInstance() + : textAnchor_; } } /** * * *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Paragraph][google.cloud.documentai.v1beta2.Document.Page.Paragraph].
+         * Text anchor indexing into the
+         * [Document.text][google.cloud.documentai.v1beta2.Document.text].
          * 
* - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Layout, - com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder> - getLayoutFieldBuilder() { - if (layoutBuilder_ == null) { - layoutBuilder_ = + com.google.cloud.documentai.v1beta2.Document.TextAnchor, + com.google.cloud.documentai.v1beta2.Document.TextAnchor.Builder, + com.google.cloud.documentai.v1beta2.Document.TextAnchorOrBuilder> + getTextAnchorFieldBuilder() { + if (textAnchorBuilder_ == null) { + textAnchorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Layout, - com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder>( - getLayout(), getParentForChildren(), isClean()); - layout_ = null; - } - return layoutBuilder_; - } - - private java.util.List - detectedLanguages_ = java.util.Collections.emptyList(); - - private void ensureDetectedLanguagesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - detectedLanguages_ = - new java.util.ArrayList< - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage>( - detectedLanguages_); - bitField0_ |= 0x00000002; + com.google.cloud.documentai.v1beta2.Document.TextAnchor, + com.google.cloud.documentai.v1beta2.Document.TextAnchor.Builder, + com.google.cloud.documentai.v1beta2.Document.TextAnchorOrBuilder>( + getTextAnchor(), getParentForChildren(), isClean()); + textAnchor_ = null; } + return textAnchorBuilder_; } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> - detectedLanguagesBuilder_; - + private float confidence_; /** * * *
-         * A list of detected languages together with confidence.
+         * Confidence of the current
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] within
+         * context of the object this layout is for. e.g. confidence can be for a
+         * single token, a table, a visual element, etc. depending on context.
+         * Range `[0, 1]`.
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; - * + * float confidence = 2; + * + * @return The confidence. */ - public java.util.List - getDetectedLanguagesList() { - if (detectedLanguagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(detectedLanguages_); - } else { - return detectedLanguagesBuilder_.getMessageList(); - } + @java.lang.Override + public float getConfidence() { + return confidence_; } /** * * *
-         * A list of detected languages together with confidence.
+         * Confidence of the current
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] within
+         * context of the object this layout is for. e.g. confidence can be for a
+         * single token, a table, a visual element, etc. depending on context.
+         * Range `[0, 1]`.
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; - * + * float confidence = 2; + * + * @param value The confidence to set. + * @return This builder for chaining. */ - public int getDetectedLanguagesCount() { - if (detectedLanguagesBuilder_ == null) { - return detectedLanguages_.size(); - } else { - return detectedLanguagesBuilder_.getCount(); - } + public Builder setConfidence(float value) { + + confidence_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; } /** * * *
-         * A list of detected languages together with confidence.
+         * Confidence of the current
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] within
+         * context of the object this layout is for. e.g. confidence can be for a
+         * single token, a table, a visual element, etc. depending on context.
+         * Range `[0, 1]`.
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; - * + * float confidence = 2; + * + * @return This builder for chaining. */ - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage - getDetectedLanguages(int index) { - if (detectedLanguagesBuilder_ == null) { - return detectedLanguages_.get(index); - } else { - return detectedLanguagesBuilder_.getMessage(index); - } + public Builder clearConfidence() { + bitField0_ = (bitField0_ & ~0x00000002); + confidence_ = 0F; + onChanged(); + return this; } + + private com.google.cloud.documentai.v1beta2.BoundingPoly boundingPoly_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.BoundingPoly, + com.google.cloud.documentai.v1beta2.BoundingPoly.Builder, + com.google.cloud.documentai.v1beta2.BoundingPolyOrBuilder> + boundingPolyBuilder_; /** * * *
-         * A list of detected languages together with confidence.
+         * The bounding polygon for the
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; - * + * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly = 3; + * + * @return Whether the boundingPoly field is set. */ - public Builder setDetectedLanguages( - int index, com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { - if (detectedLanguagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.set(index, value); - onChanged(); - } else { - detectedLanguagesBuilder_.setMessage(index, value); - } - return this; + public boolean hasBoundingPoly() { + return ((bitField0_ & 0x00000004) != 0); } /** * * *
-         * A list of detected languages together with confidence.
+         * The bounding polygon for the
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; - * + * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly = 3; + * + * @return The boundingPoly. */ - public Builder setDetectedLanguages( - int index, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder - builderForValue) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.set(index, builderForValue.build()); - onChanged(); + public com.google.cloud.documentai.v1beta2.BoundingPoly getBoundingPoly() { + if (boundingPolyBuilder_ == null) { + return boundingPoly_ == null + ? com.google.cloud.documentai.v1beta2.BoundingPoly.getDefaultInstance() + : boundingPoly_; } else { - detectedLanguagesBuilder_.setMessage(index, builderForValue.build()); + return boundingPolyBuilder_.getMessage(); } - return this; } /** * * *
-         * A list of detected languages together with confidence.
+         * The bounding polygon for the
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; - * + * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly = 3; */ - public Builder addDetectedLanguages( - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { - if (detectedLanguagesBuilder_ == null) { + public Builder setBoundingPoly(com.google.cloud.documentai.v1beta2.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(value); - onChanged(); + boundingPoly_ = value; } else { - detectedLanguagesBuilder_.addMessage(value); + boundingPolyBuilder_.setMessage(value); } + bitField0_ |= 0x00000004; + onChanged(); return this; } /** * * *
-         * A list of detected languages together with confidence.
+         * The bounding polygon for the
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; - * + * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly = 3; */ - public Builder addDetectedLanguages( - int index, com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { - if (detectedLanguagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(index, value); - onChanged(); + public Builder setBoundingPoly( + com.google.cloud.documentai.v1beta2.BoundingPoly.Builder builderForValue) { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = builderForValue.build(); } else { - detectedLanguagesBuilder_.addMessage(index, value); + boundingPolyBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000004; + onChanged(); return this; } /** * * *
-         * A list of detected languages together with confidence.
+         * The bounding polygon for the
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; - * + * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly = 3; */ - public Builder addDetectedLanguages( - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder - builderForValue) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(builderForValue.build()); - onChanged(); + public Builder mergeBoundingPoly(com.google.cloud.documentai.v1beta2.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && boundingPoly_ != null + && boundingPoly_ + != com.google.cloud.documentai.v1beta2.BoundingPoly.getDefaultInstance()) { + getBoundingPolyBuilder().mergeFrom(value); + } else { + boundingPoly_ = value; + } } else { - detectedLanguagesBuilder_.addMessage(builderForValue.build()); + boundingPolyBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000004; + onChanged(); return this; } /** * * *
-         * A list of detected languages together with confidence.
+         * The bounding polygon for the
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; - * + * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly = 3; */ - public Builder addDetectedLanguages( - int index, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder - builderForValue) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(index, builderForValue.build()); - onChanged(); - } else { - detectedLanguagesBuilder_.addMessage(index, builderForValue.build()); + public Builder clearBoundingPoly() { + bitField0_ = (bitField0_ & ~0x00000004); + boundingPoly_ = null; + if (boundingPolyBuilder_ != null) { + boundingPolyBuilder_.dispose(); + boundingPolyBuilder_ = null; } + onChanged(); return this; } /** * * *
-         * A list of detected languages together with confidence.
+         * The bounding polygon for the
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; - * + * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly = 3; */ - public Builder addAllDetectedLanguages( - java.lang.Iterable< - ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage> - values) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, detectedLanguages_); - onChanged(); - } else { - detectedLanguagesBuilder_.addAllMessages(values); - } - return this; + public com.google.cloud.documentai.v1beta2.BoundingPoly.Builder getBoundingPolyBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getBoundingPolyFieldBuilder().getBuilder(); } /** * * *
-         * A list of detected languages together with confidence.
+         * The bounding polygon for the
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; - * + * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly = 3; */ - public Builder clearDetectedLanguages() { - if (detectedLanguagesBuilder_ == null) { - detectedLanguages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); + public com.google.cloud.documentai.v1beta2.BoundingPolyOrBuilder + getBoundingPolyOrBuilder() { + if (boundingPolyBuilder_ != null) { + return boundingPolyBuilder_.getMessageOrBuilder(); } else { - detectedLanguagesBuilder_.clear(); + return boundingPoly_ == null + ? com.google.cloud.documentai.v1beta2.BoundingPoly.getDefaultInstance() + : boundingPoly_; } - return this; } /** * * *
-         * A list of detected languages together with confidence.
+         * The bounding polygon for the
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; - * + * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly = 3; */ - public Builder removeDetectedLanguages(int index) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.remove(index); - onChanged(); - } else { - detectedLanguagesBuilder_.remove(index); + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.BoundingPoly, + com.google.cloud.documentai.v1beta2.BoundingPoly.Builder, + com.google.cloud.documentai.v1beta2.BoundingPolyOrBuilder> + getBoundingPolyFieldBuilder() { + if (boundingPolyBuilder_ == null) { + boundingPolyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.BoundingPoly, + com.google.cloud.documentai.v1beta2.BoundingPoly.Builder, + com.google.cloud.documentai.v1beta2.BoundingPolyOrBuilder>( + getBoundingPoly(), getParentForChildren(), isClean()); + boundingPoly_ = null; } - return this; + return boundingPolyBuilder_; } + + private int orientation_ = 0; /** * * *
-         * A list of detected languages together with confidence.
+         * Detected orientation for the
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; + * .google.cloud.documentai.v1beta2.Document.Page.Layout.Orientation orientation = 4; * - */ - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder - getDetectedLanguagesBuilder(int index) { - return getDetectedLanguagesFieldBuilder().getBuilder(index); - } - /** - * - * - *
-         * A list of detected languages together with confidence.
-         * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; - * + * @return The enum numeric value on the wire for orientation. */ - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder - getDetectedLanguagesOrBuilder(int index) { - if (detectedLanguagesBuilder_ == null) { - return detectedLanguages_.get(index); - } else { - return detectedLanguagesBuilder_.getMessageOrBuilder(index); - } + @java.lang.Override + public int getOrientationValue() { + return orientation_; } /** * * *
-         * A list of detected languages together with confidence.
+         * Detected orientation for the
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; + * .google.cloud.documentai.v1beta2.Document.Page.Layout.Orientation orientation = 4; * + * + * @param value The enum numeric value on the wire for orientation to set. + * @return This builder for chaining. */ - public java.util.List< - ? extends - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> - getDetectedLanguagesOrBuilderList() { - if (detectedLanguagesBuilder_ != null) { - return detectedLanguagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(detectedLanguages_); - } + public Builder setOrientationValue(int value) { + orientation_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; } /** * * *
-         * A list of detected languages together with confidence.
+         * Detected orientation for the
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; + * .google.cloud.documentai.v1beta2.Document.Page.Layout.Orientation orientation = 4; * + * + * @return The orientation. */ - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder - addDetectedLanguagesBuilder() { - return getDetectedLanguagesFieldBuilder() - .addBuilder( - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage - .getDefaultInstance()); + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Layout.Orientation + getOrientation() { + com.google.cloud.documentai.v1beta2.Document.Page.Layout.Orientation result = + com.google.cloud.documentai.v1beta2.Document.Page.Layout.Orientation.forNumber( + orientation_); + return result == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.Orientation.UNRECOGNIZED + : result; } /** * * *
-         * A list of detected languages together with confidence.
+         * Detected orientation for the
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; + * .google.cloud.documentai.v1beta2.Document.Page.Layout.Orientation orientation = 4; * + * + * @param value The orientation to set. + * @return This builder for chaining. */ - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder - addDetectedLanguagesBuilder(int index) { - return getDetectedLanguagesFieldBuilder() - .addBuilder( - index, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage - .getDefaultInstance()); + public Builder setOrientation( + com.google.cloud.documentai.v1beta2.Document.Page.Layout.Orientation value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + orientation_ = value.getNumber(); + onChanged(); + return this; } /** * * *
-         * A list of detected languages together with confidence.
+         * Detected orientation for the
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout].
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; + * .google.cloud.documentai.v1beta2.Document.Page.Layout.Orientation orientation = 4; * + * + * @return This builder for chaining. */ - public java.util.List< - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder> - getDetectedLanguagesBuilderList() { - return getDetectedLanguagesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> - getDetectedLanguagesFieldBuilder() { - if (detectedLanguagesBuilder_ == null) { - detectedLanguagesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder>( - detectedLanguages_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - detectedLanguages_ = null; - } - return detectedLanguagesBuilder_; + public Builder clearOrientation() { + bitField0_ = (bitField0_ & ~0x00000008); + orientation_ = 0; + onChanged(); + return this; } @java.lang.Override @@ -11049,26 +10558,25 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta2.Document.Page.Paragraph) + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta2.Document.Page.Layout) } - // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.Page.Paragraph) - private static final com.google.cloud.documentai.v1beta2.Document.Page.Paragraph + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.Page.Layout) + private static final com.google.cloud.documentai.v1beta2.Document.Page.Layout DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta2.Document.Page.Paragraph(); + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta2.Document.Page.Layout(); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Paragraph - getDefaultInstance() { + public static com.google.cloud.documentai.v1beta2.Document.Page.Layout getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public Paragraph parsePartialFrom( + public Layout parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -11088,32 +10596,32 @@ public Paragraph parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Paragraph - getDefaultInstanceForType() { + public com.google.cloud.documentai.v1beta2.Document.Page.Layout getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface LineOrBuilder + public interface BlockOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.Page.Line) + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.Page.Block) com.google.protobuf.MessageOrBuilder { /** * * *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Line][google.cloud.documentai.v1beta2.Document.Page.Line].
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+       * [Block][google.cloud.documentai.v1beta2.Document.Page.Block].
        * 
* * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; @@ -11125,7 +10633,8 @@ public interface LineOrBuilder * * *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Line][google.cloud.documentai.v1beta2.Document.Page.Line].
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+       * [Block][google.cloud.documentai.v1beta2.Document.Page.Block].
        * 
* * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; @@ -11137,7 +10646,8 @@ public interface LineOrBuilder * * *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Line][google.cloud.documentai.v1beta2.Document.Page.Line].
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+       * [Block][google.cloud.documentai.v1beta2.Document.Page.Block].
        * 
* * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; @@ -11209,50 +10719,98 @@ com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage getDetectedLa */ com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder getDetectedLanguagesOrBuilder(int index); + + /** + * + * + *
+       * The history of this annotation.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; + * + * + * @deprecated google.cloud.documentai.v1beta2.Document.Page.Block.provenance is deprecated. + * See google/cloud/documentai/v1beta2/document.proto;l=233 + * @return Whether the provenance field is set. + */ + @java.lang.Deprecated + boolean hasProvenance(); + /** + * + * + *
+       * The history of this annotation.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; + * + * + * @deprecated google.cloud.documentai.v1beta2.Document.Page.Block.provenance is deprecated. + * See google/cloud/documentai/v1beta2/document.proto;l=233 + * @return The provenance. + */ + @java.lang.Deprecated + com.google.cloud.documentai.v1beta2.Document.Provenance getProvenance(); + /** + * + * + *
+       * The history of this annotation.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; + * + */ + @java.lang.Deprecated + com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder getProvenanceOrBuilder(); } /** * * *
-     * A collection of tokens that a human would perceive as a line.
-     * Does not cross column boundaries, can be horizontal, vertical, etc.
+     * A block has a set of lines (collected into paragraphs) that have a
+     * common line-spacing and orientation.
      * 
* - * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.Line} + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.Block} */ - public static final class Line extends com.google.protobuf.GeneratedMessageV3 + public static final class Block extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.Page.Line) - LineOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.Page.Block) + BlockOrBuilder { private static final long serialVersionUID = 0L; - // Use Line.newBuilder() to construct. - private Line(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use Block.newBuilder() to construct. + private Block(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private Line() { + private Block() { detectedLanguages_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Line(); + return new Block(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_Line_descriptor; + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Block_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_Line_fieldAccessorTable + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Block_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1beta2.Document.Page.Line.class, - com.google.cloud.documentai.v1beta2.Document.Page.Line.Builder.class); + com.google.cloud.documentai.v1beta2.Document.Page.Block.class, + com.google.cloud.documentai.v1beta2.Document.Page.Block.Builder.class); } public static final int LAYOUT_FIELD_NUMBER = 1; @@ -11261,7 +10819,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Line][google.cloud.documentai.v1beta2.Document.Page.Line].
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+       * [Block][google.cloud.documentai.v1beta2.Document.Page.Block].
        * 
* * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; @@ -11276,7 +10835,8 @@ public boolean hasLayout() { * * *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Line][google.cloud.documentai.v1beta2.Document.Page.Line].
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+       * [Block][google.cloud.documentai.v1beta2.Document.Page.Block].
        * 
* * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; @@ -11293,7 +10853,8 @@ public com.google.cloud.documentai.v1beta2.Document.Page.Layout getLayout() { * * *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Line][google.cloud.documentai.v1beta2.Document.Page.Line].
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+       * [Block][google.cloud.documentai.v1beta2.Document.Page.Block].
        * 
* * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; @@ -11392,6 +10953,70 @@ public int getDetectedLanguagesCount() { return detectedLanguages_.get(index); } + public static final int PROVENANCE_FIELD_NUMBER = 3; + private com.google.cloud.documentai.v1beta2.Document.Provenance provenance_; + /** + * + * + *
+       * The history of this annotation.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; + * + * + * @deprecated google.cloud.documentai.v1beta2.Document.Page.Block.provenance is deprecated. + * See google/cloud/documentai/v1beta2/document.proto;l=233 + * @return Whether the provenance field is set. + */ + @java.lang.Override + @java.lang.Deprecated + public boolean hasProvenance() { + return provenance_ != null; + } + /** + * + * + *
+       * The history of this annotation.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; + * + * + * @deprecated google.cloud.documentai.v1beta2.Document.Page.Block.provenance is deprecated. + * See google/cloud/documentai/v1beta2/document.proto;l=233 + * @return The provenance. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.cloud.documentai.v1beta2.Document.Provenance getProvenance() { + return provenance_ == null + ? com.google.cloud.documentai.v1beta2.Document.Provenance.getDefaultInstance() + : provenance_; + } + /** + * + * + *
+       * The history of this annotation.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; + * + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder + getProvenanceOrBuilder() { + return provenance_ == null + ? com.google.cloud.documentai.v1beta2.Document.Provenance.getDefaultInstance() + : provenance_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -11412,6 +11037,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < detectedLanguages_.size(); i++) { output.writeMessage(2, detectedLanguages_.get(i)); } + if (provenance_ != null) { + output.writeMessage(3, getProvenance()); + } getUnknownFields().writeTo(output); } @@ -11429,6 +11057,9 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 2, detectedLanguages_.get(i)); } + if (provenance_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getProvenance()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -11439,17 +11070,21 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.documentai.v1beta2.Document.Page.Line)) { + if (!(obj instanceof com.google.cloud.documentai.v1beta2.Document.Page.Block)) { return super.equals(obj); } - com.google.cloud.documentai.v1beta2.Document.Page.Line other = - (com.google.cloud.documentai.v1beta2.Document.Page.Line) obj; + com.google.cloud.documentai.v1beta2.Document.Page.Block other = + (com.google.cloud.documentai.v1beta2.Document.Page.Block) obj; if (hasLayout() != other.hasLayout()) return false; if (hasLayout()) { if (!getLayout().equals(other.getLayout())) return false; } if (!getDetectedLanguagesList().equals(other.getDetectedLanguagesList())) return false; + if (hasProvenance() != other.hasProvenance()) return false; + if (hasProvenance()) { + if (!getProvenance().equals(other.getProvenance())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -11469,76 +11104,80 @@ public int hashCode() { hash = (37 * hash) + DETECTED_LANGUAGES_FIELD_NUMBER; hash = (53 * hash) + getDetectedLanguagesList().hashCode(); } + if (hasProvenance()) { + hash = (37 * hash) + PROVENANCE_FIELD_NUMBER; + hash = (53 * hash) + getProvenance().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.documentai.v1beta2.Document.Page.Line parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Block parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Line parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Block 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.v1beta2.Document.Page.Line parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Block parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Line parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Block 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.v1beta2.Document.Page.Line parseFrom(byte[] data) + public static com.google.cloud.documentai.v1beta2.Document.Page.Block parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Line parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Block parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Line parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Block parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Line parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Block 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.v1beta2.Document.Page.Line parseDelimitedFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Block parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Line parseDelimitedFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Block 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.v1beta2.Document.Page.Line parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Block parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Line parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Block parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -11556,7 +11195,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.documentai.v1beta2.Document.Page.Line prototype) { + com.google.cloud.documentai.v1beta2.Document.Page.Block prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -11575,33 +11214,33 @@ protected Builder newBuilderForType( * * *
-       * A collection of tokens that a human would perceive as a line.
-       * Does not cross column boundaries, can be horizontal, vertical, etc.
+       * A block has a set of lines (collected into paragraphs) that have a
+       * common line-spacing and orientation.
        * 
* - * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.Line} + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.Block} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.Page.Line) - com.google.cloud.documentai.v1beta2.Document.Page.LineOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.Page.Block) + com.google.cloud.documentai.v1beta2.Document.Page.BlockOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_Line_descriptor; + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Block_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_Line_fieldAccessorTable + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Block_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1beta2.Document.Page.Line.class, - com.google.cloud.documentai.v1beta2.Document.Page.Line.Builder.class); + com.google.cloud.documentai.v1beta2.Document.Page.Block.class, + com.google.cloud.documentai.v1beta2.Document.Page.Block.Builder.class); } - // Construct using com.google.cloud.documentai.v1beta2.Document.Page.Line.newBuilder() + // Construct using com.google.cloud.documentai.v1beta2.Document.Page.Block.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { @@ -11624,23 +11263,28 @@ public Builder clear() { detectedLanguagesBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); + provenance_ = null; + if (provenanceBuilder_ != null) { + provenanceBuilder_.dispose(); + provenanceBuilder_ = null; + } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_Line_descriptor; + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Block_descriptor; } @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Line getDefaultInstanceForType() { - return com.google.cloud.documentai.v1beta2.Document.Page.Line.getDefaultInstance(); + public com.google.cloud.documentai.v1beta2.Document.Page.Block getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta2.Document.Page.Block.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Line build() { - com.google.cloud.documentai.v1beta2.Document.Page.Line result = buildPartial(); + public com.google.cloud.documentai.v1beta2.Document.Page.Block build() { + com.google.cloud.documentai.v1beta2.Document.Page.Block result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -11648,9 +11292,9 @@ public com.google.cloud.documentai.v1beta2.Document.Page.Line build() { } @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Line buildPartial() { - com.google.cloud.documentai.v1beta2.Document.Page.Line result = - new com.google.cloud.documentai.v1beta2.Document.Page.Line(this); + public com.google.cloud.documentai.v1beta2.Document.Page.Block buildPartial() { + com.google.cloud.documentai.v1beta2.Document.Page.Block result = + new com.google.cloud.documentai.v1beta2.Document.Page.Block(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); @@ -11660,7 +11304,7 @@ public com.google.cloud.documentai.v1beta2.Document.Page.Line buildPartial() { } private void buildPartialRepeatedFields( - com.google.cloud.documentai.v1beta2.Document.Page.Line result) { + com.google.cloud.documentai.v1beta2.Document.Page.Block result) { if (detectedLanguagesBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0)) { detectedLanguages_ = java.util.Collections.unmodifiableList(detectedLanguages_); @@ -11672,11 +11316,15 @@ private void buildPartialRepeatedFields( } } - private void buildPartial0(com.google.cloud.documentai.v1beta2.Document.Page.Line result) { + private void buildPartial0(com.google.cloud.documentai.v1beta2.Document.Page.Block result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.layout_ = layoutBuilder_ == null ? layout_ : layoutBuilder_.build(); } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.provenance_ = + provenanceBuilder_ == null ? provenance_ : provenanceBuilder_.build(); + } } @java.lang.Override @@ -11716,16 +11364,16 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.documentai.v1beta2.Document.Page.Line) { - return mergeFrom((com.google.cloud.documentai.v1beta2.Document.Page.Line) other); + if (other instanceof com.google.cloud.documentai.v1beta2.Document.Page.Block) { + return mergeFrom((com.google.cloud.documentai.v1beta2.Document.Page.Block) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.cloud.documentai.v1beta2.Document.Page.Line other) { - if (other == com.google.cloud.documentai.v1beta2.Document.Page.Line.getDefaultInstance()) + public Builder mergeFrom(com.google.cloud.documentai.v1beta2.Document.Page.Block other) { + if (other == com.google.cloud.documentai.v1beta2.Document.Page.Block.getDefaultInstance()) return this; if (other.hasLayout()) { mergeLayout(other.getLayout()); @@ -11757,6 +11405,9 @@ public Builder mergeFrom(com.google.cloud.documentai.v1beta2.Document.Page.Line } } } + if (other.hasProvenance()) { + mergeProvenance(other.getProvenance()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -11804,6 +11455,12 @@ public Builder mergeFrom( } break; } // case 18 + case 26: + { + input.readMessage(getProvenanceFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -11833,7 +11490,8 @@ public Builder mergeFrom( * * *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Line][google.cloud.documentai.v1beta2.Document.Page.Line].
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Block][google.cloud.documentai.v1beta2.Document.Page.Block].
          * 
* * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; @@ -11847,7 +11505,8 @@ public boolean hasLayout() { * * *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Line][google.cloud.documentai.v1beta2.Document.Page.Line].
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Block][google.cloud.documentai.v1beta2.Document.Page.Block].
          * 
* * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; @@ -11867,7 +11526,8 @@ public com.google.cloud.documentai.v1beta2.Document.Page.Layout getLayout() { * * *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Line][google.cloud.documentai.v1beta2.Document.Page.Line].
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Block][google.cloud.documentai.v1beta2.Document.Page.Block].
          * 
* * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; @@ -11889,7 +11549,8 @@ public Builder setLayout(com.google.cloud.documentai.v1beta2.Document.Page.Layou * * *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Line][google.cloud.documentai.v1beta2.Document.Page.Line].
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Block][google.cloud.documentai.v1beta2.Document.Page.Block].
          * 
* * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; @@ -11909,7 +11570,8 @@ public Builder setLayout( * * *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Line][google.cloud.documentai.v1beta2.Document.Page.Line].
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Block][google.cloud.documentai.v1beta2.Document.Page.Block].
          * 
* * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; @@ -11936,7 +11598,8 @@ public Builder mergeLayout(com.google.cloud.documentai.v1beta2.Document.Page.Lay * * *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Line][google.cloud.documentai.v1beta2.Document.Page.Line].
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Block][google.cloud.documentai.v1beta2.Document.Page.Block].
          * 
* * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; @@ -11955,7 +11618,8 @@ public Builder clearLayout() { * * *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Line][google.cloud.documentai.v1beta2.Document.Page.Line].
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Block][google.cloud.documentai.v1beta2.Document.Page.Block].
          * 
* * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; @@ -11969,7 +11633,8 @@ public com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder getLayou * * *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Line][google.cloud.documentai.v1beta2.Document.Page.Line].
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Block][google.cloud.documentai.v1beta2.Document.Page.Block].
          * 
* * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; @@ -11988,7 +11653,8 @@ public com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder getLayou * * *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Line][google.cloud.documentai.v1beta2.Document.Page.Line].
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Block][google.cloud.documentai.v1beta2.Document.Page.Block].
          * 
* * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; @@ -12426,6 +12092,226 @@ public Builder removeDetectedLanguages(int index) { return detectedLanguagesBuilder_; } + private com.google.cloud.documentai.v1beta2.Document.Provenance provenance_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Provenance, + com.google.cloud.documentai.v1beta2.Document.Provenance.Builder, + com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder> + provenanceBuilder_; + /** + * + * + *
+         * The history of this annotation.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; + * + * + * @deprecated google.cloud.documentai.v1beta2.Document.Page.Block.provenance is deprecated. + * See google/cloud/documentai/v1beta2/document.proto;l=233 + * @return Whether the provenance field is set. + */ + @java.lang.Deprecated + public boolean hasProvenance() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+         * The history of this annotation.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; + * + * + * @deprecated google.cloud.documentai.v1beta2.Document.Page.Block.provenance is deprecated. + * See google/cloud/documentai/v1beta2/document.proto;l=233 + * @return The provenance. + */ + @java.lang.Deprecated + public com.google.cloud.documentai.v1beta2.Document.Provenance getProvenance() { + if (provenanceBuilder_ == null) { + return provenance_ == null + ? com.google.cloud.documentai.v1beta2.Document.Provenance.getDefaultInstance() + : provenance_; + } else { + return provenanceBuilder_.getMessage(); + } + } + /** + * + * + *
+         * The history of this annotation.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder setProvenance( + com.google.cloud.documentai.v1beta2.Document.Provenance value) { + if (provenanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + provenance_ = value; + } else { + provenanceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * The history of this annotation.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder setProvenance( + com.google.cloud.documentai.v1beta2.Document.Provenance.Builder builderForValue) { + if (provenanceBuilder_ == null) { + provenance_ = builderForValue.build(); + } else { + provenanceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * The history of this annotation.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder mergeProvenance( + com.google.cloud.documentai.v1beta2.Document.Provenance value) { + if (provenanceBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && provenance_ != null + && provenance_ + != com.google.cloud.documentai.v1beta2.Document.Provenance + .getDefaultInstance()) { + getProvenanceBuilder().mergeFrom(value); + } else { + provenance_ = value; + } + } else { + provenanceBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * The history of this annotation.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder clearProvenance() { + bitField0_ = (bitField0_ & ~0x00000004); + provenance_ = null; + if (provenanceBuilder_ != null) { + provenanceBuilder_.dispose(); + provenanceBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+         * The history of this annotation.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; + * + */ + @java.lang.Deprecated + public com.google.cloud.documentai.v1beta2.Document.Provenance.Builder + getProvenanceBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getProvenanceFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * The history of this annotation.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; + * + */ + @java.lang.Deprecated + public com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder + getProvenanceOrBuilder() { + if (provenanceBuilder_ != null) { + return provenanceBuilder_.getMessageOrBuilder(); + } else { + return provenance_ == null + ? com.google.cloud.documentai.v1beta2.Document.Provenance.getDefaultInstance() + : provenance_; + } + } + /** + * + * + *
+         * The history of this annotation.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Provenance, + com.google.cloud.documentai.v1beta2.Document.Provenance.Builder, + com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder> + getProvenanceFieldBuilder() { + if (provenanceBuilder_ == null) { + provenanceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Provenance, + com.google.cloud.documentai.v1beta2.Document.Provenance.Builder, + com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder>( + getProvenance(), getParentForChildren(), isClean()); + provenance_ = null; + } + return provenanceBuilder_; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -12438,24 +12324,24 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta2.Document.Page.Line) + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta2.Document.Page.Block) } - // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.Page.Line) - private static final com.google.cloud.documentai.v1beta2.Document.Page.Line DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.Page.Block) + private static final com.google.cloud.documentai.v1beta2.Document.Page.Block DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta2.Document.Page.Line(); + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta2.Document.Page.Block(); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Line getDefaultInstance() { + public static com.google.cloud.documentai.v1beta2.Document.Page.Block getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public Line parsePartialFrom( + public Block parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -12475,31 +12361,32 @@ public Line parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Line getDefaultInstanceForType() { + public com.google.cloud.documentai.v1beta2.Document.Page.Block getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface TokenOrBuilder + public interface ParagraphOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.Page.Token) + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.Page.Paragraph) com.google.protobuf.MessageOrBuilder { /** * * *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+       * [Paragraph][google.cloud.documentai.v1beta2.Document.Page.Paragraph].
        * 
* * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; @@ -12511,7 +12398,8 @@ public interface TokenOrBuilder * * *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+       * [Paragraph][google.cloud.documentai.v1beta2.Document.Page.Paragraph].
        * 
* * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; @@ -12523,7 +12411,8 @@ public interface TokenOrBuilder * * *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+       * [Paragraph][google.cloud.documentai.v1beta2.Document.Page.Paragraph].
        * 
* * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; @@ -12534,44 +12423,40 @@ public interface TokenOrBuilder * * *
-       * Detected break at the end of a [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+       * A list of detected languages together with confidence.
        * 
* * - * .google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak detected_break = 2; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * - * - * @return Whether the detectedBreak field is set. */ - boolean hasDetectedBreak(); + java.util.List + getDetectedLanguagesList(); /** * * *
-       * Detected break at the end of a [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+       * A list of detected languages together with confidence.
        * 
* * - * .google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak detected_break = 2; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * - * - * @return The detectedBreak. */ - com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak getDetectedBreak(); + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage getDetectedLanguages( + int index); /** * * *
-       * Detected break at the end of a [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+       * A list of detected languages together with confidence.
        * 
* * - * .google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak detected_break = 2; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ - com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreakOrBuilder - getDetectedBreakOrBuilder(); - + int getDetectedLanguagesCount(); /** * * @@ -12580,11 +12465,12 @@ public interface TokenOrBuilder * * * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ - java.util.List - getDetectedLanguagesList(); + java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> + getDetectedLanguagesOrBuilderList(); /** * * @@ -12593,1053 +12479,1930 @@ public interface TokenOrBuilder * * * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage getDetectedLanguages( - int index); + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder + getDetectedLanguagesOrBuilder(int index); + /** * * *
-       * A list of detected languages together with confidence.
+       * The  history of this annotation.
        * 
* * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; * + * + * @deprecated google.cloud.documentai.v1beta2.Document.Page.Paragraph.provenance is + * deprecated. See google/cloud/documentai/v1beta2/document.proto;l=246 + * @return Whether the provenance field is set. */ - int getDetectedLanguagesCount(); + @java.lang.Deprecated + boolean hasProvenance(); /** * * *
-       * A list of detected languages together with confidence.
+       * The  history of this annotation.
        * 
* * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; * + * + * @deprecated google.cloud.documentai.v1beta2.Document.Page.Paragraph.provenance is + * deprecated. See google/cloud/documentai/v1beta2/document.proto;l=246 + * @return The provenance. */ - java.util.List< - ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> - getDetectedLanguagesOrBuilderList(); + @java.lang.Deprecated + com.google.cloud.documentai.v1beta2.Document.Provenance getProvenance(); /** * * *
-       * A list of detected languages together with confidence.
+       * The  history of this annotation.
        * 
* * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; * */ - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder - getDetectedLanguagesOrBuilder(int index); + @java.lang.Deprecated + com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder getProvenanceOrBuilder(); } /** * * *
-     * A detected token.
+     * A collection of lines that a human would perceive as a paragraph.
      * 
* - * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.Token} + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.Paragraph} */ - public static final class Token extends com.google.protobuf.GeneratedMessageV3 + public static final class Paragraph extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.Page.Token) - TokenOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.Page.Paragraph) + ParagraphOrBuilder { private static final long serialVersionUID = 0L; - // Use Token.newBuilder() to construct. - private Token(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use Paragraph.newBuilder() to construct. + private Paragraph(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private Token() { + private Paragraph() { detectedLanguages_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Token(); + return new Paragraph(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_Token_descriptor; + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Paragraph_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_Token_fieldAccessorTable + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Paragraph_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1beta2.Document.Page.Token.class, - com.google.cloud.documentai.v1beta2.Document.Page.Token.Builder.class); + com.google.cloud.documentai.v1beta2.Document.Page.Paragraph.class, + com.google.cloud.documentai.v1beta2.Document.Page.Paragraph.Builder.class); } - public interface DetectedBreakOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-         * Detected break type.
-         * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Type type = 1; - * - * - * @return The enum numeric value on the wire for type. - */ - int getTypeValue(); - /** - * - * - *
-         * Detected break type.
-         * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Type type = 1; - * - * - * @return The type. - */ - com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Type getType(); + public static final int LAYOUT_FIELD_NUMBER = 1; + private com.google.cloud.documentai.v1beta2.Document.Page.Layout layout_; + /** + * + * + *
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+       * [Paragraph][google.cloud.documentai.v1beta2.Document.Page.Paragraph].
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * + * @return Whether the layout field is set. + */ + @java.lang.Override + public boolean hasLayout() { + return layout_ != null; } /** * * *
-       * Detected break at the end of a [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+       * [Paragraph][google.cloud.documentai.v1beta2.Document.Page.Paragraph].
        * 
* - * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak} + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * + * @return The layout. */ - public static final class DetectedBreak extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak) - DetectedBreakOrBuilder { - private static final long serialVersionUID = 0L; - // Use DetectedBreak.newBuilder() to construct. - private DetectedBreak(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Layout getLayout() { + return layout_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() + : layout_; + } + /** + * + * + *
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+       * [Paragraph][google.cloud.documentai.v1beta2.Document.Page.Paragraph].
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder + getLayoutOrBuilder() { + return layout_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() + : layout_; + } - private DetectedBreak() { - type_ = 0; - } + public static final int DETECTED_LANGUAGES_FIELD_NUMBER = 2; - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DetectedBreak(); - } + @SuppressWarnings("serial") + private java.util.List + detectedLanguages_; + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; + * + */ + @java.lang.Override + public java.util.List + getDetectedLanguagesList() { + return detectedLanguages_; + } + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> + getDetectedLanguagesOrBuilderList() { + return detectedLanguages_; + } + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; + * + */ + @java.lang.Override + public int getDetectedLanguagesCount() { + return detectedLanguages_.size(); + } + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage + getDetectedLanguages(int index) { + return detectedLanguages_.get(index); + } + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder + getDetectedLanguagesOrBuilder(int index) { + return detectedLanguages_.get(index); + } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_Token_DetectedBreak_descriptor; - } + public static final int PROVENANCE_FIELD_NUMBER = 3; + private com.google.cloud.documentai.v1beta2.Document.Provenance provenance_; + /** + * + * + *
+       * The  history of this annotation.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; + * + * + * @deprecated google.cloud.documentai.v1beta2.Document.Page.Paragraph.provenance is + * deprecated. See google/cloud/documentai/v1beta2/document.proto;l=246 + * @return Whether the provenance field is set. + */ + @java.lang.Override + @java.lang.Deprecated + public boolean hasProvenance() { + return provenance_ != null; + } + /** + * + * + *
+       * The  history of this annotation.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; + * + * + * @deprecated google.cloud.documentai.v1beta2.Document.Page.Paragraph.provenance is + * deprecated. See google/cloud/documentai/v1beta2/document.proto;l=246 + * @return The provenance. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.cloud.documentai.v1beta2.Document.Provenance getProvenance() { + return provenance_ == null + ? com.google.cloud.documentai.v1beta2.Document.Provenance.getDefaultInstance() + : provenance_; + } + /** + * + * + *
+       * The  history of this annotation.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; + * + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder + getProvenanceOrBuilder() { + return provenance_ == null + ? com.google.cloud.documentai.v1beta2.Document.Provenance.getDefaultInstance() + : provenance_; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_Token_DetectedBreak_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.class, - com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Builder - .class); - } + private byte memoizedIsInitialized = -1; - /** - * - * - *
-         * Enum to denote the type of break found.
-         * 
- * - * Protobuf enum {@code - * google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Type} - */ - public enum Type implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-           * Unspecified break type.
-           * 
- * - * TYPE_UNSPECIFIED = 0; - */ - TYPE_UNSPECIFIED(0), - /** - * - * - *
-           * A single whitespace.
-           * 
- * - * SPACE = 1; - */ - SPACE(1), - /** - * - * - *
-           * A wider whitespace.
-           * 
- * - * WIDE_SPACE = 2; - */ - WIDE_SPACE(2), - /** - * - * - *
-           * A hyphen that indicates that a token has been split across lines.
-           * 
- * - * HYPHEN = 3; - */ - HYPHEN(3), - UNRECOGNIZED(-1), - ; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - /** - * - * - *
-           * Unspecified break type.
-           * 
- * - * TYPE_UNSPECIFIED = 0; - */ - public static final int TYPE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-           * A single whitespace.
-           * 
- * - * SPACE = 1; - */ - public static final int SPACE_VALUE = 1; - /** - * - * - *
-           * A wider whitespace.
-           * 
- * - * WIDE_SPACE = 2; - */ - public static final int WIDE_SPACE_VALUE = 2; - /** - * - * - *
-           * A hyphen that indicates that a token has been split across lines.
-           * 
- * - * HYPHEN = 3; - */ - public static final int HYPHEN_VALUE = 3; + memoizedIsInitialized = 1; + return true; + } - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (layout_ != null) { + output.writeMessage(1, getLayout()); + } + for (int i = 0; i < detectedLanguages_.size(); i++) { + output.writeMessage(2, detectedLanguages_.get(i)); + } + if (provenance_ != null) { + output.writeMessage(3, getProvenance()); + } + getUnknownFields().writeTo(output); + } - /** - * @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 Type valueOf(int value) { - return forNumber(value); - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Type forNumber(int value) { - switch (value) { - case 0: - return TYPE_UNSPECIFIED; - case 1: - return SPACE; - case 2: - return WIDE_SPACE; - case 3: - return HYPHEN; - default: - return null; - } - } + size = 0; + if (layout_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getLayout()); + } + for (int i = 0; i < detectedLanguages_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, detectedLanguages_.get(i)); + } + if (provenance_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getProvenance()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.documentai.v1beta2.Document.Page.Paragraph)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta2.Document.Page.Paragraph other = + (com.google.cloud.documentai.v1beta2.Document.Page.Paragraph) obj; - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Type findValueByNumber(int number) { - return Type.forNumber(number); - } - }; + if (hasLayout() != other.hasLayout()) return false; + if (hasLayout()) { + if (!getLayout().equals(other.getLayout())) return false; + } + if (!getDetectedLanguagesList().equals(other.getDetectedLanguagesList())) return false; + if (hasProvenance() != other.hasProvenance()) return false; + if (hasProvenance()) { + if (!getProvenance().equals(other.getProvenance())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasLayout()) { + hash = (37 * hash) + LAYOUT_FIELD_NUMBER; + hash = (53 * hash) + getLayout().hashCode(); + } + if (getDetectedLanguagesCount() > 0) { + hash = (37 * hash) + DETECTED_LANGUAGES_FIELD_NUMBER; + hash = (53 * hash) + getDetectedLanguagesList().hashCode(); + } + if (hasProvenance()) { + hash = (37 * hash) + PROVENANCE_FIELD_NUMBER; + hash = (53 * hash) + getProvenance().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } + public static com.google.cloud.documentai.v1beta2.Document.Page.Paragraph parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak - .getDescriptor() - .getEnumTypes() - .get(0); - } + public static com.google.cloud.documentai.v1beta2.Document.Page.Paragraph parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - private static final Type[] VALUES = values(); + public static com.google.cloud.documentai.v1beta2.Document.Page.Paragraph parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static Type valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } + public static com.google.cloud.documentai.v1beta2.Document.Page.Paragraph parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - private final int value; + public static com.google.cloud.documentai.v1beta2.Document.Page.Paragraph parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - private Type(int value) { - this.value = value; - } + public static com.google.cloud.documentai.v1beta2.Document.Page.Paragraph parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - // @@protoc_insertion_point(enum_scope:google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Type) + public static com.google.cloud.documentai.v1beta2.Document.Page.Paragraph parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.Paragraph 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.v1beta2.Document.Page.Paragraph parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.Paragraph 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.v1beta2.Document.Page.Paragraph parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.Paragraph 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.v1beta2.Document.Page.Paragraph 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 collection of lines that a human would perceive as a paragraph.
+       * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.Paragraph} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.Page.Paragraph) + com.google.cloud.documentai.v1beta2.Document.Page.ParagraphOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Paragraph_descriptor; } - public static final int TYPE_FIELD_NUMBER = 1; - private int type_ = 0; - /** - * - * - *
-         * Detected break type.
-         * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Type type = 1; - * - * - * @return The enum numeric value on the wire for type. - */ @java.lang.Override - public int getTypeValue() { - return type_; + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Paragraph_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Document.Page.Paragraph.class, + com.google.cloud.documentai.v1beta2.Document.Page.Paragraph.Builder.class); } - /** - * - * - *
-         * Detected break type.
-         * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Type type = 1; - * - * - * @return The type. - */ - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Type - getType() { - com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Type result = - com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Type.forNumber( - type_); - return result == null - ? com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Type - .UNRECOGNIZED - : result; + + // Construct using com.google.cloud.documentai.v1beta2.Document.Page.Paragraph.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); } - private byte memoizedIsInitialized = -1; + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + layout_ = null; + if (layoutBuilder_ != null) { + layoutBuilder_.dispose(); + layoutBuilder_ = null; + } + if (detectedLanguagesBuilder_ == null) { + detectedLanguages_ = java.util.Collections.emptyList(); + } else { + detectedLanguages_ = null; + detectedLanguagesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + provenance_ = null; + if (provenanceBuilder_ != null) { + provenanceBuilder_.dispose(); + provenanceBuilder_ = null; + } + return this; + } @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Paragraph_descriptor; + } - memoizedIsInitialized = 1; - return true; + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Paragraph + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta2.Document.Page.Paragraph.getDefaultInstance(); } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (type_ - != com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Type - .TYPE_UNSPECIFIED - .getNumber()) { - output.writeEnum(1, type_); + public com.google.cloud.documentai.v1beta2.Document.Page.Paragraph build() { + com.google.cloud.documentai.v1beta2.Document.Page.Paragraph result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); } - getUnknownFields().writeTo(output); + return result; } @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + public com.google.cloud.documentai.v1beta2.Document.Page.Paragraph buildPartial() { + com.google.cloud.documentai.v1beta2.Document.Page.Paragraph result = + new com.google.cloud.documentai.v1beta2.Document.Page.Paragraph(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } - size = 0; - if (type_ - != com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Type - .TYPE_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); + private void buildPartialRepeatedFields( + com.google.cloud.documentai.v1beta2.Document.Page.Paragraph result) { + if (detectedLanguagesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + detectedLanguages_ = java.util.Collections.unmodifiableList(detectedLanguages_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.detectedLanguages_ = detectedLanguages_; + } else { + result.detectedLanguages_ = detectedLanguagesBuilder_.build(); } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; + private void buildPartial0( + com.google.cloud.documentai.v1beta2.Document.Page.Paragraph result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.layout_ = layoutBuilder_ == null ? layout_ : layoutBuilder_.build(); } - if (!(obj - instanceof com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak)) { - return super.equals(obj); + if (((from_bitField0_ & 0x00000004) != 0)) { + result.provenance_ = + provenanceBuilder_ == null ? provenance_ : provenanceBuilder_.build(); } - com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak other = - (com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak) obj; + } - if (type_ != other.type_) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; + @java.lang.Override + public Builder clone() { + return super.clone(); } @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + type_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak - parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta2.Document.Page.Paragraph) { + return mergeFrom((com.google.cloud.documentai.v1beta2.Document.Page.Paragraph) other); + } else { + super.mergeFrom(other); + return this; + } } - public static com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + public Builder mergeFrom( + com.google.cloud.documentai.v1beta2.Document.Page.Paragraph other) { + if (other + == com.google.cloud.documentai.v1beta2.Document.Page.Paragraph.getDefaultInstance()) + return this; + if (other.hasLayout()) { + mergeLayout(other.getLayout()); + } + if (detectedLanguagesBuilder_ == null) { + if (!other.detectedLanguages_.isEmpty()) { + if (detectedLanguages_.isEmpty()) { + detectedLanguages_ = other.detectedLanguages_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.addAll(other.detectedLanguages_); + } + onChanged(); + } + } else { + if (!other.detectedLanguages_.isEmpty()) { + if (detectedLanguagesBuilder_.isEmpty()) { + detectedLanguagesBuilder_.dispose(); + detectedLanguagesBuilder_ = null; + detectedLanguages_ = other.detectedLanguages_; + bitField0_ = (bitField0_ & ~0x00000002); + detectedLanguagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDetectedLanguagesFieldBuilder() + : null; + } else { + detectedLanguagesBuilder_.addAllMessages(other.detectedLanguages_); + } + } + } + if (other.hasProvenance()) { + mergeProvenance(other.getProvenance()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; } - public static com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak - parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + @java.lang.Override + public final boolean isInitialized() { + return true; } - public static com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input); + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getLayoutFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage m = + input.readMessage( + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage + .parser(), + extensionRegistry); + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(m); + } else { + detectedLanguagesBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + input.readMessage(getProvenanceFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; } - public static com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + private int bitField0_; - public static com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + private com.google.cloud.documentai.v1beta2.Document.Page.Layout layout_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Layout, + com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder> + layoutBuilder_; + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Paragraph][google.cloud.documentai.v1beta2.Document.Page.Paragraph].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * + * @return Whether the layout field is set. + */ + public boolean hasLayout() { + return ((bitField0_ & 0x00000001) != 0); } - - public static com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Paragraph][google.cloud.documentai.v1beta2.Document.Page.Paragraph].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * + * @return The layout. + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Layout getLayout() { + if (layoutBuilder_ == null) { + return layout_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() + : layout_; + } else { + return layoutBuilder_.getMessage(); + } } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Paragraph][google.cloud.documentai.v1beta2.Document.Page.Paragraph].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + public Builder setLayout(com.google.cloud.documentai.v1beta2.Document.Page.Layout value) { + if (layoutBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + layout_ = value; + } else { + layoutBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Paragraph][google.cloud.documentai.v1beta2.Document.Page.Paragraph].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + public Builder setLayout( + com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder builderForValue) { + if (layoutBuilder_ == null) { + layout_ = builderForValue.build(); + } else { + layoutBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; } - - public static Builder newBuilder( - com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Paragraph][google.cloud.documentai.v1beta2.Document.Page.Paragraph].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + public Builder mergeLayout(com.google.cloud.documentai.v1beta2.Document.Page.Layout value) { + if (layoutBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && layout_ != null + && layout_ + != com.google.cloud.documentai.v1beta2.Document.Page.Layout + .getDefaultInstance()) { + getLayoutBuilder().mergeFrom(value); + } else { + layout_ = value; + } + } else { + layoutBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Paragraph][google.cloud.documentai.v1beta2.Document.Page.Paragraph].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + public Builder clearLayout() { + bitField0_ = (bitField0_ & ~0x00000001); + layout_ = null; + if (layoutBuilder_ != null) { + layoutBuilder_.dispose(); + layoutBuilder_ = null; + } + onChanged(); + return this; } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Paragraph][google.cloud.documentai.v1beta2.Document.Page.Paragraph].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder getLayoutBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getLayoutFieldBuilder().getBuilder(); } /** * * *
-         * Detected break at the end of a [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Paragraph][google.cloud.documentai.v1beta2.Document.Page.Paragraph].
          * 
* - * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak} + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak) - com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreakOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_Token_DetectedBreak_descriptor; + public com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder + getLayoutOrBuilder() { + if (layoutBuilder_ != null) { + return layoutBuilder_.getMessageOrBuilder(); + } else { + return layout_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() + : layout_; } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_Token_DetectedBreak_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.class, - com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Builder - .class); + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Paragraph][google.cloud.documentai.v1beta2.Document.Page.Paragraph].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Layout, + com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder> + getLayoutFieldBuilder() { + if (layoutBuilder_ == null) { + layoutBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Layout, + com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder>( + getLayout(), getParentForChildren(), isClean()); + layout_ = null; } + return layoutBuilder_; + } - // Construct using - // com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.newBuilder() - private Builder() {} + private java.util.List + detectedLanguages_ = java.util.Collections.emptyList(); - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); + private void ensureDetectedLanguagesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + detectedLanguages_ = + new java.util.ArrayList< + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage>( + detectedLanguages_); + bitField0_ |= 0x00000002; } + } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - type_ = 0; - return this; - } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> + detectedLanguagesBuilder_; - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_Token_DetectedBreak_descriptor; + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; + * + */ + public java.util.List + getDetectedLanguagesList() { + if (detectedLanguagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(detectedLanguages_); + } else { + return detectedLanguagesBuilder_.getMessageList(); } - - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak - getDefaultInstanceForType() { - return com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak - .getDefaultInstance(); + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; + * + */ + public int getDetectedLanguagesCount() { + if (detectedLanguagesBuilder_ == null) { + return detectedLanguages_.size(); + } else { + return detectedLanguagesBuilder_.getCount(); } - - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak build() { - com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage + getDetectedLanguages(int index) { + if (detectedLanguagesBuilder_ == null) { + return detectedLanguages_.get(index); + } else { + return detectedLanguagesBuilder_.getMessage(index); } - - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak - buildPartial() { - com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak result = - new com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak(this); - if (bitField0_ != 0) { - buildPartial0(result); + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; + * + */ + public Builder setDetectedLanguages( + int index, com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { + if (detectedLanguagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.type_ = type_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak) { - return mergeFrom( - (com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak other) { - if (other - == com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak - .getDefaultInstance()) return this; - if (other.type_ != 0) { - setTypeValue(other.getTypeValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.set(index, value); onChanged(); - return this; + } else { + detectedLanguagesBuilder_.setMessage(index, value); } - - @java.lang.Override - public final boolean isInitialized() { - return true; + return this; + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; + * + */ + public Builder setDetectedLanguages( + int index, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + builderForValue) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.set(index, builderForValue.build()); + onChanged(); + } else { + detectedLanguagesBuilder_.setMessage(index, builderForValue.build()); } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); + return this; + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; + * + */ + public Builder addDetectedLanguages( + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { + if (detectedLanguagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - type_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private int type_ = 0; - /** - * - * - *
-           * Detected break type.
-           * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Type type = 1; - * - * - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override - public int getTypeValue() { - return type_; - } - /** - * - * - *
-           * Detected break type.
-           * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Type type = 1; - * - * - * @param value The enum numeric value on the wire for type to set. - * @return This builder for chaining. - */ - public Builder setTypeValue(int value) { - type_ = value; - bitField0_ |= 0x00000001; + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(value); onChanged(); - return this; - } - /** - * - * - *
-           * Detected break type.
-           * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Type type = 1; - * - * - * @return The type. - */ - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Type - getType() { - com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Type result = - com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Type - .forNumber(type_); - return result == null - ? com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Type - .UNRECOGNIZED - : result; + } else { + detectedLanguagesBuilder_.addMessage(value); } - /** - * - * - *
-           * Detected break type.
-           * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Type type = 1; - * - * - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType( - com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Type value) { + return this; + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; + * + */ + public Builder addDetectedLanguages( + int index, com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { + if (detectedLanguagesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000001; - type_ = value.getNumber(); + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(index, value); onChanged(); - return this; + } else { + detectedLanguagesBuilder_.addMessage(index, value); } - /** - * - * - *
-           * Detected break type.
-           * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Type type = 1; - * - * - * @return This builder for chaining. - */ - public Builder clearType() { - bitField0_ = (bitField0_ & ~0x00000001); - type_ = 0; + return this; + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; + * + */ + public Builder addDetectedLanguages( + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + builderForValue) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(builderForValue.build()); onChanged(); - return this; + } else { + detectedLanguagesBuilder_.addMessage(builderForValue.build()); } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + return this; + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; + * + */ + public Builder addDetectedLanguages( + int index, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + builderForValue) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(index, builderForValue.build()); + onChanged(); + } else { + detectedLanguagesBuilder_.addMessage(index, builderForValue.build()); } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + return this; + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; + * + */ + public Builder addAllDetectedLanguages( + java.lang.Iterable< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage> + values) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, detectedLanguages_); + onChanged(); + } else { + detectedLanguagesBuilder_.addAllMessages(values); } - - // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak) + return this; } - - // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak) - private static final com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak(); + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; + * + */ + public Builder clearDetectedLanguages() { + if (detectedLanguagesBuilder_ == null) { + detectedLanguages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + detectedLanguagesBuilder_.clear(); + } + return this; } - - public static com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak - getDefaultInstance() { - return DEFAULT_INSTANCE; + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; + * + */ + public Builder removeDetectedLanguages(int index) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.remove(index); + onChanged(); + } else { + detectedLanguagesBuilder_.remove(index); + } + return this; } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DetectedBreak parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + getDetectedLanguagesBuilder(int index) { + return getDetectedLanguagesFieldBuilder().getBuilder(index); } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder + getDetectedLanguagesOrBuilder(int index) { + if (detectedLanguagesBuilder_ == null) { + return detectedLanguages_.get(index); + } else { + return detectedLanguagesBuilder_.getMessageOrBuilder(index); + } } - - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; + * + */ + public java.util.List< + ? extends + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> + getDetectedLanguagesOrBuilderList() { + if (detectedLanguagesBuilder_ != null) { + return detectedLanguagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(detectedLanguages_); + } } - } - - public static final int LAYOUT_FIELD_NUMBER = 1; - private com.google.cloud.documentai.v1beta2.Document.Page.Layout layout_; - /** - * - * - *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
-       * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; - * - * @return Whether the layout field is set. - */ - @java.lang.Override - public boolean hasLayout() { - return layout_ != null; - } - /** - * - * + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + addDetectedLanguagesBuilder() { + return getDetectedLanguagesFieldBuilder() + .addBuilder( + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage + .getDefaultInstance()); + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + addDetectedLanguagesBuilder(int index) { + return getDetectedLanguagesFieldBuilder() + .addBuilder( + index, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage + .getDefaultInstance()); + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; + * + */ + public java.util.List< + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder> + getDetectedLanguagesBuilderList() { + return getDetectedLanguagesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> + getDetectedLanguagesFieldBuilder() { + if (detectedLanguagesBuilder_ == null) { + detectedLanguagesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder>( + detectedLanguages_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + detectedLanguages_ = null; + } + return detectedLanguagesBuilder_; + } + + private com.google.cloud.documentai.v1beta2.Document.Provenance provenance_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Provenance, + com.google.cloud.documentai.v1beta2.Document.Provenance.Builder, + com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder> + provenanceBuilder_; + /** + * + * + *
+         * The  history of this annotation.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; + * + * + * @deprecated google.cloud.documentai.v1beta2.Document.Page.Paragraph.provenance is + * deprecated. See google/cloud/documentai/v1beta2/document.proto;l=246 + * @return Whether the provenance field is set. + */ + @java.lang.Deprecated + public boolean hasProvenance() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+         * The  history of this annotation.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; + * + * + * @deprecated google.cloud.documentai.v1beta2.Document.Page.Paragraph.provenance is + * deprecated. See google/cloud/documentai/v1beta2/document.proto;l=246 + * @return The provenance. + */ + @java.lang.Deprecated + public com.google.cloud.documentai.v1beta2.Document.Provenance getProvenance() { + if (provenanceBuilder_ == null) { + return provenance_ == null + ? com.google.cloud.documentai.v1beta2.Document.Provenance.getDefaultInstance() + : provenance_; + } else { + return provenanceBuilder_.getMessage(); + } + } + /** + * + * + *
+         * The  history of this annotation.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder setProvenance( + com.google.cloud.documentai.v1beta2.Document.Provenance value) { + if (provenanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + provenance_ = value; + } else { + provenanceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * The  history of this annotation.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder setProvenance( + com.google.cloud.documentai.v1beta2.Document.Provenance.Builder builderForValue) { + if (provenanceBuilder_ == null) { + provenance_ = builderForValue.build(); + } else { + provenanceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * The  history of this annotation.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder mergeProvenance( + com.google.cloud.documentai.v1beta2.Document.Provenance value) { + if (provenanceBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && provenance_ != null + && provenance_ + != com.google.cloud.documentai.v1beta2.Document.Provenance + .getDefaultInstance()) { + getProvenanceBuilder().mergeFrom(value); + } else { + provenance_ = value; + } + } else { + provenanceBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * The  history of this annotation.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder clearProvenance() { + bitField0_ = (bitField0_ & ~0x00000004); + provenance_ = null; + if (provenanceBuilder_ != null) { + provenanceBuilder_.dispose(); + provenanceBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+         * The  history of this annotation.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; + * + */ + @java.lang.Deprecated + public com.google.cloud.documentai.v1beta2.Document.Provenance.Builder + getProvenanceBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getProvenanceFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * The  history of this annotation.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; + * + */ + @java.lang.Deprecated + public com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder + getProvenanceOrBuilder() { + if (provenanceBuilder_ != null) { + return provenanceBuilder_.getMessageOrBuilder(); + } else { + return provenance_ == null + ? com.google.cloud.documentai.v1beta2.Document.Provenance.getDefaultInstance() + : provenance_; + } + } + /** + * + * + *
+         * The  history of this annotation.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Provenance, + com.google.cloud.documentai.v1beta2.Document.Provenance.Builder, + com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder> + getProvenanceFieldBuilder() { + if (provenanceBuilder_ == null) { + provenanceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Provenance, + com.google.cloud.documentai.v1beta2.Document.Provenance.Builder, + com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder>( + getProvenance(), getParentForChildren(), isClean()); + provenance_ = null; + } + return provenanceBuilder_; + } + + @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.v1beta2.Document.Page.Paragraph) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.Page.Paragraph) + private static final com.google.cloud.documentai.v1beta2.Document.Page.Paragraph + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta2.Document.Page.Paragraph(); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.Paragraph + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Paragraph parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Paragraph + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface LineOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.Page.Line) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+       * [Line][google.cloud.documentai.v1beta2.Document.Page.Line].
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * + * @return Whether the layout field is set. + */ + boolean hasLayout(); + /** + * + * *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+       * [Line][google.cloud.documentai.v1beta2.Document.Page.Line].
        * 
* * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; * * @return The layout. */ - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Layout getLayout() { - return layout_ == null - ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() - : layout_; - } + com.google.cloud.documentai.v1beta2.Document.Page.Layout getLayout(); /** * * *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+       * [Line][google.cloud.documentai.v1beta2.Document.Page.Line].
        * 
* * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; */ - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder - getLayoutOrBuilder() { - return layout_ == null - ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() - : layout_; - } + com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder getLayoutOrBuilder(); - public static final int DETECTED_BREAK_FIELD_NUMBER = 2; - private com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak detectedBreak_; /** * * *
-       * Detected break at the end of a [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+       * A list of detected languages together with confidence.
        * 
* * - * .google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak detected_break = 2; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; + * + */ + java.util.List + getDetectedLanguagesList(); + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * + */ + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage getDetectedLanguages( + int index); + /** * - * @return Whether the detectedBreak field is set. + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; + * */ - @java.lang.Override - public boolean hasDetectedBreak() { - return detectedBreak_ != null; - } + int getDetectedLanguagesCount(); /** * * *
-       * Detected break at the end of a [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+       * A list of detected languages together with confidence.
        * 
* * - * .google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak detected_break = 2; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * + */ + java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> + getDetectedLanguagesOrBuilderList(); + /** * - * @return The detectedBreak. + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; + * */ - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak - getDetectedBreak() { - return detectedBreak_ == null - ? com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak - .getDefaultInstance() - : detectedBreak_; - } + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder + getDetectedLanguagesOrBuilder(int index); + /** * * *
-       * Detected break at the end of a [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+       * The  history of this annotation.
        * 
* * - * .google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak detected_break = 2; + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; + * + * + * @deprecated google.cloud.documentai.v1beta2.Document.Page.Line.provenance is deprecated. + * See google/cloud/documentai/v1beta2/document.proto;l=260 + * @return Whether the provenance field is set. + */ + @java.lang.Deprecated + boolean hasProvenance(); + /** + * + * + *
+       * The  history of this annotation.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; + * + * + * @deprecated google.cloud.documentai.v1beta2.Document.Page.Line.provenance is deprecated. + * See google/cloud/documentai/v1beta2/document.proto;l=260 + * @return The provenance. + */ + @java.lang.Deprecated + com.google.cloud.documentai.v1beta2.Document.Provenance getProvenance(); + /** + * + * + *
+       * The  history of this annotation.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; * */ + @java.lang.Deprecated + com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder getProvenanceOrBuilder(); + } + /** + * + * + *
+     * A collection of tokens that a human would perceive as a line.
+     * Does not cross column boundaries, can be horizontal, vertical, etc.
+     * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.Line} + */ + public static final class Line extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.Page.Line) + LineOrBuilder { + private static final long serialVersionUID = 0L; + // Use Line.newBuilder() to construct. + private Line(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Line() { + detectedLanguages_ = java.util.Collections.emptyList(); + } + @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreakOrBuilder - getDetectedBreakOrBuilder() { - return detectedBreak_ == null - ? com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak - .getDefaultInstance() - : detectedBreak_; + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Line(); } - public static final int DETECTED_LANGUAGES_FIELD_NUMBER = 3; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Line_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Line_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Document.Page.Line.class, + com.google.cloud.documentai.v1beta2.Document.Page.Line.Builder.class); + } + + public static final int LAYOUT_FIELD_NUMBER = 1; + private com.google.cloud.documentai.v1beta2.Document.Page.Layout layout_; + /** + * + * + *
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+       * [Line][google.cloud.documentai.v1beta2.Document.Page.Line].
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * + * @return Whether the layout field is set. + */ + @java.lang.Override + public boolean hasLayout() { + return layout_ != null; + } + /** + * + * + *
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+       * [Line][google.cloud.documentai.v1beta2.Document.Page.Line].
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * + * @return The layout. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Layout getLayout() { + return layout_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() + : layout_; + } + /** + * + * + *
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+       * [Line][google.cloud.documentai.v1beta2.Document.Page.Line].
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder + getLayoutOrBuilder() { + return layout_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() + : layout_; + } + + public static final int DETECTED_LANGUAGES_FIELD_NUMBER = 2; @SuppressWarnings("serial") private java.util.List @@ -13652,7 +14415,7 @@ public boolean hasDetectedBreak() { * * * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ @java.lang.Override @@ -13668,7 +14431,7 @@ public boolean hasDetectedBreak() { * * * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ @java.lang.Override @@ -13685,7 +14448,7 @@ public boolean hasDetectedBreak() { * * * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ @java.lang.Override @@ -13700,7 +14463,7 @@ public int getDetectedLanguagesCount() { * * * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ @java.lang.Override @@ -13716,7 +14479,7 @@ public int getDetectedLanguagesCount() { * * * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ @java.lang.Override @@ -13725,8 +14488,72 @@ public int getDetectedLanguagesCount() { return detectedLanguages_.get(index); } - private byte memoizedIsInitialized = -1; - + public static final int PROVENANCE_FIELD_NUMBER = 3; + private com.google.cloud.documentai.v1beta2.Document.Provenance provenance_; + /** + * + * + *
+       * The  history of this annotation.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; + * + * + * @deprecated google.cloud.documentai.v1beta2.Document.Page.Line.provenance is deprecated. + * See google/cloud/documentai/v1beta2/document.proto;l=260 + * @return Whether the provenance field is set. + */ + @java.lang.Override + @java.lang.Deprecated + public boolean hasProvenance() { + return provenance_ != null; + } + /** + * + * + *
+       * The  history of this annotation.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; + * + * + * @deprecated google.cloud.documentai.v1beta2.Document.Page.Line.provenance is deprecated. + * See google/cloud/documentai/v1beta2/document.proto;l=260 + * @return The provenance. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.cloud.documentai.v1beta2.Document.Provenance getProvenance() { + return provenance_ == null + ? com.google.cloud.documentai.v1beta2.Document.Provenance.getDefaultInstance() + : provenance_; + } + /** + * + * + *
+       * The  history of this annotation.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; + * + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder + getProvenanceOrBuilder() { + return provenance_ == null + ? com.google.cloud.documentai.v1beta2.Document.Provenance.getDefaultInstance() + : provenance_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -13742,11 +14569,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (layout_ != null) { output.writeMessage(1, getLayout()); } - if (detectedBreak_ != null) { - output.writeMessage(2, getDetectedBreak()); - } for (int i = 0; i < detectedLanguages_.size(); i++) { - output.writeMessage(3, detectedLanguages_.get(i)); + output.writeMessage(2, detectedLanguages_.get(i)); + } + if (provenance_ != null) { + output.writeMessage(3, getProvenance()); } getUnknownFields().writeTo(output); } @@ -13760,13 +14587,13 @@ public int getSerializedSize() { if (layout_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getLayout()); } - if (detectedBreak_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDetectedBreak()); - } for (int i = 0; i < detectedLanguages_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( - 3, detectedLanguages_.get(i)); + 2, detectedLanguages_.get(i)); + } + if (provenance_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getProvenance()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -13778,21 +14605,21 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.documentai.v1beta2.Document.Page.Token)) { + if (!(obj instanceof com.google.cloud.documentai.v1beta2.Document.Page.Line)) { return super.equals(obj); } - com.google.cloud.documentai.v1beta2.Document.Page.Token other = - (com.google.cloud.documentai.v1beta2.Document.Page.Token) obj; + com.google.cloud.documentai.v1beta2.Document.Page.Line other = + (com.google.cloud.documentai.v1beta2.Document.Page.Line) obj; if (hasLayout() != other.hasLayout()) return false; if (hasLayout()) { if (!getLayout().equals(other.getLayout())) return false; } - if (hasDetectedBreak() != other.hasDetectedBreak()) return false; - if (hasDetectedBreak()) { - if (!getDetectedBreak().equals(other.getDetectedBreak())) return false; - } if (!getDetectedLanguagesList().equals(other.getDetectedLanguagesList())) return false; + if (hasProvenance() != other.hasProvenance()) return false; + if (hasProvenance()) { + if (!getProvenance().equals(other.getProvenance())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -13808,84 +14635,84 @@ public int hashCode() { hash = (37 * hash) + LAYOUT_FIELD_NUMBER; hash = (53 * hash) + getLayout().hashCode(); } - if (hasDetectedBreak()) { - hash = (37 * hash) + DETECTED_BREAK_FIELD_NUMBER; - hash = (53 * hash) + getDetectedBreak().hashCode(); - } if (getDetectedLanguagesCount() > 0) { hash = (37 * hash) + DETECTED_LANGUAGES_FIELD_NUMBER; hash = (53 * hash) + getDetectedLanguagesList().hashCode(); } + if (hasProvenance()) { + hash = (37 * hash) + PROVENANCE_FIELD_NUMBER; + hash = (53 * hash) + getProvenance().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.documentai.v1beta2.Document.Page.Token parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Line parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Token parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Line 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.v1beta2.Document.Page.Token parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Line parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Token parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Line 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.v1beta2.Document.Page.Token parseFrom(byte[] data) + public static com.google.cloud.documentai.v1beta2.Document.Page.Line parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Token parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Line parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Token parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Line parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Token parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Line 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.v1beta2.Document.Page.Token parseDelimitedFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Line parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Token parseDelimitedFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Line 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.v1beta2.Document.Page.Token parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Line parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Token parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Line parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -13903,7 +14730,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.documentai.v1beta2.Document.Page.Token prototype) { + com.google.cloud.documentai.v1beta2.Document.Page.Line prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -13922,32 +14749,33 @@ protected Builder newBuilderForType( * * *
-       * A detected token.
+       * A collection of tokens that a human would perceive as a line.
+       * Does not cross column boundaries, can be horizontal, vertical, etc.
        * 
* - * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.Token} + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.Line} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.Page.Token) - com.google.cloud.documentai.v1beta2.Document.Page.TokenOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.Page.Line) + com.google.cloud.documentai.v1beta2.Document.Page.LineOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_Token_descriptor; + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Line_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_Token_fieldAccessorTable + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Line_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1beta2.Document.Page.Token.class, - com.google.cloud.documentai.v1beta2.Document.Page.Token.Builder.class); + com.google.cloud.documentai.v1beta2.Document.Page.Line.class, + com.google.cloud.documentai.v1beta2.Document.Page.Line.Builder.class); } - // Construct using com.google.cloud.documentai.v1beta2.Document.Page.Token.newBuilder() + // Construct using com.google.cloud.documentai.v1beta2.Document.Page.Line.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { @@ -13963,35 +14791,35 @@ public Builder clear() { layoutBuilder_.dispose(); layoutBuilder_ = null; } - detectedBreak_ = null; - if (detectedBreakBuilder_ != null) { - detectedBreakBuilder_.dispose(); - detectedBreakBuilder_ = null; - } if (detectedLanguagesBuilder_ == null) { detectedLanguages_ = java.util.Collections.emptyList(); } else { detectedLanguages_ = null; detectedLanguagesBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000002); + provenance_ = null; + if (provenanceBuilder_ != null) { + provenanceBuilder_.dispose(); + provenanceBuilder_ = null; + } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_Token_descriptor; + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Line_descriptor; } @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Token getDefaultInstanceForType() { - return com.google.cloud.documentai.v1beta2.Document.Page.Token.getDefaultInstance(); + public com.google.cloud.documentai.v1beta2.Document.Page.Line getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta2.Document.Page.Line.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Token build() { - com.google.cloud.documentai.v1beta2.Document.Page.Token result = buildPartial(); + public com.google.cloud.documentai.v1beta2.Document.Page.Line build() { + com.google.cloud.documentai.v1beta2.Document.Page.Line result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -13999,9 +14827,9 @@ public com.google.cloud.documentai.v1beta2.Document.Page.Token build() { } @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Token buildPartial() { - com.google.cloud.documentai.v1beta2.Document.Page.Token result = - new com.google.cloud.documentai.v1beta2.Document.Page.Token(this); + public com.google.cloud.documentai.v1beta2.Document.Page.Line buildPartial() { + com.google.cloud.documentai.v1beta2.Document.Page.Line result = + new com.google.cloud.documentai.v1beta2.Document.Page.Line(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); @@ -14011,11 +14839,11 @@ public com.google.cloud.documentai.v1beta2.Document.Page.Token buildPartial() { } private void buildPartialRepeatedFields( - com.google.cloud.documentai.v1beta2.Document.Page.Token result) { + com.google.cloud.documentai.v1beta2.Document.Page.Line result) { if (detectedLanguagesBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { + if (((bitField0_ & 0x00000002) != 0)) { detectedLanguages_ = java.util.Collections.unmodifiableList(detectedLanguages_); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000002); } result.detectedLanguages_ = detectedLanguages_; } else { @@ -14023,14 +14851,14 @@ private void buildPartialRepeatedFields( } } - private void buildPartial0(com.google.cloud.documentai.v1beta2.Document.Page.Token result) { + private void buildPartial0(com.google.cloud.documentai.v1beta2.Document.Page.Line result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.layout_ = layoutBuilder_ == null ? layout_ : layoutBuilder_.build(); } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.detectedBreak_ = - detectedBreakBuilder_ == null ? detectedBreak_ : detectedBreakBuilder_.build(); + if (((from_bitField0_ & 0x00000004) != 0)) { + result.provenance_ = + provenanceBuilder_ == null ? provenance_ : provenanceBuilder_.build(); } } @@ -14071,28 +14899,25 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.documentai.v1beta2.Document.Page.Token) { - return mergeFrom((com.google.cloud.documentai.v1beta2.Document.Page.Token) other); + if (other instanceof com.google.cloud.documentai.v1beta2.Document.Page.Line) { + return mergeFrom((com.google.cloud.documentai.v1beta2.Document.Page.Line) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.cloud.documentai.v1beta2.Document.Page.Token other) { - if (other == com.google.cloud.documentai.v1beta2.Document.Page.Token.getDefaultInstance()) + public Builder mergeFrom(com.google.cloud.documentai.v1beta2.Document.Page.Line other) { + if (other == com.google.cloud.documentai.v1beta2.Document.Page.Line.getDefaultInstance()) return this; if (other.hasLayout()) { mergeLayout(other.getLayout()); } - if (other.hasDetectedBreak()) { - mergeDetectedBreak(other.getDetectedBreak()); - } if (detectedLanguagesBuilder_ == null) { if (!other.detectedLanguages_.isEmpty()) { if (detectedLanguages_.isEmpty()) { detectedLanguages_ = other.detectedLanguages_; - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000002); } else { ensureDetectedLanguagesIsMutable(); detectedLanguages_.addAll(other.detectedLanguages_); @@ -14105,7 +14930,7 @@ public Builder mergeFrom(com.google.cloud.documentai.v1beta2.Document.Page.Token detectedLanguagesBuilder_.dispose(); detectedLanguagesBuilder_ = null; detectedLanguages_ = other.detectedLanguages_; - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000002); detectedLanguagesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getDetectedLanguagesFieldBuilder() @@ -14115,6 +14940,9 @@ public Builder mergeFrom(com.google.cloud.documentai.v1beta2.Document.Page.Token } } } + if (other.hasProvenance()) { + mergeProvenance(other.getProvenance()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -14148,13 +14976,6 @@ public Builder mergeFrom( break; } // case 10 case 18: - { - input.readMessage( - getDetectedBreakFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage m = input.readMessage( @@ -14168,6 +14989,12 @@ public Builder mergeFrom( detectedLanguagesBuilder_.addMessage(m); } break; + } // case 18 + case 26: + { + input.readMessage(getProvenanceFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; } // case 26 default: { @@ -14198,7 +15025,8 @@ public Builder mergeFrom( * * *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Line][google.cloud.documentai.v1beta2.Document.Page.Line].
          * 
* * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; @@ -14212,7 +15040,8 @@ public boolean hasLayout() { * * *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Line][google.cloud.documentai.v1beta2.Document.Page.Line].
          * 
* * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; @@ -14232,7 +15061,8 @@ public com.google.cloud.documentai.v1beta2.Document.Page.Layout getLayout() { * * *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Line][google.cloud.documentai.v1beta2.Document.Page.Line].
          * 
* * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; @@ -14254,7 +15084,8 @@ public Builder setLayout(com.google.cloud.documentai.v1beta2.Document.Page.Layou * * *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Line][google.cloud.documentai.v1beta2.Document.Page.Line].
          * 
* * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; @@ -14274,7 +15105,8 @@ public Builder setLayout( * * *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Line][google.cloud.documentai.v1beta2.Document.Page.Line].
          * 
* * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; @@ -14301,7 +15133,8 @@ public Builder mergeLayout(com.google.cloud.documentai.v1beta2.Document.Page.Lay * * *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Line][google.cloud.documentai.v1beta2.Document.Page.Line].
          * 
* * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; @@ -14320,7 +15153,8 @@ public Builder clearLayout() { * * *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Line][google.cloud.documentai.v1beta2.Document.Page.Line].
          * 
* * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; @@ -14334,7 +15168,8 @@ public com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder getLayou * * *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Line][google.cloud.documentai.v1beta2.Document.Page.Line].
          * 
* * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; @@ -14353,7 +15188,8 @@ public com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder getLayou * * *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Line][google.cloud.documentai.v1beta2.Document.Page.Line].
          * 
* * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; @@ -14375,229 +15211,16 @@ public com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder getLayou return layoutBuilder_; } - private com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak - detectedBreak_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak, - com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreakOrBuilder> - detectedBreakBuilder_; - /** - * - * - *
-         * Detected break at the end of a [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
-         * 
- * - * - * .google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak detected_break = 2; - * - * - * @return Whether the detectedBreak field is set. - */ - public boolean hasDetectedBreak() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-         * Detected break at the end of a [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
-         * 
- * - * - * .google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak detected_break = 2; - * - * - * @return The detectedBreak. - */ - public com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak - getDetectedBreak() { - if (detectedBreakBuilder_ == null) { - return detectedBreak_ == null - ? com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak - .getDefaultInstance() - : detectedBreak_; - } else { - return detectedBreakBuilder_.getMessage(); - } - } - /** - * - * - *
-         * Detected break at the end of a [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
-         * 
- * - * - * .google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak detected_break = 2; - * - */ - public Builder setDetectedBreak( - com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak value) { - if (detectedBreakBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - detectedBreak_ = value; - } else { - detectedBreakBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-         * Detected break at the end of a [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
-         * 
- * - * - * .google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak detected_break = 2; - * - */ - public Builder setDetectedBreak( - com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Builder - builderForValue) { - if (detectedBreakBuilder_ == null) { - detectedBreak_ = builderForValue.build(); - } else { - detectedBreakBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-         * Detected break at the end of a [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
-         * 
- * - * - * .google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak detected_break = 2; - * - */ - public Builder mergeDetectedBreak( - com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak value) { - if (detectedBreakBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && detectedBreak_ != null - && detectedBreak_ - != com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak - .getDefaultInstance()) { - getDetectedBreakBuilder().mergeFrom(value); - } else { - detectedBreak_ = value; - } - } else { - detectedBreakBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-         * Detected break at the end of a [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
-         * 
- * - * - * .google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak detected_break = 2; - * - */ - public Builder clearDetectedBreak() { - bitField0_ = (bitField0_ & ~0x00000002); - detectedBreak_ = null; - if (detectedBreakBuilder_ != null) { - detectedBreakBuilder_.dispose(); - detectedBreakBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-         * Detected break at the end of a [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
-         * 
- * - * - * .google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak detected_break = 2; - * - */ - public com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Builder - getDetectedBreakBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getDetectedBreakFieldBuilder().getBuilder(); - } - /** - * - * - *
-         * Detected break at the end of a [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
-         * 
- * - * - * .google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak detected_break = 2; - * - */ - public com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreakOrBuilder - getDetectedBreakOrBuilder() { - if (detectedBreakBuilder_ != null) { - return detectedBreakBuilder_.getMessageOrBuilder(); - } else { - return detectedBreak_ == null - ? com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak - .getDefaultInstance() - : detectedBreak_; - } - } - /** - * - * - *
-         * Detected break at the end of a [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
-         * 
- * - * - * .google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak detected_break = 2; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak, - com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreakOrBuilder> - getDetectedBreakFieldBuilder() { - if (detectedBreakBuilder_ == null) { - detectedBreakBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak, - com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreakOrBuilder>( - getDetectedBreak(), getParentForChildren(), isClean()); - detectedBreak_ = null; - } - return detectedBreakBuilder_; - } - private java.util.List detectedLanguages_ = java.util.Collections.emptyList(); private void ensureDetectedLanguagesIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { + if (!((bitField0_ & 0x00000002) != 0)) { detectedLanguages_ = new java.util.ArrayList< com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage>( detectedLanguages_); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; } } @@ -14615,7 +15238,7 @@ private void ensureDetectedLanguagesIsMutable() { * * * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ public java.util.List @@ -14634,7 +15257,7 @@ private void ensureDetectedLanguagesIsMutable() { * * * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ public int getDetectedLanguagesCount() { @@ -14652,7 +15275,7 @@ public int getDetectedLanguagesCount() { * * * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage @@ -14671,7 +15294,7 @@ public int getDetectedLanguagesCount() { * * * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ public Builder setDetectedLanguages( @@ -14696,7 +15319,7 @@ public Builder setDetectedLanguages( * * * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ public Builder setDetectedLanguages( @@ -14720,7 +15343,7 @@ public Builder setDetectedLanguages( * * * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ public Builder addDetectedLanguages( @@ -14745,7 +15368,7 @@ public Builder addDetectedLanguages( * * * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ public Builder addDetectedLanguages( @@ -14770,7 +15393,7 @@ public Builder addDetectedLanguages( * * * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ public Builder addDetectedLanguages( @@ -14793,7 +15416,7 @@ public Builder addDetectedLanguages( * * * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ public Builder addDetectedLanguages( @@ -14817,7 +15440,7 @@ public Builder addDetectedLanguages( * * * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ public Builder addAllDetectedLanguages( @@ -14841,13 +15464,13 @@ public Builder addAllDetectedLanguages( * * * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ public Builder clearDetectedLanguages() { if (detectedLanguagesBuilder_ == null) { detectedLanguages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { detectedLanguagesBuilder_.clear(); @@ -14862,7 +15485,7 @@ public Builder clearDetectedLanguages() { * * * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ public Builder removeDetectedLanguages(int index) { @@ -14883,7 +15506,7 @@ public Builder removeDetectedLanguages(int index) { * * * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder @@ -14898,7 +15521,7 @@ public Builder removeDetectedLanguages(int index) { * * * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder @@ -14917,7 +15540,7 @@ public Builder removeDetectedLanguages(int index) { * * * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ public java.util.List< @@ -14938,7 +15561,7 @@ public Builder removeDetectedLanguages(int index) { * * * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder @@ -14956,7 +15579,7 @@ public Builder removeDetectedLanguages(int index) { * * * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder @@ -14975,7 +15598,7 @@ public Builder removeDetectedLanguages(int index) { * * * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ public java.util.List< @@ -14996,7 +15619,7 @@ public Builder removeDetectedLanguages(int index) { com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder>( detectedLanguages_, - ((bitField0_ & 0x00000004) != 0), + ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); detectedLanguages_ = null; @@ -15004,6 +15627,226 @@ public Builder removeDetectedLanguages(int index) { return detectedLanguagesBuilder_; } + private com.google.cloud.documentai.v1beta2.Document.Provenance provenance_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Provenance, + com.google.cloud.documentai.v1beta2.Document.Provenance.Builder, + com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder> + provenanceBuilder_; + /** + * + * + *
+         * The  history of this annotation.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; + * + * + * @deprecated google.cloud.documentai.v1beta2.Document.Page.Line.provenance is deprecated. + * See google/cloud/documentai/v1beta2/document.proto;l=260 + * @return Whether the provenance field is set. + */ + @java.lang.Deprecated + public boolean hasProvenance() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+         * The  history of this annotation.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; + * + * + * @deprecated google.cloud.documentai.v1beta2.Document.Page.Line.provenance is deprecated. + * See google/cloud/documentai/v1beta2/document.proto;l=260 + * @return The provenance. + */ + @java.lang.Deprecated + public com.google.cloud.documentai.v1beta2.Document.Provenance getProvenance() { + if (provenanceBuilder_ == null) { + return provenance_ == null + ? com.google.cloud.documentai.v1beta2.Document.Provenance.getDefaultInstance() + : provenance_; + } else { + return provenanceBuilder_.getMessage(); + } + } + /** + * + * + *
+         * The  history of this annotation.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder setProvenance( + com.google.cloud.documentai.v1beta2.Document.Provenance value) { + if (provenanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + provenance_ = value; + } else { + provenanceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * The  history of this annotation.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder setProvenance( + com.google.cloud.documentai.v1beta2.Document.Provenance.Builder builderForValue) { + if (provenanceBuilder_ == null) { + provenance_ = builderForValue.build(); + } else { + provenanceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * The  history of this annotation.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder mergeProvenance( + com.google.cloud.documentai.v1beta2.Document.Provenance value) { + if (provenanceBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && provenance_ != null + && provenance_ + != com.google.cloud.documentai.v1beta2.Document.Provenance + .getDefaultInstance()) { + getProvenanceBuilder().mergeFrom(value); + } else { + provenance_ = value; + } + } else { + provenanceBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * The  history of this annotation.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder clearProvenance() { + bitField0_ = (bitField0_ & ~0x00000004); + provenance_ = null; + if (provenanceBuilder_ != null) { + provenanceBuilder_.dispose(); + provenanceBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+         * The  history of this annotation.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; + * + */ + @java.lang.Deprecated + public com.google.cloud.documentai.v1beta2.Document.Provenance.Builder + getProvenanceBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getProvenanceFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * The  history of this annotation.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; + * + */ + @java.lang.Deprecated + public com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder + getProvenanceOrBuilder() { + if (provenanceBuilder_ != null) { + return provenanceBuilder_.getMessageOrBuilder(); + } else { + return provenance_ == null + ? com.google.cloud.documentai.v1beta2.Document.Provenance.getDefaultInstance() + : provenance_; + } + } + /** + * + * + *
+         * The  history of this annotation.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Provenance, + com.google.cloud.documentai.v1beta2.Document.Provenance.Builder, + com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder> + getProvenanceFieldBuilder() { + if (provenanceBuilder_ == null) { + provenanceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Provenance, + com.google.cloud.documentai.v1beta2.Document.Provenance.Builder, + com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder>( + getProvenance(), getParentForChildren(), isClean()); + provenance_ = null; + } + return provenanceBuilder_; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -15016,24 +15859,24 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta2.Document.Page.Token) + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta2.Document.Page.Line) } - // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.Page.Token) - private static final com.google.cloud.documentai.v1beta2.Document.Page.Token DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.Page.Line) + private static final com.google.cloud.documentai.v1beta2.Document.Page.Line DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta2.Document.Page.Token(); + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta2.Document.Page.Line(); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Token getDefaultInstance() { + public static com.google.cloud.documentai.v1beta2.Document.Page.Line getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public Token parsePartialFrom( + public Line parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -15053,31 +15896,32 @@ public Token parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Token getDefaultInstanceForType() { + public com.google.cloud.documentai.v1beta2.Document.Page.Line getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface VisualElementOrBuilder + public interface TokenOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.Page.VisualElement) + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.Page.Token) com.google.protobuf.MessageOrBuilder { /** * * *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+       * [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
        * 
* * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; @@ -15089,7 +15933,8 @@ public interface VisualElementOrBuilder * * *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+       * [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
        * 
* * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; @@ -15101,7 +15946,8 @@ public interface VisualElementOrBuilder * * *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+       * [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
        * 
* * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; @@ -15112,26 +15958,46 @@ public interface VisualElementOrBuilder * * *
-       * Type of the [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
+       * Detected break at the end of a
+       * [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
        * 
* - * string type = 2; + * + * .google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak detected_break = 2; + * * - * @return The type. + * @return Whether the detectedBreak field is set. */ - java.lang.String getType(); + boolean hasDetectedBreak(); /** * * *
-       * Type of the [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
+       * Detected break at the end of a
+       * [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
        * 
* - * string type = 2; + * + * .google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak detected_break = 2; + * * - * @return The bytes for type. + * @return The detectedBreak. */ - com.google.protobuf.ByteString getTypeBytes(); + com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak getDetectedBreak(); + /** + * + * + *
+       * Detected break at the end of a
+       * [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak detected_break = 2; + * + */ + com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreakOrBuilder + getDetectedBreakOrBuilder(); /** * @@ -15198,1948 +16064,1654 @@ com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage getDetectedLa */ com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder getDetectedLanguagesOrBuilder(int index); - } - /** - * - * - *
-     * Detected non-text visual elements e.g. checkbox, signature etc. on the
-     * page.
-     * 
- * - * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.VisualElement} - */ - public static final class VisualElement extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.Page.VisualElement) - VisualElementOrBuilder { - private static final long serialVersionUID = 0L; - // Use VisualElement.newBuilder() to construct. - private VisualElement(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private VisualElement() { - type_ = ""; - detectedLanguages_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new VisualElement(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_VisualElement_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_VisualElement_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1beta2.Document.Page.VisualElement.class, - com.google.cloud.documentai.v1beta2.Document.Page.VisualElement.Builder.class); - } - public static final int LAYOUT_FIELD_NUMBER = 1; - private com.google.cloud.documentai.v1beta2.Document.Page.Layout layout_; /** * * *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
+       * The history of this annotation.
        * 
* - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 4 [deprecated = true]; + * * - * @return Whether the layout field is set. + * @deprecated google.cloud.documentai.v1beta2.Document.Page.Token.provenance is deprecated. + * See google/cloud/documentai/v1beta2/document.proto;l=352 + * @return Whether the provenance field is set. */ - @java.lang.Override - public boolean hasLayout() { - return layout_ != null; - } + @java.lang.Deprecated + boolean hasProvenance(); /** * * *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
+       * The history of this annotation.
        * 
* - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 4 [deprecated = true]; + * * - * @return The layout. + * @deprecated google.cloud.documentai.v1beta2.Document.Page.Token.provenance is deprecated. + * See google/cloud/documentai/v1beta2/document.proto;l=352 + * @return The provenance. */ - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Layout getLayout() { - return layout_ == null - ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() - : layout_; - } + @java.lang.Deprecated + com.google.cloud.documentai.v1beta2.Document.Provenance getProvenance(); /** * * *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
+       * The history of this annotation.
        * 
* - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 4 [deprecated = true]; + * */ - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder - getLayoutOrBuilder() { - return layout_ == null - ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() - : layout_; - } - - public static final int TYPE_FIELD_NUMBER = 2; + @java.lang.Deprecated + com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder getProvenanceOrBuilder(); - @SuppressWarnings("serial") - private volatile java.lang.Object type_ = ""; /** * * *
-       * Type of the [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
+       * Text style attributes.
        * 
* - * string type = 2; + * .google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo style_info = 5; * - * @return The type. + * @return Whether the styleInfo field is set. */ - @java.lang.Override - public java.lang.String getType() { - java.lang.Object ref = type_; - 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(); - type_ = s; - return s; - } - } + boolean hasStyleInfo(); /** * * *
-       * Type of the [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
+       * Text style attributes.
        * 
* - * string type = 2; + * .google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo style_info = 5; * - * @return The bytes for type. + * @return The styleInfo. */ - @java.lang.Override - public com.google.protobuf.ByteString getTypeBytes() { - java.lang.Object ref = type_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - type_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DETECTED_LANGUAGES_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private java.util.List - detectedLanguages_; + com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo getStyleInfo(); /** * * *
-       * A list of detected languages together with confidence.
+       * Text style attributes.
        * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; - * + * .google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo style_info = 5; */ - @java.lang.Override - public java.util.List - getDetectedLanguagesList() { - return detectedLanguages_; + com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfoOrBuilder + getStyleInfoOrBuilder(); + } + /** + * + * + *
+     * A detected token.
+     * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.Token} + */ + public static final class Token extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.Page.Token) + TokenOrBuilder { + private static final long serialVersionUID = 0L; + // Use Token.newBuilder() to construct. + private Token(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); } - /** - * - * - *
-       * A list of detected languages together with confidence.
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; - * - */ - @java.lang.Override - public java.util.List< - ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> - getDetectedLanguagesOrBuilderList() { - return detectedLanguages_; + + private Token() { + detectedLanguages_ = java.util.Collections.emptyList(); } - /** - * - * - *
-       * A list of detected languages together with confidence.
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; - * - */ + @java.lang.Override - public int getDetectedLanguagesCount() { - return detectedLanguages_.size(); + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Token(); } - /** - * - * - *
-       * A list of detected languages together with confidence.
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; - * - */ + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Token_descriptor; + } + @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage - getDetectedLanguages(int index) { - return detectedLanguages_.get(index); + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Token_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Document.Page.Token.class, + com.google.cloud.documentai.v1beta2.Document.Page.Token.Builder.class); + } + + public interface DetectedBreakOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * Detected break type.
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Type type = 1; + * + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+         * Detected break type.
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Type type = 1; + * + * + * @return The type. + */ + com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Type getType(); } /** * * *
-       * A list of detected languages together with confidence.
+       * Detected break at the end of a
+       * [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
        * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; - * + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak} */ - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder - getDetectedLanguagesOrBuilder(int index) { - return detectedLanguages_.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 (layout_ != null) { - output.writeMessage(1, getLayout()); + public static final class DetectedBreak extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak) + DetectedBreakOrBuilder { + private static final long serialVersionUID = 0L; + // Use DetectedBreak.newBuilder() to construct. + private DetectedBreak(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, type_); + + private DetectedBreak() { + type_ = 0; } - for (int i = 0; i < detectedLanguages_.size(); i++) { - output.writeMessage(3, detectedLanguages_.get(i)); + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DetectedBreak(); } - getUnknownFields().writeTo(output); - } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (layout_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getLayout()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, type_); - } - for (int i = 0; i < detectedLanguages_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 3, detectedLanguages_.get(i)); - } - size += getUnknownFields().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.v1beta2.Document.Page.VisualElement)) { - return super.equals(obj); - } - com.google.cloud.documentai.v1beta2.Document.Page.VisualElement other = - (com.google.cloud.documentai.v1beta2.Document.Page.VisualElement) obj; - - if (hasLayout() != other.hasLayout()) return false; - if (hasLayout()) { - if (!getLayout().equals(other.getLayout())) return false; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Token_DetectedBreak_descriptor; } - if (!getType().equals(other.getType())) return false; - if (!getDetectedLanguagesList().equals(other.getDetectedLanguagesList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasLayout()) { - hash = (37 * hash) + LAYOUT_FIELD_NUMBER; - hash = (53 * hash) + getLayout().hashCode(); - } - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + getType().hashCode(); - if (getDetectedLanguagesCount() > 0) { - hash = (37 * hash) + DETECTED_LANGUAGES_FIELD_NUMBER; - hash = (53 * hash) + getDetectedLanguagesList().hashCode(); + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Token_DetectedBreak_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.class, + com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Builder + .class); } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.documentai.v1beta2.Document.Page.VisualElement parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.documentai.v1beta2.Document.Page.VisualElement 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.v1beta2.Document.Page.VisualElement parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
+         * Enum to denote the type of break found.
+         * 
+ * + * Protobuf enum {@code + * google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Type} + */ + public enum Type implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+           * Unspecified break type.
+           * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + * + * + *
+           * A single whitespace.
+           * 
+ * + * SPACE = 1; + */ + SPACE(1), + /** + * + * + *
+           * A wider whitespace.
+           * 
+ * + * WIDE_SPACE = 2; + */ + WIDE_SPACE(2), + /** + * + * + *
+           * A hyphen that indicates that a token has been split across lines.
+           * 
+ * + * HYPHEN = 3; + */ + HYPHEN(3), + UNRECOGNIZED(-1), + ; - public static com.google.cloud.documentai.v1beta2.Document.Page.VisualElement parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
+           * Unspecified break type.
+           * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+           * A single whitespace.
+           * 
+ * + * SPACE = 1; + */ + public static final int SPACE_VALUE = 1; + /** + * + * + *
+           * A wider whitespace.
+           * 
+ * + * WIDE_SPACE = 2; + */ + public static final int WIDE_SPACE_VALUE = 2; + /** + * + * + *
+           * A hyphen that indicates that a token has been split across lines.
+           * 
+ * + * HYPHEN = 3; + */ + public static final int HYPHEN_VALUE = 3; - public static com.google.cloud.documentai.v1beta2.Document.Page.VisualElement parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } - public static com.google.cloud.documentai.v1beta2.Document.Page.VisualElement parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * @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 Type valueOf(int value) { + return forNumber(value); + } - public static com.google.cloud.documentai.v1beta2.Document.Page.VisualElement parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Type forNumber(int value) { + switch (value) { + case 0: + return TYPE_UNSPECIFIED; + case 1: + return SPACE; + case 2: + return WIDE_SPACE; + case 3: + return HYPHEN; + default: + return null; + } + } - public static com.google.cloud.documentai.v1beta2.Document.Page.VisualElement 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.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } - public static com.google.cloud.documentai.v1beta2.Document.Page.VisualElement - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; - public static com.google.cloud.documentai.v1beta2.Document.Page.VisualElement - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } - public static com.google.cloud.documentai.v1beta2.Document.Page.VisualElement parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } - public static com.google.cloud.documentai.v1beta2.Document.Page.VisualElement parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak + .getDescriptor() + .getEnumTypes() + .get(0); + } - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + private static final Type[] VALUES = values(); - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + public static Type valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } - public static Builder newBuilder( - com.google.cloud.documentai.v1beta2.Document.Page.VisualElement prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + private final int value; - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + private Type(int value) { + this.value = value; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-       * Detected non-text visual elements e.g. checkbox, signature etc. on the
-       * page.
-       * 
- * - * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.VisualElement} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.Page.VisualElement) - com.google.cloud.documentai.v1beta2.Document.Page.VisualElementOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_VisualElement_descriptor; + // @@protoc_insertion_point(enum_scope:google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Type) } + public static final int TYPE_FIELD_NUMBER = 1; + private int type_ = 0; + /** + * + * + *
+         * Detected break type.
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Type type = 1; + * + * + * @return The enum numeric value on the wire for type. + */ @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_VisualElement_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1beta2.Document.Page.VisualElement.class, - com.google.cloud.documentai.v1beta2.Document.Page.VisualElement.Builder.class); - } - - // Construct using - // com.google.cloud.documentai.v1beta2.Document.Page.VisualElement.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); + public int getTypeValue() { + return type_; } - + /** + * + * + *
+         * Detected break type.
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Type type = 1; + * + * + * @return The type. + */ @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - layout_ = null; - if (layoutBuilder_ != null) { - layoutBuilder_.dispose(); - layoutBuilder_ = null; - } - type_ = ""; - if (detectedLanguagesBuilder_ == null) { - detectedLanguages_ = java.util.Collections.emptyList(); - } else { - detectedLanguages_ = null; - detectedLanguagesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - return this; + public com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Type + getType() { + com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Type result = + com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Type.forNumber( + type_); + return result == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Type + .UNRECOGNIZED + : result; } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_VisualElement_descriptor; - } + private byte memoizedIsInitialized = -1; @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.VisualElement - getDefaultInstanceForType() { - return com.google.cloud.documentai.v1beta2.Document.Page.VisualElement - .getDefaultInstance(); + 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 com.google.cloud.documentai.v1beta2.Document.Page.VisualElement build() { - com.google.cloud.documentai.v1beta2.Document.Page.VisualElement result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (type_ + != com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Type + .TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, type_); } - return result; + getUnknownFields().writeTo(output); } @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.VisualElement buildPartial() { - com.google.cloud.documentai.v1beta2.Document.Page.VisualElement result = - new com.google.cloud.documentai.v1beta2.Document.Page.VisualElement(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - private void buildPartialRepeatedFields( - com.google.cloud.documentai.v1beta2.Document.Page.VisualElement result) { - if (detectedLanguagesBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - detectedLanguages_ = java.util.Collections.unmodifiableList(detectedLanguages_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.detectedLanguages_ = detectedLanguages_; - } else { - result.detectedLanguages_ = detectedLanguagesBuilder_.build(); + size = 0; + if (type_ + != com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Type + .TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; } - private void buildPartial0( - com.google.cloud.documentai.v1beta2.Document.Page.VisualElement result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.layout_ = layoutBuilder_ == null ? layout_ : layoutBuilder_.build(); + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.type_ = type_; + if (!(obj + instanceof com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak)) { + return super.equals(obj); } - } + com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak other = + (com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak) obj; - @java.lang.Override - public Builder clone() { - return super.clone(); + if (type_ != other.type_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); + public static com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); + public static com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak + parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); + public static com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + public static com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.documentai.v1beta2.Document.Page.VisualElement) { - return mergeFrom( - (com.google.cloud.documentai.v1beta2.Document.Page.VisualElement) other); - } else { - super.mergeFrom(other); - return this; - } + public static com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - public Builder mergeFrom( - com.google.cloud.documentai.v1beta2.Document.Page.VisualElement other) { - if (other - == com.google.cloud.documentai.v1beta2.Document.Page.VisualElement - .getDefaultInstance()) return this; - if (other.hasLayout()) { - mergeLayout(other.getLayout()); - } - if (!other.getType().isEmpty()) { - type_ = other.type_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (detectedLanguagesBuilder_ == null) { - if (!other.detectedLanguages_.isEmpty()) { - if (detectedLanguages_.isEmpty()) { - detectedLanguages_ = other.detectedLanguages_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.addAll(other.detectedLanguages_); - } - onChanged(); - } - } else { - if (!other.detectedLanguages_.isEmpty()) { - if (detectedLanguagesBuilder_.isEmpty()) { - detectedLanguagesBuilder_.dispose(); - detectedLanguagesBuilder_ = null; - detectedLanguages_ = other.detectedLanguages_; - bitField0_ = (bitField0_ & ~0x00000004); - detectedLanguagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getDetectedLanguagesFieldBuilder() - : null; - } else { - detectedLanguagesBuilder_.addAllMessages(other.detectedLanguages_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; + public static com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - @java.lang.Override - public final boolean isInitialized() { - return true; + public static com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getLayoutFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - type_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage m = - input.readMessage( - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage - .parser(), - extensionRegistry); - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(m); - } else { - detectedLanguagesBuilder_.addMessage(m); - } - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; + public static com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } - private int bitField0_; - - private com.google.cloud.documentai.v1beta2.Document.Page.Layout layout_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Layout, - com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder> - layoutBuilder_; - /** - * - * - *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
-         * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; - * - * @return Whether the layout field is set. - */ - public boolean hasLayout() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
-         * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; - * - * @return The layout. - */ - public com.google.cloud.documentai.v1beta2.Document.Page.Layout getLayout() { - if (layoutBuilder_ == null) { - return layout_ == null - ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() - : layout_; - } else { - return layoutBuilder_.getMessage(); - } - } - /** - * - * - *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
-         * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; - */ - public Builder setLayout(com.google.cloud.documentai.v1beta2.Document.Page.Layout value) { - if (layoutBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - layout_ = value; - } else { - layoutBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; + public static com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); } - /** - * - * - *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
-         * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; - */ - public Builder setLayout( - com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder builderForValue) { - if (layoutBuilder_ == null) { - layout_ = builderForValue.build(); - } else { - layoutBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; + + public static com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); } - /** - * - * - *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
-         * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; - */ - public Builder mergeLayout(com.google.cloud.documentai.v1beta2.Document.Page.Layout value) { - if (layoutBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && layout_ != null - && layout_ - != com.google.cloud.documentai.v1beta2.Document.Page.Layout - .getDefaultInstance()) { - getLayoutBuilder().mergeFrom(value); - } else { - layout_ = value; - } - } else { - layoutBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; + + public static com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - /** - * - * - *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
-         * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; - */ - public Builder clearLayout() { - bitField0_ = (bitField0_ & ~0x00000001); - layout_ = null; - if (layoutBuilder_ != null) { - layoutBuilder_.dispose(); - layoutBuilder_ = null; - } - onChanged(); - return this; + + public static com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } - /** - * - * - *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
-         * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; - */ - public com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder getLayoutBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getLayoutFieldBuilder().getBuilder(); + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); } - /** - * - * - *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
-         * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; - */ - public com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder - getLayoutOrBuilder() { - if (layoutBuilder_ != null) { - return layoutBuilder_.getMessageOrBuilder(); - } else { - return layout_ == null - ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() - : layout_; - } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); } - /** - * - * - *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
-         * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Layout, - com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder> - getLayoutFieldBuilder() { - if (layoutBuilder_ == null) { - layoutBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Layout, - com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder>( - getLayout(), getParentForChildren(), isClean()); - layout_ = null; - } - return layoutBuilder_; + + public static Builder newBuilder( + com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - private java.lang.Object type_ = ""; - /** - * - * - *
-         * Type of the [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
-         * 
- * - * string type = 2; - * - * @return The type. - */ - public java.lang.String getType() { - java.lang.Object ref = type_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - type_ = s; - return s; - } else { - return (java.lang.String) ref; - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } - /** - * - * - *
-         * Type of the [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
-         * 
- * - * string type = 2; - * - * @return The bytes for type. - */ - public com.google.protobuf.ByteString getTypeBytes() { - java.lang.Object ref = type_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - type_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; } /** * * *
-         * Type of the [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
+         * Detected break at the end of a
+         * [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
          * 
* - * string type = 2; - * - * @param value The type to set. - * @return This builder for chaining. + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak} */ - public Builder setType(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak) + com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreakOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Token_DetectedBreak_descriptor; } - type_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-         * Type of the [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
-         * 
- * - * string type = 2; - * - * @return This builder for chaining. - */ - public Builder clearType() { - type_ = getDefaultInstance().getType(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-         * Type of the [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
-         * 
- * - * string type = 2; - * - * @param value The bytes for type to set. - * @return This builder for chaining. - */ - public Builder setTypeBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Token_DetectedBreak_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.class, + com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Builder + .class); } - checkByteStringIsUtf8(value); - type_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - private java.util.List - detectedLanguages_ = java.util.Collections.emptyList(); + // Construct using + // com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.newBuilder() + private Builder() {} - private void ensureDetectedLanguagesIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - detectedLanguages_ = - new java.util.ArrayList< - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage>( - detectedLanguages_); - bitField0_ |= 0x00000004; + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); } - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> - detectedLanguagesBuilder_; - - /** - * + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + type_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Token_DetectedBreak_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak build() { + com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak + buildPartial() { + com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak result = + new com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.type_ = type_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak) { + return mergeFrom( + (com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak other) { + if (other + == com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak + .getDefaultInstance()) return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int type_ = 0; + /** + * + * + *
+           * Detected break type.
+           * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Type type = 1; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+           * Detected break type.
+           * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Type type = 1; + * + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+           * Detected break type.
+           * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Type type = 1; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Type + getType() { + com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Type result = + com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Type + .forNumber(type_); + return result == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Type + .UNRECOGNIZED + : result; + } + /** + * + * + *
+           * Detected break type.
+           * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Type type = 1; + * + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Type value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+           * Detected break type.
+           * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Type type = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000001); + type_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak) + private static final com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak(); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DetectedBreak parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface StyleInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * * *
-         * A list of detected languages together with confidence.
+         * Font size in points (`1` point is `¹⁄₇₂` inches).
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; - * + * int32 font_size = 1; + * + * @return The fontSize. */ - public java.util.List - getDetectedLanguagesList() { - if (detectedLanguagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(detectedLanguages_); - } else { - return detectedLanguagesBuilder_.getMessageList(); - } - } + int getFontSize(); + /** * * *
-         * A list of detected languages together with confidence.
+         * Font size in pixels, equal to _unrounded
+         * [font_size][google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo.font_size]_
+         * * _resolution_ ÷ `72.0`.
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; - * + * double pixel_font_size = 2; + * + * @return The pixelFontSize. */ - public int getDetectedLanguagesCount() { - if (detectedLanguagesBuilder_ == null) { - return detectedLanguages_.size(); - } else { - return detectedLanguagesBuilder_.getCount(); - } - } + double getPixelFontSize(); + /** * * *
-         * A list of detected languages together with confidence.
+         * Letter spacing in points.
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; - * + * double letter_spacing = 3; + * + * @return The letterSpacing. */ - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage - getDetectedLanguages(int index) { - if (detectedLanguagesBuilder_ == null) { - return detectedLanguages_.get(index); - } else { - return detectedLanguagesBuilder_.getMessage(index); - } - } + double getLetterSpacing(); + /** * * *
-         * A list of detected languages together with confidence.
+         * Name or style of the font.
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; - * + * string font_type = 4; + * + * @return The fontType. */ - public Builder setDetectedLanguages( - int index, com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { - if (detectedLanguagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.set(index, value); - onChanged(); - } else { - detectedLanguagesBuilder_.setMessage(index, value); - } - return this; - } + java.lang.String getFontType(); /** * * *
-         * A list of detected languages together with confidence.
+         * Name or style of the font.
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; - * + * string font_type = 4; + * + * @return The bytes for fontType. */ - public Builder setDetectedLanguages( - int index, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder - builderForValue) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.set(index, builderForValue.build()); - onChanged(); - } else { - detectedLanguagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } + com.google.protobuf.ByteString getFontTypeBytes(); + /** * * *
-         * A list of detected languages together with confidence.
+         * Whether the text is bold (equivalent to
+         * [font_weight][google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo.font_weight]
+         * is at least `700`).
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; - * + * bool bold = 5; + * + * @return The bold. */ - public Builder addDetectedLanguages( - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { - if (detectedLanguagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(value); - onChanged(); - } else { - detectedLanguagesBuilder_.addMessage(value); - } - return this; - } + boolean getBold(); + /** * * *
-         * A list of detected languages together with confidence.
+         * Whether the text is italic.
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; - * + * bool italic = 6; + * + * @return The italic. */ - public Builder addDetectedLanguages( - int index, com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { - if (detectedLanguagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(index, value); - onChanged(); - } else { - detectedLanguagesBuilder_.addMessage(index, value); - } - return this; - } + boolean getItalic(); + /** * * *
-         * A list of detected languages together with confidence.
+         * Whether the text is underlined.
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; - * + * bool underlined = 7; + * + * @return The underlined. */ - public Builder addDetectedLanguages( - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder - builderForValue) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(builderForValue.build()); - onChanged(); - } else { - detectedLanguagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } + boolean getUnderlined(); + /** * * *
-         * A list of detected languages together with confidence.
+         * Whether the text is strikethrough.
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; - * + * bool strikeout = 8; + * + * @return The strikeout. */ - public Builder addDetectedLanguages( - int index, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder - builderForValue) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(index, builderForValue.build()); - onChanged(); - } else { - detectedLanguagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } + boolean getStrikeout(); + /** * * *
-         * A list of detected languages together with confidence.
+         * Whether the text is a subscript.
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; - * + * bool subscript = 9; + * + * @return The subscript. */ - public Builder addAllDetectedLanguages( - java.lang.Iterable< - ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage> - values) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, detectedLanguages_); - onChanged(); - } else { - detectedLanguagesBuilder_.addAllMessages(values); - } - return this; - } + boolean getSubscript(); + /** * * *
-         * A list of detected languages together with confidence.
+         * Whether the text is a superscript.
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; - * + * bool superscript = 10; + * + * @return The superscript. */ - public Builder clearDetectedLanguages() { - if (detectedLanguagesBuilder_ == null) { - detectedLanguages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - detectedLanguagesBuilder_.clear(); - } - return this; - } + boolean getSuperscript(); + /** * * *
-         * A list of detected languages together with confidence.
+         * Whether the text is in small caps.
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; - * + * bool smallcaps = 11; + * + * @return The smallcaps. */ - public Builder removeDetectedLanguages(int index) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.remove(index); - onChanged(); - } else { - detectedLanguagesBuilder_.remove(index); - } - return this; - } + boolean getSmallcaps(); + /** * * *
-         * A list of detected languages together with confidence.
+         * TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy).
+         * Normal is `400`, bold is `700`.
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; - * + * int32 font_weight = 12; + * + * @return The fontWeight. */ - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder - getDetectedLanguagesBuilder(int index) { - return getDetectedLanguagesFieldBuilder().getBuilder(index); - } + int getFontWeight(); + /** * * *
-         * A list of detected languages together with confidence.
+         * Whether the text is handwritten.
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; - * + * bool handwritten = 13; + * + * @return The handwritten. */ - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder - getDetectedLanguagesOrBuilder(int index) { - if (detectedLanguagesBuilder_ == null) { - return detectedLanguages_.get(index); - } else { - return detectedLanguagesBuilder_.getMessageOrBuilder(index); - } - } + boolean getHandwritten(); + /** * * *
-         * A list of detected languages together with confidence.
+         * Color of the text.
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; - * + * .google.type.Color text_color = 14; + * + * @return Whether the textColor field is set. */ - public java.util.List< - ? extends - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> - getDetectedLanguagesOrBuilderList() { - if (detectedLanguagesBuilder_ != null) { - return detectedLanguagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(detectedLanguages_); - } - } + boolean hasTextColor(); /** * * *
-         * A list of detected languages together with confidence.
+         * Color of the text.
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; - * + * .google.type.Color text_color = 14; + * + * @return The textColor. */ - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder - addDetectedLanguagesBuilder() { - return getDetectedLanguagesFieldBuilder() - .addBuilder( - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage - .getDefaultInstance()); - } + com.google.type.Color getTextColor(); /** * * *
-         * A list of detected languages together with confidence.
+         * Color of the text.
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; - * + * .google.type.Color text_color = 14; */ - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder - addDetectedLanguagesBuilder(int index) { - return getDetectedLanguagesFieldBuilder() - .addBuilder( - index, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage - .getDefaultInstance()); - } + com.google.type.ColorOrBuilder getTextColorOrBuilder(); + /** * * *
-         * A list of detected languages together with confidence.
+         * Color of the background.
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; - * + * .google.type.Color background_color = 15; + * + * @return Whether the backgroundColor field is set. */ - public java.util.List< - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder> - getDetectedLanguagesBuilderList() { - return getDetectedLanguagesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> - getDetectedLanguagesFieldBuilder() { - if (detectedLanguagesBuilder_ == null) { - detectedLanguagesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder>( - detectedLanguages_, - ((bitField0_ & 0x00000004) != 0), - getParentForChildren(), - isClean()); - detectedLanguages_ = null; - } - return detectedLanguagesBuilder_; - } - - @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.v1beta2.Document.Page.VisualElement) - } - - // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.Page.VisualElement) - private static final com.google.cloud.documentai.v1beta2.Document.Page.VisualElement - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta2.Document.Page.VisualElement(); - } - - public static com.google.cloud.documentai.v1beta2.Document.Page.VisualElement - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public VisualElement parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.VisualElement - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; + boolean hasBackgroundColor(); + /** + * + * + *
+         * Color of the background.
+         * 
+ * + * .google.type.Color background_color = 15; + * + * @return The backgroundColor. + */ + com.google.type.Color getBackgroundColor(); + /** + * + * + *
+         * Color of the background.
+         * 
+ * + * .google.type.Color background_color = 15; + */ + com.google.type.ColorOrBuilder getBackgroundColorOrBuilder(); } - } - - public interface TableOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.Page.Table) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Table][google.cloud.documentai.v1beta2.Document.Page.Table].
-       * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; - * - * @return Whether the layout field is set. - */ - boolean hasLayout(); - /** - * - * - *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Table][google.cloud.documentai.v1beta2.Document.Page.Table].
-       * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; - * - * @return The layout. - */ - com.google.cloud.documentai.v1beta2.Document.Page.Layout getLayout(); - /** - * - * - *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Table][google.cloud.documentai.v1beta2.Document.Page.Table].
-       * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; - */ - com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder getLayoutOrBuilder(); - - /** - * - * - *
-       * Header rows of the table.
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; - * - */ - java.util.List - getHeaderRowsList(); - /** - * - * - *
-       * Header rows of the table.
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; - * - */ - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow getHeaderRows(int index); - /** - * - * - *
-       * Header rows of the table.
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; - * - */ - int getHeaderRowsCount(); - /** - * - * - *
-       * Header rows of the table.
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; - * - */ - java.util.List< - ? extends com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRowOrBuilder> - getHeaderRowsOrBuilderList(); - /** - * - * - *
-       * Header rows of the table.
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; - * - */ - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRowOrBuilder - getHeaderRowsOrBuilder(int index); - - /** - * - * - *
-       * Body rows of the table.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; - * - */ - java.util.List - getBodyRowsList(); - /** - * - * - *
-       * Body rows of the table.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; - * - */ - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow getBodyRows(int index); - /** - * - * - *
-       * Body rows of the table.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; - * - */ - int getBodyRowsCount(); - /** - * - * - *
-       * Body rows of the table.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; - * - */ - java.util.List< - ? extends com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRowOrBuilder> - getBodyRowsOrBuilderList(); - /** - * - * - *
-       * Body rows of the table.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; - * - */ - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRowOrBuilder - getBodyRowsOrBuilder(int index); - - /** - * - * - *
-       * A list of detected languages together with confidence.
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * - */ - java.util.List - getDetectedLanguagesList(); - /** - * - * - *
-       * A list of detected languages together with confidence.
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * - */ - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage getDetectedLanguages( - int index); - /** - * - * - *
-       * A list of detected languages together with confidence.
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * - */ - int getDetectedLanguagesCount(); - /** - * - * - *
-       * A list of detected languages together with confidence.
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * - */ - java.util.List< - ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> - getDetectedLanguagesOrBuilderList(); /** * * *
-       * A list of detected languages together with confidence.
+       * Font and other text style attributes.
        * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo} */ - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder - getDetectedLanguagesOrBuilder(int index); - } - /** - * - * - *
-     * A table representation similar to HTML table structure.
-     * 
- * - * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.Table} - */ - public static final class Table extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.Page.Table) - TableOrBuilder { - private static final long serialVersionUID = 0L; - // Use Table.newBuilder() to construct. - private Table(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Table() { - headerRows_ = java.util.Collections.emptyList(); - bodyRows_ = java.util.Collections.emptyList(); - detectedLanguages_ = java.util.Collections.emptyList(); - } + public static final class StyleInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo) + StyleInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use StyleInfo.newBuilder() to construct. + private StyleInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Table(); - } + private StyleInfo() { + fontType_ = ""; + } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_Table_descriptor; - } + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StyleInfo(); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_Table_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1beta2.Document.Page.Table.class, - com.google.cloud.documentai.v1beta2.Document.Page.Table.Builder.class); - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Token_StyleInfo_descriptor; + } - public interface TableRowOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.Page.Table.TableRow) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Token_StyleInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo.class, + com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo.Builder.class); + } + public static final int FONT_SIZE_FIELD_NUMBER = 1; + private int fontSize_ = 0; /** * * *
-         * Cells that make up this row.
+         * Font size in points (`1` point is `¹⁄₇₂` inches).
          * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; - * + * int32 font_size = 1; + * + * @return The fontSize. */ - java.util.List - getCellsList(); + @java.lang.Override + public int getFontSize() { + return fontSize_; + } + + public static final int PIXEL_FONT_SIZE_FIELD_NUMBER = 2; + private double pixelFontSize_ = 0D; /** * * *
-         * Cells that make up this row.
+         * Font size in pixels, equal to _unrounded
+         * [font_size][google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo.font_size]_
+         * * _resolution_ ÷ `72.0`.
          * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; - * + * double pixel_font_size = 2; + * + * @return The pixelFontSize. */ - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell getCells(int index); + @java.lang.Override + public double getPixelFontSize() { + return pixelFontSize_; + } + + public static final int LETTER_SPACING_FIELD_NUMBER = 3; + private double letterSpacing_ = 0D; /** * * *
-         * Cells that make up this row.
+         * Letter spacing in points.
          * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; - * - */ - int getCellsCount(); - /** - * + * double letter_spacing = 3; * - *
-         * Cells that make up this row.
+         * @return The letterSpacing.
+         */
+        @java.lang.Override
+        public double getLetterSpacing() {
+          return letterSpacing_;
+        }
+
+        public static final int FONT_TYPE_FIELD_NUMBER = 4;
+
+        @SuppressWarnings("serial")
+        private volatile java.lang.Object fontType_ = "";
+        /**
+         *
+         *
+         * 
+         * Name or style of the font.
          * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; - * + * string font_type = 4; + * + * @return The fontType. */ - java.util.List< - ? extends - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCellOrBuilder> - getCellsOrBuilderList(); + @java.lang.Override + public java.lang.String getFontType() { + java.lang.Object ref = fontType_; + 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(); + fontType_ = s; + return s; + } + } /** * * *
-         * Cells that make up this row.
+         * Name or style of the font.
          * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; - * + * string font_type = 4; + * + * @return The bytes for fontType. */ - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCellOrBuilder - getCellsOrBuilder(int index); - } - /** - * - * - *
-       * A row of table cells.
-       * 
- * - * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.Table.TableRow} - */ - public static final class TableRow extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.Page.Table.TableRow) - TableRowOrBuilder { - private static final long serialVersionUID = 0L; - // Use TableRow.newBuilder() to construct. - private TableRow(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); + @java.lang.Override + public com.google.protobuf.ByteString getFontTypeBytes() { + java.lang.Object ref = fontType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fontType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - private TableRow() { - cells_ = java.util.Collections.emptyList(); + public static final int BOLD_FIELD_NUMBER = 5; + private boolean bold_ = false; + /** + * + * + *
+         * Whether the text is bold (equivalent to
+         * [font_weight][google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo.font_weight]
+         * is at least `700`).
+         * 
+ * + * bool bold = 5; + * + * @return The bold. + */ + @java.lang.Override + public boolean getBold() { + return bold_; } + public static final int ITALIC_FIELD_NUMBER = 6; + private boolean italic_ = false; + /** + * + * + *
+         * Whether the text is italic.
+         * 
+ * + * bool italic = 6; + * + * @return The italic. + */ @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new TableRow(); + public boolean getItalic() { + return italic_; } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_Table_TableRow_descriptor; + public static final int UNDERLINED_FIELD_NUMBER = 7; + private boolean underlined_ = false; + /** + * + * + *
+         * Whether the text is underlined.
+         * 
+ * + * bool underlined = 7; + * + * @return The underlined. + */ + @java.lang.Override + public boolean getUnderlined() { + return underlined_; } + public static final int STRIKEOUT_FIELD_NUMBER = 8; + private boolean strikeout_ = false; + /** + * + * + *
+         * Whether the text is strikethrough.
+         * 
+ * + * bool strikeout = 8; + * + * @return The strikeout. + */ @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_Table_TableRow_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.class, - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.Builder.class); + public boolean getStrikeout() { + return strikeout_; } - public static final int CELLS_FIELD_NUMBER = 1; + public static final int SUBSCRIPT_FIELD_NUMBER = 9; + private boolean subscript_ = false; + /** + * + * + *
+         * Whether the text is a subscript.
+         * 
+ * + * bool subscript = 9; + * + * @return The subscript. + */ + @java.lang.Override + public boolean getSubscript() { + return subscript_; + } - @SuppressWarnings("serial") - private java.util.List - cells_; + public static final int SUPERSCRIPT_FIELD_NUMBER = 10; + private boolean superscript_ = false; /** * * *
-         * Cells that make up this row.
+         * Whether the text is a superscript.
          * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; - * + * bool superscript = 10; + * + * @return The superscript. */ @java.lang.Override - public java.util.List - getCellsList() { - return cells_; + public boolean getSuperscript() { + return superscript_; + } + + public static final int SMALLCAPS_FIELD_NUMBER = 11; + private boolean smallcaps_ = false; + /** + * + * + *
+         * Whether the text is in small caps.
+         * 
+ * + * bool smallcaps = 11; + * + * @return The smallcaps. + */ + @java.lang.Override + public boolean getSmallcaps() { + return smallcaps_; } + + public static final int FONT_WEIGHT_FIELD_NUMBER = 12; + private int fontWeight_ = 0; /** * * *
-         * Cells that make up this row.
+         * TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy).
+         * Normal is `400`, bold is `700`.
          * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; - * + * int32 font_weight = 12; + * + * @return The fontWeight. */ @java.lang.Override - public java.util.List< - ? extends - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCellOrBuilder> - getCellsOrBuilderList() { - return cells_; + public int getFontWeight() { + return fontWeight_; } + + public static final int HANDWRITTEN_FIELD_NUMBER = 13; + private boolean handwritten_ = false; /** * * *
-         * Cells that make up this row.
+         * Whether the text is handwritten.
          * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; - * + * bool handwritten = 13; + * + * @return The handwritten. */ @java.lang.Override - public int getCellsCount() { - return cells_.size(); + public boolean getHandwritten() { + return handwritten_; } + + public static final int TEXT_COLOR_FIELD_NUMBER = 14; + private com.google.type.Color textColor_; /** * * *
-         * Cells that make up this row.
+         * Color of the text.
          * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; - * + * .google.type.Color text_color = 14; + * + * @return Whether the textColor field is set. */ @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell getCells( - int index) { - return cells_.get(index); + public boolean hasTextColor() { + return textColor_ != null; } /** * * *
-         * Cells that make up this row.
+         * Color of the text.
          * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; - * + * .google.type.Color text_color = 14; + * + * @return The textColor. */ @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCellOrBuilder - getCellsOrBuilder(int index) { - return cells_.get(index); + public com.google.type.Color getTextColor() { + return textColor_ == null ? com.google.type.Color.getDefaultInstance() : textColor_; + } + /** + * + * + *
+         * Color of the text.
+         * 
+ * + * .google.type.Color text_color = 14; + */ + @java.lang.Override + public com.google.type.ColorOrBuilder getTextColorOrBuilder() { + return textColor_ == null ? com.google.type.Color.getDefaultInstance() : textColor_; + } + + public static final int BACKGROUND_COLOR_FIELD_NUMBER = 15; + private com.google.type.Color backgroundColor_; + /** + * + * + *
+         * Color of the background.
+         * 
+ * + * .google.type.Color background_color = 15; + * + * @return Whether the backgroundColor field is set. + */ + @java.lang.Override + public boolean hasBackgroundColor() { + return backgroundColor_ != null; + } + /** + * + * + *
+         * Color of the background.
+         * 
+ * + * .google.type.Color background_color = 15; + * + * @return The backgroundColor. + */ + @java.lang.Override + public com.google.type.Color getBackgroundColor() { + return backgroundColor_ == null + ? com.google.type.Color.getDefaultInstance() + : backgroundColor_; + } + /** + * + * + *
+         * Color of the background.
+         * 
+ * + * .google.type.Color background_color = 15; + */ + @java.lang.Override + public com.google.type.ColorOrBuilder getBackgroundColorOrBuilder() { + return backgroundColor_ == null + ? com.google.type.Color.getDefaultInstance() + : backgroundColor_; } private byte memoizedIsInitialized = -1; @@ -17157,8 +17729,50 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < cells_.size(); i++) { - output.writeMessage(1, cells_.get(i)); + if (fontSize_ != 0) { + output.writeInt32(1, fontSize_); + } + if (java.lang.Double.doubleToRawLongBits(pixelFontSize_) != 0) { + output.writeDouble(2, pixelFontSize_); + } + if (java.lang.Double.doubleToRawLongBits(letterSpacing_) != 0) { + output.writeDouble(3, letterSpacing_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fontType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, fontType_); + } + if (bold_ != false) { + output.writeBool(5, bold_); + } + if (italic_ != false) { + output.writeBool(6, italic_); + } + if (underlined_ != false) { + output.writeBool(7, underlined_); + } + if (strikeout_ != false) { + output.writeBool(8, strikeout_); + } + if (subscript_ != false) { + output.writeBool(9, subscript_); + } + if (superscript_ != false) { + output.writeBool(10, superscript_); + } + if (smallcaps_ != false) { + output.writeBool(11, smallcaps_); + } + if (fontWeight_ != 0) { + output.writeInt32(12, fontWeight_); + } + if (handwritten_ != false) { + output.writeBool(13, handwritten_); + } + if (textColor_ != null) { + output.writeMessage(14, getTextColor()); + } + if (backgroundColor_ != null) { + output.writeMessage(15, getBackgroundColor()); } getUnknownFields().writeTo(output); } @@ -17169,8 +17783,51 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - for (int i = 0; i < cells_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, cells_.get(i)); + if (fontSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, fontSize_); + } + if (java.lang.Double.doubleToRawLongBits(pixelFontSize_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, pixelFontSize_); + } + if (java.lang.Double.doubleToRawLongBits(letterSpacing_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(3, letterSpacing_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fontType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, fontType_); + } + if (bold_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, bold_); + } + if (italic_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, italic_); + } + if (underlined_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, underlined_); + } + if (strikeout_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(8, strikeout_); + } + if (subscript_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(9, subscript_); + } + if (superscript_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(10, superscript_); + } + if (smallcaps_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(11, smallcaps_); + } + if (fontWeight_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(12, fontWeight_); + } + if (handwritten_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(13, handwritten_); + } + if (textColor_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getTextColor()); + } + if (backgroundColor_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(15, getBackgroundColor()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -17182,13 +17839,35 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow)) { + if (!(obj instanceof com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo)) { return super.equals(obj); } - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow other = - (com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow) obj; - - if (!getCellsList().equals(other.getCellsList())) return false; + com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo other = + (com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo) obj; + + if (getFontSize() != other.getFontSize()) return false; + if (java.lang.Double.doubleToLongBits(getPixelFontSize()) + != java.lang.Double.doubleToLongBits(other.getPixelFontSize())) return false; + if (java.lang.Double.doubleToLongBits(getLetterSpacing()) + != java.lang.Double.doubleToLongBits(other.getLetterSpacing())) return false; + if (!getFontType().equals(other.getFontType())) return false; + if (getBold() != other.getBold()) return false; + if (getItalic() != other.getItalic()) return false; + if (getUnderlined() != other.getUnderlined()) return false; + if (getStrikeout() != other.getStrikeout()) return false; + if (getSubscript() != other.getSubscript()) return false; + if (getSuperscript() != other.getSuperscript()) return false; + if (getSmallcaps() != other.getSmallcaps()) return false; + if (getFontWeight() != other.getFontWeight()) return false; + if (getHandwritten() != other.getHandwritten()) return false; + if (hasTextColor() != other.hasTextColor()) return false; + if (hasTextColor()) { + if (!getTextColor().equals(other.getTextColor())) return false; + } + if (hasBackgroundColor() != other.hasBackgroundColor()) return false; + if (hasBackgroundColor()) { + if (!getBackgroundColor().equals(other.getBackgroundColor())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -17200,69 +17879,105 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (getCellsCount() > 0) { - hash = (37 * hash) + CELLS_FIELD_NUMBER; - hash = (53 * hash) + getCellsList().hashCode(); + hash = (37 * hash) + FONT_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getFontSize(); + hash = (37 * hash) + PIXEL_FONT_SIZE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getPixelFontSize())); + hash = (37 * hash) + LETTER_SPACING_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getLetterSpacing())); + hash = (37 * hash) + FONT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getFontType().hashCode(); + hash = (37 * hash) + BOLD_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getBold()); + hash = (37 * hash) + ITALIC_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getItalic()); + hash = (37 * hash) + UNDERLINED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getUnderlined()); + hash = (37 * hash) + STRIKEOUT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getStrikeout()); + hash = (37 * hash) + SUBSCRIPT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSubscript()); + hash = (37 * hash) + SUPERSCRIPT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSuperscript()); + hash = (37 * hash) + SMALLCAPS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSmallcaps()); + hash = (37 * hash) + FONT_WEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getFontWeight(); + hash = (37 * hash) + HANDWRITTEN_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getHandwritten()); + if (hasTextColor()) { + hash = (37 * hash) + TEXT_COLOR_FIELD_NUMBER; + hash = (53 * hash) + getTextColor().hashCode(); + } + if (hasBackgroundColor()) { + hash = (37 * hash) + BACKGROUND_COLOR_FIELD_NUMBER; + hash = (53 * hash) + getBackgroundColor().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo 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.v1beta2.Document.Page.Table.TableRow parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo 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.v1beta2.Document.Page.Table.TableRow parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo parseFrom( byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo 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.v1beta2.Document.Page.Table.TableRow + public static com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow + public static com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -17271,12 +17986,12 @@ public static com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow p PARSER, input, extensionRegistry); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -17294,7 +18009,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow prototype) { + com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -17313,33 +18028,34 @@ protected Builder newBuilderForType( * * *
-         * A row of table cells.
+         * Font and other text style attributes.
          * 
* - * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.Table.TableRow} + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.Page.Table.TableRow) - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRowOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo) + com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfoOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_Table_TableRow_descriptor; + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Token_StyleInfo_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_Table_TableRow_fieldAccessorTable + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Token_StyleInfo_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.class, - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.Builder.class); + com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo.class, + com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo.Builder + .class); } // Construct using - // com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.newBuilder() + // com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { @@ -17350,32 +18066,48 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { public Builder clear() { super.clear(); bitField0_ = 0; - if (cellsBuilder_ == null) { - cells_ = java.util.Collections.emptyList(); - } else { - cells_ = null; - cellsBuilder_.clear(); + fontSize_ = 0; + pixelFontSize_ = 0D; + letterSpacing_ = 0D; + fontType_ = ""; + bold_ = false; + italic_ = false; + underlined_ = false; + strikeout_ = false; + subscript_ = false; + superscript_ = false; + smallcaps_ = false; + fontWeight_ = 0; + handwritten_ = false; + textColor_ = null; + if (textColorBuilder_ != null) { + textColorBuilder_.dispose(); + textColorBuilder_ = null; + } + backgroundColor_ = null; + if (backgroundColorBuilder_ != null) { + backgroundColorBuilder_.dispose(); + backgroundColorBuilder_ = null; } - bitField0_ = (bitField0_ & ~0x00000001); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_Table_TableRow_descriptor; + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Token_StyleInfo_descriptor; } @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow + public com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo getDefaultInstanceForType() { - return com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow + return com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo .getDefaultInstance(); } @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow build() { - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow result = + public com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo build() { + com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); @@ -17384,10 +18116,9 @@ public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow build() } @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow buildPartial() { - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow result = - new com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow(this); - buildPartialRepeatedFields(result); + public com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo buildPartial() { + com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo result = + new com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo(this); if (bitField0_ != 0) { buildPartial0(result); } @@ -17395,22 +18126,58 @@ public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow buildPar return result; } - private void buildPartialRepeatedFields( - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow result) { - if (cellsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - cells_ = java.util.Collections.unmodifiableList(cells_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.cells_ = cells_; - } else { - result.cells_ = cellsBuilder_.build(); - } - } - private void buildPartial0( - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow result) { + com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo result) { int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.fontSize_ = fontSize_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pixelFontSize_ = pixelFontSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.letterSpacing_ = letterSpacing_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.fontType_ = fontType_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.bold_ = bold_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.italic_ = italic_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.underlined_ = underlined_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.strikeout_ = strikeout_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.subscript_ = subscript_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.superscript_ = superscript_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.smallcaps_ = smallcaps_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.fontWeight_ = fontWeight_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.handwritten_ = handwritten_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.textColor_ = + textColorBuilder_ == null ? textColor_ : textColorBuilder_.build(); + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.backgroundColor_ = + backgroundColorBuilder_ == null + ? backgroundColor_ + : backgroundColorBuilder_.build(); + } } @java.lang.Override @@ -17450,9 +18217,10 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow) { + if (other + instanceof com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo) { return mergeFrom( - (com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow) other); + (com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo) other); } else { super.mergeFrom(other); return this; @@ -17460,36 +18228,56 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom( - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow other) { + com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo other) { if (other - == com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow + == com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo .getDefaultInstance()) return this; - if (cellsBuilder_ == null) { - if (!other.cells_.isEmpty()) { - if (cells_.isEmpty()) { - cells_ = other.cells_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureCellsIsMutable(); - cells_.addAll(other.cells_); - } - onChanged(); - } - } else { - if (!other.cells_.isEmpty()) { - if (cellsBuilder_.isEmpty()) { - cellsBuilder_.dispose(); - cellsBuilder_ = null; - cells_ = other.cells_; - bitField0_ = (bitField0_ & ~0x00000001); - cellsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getCellsFieldBuilder() - : null; - } else { - cellsBuilder_.addAllMessages(other.cells_); - } - } + if (other.getFontSize() != 0) { + setFontSize(other.getFontSize()); + } + if (other.getPixelFontSize() != 0D) { + setPixelFontSize(other.getPixelFontSize()); + } + if (other.getLetterSpacing() != 0D) { + setLetterSpacing(other.getLetterSpacing()); + } + if (!other.getFontType().isEmpty()) { + fontType_ = other.fontType_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.getBold() != false) { + setBold(other.getBold()); + } + if (other.getItalic() != false) { + setItalic(other.getItalic()); + } + if (other.getUnderlined() != false) { + setUnderlined(other.getUnderlined()); + } + if (other.getStrikeout() != false) { + setStrikeout(other.getStrikeout()); + } + if (other.getSubscript() != false) { + setSubscript(other.getSubscript()); + } + if (other.getSuperscript() != false) { + setSuperscript(other.getSuperscript()); + } + if (other.getSmallcaps() != false) { + setSmallcaps(other.getSmallcaps()); + } + if (other.getFontWeight() != 0) { + setFontWeight(other.getFontWeight()); + } + if (other.getHandwritten() != false) { + setHandwritten(other.getHandwritten()); + } + if (other.hasTextColor()) { + mergeTextColor(other.getTextColor()); + } + if (other.hasBackgroundColor()) { + mergeBackgroundColor(other.getBackgroundColor()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -17517,21 +18305,97 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: + case 8: { - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell m = - input.readMessage( - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell - .parser(), - extensionRegistry); - if (cellsBuilder_ == null) { - ensureCellsIsMutable(); - cells_.add(m); - } else { - cellsBuilder_.addMessage(m); - } + fontSize_ = input.readInt32(); + bitField0_ |= 0x00000001; break; - } // case 10 + } // case 8 + case 17: + { + pixelFontSize_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 17 + case 25: + { + letterSpacing_ = input.readDouble(); + bitField0_ |= 0x00000004; + break; + } // case 25 + case 34: + { + fontType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: + { + bold_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: + { + italic_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 56: + { + underlined_ = input.readBool(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 64: + { + strikeout_ = input.readBool(); + bitField0_ |= 0x00000080; + break; + } // case 64 + case 72: + { + subscript_ = input.readBool(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 80: + { + superscript_ = input.readBool(); + bitField0_ |= 0x00000200; + break; + } // case 80 + case 88: + { + smallcaps_ = input.readBool(); + bitField0_ |= 0x00000400; + break; + } // case 88 + case 96: + { + fontWeight_ = input.readInt32(); + bitField0_ |= 0x00000800; + break; + } // case 96 + case 104: + { + handwritten_ = input.readBool(); + bitField0_ |= 0x00001000; + break; + } // case 104 + case 114: + { + input.readMessage(getTextColorFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00002000; + break; + } // case 114 + case 122: + { + input.readMessage( + getBackgroundColorFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00004000; + break; + } // case 122 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -17551,2322 +18415,3565 @@ public Builder mergeFrom( private int bitField0_; - private java.util.List - cells_ = java.util.Collections.emptyList(); - - private void ensureCellsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - cells_ = - new java.util.ArrayList< - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell>(cells_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell, - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCellOrBuilder> - cellsBuilder_; - + private int fontSize_; /** * * *
-           * Cells that make up this row.
+           * Font size in points (`1` point is `¹⁄₇₂` inches).
            * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; - * + * int32 font_size = 1; + * + * @return The fontSize. */ - public java.util.List - getCellsList() { - if (cellsBuilder_ == null) { - return java.util.Collections.unmodifiableList(cells_); - } else { - return cellsBuilder_.getMessageList(); - } + @java.lang.Override + public int getFontSize() { + return fontSize_; } /** * * *
-           * Cells that make up this row.
+           * Font size in points (`1` point is `¹⁄₇₂` inches).
            * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; - * + * int32 font_size = 1; + * + * @param value The fontSize to set. + * @return This builder for chaining. */ - public int getCellsCount() { - if (cellsBuilder_ == null) { - return cells_.size(); - } else { - return cellsBuilder_.getCount(); - } + public Builder setFontSize(int value) { + + fontSize_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; } /** * * *
-           * Cells that make up this row.
+           * Font size in points (`1` point is `¹⁄₇₂` inches).
            * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; - * + * int32 font_size = 1; + * + * @return This builder for chaining. */ - public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell getCells( - int index) { - if (cellsBuilder_ == null) { - return cells_.get(index); - } else { - return cellsBuilder_.getMessage(index); - } + public Builder clearFontSize() { + bitField0_ = (bitField0_ & ~0x00000001); + fontSize_ = 0; + onChanged(); + return this; } + + private double pixelFontSize_; /** * * *
-           * Cells that make up this row.
+           * Font size in pixels, equal to _unrounded
+           * [font_size][google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo.font_size]_
+           * * _resolution_ ÷ `72.0`.
            * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; - * + * double pixel_font_size = 2; + * + * @return The pixelFontSize. */ - public Builder setCells( - int index, com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell value) { - if (cellsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCellsIsMutable(); - cells_.set(index, value); - onChanged(); - } else { - cellsBuilder_.setMessage(index, value); - } - return this; + @java.lang.Override + public double getPixelFontSize() { + return pixelFontSize_; } /** * * *
-           * Cells that make up this row.
+           * Font size in pixels, equal to _unrounded
+           * [font_size][google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo.font_size]_
+           * * _resolution_ ÷ `72.0`.
            * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; - * + * double pixel_font_size = 2; + * + * @param value The pixelFontSize to set. + * @return This builder for chaining. */ - public Builder setCells( - int index, - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell.Builder - builderForValue) { - if (cellsBuilder_ == null) { - ensureCellsIsMutable(); - cells_.set(index, builderForValue.build()); - onChanged(); - } else { - cellsBuilder_.setMessage(index, builderForValue.build()); - } + public Builder setPixelFontSize(double value) { + + pixelFontSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); return this; } /** * * *
-           * Cells that make up this row.
+           * Font size in pixels, equal to _unrounded
+           * [font_size][google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo.font_size]_
+           * * _resolution_ ÷ `72.0`.
            * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; - * + * double pixel_font_size = 2; + * + * @return This builder for chaining. */ - public Builder addCells( - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell value) { - if (cellsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCellsIsMutable(); - cells_.add(value); - onChanged(); - } else { - cellsBuilder_.addMessage(value); - } + public Builder clearPixelFontSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pixelFontSize_ = 0D; + onChanged(); return this; } + + private double letterSpacing_; /** * * *
-           * Cells that make up this row.
+           * Letter spacing in points.
            * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; - * + * double letter_spacing = 3; + * + * @return The letterSpacing. */ - public Builder addCells( - int index, com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell value) { - if (cellsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCellsIsMutable(); - cells_.add(index, value); - onChanged(); - } else { - cellsBuilder_.addMessage(index, value); - } - return this; + @java.lang.Override + public double getLetterSpacing() { + return letterSpacing_; } /** * * *
-           * Cells that make up this row.
+           * Letter spacing in points.
            * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; - * + * double letter_spacing = 3; + * + * @param value The letterSpacing to set. + * @return This builder for chaining. */ - public Builder addCells( - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell.Builder - builderForValue) { - if (cellsBuilder_ == null) { - ensureCellsIsMutable(); - cells_.add(builderForValue.build()); - onChanged(); - } else { - cellsBuilder_.addMessage(builderForValue.build()); - } + public Builder setLetterSpacing(double value) { + + letterSpacing_ = value; + bitField0_ |= 0x00000004; + onChanged(); return this; } /** * * *
-           * Cells that make up this row.
+           * Letter spacing in points.
            * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; - * + * double letter_spacing = 3; + * + * @return This builder for chaining. */ - public Builder addCells( - int index, - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell.Builder - builderForValue) { - if (cellsBuilder_ == null) { - ensureCellsIsMutable(); - cells_.add(index, builderForValue.build()); - onChanged(); - } else { - cellsBuilder_.addMessage(index, builderForValue.build()); - } + public Builder clearLetterSpacing() { + bitField0_ = (bitField0_ & ~0x00000004); + letterSpacing_ = 0D; + onChanged(); return this; } + + private java.lang.Object fontType_ = ""; /** * * *
-           * Cells that make up this row.
+           * Name or style of the font.
            * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; - * + * string font_type = 4; + * + * @return The fontType. */ - public Builder addAllCells( - java.lang.Iterable< - ? extends com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell> - values) { - if (cellsBuilder_ == null) { - ensureCellsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, cells_); - onChanged(); + public java.lang.String getFontType() { + java.lang.Object ref = fontType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fontType_ = s; + return s; } else { - cellsBuilder_.addAllMessages(values); + return (java.lang.String) ref; } - return this; } /** * * *
-           * Cells that make up this row.
+           * Name or style of the font.
            * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; - * + * string font_type = 4; + * + * @return The bytes for fontType. */ - public Builder clearCells() { - if (cellsBuilder_ == null) { - cells_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); + public com.google.protobuf.ByteString getFontTypeBytes() { + java.lang.Object ref = fontType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fontType_ = b; + return b; } else { - cellsBuilder_.clear(); + return (com.google.protobuf.ByteString) ref; } - return this; } /** * * *
-           * Cells that make up this row.
+           * Name or style of the font.
            * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; - * + * string font_type = 4; + * + * @param value The fontType to set. + * @return This builder for chaining. */ - public Builder removeCells(int index) { - if (cellsBuilder_ == null) { - ensureCellsIsMutable(); - cells_.remove(index); - onChanged(); - } else { - cellsBuilder_.remove(index); + public Builder setFontType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } + fontType_ = value; + bitField0_ |= 0x00000008; + onChanged(); return this; } /** * * *
-           * Cells that make up this row.
+           * Name or style of the font.
            * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; - * + * string font_type = 4; + * + * @return This builder for chaining. */ - public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell.Builder - getCellsBuilder(int index) { - return getCellsFieldBuilder().getBuilder(index); + public Builder clearFontType() { + fontType_ = getDefaultInstance().getFontType(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; } /** * * *
-           * Cells that make up this row.
+           * Name or style of the font.
            * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; - * + * string font_type = 4; + * + * @param value The bytes for fontType to set. + * @return This builder for chaining. */ - public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCellOrBuilder - getCellsOrBuilder(int index) { - if (cellsBuilder_ == null) { - return cells_.get(index); - } else { - return cellsBuilder_.getMessageOrBuilder(index); + public Builder setFontTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } + checkByteStringIsUtf8(value); + fontType_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; } + + private boolean bold_; /** * * *
-           * Cells that make up this row.
+           * Whether the text is bold (equivalent to
+           * [font_weight][google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo.font_weight]
+           * is at least `700`).
            * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; - * + * bool bold = 5; + * + * @return The bold. */ - public java.util.List< - ? extends - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCellOrBuilder> - getCellsOrBuilderList() { - if (cellsBuilder_ != null) { - return cellsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(cells_); - } + @java.lang.Override + public boolean getBold() { + return bold_; } /** * * *
-           * Cells that make up this row.
+           * Whether the text is bold (equivalent to
+           * [font_weight][google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo.font_weight]
+           * is at least `700`).
            * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; - * + * bool bold = 5; + * + * @param value The bold to set. + * @return This builder for chaining. */ - public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell.Builder - addCellsBuilder() { - return getCellsFieldBuilder() - .addBuilder( - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell - .getDefaultInstance()); + public Builder setBold(boolean value) { + + bold_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; } /** * * *
-           * Cells that make up this row.
+           * Whether the text is bold (equivalent to
+           * [font_weight][google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo.font_weight]
+           * is at least `700`).
            * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; - * + * bool bold = 5; + * + * @return This builder for chaining. */ - public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell.Builder - addCellsBuilder(int index) { - return getCellsFieldBuilder() - .addBuilder( - index, - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell - .getDefaultInstance()); + public Builder clearBold() { + bitField0_ = (bitField0_ & ~0x00000010); + bold_ = false; + onChanged(); + return this; } + + private boolean italic_; /** * * *
-           * Cells that make up this row.
+           * Whether the text is italic.
            * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; - * + * bool italic = 6; + * + * @return The italic. */ - public java.util.List< - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell.Builder> - getCellsBuilderList() { - return getCellsFieldBuilder().getBuilderList(); + @java.lang.Override + public boolean getItalic() { + return italic_; } + /** + * + * + *
+           * Whether the text is italic.
+           * 
+ * + * bool italic = 6; + * + * @param value The italic to set. + * @return This builder for chaining. + */ + public Builder setItalic(boolean value) { - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell, - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCellOrBuilder> - getCellsFieldBuilder() { - if (cellsBuilder_ == null) { - cellsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell, - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCellOrBuilder>( - cells_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - cells_ = null; - } - return cellsBuilder_; + italic_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+           * Whether the text is italic.
+           * 
+ * + * bool italic = 6; + * + * @return This builder for chaining. + */ + public Builder clearItalic() { + bitField0_ = (bitField0_ & ~0x00000020); + italic_ = false; + onChanged(); + return this; } + private boolean underlined_; + /** + * + * + *
+           * Whether the text is underlined.
+           * 
+ * + * bool underlined = 7; + * + * @return The underlined. + */ @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + public boolean getUnderlined() { + return underlined_; + } + /** + * + * + *
+           * Whether the text is underlined.
+           * 
+ * + * bool underlined = 7; + * + * @param value The underlined to set. + * @return This builder for chaining. + */ + public Builder setUnderlined(boolean value) { + + underlined_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+           * Whether the text is underlined.
+           * 
+ * + * bool underlined = 7; + * + * @return This builder for chaining. + */ + public Builder clearUnderlined() { + bitField0_ = (bitField0_ & ~0x00000040); + underlined_ = false; + onChanged(); + return this; } + private boolean strikeout_; + /** + * + * + *
+           * Whether the text is strikethrough.
+           * 
+ * + * bool strikeout = 8; + * + * @return The strikeout. + */ @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + public boolean getStrikeout() { + return strikeout_; } + /** + * + * + *
+           * Whether the text is strikethrough.
+           * 
+ * + * bool strikeout = 8; + * + * @param value The strikeout to set. + * @return This builder for chaining. + */ + public Builder setStrikeout(boolean value) { - // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta2.Document.Page.Table.TableRow) - } + strikeout_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+           * Whether the text is strikethrough.
+           * 
+ * + * bool strikeout = 8; + * + * @return This builder for chaining. + */ + public Builder clearStrikeout() { + bitField0_ = (bitField0_ & ~0x00000080); + strikeout_ = false; + onChanged(); + return this; + } - // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.Page.Table.TableRow) - private static final com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow - DEFAULT_INSTANCE; + private boolean subscript_; + /** + * + * + *
+           * Whether the text is a subscript.
+           * 
+ * + * bool subscript = 9; + * + * @return The subscript. + */ + @java.lang.Override + public boolean getSubscript() { + return subscript_; + } + /** + * + * + *
+           * Whether the text is a subscript.
+           * 
+ * + * bool subscript = 9; + * + * @param value The subscript to set. + * @return This builder for chaining. + */ + public Builder setSubscript(boolean value) { - static { - DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow(); - } + subscript_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+           * Whether the text is a subscript.
+           * 
+ * + * bool subscript = 9; + * + * @return This builder for chaining. + */ + public Builder clearSubscript() { + bitField0_ = (bitField0_ & ~0x00000100); + subscript_ = false; + onChanged(); + return this; + } - public static com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow - getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private boolean superscript_; + /** + * + * + *
+           * Whether the text is a superscript.
+           * 
+ * + * bool superscript = 10; + * + * @return The superscript. + */ + @java.lang.Override + public boolean getSuperscript() { + return superscript_; + } + /** + * + * + *
+           * Whether the text is a superscript.
+           * 
+ * + * bool superscript = 10; + * + * @param value The superscript to set. + * @return This builder for chaining. + */ + public Builder setSuperscript(boolean value) { - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TableRow parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + superscript_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+           * Whether the text is a superscript.
+           * 
+ * + * bool superscript = 10; + * + * @return This builder for chaining. + */ + public Builder clearSuperscript() { + bitField0_ = (bitField0_ & ~0x00000200); + superscript_ = false; + onChanged(); + return this; + } - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private boolean smallcaps_; + /** + * + * + *
+           * Whether the text is in small caps.
+           * 
+ * + * bool smallcaps = 11; + * + * @return The smallcaps. + */ + @java.lang.Override + public boolean getSmallcaps() { + return smallcaps_; + } + /** + * + * + *
+           * Whether the text is in small caps.
+           * 
+ * + * bool smallcaps = 11; + * + * @param value The smallcaps to set. + * @return This builder for chaining. + */ + public Builder setSmallcaps(boolean value) { - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + smallcaps_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+           * Whether the text is in small caps.
+           * 
+ * + * bool smallcaps = 11; + * + * @return This builder for chaining. + */ + public Builder clearSmallcaps() { + bitField0_ = (bitField0_ & ~0x00000400); + smallcaps_ = false; + onChanged(); + return this; + } - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } + private int fontWeight_; + /** + * + * + *
+           * TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy).
+           * Normal is `400`, bold is `700`.
+           * 
+ * + * int32 font_weight = 12; + * + * @return The fontWeight. + */ + @java.lang.Override + public int getFontWeight() { + return fontWeight_; + } + /** + * + * + *
+           * TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy).
+           * Normal is `400`, bold is `700`.
+           * 
+ * + * int32 font_weight = 12; + * + * @param value The fontWeight to set. + * @return This builder for chaining. + */ + public Builder setFontWeight(int value) { - public interface TableCellOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.Page.Table.TableCell) - com.google.protobuf.MessageOrBuilder { + fontWeight_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+           * TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy).
+           * Normal is `400`, bold is `700`.
+           * 
+ * + * int32 font_weight = 12; + * + * @return This builder for chaining. + */ + public Builder clearFontWeight() { + bitField0_ = (bitField0_ & ~0x00000800); + fontWeight_ = 0; + onChanged(); + return this; + } - /** - * - * - *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [TableCell][google.cloud.documentai.v1beta2.Document.Page.Table.TableCell].
-         * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; - * - * @return Whether the layout field is set. - */ - boolean hasLayout(); - /** - * - * - *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [TableCell][google.cloud.documentai.v1beta2.Document.Page.Table.TableCell].
-         * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; - * - * @return The layout. - */ - com.google.cloud.documentai.v1beta2.Document.Page.Layout getLayout(); - /** - * - * - *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [TableCell][google.cloud.documentai.v1beta2.Document.Page.Table.TableCell].
-         * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; - */ - com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder getLayoutOrBuilder(); + private boolean handwritten_; + /** + * + * + *
+           * Whether the text is handwritten.
+           * 
+ * + * bool handwritten = 13; + * + * @return The handwritten. + */ + @java.lang.Override + public boolean getHandwritten() { + return handwritten_; + } + /** + * + * + *
+           * Whether the text is handwritten.
+           * 
+ * + * bool handwritten = 13; + * + * @param value The handwritten to set. + * @return This builder for chaining. + */ + public Builder setHandwritten(boolean value) { - /** - * - * - *
-         * How many rows this cell spans.
-         * 
- * - * int32 row_span = 2; - * - * @return The rowSpan. - */ - int getRowSpan(); + handwritten_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+           * Whether the text is handwritten.
+           * 
+ * + * bool handwritten = 13; + * + * @return This builder for chaining. + */ + public Builder clearHandwritten() { + bitField0_ = (bitField0_ & ~0x00001000); + handwritten_ = false; + onChanged(); + return this; + } - /** - * - * - *
-         * How many columns this cell spans.
-         * 
- * - * int32 col_span = 3; - * - * @return The colSpan. - */ - int getColSpan(); + private com.google.type.Color textColor_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Color, + com.google.type.Color.Builder, + com.google.type.ColorOrBuilder> + textColorBuilder_; + /** + * + * + *
+           * Color of the text.
+           * 
+ * + * .google.type.Color text_color = 14; + * + * @return Whether the textColor field is set. + */ + public boolean hasTextColor() { + return ((bitField0_ & 0x00002000) != 0); + } + /** + * + * + *
+           * Color of the text.
+           * 
+ * + * .google.type.Color text_color = 14; + * + * @return The textColor. + */ + public com.google.type.Color getTextColor() { + if (textColorBuilder_ == null) { + return textColor_ == null ? com.google.type.Color.getDefaultInstance() : textColor_; + } else { + return textColorBuilder_.getMessage(); + } + } + /** + * + * + *
+           * Color of the text.
+           * 
+ * + * .google.type.Color text_color = 14; + */ + public Builder setTextColor(com.google.type.Color value) { + if (textColorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + textColor_ = value; + } else { + textColorBuilder_.setMessage(value); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+           * Color of the text.
+           * 
+ * + * .google.type.Color text_color = 14; + */ + public Builder setTextColor(com.google.type.Color.Builder builderForValue) { + if (textColorBuilder_ == null) { + textColor_ = builderForValue.build(); + } else { + textColorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+           * Color of the text.
+           * 
+ * + * .google.type.Color text_color = 14; + */ + public Builder mergeTextColor(com.google.type.Color value) { + if (textColorBuilder_ == null) { + if (((bitField0_ & 0x00002000) != 0) + && textColor_ != null + && textColor_ != com.google.type.Color.getDefaultInstance()) { + getTextColorBuilder().mergeFrom(value); + } else { + textColor_ = value; + } + } else { + textColorBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+           * Color of the text.
+           * 
+ * + * .google.type.Color text_color = 14; + */ + public Builder clearTextColor() { + bitField0_ = (bitField0_ & ~0x00002000); + textColor_ = null; + if (textColorBuilder_ != null) { + textColorBuilder_.dispose(); + textColorBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+           * Color of the text.
+           * 
+ * + * .google.type.Color text_color = 14; + */ + public com.google.type.Color.Builder getTextColorBuilder() { + bitField0_ |= 0x00002000; + onChanged(); + return getTextColorFieldBuilder().getBuilder(); + } + /** + * + * + *
+           * Color of the text.
+           * 
+ * + * .google.type.Color text_color = 14; + */ + public com.google.type.ColorOrBuilder getTextColorOrBuilder() { + if (textColorBuilder_ != null) { + return textColorBuilder_.getMessageOrBuilder(); + } else { + return textColor_ == null ? com.google.type.Color.getDefaultInstance() : textColor_; + } + } + /** + * + * + *
+           * Color of the text.
+           * 
+ * + * .google.type.Color text_color = 14; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Color, + com.google.type.Color.Builder, + com.google.type.ColorOrBuilder> + getTextColorFieldBuilder() { + if (textColorBuilder_ == null) { + textColorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Color, + com.google.type.Color.Builder, + com.google.type.ColorOrBuilder>( + getTextColor(), getParentForChildren(), isClean()); + textColor_ = null; + } + return textColorBuilder_; + } - /** - * - * - *
-         * A list of detected languages together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * - */ - java.util.List - getDetectedLanguagesList(); - /** - * - * - *
-         * A list of detected languages together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * - */ - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage getDetectedLanguages( - int index); - /** - * - * - *
-         * A list of detected languages together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * - */ - int getDetectedLanguagesCount(); - /** - * - * - *
-         * A list of detected languages together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * - */ - java.util.List< - ? extends - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> - getDetectedLanguagesOrBuilderList(); - /** - * - * - *
-         * A list of detected languages together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * - */ - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder - getDetectedLanguagesOrBuilder(int index); - } - /** - * - * - *
-       * A cell representation inside the table.
-       * 
- * - * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.Table.TableCell} - */ - public static final class TableCell extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.Page.Table.TableCell) - TableCellOrBuilder { - private static final long serialVersionUID = 0L; - // Use TableCell.newBuilder() to construct. - private TableCell(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } + 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_; + /** + * + * + *
+           * Color of the background.
+           * 
+ * + * .google.type.Color background_color = 15; + * + * @return Whether the backgroundColor field is set. + */ + public boolean hasBackgroundColor() { + return ((bitField0_ & 0x00004000) != 0); + } + /** + * + * + *
+           * Color of the background.
+           * 
+ * + * .google.type.Color background_color = 15; + * + * @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(); + } + } + /** + * + * + *
+           * Color of the background.
+           * 
+ * + * .google.type.Color background_color = 15; + */ + public Builder setBackgroundColor(com.google.type.Color value) { + if (backgroundColorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + backgroundColor_ = value; + } else { + backgroundColorBuilder_.setMessage(value); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+           * Color of the background.
+           * 
+ * + * .google.type.Color background_color = 15; + */ + public Builder setBackgroundColor(com.google.type.Color.Builder builderForValue) { + if (backgroundColorBuilder_ == null) { + backgroundColor_ = builderForValue.build(); + } else { + backgroundColorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+           * Color of the background.
+           * 
+ * + * .google.type.Color background_color = 15; + */ + public Builder mergeBackgroundColor(com.google.type.Color value) { + if (backgroundColorBuilder_ == null) { + if (((bitField0_ & 0x00004000) != 0) + && backgroundColor_ != null + && backgroundColor_ != com.google.type.Color.getDefaultInstance()) { + getBackgroundColorBuilder().mergeFrom(value); + } else { + backgroundColor_ = value; + } + } else { + backgroundColorBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+           * Color of the background.
+           * 
+ * + * .google.type.Color background_color = 15; + */ + public Builder clearBackgroundColor() { + bitField0_ = (bitField0_ & ~0x00004000); + backgroundColor_ = null; + if (backgroundColorBuilder_ != null) { + backgroundColorBuilder_.dispose(); + backgroundColorBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+           * Color of the background.
+           * 
+ * + * .google.type.Color background_color = 15; + */ + public com.google.type.Color.Builder getBackgroundColorBuilder() { + bitField0_ |= 0x00004000; + onChanged(); + return getBackgroundColorFieldBuilder().getBuilder(); + } + /** + * + * + *
+           * Color of the background.
+           * 
+ * + * .google.type.Color background_color = 15; + */ + public com.google.type.ColorOrBuilder getBackgroundColorOrBuilder() { + if (backgroundColorBuilder_ != null) { + return backgroundColorBuilder_.getMessageOrBuilder(); + } else { + return backgroundColor_ == null + ? com.google.type.Color.getDefaultInstance() + : backgroundColor_; + } + } + /** + * + * + *
+           * Color of the background.
+           * 
+ * + * .google.type.Color background_color = 15; + */ + 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 TableCell() { - detectedLanguages_ = java.util.Collections.emptyList(); - } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new TableCell(); + @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.v1beta2.Document.Page.Token.StyleInfo) } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_Table_TableCell_descriptor; + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo) + private static final com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo(); } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_Table_TableCell_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell.class, - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell.Builder.class); + public static com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo + getDefaultInstance() { + return DEFAULT_INSTANCE; } - public static final int LAYOUT_FIELD_NUMBER = 1; - private com.google.cloud.documentai.v1beta2.Document.Page.Layout layout_; - /** - * - * - *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [TableCell][google.cloud.documentai.v1beta2.Document.Page.Table.TableCell].
-         * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; - * - * @return Whether the layout field is set. - */ - @java.lang.Override - public boolean hasLayout() { - return layout_ != null; + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StyleInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; } - /** - * - * - *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [TableCell][google.cloud.documentai.v1beta2.Document.Page.Table.TableCell].
-         * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; - * - * @return The layout. - */ + @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Layout getLayout() { - return layout_ == null - ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() - : layout_; + public com.google.protobuf.Parser getParserForType() { + return PARSER; } - /** - * - * - *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [TableCell][google.cloud.documentai.v1beta2.Document.Page.Table.TableCell].
-         * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; - */ + @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder - getLayoutOrBuilder() { - return layout_ == null - ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() - : layout_; + public com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } + } - public static final int ROW_SPAN_FIELD_NUMBER = 2; - private int rowSpan_ = 0; - /** - * - * - *
-         * How many rows this cell spans.
-         * 
- * - * int32 row_span = 2; - * - * @return The rowSpan. - */ - @java.lang.Override - public int getRowSpan() { - return rowSpan_; - } + public static final int LAYOUT_FIELD_NUMBER = 1; + private com.google.cloud.documentai.v1beta2.Document.Page.Layout layout_; + /** + * + * + *
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+       * [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * + * @return Whether the layout field is set. + */ + @java.lang.Override + public boolean hasLayout() { + return layout_ != null; + } + /** + * + * + *
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+       * [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * + * @return The layout. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Layout getLayout() { + return layout_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() + : layout_; + } + /** + * + * + *
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+       * [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder + getLayoutOrBuilder() { + return layout_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() + : layout_; + } - public static final int COL_SPAN_FIELD_NUMBER = 3; - private int colSpan_ = 0; - /** - * - * - *
-         * How many columns this cell spans.
-         * 
- * - * int32 col_span = 3; - * - * @return The colSpan. - */ - @java.lang.Override - public int getColSpan() { - return colSpan_; - } + public static final int DETECTED_BREAK_FIELD_NUMBER = 2; + private com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak detectedBreak_; + /** + * + * + *
+       * Detected break at the end of a
+       * [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak detected_break = 2; + * + * + * @return Whether the detectedBreak field is set. + */ + @java.lang.Override + public boolean hasDetectedBreak() { + return detectedBreak_ != null; + } + /** + * + * + *
+       * Detected break at the end of a
+       * [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak detected_break = 2; + * + * + * @return The detectedBreak. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak + getDetectedBreak() { + return detectedBreak_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak + .getDefaultInstance() + : detectedBreak_; + } + /** + * + * + *
+       * Detected break at the end of a
+       * [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak detected_break = 2; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreakOrBuilder + getDetectedBreakOrBuilder() { + return detectedBreak_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak + .getDefaultInstance() + : detectedBreak_; + } - public static final int DETECTED_LANGUAGES_FIELD_NUMBER = 4; + public static final int DETECTED_LANGUAGES_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private java.util.List - detectedLanguages_; - /** - * - * - *
-         * A list of detected languages together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * - */ - @java.lang.Override - public java.util.List - getDetectedLanguagesList() { - return detectedLanguages_; + @SuppressWarnings("serial") + private java.util.List + detectedLanguages_; + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + @java.lang.Override + public java.util.List + getDetectedLanguagesList() { + return detectedLanguages_; + } + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> + getDetectedLanguagesOrBuilderList() { + return detectedLanguages_; + } + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + @java.lang.Override + public int getDetectedLanguagesCount() { + return detectedLanguages_.size(); + } + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage + getDetectedLanguages(int index) { + return detectedLanguages_.get(index); + } + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder + getDetectedLanguagesOrBuilder(int index) { + return detectedLanguages_.get(index); + } + + public static final int PROVENANCE_FIELD_NUMBER = 4; + private com.google.cloud.documentai.v1beta2.Document.Provenance provenance_; + /** + * + * + *
+       * The history of this annotation.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 4 [deprecated = true]; + * + * + * @deprecated google.cloud.documentai.v1beta2.Document.Page.Token.provenance is deprecated. + * See google/cloud/documentai/v1beta2/document.proto;l=352 + * @return Whether the provenance field is set. + */ + @java.lang.Override + @java.lang.Deprecated + public boolean hasProvenance() { + return provenance_ != null; + } + /** + * + * + *
+       * The history of this annotation.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 4 [deprecated = true]; + * + * + * @deprecated google.cloud.documentai.v1beta2.Document.Page.Token.provenance is deprecated. + * See google/cloud/documentai/v1beta2/document.proto;l=352 + * @return The provenance. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.cloud.documentai.v1beta2.Document.Provenance getProvenance() { + return provenance_ == null + ? com.google.cloud.documentai.v1beta2.Document.Provenance.getDefaultInstance() + : provenance_; + } + /** + * + * + *
+       * The history of this annotation.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 4 [deprecated = true]; + * + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder + getProvenanceOrBuilder() { + return provenance_ == null + ? com.google.cloud.documentai.v1beta2.Document.Provenance.getDefaultInstance() + : provenance_; + } + + public static final int STYLE_INFO_FIELD_NUMBER = 5; + private com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo styleInfo_; + /** + * + * + *
+       * Text style attributes.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo style_info = 5; + * + * @return Whether the styleInfo field is set. + */ + @java.lang.Override + public boolean hasStyleInfo() { + return styleInfo_ != null; + } + /** + * + * + *
+       * Text style attributes.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo style_info = 5; + * + * @return The styleInfo. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo getStyleInfo() { + return styleInfo_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo.getDefaultInstance() + : styleInfo_; + } + /** + * + * + *
+       * Text style attributes.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo style_info = 5; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfoOrBuilder + getStyleInfoOrBuilder() { + return styleInfo_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo.getDefaultInstance() + : styleInfo_; + } + + 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 (layout_ != null) { + output.writeMessage(1, getLayout()); } - /** - * - * - *
-         * A list of detected languages together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * - */ - @java.lang.Override - public java.util.List< - ? extends - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> - getDetectedLanguagesOrBuilderList() { - return detectedLanguages_; + if (detectedBreak_ != null) { + output.writeMessage(2, getDetectedBreak()); } - /** - * - * - *
-         * A list of detected languages together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * - */ - @java.lang.Override - public int getDetectedLanguagesCount() { - return detectedLanguages_.size(); + for (int i = 0; i < detectedLanguages_.size(); i++) { + output.writeMessage(3, detectedLanguages_.get(i)); } - /** - * - * - *
-         * A list of detected languages together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * - */ - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage - getDetectedLanguages(int index) { - return detectedLanguages_.get(index); + if (provenance_ != null) { + output.writeMessage(4, getProvenance()); } - /** - * - * - *
-         * A list of detected languages together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * - */ - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder - getDetectedLanguagesOrBuilder(int index) { - return detectedLanguages_.get(index); + if (styleInfo_ != null) { + output.writeMessage(5, getStyleInfo()); } + getUnknownFields().writeTo(output); + } - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - memoizedIsInitialized = 1; - return true; + size = 0; + if (layout_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getLayout()); } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (layout_ != null) { - output.writeMessage(1, getLayout()); - } - if (rowSpan_ != 0) { - output.writeInt32(2, rowSpan_); - } - if (colSpan_ != 0) { - output.writeInt32(3, colSpan_); - } - for (int i = 0; i < detectedLanguages_.size(); i++) { - output.writeMessage(4, detectedLanguages_.get(i)); - } - getUnknownFields().writeTo(output); + if (detectedBreak_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDetectedBreak()); } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (layout_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getLayout()); - } - if (rowSpan_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, rowSpan_); - } - if (colSpan_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, colSpan_); - } - for (int i = 0; i < detectedLanguages_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 4, detectedLanguages_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; + for (int i = 0; i < detectedLanguages_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, detectedLanguages_.get(i)); } + if (provenance_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getProvenance()); + } + if (styleInfo_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getStyleInfo()); + } + size += getUnknownFields().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.v1beta2.Document.Page.Table.TableCell)) { - return super.equals(obj); - } - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell other = - (com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell) obj; - - if (hasLayout() != other.hasLayout()) return false; - if (hasLayout()) { - if (!getLayout().equals(other.getLayout())) return false; - } - if (getRowSpan() != other.getRowSpan()) return false; - if (getColSpan() != other.getColSpan()) return false; - if (!getDetectedLanguagesList().equals(other.getDetectedLanguagesList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { return true; } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasLayout()) { - hash = (37 * hash) + LAYOUT_FIELD_NUMBER; - hash = (53 * hash) + getLayout().hashCode(); - } - hash = (37 * hash) + ROW_SPAN_FIELD_NUMBER; - hash = (53 * hash) + getRowSpan(); - hash = (37 * hash) + COL_SPAN_FIELD_NUMBER; - hash = (53 * hash) + getColSpan(); - if (getDetectedLanguagesCount() > 0) { - hash = (37 * hash) + DETECTED_LANGUAGES_FIELD_NUMBER; - hash = (53 * hash) + getDetectedLanguagesList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; + if (!(obj instanceof com.google.cloud.documentai.v1beta2.Document.Page.Token)) { + return super.equals(obj); } + com.google.cloud.documentai.v1beta2.Document.Page.Token other = + (com.google.cloud.documentai.v1beta2.Document.Page.Token) obj; - public static com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + if (hasLayout() != other.hasLayout()) return false; + if (hasLayout()) { + if (!getLayout().equals(other.getLayout())) return false; } - - public static com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + if (hasDetectedBreak() != other.hasDetectedBreak()) return false; + if (hasDetectedBreak()) { + if (!getDetectedBreak().equals(other.getDetectedBreak())) return false; } - - public static com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + if (!getDetectedLanguagesList().equals(other.getDetectedLanguagesList())) return false; + if (hasProvenance() != other.hasProvenance()) return false; + if (hasProvenance()) { + if (!getProvenance().equals(other.getProvenance())) return false; } - - public static com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + if (hasStyleInfo() != other.hasStyleInfo()) return false; + if (hasStyleInfo()) { + if (!getStyleInfo().equals(other.getStyleInfo())) return false; } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } - public static com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; } - - public static com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasLayout()) { + hash = (37 * hash) + LAYOUT_FIELD_NUMBER; + hash = (53 * hash) + getLayout().hashCode(); } - - public static com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + if (hasDetectedBreak()) { + hash = (37 * hash) + DETECTED_BREAK_FIELD_NUMBER; + hash = (53 * hash) + getDetectedBreak().hashCode(); } - - public static com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + if (getDetectedLanguagesCount() > 0) { + hash = (37 * hash) + DETECTED_LANGUAGES_FIELD_NUMBER; + hash = (53 * hash) + getDetectedLanguagesList().hashCode(); } - - public static com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input); + if (hasProvenance()) { + hash = (37 * hash) + PROVENANCE_FIELD_NUMBER; + hash = (53 * hash) + getProvenance().hashCode(); } - - public static com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + if (hasStyleInfo()) { + hash = (37 * hash) + STYLE_INFO_FIELD_NUMBER; + hash = (53 * hash) + getStyleInfo().hashCode(); } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } - public static com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } + public static com.google.cloud.documentai.v1beta2.Document.Page.Token parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell parseFrom( - com.google.protobuf.CodedInputStream 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.v1beta2.Document.Page.Token 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.v1beta2.Document.Page.Token parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.Token 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.v1beta2.Document.Page.Token parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.Token parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.Token parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.Token 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.v1beta2.Document.Page.Token parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.Token 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.v1beta2.Document.Page.Token parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.Token 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.v1beta2.Document.Page.Token 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 detected token.
+       * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.Token} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.Page.Token) + com.google.cloud.documentai.v1beta2.Document.Page.TokenOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Token_descriptor; } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Token_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Document.Page.Token.class, + com.google.cloud.documentai.v1beta2.Document.Page.Token.Builder.class); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); + // Construct using com.google.cloud.documentai.v1beta2.Document.Page.Token.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); } - public static Builder newBuilder( - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + layout_ = null; + if (layoutBuilder_ != null) { + layoutBuilder_.dispose(); + layoutBuilder_ = null; + } + detectedBreak_ = null; + if (detectedBreakBuilder_ != null) { + detectedBreakBuilder_.dispose(); + detectedBreakBuilder_ = null; + } + if (detectedLanguagesBuilder_ == null) { + detectedLanguages_ = java.util.Collections.emptyList(); + } else { + detectedLanguages_ = null; + detectedLanguagesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + provenance_ = null; + if (provenanceBuilder_ != null) { + provenanceBuilder_.dispose(); + provenanceBuilder_ = null; + } + styleInfo_ = null; + if (styleInfoBuilder_ != null) { + styleInfoBuilder_.dispose(); + styleInfoBuilder_ = null; + } + return this; } @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Token_descriptor; } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; + public com.google.cloud.documentai.v1beta2.Document.Page.Token getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta2.Document.Page.Token.getDefaultInstance(); } - /** - * - * - *
-         * A cell representation inside the table.
-         * 
- * - * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.Table.TableCell} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.Page.Table.TableCell) - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCellOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_Table_TableCell_descriptor; - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_Table_TableCell_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell.class, - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell.Builder - .class); + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Token build() { + com.google.cloud.documentai.v1beta2.Document.Page.Token result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); } + return result; + } - // Construct using - // com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Token buildPartial() { + com.google.cloud.documentai.v1beta2.Document.Page.Token result = + new com.google.cloud.documentai.v1beta2.Document.Page.Token(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); } + onBuilt(); + return result; + } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - layout_ = null; - if (layoutBuilder_ != null) { - layoutBuilder_.dispose(); - layoutBuilder_ = null; - } - rowSpan_ = 0; - colSpan_ = 0; - if (detectedLanguagesBuilder_ == null) { - detectedLanguages_ = java.util.Collections.emptyList(); - } else { - detectedLanguages_ = null; - detectedLanguagesBuilder_.clear(); + private void buildPartialRepeatedFields( + com.google.cloud.documentai.v1beta2.Document.Page.Token result) { + if (detectedLanguagesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + detectedLanguages_ = java.util.Collections.unmodifiableList(detectedLanguages_); + bitField0_ = (bitField0_ & ~0x00000004); } - bitField0_ = (bitField0_ & ~0x00000008); - return this; + result.detectedLanguages_ = detectedLanguages_; + } else { + result.detectedLanguages_ = detectedLanguagesBuilder_.build(); } + } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_Table_TableCell_descriptor; + private void buildPartial0(com.google.cloud.documentai.v1beta2.Document.Page.Token result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.layout_ = layoutBuilder_ == null ? layout_ : layoutBuilder_.build(); } - - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell - getDefaultInstanceForType() { - return com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell - .getDefaultInstance(); + if (((from_bitField0_ & 0x00000002) != 0)) { + result.detectedBreak_ = + detectedBreakBuilder_ == null ? detectedBreak_ : detectedBreakBuilder_.build(); } - - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell build() { - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.provenance_ = + provenanceBuilder_ == null ? provenance_ : provenanceBuilder_.build(); } - - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell buildPartial() { - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell result = - new com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.styleInfo_ = styleInfoBuilder_ == null ? styleInfo_ : styleInfoBuilder_.build(); } + } - private void buildPartialRepeatedFields( - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell result) { - if (detectedLanguagesBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - detectedLanguages_ = java.util.Collections.unmodifiableList(detectedLanguages_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.detectedLanguages_ = detectedLanguages_; - } else { - result.detectedLanguages_ = detectedLanguagesBuilder_.build(); - } - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - private void buildPartial0( - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.layout_ = layoutBuilder_ == null ? layout_ : layoutBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.rowSpan_ = rowSpan_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.colSpan_ = colSpan_; - } - } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } - @java.lang.Override - public Builder clone() { - return super.clone(); - } + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta2.Document.Page.Token) { + return mergeFrom((com.google.cloud.documentai.v1beta2.Document.Page.Token) other); + } else { + super.mergeFrom(other); + return this; } + } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + public Builder mergeFrom(com.google.cloud.documentai.v1beta2.Document.Page.Token other) { + if (other == com.google.cloud.documentai.v1beta2.Document.Page.Token.getDefaultInstance()) + return this; + if (other.hasLayout()) { + mergeLayout(other.getLayout()); } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell) { - return mergeFrom( - (com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell) other); - } else { - super.mergeFrom(other); - return this; + if (other.hasDetectedBreak()) { + mergeDetectedBreak(other.getDetectedBreak()); + } + if (detectedLanguagesBuilder_ == null) { + if (!other.detectedLanguages_.isEmpty()) { + if (detectedLanguages_.isEmpty()) { + detectedLanguages_ = other.detectedLanguages_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.addAll(other.detectedLanguages_); + } + onChanged(); + } + } else { + if (!other.detectedLanguages_.isEmpty()) { + if (detectedLanguagesBuilder_.isEmpty()) { + detectedLanguagesBuilder_.dispose(); + detectedLanguagesBuilder_ = null; + detectedLanguages_ = other.detectedLanguages_; + bitField0_ = (bitField0_ & ~0x00000004); + detectedLanguagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDetectedLanguagesFieldBuilder() + : null; + } else { + detectedLanguagesBuilder_.addAllMessages(other.detectedLanguages_); + } } } + if (other.hasProvenance()) { + mergeProvenance(other.getProvenance()); + } + if (other.hasStyleInfo()) { + mergeStyleInfo(other.getStyleInfo()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } - public Builder mergeFrom( - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell other) { - if (other - == com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell - .getDefaultInstance()) return this; - if (other.hasLayout()) { - mergeLayout(other.getLayout()); - } - if (other.getRowSpan() != 0) { - setRowSpan(other.getRowSpan()); - } - if (other.getColSpan() != 0) { - setColSpan(other.getColSpan()); - } - if (detectedLanguagesBuilder_ == null) { - if (!other.detectedLanguages_.isEmpty()) { - if (detectedLanguages_.isEmpty()) { - detectedLanguages_ = other.detectedLanguages_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.addAll(other.detectedLanguages_); - } - onChanged(); - } - } else { - if (!other.detectedLanguages_.isEmpty()) { - if (detectedLanguagesBuilder_.isEmpty()) { - detectedLanguagesBuilder_.dispose(); - detectedLanguagesBuilder_ = null; - detectedLanguages_ = other.detectedLanguages_; - bitField0_ = (bitField0_ & ~0x00000008); - detectedLanguagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getDetectedLanguagesFieldBuilder() - : null; - } else { - detectedLanguagesBuilder_.addAllMessages(other.detectedLanguages_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - @java.lang.Override - public final boolean isInitialized() { - return true; + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getLayoutFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; break; - case 10: - { - input.readMessage(getLayoutFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: - { - rowSpan_ = input.readInt32(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 24: - { - colSpan_ = input.readInt32(); - bitField0_ |= 0x00000004; - break; - } // case 24 - case 34: - { - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage m = - input.readMessage( - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage - .parser(), - extensionRegistry); - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(m); - } else { - detectedLanguagesBuilder_.addMessage(m); - } - break; - } // case 34 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } + } // case 10 + case 18: + { + input.readMessage( + getDetectedBreakFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage m = + input.readMessage( + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage + .parser(), + extensionRegistry); + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(m); + } else { + detectedLanguagesBuilder_.addMessage(m); + } + break; + } // case 26 + case 34: + { + input.readMessage(getProvenanceFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage(getStyleInfoFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } - private int bitField0_; + private int bitField0_; - private com.google.cloud.documentai.v1beta2.Document.Page.Layout layout_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Layout, - com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder> - layoutBuilder_; - /** - * - * - *
-           * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [TableCell][google.cloud.documentai.v1beta2.Document.Page.Table.TableCell].
-           * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; - * - * @return Whether the layout field is set. - */ - public boolean hasLayout() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-           * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [TableCell][google.cloud.documentai.v1beta2.Document.Page.Table.TableCell].
-           * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; - * - * @return The layout. - */ - public com.google.cloud.documentai.v1beta2.Document.Page.Layout getLayout() { - if (layoutBuilder_ == null) { - return layout_ == null - ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() - : layout_; - } else { - return layoutBuilder_.getMessage(); - } + private com.google.cloud.documentai.v1beta2.Document.Page.Layout layout_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Layout, + com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder> + layoutBuilder_; + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * + * @return Whether the layout field is set. + */ + public boolean hasLayout() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * + * @return The layout. + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Layout getLayout() { + if (layoutBuilder_ == null) { + return layout_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() + : layout_; + } else { + return layoutBuilder_.getMessage(); } - /** - * - * - *
-           * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [TableCell][google.cloud.documentai.v1beta2.Document.Page.Table.TableCell].
-           * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; - */ - public Builder setLayout(com.google.cloud.documentai.v1beta2.Document.Page.Layout value) { - if (layoutBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - layout_ = value; - } else { - layoutBuilder_.setMessage(value); + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + public Builder setLayout(com.google.cloud.documentai.v1beta2.Document.Page.Layout value) { + if (layoutBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } - bitField0_ |= 0x00000001; - onChanged(); - return this; + layout_ = value; + } else { + layoutBuilder_.setMessage(value); } - /** - * - * - *
-           * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [TableCell][google.cloud.documentai.v1beta2.Document.Page.Table.TableCell].
-           * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; - */ - public Builder setLayout( - com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder builderForValue) { - if (layoutBuilder_ == null) { - layout_ = builderForValue.build(); - } else { - layoutBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + public Builder setLayout( + com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder builderForValue) { + if (layoutBuilder_ == null) { + layout_ = builderForValue.build(); + } else { + layoutBuilder_.setMessage(builderForValue.build()); } - /** - * - * - *
-           * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [TableCell][google.cloud.documentai.v1beta2.Document.Page.Table.TableCell].
-           * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; - */ - public Builder mergeLayout( - com.google.cloud.documentai.v1beta2.Document.Page.Layout value) { - if (layoutBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && layout_ != null - && layout_ - != com.google.cloud.documentai.v1beta2.Document.Page.Layout - .getDefaultInstance()) { - getLayoutBuilder().mergeFrom(value); - } else { - layout_ = value; - } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + public Builder mergeLayout(com.google.cloud.documentai.v1beta2.Document.Page.Layout value) { + if (layoutBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && layout_ != null + && layout_ + != com.google.cloud.documentai.v1beta2.Document.Page.Layout + .getDefaultInstance()) { + getLayoutBuilder().mergeFrom(value); } else { - layoutBuilder_.mergeFrom(value); + layout_ = value; } - bitField0_ |= 0x00000001; - onChanged(); - return this; + } else { + layoutBuilder_.mergeFrom(value); } - /** - * - * - *
-           * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [TableCell][google.cloud.documentai.v1beta2.Document.Page.Table.TableCell].
-           * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; - */ - public Builder clearLayout() { - bitField0_ = (bitField0_ & ~0x00000001); - layout_ = null; - if (layoutBuilder_ != null) { - layoutBuilder_.dispose(); - layoutBuilder_ = null; - } - onChanged(); - return this; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + public Builder clearLayout() { + bitField0_ = (bitField0_ & ~0x00000001); + layout_ = null; + if (layoutBuilder_ != null) { + layoutBuilder_.dispose(); + layoutBuilder_ = null; } - /** - * - * - *
-           * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [TableCell][google.cloud.documentai.v1beta2.Document.Page.Table.TableCell].
-           * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; - */ - public com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder - getLayoutBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getLayoutFieldBuilder().getBuilder(); + onChanged(); + return this; + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder getLayoutBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getLayoutFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + public com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder + getLayoutOrBuilder() { + if (layoutBuilder_ != null) { + return layoutBuilder_.getMessageOrBuilder(); + } else { + return layout_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() + : layout_; } - /** - * - * - *
-           * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [TableCell][google.cloud.documentai.v1beta2.Document.Page.Table.TableCell].
-           * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; - */ - public com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder - getLayoutOrBuilder() { - if (layoutBuilder_ != null) { - return layoutBuilder_.getMessageOrBuilder(); - } else { - return layout_ == null - ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() - : layout_; - } - } - /** - * - * - *
-           * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [TableCell][google.cloud.documentai.v1beta2.Document.Page.Table.TableCell].
-           * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Layout, - com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder> - getLayoutFieldBuilder() { - if (layoutBuilder_ == null) { - layoutBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Layout, - com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder>( - getLayout(), getParentForChildren(), isClean()); - layout_ = null; - } - return layoutBuilder_; + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Layout, + com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder> + getLayoutFieldBuilder() { + if (layoutBuilder_ == null) { + layoutBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Layout, + com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder>( + getLayout(), getParentForChildren(), isClean()); + layout_ = null; } + return layoutBuilder_; + } - private int rowSpan_; - /** - * - * - *
-           * How many rows this cell spans.
-           * 
- * - * int32 row_span = 2; - * - * @return The rowSpan. - */ - @java.lang.Override - public int getRowSpan() { - return rowSpan_; + private com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak + detectedBreak_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak, + com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreakOrBuilder> + detectedBreakBuilder_; + /** + * + * + *
+         * Detected break at the end of a
+         * [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak detected_break = 2; + * + * + * @return Whether the detectedBreak field is set. + */ + public boolean hasDetectedBreak() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+         * Detected break at the end of a
+         * [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak detected_break = 2; + * + * + * @return The detectedBreak. + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak + getDetectedBreak() { + if (detectedBreakBuilder_ == null) { + return detectedBreak_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak + .getDefaultInstance() + : detectedBreak_; + } else { + return detectedBreakBuilder_.getMessage(); } - /** - * - * - *
-           * How many rows this cell spans.
-           * 
- * - * int32 row_span = 2; - * - * @param value The rowSpan to set. - * @return This builder for chaining. - */ - public Builder setRowSpan(int value) { - - rowSpan_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; + } + /** + * + * + *
+         * Detected break at the end of a
+         * [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak detected_break = 2; + * + */ + public Builder setDetectedBreak( + com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak value) { + if (detectedBreakBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + detectedBreak_ = value; + } else { + detectedBreakBuilder_.setMessage(value); } - /** - * - * - *
-           * How many rows this cell spans.
-           * 
- * - * int32 row_span = 2; - * - * @return This builder for chaining. - */ - public Builder clearRowSpan() { - bitField0_ = (bitField0_ & ~0x00000002); - rowSpan_ = 0; - onChanged(); - return this; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Detected break at the end of a
+         * [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak detected_break = 2; + * + */ + public Builder setDetectedBreak( + com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Builder + builderForValue) { + if (detectedBreakBuilder_ == null) { + detectedBreak_ = builderForValue.build(); + } else { + detectedBreakBuilder_.setMessage(builderForValue.build()); } - - private int colSpan_; - /** - * - * - *
-           * How many columns this cell spans.
-           * 
- * - * int32 col_span = 3; - * - * @return The colSpan. - */ - @java.lang.Override - public int getColSpan() { - return colSpan_; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Detected break at the end of a
+         * [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak detected_break = 2; + * + */ + public Builder mergeDetectedBreak( + com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak value) { + if (detectedBreakBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && detectedBreak_ != null + && detectedBreak_ + != com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak + .getDefaultInstance()) { + getDetectedBreakBuilder().mergeFrom(value); + } else { + detectedBreak_ = value; + } + } else { + detectedBreakBuilder_.mergeFrom(value); } - /** - * - * - *
-           * How many columns this cell spans.
-           * 
- * - * int32 col_span = 3; - * - * @param value The colSpan to set. - * @return This builder for chaining. - */ - public Builder setColSpan(int value) { - - colSpan_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Detected break at the end of a
+         * [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak detected_break = 2; + * + */ + public Builder clearDetectedBreak() { + bitField0_ = (bitField0_ & ~0x00000002); + detectedBreak_ = null; + if (detectedBreakBuilder_ != null) { + detectedBreakBuilder_.dispose(); + detectedBreakBuilder_ = null; } - /** - * - * - *
-           * How many columns this cell spans.
-           * 
- * - * int32 col_span = 3; - * - * @return This builder for chaining. - */ - public Builder clearColSpan() { - bitField0_ = (bitField0_ & ~0x00000004); - colSpan_ = 0; - onChanged(); - return this; + onChanged(); + return this; + } + /** + * + * + *
+         * Detected break at the end of a
+         * [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak detected_break = 2; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Builder + getDetectedBreakBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getDetectedBreakFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * Detected break at the end of a
+         * [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak detected_break = 2; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreakOrBuilder + getDetectedBreakOrBuilder() { + if (detectedBreakBuilder_ != null) { + return detectedBreakBuilder_.getMessageOrBuilder(); + } else { + return detectedBreak_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak + .getDefaultInstance() + : detectedBreak_; + } + } + /** + * + * + *
+         * Detected break at the end of a
+         * [Token][google.cloud.documentai.v1beta2.Document.Page.Token].
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak detected_break = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak, + com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreakOrBuilder> + getDetectedBreakFieldBuilder() { + if (detectedBreakBuilder_ == null) { + detectedBreakBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak, + com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreak.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.Token.DetectedBreakOrBuilder>( + getDetectedBreak(), getParentForChildren(), isClean()); + detectedBreak_ = null; } + return detectedBreakBuilder_; + } - private java.util.List - detectedLanguages_ = java.util.Collections.emptyList(); + private java.util.List + detectedLanguages_ = java.util.Collections.emptyList(); - private void ensureDetectedLanguagesIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - detectedLanguages_ = - new java.util.ArrayList< - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage>( - detectedLanguages_); - bitField0_ |= 0x00000008; - } + private void ensureDetectedLanguagesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + detectedLanguages_ = + new java.util.ArrayList< + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage>( + detectedLanguages_); + bitField0_ |= 0x00000004; } + } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> - detectedLanguagesBuilder_; + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> + detectedLanguagesBuilder_; - /** - * - * - *
-           * A list of detected languages together with confidence.
-           * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * - */ - public java.util.List - getDetectedLanguagesList() { - if (detectedLanguagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(detectedLanguages_); - } else { - return detectedLanguagesBuilder_.getMessageList(); - } - } - /** - * - * - *
-           * A list of detected languages together with confidence.
-           * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * - */ - public int getDetectedLanguagesCount() { - if (detectedLanguagesBuilder_ == null) { - return detectedLanguages_.size(); - } else { - return detectedLanguagesBuilder_.getCount(); - } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + public java.util.List + getDetectedLanguagesList() { + if (detectedLanguagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(detectedLanguages_); + } else { + return detectedLanguagesBuilder_.getMessageList(); } - /** - * - * - *
-           * A list of detected languages together with confidence.
-           * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * - */ - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage - getDetectedLanguages(int index) { - if (detectedLanguagesBuilder_ == null) { - return detectedLanguages_.get(index); - } else { - return detectedLanguagesBuilder_.getMessage(index); - } + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + public int getDetectedLanguagesCount() { + if (detectedLanguagesBuilder_ == null) { + return detectedLanguages_.size(); + } else { + return detectedLanguagesBuilder_.getCount(); } - /** - * - * - *
-           * A list of detected languages together with confidence.
-           * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * - */ - public Builder setDetectedLanguages( - int index, com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { - if (detectedLanguagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.set(index, value); - onChanged(); - } else { - detectedLanguagesBuilder_.setMessage(index, value); - } - return this; + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage + getDetectedLanguages(int index) { + if (detectedLanguagesBuilder_ == null) { + return detectedLanguages_.get(index); + } else { + return detectedLanguagesBuilder_.getMessage(index); } - /** - * - * - *
-           * A list of detected languages together with confidence.
-           * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * - */ - public Builder setDetectedLanguages( - int index, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder - builderForValue) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.set(index, builderForValue.build()); - onChanged(); - } else { - detectedLanguagesBuilder_.setMessage(index, builderForValue.build()); + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + public Builder setDetectedLanguages( + int index, com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { + if (detectedLanguagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } - return this; + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.set(index, value); + onChanged(); + } else { + detectedLanguagesBuilder_.setMessage(index, value); } - /** - * - * - *
-           * A list of detected languages together with confidence.
-           * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * - */ - public Builder addDetectedLanguages( - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { - if (detectedLanguagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(value); - onChanged(); - } else { - detectedLanguagesBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-           * A list of detected languages together with confidence.
-           * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * - */ - public Builder addDetectedLanguages( - int index, com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { - if (detectedLanguagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(index, value); - onChanged(); - } else { - detectedLanguagesBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-           * A list of detected languages together with confidence.
-           * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * - */ - public Builder addDetectedLanguages( - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder - builderForValue) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(builderForValue.build()); - onChanged(); - } else { - detectedLanguagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-           * A list of detected languages together with confidence.
-           * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * - */ - public Builder addDetectedLanguages( - int index, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder - builderForValue) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(index, builderForValue.build()); - onChanged(); - } else { - detectedLanguagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-           * A list of detected languages together with confidence.
-           * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * - */ - public Builder addAllDetectedLanguages( - java.lang.Iterable< - ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage> - values) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, detectedLanguages_); - onChanged(); - } else { - detectedLanguagesBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-           * A list of detected languages together with confidence.
-           * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * - */ - public Builder clearDetectedLanguages() { - if (detectedLanguagesBuilder_ == null) { - detectedLanguages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - detectedLanguagesBuilder_.clear(); - } - return this; - } - /** - * - * - *
-           * A list of detected languages together with confidence.
-           * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * - */ - public Builder removeDetectedLanguages(int index) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.remove(index); - onChanged(); - } else { - detectedLanguagesBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-           * A list of detected languages together with confidence.
-           * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * - */ - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder - getDetectedLanguagesBuilder(int index) { - return getDetectedLanguagesFieldBuilder().getBuilder(index); + return this; + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + public Builder setDetectedLanguages( + int index, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + builderForValue) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.set(index, builderForValue.build()); + onChanged(); + } else { + detectedLanguagesBuilder_.setMessage(index, builderForValue.build()); } - /** - * - * - *
-           * A list of detected languages together with confidence.
-           * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * - */ - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder - getDetectedLanguagesOrBuilder(int index) { - if (detectedLanguagesBuilder_ == null) { - return detectedLanguages_.get(index); - } else { - return detectedLanguagesBuilder_.getMessageOrBuilder(index); + return this; + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + public Builder addDetectedLanguages( + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { + if (detectedLanguagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(value); + onChanged(); + } else { + detectedLanguagesBuilder_.addMessage(value); } - /** - * - * - *
-           * A list of detected languages together with confidence.
-           * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * - */ - public java.util.List< - ? extends - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> - getDetectedLanguagesOrBuilderList() { - if (detectedLanguagesBuilder_ != null) { - return detectedLanguagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(detectedLanguages_); + return this; + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + public Builder addDetectedLanguages( + int index, com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { + if (detectedLanguagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(index, value); + onChanged(); + } else { + detectedLanguagesBuilder_.addMessage(index, value); } - /** - * - * - *
-           * A list of detected languages together with confidence.
-           * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * - */ - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder - addDetectedLanguagesBuilder() { - return getDetectedLanguagesFieldBuilder() - .addBuilder( - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage - .getDefaultInstance()); - } - /** - * - * - *
-           * A list of detected languages together with confidence.
-           * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * - */ - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder - addDetectedLanguagesBuilder(int index) { - return getDetectedLanguagesFieldBuilder() - .addBuilder( - index, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage - .getDefaultInstance()); - } - /** - * - * - *
-           * A list of detected languages together with confidence.
-           * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * - */ - public java.util.List< - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder> - getDetectedLanguagesBuilderList() { - return getDetectedLanguagesFieldBuilder().getBuilderList(); + return this; + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + public Builder addDetectedLanguages( + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + builderForValue) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(builderForValue.build()); + onChanged(); + } else { + detectedLanguagesBuilder_.addMessage(builderForValue.build()); } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> - getDetectedLanguagesFieldBuilder() { - if (detectedLanguagesBuilder_ == null) { - detectedLanguagesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder>( - detectedLanguages_, - ((bitField0_ & 0x00000008) != 0), - getParentForChildren(), - isClean()); - detectedLanguages_ = null; - } - return detectedLanguagesBuilder_; + return this; + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + public Builder addDetectedLanguages( + int index, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + builderForValue) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(index, builderForValue.build()); + onChanged(); + } else { + detectedLanguagesBuilder_.addMessage(index, builderForValue.build()); } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + return this; + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + public Builder addAllDetectedLanguages( + java.lang.Iterable< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage> + values) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, detectedLanguages_); + onChanged(); + } else { + detectedLanguagesBuilder_.addAllMessages(values); } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + return this; + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + public Builder clearDetectedLanguages() { + if (detectedLanguagesBuilder_ == null) { + detectedLanguages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + detectedLanguagesBuilder_.clear(); } - - // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta2.Document.Page.Table.TableCell) + return this; } - - // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.Page.Table.TableCell) - private static final com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell(); + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + public Builder removeDetectedLanguages(int index) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.remove(index); + onChanged(); + } else { + detectedLanguagesBuilder_.remove(index); + } + return this; } - - public static com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell - getDefaultInstance() { - return DEFAULT_INSTANCE; + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + getDetectedLanguagesBuilder(int index) { + return getDetectedLanguagesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder + getDetectedLanguagesOrBuilder(int index) { + if (detectedLanguagesBuilder_ == null) { + return detectedLanguages_.get(index); + } else { + return detectedLanguagesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + public java.util.List< + ? extends + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> + getDetectedLanguagesOrBuilderList() { + if (detectedLanguagesBuilder_ != null) { + return detectedLanguagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(detectedLanguages_); + } + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + addDetectedLanguagesBuilder() { + return getDetectedLanguagesFieldBuilder() + .addBuilder( + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage + .getDefaultInstance()); + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + addDetectedLanguagesBuilder(int index) { + return getDetectedLanguagesFieldBuilder() + .addBuilder( + index, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage + .getDefaultInstance()); + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + public java.util.List< + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder> + getDetectedLanguagesBuilderList() { + return getDetectedLanguagesFieldBuilder().getBuilderList(); } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TableCell parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> + getDetectedLanguagesFieldBuilder() { + if (detectedLanguagesBuilder_ == null) { + detectedLanguagesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder>( + detectedLanguages_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + detectedLanguages_ = null; + } + return detectedLanguagesBuilder_; + } + + private com.google.cloud.documentai.v1beta2.Document.Provenance provenance_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Provenance, + com.google.cloud.documentai.v1beta2.Document.Provenance.Builder, + com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder> + provenanceBuilder_; + /** + * + * + *
+         * The history of this annotation.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 4 [deprecated = true]; + * + * + * @deprecated google.cloud.documentai.v1beta2.Document.Page.Token.provenance is deprecated. + * See google/cloud/documentai/v1beta2/document.proto;l=352 + * @return Whether the provenance field is set. + */ + @java.lang.Deprecated + public boolean hasProvenance() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+         * The history of this annotation.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 4 [deprecated = true]; + * + * + * @deprecated google.cloud.documentai.v1beta2.Document.Page.Token.provenance is deprecated. + * See google/cloud/documentai/v1beta2/document.proto;l=352 + * @return The provenance. + */ + @java.lang.Deprecated + public com.google.cloud.documentai.v1beta2.Document.Provenance getProvenance() { + if (provenanceBuilder_ == null) { + return provenance_ == null + ? com.google.cloud.documentai.v1beta2.Document.Provenance.getDefaultInstance() + : provenance_; + } else { + return provenanceBuilder_.getMessage(); + } + } + /** + * + * + *
+         * The history of this annotation.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 4 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder setProvenance( + com.google.cloud.documentai.v1beta2.Document.Provenance value) { + if (provenanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + provenance_ = value; + } else { + provenanceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+         * The history of this annotation.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 4 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder setProvenance( + com.google.cloud.documentai.v1beta2.Document.Provenance.Builder builderForValue) { + if (provenanceBuilder_ == null) { + provenance_ = builderForValue.build(); + } else { + provenanceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+         * The history of this annotation.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 4 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder mergeProvenance( + com.google.cloud.documentai.v1beta2.Document.Provenance value) { + if (provenanceBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && provenance_ != null + && provenance_ + != com.google.cloud.documentai.v1beta2.Document.Provenance + .getDefaultInstance()) { + getProvenanceBuilder().mergeFrom(value); + } else { + provenance_ = value; + } + } else { + provenanceBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+         * The history of this annotation.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 4 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder clearProvenance() { + bitField0_ = (bitField0_ & ~0x00000008); + provenance_ = null; + if (provenanceBuilder_ != null) { + provenanceBuilder_.dispose(); + provenanceBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+         * The history of this annotation.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 4 [deprecated = true]; + * + */ + @java.lang.Deprecated + public com.google.cloud.documentai.v1beta2.Document.Provenance.Builder + getProvenanceBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getProvenanceFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * The history of this annotation.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 4 [deprecated = true]; + * + */ + @java.lang.Deprecated + public com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder + getProvenanceOrBuilder() { + if (provenanceBuilder_ != null) { + return provenanceBuilder_.getMessageOrBuilder(); + } else { + return provenance_ == null + ? com.google.cloud.documentai.v1beta2.Document.Provenance.getDefaultInstance() + : provenance_; + } + } + /** + * + * + *
+         * The history of this annotation.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 4 [deprecated = true]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Provenance, + com.google.cloud.documentai.v1beta2.Document.Provenance.Builder, + com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder> + getProvenanceFieldBuilder() { + if (provenanceBuilder_ == null) { + provenanceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Provenance, + com.google.cloud.documentai.v1beta2.Document.Provenance.Builder, + com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder>( + getProvenance(), getParentForChildren(), isClean()); + provenance_ = null; + } + return provenanceBuilder_; + } + + private com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo styleInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo, + com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfoOrBuilder> + styleInfoBuilder_; + /** + * + * + *
+         * Text style attributes.
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo style_info = 5; + * + * + * @return Whether the styleInfo field is set. + */ + public boolean hasStyleInfo() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+         * Text style attributes.
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo style_info = 5; + * + * + * @return The styleInfo. + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo getStyleInfo() { + if (styleInfoBuilder_ == null) { + return styleInfo_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo + .getDefaultInstance() + : styleInfo_; + } else { + return styleInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+         * Text style attributes.
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo style_info = 5; + * + */ + public Builder setStyleInfo( + com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo value) { + if (styleInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + styleInfo_ = value; + } else { + styleInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+         * Text style attributes.
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo style_info = 5; + * + */ + public Builder setStyleInfo( + com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo.Builder + builderForValue) { + if (styleInfoBuilder_ == null) { + styleInfo_ = builderForValue.build(); + } else { + styleInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+         * Text style attributes.
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo style_info = 5; + * + */ + public Builder mergeStyleInfo( + com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo value) { + if (styleInfoBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && styleInfo_ != null + && styleInfo_ + != com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo + .getDefaultInstance()) { + getStyleInfoBuilder().mergeFrom(value); + } else { + styleInfo_ = value; + } + } else { + styleInfoBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+         * Text style attributes.
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo style_info = 5; + * + */ + public Builder clearStyleInfo() { + bitField0_ = (bitField0_ & ~0x00000010); + styleInfo_ = null; + if (styleInfoBuilder_ != null) { + styleInfoBuilder_.dispose(); + styleInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+         * Text style attributes.
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo style_info = 5; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo.Builder + getStyleInfoBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getStyleInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * Text style attributes.
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo style_info = 5; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfoOrBuilder + getStyleInfoOrBuilder() { + if (styleInfoBuilder_ != null) { + return styleInfoBuilder_.getMessageOrBuilder(); + } else { + return styleInfo_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo + .getDefaultInstance() + : styleInfo_; + } + } + /** + * + * + *
+         * Text style attributes.
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo style_info = 5; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo, + com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfoOrBuilder> + getStyleInfoFieldBuilder() { + if (styleInfoBuilder_ == null) { + styleInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo, + com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfoOrBuilder>( + getStyleInfo(), getParentForChildren(), isClean()); + styleInfo_ = null; + } + return styleInfoBuilder_; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); } @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); } + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta2.Document.Page.Token) } - public static final int LAYOUT_FIELD_NUMBER = 1; - private com.google.cloud.documentai.v1beta2.Document.Page.Layout layout_; + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.Page.Token) + private static final com.google.cloud.documentai.v1beta2.Document.Page.Token DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta2.Document.Page.Token(); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.Token getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Token parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Token getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SymbolOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.Page.Symbol) + com.google.protobuf.MessageOrBuilder { + /** * * *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Table][google.cloud.documentai.v1beta2.Document.Page.Table].
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+       * [Symbol][google.cloud.documentai.v1beta2.Document.Page.Symbol].
        * 
* * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; * * @return Whether the layout field is set. */ - @java.lang.Override - public boolean hasLayout() { - return layout_ != null; - } + boolean hasLayout(); /** * * *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Table][google.cloud.documentai.v1beta2.Document.Page.Table].
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+       * [Symbol][google.cloud.documentai.v1beta2.Document.Page.Symbol].
        * 
* * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; * * @return The layout. */ - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Layout getLayout() { - return layout_ == null - ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() - : layout_; - } + com.google.cloud.documentai.v1beta2.Document.Page.Layout getLayout(); /** * * *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Table][google.cloud.documentai.v1beta2.Document.Page.Table].
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+       * [Symbol][google.cloud.documentai.v1beta2.Document.Page.Symbol].
        * 
* * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; */ - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder - getLayoutOrBuilder() { - return layout_ == null - ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() - : layout_; - } - - public static final int HEADER_ROWS_FIELD_NUMBER = 2; + com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder getLayoutOrBuilder(); - @SuppressWarnings("serial") - private java.util.List - headerRows_; /** * * *
-       * Header rows of the table.
+       * A list of detected languages together with confidence.
        * 
* * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ - @java.lang.Override - public java.util.List - getHeaderRowsList() { - return headerRows_; - } + java.util.List + getDetectedLanguagesList(); /** * * *
-       * Header rows of the table.
+       * A list of detected languages together with confidence.
        * 
* * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ - @java.lang.Override - public java.util.List< - ? extends com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRowOrBuilder> - getHeaderRowsOrBuilderList() { - return headerRows_; - } + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage getDetectedLanguages( + int index); /** * * *
-       * Header rows of the table.
+       * A list of detected languages together with confidence.
        * 
* * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ - @java.lang.Override - public int getHeaderRowsCount() { - return headerRows_.size(); - } + int getDetectedLanguagesCount(); /** * * *
-       * Header rows of the table.
+       * A list of detected languages together with confidence.
        * 
* * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow getHeaderRows( - int index) { - return headerRows_.get(index); - } + java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> + getDetectedLanguagesOrBuilderList(); /** * * *
-       * Header rows of the table.
+       * A list of detected languages together with confidence.
        * 
* * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRowOrBuilder - getHeaderRowsOrBuilder(int index) { - return headerRows_.get(index); + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder + getDetectedLanguagesOrBuilder(int index); + } + /** + * + * + *
+     * A detected symbol.
+     * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.Symbol} + */ + public static final class Symbol extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.Page.Symbol) + SymbolOrBuilder { + private static final long serialVersionUID = 0L; + // Use Symbol.newBuilder() to construct. + private Symbol(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); } - public static final int BODY_ROWS_FIELD_NUMBER = 3; + private Symbol() { + detectedLanguages_ = java.util.Collections.emptyList(); + } - @SuppressWarnings("serial") - private java.util.List - bodyRows_; - /** - * - * - *
-       * Body rows of the table.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; - * - */ @java.lang.Override - public java.util.List - getBodyRowsList() { - return bodyRows_; + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Symbol(); } - /** - * - * - *
-       * Body rows of the table.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; - * - */ + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Symbol_descriptor; + } + @java.lang.Override - public java.util.List< - ? extends com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRowOrBuilder> - getBodyRowsOrBuilderList() { - return bodyRows_; + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Symbol_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Document.Page.Symbol.class, + com.google.cloud.documentai.v1beta2.Document.Page.Symbol.Builder.class); } + + public static final int LAYOUT_FIELD_NUMBER = 1; + private com.google.cloud.documentai.v1beta2.Document.Page.Layout layout_; /** * * *
-       * Body rows of the table.
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+       * [Symbol][google.cloud.documentai.v1beta2.Document.Page.Symbol].
        * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; - * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * + * @return Whether the layout field is set. */ @java.lang.Override - public int getBodyRowsCount() { - return bodyRows_.size(); + public boolean hasLayout() { + return layout_ != null; } /** * * *
-       * Body rows of the table.
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+       * [Symbol][google.cloud.documentai.v1beta2.Document.Page.Symbol].
        * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; - * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * + * @return The layout. */ @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow getBodyRows( - int index) { - return bodyRows_.get(index); + public com.google.cloud.documentai.v1beta2.Document.Page.Layout getLayout() { + return layout_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() + : layout_; } /** * * *
-       * Body rows of the table.
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+       * [Symbol][google.cloud.documentai.v1beta2.Document.Page.Symbol].
        * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; - * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; */ @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRowOrBuilder - getBodyRowsOrBuilder(int index) { - return bodyRows_.get(index); + public com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder + getLayoutOrBuilder() { + return layout_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() + : layout_; } - public static final int DETECTED_LANGUAGES_FIELD_NUMBER = 4; + public static final int DETECTED_LANGUAGES_FIELD_NUMBER = 2; @SuppressWarnings("serial") private java.util.List @@ -19879,7 +21986,7 @@ public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow getBodyR *
* * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ @java.lang.Override @@ -19895,7 +22002,7 @@ public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow getBodyR * * * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ @java.lang.Override @@ -19912,7 +22019,7 @@ public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow getBodyR * * * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ @java.lang.Override @@ -19927,7 +22034,7 @@ public int getDetectedLanguagesCount() { * * * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ @java.lang.Override @@ -19943,7 +22050,7 @@ public int getDetectedLanguagesCount() { * * * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ @java.lang.Override @@ -19969,14 +22076,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (layout_ != null) { output.writeMessage(1, getLayout()); } - for (int i = 0; i < headerRows_.size(); i++) { - output.writeMessage(2, headerRows_.get(i)); - } - for (int i = 0; i < bodyRows_.size(); i++) { - output.writeMessage(3, bodyRows_.get(i)); - } for (int i = 0; i < detectedLanguages_.size(); i++) { - output.writeMessage(4, detectedLanguages_.get(i)); + output.writeMessage(2, detectedLanguages_.get(i)); } getUnknownFields().writeTo(output); } @@ -19990,16 +22091,10 @@ public int getSerializedSize() { if (layout_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getLayout()); } - for (int i = 0; i < headerRows_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, headerRows_.get(i)); - } - for (int i = 0; i < bodyRows_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, bodyRows_.get(i)); - } for (int i = 0; i < detectedLanguages_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( - 4, detectedLanguages_.get(i)); + 2, detectedLanguages_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -20011,18 +22106,16 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.documentai.v1beta2.Document.Page.Table)) { + if (!(obj instanceof com.google.cloud.documentai.v1beta2.Document.Page.Symbol)) { return super.equals(obj); } - com.google.cloud.documentai.v1beta2.Document.Page.Table other = - (com.google.cloud.documentai.v1beta2.Document.Page.Table) obj; + com.google.cloud.documentai.v1beta2.Document.Page.Symbol other = + (com.google.cloud.documentai.v1beta2.Document.Page.Symbol) obj; if (hasLayout() != other.hasLayout()) return false; if (hasLayout()) { if (!getLayout().equals(other.getLayout())) return false; } - if (!getHeaderRowsList().equals(other.getHeaderRowsList())) return false; - if (!getBodyRowsList().equals(other.getBodyRowsList())) return false; if (!getDetectedLanguagesList().equals(other.getDetectedLanguagesList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; @@ -20039,14 +22132,6 @@ public int hashCode() { hash = (37 * hash) + LAYOUT_FIELD_NUMBER; hash = (53 * hash) + getLayout().hashCode(); } - if (getHeaderRowsCount() > 0) { - hash = (37 * hash) + HEADER_ROWS_FIELD_NUMBER; - hash = (53 * hash) + getHeaderRowsList().hashCode(); - } - if (getBodyRowsCount() > 0) { - hash = (37 * hash) + BODY_ROWS_FIELD_NUMBER; - hash = (53 * hash) + getBodyRowsList().hashCode(); - } if (getDetectedLanguagesCount() > 0) { hash = (37 * hash) + DETECTED_LANGUAGES_FIELD_NUMBER; hash = (53 * hash) + getDetectedLanguagesList().hashCode(); @@ -20056,71 +22141,71 @@ public int hashCode() { return hash; } - public static com.google.cloud.documentai.v1beta2.Document.Page.Table parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Symbol parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Table parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Symbol 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.v1beta2.Document.Page.Table parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Symbol parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Table parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Symbol 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.v1beta2.Document.Page.Table parseFrom(byte[] data) + public static com.google.cloud.documentai.v1beta2.Document.Page.Symbol parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Table parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Symbol parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Table parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Symbol parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Table parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Symbol 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.v1beta2.Document.Page.Table parseDelimitedFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Symbol parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Table parseDelimitedFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Symbol 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.v1beta2.Document.Page.Table parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Symbol parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.documentai.v1beta2.Document.Page.Table parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.Page.Symbol parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -20138,7 +22223,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.documentai.v1beta2.Document.Page.Table prototype) { + com.google.cloud.documentai.v1beta2.Document.Page.Symbol prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -20157,32 +22242,32 @@ protected Builder newBuilderForType( * * *
-       * A table representation similar to HTML table structure.
+       * A detected symbol.
        * 
* - * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.Table} + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.Symbol} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.Page.Table) - com.google.cloud.documentai.v1beta2.Document.Page.TableOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.Page.Symbol) + com.google.cloud.documentai.v1beta2.Document.Page.SymbolOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_Table_descriptor; + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Symbol_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_Table_fieldAccessorTable + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Symbol_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1beta2.Document.Page.Table.class, - com.google.cloud.documentai.v1beta2.Document.Page.Table.Builder.class); + com.google.cloud.documentai.v1beta2.Document.Page.Symbol.class, + com.google.cloud.documentai.v1beta2.Document.Page.Symbol.Builder.class); } - // Construct using com.google.cloud.documentai.v1beta2.Document.Page.Table.newBuilder() + // Construct using com.google.cloud.documentai.v1beta2.Document.Page.Symbol.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { @@ -20198,44 +22283,31 @@ public Builder clear() { layoutBuilder_.dispose(); layoutBuilder_ = null; } - if (headerRowsBuilder_ == null) { - headerRows_ = java.util.Collections.emptyList(); - } else { - headerRows_ = null; - headerRowsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - if (bodyRowsBuilder_ == null) { - bodyRows_ = java.util.Collections.emptyList(); - } else { - bodyRows_ = null; - bodyRowsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); if (detectedLanguagesBuilder_ == null) { detectedLanguages_ = java.util.Collections.emptyList(); } else { detectedLanguages_ = null; detectedLanguagesBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000002); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_Table_descriptor; + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Symbol_descriptor; } @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Table getDefaultInstanceForType() { - return com.google.cloud.documentai.v1beta2.Document.Page.Table.getDefaultInstance(); + public com.google.cloud.documentai.v1beta2.Document.Page.Symbol + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta2.Document.Page.Symbol.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Table build() { - com.google.cloud.documentai.v1beta2.Document.Page.Table result = buildPartial(); + public com.google.cloud.documentai.v1beta2.Document.Page.Symbol build() { + com.google.cloud.documentai.v1beta2.Document.Page.Symbol result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -20243,9 +22315,9 @@ public com.google.cloud.documentai.v1beta2.Document.Page.Table build() { } @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Table buildPartial() { - com.google.cloud.documentai.v1beta2.Document.Page.Table result = - new com.google.cloud.documentai.v1beta2.Document.Page.Table(this); + public com.google.cloud.documentai.v1beta2.Document.Page.Symbol buildPartial() { + com.google.cloud.documentai.v1beta2.Document.Page.Symbol result = + new com.google.cloud.documentai.v1beta2.Document.Page.Symbol(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); @@ -20255,29 +22327,11 @@ public com.google.cloud.documentai.v1beta2.Document.Page.Table buildPartial() { } private void buildPartialRepeatedFields( - com.google.cloud.documentai.v1beta2.Document.Page.Table result) { - if (headerRowsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - headerRows_ = java.util.Collections.unmodifiableList(headerRows_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.headerRows_ = headerRows_; - } else { - result.headerRows_ = headerRowsBuilder_.build(); - } - if (bodyRowsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - bodyRows_ = java.util.Collections.unmodifiableList(bodyRows_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.bodyRows_ = bodyRows_; - } else { - result.bodyRows_ = bodyRowsBuilder_.build(); - } + com.google.cloud.documentai.v1beta2.Document.Page.Symbol result) { if (detectedLanguagesBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { + if (((bitField0_ & 0x00000002) != 0)) { detectedLanguages_ = java.util.Collections.unmodifiableList(detectedLanguages_); - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000002); } result.detectedLanguages_ = detectedLanguages_; } else { @@ -20285,7 +22339,8 @@ private void buildPartialRepeatedFields( } } - private void buildPartial0(com.google.cloud.documentai.v1beta2.Document.Page.Table result) { + private void buildPartial0( + com.google.cloud.documentai.v1beta2.Document.Page.Symbol result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.layout_ = layoutBuilder_ == null ? layout_ : layoutBuilder_.build(); @@ -20329,79 +22384,26 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.documentai.v1beta2.Document.Page.Table) { - return mergeFrom((com.google.cloud.documentai.v1beta2.Document.Page.Table) other); + if (other instanceof com.google.cloud.documentai.v1beta2.Document.Page.Symbol) { + return mergeFrom((com.google.cloud.documentai.v1beta2.Document.Page.Symbol) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.cloud.documentai.v1beta2.Document.Page.Table other) { - if (other == com.google.cloud.documentai.v1beta2.Document.Page.Table.getDefaultInstance()) + public Builder mergeFrom(com.google.cloud.documentai.v1beta2.Document.Page.Symbol other) { + if (other + == com.google.cloud.documentai.v1beta2.Document.Page.Symbol.getDefaultInstance()) return this; if (other.hasLayout()) { mergeLayout(other.getLayout()); } - if (headerRowsBuilder_ == null) { - if (!other.headerRows_.isEmpty()) { - if (headerRows_.isEmpty()) { - headerRows_ = other.headerRows_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureHeaderRowsIsMutable(); - headerRows_.addAll(other.headerRows_); - } - onChanged(); - } - } else { - if (!other.headerRows_.isEmpty()) { - if (headerRowsBuilder_.isEmpty()) { - headerRowsBuilder_.dispose(); - headerRowsBuilder_ = null; - headerRows_ = other.headerRows_; - bitField0_ = (bitField0_ & ~0x00000002); - headerRowsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getHeaderRowsFieldBuilder() - : null; - } else { - headerRowsBuilder_.addAllMessages(other.headerRows_); - } - } - } - if (bodyRowsBuilder_ == null) { - if (!other.bodyRows_.isEmpty()) { - if (bodyRows_.isEmpty()) { - bodyRows_ = other.bodyRows_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureBodyRowsIsMutable(); - bodyRows_.addAll(other.bodyRows_); - } - onChanged(); - } - } else { - if (!other.bodyRows_.isEmpty()) { - if (bodyRowsBuilder_.isEmpty()) { - bodyRowsBuilder_.dispose(); - bodyRowsBuilder_ = null; - bodyRows_ = other.bodyRows_; - bitField0_ = (bitField0_ & ~0x00000004); - bodyRowsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getBodyRowsFieldBuilder() - : null; - } else { - bodyRowsBuilder_.addAllMessages(other.bodyRows_); - } - } - } if (detectedLanguagesBuilder_ == null) { if (!other.detectedLanguages_.isEmpty()) { if (detectedLanguages_.isEmpty()) { detectedLanguages_ = other.detectedLanguages_; - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000002); } else { ensureDetectedLanguagesIsMutable(); detectedLanguages_.addAll(other.detectedLanguages_); @@ -20414,7 +22416,7 @@ public Builder mergeFrom(com.google.cloud.documentai.v1beta2.Document.Page.Table detectedLanguagesBuilder_.dispose(); detectedLanguagesBuilder_ = null; detectedLanguages_ = other.detectedLanguages_; - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000002); detectedLanguagesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getDetectedLanguagesFieldBuilder() @@ -20457,36 +22459,6 @@ public Builder mergeFrom( break; } // case 10 case 18: - { - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow m = - input.readMessage( - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow - .parser(), - extensionRegistry); - if (headerRowsBuilder_ == null) { - ensureHeaderRowsIsMutable(); - headerRows_.add(m); - } else { - headerRowsBuilder_.addMessage(m); - } - break; - } // case 18 - case 26: - { - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow m = - input.readMessage( - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow - .parser(), - extensionRegistry); - if (bodyRowsBuilder_ == null) { - ensureBodyRowsIsMutable(); - bodyRows_.add(m); - } else { - bodyRowsBuilder_.addMessage(m); - } - break; - } // case 26 - case 34: { com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage m = input.readMessage( @@ -20500,7 +22472,7 @@ public Builder mergeFrom( detectedLanguagesBuilder_.addMessage(m); } break; - } // case 34 + } // case 18 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -20530,7 +22502,8 @@ public Builder mergeFrom( * * *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Table][google.cloud.documentai.v1beta2.Document.Page.Table].
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Symbol][google.cloud.documentai.v1beta2.Document.Page.Symbol].
          * 
* * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; @@ -20544,7 +22517,8 @@ public boolean hasLayout() { * * *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Table][google.cloud.documentai.v1beta2.Document.Page.Table].
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Symbol][google.cloud.documentai.v1beta2.Document.Page.Symbol].
          * 
* * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; @@ -20564,7 +22538,8 @@ public com.google.cloud.documentai.v1beta2.Document.Page.Layout getLayout() { * * *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Table][google.cloud.documentai.v1beta2.Document.Page.Table].
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Symbol][google.cloud.documentai.v1beta2.Document.Page.Symbol].
          * 
* * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; @@ -20586,7 +22561,8 @@ public Builder setLayout(com.google.cloud.documentai.v1beta2.Document.Page.Layou * * *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Table][google.cloud.documentai.v1beta2.Document.Page.Table].
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Symbol][google.cloud.documentai.v1beta2.Document.Page.Symbol].
          * 
* * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; @@ -20606,7 +22582,8 @@ public Builder setLayout( * * *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Table][google.cloud.documentai.v1beta2.Document.Page.Table].
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Symbol][google.cloud.documentai.v1beta2.Document.Page.Symbol].
          * 
* * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; @@ -20633,7 +22610,8 @@ public Builder mergeLayout(com.google.cloud.documentai.v1beta2.Document.Page.Lay * * *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Table][google.cloud.documentai.v1beta2.Document.Page.Table].
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Symbol][google.cloud.documentai.v1beta2.Document.Page.Symbol].
          * 
* * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; @@ -20652,7 +22630,8 @@ public Builder clearLayout() { * * *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Table][google.cloud.documentai.v1beta2.Document.Page.Table].
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Symbol][google.cloud.documentai.v1beta2.Document.Page.Symbol].
          * 
* * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; @@ -20666,7 +22645,8 @@ public com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder getLayou * * *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Table][google.cloud.documentai.v1beta2.Document.Page.Table].
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Symbol][google.cloud.documentai.v1beta2.Document.Page.Symbol].
          * 
* * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; @@ -20685,7 +22665,8 @@ public com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder getLayou * * *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Table][google.cloud.documentai.v1beta2.Document.Page.Table].
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Symbol][google.cloud.documentai.v1beta2.Document.Page.Symbol].
          * 
* * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; @@ -20707,102 +22688,103 @@ public com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder getLayou return layoutBuilder_; } - private java.util.List - headerRows_ = java.util.Collections.emptyList(); + private java.util.List + detectedLanguages_ = java.util.Collections.emptyList(); - private void ensureHeaderRowsIsMutable() { + private void ensureDetectedLanguagesIsMutable() { if (!((bitField0_ & 0x00000002) != 0)) { - headerRows_ = + detectedLanguages_ = new java.util.ArrayList< - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow>(headerRows_); + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage>( + detectedLanguages_); bitField0_ |= 0x00000002; } } private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow, - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRowOrBuilder> - headerRowsBuilder_; + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> + detectedLanguagesBuilder_; /** * * *
-         * Header rows of the table.
+         * A list of detected languages together with confidence.
          * 
* * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ - public java.util.List - getHeaderRowsList() { - if (headerRowsBuilder_ == null) { - return java.util.Collections.unmodifiableList(headerRows_); + public java.util.List + getDetectedLanguagesList() { + if (detectedLanguagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(detectedLanguages_); } else { - return headerRowsBuilder_.getMessageList(); + return detectedLanguagesBuilder_.getMessageList(); } } /** * * *
-         * Header rows of the table.
+         * A list of detected languages together with confidence.
          * 
* * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ - public int getHeaderRowsCount() { - if (headerRowsBuilder_ == null) { - return headerRows_.size(); + public int getDetectedLanguagesCount() { + if (detectedLanguagesBuilder_ == null) { + return detectedLanguages_.size(); } else { - return headerRowsBuilder_.getCount(); + return detectedLanguagesBuilder_.getCount(); } } /** * * *
-         * Header rows of the table.
+         * A list of detected languages together with confidence.
          * 
* * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ - public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow getHeaderRows( - int index) { - if (headerRowsBuilder_ == null) { - return headerRows_.get(index); + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage + getDetectedLanguages(int index) { + if (detectedLanguagesBuilder_ == null) { + return detectedLanguages_.get(index); } else { - return headerRowsBuilder_.getMessage(index); + return detectedLanguagesBuilder_.getMessage(index); } } /** * * *
-         * Header rows of the table.
+         * A list of detected languages together with confidence.
          * 
* * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ - public Builder setHeaderRows( - int index, com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow value) { - if (headerRowsBuilder_ == null) { + public Builder setDetectedLanguages( + int index, com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { + if (detectedLanguagesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureHeaderRowsIsMutable(); - headerRows_.set(index, value); + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.set(index, value); onChanged(); } else { - headerRowsBuilder_.setMessage(index, value); + detectedLanguagesBuilder_.setMessage(index, value); } return this; } @@ -20810,23 +22792,23 @@ public Builder setHeaderRows( * * *
-         * Header rows of the table.
+         * A list of detected languages together with confidence.
          * 
* * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ - public Builder setHeaderRows( + public Builder setDetectedLanguages( int index, - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.Builder + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder builderForValue) { - if (headerRowsBuilder_ == null) { - ensureHeaderRowsIsMutable(); - headerRows_.set(index, builderForValue.build()); + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.set(index, builderForValue.build()); onChanged(); } else { - headerRowsBuilder_.setMessage(index, builderForValue.build()); + detectedLanguagesBuilder_.setMessage(index, builderForValue.build()); } return this; } @@ -20834,24 +22816,24 @@ public Builder setHeaderRows( * * *
-         * Header rows of the table.
+         * A list of detected languages together with confidence.
          * 
* * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ - public Builder addHeaderRows( - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow value) { - if (headerRowsBuilder_ == null) { + public Builder addDetectedLanguages( + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { + if (detectedLanguagesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureHeaderRowsIsMutable(); - headerRows_.add(value); + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(value); onChanged(); } else { - headerRowsBuilder_.addMessage(value); + detectedLanguagesBuilder_.addMessage(value); } return this; } @@ -20859,24 +22841,24 @@ public Builder addHeaderRows( * * *
-         * Header rows of the table.
+         * A list of detected languages together with confidence.
          * 
* * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ - public Builder addHeaderRows( - int index, com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow value) { - if (headerRowsBuilder_ == null) { + public Builder addDetectedLanguages( + int index, com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { + if (detectedLanguagesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureHeaderRowsIsMutable(); - headerRows_.add(index, value); + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(index, value); onChanged(); } else { - headerRowsBuilder_.addMessage(index, value); + detectedLanguagesBuilder_.addMessage(index, value); } return this; } @@ -20884,22 +22866,22 @@ public Builder addHeaderRows( * * *
-         * Header rows of the table.
+         * A list of detected languages together with confidence.
          * 
* * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ - public Builder addHeaderRows( - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.Builder + public Builder addDetectedLanguages( + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder builderForValue) { - if (headerRowsBuilder_ == null) { - ensureHeaderRowsIsMutable(); - headerRows_.add(builderForValue.build()); + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(builderForValue.build()); onChanged(); } else { - headerRowsBuilder_.addMessage(builderForValue.build()); + detectedLanguagesBuilder_.addMessage(builderForValue.build()); } return this; } @@ -20907,23 +22889,23 @@ public Builder addHeaderRows( * * *
-         * Header rows of the table.
+         * A list of detected languages together with confidence.
          * 
* * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ - public Builder addHeaderRows( + public Builder addDetectedLanguages( int index, - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.Builder + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder builderForValue) { - if (headerRowsBuilder_ == null) { - ensureHeaderRowsIsMutable(); - headerRows_.add(index, builderForValue.build()); + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(index, builderForValue.build()); onChanged(); } else { - headerRowsBuilder_.addMessage(index, builderForValue.build()); + detectedLanguagesBuilder_.addMessage(index, builderForValue.build()); } return this; } @@ -20931,23 +22913,23 @@ public Builder addHeaderRows( * * *
-         * Header rows of the table.
+         * A list of detected languages together with confidence.
          * 
* * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ - public Builder addAllHeaderRows( + public Builder addAllDetectedLanguages( java.lang.Iterable< - ? extends com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow> + ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage> values) { - if (headerRowsBuilder_ == null) { - ensureHeaderRowsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, headerRows_); + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, detectedLanguages_); onChanged(); } else { - headerRowsBuilder_.addAllMessages(values); + detectedLanguagesBuilder_.addAllMessages(values); } return this; } @@ -20955,20 +22937,20 @@ public Builder addAllHeaderRows( * * *
-         * Header rows of the table.
+         * A list of detected languages together with confidence.
          * 
* * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ - public Builder clearHeaderRows() { - if (headerRowsBuilder_ == null) { - headerRows_ = java.util.Collections.emptyList(); + public Builder clearDetectedLanguages() { + if (detectedLanguagesBuilder_ == null) { + detectedLanguages_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { - headerRowsBuilder_.clear(); + detectedLanguagesBuilder_.clear(); } return this; } @@ -20976,20 +22958,20 @@ public Builder clearHeaderRows() { * * *
-         * Header rows of the table.
+         * A list of detected languages together with confidence.
          * 
* * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ - public Builder removeHeaderRows(int index) { - if (headerRowsBuilder_ == null) { - ensureHeaderRowsIsMutable(); - headerRows_.remove(index); + public Builder removeDetectedLanguages(int index) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.remove(index); onChanged(); } else { - headerRowsBuilder_.remove(index); + detectedLanguagesBuilder_.remove(index); } return this; } @@ -20997,392 +22979,24890 @@ public Builder removeHeaderRows(int index) { * * *
-         * Header rows of the table.
+         * A list of detected languages together with confidence.
          * 
* * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ - public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.Builder - getHeaderRowsBuilder(int index) { - return getHeaderRowsFieldBuilder().getBuilder(index); + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + getDetectedLanguagesBuilder(int index) { + return getDetectedLanguagesFieldBuilder().getBuilder(index); } /** * * *
-         * Header rows of the table.
+         * A list of detected languages together with confidence.
          * 
* * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ - public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRowOrBuilder - getHeaderRowsOrBuilder(int index) { - if (headerRowsBuilder_ == null) { - return headerRows_.get(index); + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder + getDetectedLanguagesOrBuilder(int index) { + if (detectedLanguagesBuilder_ == null) { + return detectedLanguages_.get(index); } else { - return headerRowsBuilder_.getMessageOrBuilder(index); + return detectedLanguagesBuilder_.getMessageOrBuilder(index); } } /** * * *
-         * Header rows of the table.
+         * A list of detected languages together with confidence.
          * 
* * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ public java.util.List< - ? extends com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRowOrBuilder> - getHeaderRowsOrBuilderList() { - if (headerRowsBuilder_ != null) { - return headerRowsBuilder_.getMessageOrBuilderList(); + ? extends + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> + getDetectedLanguagesOrBuilderList() { + if (detectedLanguagesBuilder_ != null) { + return detectedLanguagesBuilder_.getMessageOrBuilderList(); } else { - return java.util.Collections.unmodifiableList(headerRows_); + return java.util.Collections.unmodifiableList(detectedLanguages_); } } /** * * *
-         * Header rows of the table.
+         * A list of detected languages together with confidence.
          * 
* * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ - public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.Builder - addHeaderRowsBuilder() { - return getHeaderRowsFieldBuilder() + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + addDetectedLanguagesBuilder() { + return getDetectedLanguagesFieldBuilder() .addBuilder( - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage .getDefaultInstance()); } /** * * *
-         * Header rows of the table.
+         * A list of detected languages together with confidence.
          * 
* * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ - public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.Builder - addHeaderRowsBuilder(int index) { - return getHeaderRowsFieldBuilder() + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + addDetectedLanguagesBuilder(int index) { + return getDetectedLanguagesFieldBuilder() .addBuilder( index, - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage .getDefaultInstance()); } /** * * *
-         * Header rows of the table.
+         * A list of detected languages together with confidence.
          * 
* * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 2; * */ public java.util.List< - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.Builder> - getHeaderRowsBuilderList() { - return getHeaderRowsFieldBuilder().getBuilderList(); + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder> + getDetectedLanguagesBuilderList() { + return getDetectedLanguagesFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow, - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRowOrBuilder> - getHeaderRowsFieldBuilder() { - if (headerRowsBuilder_ == null) { - headerRowsBuilder_ = + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> + getDetectedLanguagesFieldBuilder() { + if (detectedLanguagesBuilder_ == null) { + detectedLanguagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow, - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRowOrBuilder>( - headerRows_, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder>( + detectedLanguages_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); - headerRows_ = null; + detectedLanguages_ = null; } - return headerRowsBuilder_; + return detectedLanguagesBuilder_; } - private java.util.List - bodyRows_ = java.util.Collections.emptyList(); + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - private void ensureBodyRowsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - bodyRows_ = - new java.util.ArrayList< - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow>(bodyRows_); - bitField0_ |= 0x00000004; - } + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow, - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRowOrBuilder> - bodyRowsBuilder_; + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta2.Document.Page.Symbol) + } - /** - * - * - *
-         * Body rows of the table.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; - * - */ - public java.util.List - getBodyRowsList() { - if (bodyRowsBuilder_ == null) { - return java.util.Collections.unmodifiableList(bodyRows_); - } else { - return bodyRowsBuilder_.getMessageList(); - } - } - /** - * - * - *
-         * Body rows of the table.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; - * - */ - public int getBodyRowsCount() { - if (bodyRowsBuilder_ == null) { - return bodyRows_.size(); - } else { - return bodyRowsBuilder_.getCount(); - } - } - /** - * - * - *
-         * Body rows of the table.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; - * - */ - public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow getBodyRows( - int index) { - if (bodyRowsBuilder_ == null) { - return bodyRows_.get(index); - } else { - return bodyRowsBuilder_.getMessage(index); - } - } - /** - * - * - *
-         * Body rows of the table.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; - * - */ - public Builder setBodyRows( - int index, com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow value) { - if (bodyRowsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBodyRowsIsMutable(); - bodyRows_.set(index, value); - onChanged(); - } else { - bodyRowsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-         * Body rows of the table.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; - * - */ - public Builder setBodyRows( - int index, - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.Builder - builderForValue) { - if (bodyRowsBuilder_ == null) { - ensureBodyRowsIsMutable(); - bodyRows_.set(index, builderForValue.build()); - onChanged(); - } else { - bodyRowsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-         * Body rows of the table.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; - * - */ - public Builder addBodyRows( - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow value) { - if (bodyRowsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBodyRowsIsMutable(); - bodyRows_.add(value); - onChanged(); - } else { - bodyRowsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-         * Body rows of the table.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; - * - */ - public Builder addBodyRows( - int index, com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow value) { - if (bodyRowsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.Page.Symbol) + private static final com.google.cloud.documentai.v1beta2.Document.Page.Symbol + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta2.Document.Page.Symbol(); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.Symbol getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Symbol parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } - ensureBodyRowsIsMutable(); - bodyRows_.add(index, value); - onChanged(); - } else { - bodyRowsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-         * Body rows of the table.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; - * - */ - public Builder addBodyRows( - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.Builder - builderForValue) { - if (bodyRowsBuilder_ == null) { + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Symbol getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface VisualElementOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.Page.VisualElement) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+       * [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * + * @return Whether the layout field is set. + */ + boolean hasLayout(); + /** + * + * + *
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+       * [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * + * @return The layout. + */ + com.google.cloud.documentai.v1beta2.Document.Page.Layout getLayout(); + /** + * + * + *
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+       * [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder getLayoutOrBuilder(); + + /** + * + * + *
+       * Type of the
+       * [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
+       * 
+ * + * string type = 2; + * + * @return The type. + */ + java.lang.String getType(); + /** + * + * + *
+       * Type of the
+       * [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
+       * 
+ * + * string type = 2; + * + * @return The bytes for type. + */ + com.google.protobuf.ByteString getTypeBytes(); + + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + java.util.List + getDetectedLanguagesList(); + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage getDetectedLanguages( + int index); + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + int getDetectedLanguagesCount(); + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> + getDetectedLanguagesOrBuilderList(); + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder + getDetectedLanguagesOrBuilder(int index); + } + /** + * + * + *
+     * Detected non-text visual elements e.g. checkbox, signature etc. on the
+     * page.
+     * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.VisualElement} + */ + public static final class VisualElement extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.Page.VisualElement) + VisualElementOrBuilder { + private static final long serialVersionUID = 0L; + // Use VisualElement.newBuilder() to construct. + private VisualElement(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VisualElement() { + type_ = ""; + detectedLanguages_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VisualElement(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_VisualElement_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_VisualElement_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Document.Page.VisualElement.class, + com.google.cloud.documentai.v1beta2.Document.Page.VisualElement.Builder.class); + } + + public static final int LAYOUT_FIELD_NUMBER = 1; + private com.google.cloud.documentai.v1beta2.Document.Page.Layout layout_; + /** + * + * + *
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+       * [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * + * @return Whether the layout field is set. + */ + @java.lang.Override + public boolean hasLayout() { + return layout_ != null; + } + /** + * + * + *
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+       * [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * + * @return The layout. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Layout getLayout() { + return layout_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() + : layout_; + } + /** + * + * + *
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+       * [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder + getLayoutOrBuilder() { + return layout_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() + : layout_; + } + + public static final int TYPE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object type_ = ""; + /** + * + * + *
+       * Type of the
+       * [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
+       * 
+ * + * string type = 2; + * + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + 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(); + type_ = s; + return s; + } + } + /** + * + * + *
+       * Type of the
+       * [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
+       * 
+ * + * string type = 2; + * + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DETECTED_LANGUAGES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List + detectedLanguages_; + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + @java.lang.Override + public java.util.List + getDetectedLanguagesList() { + return detectedLanguages_; + } + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> + getDetectedLanguagesOrBuilderList() { + return detectedLanguages_; + } + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + @java.lang.Override + public int getDetectedLanguagesCount() { + return detectedLanguages_.size(); + } + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage + getDetectedLanguages(int index) { + return detectedLanguages_.get(index); + } + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder + getDetectedLanguagesOrBuilder(int index) { + return detectedLanguages_.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 (layout_ != null) { + output.writeMessage(1, getLayout()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, type_); + } + for (int i = 0; i < detectedLanguages_.size(); i++) { + output.writeMessage(3, detectedLanguages_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (layout_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getLayout()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, type_); + } + for (int i = 0; i < detectedLanguages_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, detectedLanguages_.get(i)); + } + size += getUnknownFields().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.v1beta2.Document.Page.VisualElement)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta2.Document.Page.VisualElement other = + (com.google.cloud.documentai.v1beta2.Document.Page.VisualElement) obj; + + if (hasLayout() != other.hasLayout()) return false; + if (hasLayout()) { + if (!getLayout().equals(other.getLayout())) return false; + } + if (!getType().equals(other.getType())) return false; + if (!getDetectedLanguagesList().equals(other.getDetectedLanguagesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasLayout()) { + hash = (37 * hash) + LAYOUT_FIELD_NUMBER; + hash = (53 * hash) + getLayout().hashCode(); + } + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + if (getDetectedLanguagesCount() > 0) { + hash = (37 * hash) + DETECTED_LANGUAGES_FIELD_NUMBER; + hash = (53 * hash) + getDetectedLanguagesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.VisualElement parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.VisualElement 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.v1beta2.Document.Page.VisualElement parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.VisualElement 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.v1beta2.Document.Page.VisualElement parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.VisualElement parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.VisualElement parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.VisualElement 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.v1beta2.Document.Page.VisualElement + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.VisualElement + 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.v1beta2.Document.Page.VisualElement parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.VisualElement 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.v1beta2.Document.Page.VisualElement 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; + } + /** + * + * + *
+       * Detected non-text visual elements e.g. checkbox, signature etc. on the
+       * page.
+       * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.VisualElement} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.Page.VisualElement) + com.google.cloud.documentai.v1beta2.Document.Page.VisualElementOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_VisualElement_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_VisualElement_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Document.Page.VisualElement.class, + com.google.cloud.documentai.v1beta2.Document.Page.VisualElement.Builder.class); + } + + // Construct using + // com.google.cloud.documentai.v1beta2.Document.Page.VisualElement.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + layout_ = null; + if (layoutBuilder_ != null) { + layoutBuilder_.dispose(); + layoutBuilder_ = null; + } + type_ = ""; + if (detectedLanguagesBuilder_ == null) { + detectedLanguages_ = java.util.Collections.emptyList(); + } else { + detectedLanguages_ = null; + detectedLanguagesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_VisualElement_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.VisualElement + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta2.Document.Page.VisualElement + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.VisualElement build() { + com.google.cloud.documentai.v1beta2.Document.Page.VisualElement result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.VisualElement buildPartial() { + com.google.cloud.documentai.v1beta2.Document.Page.VisualElement result = + new com.google.cloud.documentai.v1beta2.Document.Page.VisualElement(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.documentai.v1beta2.Document.Page.VisualElement result) { + if (detectedLanguagesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + detectedLanguages_ = java.util.Collections.unmodifiableList(detectedLanguages_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.detectedLanguages_ = detectedLanguages_; + } else { + result.detectedLanguages_ = detectedLanguagesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.documentai.v1beta2.Document.Page.VisualElement result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.layout_ = layoutBuilder_ == null ? layout_ : layoutBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.type_ = type_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta2.Document.Page.VisualElement) { + return mergeFrom( + (com.google.cloud.documentai.v1beta2.Document.Page.VisualElement) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1beta2.Document.Page.VisualElement other) { + if (other + == com.google.cloud.documentai.v1beta2.Document.Page.VisualElement + .getDefaultInstance()) return this; + if (other.hasLayout()) { + mergeLayout(other.getLayout()); + } + if (!other.getType().isEmpty()) { + type_ = other.type_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (detectedLanguagesBuilder_ == null) { + if (!other.detectedLanguages_.isEmpty()) { + if (detectedLanguages_.isEmpty()) { + detectedLanguages_ = other.detectedLanguages_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.addAll(other.detectedLanguages_); + } + onChanged(); + } + } else { + if (!other.detectedLanguages_.isEmpty()) { + if (detectedLanguagesBuilder_.isEmpty()) { + detectedLanguagesBuilder_.dispose(); + detectedLanguagesBuilder_ = null; + detectedLanguages_ = other.detectedLanguages_; + bitField0_ = (bitField0_ & ~0x00000004); + detectedLanguagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDetectedLanguagesFieldBuilder() + : null; + } else { + detectedLanguagesBuilder_.addAllMessages(other.detectedLanguages_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getLayoutFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage m = + input.readMessage( + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage + .parser(), + extensionRegistry); + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(m); + } else { + detectedLanguagesBuilder_.addMessage(m); + } + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.documentai.v1beta2.Document.Page.Layout layout_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Layout, + com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder> + layoutBuilder_; + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * + * @return Whether the layout field is set. + */ + public boolean hasLayout() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * + * @return The layout. + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Layout getLayout() { + if (layoutBuilder_ == null) { + return layout_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() + : layout_; + } else { + return layoutBuilder_.getMessage(); + } + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + public Builder setLayout(com.google.cloud.documentai.v1beta2.Document.Page.Layout value) { + if (layoutBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + layout_ = value; + } else { + layoutBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + public Builder setLayout( + com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder builderForValue) { + if (layoutBuilder_ == null) { + layout_ = builderForValue.build(); + } else { + layoutBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + public Builder mergeLayout(com.google.cloud.documentai.v1beta2.Document.Page.Layout value) { + if (layoutBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && layout_ != null + && layout_ + != com.google.cloud.documentai.v1beta2.Document.Page.Layout + .getDefaultInstance()) { + getLayoutBuilder().mergeFrom(value); + } else { + layout_ = value; + } + } else { + layoutBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + public Builder clearLayout() { + bitField0_ = (bitField0_ & ~0x00000001); + layout_ = null; + if (layoutBuilder_ != null) { + layoutBuilder_.dispose(); + layoutBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder getLayoutBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getLayoutFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + public com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder + getLayoutOrBuilder() { + if (layoutBuilder_ != null) { + return layoutBuilder_.getMessageOrBuilder(); + } else { + return layout_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() + : layout_; + } + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Layout, + com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder> + getLayoutFieldBuilder() { + if (layoutBuilder_ == null) { + layoutBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Layout, + com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder>( + getLayout(), getParentForChildren(), isClean()); + layout_ = null; + } + return layoutBuilder_; + } + + private java.lang.Object type_ = ""; + /** + * + * + *
+         * Type of the
+         * [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
+         * 
+ * + * string type = 2; + * + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Type of the
+         * [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
+         * 
+ * + * string type = 2; + * + * @return The bytes for type. + */ + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Type of the
+         * [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
+         * 
+ * + * string type = 2; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Type of the
+         * [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
+         * 
+ * + * string type = 2; + * + * @return This builder for chaining. + */ + public Builder clearType() { + type_ = getDefaultInstance().getType(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+         * Type of the
+         * [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement].
+         * 
+ * + * string type = 2; + * + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + type_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.util.List + detectedLanguages_ = java.util.Collections.emptyList(); + + private void ensureDetectedLanguagesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + detectedLanguages_ = + new java.util.ArrayList< + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage>( + detectedLanguages_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> + detectedLanguagesBuilder_; + + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + public java.util.List + getDetectedLanguagesList() { + if (detectedLanguagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(detectedLanguages_); + } else { + return detectedLanguagesBuilder_.getMessageList(); + } + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + public int getDetectedLanguagesCount() { + if (detectedLanguagesBuilder_ == null) { + return detectedLanguages_.size(); + } else { + return detectedLanguagesBuilder_.getCount(); + } + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage + getDetectedLanguages(int index) { + if (detectedLanguagesBuilder_ == null) { + return detectedLanguages_.get(index); + } else { + return detectedLanguagesBuilder_.getMessage(index); + } + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + public Builder setDetectedLanguages( + int index, com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { + if (detectedLanguagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.set(index, value); + onChanged(); + } else { + detectedLanguagesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + public Builder setDetectedLanguages( + int index, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + builderForValue) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.set(index, builderForValue.build()); + onChanged(); + } else { + detectedLanguagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + public Builder addDetectedLanguages( + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { + if (detectedLanguagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(value); + onChanged(); + } else { + detectedLanguagesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + public Builder addDetectedLanguages( + int index, com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { + if (detectedLanguagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(index, value); + onChanged(); + } else { + detectedLanguagesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + public Builder addDetectedLanguages( + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + builderForValue) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(builderForValue.build()); + onChanged(); + } else { + detectedLanguagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + public Builder addDetectedLanguages( + int index, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + builderForValue) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(index, builderForValue.build()); + onChanged(); + } else { + detectedLanguagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + public Builder addAllDetectedLanguages( + java.lang.Iterable< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage> + values) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, detectedLanguages_); + onChanged(); + } else { + detectedLanguagesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + public Builder clearDetectedLanguages() { + if (detectedLanguagesBuilder_ == null) { + detectedLanguages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + detectedLanguagesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + public Builder removeDetectedLanguages(int index) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.remove(index); + onChanged(); + } else { + detectedLanguagesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + getDetectedLanguagesBuilder(int index) { + return getDetectedLanguagesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder + getDetectedLanguagesOrBuilder(int index) { + if (detectedLanguagesBuilder_ == null) { + return detectedLanguages_.get(index); + } else { + return detectedLanguagesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + public java.util.List< + ? extends + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> + getDetectedLanguagesOrBuilderList() { + if (detectedLanguagesBuilder_ != null) { + return detectedLanguagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(detectedLanguages_); + } + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + addDetectedLanguagesBuilder() { + return getDetectedLanguagesFieldBuilder() + .addBuilder( + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage + .getDefaultInstance()); + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + addDetectedLanguagesBuilder(int index) { + return getDetectedLanguagesFieldBuilder() + .addBuilder( + index, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage + .getDefaultInstance()); + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 3; + * + */ + public java.util.List< + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder> + getDetectedLanguagesBuilderList() { + return getDetectedLanguagesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> + getDetectedLanguagesFieldBuilder() { + if (detectedLanguagesBuilder_ == null) { + detectedLanguagesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder>( + detectedLanguages_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + detectedLanguages_ = null; + } + return detectedLanguagesBuilder_; + } + + @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.v1beta2.Document.Page.VisualElement) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.Page.VisualElement) + private static final com.google.cloud.documentai.v1beta2.Document.Page.VisualElement + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta2.Document.Page.VisualElement(); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.VisualElement + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VisualElement parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.VisualElement + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TableOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.Page.Table) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+       * [Table][google.cloud.documentai.v1beta2.Document.Page.Table].
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * + * @return Whether the layout field is set. + */ + boolean hasLayout(); + /** + * + * + *
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+       * [Table][google.cloud.documentai.v1beta2.Document.Page.Table].
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * + * @return The layout. + */ + com.google.cloud.documentai.v1beta2.Document.Page.Layout getLayout(); + /** + * + * + *
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+       * [Table][google.cloud.documentai.v1beta2.Document.Page.Table].
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder getLayoutOrBuilder(); + + /** + * + * + *
+       * Header rows of the table.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * + */ + java.util.List + getHeaderRowsList(); + /** + * + * + *
+       * Header rows of the table.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * + */ + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow getHeaderRows(int index); + /** + * + * + *
+       * Header rows of the table.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * + */ + int getHeaderRowsCount(); + /** + * + * + *
+       * Header rows of the table.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * + */ + java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRowOrBuilder> + getHeaderRowsOrBuilderList(); + /** + * + * + *
+       * Header rows of the table.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * + */ + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRowOrBuilder + getHeaderRowsOrBuilder(int index); + + /** + * + * + *
+       * Body rows of the table.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; + * + */ + java.util.List + getBodyRowsList(); + /** + * + * + *
+       * Body rows of the table.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; + * + */ + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow getBodyRows(int index); + /** + * + * + *
+       * Body rows of the table.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; + * + */ + int getBodyRowsCount(); + /** + * + * + *
+       * Body rows of the table.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; + * + */ + java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRowOrBuilder> + getBodyRowsOrBuilderList(); + /** + * + * + *
+       * Body rows of the table.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; + * + */ + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRowOrBuilder + getBodyRowsOrBuilder(int index); + + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + java.util.List + getDetectedLanguagesList(); + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage getDetectedLanguages( + int index); + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + int getDetectedLanguagesCount(); + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> + getDetectedLanguagesOrBuilderList(); + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder + getDetectedLanguagesOrBuilder(int index); + + /** + * + * + *
+       * The history of this table.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 5 [deprecated = true]; + * + * + * @deprecated google.cloud.documentai.v1beta2.Document.Page.Table.provenance is deprecated. + * See google/cloud/documentai/v1beta2/document.proto;l=421 + * @return Whether the provenance field is set. + */ + @java.lang.Deprecated + boolean hasProvenance(); + /** + * + * + *
+       * The history of this table.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 5 [deprecated = true]; + * + * + * @deprecated google.cloud.documentai.v1beta2.Document.Page.Table.provenance is deprecated. + * See google/cloud/documentai/v1beta2/document.proto;l=421 + * @return The provenance. + */ + @java.lang.Deprecated + com.google.cloud.documentai.v1beta2.Document.Provenance getProvenance(); + /** + * + * + *
+       * The history of this table.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 5 [deprecated = true]; + * + */ + @java.lang.Deprecated + com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder getProvenanceOrBuilder(); + } + /** + * + * + *
+     * A table representation similar to HTML table structure.
+     * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.Table} + */ + public static final class Table extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.Page.Table) + TableOrBuilder { + private static final long serialVersionUID = 0L; + // Use Table.newBuilder() to construct. + private Table(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Table() { + headerRows_ = java.util.Collections.emptyList(); + bodyRows_ = java.util.Collections.emptyList(); + detectedLanguages_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Table(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Table_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Table_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Document.Page.Table.class, + com.google.cloud.documentai.v1beta2.Document.Page.Table.Builder.class); + } + + public interface TableRowOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.Page.Table.TableRow) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * Cells that make up this row.
+         * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; + * + */ + java.util.List + getCellsList(); + /** + * + * + *
+         * Cells that make up this row.
+         * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; + * + */ + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell getCells(int index); + /** + * + * + *
+         * Cells that make up this row.
+         * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; + * + */ + int getCellsCount(); + /** + * + * + *
+         * Cells that make up this row.
+         * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; + * + */ + java.util.List< + ? extends + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCellOrBuilder> + getCellsOrBuilderList(); + /** + * + * + *
+         * Cells that make up this row.
+         * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; + * + */ + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCellOrBuilder + getCellsOrBuilder(int index); + } + /** + * + * + *
+       * A row of table cells.
+       * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.Table.TableRow} + */ + public static final class TableRow extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.Page.Table.TableRow) + TableRowOrBuilder { + private static final long serialVersionUID = 0L; + // Use TableRow.newBuilder() to construct. + private TableRow(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TableRow() { + cells_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TableRow(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Table_TableRow_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Table_TableRow_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.class, + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.Builder.class); + } + + public static final int CELLS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + cells_; + /** + * + * + *
+         * Cells that make up this row.
+         * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; + * + */ + @java.lang.Override + public java.util.List + getCellsList() { + return cells_; + } + /** + * + * + *
+         * Cells that make up this row.
+         * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCellOrBuilder> + getCellsOrBuilderList() { + return cells_; + } + /** + * + * + *
+         * Cells that make up this row.
+         * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; + * + */ + @java.lang.Override + public int getCellsCount() { + return cells_.size(); + } + /** + * + * + *
+         * Cells that make up this row.
+         * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell getCells( + int index) { + return cells_.get(index); + } + /** + * + * + *
+         * Cells that make up this row.
+         * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCellOrBuilder + getCellsOrBuilder(int index) { + return cells_.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 < cells_.size(); i++) { + output.writeMessage(1, cells_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < cells_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, cells_.get(i)); + } + size += getUnknownFields().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.v1beta2.Document.Page.Table.TableRow)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow other = + (com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow) obj; + + if (!getCellsList().equals(other.getCellsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getCellsCount() > 0) { + hash = (37 * hash) + CELLS_FIELD_NUMBER; + hash = (53 * hash) + getCellsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow 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.v1beta2.Document.Page.Table.TableRow parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow 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.v1beta2.Document.Page.Table.TableRow parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow 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.v1beta2.Document.Page.Table.TableRow + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow + 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.v1beta2.Document.Page.Table.TableRow parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow 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.v1beta2.Document.Page.Table.TableRow 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 row of table cells.
+         * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.Table.TableRow} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.Page.Table.TableRow) + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRowOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Table_TableRow_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Table_TableRow_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.class, + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.Builder.class); + } + + // Construct using + // com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (cellsBuilder_ == null) { + cells_ = java.util.Collections.emptyList(); + } else { + cells_ = null; + cellsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Table_TableRow_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow build() { + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow buildPartial() { + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow result = + new com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow result) { + if (cellsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + cells_ = java.util.Collections.unmodifiableList(cells_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.cells_ = cells_; + } else { + result.cells_ = cellsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow) { + return mergeFrom( + (com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow other) { + if (other + == com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow + .getDefaultInstance()) return this; + if (cellsBuilder_ == null) { + if (!other.cells_.isEmpty()) { + if (cells_.isEmpty()) { + cells_ = other.cells_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCellsIsMutable(); + cells_.addAll(other.cells_); + } + onChanged(); + } + } else { + if (!other.cells_.isEmpty()) { + if (cellsBuilder_.isEmpty()) { + cellsBuilder_.dispose(); + cellsBuilder_ = null; + cells_ = other.cells_; + bitField0_ = (bitField0_ & ~0x00000001); + cellsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getCellsFieldBuilder() + : null; + } else { + cellsBuilder_.addAllMessages(other.cells_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell m = + input.readMessage( + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell + .parser(), + extensionRegistry); + if (cellsBuilder_ == null) { + ensureCellsIsMutable(); + cells_.add(m); + } else { + cellsBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + cells_ = java.util.Collections.emptyList(); + + private void ensureCellsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + cells_ = + new java.util.ArrayList< + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell>(cells_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell, + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCellOrBuilder> + cellsBuilder_; + + /** + * + * + *
+           * Cells that make up this row.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; + * + */ + public java.util.List + getCellsList() { + if (cellsBuilder_ == null) { + return java.util.Collections.unmodifiableList(cells_); + } else { + return cellsBuilder_.getMessageList(); + } + } + /** + * + * + *
+           * Cells that make up this row.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; + * + */ + public int getCellsCount() { + if (cellsBuilder_ == null) { + return cells_.size(); + } else { + return cellsBuilder_.getCount(); + } + } + /** + * + * + *
+           * Cells that make up this row.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell getCells( + int index) { + if (cellsBuilder_ == null) { + return cells_.get(index); + } else { + return cellsBuilder_.getMessage(index); + } + } + /** + * + * + *
+           * Cells that make up this row.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; + * + */ + public Builder setCells( + int index, com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell value) { + if (cellsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCellsIsMutable(); + cells_.set(index, value); + onChanged(); + } else { + cellsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+           * Cells that make up this row.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; + * + */ + public Builder setCells( + int index, + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell.Builder + builderForValue) { + if (cellsBuilder_ == null) { + ensureCellsIsMutable(); + cells_.set(index, builderForValue.build()); + onChanged(); + } else { + cellsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+           * Cells that make up this row.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; + * + */ + public Builder addCells( + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell value) { + if (cellsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCellsIsMutable(); + cells_.add(value); + onChanged(); + } else { + cellsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+           * Cells that make up this row.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; + * + */ + public Builder addCells( + int index, com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell value) { + if (cellsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCellsIsMutable(); + cells_.add(index, value); + onChanged(); + } else { + cellsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+           * Cells that make up this row.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; + * + */ + public Builder addCells( + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell.Builder + builderForValue) { + if (cellsBuilder_ == null) { + ensureCellsIsMutable(); + cells_.add(builderForValue.build()); + onChanged(); + } else { + cellsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+           * Cells that make up this row.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; + * + */ + public Builder addCells( + int index, + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell.Builder + builderForValue) { + if (cellsBuilder_ == null) { + ensureCellsIsMutable(); + cells_.add(index, builderForValue.build()); + onChanged(); + } else { + cellsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+           * Cells that make up this row.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; + * + */ + public Builder addAllCells( + java.lang.Iterable< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell> + values) { + if (cellsBuilder_ == null) { + ensureCellsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, cells_); + onChanged(); + } else { + cellsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+           * Cells that make up this row.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; + * + */ + public Builder clearCells() { + if (cellsBuilder_ == null) { + cells_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + cellsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+           * Cells that make up this row.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; + * + */ + public Builder removeCells(int index) { + if (cellsBuilder_ == null) { + ensureCellsIsMutable(); + cells_.remove(index); + onChanged(); + } else { + cellsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+           * Cells that make up this row.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell.Builder + getCellsBuilder(int index) { + return getCellsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+           * Cells that make up this row.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCellOrBuilder + getCellsOrBuilder(int index) { + if (cellsBuilder_ == null) { + return cells_.get(index); + } else { + return cellsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+           * Cells that make up this row.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; + * + */ + public java.util.List< + ? extends + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCellOrBuilder> + getCellsOrBuilderList() { + if (cellsBuilder_ != null) { + return cellsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(cells_); + } + } + /** + * + * + *
+           * Cells that make up this row.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell.Builder + addCellsBuilder() { + return getCellsFieldBuilder() + .addBuilder( + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell + .getDefaultInstance()); + } + /** + * + * + *
+           * Cells that make up this row.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell.Builder + addCellsBuilder(int index) { + return getCellsFieldBuilder() + .addBuilder( + index, + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell + .getDefaultInstance()); + } + /** + * + * + *
+           * Cells that make up this row.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableCell cells = 1; + * + */ + public java.util.List< + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell.Builder> + getCellsBuilderList() { + return getCellsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell, + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCellOrBuilder> + getCellsFieldBuilder() { + if (cellsBuilder_ == null) { + cellsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell, + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCellOrBuilder>( + cells_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + cells_ = null; + } + return cellsBuilder_; + } + + @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.v1beta2.Document.Page.Table.TableRow) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.Page.Table.TableRow) + private static final com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow(); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TableRow parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TableCellOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.Page.Table.TableCell) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [TableCell][google.cloud.documentai.v1beta2.Document.Page.Table.TableCell].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * + * @return Whether the layout field is set. + */ + boolean hasLayout(); + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [TableCell][google.cloud.documentai.v1beta2.Document.Page.Table.TableCell].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * + * @return The layout. + */ + com.google.cloud.documentai.v1beta2.Document.Page.Layout getLayout(); + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [TableCell][google.cloud.documentai.v1beta2.Document.Page.Table.TableCell].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder getLayoutOrBuilder(); + + /** + * + * + *
+         * How many rows this cell spans.
+         * 
+ * + * int32 row_span = 2; + * + * @return The rowSpan. + */ + int getRowSpan(); + + /** + * + * + *
+         * How many columns this cell spans.
+         * 
+ * + * int32 col_span = 3; + * + * @return The colSpan. + */ + int getColSpan(); + + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + java.util.List + getDetectedLanguagesList(); + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage getDetectedLanguages( + int index); + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + int getDetectedLanguagesCount(); + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + java.util.List< + ? extends + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> + getDetectedLanguagesOrBuilderList(); + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder + getDetectedLanguagesOrBuilder(int index); + } + /** + * + * + *
+       * A cell representation inside the table.
+       * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.Table.TableCell} + */ + public static final class TableCell extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.Page.Table.TableCell) + TableCellOrBuilder { + private static final long serialVersionUID = 0L; + // Use TableCell.newBuilder() to construct. + private TableCell(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TableCell() { + detectedLanguages_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TableCell(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Table_TableCell_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Table_TableCell_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell.class, + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell.Builder.class); + } + + public static final int LAYOUT_FIELD_NUMBER = 1; + private com.google.cloud.documentai.v1beta2.Document.Page.Layout layout_; + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [TableCell][google.cloud.documentai.v1beta2.Document.Page.Table.TableCell].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * + * @return Whether the layout field is set. + */ + @java.lang.Override + public boolean hasLayout() { + return layout_ != null; + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [TableCell][google.cloud.documentai.v1beta2.Document.Page.Table.TableCell].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * + * @return The layout. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Layout getLayout() { + return layout_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() + : layout_; + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [TableCell][google.cloud.documentai.v1beta2.Document.Page.Table.TableCell].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder + getLayoutOrBuilder() { + return layout_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() + : layout_; + } + + public static final int ROW_SPAN_FIELD_NUMBER = 2; + private int rowSpan_ = 0; + /** + * + * + *
+         * How many rows this cell spans.
+         * 
+ * + * int32 row_span = 2; + * + * @return The rowSpan. + */ + @java.lang.Override + public int getRowSpan() { + return rowSpan_; + } + + public static final int COL_SPAN_FIELD_NUMBER = 3; + private int colSpan_ = 0; + /** + * + * + *
+         * How many columns this cell spans.
+         * 
+ * + * int32 col_span = 3; + * + * @return The colSpan. + */ + @java.lang.Override + public int getColSpan() { + return colSpan_; + } + + public static final int DETECTED_LANGUAGES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List + detectedLanguages_; + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + @java.lang.Override + public java.util.List + getDetectedLanguagesList() { + return detectedLanguages_; + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> + getDetectedLanguagesOrBuilderList() { + return detectedLanguages_; + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + @java.lang.Override + public int getDetectedLanguagesCount() { + return detectedLanguages_.size(); + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage + getDetectedLanguages(int index) { + return detectedLanguages_.get(index); + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder + getDetectedLanguagesOrBuilder(int index) { + return detectedLanguages_.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 (layout_ != null) { + output.writeMessage(1, getLayout()); + } + if (rowSpan_ != 0) { + output.writeInt32(2, rowSpan_); + } + if (colSpan_ != 0) { + output.writeInt32(3, colSpan_); + } + for (int i = 0; i < detectedLanguages_.size(); i++) { + output.writeMessage(4, detectedLanguages_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (layout_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getLayout()); + } + if (rowSpan_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, rowSpan_); + } + if (colSpan_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, colSpan_); + } + for (int i = 0; i < detectedLanguages_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, detectedLanguages_.get(i)); + } + size += getUnknownFields().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.v1beta2.Document.Page.Table.TableCell)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell other = + (com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell) obj; + + if (hasLayout() != other.hasLayout()) return false; + if (hasLayout()) { + if (!getLayout().equals(other.getLayout())) return false; + } + if (getRowSpan() != other.getRowSpan()) return false; + if (getColSpan() != other.getColSpan()) return false; + if (!getDetectedLanguagesList().equals(other.getDetectedLanguagesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasLayout()) { + hash = (37 * hash) + LAYOUT_FIELD_NUMBER; + hash = (53 * hash) + getLayout().hashCode(); + } + hash = (37 * hash) + ROW_SPAN_FIELD_NUMBER; + hash = (53 * hash) + getRowSpan(); + hash = (37 * hash) + COL_SPAN_FIELD_NUMBER; + hash = (53 * hash) + getColSpan(); + if (getDetectedLanguagesCount() > 0) { + hash = (37 * hash) + DETECTED_LANGUAGES_FIELD_NUMBER; + hash = (53 * hash) + getDetectedLanguagesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell 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.v1beta2.Document.Page.Table.TableCell parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell 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.v1beta2.Document.Page.Table.TableCell parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell 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.v1beta2.Document.Page.Table.TableCell + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell + 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.v1beta2.Document.Page.Table.TableCell parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell 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.v1beta2.Document.Page.Table.TableCell 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 cell representation inside the table.
+         * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.Table.TableCell} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.Page.Table.TableCell) + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCellOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Table_TableCell_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Table_TableCell_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell.class, + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell.Builder + .class); + } + + // Construct using + // com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + layout_ = null; + if (layoutBuilder_ != null) { + layoutBuilder_.dispose(); + layoutBuilder_ = null; + } + rowSpan_ = 0; + colSpan_ = 0; + if (detectedLanguagesBuilder_ == null) { + detectedLanguages_ = java.util.Collections.emptyList(); + } else { + detectedLanguages_ = null; + detectedLanguagesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Table_TableCell_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell build() { + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell buildPartial() { + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell result = + new com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell result) { + if (detectedLanguagesBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + detectedLanguages_ = java.util.Collections.unmodifiableList(detectedLanguages_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.detectedLanguages_ = detectedLanguages_; + } else { + result.detectedLanguages_ = detectedLanguagesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.layout_ = layoutBuilder_ == null ? layout_ : layoutBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.rowSpan_ = rowSpan_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.colSpan_ = colSpan_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell) { + return mergeFrom( + (com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell other) { + if (other + == com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell + .getDefaultInstance()) return this; + if (other.hasLayout()) { + mergeLayout(other.getLayout()); + } + if (other.getRowSpan() != 0) { + setRowSpan(other.getRowSpan()); + } + if (other.getColSpan() != 0) { + setColSpan(other.getColSpan()); + } + if (detectedLanguagesBuilder_ == null) { + if (!other.detectedLanguages_.isEmpty()) { + if (detectedLanguages_.isEmpty()) { + detectedLanguages_ = other.detectedLanguages_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.addAll(other.detectedLanguages_); + } + onChanged(); + } + } else { + if (!other.detectedLanguages_.isEmpty()) { + if (detectedLanguagesBuilder_.isEmpty()) { + detectedLanguagesBuilder_.dispose(); + detectedLanguagesBuilder_ = null; + detectedLanguages_ = other.detectedLanguages_; + bitField0_ = (bitField0_ & ~0x00000008); + detectedLanguagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDetectedLanguagesFieldBuilder() + : null; + } else { + detectedLanguagesBuilder_.addAllMessages(other.detectedLanguages_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getLayoutFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + rowSpan_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + colSpan_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage m = + input.readMessage( + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage + .parser(), + extensionRegistry); + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(m); + } else { + detectedLanguagesBuilder_.addMessage(m); + } + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.documentai.v1beta2.Document.Page.Layout layout_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Layout, + com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder> + layoutBuilder_; + /** + * + * + *
+           * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+           * [TableCell][google.cloud.documentai.v1beta2.Document.Page.Table.TableCell].
+           * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * + * @return Whether the layout field is set. + */ + public boolean hasLayout() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+           * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+           * [TableCell][google.cloud.documentai.v1beta2.Document.Page.Table.TableCell].
+           * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * + * @return The layout. + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Layout getLayout() { + if (layoutBuilder_ == null) { + return layout_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() + : layout_; + } else { + return layoutBuilder_.getMessage(); + } + } + /** + * + * + *
+           * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+           * [TableCell][google.cloud.documentai.v1beta2.Document.Page.Table.TableCell].
+           * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + public Builder setLayout(com.google.cloud.documentai.v1beta2.Document.Page.Layout value) { + if (layoutBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + layout_ = value; + } else { + layoutBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+           * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+           * [TableCell][google.cloud.documentai.v1beta2.Document.Page.Table.TableCell].
+           * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + public Builder setLayout( + com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder builderForValue) { + if (layoutBuilder_ == null) { + layout_ = builderForValue.build(); + } else { + layoutBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+           * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+           * [TableCell][google.cloud.documentai.v1beta2.Document.Page.Table.TableCell].
+           * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + public Builder mergeLayout( + com.google.cloud.documentai.v1beta2.Document.Page.Layout value) { + if (layoutBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && layout_ != null + && layout_ + != com.google.cloud.documentai.v1beta2.Document.Page.Layout + .getDefaultInstance()) { + getLayoutBuilder().mergeFrom(value); + } else { + layout_ = value; + } + } else { + layoutBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+           * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+           * [TableCell][google.cloud.documentai.v1beta2.Document.Page.Table.TableCell].
+           * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + public Builder clearLayout() { + bitField0_ = (bitField0_ & ~0x00000001); + layout_ = null; + if (layoutBuilder_ != null) { + layoutBuilder_.dispose(); + layoutBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+           * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+           * [TableCell][google.cloud.documentai.v1beta2.Document.Page.Table.TableCell].
+           * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder + getLayoutBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getLayoutFieldBuilder().getBuilder(); + } + /** + * + * + *
+           * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+           * [TableCell][google.cloud.documentai.v1beta2.Document.Page.Table.TableCell].
+           * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + public com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder + getLayoutOrBuilder() { + if (layoutBuilder_ != null) { + return layoutBuilder_.getMessageOrBuilder(); + } else { + return layout_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() + : layout_; + } + } + /** + * + * + *
+           * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+           * [TableCell][google.cloud.documentai.v1beta2.Document.Page.Table.TableCell].
+           * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Layout, + com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder> + getLayoutFieldBuilder() { + if (layoutBuilder_ == null) { + layoutBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Layout, + com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder>( + getLayout(), getParentForChildren(), isClean()); + layout_ = null; + } + return layoutBuilder_; + } + + private int rowSpan_; + /** + * + * + *
+           * How many rows this cell spans.
+           * 
+ * + * int32 row_span = 2; + * + * @return The rowSpan. + */ + @java.lang.Override + public int getRowSpan() { + return rowSpan_; + } + /** + * + * + *
+           * How many rows this cell spans.
+           * 
+ * + * int32 row_span = 2; + * + * @param value The rowSpan to set. + * @return This builder for chaining. + */ + public Builder setRowSpan(int value) { + + rowSpan_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+           * How many rows this cell spans.
+           * 
+ * + * int32 row_span = 2; + * + * @return This builder for chaining. + */ + public Builder clearRowSpan() { + bitField0_ = (bitField0_ & ~0x00000002); + rowSpan_ = 0; + onChanged(); + return this; + } + + private int colSpan_; + /** + * + * + *
+           * How many columns this cell spans.
+           * 
+ * + * int32 col_span = 3; + * + * @return The colSpan. + */ + @java.lang.Override + public int getColSpan() { + return colSpan_; + } + /** + * + * + *
+           * How many columns this cell spans.
+           * 
+ * + * int32 col_span = 3; + * + * @param value The colSpan to set. + * @return This builder for chaining. + */ + public Builder setColSpan(int value) { + + colSpan_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+           * How many columns this cell spans.
+           * 
+ * + * int32 col_span = 3; + * + * @return This builder for chaining. + */ + public Builder clearColSpan() { + bitField0_ = (bitField0_ & ~0x00000004); + colSpan_ = 0; + onChanged(); + return this; + } + + private java.util.List + detectedLanguages_ = java.util.Collections.emptyList(); + + private void ensureDetectedLanguagesIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + detectedLanguages_ = + new java.util.ArrayList< + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage>( + detectedLanguages_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> + detectedLanguagesBuilder_; + + /** + * + * + *
+           * A list of detected languages together with confidence.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public java.util.List + getDetectedLanguagesList() { + if (detectedLanguagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(detectedLanguages_); + } else { + return detectedLanguagesBuilder_.getMessageList(); + } + } + /** + * + * + *
+           * A list of detected languages together with confidence.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public int getDetectedLanguagesCount() { + if (detectedLanguagesBuilder_ == null) { + return detectedLanguages_.size(); + } else { + return detectedLanguagesBuilder_.getCount(); + } + } + /** + * + * + *
+           * A list of detected languages together with confidence.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage + getDetectedLanguages(int index) { + if (detectedLanguagesBuilder_ == null) { + return detectedLanguages_.get(index); + } else { + return detectedLanguagesBuilder_.getMessage(index); + } + } + /** + * + * + *
+           * A list of detected languages together with confidence.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public Builder setDetectedLanguages( + int index, com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { + if (detectedLanguagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.set(index, value); + onChanged(); + } else { + detectedLanguagesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+           * A list of detected languages together with confidence.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public Builder setDetectedLanguages( + int index, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + builderForValue) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.set(index, builderForValue.build()); + onChanged(); + } else { + detectedLanguagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+           * A list of detected languages together with confidence.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public Builder addDetectedLanguages( + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { + if (detectedLanguagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(value); + onChanged(); + } else { + detectedLanguagesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+           * A list of detected languages together with confidence.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public Builder addDetectedLanguages( + int index, com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { + if (detectedLanguagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(index, value); + onChanged(); + } else { + detectedLanguagesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+           * A list of detected languages together with confidence.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public Builder addDetectedLanguages( + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + builderForValue) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(builderForValue.build()); + onChanged(); + } else { + detectedLanguagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+           * A list of detected languages together with confidence.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public Builder addDetectedLanguages( + int index, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + builderForValue) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(index, builderForValue.build()); + onChanged(); + } else { + detectedLanguagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+           * A list of detected languages together with confidence.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public Builder addAllDetectedLanguages( + java.lang.Iterable< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage> + values) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, detectedLanguages_); + onChanged(); + } else { + detectedLanguagesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+           * A list of detected languages together with confidence.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public Builder clearDetectedLanguages() { + if (detectedLanguagesBuilder_ == null) { + detectedLanguages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + detectedLanguagesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+           * A list of detected languages together with confidence.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public Builder removeDetectedLanguages(int index) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.remove(index); + onChanged(); + } else { + detectedLanguagesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+           * A list of detected languages together with confidence.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + getDetectedLanguagesBuilder(int index) { + return getDetectedLanguagesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+           * A list of detected languages together with confidence.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder + getDetectedLanguagesOrBuilder(int index) { + if (detectedLanguagesBuilder_ == null) { + return detectedLanguages_.get(index); + } else { + return detectedLanguagesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+           * A list of detected languages together with confidence.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public java.util.List< + ? extends + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> + getDetectedLanguagesOrBuilderList() { + if (detectedLanguagesBuilder_ != null) { + return detectedLanguagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(detectedLanguages_); + } + } + /** + * + * + *
+           * A list of detected languages together with confidence.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + addDetectedLanguagesBuilder() { + return getDetectedLanguagesFieldBuilder() + .addBuilder( + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage + .getDefaultInstance()); + } + /** + * + * + *
+           * A list of detected languages together with confidence.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + addDetectedLanguagesBuilder(int index) { + return getDetectedLanguagesFieldBuilder() + .addBuilder( + index, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage + .getDefaultInstance()); + } + /** + * + * + *
+           * A list of detected languages together with confidence.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public java.util.List< + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder> + getDetectedLanguagesBuilderList() { + return getDetectedLanguagesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> + getDetectedLanguagesFieldBuilder() { + if (detectedLanguagesBuilder_ == null) { + detectedLanguagesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder>( + detectedLanguages_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + detectedLanguages_ = null; + } + return detectedLanguagesBuilder_; + } + + @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.v1beta2.Document.Page.Table.TableCell) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.Page.Table.TableCell) + private static final com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell(); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TableCell parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableCell + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int LAYOUT_FIELD_NUMBER = 1; + private com.google.cloud.documentai.v1beta2.Document.Page.Layout layout_; + /** + * + * + *
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+       * [Table][google.cloud.documentai.v1beta2.Document.Page.Table].
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * + * @return Whether the layout field is set. + */ + @java.lang.Override + public boolean hasLayout() { + return layout_ != null; + } + /** + * + * + *
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+       * [Table][google.cloud.documentai.v1beta2.Document.Page.Table].
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * + * @return The layout. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Layout getLayout() { + return layout_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() + : layout_; + } + /** + * + * + *
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+       * [Table][google.cloud.documentai.v1beta2.Document.Page.Table].
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder + getLayoutOrBuilder() { + return layout_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() + : layout_; + } + + public static final int HEADER_ROWS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List + headerRows_; + /** + * + * + *
+       * Header rows of the table.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * + */ + @java.lang.Override + public java.util.List + getHeaderRowsList() { + return headerRows_; + } + /** + * + * + *
+       * Header rows of the table.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRowOrBuilder> + getHeaderRowsOrBuilderList() { + return headerRows_; + } + /** + * + * + *
+       * Header rows of the table.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * + */ + @java.lang.Override + public int getHeaderRowsCount() { + return headerRows_.size(); + } + /** + * + * + *
+       * Header rows of the table.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow getHeaderRows( + int index) { + return headerRows_.get(index); + } + /** + * + * + *
+       * Header rows of the table.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRowOrBuilder + getHeaderRowsOrBuilder(int index) { + return headerRows_.get(index); + } + + public static final int BODY_ROWS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List + bodyRows_; + /** + * + * + *
+       * Body rows of the table.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; + * + */ + @java.lang.Override + public java.util.List + getBodyRowsList() { + return bodyRows_; + } + /** + * + * + *
+       * Body rows of the table.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRowOrBuilder> + getBodyRowsOrBuilderList() { + return bodyRows_; + } + /** + * + * + *
+       * Body rows of the table.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; + * + */ + @java.lang.Override + public int getBodyRowsCount() { + return bodyRows_.size(); + } + /** + * + * + *
+       * Body rows of the table.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow getBodyRows( + int index) { + return bodyRows_.get(index); + } + /** + * + * + *
+       * Body rows of the table.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRowOrBuilder + getBodyRowsOrBuilder(int index) { + return bodyRows_.get(index); + } + + public static final int DETECTED_LANGUAGES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List + detectedLanguages_; + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + @java.lang.Override + public java.util.List + getDetectedLanguagesList() { + return detectedLanguages_; + } + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> + getDetectedLanguagesOrBuilderList() { + return detectedLanguages_; + } + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + @java.lang.Override + public int getDetectedLanguagesCount() { + return detectedLanguages_.size(); + } + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage + getDetectedLanguages(int index) { + return detectedLanguages_.get(index); + } + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder + getDetectedLanguagesOrBuilder(int index) { + return detectedLanguages_.get(index); + } + + public static final int PROVENANCE_FIELD_NUMBER = 5; + private com.google.cloud.documentai.v1beta2.Document.Provenance provenance_; + /** + * + * + *
+       * The history of this table.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 5 [deprecated = true]; + * + * + * @deprecated google.cloud.documentai.v1beta2.Document.Page.Table.provenance is deprecated. + * See google/cloud/documentai/v1beta2/document.proto;l=421 + * @return Whether the provenance field is set. + */ + @java.lang.Override + @java.lang.Deprecated + public boolean hasProvenance() { + return provenance_ != null; + } + /** + * + * + *
+       * The history of this table.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 5 [deprecated = true]; + * + * + * @deprecated google.cloud.documentai.v1beta2.Document.Page.Table.provenance is deprecated. + * See google/cloud/documentai/v1beta2/document.proto;l=421 + * @return The provenance. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.cloud.documentai.v1beta2.Document.Provenance getProvenance() { + return provenance_ == null + ? com.google.cloud.documentai.v1beta2.Document.Provenance.getDefaultInstance() + : provenance_; + } + /** + * + * + *
+       * The history of this table.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 5 [deprecated = true]; + * + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder + getProvenanceOrBuilder() { + return provenance_ == null + ? com.google.cloud.documentai.v1beta2.Document.Provenance.getDefaultInstance() + : provenance_; + } + + 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 (layout_ != null) { + output.writeMessage(1, getLayout()); + } + for (int i = 0; i < headerRows_.size(); i++) { + output.writeMessage(2, headerRows_.get(i)); + } + for (int i = 0; i < bodyRows_.size(); i++) { + output.writeMessage(3, bodyRows_.get(i)); + } + for (int i = 0; i < detectedLanguages_.size(); i++) { + output.writeMessage(4, detectedLanguages_.get(i)); + } + if (provenance_ != null) { + output.writeMessage(5, getProvenance()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (layout_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getLayout()); + } + for (int i = 0; i < headerRows_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, headerRows_.get(i)); + } + for (int i = 0; i < bodyRows_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, bodyRows_.get(i)); + } + for (int i = 0; i < detectedLanguages_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, detectedLanguages_.get(i)); + } + if (provenance_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getProvenance()); + } + size += getUnknownFields().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.v1beta2.Document.Page.Table)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta2.Document.Page.Table other = + (com.google.cloud.documentai.v1beta2.Document.Page.Table) obj; + + if (hasLayout() != other.hasLayout()) return false; + if (hasLayout()) { + if (!getLayout().equals(other.getLayout())) return false; + } + if (!getHeaderRowsList().equals(other.getHeaderRowsList())) return false; + if (!getBodyRowsList().equals(other.getBodyRowsList())) return false; + if (!getDetectedLanguagesList().equals(other.getDetectedLanguagesList())) return false; + if (hasProvenance() != other.hasProvenance()) return false; + if (hasProvenance()) { + if (!getProvenance().equals(other.getProvenance())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasLayout()) { + hash = (37 * hash) + LAYOUT_FIELD_NUMBER; + hash = (53 * hash) + getLayout().hashCode(); + } + if (getHeaderRowsCount() > 0) { + hash = (37 * hash) + HEADER_ROWS_FIELD_NUMBER; + hash = (53 * hash) + getHeaderRowsList().hashCode(); + } + if (getBodyRowsCount() > 0) { + hash = (37 * hash) + BODY_ROWS_FIELD_NUMBER; + hash = (53 * hash) + getBodyRowsList().hashCode(); + } + if (getDetectedLanguagesCount() > 0) { + hash = (37 * hash) + DETECTED_LANGUAGES_FIELD_NUMBER; + hash = (53 * hash) + getDetectedLanguagesList().hashCode(); + } + if (hasProvenance()) { + hash = (37 * hash) + PROVENANCE_FIELD_NUMBER; + hash = (53 * hash) + getProvenance().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.Table parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.Table 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.v1beta2.Document.Page.Table parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.Table 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.v1beta2.Document.Page.Table parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.Table parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.Table parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.Table 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.v1beta2.Document.Page.Table parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.Table 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.v1beta2.Document.Page.Table parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.Table 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.v1beta2.Document.Page.Table 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 table representation similar to HTML table structure.
+       * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.Table} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.Page.Table) + com.google.cloud.documentai.v1beta2.Document.Page.TableOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Table_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Table_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Document.Page.Table.class, + com.google.cloud.documentai.v1beta2.Document.Page.Table.Builder.class); + } + + // Construct using com.google.cloud.documentai.v1beta2.Document.Page.Table.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + layout_ = null; + if (layoutBuilder_ != null) { + layoutBuilder_.dispose(); + layoutBuilder_ = null; + } + if (headerRowsBuilder_ == null) { + headerRows_ = java.util.Collections.emptyList(); + } else { + headerRows_ = null; + headerRowsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + if (bodyRowsBuilder_ == null) { + bodyRows_ = java.util.Collections.emptyList(); + } else { + bodyRows_ = null; + bodyRowsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + if (detectedLanguagesBuilder_ == null) { + detectedLanguages_ = java.util.Collections.emptyList(); + } else { + detectedLanguages_ = null; + detectedLanguagesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + provenance_ = null; + if (provenanceBuilder_ != null) { + provenanceBuilder_.dispose(); + provenanceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_Table_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Table getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta2.Document.Page.Table.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Table build() { + com.google.cloud.documentai.v1beta2.Document.Page.Table result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Table buildPartial() { + com.google.cloud.documentai.v1beta2.Document.Page.Table result = + new com.google.cloud.documentai.v1beta2.Document.Page.Table(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.documentai.v1beta2.Document.Page.Table result) { + if (headerRowsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + headerRows_ = java.util.Collections.unmodifiableList(headerRows_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.headerRows_ = headerRows_; + } else { + result.headerRows_ = headerRowsBuilder_.build(); + } + if (bodyRowsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + bodyRows_ = java.util.Collections.unmodifiableList(bodyRows_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.bodyRows_ = bodyRows_; + } else { + result.bodyRows_ = bodyRowsBuilder_.build(); + } + if (detectedLanguagesBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + detectedLanguages_ = java.util.Collections.unmodifiableList(detectedLanguages_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.detectedLanguages_ = detectedLanguages_; + } else { + result.detectedLanguages_ = detectedLanguagesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.documentai.v1beta2.Document.Page.Table result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.layout_ = layoutBuilder_ == null ? layout_ : layoutBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.provenance_ = + provenanceBuilder_ == null ? provenance_ : provenanceBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta2.Document.Page.Table) { + return mergeFrom((com.google.cloud.documentai.v1beta2.Document.Page.Table) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.documentai.v1beta2.Document.Page.Table other) { + if (other == com.google.cloud.documentai.v1beta2.Document.Page.Table.getDefaultInstance()) + return this; + if (other.hasLayout()) { + mergeLayout(other.getLayout()); + } + if (headerRowsBuilder_ == null) { + if (!other.headerRows_.isEmpty()) { + if (headerRows_.isEmpty()) { + headerRows_ = other.headerRows_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureHeaderRowsIsMutable(); + headerRows_.addAll(other.headerRows_); + } + onChanged(); + } + } else { + if (!other.headerRows_.isEmpty()) { + if (headerRowsBuilder_.isEmpty()) { + headerRowsBuilder_.dispose(); + headerRowsBuilder_ = null; + headerRows_ = other.headerRows_; + bitField0_ = (bitField0_ & ~0x00000002); + headerRowsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getHeaderRowsFieldBuilder() + : null; + } else { + headerRowsBuilder_.addAllMessages(other.headerRows_); + } + } + } + if (bodyRowsBuilder_ == null) { + if (!other.bodyRows_.isEmpty()) { + if (bodyRows_.isEmpty()) { + bodyRows_ = other.bodyRows_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureBodyRowsIsMutable(); + bodyRows_.addAll(other.bodyRows_); + } + onChanged(); + } + } else { + if (!other.bodyRows_.isEmpty()) { + if (bodyRowsBuilder_.isEmpty()) { + bodyRowsBuilder_.dispose(); + bodyRowsBuilder_ = null; + bodyRows_ = other.bodyRows_; + bitField0_ = (bitField0_ & ~0x00000004); + bodyRowsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getBodyRowsFieldBuilder() + : null; + } else { + bodyRowsBuilder_.addAllMessages(other.bodyRows_); + } + } + } + if (detectedLanguagesBuilder_ == null) { + if (!other.detectedLanguages_.isEmpty()) { + if (detectedLanguages_.isEmpty()) { + detectedLanguages_ = other.detectedLanguages_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.addAll(other.detectedLanguages_); + } + onChanged(); + } + } else { + if (!other.detectedLanguages_.isEmpty()) { + if (detectedLanguagesBuilder_.isEmpty()) { + detectedLanguagesBuilder_.dispose(); + detectedLanguagesBuilder_ = null; + detectedLanguages_ = other.detectedLanguages_; + bitField0_ = (bitField0_ & ~0x00000008); + detectedLanguagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDetectedLanguagesFieldBuilder() + : null; + } else { + detectedLanguagesBuilder_.addAllMessages(other.detectedLanguages_); + } + } + } + if (other.hasProvenance()) { + mergeProvenance(other.getProvenance()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getLayoutFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow m = + input.readMessage( + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow + .parser(), + extensionRegistry); + if (headerRowsBuilder_ == null) { + ensureHeaderRowsIsMutable(); + headerRows_.add(m); + } else { + headerRowsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow m = + input.readMessage( + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow + .parser(), + extensionRegistry); + if (bodyRowsBuilder_ == null) { + ensureBodyRowsIsMutable(); + bodyRows_.add(m); + } else { + bodyRowsBuilder_.addMessage(m); + } + break; + } // case 26 + case 34: + { + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage m = + input.readMessage( + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage + .parser(), + extensionRegistry); + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(m); + } else { + detectedLanguagesBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: + { + input.readMessage(getProvenanceFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.documentai.v1beta2.Document.Page.Layout layout_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Layout, + com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder> + layoutBuilder_; + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Table][google.cloud.documentai.v1beta2.Document.Page.Table].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * + * @return Whether the layout field is set. + */ + public boolean hasLayout() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Table][google.cloud.documentai.v1beta2.Document.Page.Table].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * + * @return The layout. + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Layout getLayout() { + if (layoutBuilder_ == null) { + return layout_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() + : layout_; + } else { + return layoutBuilder_.getMessage(); + } + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Table][google.cloud.documentai.v1beta2.Document.Page.Table].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + public Builder setLayout(com.google.cloud.documentai.v1beta2.Document.Page.Layout value) { + if (layoutBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + layout_ = value; + } else { + layoutBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Table][google.cloud.documentai.v1beta2.Document.Page.Table].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + public Builder setLayout( + com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder builderForValue) { + if (layoutBuilder_ == null) { + layout_ = builderForValue.build(); + } else { + layoutBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Table][google.cloud.documentai.v1beta2.Document.Page.Table].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + public Builder mergeLayout(com.google.cloud.documentai.v1beta2.Document.Page.Layout value) { + if (layoutBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && layout_ != null + && layout_ + != com.google.cloud.documentai.v1beta2.Document.Page.Layout + .getDefaultInstance()) { + getLayoutBuilder().mergeFrom(value); + } else { + layout_ = value; + } + } else { + layoutBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Table][google.cloud.documentai.v1beta2.Document.Page.Table].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + public Builder clearLayout() { + bitField0_ = (bitField0_ & ~0x00000001); + layout_ = null; + if (layoutBuilder_ != null) { + layoutBuilder_.dispose(); + layoutBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Table][google.cloud.documentai.v1beta2.Document.Page.Table].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder getLayoutBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getLayoutFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Table][google.cloud.documentai.v1beta2.Document.Page.Table].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + public com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder + getLayoutOrBuilder() { + if (layoutBuilder_ != null) { + return layoutBuilder_.getMessageOrBuilder(); + } else { + return layout_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() + : layout_; + } + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [Table][google.cloud.documentai.v1beta2.Document.Page.Table].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Layout, + com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder> + getLayoutFieldBuilder() { + if (layoutBuilder_ == null) { + layoutBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Layout, + com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder>( + getLayout(), getParentForChildren(), isClean()); + layout_ = null; + } + return layoutBuilder_; + } + + private java.util.List + headerRows_ = java.util.Collections.emptyList(); + + private void ensureHeaderRowsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + headerRows_ = + new java.util.ArrayList< + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow>(headerRows_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow, + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRowOrBuilder> + headerRowsBuilder_; + + /** + * + * + *
+         * Header rows of the table.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * + */ + public java.util.List + getHeaderRowsList() { + if (headerRowsBuilder_ == null) { + return java.util.Collections.unmodifiableList(headerRows_); + } else { + return headerRowsBuilder_.getMessageList(); + } + } + /** + * + * + *
+         * Header rows of the table.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * + */ + public int getHeaderRowsCount() { + if (headerRowsBuilder_ == null) { + return headerRows_.size(); + } else { + return headerRowsBuilder_.getCount(); + } + } + /** + * + * + *
+         * Header rows of the table.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow getHeaderRows( + int index) { + if (headerRowsBuilder_ == null) { + return headerRows_.get(index); + } else { + return headerRowsBuilder_.getMessage(index); + } + } + /** + * + * + *
+         * Header rows of the table.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * + */ + public Builder setHeaderRows( + int index, com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow value) { + if (headerRowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHeaderRowsIsMutable(); + headerRows_.set(index, value); + onChanged(); + } else { + headerRowsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+         * Header rows of the table.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * + */ + public Builder setHeaderRows( + int index, + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.Builder + builderForValue) { + if (headerRowsBuilder_ == null) { + ensureHeaderRowsIsMutable(); + headerRows_.set(index, builderForValue.build()); + onChanged(); + } else { + headerRowsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * Header rows of the table.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * + */ + public Builder addHeaderRows( + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow value) { + if (headerRowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHeaderRowsIsMutable(); + headerRows_.add(value); + onChanged(); + } else { + headerRowsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+         * Header rows of the table.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * + */ + public Builder addHeaderRows( + int index, com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow value) { + if (headerRowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHeaderRowsIsMutable(); + headerRows_.add(index, value); + onChanged(); + } else { + headerRowsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+         * Header rows of the table.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * + */ + public Builder addHeaderRows( + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.Builder + builderForValue) { + if (headerRowsBuilder_ == null) { + ensureHeaderRowsIsMutable(); + headerRows_.add(builderForValue.build()); + onChanged(); + } else { + headerRowsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * Header rows of the table.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * + */ + public Builder addHeaderRows( + int index, + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.Builder + builderForValue) { + if (headerRowsBuilder_ == null) { + ensureHeaderRowsIsMutable(); + headerRows_.add(index, builderForValue.build()); + onChanged(); + } else { + headerRowsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * Header rows of the table.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * + */ + public Builder addAllHeaderRows( + java.lang.Iterable< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow> + values) { + if (headerRowsBuilder_ == null) { + ensureHeaderRowsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, headerRows_); + onChanged(); + } else { + headerRowsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+         * Header rows of the table.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * + */ + public Builder clearHeaderRows() { + if (headerRowsBuilder_ == null) { + headerRows_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + headerRowsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * Header rows of the table.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * + */ + public Builder removeHeaderRows(int index) { + if (headerRowsBuilder_ == null) { + ensureHeaderRowsIsMutable(); + headerRows_.remove(index); + onChanged(); + } else { + headerRowsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+         * Header rows of the table.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.Builder + getHeaderRowsBuilder(int index) { + return getHeaderRowsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+         * Header rows of the table.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRowOrBuilder + getHeaderRowsOrBuilder(int index) { + if (headerRowsBuilder_ == null) { + return headerRows_.get(index); + } else { + return headerRowsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+         * Header rows of the table.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * + */ + public java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRowOrBuilder> + getHeaderRowsOrBuilderList() { + if (headerRowsBuilder_ != null) { + return headerRowsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(headerRows_); + } + } + /** + * + * + *
+         * Header rows of the table.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.Builder + addHeaderRowsBuilder() { + return getHeaderRowsFieldBuilder() + .addBuilder( + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow + .getDefaultInstance()); + } + /** + * + * + *
+         * Header rows of the table.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.Builder + addHeaderRowsBuilder(int index) { + return getHeaderRowsFieldBuilder() + .addBuilder( + index, + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow + .getDefaultInstance()); + } + /** + * + * + *
+         * Header rows of the table.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow header_rows = 2; + * + */ + public java.util.List< + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.Builder> + getHeaderRowsBuilderList() { + return getHeaderRowsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow, + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRowOrBuilder> + getHeaderRowsFieldBuilder() { + if (headerRowsBuilder_ == null) { + headerRowsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow, + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRowOrBuilder>( + headerRows_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + headerRows_ = null; + } + return headerRowsBuilder_; + } + + private java.util.List + bodyRows_ = java.util.Collections.emptyList(); + + private void ensureBodyRowsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + bodyRows_ = + new java.util.ArrayList< + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow>(bodyRows_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow, + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRowOrBuilder> + bodyRowsBuilder_; + + /** + * + * + *
+         * Body rows of the table.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; + * + */ + public java.util.List + getBodyRowsList() { + if (bodyRowsBuilder_ == null) { + return java.util.Collections.unmodifiableList(bodyRows_); + } else { + return bodyRowsBuilder_.getMessageList(); + } + } + /** + * + * + *
+         * Body rows of the table.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; + * + */ + public int getBodyRowsCount() { + if (bodyRowsBuilder_ == null) { + return bodyRows_.size(); + } else { + return bodyRowsBuilder_.getCount(); + } + } + /** + * + * + *
+         * Body rows of the table.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow getBodyRows( + int index) { + if (bodyRowsBuilder_ == null) { + return bodyRows_.get(index); + } else { + return bodyRowsBuilder_.getMessage(index); + } + } + /** + * + * + *
+         * Body rows of the table.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; + * + */ + public Builder setBodyRows( + int index, com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow value) { + if (bodyRowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBodyRowsIsMutable(); + bodyRows_.set(index, value); + onChanged(); + } else { + bodyRowsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+         * Body rows of the table.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; + * + */ + public Builder setBodyRows( + int index, + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.Builder + builderForValue) { + if (bodyRowsBuilder_ == null) { + ensureBodyRowsIsMutable(); + bodyRows_.set(index, builderForValue.build()); + onChanged(); + } else { + bodyRowsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * Body rows of the table.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; + * + */ + public Builder addBodyRows( + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow value) { + if (bodyRowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBodyRowsIsMutable(); + bodyRows_.add(value); + onChanged(); + } else { + bodyRowsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+         * Body rows of the table.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; + * + */ + public Builder addBodyRows( + int index, com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow value) { + if (bodyRowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBodyRowsIsMutable(); + bodyRows_.add(index, value); + onChanged(); + } else { + bodyRowsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+         * Body rows of the table.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; + * + */ + public Builder addBodyRows( + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.Builder + builderForValue) { + if (bodyRowsBuilder_ == null) { ensureBodyRowsIsMutable(); bodyRows_.add(builderForValue.build()); onChanged(); } else { - bodyRowsBuilder_.addMessage(builderForValue.build()); + bodyRowsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * Body rows of the table.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; + * + */ + public Builder addBodyRows( + int index, + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.Builder + builderForValue) { + if (bodyRowsBuilder_ == null) { + ensureBodyRowsIsMutable(); + bodyRows_.add(index, builderForValue.build()); + onChanged(); + } else { + bodyRowsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * Body rows of the table.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; + * + */ + public Builder addAllBodyRows( + java.lang.Iterable< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow> + values) { + if (bodyRowsBuilder_ == null) { + ensureBodyRowsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, bodyRows_); + onChanged(); + } else { + bodyRowsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+         * Body rows of the table.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; + * + */ + public Builder clearBodyRows() { + if (bodyRowsBuilder_ == null) { + bodyRows_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + bodyRowsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * Body rows of the table.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; + * + */ + public Builder removeBodyRows(int index) { + if (bodyRowsBuilder_ == null) { + ensureBodyRowsIsMutable(); + bodyRows_.remove(index); + onChanged(); + } else { + bodyRowsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+         * Body rows of the table.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.Builder + getBodyRowsBuilder(int index) { + return getBodyRowsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+         * Body rows of the table.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRowOrBuilder + getBodyRowsOrBuilder(int index) { + if (bodyRowsBuilder_ == null) { + return bodyRows_.get(index); + } else { + return bodyRowsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+         * Body rows of the table.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; + * + */ + public java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRowOrBuilder> + getBodyRowsOrBuilderList() { + if (bodyRowsBuilder_ != null) { + return bodyRowsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(bodyRows_); + } + } + /** + * + * + *
+         * Body rows of the table.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.Builder + addBodyRowsBuilder() { + return getBodyRowsFieldBuilder() + .addBuilder( + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow + .getDefaultInstance()); + } + /** + * + * + *
+         * Body rows of the table.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.Builder + addBodyRowsBuilder(int index) { + return getBodyRowsFieldBuilder() + .addBuilder( + index, + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow + .getDefaultInstance()); + } + /** + * + * + *
+         * Body rows of the table.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; + * + */ + public java.util.List< + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.Builder> + getBodyRowsBuilderList() { + return getBodyRowsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow, + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRowOrBuilder> + getBodyRowsFieldBuilder() { + if (bodyRowsBuilder_ == null) { + bodyRowsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow, + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRowOrBuilder>( + bodyRows_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + bodyRows_ = null; + } + return bodyRowsBuilder_; + } + + private java.util.List + detectedLanguages_ = java.util.Collections.emptyList(); + + private void ensureDetectedLanguagesIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + detectedLanguages_ = + new java.util.ArrayList< + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage>( + detectedLanguages_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> + detectedLanguagesBuilder_; + + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public java.util.List + getDetectedLanguagesList() { + if (detectedLanguagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(detectedLanguages_); + } else { + return detectedLanguagesBuilder_.getMessageList(); + } + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public int getDetectedLanguagesCount() { + if (detectedLanguagesBuilder_ == null) { + return detectedLanguages_.size(); + } else { + return detectedLanguagesBuilder_.getCount(); + } + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage + getDetectedLanguages(int index) { + if (detectedLanguagesBuilder_ == null) { + return detectedLanguages_.get(index); + } else { + return detectedLanguagesBuilder_.getMessage(index); + } + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public Builder setDetectedLanguages( + int index, com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { + if (detectedLanguagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.set(index, value); + onChanged(); + } else { + detectedLanguagesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public Builder setDetectedLanguages( + int index, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + builderForValue) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.set(index, builderForValue.build()); + onChanged(); + } else { + detectedLanguagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public Builder addDetectedLanguages( + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { + if (detectedLanguagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(value); + onChanged(); + } else { + detectedLanguagesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public Builder addDetectedLanguages( + int index, com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { + if (detectedLanguagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(index, value); + onChanged(); + } else { + detectedLanguagesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public Builder addDetectedLanguages( + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + builderForValue) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(builderForValue.build()); + onChanged(); + } else { + detectedLanguagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public Builder addDetectedLanguages( + int index, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + builderForValue) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(index, builderForValue.build()); + onChanged(); + } else { + detectedLanguagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public Builder addAllDetectedLanguages( + java.lang.Iterable< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage> + values) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, detectedLanguages_); + onChanged(); + } else { + detectedLanguagesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public Builder clearDetectedLanguages() { + if (detectedLanguagesBuilder_ == null) { + detectedLanguages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + detectedLanguagesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public Builder removeDetectedLanguages(int index) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.remove(index); + onChanged(); + } else { + detectedLanguagesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + getDetectedLanguagesBuilder(int index) { + return getDetectedLanguagesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder + getDetectedLanguagesOrBuilder(int index) { + if (detectedLanguagesBuilder_ == null) { + return detectedLanguages_.get(index); + } else { + return detectedLanguagesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public java.util.List< + ? extends + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> + getDetectedLanguagesOrBuilderList() { + if (detectedLanguagesBuilder_ != null) { + return detectedLanguagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(detectedLanguages_); + } + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + addDetectedLanguagesBuilder() { + return getDetectedLanguagesFieldBuilder() + .addBuilder( + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage + .getDefaultInstance()); + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + addDetectedLanguagesBuilder(int index) { + return getDetectedLanguagesFieldBuilder() + .addBuilder( + index, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage + .getDefaultInstance()); + } + /** + * + * + *
+         * A list of detected languages together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public java.util.List< + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder> + getDetectedLanguagesBuilderList() { + return getDetectedLanguagesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> + getDetectedLanguagesFieldBuilder() { + if (detectedLanguagesBuilder_ == null) { + detectedLanguagesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder>( + detectedLanguages_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + detectedLanguages_ = null; + } + return detectedLanguagesBuilder_; + } + + private com.google.cloud.documentai.v1beta2.Document.Provenance provenance_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Provenance, + com.google.cloud.documentai.v1beta2.Document.Provenance.Builder, + com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder> + provenanceBuilder_; + /** + * + * + *
+         * The history of this table.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 5 [deprecated = true]; + * + * + * @deprecated google.cloud.documentai.v1beta2.Document.Page.Table.provenance is deprecated. + * See google/cloud/documentai/v1beta2/document.proto;l=421 + * @return Whether the provenance field is set. + */ + @java.lang.Deprecated + public boolean hasProvenance() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+         * The history of this table.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 5 [deprecated = true]; + * + * + * @deprecated google.cloud.documentai.v1beta2.Document.Page.Table.provenance is deprecated. + * See google/cloud/documentai/v1beta2/document.proto;l=421 + * @return The provenance. + */ + @java.lang.Deprecated + public com.google.cloud.documentai.v1beta2.Document.Provenance getProvenance() { + if (provenanceBuilder_ == null) { + return provenance_ == null + ? com.google.cloud.documentai.v1beta2.Document.Provenance.getDefaultInstance() + : provenance_; + } else { + return provenanceBuilder_.getMessage(); + } + } + /** + * + * + *
+         * The history of this table.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 5 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder setProvenance( + com.google.cloud.documentai.v1beta2.Document.Provenance value) { + if (provenanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + provenance_ = value; + } else { + provenanceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+         * The history of this table.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 5 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder setProvenance( + com.google.cloud.documentai.v1beta2.Document.Provenance.Builder builderForValue) { + if (provenanceBuilder_ == null) { + provenance_ = builderForValue.build(); + } else { + provenanceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+         * The history of this table.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 5 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder mergeProvenance( + com.google.cloud.documentai.v1beta2.Document.Provenance value) { + if (provenanceBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && provenance_ != null + && provenance_ + != com.google.cloud.documentai.v1beta2.Document.Provenance + .getDefaultInstance()) { + getProvenanceBuilder().mergeFrom(value); + } else { + provenance_ = value; + } + } else { + provenanceBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+         * The history of this table.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 5 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder clearProvenance() { + bitField0_ = (bitField0_ & ~0x00000010); + provenance_ = null; + if (provenanceBuilder_ != null) { + provenanceBuilder_.dispose(); + provenanceBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+         * The history of this table.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 5 [deprecated = true]; + * + */ + @java.lang.Deprecated + public com.google.cloud.documentai.v1beta2.Document.Provenance.Builder + getProvenanceBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getProvenanceFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * The history of this table.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 5 [deprecated = true]; + * + */ + @java.lang.Deprecated + public com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder + getProvenanceOrBuilder() { + if (provenanceBuilder_ != null) { + return provenanceBuilder_.getMessageOrBuilder(); + } else { + return provenance_ == null + ? com.google.cloud.documentai.v1beta2.Document.Provenance.getDefaultInstance() + : provenance_; + } + } + /** + * + * + *
+         * The history of this table.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 5 [deprecated = true]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Provenance, + com.google.cloud.documentai.v1beta2.Document.Provenance.Builder, + com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder> + getProvenanceFieldBuilder() { + if (provenanceBuilder_ == null) { + provenanceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Provenance, + com.google.cloud.documentai.v1beta2.Document.Provenance.Builder, + com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder>( + getProvenance(), getParentForChildren(), isClean()); + provenance_ = null; + } + return provenanceBuilder_; + } + + @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.v1beta2.Document.Page.Table) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.Page.Table) + private static final com.google.cloud.documentai.v1beta2.Document.Page.Table DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta2.Document.Page.Table(); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.Table getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser
() { + @java.lang.Override + public Table parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser
parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser
getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Table getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface FormFieldOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.Page.FormField) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the
+       * [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField]
+       * name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout field_name = 1; + * + * @return Whether the fieldName field is set. + */ + boolean hasFieldName(); + /** + * + * + *
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the
+       * [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField]
+       * name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout field_name = 1; + * + * @return The fieldName. + */ + com.google.cloud.documentai.v1beta2.Document.Page.Layout getFieldName(); + /** + * + * + *
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the
+       * [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField]
+       * name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout field_name = 1; + */ + com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder getFieldNameOrBuilder(); + + /** + * + * + *
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the
+       * [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField]
+       * value.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout field_value = 2; + * + * @return Whether the fieldValue field is set. + */ + boolean hasFieldValue(); + /** + * + * + *
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the
+       * [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField]
+       * value.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout field_value = 2; + * + * @return The fieldValue. + */ + com.google.cloud.documentai.v1beta2.Document.Page.Layout getFieldValue(); + /** + * + * + *
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the
+       * [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField]
+       * value.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout field_value = 2; + */ + com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder getFieldValueOrBuilder(); + + /** + * + * + *
+       * A list of detected languages for name together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; + * + */ + java.util.List + getNameDetectedLanguagesList(); + /** + * + * + *
+       * A list of detected languages for name together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; + * + */ + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage getNameDetectedLanguages( + int index); + /** + * + * + *
+       * A list of detected languages for name together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; + * + */ + int getNameDetectedLanguagesCount(); + /** + * + * + *
+       * A list of detected languages for name together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; + * + */ + java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> + getNameDetectedLanguagesOrBuilderList(); + /** + * + * + *
+       * A list of detected languages for name together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; + * + */ + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder + getNameDetectedLanguagesOrBuilder(int index); + + /** + * + * + *
+       * A list of detected languages for value together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; + * + */ + java.util.List + getValueDetectedLanguagesList(); + /** + * + * + *
+       * A list of detected languages for value together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; + * + */ + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage getValueDetectedLanguages( + int index); + /** + * + * + *
+       * A list of detected languages for value together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; + * + */ + int getValueDetectedLanguagesCount(); + /** + * + * + *
+       * A list of detected languages for value together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; + * + */ + java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> + getValueDetectedLanguagesOrBuilderList(); + /** + * + * + *
+       * A list of detected languages for value together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; + * + */ + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder + getValueDetectedLanguagesOrBuilder(int index); + + /** + * + * + *
+       * If the value is non-textual, this field represents the type. Current
+       * valid values are:
+       *
+       * - blank (this indicates the `field_value` is normal text)
+       * - `unfilled_checkbox`
+       * - `filled_checkbox`
+       * 
+ * + * string value_type = 5; + * + * @return The valueType. + */ + java.lang.String getValueType(); + /** + * + * + *
+       * If the value is non-textual, this field represents the type. Current
+       * valid values are:
+       *
+       * - blank (this indicates the `field_value` is normal text)
+       * - `unfilled_checkbox`
+       * - `filled_checkbox`
+       * 
+ * + * string value_type = 5; + * + * @return The bytes for valueType. + */ + com.google.protobuf.ByteString getValueTypeBytes(); + + /** + * + * + *
+       * Created for Labeling UI to export key text.
+       * If corrections were made to the text identified by the
+       * `field_name.text_anchor`, this field will contain the correction.
+       * 
+ * + * string corrected_key_text = 6; + * + * @return The correctedKeyText. + */ + java.lang.String getCorrectedKeyText(); + /** + * + * + *
+       * Created for Labeling UI to export key text.
+       * If corrections were made to the text identified by the
+       * `field_name.text_anchor`, this field will contain the correction.
+       * 
+ * + * string corrected_key_text = 6; + * + * @return The bytes for correctedKeyText. + */ + com.google.protobuf.ByteString getCorrectedKeyTextBytes(); + + /** + * + * + *
+       * Created for Labeling UI to export value text.
+       * If corrections were made to the text identified by the
+       * `field_value.text_anchor`, this field will contain the correction.
+       * 
+ * + * string corrected_value_text = 7; + * + * @return The correctedValueText. + */ + java.lang.String getCorrectedValueText(); + /** + * + * + *
+       * Created for Labeling UI to export value text.
+       * If corrections were made to the text identified by the
+       * `field_value.text_anchor`, this field will contain the correction.
+       * 
+ * + * string corrected_value_text = 7; + * + * @return The bytes for correctedValueText. + */ + com.google.protobuf.ByteString getCorrectedValueTextBytes(); + + /** + * + * + *
+       * The history of this annotation.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 8; + * + * @return Whether the provenance field is set. + */ + boolean hasProvenance(); + /** + * + * + *
+       * The history of this annotation.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 8; + * + * @return The provenance. + */ + com.google.cloud.documentai.v1beta2.Document.Provenance getProvenance(); + /** + * + * + *
+       * The history of this annotation.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 8; + */ + com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder getProvenanceOrBuilder(); + } + /** + * + * + *
+     * A form field detected on the page.
+     * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.FormField} + */ + public static final class FormField extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.Page.FormField) + FormFieldOrBuilder { + private static final long serialVersionUID = 0L; + // Use FormField.newBuilder() to construct. + private FormField(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FormField() { + nameDetectedLanguages_ = java.util.Collections.emptyList(); + valueDetectedLanguages_ = java.util.Collections.emptyList(); + valueType_ = ""; + correctedKeyText_ = ""; + correctedValueText_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FormField(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_FormField_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_FormField_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Document.Page.FormField.class, + com.google.cloud.documentai.v1beta2.Document.Page.FormField.Builder.class); + } + + public static final int FIELD_NAME_FIELD_NUMBER = 1; + private com.google.cloud.documentai.v1beta2.Document.Page.Layout fieldName_; + /** + * + * + *
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the
+       * [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField]
+       * name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout field_name = 1; + * + * @return Whether the fieldName field is set. + */ + @java.lang.Override + public boolean hasFieldName() { + return fieldName_ != null; + } + /** + * + * + *
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the
+       * [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField]
+       * name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout field_name = 1; + * + * @return The fieldName. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Layout getFieldName() { + return fieldName_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() + : fieldName_; + } + /** + * + * + *
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the
+       * [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField]
+       * name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout field_name = 1; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder + getFieldNameOrBuilder() { + return fieldName_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() + : fieldName_; + } + + public static final int FIELD_VALUE_FIELD_NUMBER = 2; + private com.google.cloud.documentai.v1beta2.Document.Page.Layout fieldValue_; + /** + * + * + *
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the
+       * [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField]
+       * value.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout field_value = 2; + * + * @return Whether the fieldValue field is set. + */ + @java.lang.Override + public boolean hasFieldValue() { + return fieldValue_ != null; + } + /** + * + * + *
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the
+       * [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField]
+       * value.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout field_value = 2; + * + * @return The fieldValue. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Layout getFieldValue() { + return fieldValue_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() + : fieldValue_; + } + /** + * + * + *
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the
+       * [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField]
+       * value.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout field_value = 2; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder + getFieldValueOrBuilder() { + return fieldValue_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() + : fieldValue_; + } + + public static final int NAME_DETECTED_LANGUAGES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List + nameDetectedLanguages_; + /** + * + * + *
+       * A list of detected languages for name together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; + * + */ + @java.lang.Override + public java.util.List + getNameDetectedLanguagesList() { + return nameDetectedLanguages_; + } + /** + * + * + *
+       * A list of detected languages for name together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> + getNameDetectedLanguagesOrBuilderList() { + return nameDetectedLanguages_; + } + /** + * + * + *
+       * A list of detected languages for name together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; + * + */ + @java.lang.Override + public int getNameDetectedLanguagesCount() { + return nameDetectedLanguages_.size(); + } + /** + * + * + *
+       * A list of detected languages for name together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage + getNameDetectedLanguages(int index) { + return nameDetectedLanguages_.get(index); + } + /** + * + * + *
+       * A list of detected languages for name together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder + getNameDetectedLanguagesOrBuilder(int index) { + return nameDetectedLanguages_.get(index); + } + + public static final int VALUE_DETECTED_LANGUAGES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List + valueDetectedLanguages_; + /** + * + * + *
+       * A list of detected languages for value together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; + * + */ + @java.lang.Override + public java.util.List + getValueDetectedLanguagesList() { + return valueDetectedLanguages_; + } + /** + * + * + *
+       * A list of detected languages for value together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> + getValueDetectedLanguagesOrBuilderList() { + return valueDetectedLanguages_; + } + /** + * + * + *
+       * A list of detected languages for value together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; + * + */ + @java.lang.Override + public int getValueDetectedLanguagesCount() { + return valueDetectedLanguages_.size(); + } + /** + * + * + *
+       * A list of detected languages for value together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage + getValueDetectedLanguages(int index) { + return valueDetectedLanguages_.get(index); + } + /** + * + * + *
+       * A list of detected languages for value together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder + getValueDetectedLanguagesOrBuilder(int index) { + return valueDetectedLanguages_.get(index); + } + + public static final int VALUE_TYPE_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object valueType_ = ""; + /** + * + * + *
+       * If the value is non-textual, this field represents the type. Current
+       * valid values are:
+       *
+       * - blank (this indicates the `field_value` is normal text)
+       * - `unfilled_checkbox`
+       * - `filled_checkbox`
+       * 
+ * + * string value_type = 5; + * + * @return The valueType. + */ + @java.lang.Override + public java.lang.String getValueType() { + java.lang.Object ref = valueType_; + 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(); + valueType_ = s; + return s; + } + } + /** + * + * + *
+       * If the value is non-textual, this field represents the type. Current
+       * valid values are:
+       *
+       * - blank (this indicates the `field_value` is normal text)
+       * - `unfilled_checkbox`
+       * - `filled_checkbox`
+       * 
+ * + * string value_type = 5; + * + * @return The bytes for valueType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValueTypeBytes() { + java.lang.Object ref = valueType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + valueType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CORRECTED_KEY_TEXT_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object correctedKeyText_ = ""; + /** + * + * + *
+       * Created for Labeling UI to export key text.
+       * If corrections were made to the text identified by the
+       * `field_name.text_anchor`, this field will contain the correction.
+       * 
+ * + * string corrected_key_text = 6; + * + * @return The correctedKeyText. + */ + @java.lang.Override + public java.lang.String getCorrectedKeyText() { + java.lang.Object ref = correctedKeyText_; + 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(); + correctedKeyText_ = s; + return s; + } + } + /** + * + * + *
+       * Created for Labeling UI to export key text.
+       * If corrections were made to the text identified by the
+       * `field_name.text_anchor`, this field will contain the correction.
+       * 
+ * + * string corrected_key_text = 6; + * + * @return The bytes for correctedKeyText. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCorrectedKeyTextBytes() { + java.lang.Object ref = correctedKeyText_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + correctedKeyText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CORRECTED_VALUE_TEXT_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object correctedValueText_ = ""; + /** + * + * + *
+       * Created for Labeling UI to export value text.
+       * If corrections were made to the text identified by the
+       * `field_value.text_anchor`, this field will contain the correction.
+       * 
+ * + * string corrected_value_text = 7; + * + * @return The correctedValueText. + */ + @java.lang.Override + public java.lang.String getCorrectedValueText() { + java.lang.Object ref = correctedValueText_; + 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(); + correctedValueText_ = s; + return s; + } + } + /** + * + * + *
+       * Created for Labeling UI to export value text.
+       * If corrections were made to the text identified by the
+       * `field_value.text_anchor`, this field will contain the correction.
+       * 
+ * + * string corrected_value_text = 7; + * + * @return The bytes for correctedValueText. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCorrectedValueTextBytes() { + java.lang.Object ref = correctedValueText_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + correctedValueText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROVENANCE_FIELD_NUMBER = 8; + private com.google.cloud.documentai.v1beta2.Document.Provenance provenance_; + /** + * + * + *
+       * The history of this annotation.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 8; + * + * @return Whether the provenance field is set. + */ + @java.lang.Override + public boolean hasProvenance() { + return provenance_ != null; + } + /** + * + * + *
+       * The history of this annotation.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 8; + * + * @return The provenance. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Provenance getProvenance() { + return provenance_ == null + ? com.google.cloud.documentai.v1beta2.Document.Provenance.getDefaultInstance() + : provenance_; + } + /** + * + * + *
+       * The history of this annotation.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 8; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder + getProvenanceOrBuilder() { + return provenance_ == null + ? com.google.cloud.documentai.v1beta2.Document.Provenance.getDefaultInstance() + : provenance_; + } + + 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 (fieldName_ != null) { + output.writeMessage(1, getFieldName()); + } + if (fieldValue_ != null) { + output.writeMessage(2, getFieldValue()); + } + for (int i = 0; i < nameDetectedLanguages_.size(); i++) { + output.writeMessage(3, nameDetectedLanguages_.get(i)); + } + for (int i = 0; i < valueDetectedLanguages_.size(); i++) { + output.writeMessage(4, valueDetectedLanguages_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(valueType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, valueType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(correctedKeyText_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, correctedKeyText_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(correctedValueText_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, correctedValueText_); + } + if (provenance_ != null) { + output.writeMessage(8, getProvenance()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (fieldName_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getFieldName()); + } + if (fieldValue_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getFieldValue()); + } + for (int i = 0; i < nameDetectedLanguages_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, nameDetectedLanguages_.get(i)); + } + for (int i = 0; i < valueDetectedLanguages_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, valueDetectedLanguages_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(valueType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, valueType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(correctedKeyText_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, correctedKeyText_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(correctedValueText_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, correctedValueText_); + } + if (provenance_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getProvenance()); + } + size += getUnknownFields().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.v1beta2.Document.Page.FormField)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta2.Document.Page.FormField other = + (com.google.cloud.documentai.v1beta2.Document.Page.FormField) obj; + + if (hasFieldName() != other.hasFieldName()) return false; + if (hasFieldName()) { + if (!getFieldName().equals(other.getFieldName())) return false; + } + if (hasFieldValue() != other.hasFieldValue()) return false; + if (hasFieldValue()) { + if (!getFieldValue().equals(other.getFieldValue())) return false; + } + if (!getNameDetectedLanguagesList().equals(other.getNameDetectedLanguagesList())) + return false; + if (!getValueDetectedLanguagesList().equals(other.getValueDetectedLanguagesList())) + return false; + if (!getValueType().equals(other.getValueType())) return false; + if (!getCorrectedKeyText().equals(other.getCorrectedKeyText())) return false; + if (!getCorrectedValueText().equals(other.getCorrectedValueText())) return false; + if (hasProvenance() != other.hasProvenance()) return false; + if (hasProvenance()) { + if (!getProvenance().equals(other.getProvenance())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasFieldName()) { + hash = (37 * hash) + FIELD_NAME_FIELD_NUMBER; + hash = (53 * hash) + getFieldName().hashCode(); + } + if (hasFieldValue()) { + hash = (37 * hash) + FIELD_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getFieldValue().hashCode(); + } + if (getNameDetectedLanguagesCount() > 0) { + hash = (37 * hash) + NAME_DETECTED_LANGUAGES_FIELD_NUMBER; + hash = (53 * hash) + getNameDetectedLanguagesList().hashCode(); + } + if (getValueDetectedLanguagesCount() > 0) { + hash = (37 * hash) + VALUE_DETECTED_LANGUAGES_FIELD_NUMBER; + hash = (53 * hash) + getValueDetectedLanguagesList().hashCode(); + } + hash = (37 * hash) + VALUE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getValueType().hashCode(); + hash = (37 * hash) + CORRECTED_KEY_TEXT_FIELD_NUMBER; + hash = (53 * hash) + getCorrectedKeyText().hashCode(); + hash = (37 * hash) + CORRECTED_VALUE_TEXT_FIELD_NUMBER; + hash = (53 * hash) + getCorrectedValueText().hashCode(); + if (hasProvenance()) { + hash = (37 * hash) + PROVENANCE_FIELD_NUMBER; + hash = (53 * hash) + getProvenance().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.FormField parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.FormField 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.v1beta2.Document.Page.FormField parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.FormField 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.v1beta2.Document.Page.FormField parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.FormField parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.FormField parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.FormField 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.v1beta2.Document.Page.FormField parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.FormField 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.v1beta2.Document.Page.FormField parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.FormField 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.v1beta2.Document.Page.FormField 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 form field detected on the page.
+       * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.FormField} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.Page.FormField) + com.google.cloud.documentai.v1beta2.Document.Page.FormFieldOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_FormField_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_FormField_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Document.Page.FormField.class, + com.google.cloud.documentai.v1beta2.Document.Page.FormField.Builder.class); + } + + // Construct using com.google.cloud.documentai.v1beta2.Document.Page.FormField.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + fieldName_ = null; + if (fieldNameBuilder_ != null) { + fieldNameBuilder_.dispose(); + fieldNameBuilder_ = null; + } + fieldValue_ = null; + if (fieldValueBuilder_ != null) { + fieldValueBuilder_.dispose(); + fieldValueBuilder_ = null; + } + if (nameDetectedLanguagesBuilder_ == null) { + nameDetectedLanguages_ = java.util.Collections.emptyList(); + } else { + nameDetectedLanguages_ = null; + nameDetectedLanguagesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + if (valueDetectedLanguagesBuilder_ == null) { + valueDetectedLanguages_ = java.util.Collections.emptyList(); + } else { + valueDetectedLanguages_ = null; + valueDetectedLanguagesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + valueType_ = ""; + correctedKeyText_ = ""; + correctedValueText_ = ""; + provenance_ = null; + if (provenanceBuilder_ != null) { + provenanceBuilder_.dispose(); + provenanceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_FormField_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.FormField + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta2.Document.Page.FormField.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.FormField build() { + com.google.cloud.documentai.v1beta2.Document.Page.FormField result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.FormField buildPartial() { + com.google.cloud.documentai.v1beta2.Document.Page.FormField result = + new com.google.cloud.documentai.v1beta2.Document.Page.FormField(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.documentai.v1beta2.Document.Page.FormField result) { + if (nameDetectedLanguagesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + nameDetectedLanguages_ = + java.util.Collections.unmodifiableList(nameDetectedLanguages_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.nameDetectedLanguages_ = nameDetectedLanguages_; + } else { + result.nameDetectedLanguages_ = nameDetectedLanguagesBuilder_.build(); + } + if (valueDetectedLanguagesBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + valueDetectedLanguages_ = + java.util.Collections.unmodifiableList(valueDetectedLanguages_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.valueDetectedLanguages_ = valueDetectedLanguages_; + } else { + result.valueDetectedLanguages_ = valueDetectedLanguagesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.documentai.v1beta2.Document.Page.FormField result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.fieldName_ = fieldNameBuilder_ == null ? fieldName_ : fieldNameBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.fieldValue_ = + fieldValueBuilder_ == null ? fieldValue_ : fieldValueBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.valueType_ = valueType_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.correctedKeyText_ = correctedKeyText_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.correctedValueText_ = correctedValueText_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.provenance_ = + provenanceBuilder_ == null ? provenance_ : provenanceBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta2.Document.Page.FormField) { + return mergeFrom((com.google.cloud.documentai.v1beta2.Document.Page.FormField) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1beta2.Document.Page.FormField other) { + if (other + == com.google.cloud.documentai.v1beta2.Document.Page.FormField.getDefaultInstance()) + return this; + if (other.hasFieldName()) { + mergeFieldName(other.getFieldName()); + } + if (other.hasFieldValue()) { + mergeFieldValue(other.getFieldValue()); + } + if (nameDetectedLanguagesBuilder_ == null) { + if (!other.nameDetectedLanguages_.isEmpty()) { + if (nameDetectedLanguages_.isEmpty()) { + nameDetectedLanguages_ = other.nameDetectedLanguages_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureNameDetectedLanguagesIsMutable(); + nameDetectedLanguages_.addAll(other.nameDetectedLanguages_); + } + onChanged(); + } + } else { + if (!other.nameDetectedLanguages_.isEmpty()) { + if (nameDetectedLanguagesBuilder_.isEmpty()) { + nameDetectedLanguagesBuilder_.dispose(); + nameDetectedLanguagesBuilder_ = null; + nameDetectedLanguages_ = other.nameDetectedLanguages_; + bitField0_ = (bitField0_ & ~0x00000004); + nameDetectedLanguagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getNameDetectedLanguagesFieldBuilder() + : null; + } else { + nameDetectedLanguagesBuilder_.addAllMessages(other.nameDetectedLanguages_); + } + } + } + if (valueDetectedLanguagesBuilder_ == null) { + if (!other.valueDetectedLanguages_.isEmpty()) { + if (valueDetectedLanguages_.isEmpty()) { + valueDetectedLanguages_ = other.valueDetectedLanguages_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureValueDetectedLanguagesIsMutable(); + valueDetectedLanguages_.addAll(other.valueDetectedLanguages_); + } + onChanged(); + } + } else { + if (!other.valueDetectedLanguages_.isEmpty()) { + if (valueDetectedLanguagesBuilder_.isEmpty()) { + valueDetectedLanguagesBuilder_.dispose(); + valueDetectedLanguagesBuilder_ = null; + valueDetectedLanguages_ = other.valueDetectedLanguages_; + bitField0_ = (bitField0_ & ~0x00000008); + valueDetectedLanguagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getValueDetectedLanguagesFieldBuilder() + : null; + } else { + valueDetectedLanguagesBuilder_.addAllMessages(other.valueDetectedLanguages_); + } + } + } + if (!other.getValueType().isEmpty()) { + valueType_ = other.valueType_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getCorrectedKeyText().isEmpty()) { + correctedKeyText_ = other.correctedKeyText_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getCorrectedValueText().isEmpty()) { + correctedValueText_ = other.correctedValueText_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (other.hasProvenance()) { + mergeProvenance(other.getProvenance()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getFieldNameFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getFieldValueFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage m = + input.readMessage( + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage + .parser(), + extensionRegistry); + if (nameDetectedLanguagesBuilder_ == null) { + ensureNameDetectedLanguagesIsMutable(); + nameDetectedLanguages_.add(m); + } else { + nameDetectedLanguagesBuilder_.addMessage(m); + } + break; + } // case 26 + case 34: + { + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage m = + input.readMessage( + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage + .parser(), + extensionRegistry); + if (valueDetectedLanguagesBuilder_ == null) { + ensureValueDetectedLanguagesIsMutable(); + valueDetectedLanguages_.add(m); + } else { + valueDetectedLanguagesBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: + { + valueType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + correctedKeyText_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + correctedValueText_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + input.readMessage(getProvenanceFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.documentai.v1beta2.Document.Page.Layout fieldName_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Layout, + com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder> + fieldNameBuilder_; + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the
+         * [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField]
+         * name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc.
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout field_name = 1; + * + * @return Whether the fieldName field is set. + */ + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the
+         * [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField]
+         * name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc.
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout field_name = 1; + * + * @return The fieldName. + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Layout getFieldName() { + if (fieldNameBuilder_ == null) { + return fieldName_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() + : fieldName_; + } else { + return fieldNameBuilder_.getMessage(); + } + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the
+         * [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField]
+         * name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc.
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout field_name = 1; + */ + public Builder setFieldName( + com.google.cloud.documentai.v1beta2.Document.Page.Layout value) { + if (fieldNameBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fieldName_ = value; + } else { + fieldNameBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the
+         * [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField]
+         * name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc.
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout field_name = 1; + */ + public Builder setFieldName( + com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder builderForValue) { + if (fieldNameBuilder_ == null) { + fieldName_ = builderForValue.build(); + } else { + fieldNameBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the
+         * [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField]
+         * name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc.
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout field_name = 1; + */ + public Builder mergeFieldName( + com.google.cloud.documentai.v1beta2.Document.Page.Layout value) { + if (fieldNameBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && fieldName_ != null + && fieldName_ + != com.google.cloud.documentai.v1beta2.Document.Page.Layout + .getDefaultInstance()) { + getFieldNameBuilder().mergeFrom(value); + } else { + fieldName_ = value; + } + } else { + fieldNameBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the
+         * [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField]
+         * name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc.
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout field_name = 1; + */ + public Builder clearFieldName() { + bitField0_ = (bitField0_ & ~0x00000001); + fieldName_ = null; + if (fieldNameBuilder_ != null) { + fieldNameBuilder_.dispose(); + fieldNameBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the
+         * [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField]
+         * name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc.
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout field_name = 1; + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder + getFieldNameBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getFieldNameFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the
+         * [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField]
+         * name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc.
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout field_name = 1; + */ + public com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder + getFieldNameOrBuilder() { + if (fieldNameBuilder_ != null) { + return fieldNameBuilder_.getMessageOrBuilder(); + } else { + return fieldName_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() + : fieldName_; + } + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the
+         * [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField]
+         * name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc.
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout field_name = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Layout, + com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder> + getFieldNameFieldBuilder() { + if (fieldNameBuilder_ == null) { + fieldNameBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Layout, + com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder>( + getFieldName(), getParentForChildren(), isClean()); + fieldName_ = null; + } + return fieldNameBuilder_; + } + + private com.google.cloud.documentai.v1beta2.Document.Page.Layout fieldValue_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Layout, + com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder> + fieldValueBuilder_; + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the
+         * [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField]
+         * value.
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout field_value = 2; + * + * @return Whether the fieldValue field is set. + */ + public boolean hasFieldValue() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the
+         * [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField]
+         * value.
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout field_value = 2; + * + * @return The fieldValue. + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Layout getFieldValue() { + if (fieldValueBuilder_ == null) { + return fieldValue_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() + : fieldValue_; + } else { + return fieldValueBuilder_.getMessage(); + } + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the
+         * [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField]
+         * value.
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout field_value = 2; + */ + public Builder setFieldValue( + com.google.cloud.documentai.v1beta2.Document.Page.Layout value) { + if (fieldValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fieldValue_ = value; + } else { + fieldValueBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the
+         * [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField]
+         * value.
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout field_value = 2; + */ + public Builder setFieldValue( + com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder builderForValue) { + if (fieldValueBuilder_ == null) { + fieldValue_ = builderForValue.build(); + } else { + fieldValueBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the
+         * [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField]
+         * value.
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout field_value = 2; + */ + public Builder mergeFieldValue( + com.google.cloud.documentai.v1beta2.Document.Page.Layout value) { + if (fieldValueBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && fieldValue_ != null + && fieldValue_ + != com.google.cloud.documentai.v1beta2.Document.Page.Layout + .getDefaultInstance()) { + getFieldValueBuilder().mergeFrom(value); + } else { + fieldValue_ = value; + } + } else { + fieldValueBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the
+         * [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField]
+         * value.
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout field_value = 2; + */ + public Builder clearFieldValue() { + bitField0_ = (bitField0_ & ~0x00000002); + fieldValue_ = null; + if (fieldValueBuilder_ != null) { + fieldValueBuilder_.dispose(); + fieldValueBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the
+         * [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField]
+         * value.
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout field_value = 2; + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder + getFieldValueBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getFieldValueFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the
+         * [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField]
+         * value.
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout field_value = 2; + */ + public com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder + getFieldValueOrBuilder() { + if (fieldValueBuilder_ != null) { + return fieldValueBuilder_.getMessageOrBuilder(); + } else { + return fieldValue_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() + : fieldValue_; + } + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the
+         * [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField]
+         * value.
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout field_value = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Layout, + com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder> + getFieldValueFieldBuilder() { + if (fieldValueBuilder_ == null) { + fieldValueBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Layout, + com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder>( + getFieldValue(), getParentForChildren(), isClean()); + fieldValue_ = null; + } + return fieldValueBuilder_; + } + + private java.util.List + nameDetectedLanguages_ = java.util.Collections.emptyList(); + + private void ensureNameDetectedLanguagesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + nameDetectedLanguages_ = + new java.util.ArrayList< + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage>( + nameDetectedLanguages_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> + nameDetectedLanguagesBuilder_; + + /** + * + * + *
+         * A list of detected languages for name together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; + * + */ + public java.util.List + getNameDetectedLanguagesList() { + if (nameDetectedLanguagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(nameDetectedLanguages_); + } else { + return nameDetectedLanguagesBuilder_.getMessageList(); + } + } + /** + * + * + *
+         * A list of detected languages for name together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; + * + */ + public int getNameDetectedLanguagesCount() { + if (nameDetectedLanguagesBuilder_ == null) { + return nameDetectedLanguages_.size(); + } else { + return nameDetectedLanguagesBuilder_.getCount(); + } + } + /** + * + * + *
+         * A list of detected languages for name together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage + getNameDetectedLanguages(int index) { + if (nameDetectedLanguagesBuilder_ == null) { + return nameDetectedLanguages_.get(index); + } else { + return nameDetectedLanguagesBuilder_.getMessage(index); + } + } + /** + * + * + *
+         * A list of detected languages for name together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; + * + */ + public Builder setNameDetectedLanguages( + int index, com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { + if (nameDetectedLanguagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNameDetectedLanguagesIsMutable(); + nameDetectedLanguages_.set(index, value); + onChanged(); + } else { + nameDetectedLanguagesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+         * A list of detected languages for name together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; + * + */ + public Builder setNameDetectedLanguages( + int index, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + builderForValue) { + if (nameDetectedLanguagesBuilder_ == null) { + ensureNameDetectedLanguagesIsMutable(); + nameDetectedLanguages_.set(index, builderForValue.build()); + onChanged(); + } else { + nameDetectedLanguagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * A list of detected languages for name together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; + * + */ + public Builder addNameDetectedLanguages( + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { + if (nameDetectedLanguagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNameDetectedLanguagesIsMutable(); + nameDetectedLanguages_.add(value); + onChanged(); + } else { + nameDetectedLanguagesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+         * A list of detected languages for name together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; + * + */ + public Builder addNameDetectedLanguages( + int index, com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { + if (nameDetectedLanguagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNameDetectedLanguagesIsMutable(); + nameDetectedLanguages_.add(index, value); + onChanged(); + } else { + nameDetectedLanguagesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+         * A list of detected languages for name together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; + * + */ + public Builder addNameDetectedLanguages( + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + builderForValue) { + if (nameDetectedLanguagesBuilder_ == null) { + ensureNameDetectedLanguagesIsMutable(); + nameDetectedLanguages_.add(builderForValue.build()); + onChanged(); + } else { + nameDetectedLanguagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * A list of detected languages for name together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; + * + */ + public Builder addNameDetectedLanguages( + int index, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + builderForValue) { + if (nameDetectedLanguagesBuilder_ == null) { + ensureNameDetectedLanguagesIsMutable(); + nameDetectedLanguages_.add(index, builderForValue.build()); + onChanged(); + } else { + nameDetectedLanguagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * A list of detected languages for name together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; + * + */ + public Builder addAllNameDetectedLanguages( + java.lang.Iterable< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage> + values) { + if (nameDetectedLanguagesBuilder_ == null) { + ensureNameDetectedLanguagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, nameDetectedLanguages_); + onChanged(); + } else { + nameDetectedLanguagesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+         * A list of detected languages for name together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; + * + */ + public Builder clearNameDetectedLanguages() { + if (nameDetectedLanguagesBuilder_ == null) { + nameDetectedLanguages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + nameDetectedLanguagesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * A list of detected languages for name together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; + * + */ + public Builder removeNameDetectedLanguages(int index) { + if (nameDetectedLanguagesBuilder_ == null) { + ensureNameDetectedLanguagesIsMutable(); + nameDetectedLanguages_.remove(index); + onChanged(); + } else { + nameDetectedLanguagesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+         * A list of detected languages for name together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + getNameDetectedLanguagesBuilder(int index) { + return getNameDetectedLanguagesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+         * A list of detected languages for name together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder + getNameDetectedLanguagesOrBuilder(int index) { + if (nameDetectedLanguagesBuilder_ == null) { + return nameDetectedLanguages_.get(index); + } else { + return nameDetectedLanguagesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+         * A list of detected languages for name together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; + * + */ + public java.util.List< + ? extends + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> + getNameDetectedLanguagesOrBuilderList() { + if (nameDetectedLanguagesBuilder_ != null) { + return nameDetectedLanguagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(nameDetectedLanguages_); + } + } + /** + * + * + *
+         * A list of detected languages for name together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + addNameDetectedLanguagesBuilder() { + return getNameDetectedLanguagesFieldBuilder() + .addBuilder( + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage + .getDefaultInstance()); + } + /** + * + * + *
+         * A list of detected languages for name together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + addNameDetectedLanguagesBuilder(int index) { + return getNameDetectedLanguagesFieldBuilder() + .addBuilder( + index, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage + .getDefaultInstance()); + } + /** + * + * + *
+         * A list of detected languages for name together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; + * + */ + public java.util.List< + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder> + getNameDetectedLanguagesBuilderList() { + return getNameDetectedLanguagesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> + getNameDetectedLanguagesFieldBuilder() { + if (nameDetectedLanguagesBuilder_ == null) { + nameDetectedLanguagesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder>( + nameDetectedLanguages_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + nameDetectedLanguages_ = null; + } + return nameDetectedLanguagesBuilder_; + } + + private java.util.List + valueDetectedLanguages_ = java.util.Collections.emptyList(); + + private void ensureValueDetectedLanguagesIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + valueDetectedLanguages_ = + new java.util.ArrayList< + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage>( + valueDetectedLanguages_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> + valueDetectedLanguagesBuilder_; + + /** + * + * + *
+         * A list of detected languages for value together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; + * + */ + public java.util.List + getValueDetectedLanguagesList() { + if (valueDetectedLanguagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(valueDetectedLanguages_); + } else { + return valueDetectedLanguagesBuilder_.getMessageList(); + } + } + /** + * + * + *
+         * A list of detected languages for value together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; + * + */ + public int getValueDetectedLanguagesCount() { + if (valueDetectedLanguagesBuilder_ == null) { + return valueDetectedLanguages_.size(); + } else { + return valueDetectedLanguagesBuilder_.getCount(); + } + } + /** + * + * + *
+         * A list of detected languages for value together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage + getValueDetectedLanguages(int index) { + if (valueDetectedLanguagesBuilder_ == null) { + return valueDetectedLanguages_.get(index); + } else { + return valueDetectedLanguagesBuilder_.getMessage(index); + } + } + /** + * + * + *
+         * A list of detected languages for value together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; + * + */ + public Builder setValueDetectedLanguages( + int index, com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { + if (valueDetectedLanguagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValueDetectedLanguagesIsMutable(); + valueDetectedLanguages_.set(index, value); + onChanged(); + } else { + valueDetectedLanguagesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+         * A list of detected languages for value together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; + * + */ + public Builder setValueDetectedLanguages( + int index, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + builderForValue) { + if (valueDetectedLanguagesBuilder_ == null) { + ensureValueDetectedLanguagesIsMutable(); + valueDetectedLanguages_.set(index, builderForValue.build()); + onChanged(); + } else { + valueDetectedLanguagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * A list of detected languages for value together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; + * + */ + public Builder addValueDetectedLanguages( + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { + if (valueDetectedLanguagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValueDetectedLanguagesIsMutable(); + valueDetectedLanguages_.add(value); + onChanged(); + } else { + valueDetectedLanguagesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+         * A list of detected languages for value together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; + * + */ + public Builder addValueDetectedLanguages( + int index, com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { + if (valueDetectedLanguagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValueDetectedLanguagesIsMutable(); + valueDetectedLanguages_.add(index, value); + onChanged(); + } else { + valueDetectedLanguagesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+         * A list of detected languages for value together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; + * + */ + public Builder addValueDetectedLanguages( + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + builderForValue) { + if (valueDetectedLanguagesBuilder_ == null) { + ensureValueDetectedLanguagesIsMutable(); + valueDetectedLanguages_.add(builderForValue.build()); + onChanged(); + } else { + valueDetectedLanguagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * A list of detected languages for value together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; + * + */ + public Builder addValueDetectedLanguages( + int index, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + builderForValue) { + if (valueDetectedLanguagesBuilder_ == null) { + ensureValueDetectedLanguagesIsMutable(); + valueDetectedLanguages_.add(index, builderForValue.build()); + onChanged(); + } else { + valueDetectedLanguagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * A list of detected languages for value together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; + * + */ + public Builder addAllValueDetectedLanguages( + java.lang.Iterable< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage> + values) { + if (valueDetectedLanguagesBuilder_ == null) { + ensureValueDetectedLanguagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, valueDetectedLanguages_); + onChanged(); + } else { + valueDetectedLanguagesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+         * A list of detected languages for value together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; + * + */ + public Builder clearValueDetectedLanguages() { + if (valueDetectedLanguagesBuilder_ == null) { + valueDetectedLanguages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + valueDetectedLanguagesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * A list of detected languages for value together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; + * + */ + public Builder removeValueDetectedLanguages(int index) { + if (valueDetectedLanguagesBuilder_ == null) { + ensureValueDetectedLanguagesIsMutable(); + valueDetectedLanguages_.remove(index); + onChanged(); + } else { + valueDetectedLanguagesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+         * A list of detected languages for value together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + getValueDetectedLanguagesBuilder(int index) { + return getValueDetectedLanguagesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+         * A list of detected languages for value together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder + getValueDetectedLanguagesOrBuilder(int index) { + if (valueDetectedLanguagesBuilder_ == null) { + return valueDetectedLanguages_.get(index); + } else { + return valueDetectedLanguagesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+         * A list of detected languages for value together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; + * + */ + public java.util.List< + ? extends + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> + getValueDetectedLanguagesOrBuilderList() { + if (valueDetectedLanguagesBuilder_ != null) { + return valueDetectedLanguagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(valueDetectedLanguages_); + } + } + /** + * + * + *
+         * A list of detected languages for value together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + addValueDetectedLanguagesBuilder() { + return getValueDetectedLanguagesFieldBuilder() + .addBuilder( + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage + .getDefaultInstance()); + } + /** + * + * + *
+         * A list of detected languages for value together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + addValueDetectedLanguagesBuilder(int index) { + return getValueDetectedLanguagesFieldBuilder() + .addBuilder( + index, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage + .getDefaultInstance()); + } + /** + * + * + *
+         * A list of detected languages for value together with confidence.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; + * + */ + public java.util.List< + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder> + getValueDetectedLanguagesBuilderList() { + return getValueDetectedLanguagesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> + getValueDetectedLanguagesFieldBuilder() { + if (valueDetectedLanguagesBuilder_ == null) { + valueDetectedLanguagesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder>( + valueDetectedLanguages_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + valueDetectedLanguages_ = null; + } + return valueDetectedLanguagesBuilder_; + } + + private java.lang.Object valueType_ = ""; + /** + * + * + *
+         * If the value is non-textual, this field represents the type. Current
+         * valid values are:
+         *
+         * - blank (this indicates the `field_value` is normal text)
+         * - `unfilled_checkbox`
+         * - `filled_checkbox`
+         * 
+ * + * string value_type = 5; + * + * @return The valueType. + */ + public java.lang.String getValueType() { + java.lang.Object ref = valueType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + valueType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * If the value is non-textual, this field represents the type. Current
+         * valid values are:
+         *
+         * - blank (this indicates the `field_value` is normal text)
+         * - `unfilled_checkbox`
+         * - `filled_checkbox`
+         * 
+ * + * string value_type = 5; + * + * @return The bytes for valueType. + */ + public com.google.protobuf.ByteString getValueTypeBytes() { + java.lang.Object ref = valueType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + valueType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * If the value is non-textual, this field represents the type. Current
+         * valid values are:
+         *
+         * - blank (this indicates the `field_value` is normal text)
+         * - `unfilled_checkbox`
+         * - `filled_checkbox`
+         * 
+ * + * string value_type = 5; + * + * @param value The valueType to set. + * @return This builder for chaining. + */ + public Builder setValueType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + valueType_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+         * If the value is non-textual, this field represents the type. Current
+         * valid values are:
+         *
+         * - blank (this indicates the `field_value` is normal text)
+         * - `unfilled_checkbox`
+         * - `filled_checkbox`
+         * 
+ * + * string value_type = 5; + * + * @return This builder for chaining. + */ + public Builder clearValueType() { + valueType_ = getDefaultInstance().getValueType(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+         * If the value is non-textual, this field represents the type. Current
+         * valid values are:
+         *
+         * - blank (this indicates the `field_value` is normal text)
+         * - `unfilled_checkbox`
+         * - `filled_checkbox`
+         * 
+ * + * string value_type = 5; + * + * @param value The bytes for valueType to set. + * @return This builder for chaining. + */ + public Builder setValueTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + valueType_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object correctedKeyText_ = ""; + /** + * + * + *
+         * Created for Labeling UI to export key text.
+         * If corrections were made to the text identified by the
+         * `field_name.text_anchor`, this field will contain the correction.
+         * 
+ * + * string corrected_key_text = 6; + * + * @return The correctedKeyText. + */ + public java.lang.String getCorrectedKeyText() { + java.lang.Object ref = correctedKeyText_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + correctedKeyText_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Created for Labeling UI to export key text.
+         * If corrections were made to the text identified by the
+         * `field_name.text_anchor`, this field will contain the correction.
+         * 
+ * + * string corrected_key_text = 6; + * + * @return The bytes for correctedKeyText. + */ + public com.google.protobuf.ByteString getCorrectedKeyTextBytes() { + java.lang.Object ref = correctedKeyText_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + correctedKeyText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Created for Labeling UI to export key text.
+         * If corrections were made to the text identified by the
+         * `field_name.text_anchor`, this field will contain the correction.
+         * 
+ * + * string corrected_key_text = 6; + * + * @param value The correctedKeyText to set. + * @return This builder for chaining. + */ + public Builder setCorrectedKeyText(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + correctedKeyText_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+         * Created for Labeling UI to export key text.
+         * If corrections were made to the text identified by the
+         * `field_name.text_anchor`, this field will contain the correction.
+         * 
+ * + * string corrected_key_text = 6; + * + * @return This builder for chaining. + */ + public Builder clearCorrectedKeyText() { + correctedKeyText_ = getDefaultInstance().getCorrectedKeyText(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+         * Created for Labeling UI to export key text.
+         * If corrections were made to the text identified by the
+         * `field_name.text_anchor`, this field will contain the correction.
+         * 
+ * + * string corrected_key_text = 6; + * + * @param value The bytes for correctedKeyText to set. + * @return This builder for chaining. + */ + public Builder setCorrectedKeyTextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + correctedKeyText_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object correctedValueText_ = ""; + /** + * + * + *
+         * Created for Labeling UI to export value text.
+         * If corrections were made to the text identified by the
+         * `field_value.text_anchor`, this field will contain the correction.
+         * 
+ * + * string corrected_value_text = 7; + * + * @return The correctedValueText. + */ + public java.lang.String getCorrectedValueText() { + java.lang.Object ref = correctedValueText_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + correctedValueText_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Created for Labeling UI to export value text.
+         * If corrections were made to the text identified by the
+         * `field_value.text_anchor`, this field will contain the correction.
+         * 
+ * + * string corrected_value_text = 7; + * + * @return The bytes for correctedValueText. + */ + public com.google.protobuf.ByteString getCorrectedValueTextBytes() { + java.lang.Object ref = correctedValueText_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + correctedValueText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Created for Labeling UI to export value text.
+         * If corrections were made to the text identified by the
+         * `field_value.text_anchor`, this field will contain the correction.
+         * 
+ * + * string corrected_value_text = 7; + * + * @param value The correctedValueText to set. + * @return This builder for chaining. + */ + public Builder setCorrectedValueText(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + correctedValueText_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+         * Created for Labeling UI to export value text.
+         * If corrections were made to the text identified by the
+         * `field_value.text_anchor`, this field will contain the correction.
+         * 
+ * + * string corrected_value_text = 7; + * + * @return This builder for chaining. + */ + public Builder clearCorrectedValueText() { + correctedValueText_ = getDefaultInstance().getCorrectedValueText(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+         * Created for Labeling UI to export value text.
+         * If corrections were made to the text identified by the
+         * `field_value.text_anchor`, this field will contain the correction.
+         * 
+ * + * string corrected_value_text = 7; + * + * @param value The bytes for correctedValueText to set. + * @return This builder for chaining. + */ + public Builder setCorrectedValueTextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + correctedValueText_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private com.google.cloud.documentai.v1beta2.Document.Provenance provenance_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Provenance, + com.google.cloud.documentai.v1beta2.Document.Provenance.Builder, + com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder> + provenanceBuilder_; + /** + * + * + *
+         * The history of this annotation.
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 8; + * + * @return Whether the provenance field is set. + */ + public boolean hasProvenance() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+         * The history of this annotation.
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 8; + * + * @return The provenance. + */ + public com.google.cloud.documentai.v1beta2.Document.Provenance getProvenance() { + if (provenanceBuilder_ == null) { + return provenance_ == null + ? com.google.cloud.documentai.v1beta2.Document.Provenance.getDefaultInstance() + : provenance_; + } else { + return provenanceBuilder_.getMessage(); + } + } + /** + * + * + *
+         * The history of this annotation.
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 8; + */ + public Builder setProvenance( + com.google.cloud.documentai.v1beta2.Document.Provenance value) { + if (provenanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + provenance_ = value; + } else { + provenanceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+         * The history of this annotation.
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 8; + */ + public Builder setProvenance( + com.google.cloud.documentai.v1beta2.Document.Provenance.Builder builderForValue) { + if (provenanceBuilder_ == null) { + provenance_ = builderForValue.build(); + } else { + provenanceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+         * The history of this annotation.
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 8; + */ + public Builder mergeProvenance( + com.google.cloud.documentai.v1beta2.Document.Provenance value) { + if (provenanceBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && provenance_ != null + && provenance_ + != com.google.cloud.documentai.v1beta2.Document.Provenance + .getDefaultInstance()) { + getProvenanceBuilder().mergeFrom(value); + } else { + provenance_ = value; + } + } else { + provenanceBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+         * The history of this annotation.
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 8; + */ + public Builder clearProvenance() { + bitField0_ = (bitField0_ & ~0x00000080); + provenance_ = null; + if (provenanceBuilder_ != null) { + provenanceBuilder_.dispose(); + provenanceBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+         * The history of this annotation.
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 8; + */ + public com.google.cloud.documentai.v1beta2.Document.Provenance.Builder + getProvenanceBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getProvenanceFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * The history of this annotation.
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 8; + */ + public com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder + getProvenanceOrBuilder() { + if (provenanceBuilder_ != null) { + return provenanceBuilder_.getMessageOrBuilder(); + } else { + return provenance_ == null + ? com.google.cloud.documentai.v1beta2.Document.Provenance.getDefaultInstance() + : provenance_; + } + } + /** + * + * + *
+         * The history of this annotation.
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Provenance, + com.google.cloud.documentai.v1beta2.Document.Provenance.Builder, + com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder> + getProvenanceFieldBuilder() { + if (provenanceBuilder_ == null) { + provenanceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Provenance, + com.google.cloud.documentai.v1beta2.Document.Provenance.Builder, + com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder>( + getProvenance(), getParentForChildren(), isClean()); + provenance_ = null; + } + return provenanceBuilder_; + } + + @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.v1beta2.Document.Page.FormField) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.Page.FormField) + private static final com.google.cloud.documentai.v1beta2.Document.Page.FormField + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta2.Document.Page.FormField(); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.FormField + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FormField parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.FormField + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DetectedBarcodeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+       * [DetectedBarcode][google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode].
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * + * @return Whether the layout field is set. + */ + boolean hasLayout(); + /** + * + * + *
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+       * [DetectedBarcode][google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode].
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * + * @return The layout. + */ + com.google.cloud.documentai.v1beta2.Document.Page.Layout getLayout(); + /** + * + * + *
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+       * [DetectedBarcode][google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode].
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder getLayoutOrBuilder(); + + /** + * + * + *
+       * Detailed barcode information of the
+       * [DetectedBarcode][google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode].
+       * 
+ * + * .google.cloud.documentai.v1beta2.Barcode barcode = 2; + * + * @return Whether the barcode field is set. + */ + boolean hasBarcode(); + /** + * + * + *
+       * Detailed barcode information of the
+       * [DetectedBarcode][google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode].
+       * 
+ * + * .google.cloud.documentai.v1beta2.Barcode barcode = 2; + * + * @return The barcode. + */ + com.google.cloud.documentai.v1beta2.Barcode getBarcode(); + /** + * + * + *
+       * Detailed barcode information of the
+       * [DetectedBarcode][google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode].
+       * 
+ * + * .google.cloud.documentai.v1beta2.Barcode barcode = 2; + */ + com.google.cloud.documentai.v1beta2.BarcodeOrBuilder getBarcodeOrBuilder(); + } + /** + * + * + *
+     * A detected barcode.
+     * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode} + */ + public static final class DetectedBarcode extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode) + DetectedBarcodeOrBuilder { + private static final long serialVersionUID = 0L; + // Use DetectedBarcode.newBuilder() to construct. + private DetectedBarcode(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DetectedBarcode() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DetectedBarcode(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_DetectedBarcode_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_DetectedBarcode_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode.class, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode.Builder.class); + } + + public static final int LAYOUT_FIELD_NUMBER = 1; + private com.google.cloud.documentai.v1beta2.Document.Page.Layout layout_; + /** + * + * + *
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+       * [DetectedBarcode][google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode].
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * + * @return Whether the layout field is set. + */ + @java.lang.Override + public boolean hasLayout() { + return layout_ != null; + } + /** + * + * + *
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+       * [DetectedBarcode][google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode].
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * + * @return The layout. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Layout getLayout() { + return layout_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() + : layout_; + } + /** + * + * + *
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+       * [DetectedBarcode][google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode].
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder + getLayoutOrBuilder() { + return layout_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() + : layout_; + } + + public static final int BARCODE_FIELD_NUMBER = 2; + private com.google.cloud.documentai.v1beta2.Barcode barcode_; + /** + * + * + *
+       * Detailed barcode information of the
+       * [DetectedBarcode][google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode].
+       * 
+ * + * .google.cloud.documentai.v1beta2.Barcode barcode = 2; + * + * @return Whether the barcode field is set. + */ + @java.lang.Override + public boolean hasBarcode() { + return barcode_ != null; + } + /** + * + * + *
+       * Detailed barcode information of the
+       * [DetectedBarcode][google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode].
+       * 
+ * + * .google.cloud.documentai.v1beta2.Barcode barcode = 2; + * + * @return The barcode. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Barcode getBarcode() { + return barcode_ == null + ? com.google.cloud.documentai.v1beta2.Barcode.getDefaultInstance() + : barcode_; + } + /** + * + * + *
+       * Detailed barcode information of the
+       * [DetectedBarcode][google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode].
+       * 
+ * + * .google.cloud.documentai.v1beta2.Barcode barcode = 2; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.BarcodeOrBuilder getBarcodeOrBuilder() { + return barcode_ == null + ? com.google.cloud.documentai.v1beta2.Barcode.getDefaultInstance() + : barcode_; + } + + 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 (layout_ != null) { + output.writeMessage(1, getLayout()); + } + if (barcode_ != null) { + output.writeMessage(2, getBarcode()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (layout_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getLayout()); + } + if (barcode_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getBarcode()); + } + size += getUnknownFields().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.v1beta2.Document.Page.DetectedBarcode)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode other = + (com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode) obj; + + if (hasLayout() != other.hasLayout()) return false; + if (hasLayout()) { + if (!getLayout().equals(other.getLayout())) return false; + } + if (hasBarcode() != other.hasBarcode()) return false; + if (hasBarcode()) { + if (!getBarcode().equals(other.getBarcode())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasLayout()) { + hash = (37 * hash) + LAYOUT_FIELD_NUMBER; + hash = (53 * hash) + getLayout().hashCode(); + } + if (hasBarcode()) { + hash = (37 * hash) + BARCODE_FIELD_NUMBER; + hash = (53 * hash) + getBarcode().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode 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.v1beta2.Document.Page.DetectedBarcode parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode 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.v1beta2.Document.Page.DetectedBarcode parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode 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.v1beta2.Document.Page.DetectedBarcode + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode + 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.v1beta2.Document.Page.DetectedBarcode parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode 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.v1beta2.Document.Page.DetectedBarcode 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 detected barcode.
+       * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode) + com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcodeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_DetectedBarcode_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_DetectedBarcode_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode.class, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode.Builder.class); + } + + // Construct using + // com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + layout_ = null; + if (layoutBuilder_ != null) { + layoutBuilder_.dispose(); + layoutBuilder_ = null; + } + barcode_ = null; + if (barcodeBuilder_ != null) { + barcodeBuilder_.dispose(); + barcodeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_DetectedBarcode_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode build() { + com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode buildPartial() { + com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode result = + new com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.layout_ = layoutBuilder_ == null ? layout_ : layoutBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.barcode_ = barcodeBuilder_ == null ? barcode_ : barcodeBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode) { + return mergeFrom( + (com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode other) { + if (other + == com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode + .getDefaultInstance()) return this; + if (other.hasLayout()) { + mergeLayout(other.getLayout()); + } + if (other.hasBarcode()) { + mergeBarcode(other.getBarcode()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getLayoutFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getBarcodeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.documentai.v1beta2.Document.Page.Layout layout_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Layout, + com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder> + layoutBuilder_; + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [DetectedBarcode][google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * + * @return Whether the layout field is set. + */ + public boolean hasLayout() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [DetectedBarcode][google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + * + * @return The layout. + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Layout getLayout() { + if (layoutBuilder_ == null) { + return layout_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() + : layout_; + } else { + return layoutBuilder_.getMessage(); + } + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [DetectedBarcode][google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + public Builder setLayout(com.google.cloud.documentai.v1beta2.Document.Page.Layout value) { + if (layoutBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + layout_ = value; + } else { + layoutBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [DetectedBarcode][google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + public Builder setLayout( + com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder builderForValue) { + if (layoutBuilder_ == null) { + layout_ = builderForValue.build(); + } else { + layoutBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [DetectedBarcode][google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + public Builder mergeLayout(com.google.cloud.documentai.v1beta2.Document.Page.Layout value) { + if (layoutBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && layout_ != null + && layout_ + != com.google.cloud.documentai.v1beta2.Document.Page.Layout + .getDefaultInstance()) { + getLayoutBuilder().mergeFrom(value); + } else { + layout_ = value; + } + } else { + layoutBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [DetectedBarcode][google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + public Builder clearLayout() { + bitField0_ = (bitField0_ & ~0x00000001); + layout_ = null; + if (layoutBuilder_ != null) { + layoutBuilder_.dispose(); + layoutBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [DetectedBarcode][google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder getLayoutBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getLayoutFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [DetectedBarcode][google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + public com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder + getLayoutOrBuilder() { + if (layoutBuilder_ != null) { + return layoutBuilder_.getMessageOrBuilder(); + } else { + return layout_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() + : layout_; + } + } + /** + * + * + *
+         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for
+         * [DetectedBarcode][google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Layout, + com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder> + getLayoutFieldBuilder() { + if (layoutBuilder_ == null) { + layoutBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Layout, + com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder>( + getLayout(), getParentForChildren(), isClean()); + layout_ = null; + } + return layoutBuilder_; + } + + private com.google.cloud.documentai.v1beta2.Barcode barcode_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Barcode, + com.google.cloud.documentai.v1beta2.Barcode.Builder, + com.google.cloud.documentai.v1beta2.BarcodeOrBuilder> + barcodeBuilder_; + /** + * + * + *
+         * Detailed barcode information of the
+         * [DetectedBarcode][google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Barcode barcode = 2; + * + * @return Whether the barcode field is set. + */ + public boolean hasBarcode() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+         * Detailed barcode information of the
+         * [DetectedBarcode][google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Barcode barcode = 2; + * + * @return The barcode. + */ + public com.google.cloud.documentai.v1beta2.Barcode getBarcode() { + if (barcodeBuilder_ == null) { + return barcode_ == null + ? com.google.cloud.documentai.v1beta2.Barcode.getDefaultInstance() + : barcode_; + } else { + return barcodeBuilder_.getMessage(); + } + } + /** + * + * + *
+         * Detailed barcode information of the
+         * [DetectedBarcode][google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Barcode barcode = 2; + */ + public Builder setBarcode(com.google.cloud.documentai.v1beta2.Barcode value) { + if (barcodeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + barcode_ = value; + } else { + barcodeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Detailed barcode information of the
+         * [DetectedBarcode][google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Barcode barcode = 2; + */ + public Builder setBarcode( + com.google.cloud.documentai.v1beta2.Barcode.Builder builderForValue) { + if (barcodeBuilder_ == null) { + barcode_ = builderForValue.build(); + } else { + barcodeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Detailed barcode information of the
+         * [DetectedBarcode][google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Barcode barcode = 2; + */ + public Builder mergeBarcode(com.google.cloud.documentai.v1beta2.Barcode value) { + if (barcodeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && barcode_ != null + && barcode_ != com.google.cloud.documentai.v1beta2.Barcode.getDefaultInstance()) { + getBarcodeBuilder().mergeFrom(value); + } else { + barcode_ = value; + } + } else { + barcodeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Detailed barcode information of the
+         * [DetectedBarcode][google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Barcode barcode = 2; + */ + public Builder clearBarcode() { + bitField0_ = (bitField0_ & ~0x00000002); + barcode_ = null; + if (barcodeBuilder_ != null) { + barcodeBuilder_.dispose(); + barcodeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+         * Detailed barcode information of the
+         * [DetectedBarcode][google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Barcode barcode = 2; + */ + public com.google.cloud.documentai.v1beta2.Barcode.Builder getBarcodeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getBarcodeFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * Detailed barcode information of the
+         * [DetectedBarcode][google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Barcode barcode = 2; + */ + public com.google.cloud.documentai.v1beta2.BarcodeOrBuilder getBarcodeOrBuilder() { + if (barcodeBuilder_ != null) { + return barcodeBuilder_.getMessageOrBuilder(); + } else { + return barcode_ == null + ? com.google.cloud.documentai.v1beta2.Barcode.getDefaultInstance() + : barcode_; + } + } + /** + * + * + *
+         * Detailed barcode information of the
+         * [DetectedBarcode][google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode].
+         * 
+ * + * .google.cloud.documentai.v1beta2.Barcode barcode = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Barcode, + com.google.cloud.documentai.v1beta2.Barcode.Builder, + com.google.cloud.documentai.v1beta2.BarcodeOrBuilder> + getBarcodeFieldBuilder() { + if (barcodeBuilder_ == null) { + barcodeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Barcode, + com.google.cloud.documentai.v1beta2.Barcode.Builder, + com.google.cloud.documentai.v1beta2.BarcodeOrBuilder>( + getBarcode(), getParentForChildren(), isClean()); + barcode_ = null; + } + return barcodeBuilder_; + } + + @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.v1beta2.Document.Page.DetectedBarcode) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode) + private static final com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode(); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DetectedBarcode parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DetectedLanguageOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * The [BCP-47 language
+       * code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier),
+       * such as `en-US` or `sr-Latn`.
+       * 
+ * + * string language_code = 1; + * + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + * + * + *
+       * The [BCP-47 language
+       * code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier),
+       * such as `en-US` or `sr-Latn`.
+       * 
+ * + * string language_code = 1; + * + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString getLanguageCodeBytes(); + + /** + * + * + *
+       * Confidence of detected language. Range `[0, 1]`.
+       * 
+ * + * float confidence = 2; + * + * @return The confidence. + */ + float getConfidence(); + } + /** + * + * + *
+     * Detected language for a structural component.
+     * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage} + */ + public static final class DetectedLanguage extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage) + DetectedLanguageOrBuilder { + private static final long serialVersionUID = 0L; + // Use DetectedLanguage.newBuilder() to construct. + private DetectedLanguage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DetectedLanguage() { + languageCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DetectedLanguage(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_DetectedLanguage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_DetectedLanguage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.class, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder.class); + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object languageCode_ = ""; + /** + * + * + *
+       * The [BCP-47 language
+       * code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier),
+       * such as `en-US` or `sr-Latn`.
+       * 
+ * + * string language_code = 1; + * + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + 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(); + languageCode_ = s; + return s; + } + } + /** + * + * + *
+       * The [BCP-47 language
+       * code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier),
+       * such as `en-US` or `sr-Latn`.
+       * 
+ * + * string language_code = 1; + * + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONFIDENCE_FIELD_NUMBER = 2; + private float confidence_ = 0F; + /** + * + * + *
+       * Confidence of detected language. Range `[0, 1]`.
+       * 
+ * + * float confidence = 2; + * + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, languageCode_); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + output.writeFloat(2, confidence_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, languageCode_); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, confidence_); + } + size += getUnknownFields().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.v1beta2.Document.Page.DetectedLanguage)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage other = + (com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage) obj; + + if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getConfidence()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage 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.v1beta2.Document.Page.DetectedLanguage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage 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.v1beta2.Document.Page.DetectedLanguage parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage 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.v1beta2.Document.Page.DetectedLanguage + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage + 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.v1beta2.Document.Page.DetectedLanguage parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage 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.v1beta2.Document.Page.DetectedLanguage 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; + } + /** + * + * + *
+       * Detected language for a structural component.
+       * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage) + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_DetectedLanguage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_DetectedLanguage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.class, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder.class); + } + + // Construct using + // com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + languageCode_ = ""; + confidence_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_DetectedLanguage_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage build() { + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage buildPartial() { + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage result = + new com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.languageCode_ = languageCode_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.confidence_ = confidence_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage) { + return mergeFrom( + (com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage other) { + if (other + == com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage + .getDefaultInstance()) return this; + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + languageCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 21: + { + confidence_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 21 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object languageCode_ = ""; + /** + * + * + *
+         * The [BCP-47 language
+         * code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier),
+         * such as `en-US` or `sr-Latn`.
+         * 
+ * + * string language_code = 1; + * + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * The [BCP-47 language
+         * code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier),
+         * such as `en-US` or `sr-Latn`.
+         * 
+ * + * string language_code = 1; + * + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * The [BCP-47 language
+         * code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier),
+         * such as `en-US` or `sr-Latn`.
+         * 
+ * + * string language_code = 1; + * + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + languageCode_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * The [BCP-47 language
+         * code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier),
+         * such as `en-US` or `sr-Latn`.
+         * 
+ * + * string language_code = 1; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + languageCode_ = getDefaultInstance().getLanguageCode(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+         * The [BCP-47 language
+         * code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier),
+         * such as `en-US` or `sr-Latn`.
+         * 
+ * + * string language_code = 1; + * + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + languageCode_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private float confidence_; + /** + * + * + *
+         * Confidence of detected language. Range `[0, 1]`.
+         * 
+ * + * float confidence = 2; + * + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + /** + * + * + *
+         * Confidence of detected language. Range `[0, 1]`.
+         * 
+ * + * float confidence = 2; + * + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { + + confidence_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Confidence of detected language. Range `[0, 1]`.
+         * 
+ * + * float confidence = 2; + * + * @return This builder for chaining. + */ + public Builder clearConfidence() { + bitField0_ = (bitField0_ & ~0x00000002); + confidence_ = 0F; + 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.v1beta2.Document.Page.DetectedLanguage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage) + private static final com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage(); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DetectedLanguage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ImageQualityScoresOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * The overall quality score. Range `[0, 1]` where `1` is perfect quality.
+       * 
+ * + * float quality_score = 1; + * + * @return The qualityScore. + */ + float getQualityScore(); + + /** + * + * + *
+       * A list of detected defects.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + java.util.List< + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect> + getDetectedDefectsList(); + /** + * + * + *
+       * A list of detected defects.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect + getDetectedDefects(int index); + /** + * + * + *
+       * A list of detected defects.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + int getDetectedDefectsCount(); + /** + * + * + *
+       * A list of detected defects.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + java.util.List< + ? extends + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + .DetectedDefectOrBuilder> + getDetectedDefectsOrBuilderList(); + /** + * + * + *
+       * A list of detected defects.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefectOrBuilder + getDetectedDefectsOrBuilder(int index); + } + /** + * + * + *
+     * Image quality scores for the page image.
+     * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores} + */ + public static final class ImageQualityScores extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores) + ImageQualityScoresOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImageQualityScores.newBuilder() to construct. + private ImageQualityScores(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImageQualityScores() { + detectedDefects_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImageQualityScores(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_ImageQualityScores_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_ImageQualityScores_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.class, + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.Builder.class); + } + + public interface DetectedDefectOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * Name of the defect type. Supported values are:
+         *
+         * - `quality/defect_blurry`
+         * - `quality/defect_noisy`
+         * - `quality/defect_dark`
+         * - `quality/defect_faint`
+         * - `quality/defect_text_too_small`
+         * - `quality/defect_document_cutoff`
+         * - `quality/defect_text_cutoff`
+         * - `quality/defect_glare`
+         * 
+ * + * string type = 1; + * + * @return The type. + */ + java.lang.String getType(); + /** + * + * + *
+         * Name of the defect type. Supported values are:
+         *
+         * - `quality/defect_blurry`
+         * - `quality/defect_noisy`
+         * - `quality/defect_dark`
+         * - `quality/defect_faint`
+         * - `quality/defect_text_too_small`
+         * - `quality/defect_document_cutoff`
+         * - `quality/defect_text_cutoff`
+         * - `quality/defect_glare`
+         * 
+ * + * string type = 1; + * + * @return The bytes for type. + */ + com.google.protobuf.ByteString getTypeBytes(); + + /** + * + * + *
+         * Confidence of detected defect. Range `[0, 1]` where `1` indicates
+         * strong confidence that the defect exists.
+         * 
+ * + * float confidence = 2; + * + * @return The confidence. + */ + float getConfidence(); + } + /** + * + * + *
+       * Image Quality Defects
+       * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect} + */ + public static final class DetectedDefect extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect) + DetectedDefectOrBuilder { + private static final long serialVersionUID = 0L; + // Use DetectedDefect.newBuilder() to construct. + private DetectedDefect(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DetectedDefect() { + type_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DetectedDefect(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_ImageQualityScores_DetectedDefect_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_ImageQualityScores_DetectedDefect_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + .DetectedDefect.class, + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + .DetectedDefect.Builder.class); + } + + public static final int TYPE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object type_ = ""; + /** + * + * + *
+         * Name of the defect type. Supported values are:
+         *
+         * - `quality/defect_blurry`
+         * - `quality/defect_noisy`
+         * - `quality/defect_dark`
+         * - `quality/defect_faint`
+         * - `quality/defect_text_too_small`
+         * - `quality/defect_document_cutoff`
+         * - `quality/defect_text_cutoff`
+         * - `quality/defect_glare`
+         * 
+ * + * string type = 1; + * + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + 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(); + type_ = s; + return s; + } + } + /** + * + * + *
+         * Name of the defect type. Supported values are:
+         *
+         * - `quality/defect_blurry`
+         * - `quality/defect_noisy`
+         * - `quality/defect_dark`
+         * - `quality/defect_faint`
+         * - `quality/defect_text_too_small`
+         * - `quality/defect_document_cutoff`
+         * - `quality/defect_text_cutoff`
+         * - `quality/defect_glare`
+         * 
+ * + * string type = 1; + * + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONFIDENCE_FIELD_NUMBER = 2; + private float confidence_ = 0F; + /** + * + * + *
+         * Confidence of detected defect. Range `[0, 1]` where `1` indicates
+         * strong confidence that the defect exists.
+         * 
+ * + * float confidence = 2; + * + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + output.writeFloat(2, confidence_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, confidence_); + } + size += getUnknownFields().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.v1beta2.Document.Page.ImageQualityScores + .DetectedDefect)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect + other = + (com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + .DetectedDefect) + obj; + + if (!getType().equals(other.getType())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getConfidence()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + .DetectedDefect + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + .DetectedDefect + 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.v1beta2.Document.Page.ImageQualityScores + .DetectedDefect + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + .DetectedDefect + 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.v1beta2.Document.Page.ImageQualityScores + .DetectedDefect + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + .DetectedDefect + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + .DetectedDefect + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + .DetectedDefect + 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.v1beta2.Document.Page.ImageQualityScores + .DetectedDefect + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + .DetectedDefect + 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.v1beta2.Document.Page.ImageQualityScores + .DetectedDefect + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + .DetectedDefect + 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.v1beta2.Document.Page.ImageQualityScores.DetectedDefect + 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; + } + /** + * + * + *
+         * Image Quality Defects
+         * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect) + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + .DetectedDefectOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_ImageQualityScores_DetectedDefect_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_ImageQualityScores_DetectedDefect_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + .DetectedDefect.class, + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + .DetectedDefect.Builder.class); + } + + // Construct using + // com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + type_ = ""; + confidence_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_ImageQualityScores_DetectedDefect_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + .DetectedDefect.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect + build() { + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect + buildPartial() { + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect + result = + new com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + .DetectedDefect(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.confidence_ = confidence_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + .DetectedDefect) { + return mergeFrom( + (com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + .DetectedDefect) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect + other) { + if (other + == com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + .DetectedDefect.getDefaultInstance()) return this; + if (!other.getType().isEmpty()) { + type_ = other.type_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 21: + { + confidence_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 21 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object type_ = ""; + /** + * + * + *
+           * Name of the defect type. Supported values are:
+           *
+           * - `quality/defect_blurry`
+           * - `quality/defect_noisy`
+           * - `quality/defect_dark`
+           * - `quality/defect_faint`
+           * - `quality/defect_text_too_small`
+           * - `quality/defect_document_cutoff`
+           * - `quality/defect_text_cutoff`
+           * - `quality/defect_glare`
+           * 
+ * + * string type = 1; + * + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * Name of the defect type. Supported values are:
+           *
+           * - `quality/defect_blurry`
+           * - `quality/defect_noisy`
+           * - `quality/defect_dark`
+           * - `quality/defect_faint`
+           * - `quality/defect_text_too_small`
+           * - `quality/defect_document_cutoff`
+           * - `quality/defect_text_cutoff`
+           * - `quality/defect_glare`
+           * 
+ * + * string type = 1; + * + * @return The bytes for type. + */ + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * Name of the defect type. Supported values are:
+           *
+           * - `quality/defect_blurry`
+           * - `quality/defect_noisy`
+           * - `quality/defect_dark`
+           * - `quality/defect_faint`
+           * - `quality/defect_text_too_small`
+           * - `quality/defect_document_cutoff`
+           * - `quality/defect_text_cutoff`
+           * - `quality/defect_glare`
+           * 
+ * + * string type = 1; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+           * Name of the defect type. Supported values are:
+           *
+           * - `quality/defect_blurry`
+           * - `quality/defect_noisy`
+           * - `quality/defect_dark`
+           * - `quality/defect_faint`
+           * - `quality/defect_text_too_small`
+           * - `quality/defect_document_cutoff`
+           * - `quality/defect_text_cutoff`
+           * - `quality/defect_glare`
+           * 
+ * + * string type = 1; + * + * @return This builder for chaining. + */ + public Builder clearType() { + type_ = getDefaultInstance().getType(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+           * Name of the defect type. Supported values are:
+           *
+           * - `quality/defect_blurry`
+           * - `quality/defect_noisy`
+           * - `quality/defect_dark`
+           * - `quality/defect_faint`
+           * - `quality/defect_text_too_small`
+           * - `quality/defect_document_cutoff`
+           * - `quality/defect_text_cutoff`
+           * - `quality/defect_glare`
+           * 
+ * + * string type = 1; + * + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private float confidence_; + /** + * + * + *
+           * Confidence of detected defect. Range `[0, 1]` where `1` indicates
+           * strong confidence that the defect exists.
+           * 
+ * + * float confidence = 2; + * + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + /** + * + * + *
+           * Confidence of detected defect. Range `[0, 1]` where `1` indicates
+           * strong confidence that the defect exists.
+           * 
+ * + * float confidence = 2; + * + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { + + confidence_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+           * Confidence of detected defect. Range `[0, 1]` where `1` indicates
+           * strong confidence that the defect exists.
+           * 
+ * + * float confidence = 2; + * + * @return This builder for chaining. + */ + public Builder clearConfidence() { + bitField0_ = (bitField0_ & ~0x00000002); + confidence_ = 0F; + 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.v1beta2.Document.Page.ImageQualityScores.DetectedDefect) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect) + private static final com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + .DetectedDefect + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + .DetectedDefect(); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + .DetectedDefect + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DetectedDefect parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int QUALITY_SCORE_FIELD_NUMBER = 1; + private float qualityScore_ = 0F; + /** + * + * + *
+       * The overall quality score. Range `[0, 1]` where `1` is perfect quality.
+       * 
+ * + * float quality_score = 1; + * + * @return The qualityScore. + */ + @java.lang.Override + public float getQualityScore() { + return qualityScore_; + } + + public static final int DETECTED_DEFECTS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect> + detectedDefects_; + /** + * + * + *
+       * A list of detected defects.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect> + getDetectedDefectsList() { + return detectedDefects_; + } + /** + * + * + *
+       * A list of detected defects.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + .DetectedDefectOrBuilder> + getDetectedDefectsOrBuilderList() { + return detectedDefects_; + } + /** + * + * + *
+       * A list of detected defects.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + @java.lang.Override + public int getDetectedDefectsCount() { + return detectedDefects_.size(); + } + /** + * + * + *
+       * A list of detected defects.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect + getDetectedDefects(int index) { + return detectedDefects_.get(index); + } + /** + * + * + *
+       * A list of detected defects.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + .DetectedDefectOrBuilder + getDetectedDefectsOrBuilder(int index) { + return detectedDefects_.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 (java.lang.Float.floatToRawIntBits(qualityScore_) != 0) { + output.writeFloat(1, qualityScore_); + } + for (int i = 0; i < detectedDefects_.size(); i++) { + output.writeMessage(2, detectedDefects_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Float.floatToRawIntBits(qualityScore_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, qualityScore_); + } + for (int i = 0; i < detectedDefects_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, detectedDefects_.get(i)); + } + size += getUnknownFields().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.v1beta2.Document.Page.ImageQualityScores)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores other = + (com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores) obj; + + if (java.lang.Float.floatToIntBits(getQualityScore()) + != java.lang.Float.floatToIntBits(other.getQualityScore())) return false; + if (!getDetectedDefectsList().equals(other.getDetectedDefectsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + QUALITY_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getQualityScore()); + if (getDetectedDefectsCount() > 0) { + hash = (37 * hash) + DETECTED_DEFECTS_FIELD_NUMBER; + hash = (53 * hash) + getDetectedDefectsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores 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.v1beta2.Document.Page.ImageQualityScores parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores 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.v1beta2.Document.Page.ImageQualityScores parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores 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.v1beta2.Document.Page.ImageQualityScores + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + 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.v1beta2.Document.Page.ImageQualityScores parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores 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.v1beta2.Document.Page.ImageQualityScores 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; + } + /** + * + * + *
+       * Image quality scores for the page image.
+       * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores) + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScoresOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_ImageQualityScores_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_ImageQualityScores_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.class, + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.Builder + .class); + } + + // Construct using + // com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + qualityScore_ = 0F; + if (detectedDefectsBuilder_ == null) { + detectedDefects_ = java.util.Collections.emptyList(); + } else { + detectedDefects_ = null; + detectedDefectsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_ImageQualityScores_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores build() { + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores buildPartial() { + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores result = + new com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores result) { + if (detectedDefectsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + detectedDefects_ = java.util.Collections.unmodifiableList(detectedDefects_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.detectedDefects_ = detectedDefects_; + } else { + result.detectedDefects_ = detectedDefectsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.qualityScore_ = qualityScore_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores) { + return mergeFrom( + (com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores other) { + if (other + == com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + .getDefaultInstance()) return this; + if (other.getQualityScore() != 0F) { + setQualityScore(other.getQualityScore()); + } + if (detectedDefectsBuilder_ == null) { + if (!other.detectedDefects_.isEmpty()) { + if (detectedDefects_.isEmpty()) { + detectedDefects_ = other.detectedDefects_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureDetectedDefectsIsMutable(); + detectedDefects_.addAll(other.detectedDefects_); + } + onChanged(); + } + } else { + if (!other.detectedDefects_.isEmpty()) { + if (detectedDefectsBuilder_.isEmpty()) { + detectedDefectsBuilder_.dispose(); + detectedDefectsBuilder_ = null; + detectedDefects_ = other.detectedDefects_; + bitField0_ = (bitField0_ & ~0x00000002); + detectedDefectsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDetectedDefectsFieldBuilder() + : null; + } else { + detectedDefectsBuilder_.addAllMessages(other.detectedDefects_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: + { + qualityScore_ = input.readFloat(); + bitField0_ |= 0x00000001; + break; + } // case 13 + case 18: + { + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + .DetectedDefect + m = + input.readMessage( + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + .DetectedDefect.parser(), + extensionRegistry); + if (detectedDefectsBuilder_ == null) { + ensureDetectedDefectsIsMutable(); + detectedDefects_.add(m); + } else { + detectedDefectsBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private float qualityScore_; + /** + * + * + *
+         * The overall quality score. Range `[0, 1]` where `1` is perfect quality.
+         * 
+ * + * float quality_score = 1; + * + * @return The qualityScore. + */ + @java.lang.Override + public float getQualityScore() { + return qualityScore_; + } + /** + * + * + *
+         * The overall quality score. Range `[0, 1]` where `1` is perfect quality.
+         * 
+ * + * float quality_score = 1; + * + * @param value The qualityScore to set. + * @return This builder for chaining. + */ + public Builder setQualityScore(float value) { + + qualityScore_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * The overall quality score. Range `[0, 1]` where `1` is perfect quality.
+         * 
+ * + * float quality_score = 1; + * + * @return This builder for chaining. + */ + public Builder clearQualityScore() { + bitField0_ = (bitField0_ & ~0x00000001); + qualityScore_ = 0F; + onChanged(); + return this; + } + + private java.util.List< + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect> + detectedDefects_ = java.util.Collections.emptyList(); + + private void ensureDetectedDefectsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + detectedDefects_ = + new java.util.ArrayList< + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + .DetectedDefect>(detectedDefects_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect, + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect + .Builder, + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + .DetectedDefectOrBuilder> + detectedDefectsBuilder_; + + /** + * + * + *
+         * A list of detected defects.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + public java.util.List< + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect> + getDetectedDefectsList() { + if (detectedDefectsBuilder_ == null) { + return java.util.Collections.unmodifiableList(detectedDefects_); + } else { + return detectedDefectsBuilder_.getMessageList(); + } + } + /** + * + * + *
+         * A list of detected defects.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + public int getDetectedDefectsCount() { + if (detectedDefectsBuilder_ == null) { + return detectedDefects_.size(); + } else { + return detectedDefectsBuilder_.getCount(); + } + } + /** + * + * + *
+         * A list of detected defects.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect + getDetectedDefects(int index) { + if (detectedDefectsBuilder_ == null) { + return detectedDefects_.get(index); + } else { + return detectedDefectsBuilder_.getMessage(index); + } + } + /** + * + * + *
+         * A list of detected defects.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + public Builder setDetectedDefects( + int index, + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect + value) { + if (detectedDefectsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectedDefectsIsMutable(); + detectedDefects_.set(index, value); + onChanged(); + } else { + detectedDefectsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+         * A list of detected defects.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + public Builder setDetectedDefects( + int index, + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect + .Builder + builderForValue) { + if (detectedDefectsBuilder_ == null) { + ensureDetectedDefectsIsMutable(); + detectedDefects_.set(index, builderForValue.build()); + onChanged(); + } else { + detectedDefectsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * A list of detected defects.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + public Builder addDetectedDefects( + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect + value) { + if (detectedDefectsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectedDefectsIsMutable(); + detectedDefects_.add(value); + onChanged(); + } else { + detectedDefectsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+         * A list of detected defects.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + public Builder addDetectedDefects( + int index, + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect + value) { + if (detectedDefectsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectedDefectsIsMutable(); + detectedDefects_.add(index, value); + onChanged(); + } else { + detectedDefectsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+         * A list of detected defects.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + public Builder addDetectedDefects( + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect + .Builder + builderForValue) { + if (detectedDefectsBuilder_ == null) { + ensureDetectedDefectsIsMutable(); + detectedDefects_.add(builderForValue.build()); + onChanged(); + } else { + detectedDefectsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * A list of detected defects.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + public Builder addDetectedDefects( + int index, + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect + .Builder + builderForValue) { + if (detectedDefectsBuilder_ == null) { + ensureDetectedDefectsIsMutable(); + detectedDefects_.add(index, builderForValue.build()); + onChanged(); + } else { + detectedDefectsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * A list of detected defects.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + public Builder addAllDetectedDefects( + java.lang.Iterable< + ? extends + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + .DetectedDefect> + values) { + if (detectedDefectsBuilder_ == null) { + ensureDetectedDefectsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, detectedDefects_); + onChanged(); + } else { + detectedDefectsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+         * A list of detected defects.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + public Builder clearDetectedDefects() { + if (detectedDefectsBuilder_ == null) { + detectedDefects_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + detectedDefectsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * A list of detected defects.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + public Builder removeDetectedDefects(int index) { + if (detectedDefectsBuilder_ == null) { + ensureDetectedDefectsIsMutable(); + detectedDefects_.remove(index); + onChanged(); + } else { + detectedDefectsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+         * A list of detected defects.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect + .Builder + getDetectedDefectsBuilder(int index) { + return getDetectedDefectsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+         * A list of detected defects.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + .DetectedDefectOrBuilder + getDetectedDefectsOrBuilder(int index) { + if (detectedDefectsBuilder_ == null) { + return detectedDefects_.get(index); + } else { + return detectedDefectsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+         * A list of detected defects.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + public java.util.List< + ? extends + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + .DetectedDefectOrBuilder> + getDetectedDefectsOrBuilderList() { + if (detectedDefectsBuilder_ != null) { + return detectedDefectsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(detectedDefects_); + } + } + /** + * + * + *
+         * A list of detected defects.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect + .Builder + addDetectedDefectsBuilder() { + return getDetectedDefectsFieldBuilder() + .addBuilder( + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + .DetectedDefect.getDefaultInstance()); + } + /** + * + * + *
+         * A list of detected defects.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect + .Builder + addDetectedDefectsBuilder(int index) { + return getDetectedDefectsFieldBuilder() + .addBuilder( + index, + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + .DetectedDefect.getDefaultInstance()); + } + /** + * + * + *
+         * A list of detected defects.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + public java.util.List< + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect + .Builder> + getDetectedDefectsBuilderList() { + return getDetectedDefectsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect, + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.DetectedDefect + .Builder, + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + .DetectedDefectOrBuilder> + getDetectedDefectsFieldBuilder() { + if (detectedDefectsBuilder_ == null) { + detectedDefectsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + .DetectedDefect, + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + .DetectedDefect.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + .DetectedDefectOrBuilder>( + detectedDefects_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + detectedDefects_ = null; + } + return detectedDefectsBuilder_; + } + + @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.v1beta2.Document.Page.ImageQualityScores) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores) + private static final com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores(); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageQualityScores parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int PAGE_NUMBER_FIELD_NUMBER = 1; + private int pageNumber_ = 0; + /** + * + * + *
+     * 1-based index for current
+     * [Page][google.cloud.documentai.v1beta2.Document.Page] in a parent
+     * [Document][google.cloud.documentai.v1beta2.Document]. Useful when a page
+     * is taken out of a [Document][google.cloud.documentai.v1beta2.Document]
+     * for individual processing.
+     * 
+ * + * int32 page_number = 1; + * + * @return The pageNumber. + */ + @java.lang.Override + public int getPageNumber() { + return pageNumber_; + } + + public static final int IMAGE_FIELD_NUMBER = 13; + private com.google.cloud.documentai.v1beta2.Document.Page.Image image_; + /** + * + * + *
+     * Rendered image for this page. This image is preprocessed to remove any
+     * skew, rotation, and distortions such that the annotation bounding boxes
+     * can be upright and axis-aligned.
+     * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Image image = 13; + * + * @return Whether the image field is set. + */ + @java.lang.Override + public boolean hasImage() { + return image_ != null; + } + /** + * + * + *
+     * Rendered image for this page. This image is preprocessed to remove any
+     * skew, rotation, and distortions such that the annotation bounding boxes
+     * can be upright and axis-aligned.
+     * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Image image = 13; + * + * @return The image. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Image getImage() { + return image_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Image.getDefaultInstance() + : image_; + } + /** + * + * + *
+     * Rendered image for this page. This image is preprocessed to remove any
+     * skew, rotation, and distortions such that the annotation bounding boxes
+     * can be upright and axis-aligned.
+     * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Image image = 13; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.ImageOrBuilder getImageOrBuilder() { + return image_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Image.getDefaultInstance() + : image_; + } + + public static final int TRANSFORMS_FIELD_NUMBER = 14; + + @SuppressWarnings("serial") + private java.util.List transforms_; + /** + * + * + *
+     * Transformation matrices that were applied to the original document image
+     * to produce
+     * [Page.image][google.cloud.documentai.v1beta2.Document.Page.image].
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Matrix transforms = 14; + */ + @java.lang.Override + public java.util.List + getTransformsList() { + return transforms_; + } + /** + * + * + *
+     * Transformation matrices that were applied to the original document image
+     * to produce
+     * [Page.image][google.cloud.documentai.v1beta2.Document.Page.image].
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Matrix transforms = 14; + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.MatrixOrBuilder> + getTransformsOrBuilderList() { + return transforms_; + } + /** + * + * + *
+     * Transformation matrices that were applied to the original document image
+     * to produce
+     * [Page.image][google.cloud.documentai.v1beta2.Document.Page.image].
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Matrix transforms = 14; + */ + @java.lang.Override + public int getTransformsCount() { + return transforms_.size(); + } + /** + * + * + *
+     * Transformation matrices that were applied to the original document image
+     * to produce
+     * [Page.image][google.cloud.documentai.v1beta2.Document.Page.image].
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Matrix transforms = 14; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Matrix getTransforms(int index) { + return transforms_.get(index); + } + /** + * + * + *
+     * Transformation matrices that were applied to the original document image
+     * to produce
+     * [Page.image][google.cloud.documentai.v1beta2.Document.Page.image].
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Matrix transforms = 14; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.MatrixOrBuilder getTransformsOrBuilder( + int index) { + return transforms_.get(index); + } + + public static final int DIMENSION_FIELD_NUMBER = 2; + private com.google.cloud.documentai.v1beta2.Document.Page.Dimension dimension_; + /** + * + * + *
+     * Physical dimension of the page.
+     * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Dimension dimension = 2; + * + * @return Whether the dimension field is set. + */ + @java.lang.Override + public boolean hasDimension() { + return dimension_ != null; + } + /** + * + * + *
+     * Physical dimension of the page.
+     * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Dimension dimension = 2; + * + * @return The dimension. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Dimension getDimension() { + return dimension_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Dimension.getDefaultInstance() + : dimension_; + } + /** + * + * + *
+     * Physical dimension of the page.
+     * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Dimension dimension = 2; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.DimensionOrBuilder + getDimensionOrBuilder() { + return dimension_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Dimension.getDefaultInstance() + : dimension_; + } + + public static final int LAYOUT_FIELD_NUMBER = 3; + private com.google.cloud.documentai.v1beta2.Document.Page.Layout layout_; + /** + * + * + *
+     * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the
+     * page.
+     * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 3; + * + * @return Whether the layout field is set. + */ + @java.lang.Override + public boolean hasLayout() { + return layout_ != null; + } + /** + * + * + *
+     * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the
+     * page.
+     * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 3; + * + * @return The layout. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Layout getLayout() { + return layout_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() + : layout_; + } + /** + * + * + *
+     * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the
+     * page.
+     * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 3; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder getLayoutOrBuilder() { + return layout_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() + : layout_; + } + + public static final int DETECTED_LANGUAGES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List + detectedLanguages_; + /** + * + * + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + @java.lang.Override + public java.util.List + getDetectedLanguagesList() { + return detectedLanguages_; + } + /** + * + * + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> + getDetectedLanguagesOrBuilderList() { + return detectedLanguages_; + } + /** + * + * + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + @java.lang.Override + public int getDetectedLanguagesCount() { + return detectedLanguages_.size(); + } + /** + * + * + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage getDetectedLanguages( + int index) { + return detectedLanguages_.get(index); + } + /** + * + * + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder + getDetectedLanguagesOrBuilder(int index) { + return detectedLanguages_.get(index); + } + + public static final int BLOCKS_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private java.util.List blocks_; + /** + * + * + *
+     * A list of visually detected text blocks on the page.
+     * A block has a set of lines (collected into paragraphs) that have a common
+     * line-spacing and orientation.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Block blocks = 5; + */ + @java.lang.Override + public java.util.List getBlocksList() { + return blocks_; + } + /** + * + * + *
+     * A list of visually detected text blocks on the page.
+     * A block has a set of lines (collected into paragraphs) that have a common
+     * line-spacing and orientation.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Block blocks = 5; + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.BlockOrBuilder> + getBlocksOrBuilderList() { + return blocks_; + } + /** + * + * + *
+     * A list of visually detected text blocks on the page.
+     * A block has a set of lines (collected into paragraphs) that have a common
+     * line-spacing and orientation.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Block blocks = 5; + */ + @java.lang.Override + public int getBlocksCount() { + return blocks_.size(); + } + /** + * + * + *
+     * A list of visually detected text blocks on the page.
+     * A block has a set of lines (collected into paragraphs) that have a common
+     * line-spacing and orientation.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Block blocks = 5; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Block getBlocks(int index) { + return blocks_.get(index); + } + /** + * + * + *
+     * A list of visually detected text blocks on the page.
+     * A block has a set of lines (collected into paragraphs) that have a common
+     * line-spacing and orientation.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Block blocks = 5; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.BlockOrBuilder getBlocksOrBuilder( + int index) { + return blocks_.get(index); + } + + public static final int PARAGRAPHS_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private java.util.List paragraphs_; + /** + * + * + *
+     * A list of visually detected text paragraphs on the page.
+     * A collection of lines that a human would perceive as a paragraph.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Paragraph paragraphs = 6; + * + */ + @java.lang.Override + public java.util.List + getParagraphsList() { + return paragraphs_; + } + /** + * + * + *
+     * A list of visually detected text paragraphs on the page.
+     * A collection of lines that a human would perceive as a paragraph.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Paragraph paragraphs = 6; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.ParagraphOrBuilder> + getParagraphsOrBuilderList() { + return paragraphs_; + } + /** + * + * + *
+     * A list of visually detected text paragraphs on the page.
+     * A collection of lines that a human would perceive as a paragraph.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Paragraph paragraphs = 6; + * + */ + @java.lang.Override + public int getParagraphsCount() { + return paragraphs_.size(); + } + /** + * + * + *
+     * A list of visually detected text paragraphs on the page.
+     * A collection of lines that a human would perceive as a paragraph.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Paragraph paragraphs = 6; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Paragraph getParagraphs(int index) { + return paragraphs_.get(index); + } + /** + * + * + *
+     * A list of visually detected text paragraphs on the page.
+     * A collection of lines that a human would perceive as a paragraph.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Paragraph paragraphs = 6; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.ParagraphOrBuilder + getParagraphsOrBuilder(int index) { + return paragraphs_.get(index); + } + + public static final int LINES_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private java.util.List lines_; + /** + * + * + *
+     * A list of visually detected text lines on the page.
+     * A collection of tokens that a human would perceive as a line.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Line lines = 7; + */ + @java.lang.Override + public java.util.List getLinesList() { + return lines_; + } + /** + * + * + *
+     * A list of visually detected text lines on the page.
+     * A collection of tokens that a human would perceive as a line.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Line lines = 7; + */ + @java.lang.Override + public java.util.List + getLinesOrBuilderList() { + return lines_; + } + /** + * + * + *
+     * A list of visually detected text lines on the page.
+     * A collection of tokens that a human would perceive as a line.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Line lines = 7; + */ + @java.lang.Override + public int getLinesCount() { + return lines_.size(); + } + /** + * + * + *
+     * A list of visually detected text lines on the page.
+     * A collection of tokens that a human would perceive as a line.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Line lines = 7; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Line getLines(int index) { + return lines_.get(index); + } + /** + * + * + *
+     * A list of visually detected text lines on the page.
+     * A collection of tokens that a human would perceive as a line.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Line lines = 7; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.LineOrBuilder getLinesOrBuilder( + int index) { + return lines_.get(index); + } + + public static final int TOKENS_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private java.util.List tokens_; + /** + * + * + *
+     * A list of visually detected tokens on the page.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Token tokens = 8; + */ + @java.lang.Override + public java.util.List getTokensList() { + return tokens_; + } + /** + * + * + *
+     * A list of visually detected tokens on the page.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Token tokens = 8; + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.TokenOrBuilder> + getTokensOrBuilderList() { + return tokens_; + } + /** + * + * + *
+     * A list of visually detected tokens on the page.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Token tokens = 8; + */ + @java.lang.Override + public int getTokensCount() { + return tokens_.size(); + } + /** + * + * + *
+     * A list of visually detected tokens on the page.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Token tokens = 8; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Token getTokens(int index) { + return tokens_.get(index); + } + /** + * + * + *
+     * A list of visually detected tokens on the page.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Token tokens = 8; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.TokenOrBuilder getTokensOrBuilder( + int index) { + return tokens_.get(index); + } + + public static final int VISUAL_ELEMENTS_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private java.util.List + visualElements_; + /** + * + * + *
+     * A list of detected non-text visual elements e.g. checkbox,
+     * signature etc. on the page.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.VisualElement visual_elements = 9; + * + */ + @java.lang.Override + public java.util.List + getVisualElementsList() { + return visualElements_; + } + /** + * + * + *
+     * A list of detected non-text visual elements e.g. checkbox,
+     * signature etc. on the page.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.VisualElement visual_elements = 9; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.VisualElementOrBuilder> + getVisualElementsOrBuilderList() { + return visualElements_; + } + /** + * + * + *
+     * A list of detected non-text visual elements e.g. checkbox,
+     * signature etc. on the page.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.VisualElement visual_elements = 9; + * + */ + @java.lang.Override + public int getVisualElementsCount() { + return visualElements_.size(); + } + /** + * + * + *
+     * A list of detected non-text visual elements e.g. checkbox,
+     * signature etc. on the page.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.VisualElement visual_elements = 9; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.VisualElement getVisualElements( + int index) { + return visualElements_.get(index); + } + /** + * + * + *
+     * A list of detected non-text visual elements e.g. checkbox,
+     * signature etc. on the page.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.VisualElement visual_elements = 9; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.VisualElementOrBuilder + getVisualElementsOrBuilder(int index) { + return visualElements_.get(index); + } + + public static final int TABLES_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private java.util.List tables_; + /** + * + * + *
+     * A list of visually detected tables on the page.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table tables = 10; + */ + @java.lang.Override + public java.util.List getTablesList() { + return tables_; + } + /** + * + * + *
+     * A list of visually detected tables on the page.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table tables = 10; + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.TableOrBuilder> + getTablesOrBuilderList() { + return tables_; + } + /** + * + * + *
+     * A list of visually detected tables on the page.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table tables = 10; + */ + @java.lang.Override + public int getTablesCount() { + return tables_.size(); + } + /** + * + * + *
+     * A list of visually detected tables on the page.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table tables = 10; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Table getTables(int index) { + return tables_.get(index); + } + /** + * + * + *
+     * A list of visually detected tables on the page.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table tables = 10; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.TableOrBuilder getTablesOrBuilder( + int index) { + return tables_.get(index); + } + + public static final int FORM_FIELDS_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private java.util.List formFields_; + /** + * + * + *
+     * A list of visually detected form fields on the page.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.FormField form_fields = 11; + * + */ + @java.lang.Override + public java.util.List + getFormFieldsList() { + return formFields_; + } + /** + * + * + *
+     * A list of visually detected form fields on the page.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.FormField form_fields = 11; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.FormFieldOrBuilder> + getFormFieldsOrBuilderList() { + return formFields_; + } + /** + * + * + *
+     * A list of visually detected form fields on the page.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.FormField form_fields = 11; + * + */ + @java.lang.Override + public int getFormFieldsCount() { + return formFields_.size(); + } + /** + * + * + *
+     * A list of visually detected form fields on the page.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.FormField form_fields = 11; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.FormField getFormFields(int index) { + return formFields_.get(index); + } + /** + * + * + *
+     * A list of visually detected form fields on the page.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.FormField form_fields = 11; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.FormFieldOrBuilder + getFormFieldsOrBuilder(int index) { + return formFields_.get(index); + } + + public static final int SYMBOLS_FIELD_NUMBER = 12; + + @SuppressWarnings("serial") + private java.util.List symbols_; + /** + * + * + *
+     * A list of visually detected symbols on the page.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Symbol symbols = 12; + */ + @java.lang.Override + public java.util.List + getSymbolsList() { + return symbols_; + } + /** + * + * + *
+     * A list of visually detected symbols on the page.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Symbol symbols = 12; + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.SymbolOrBuilder> + getSymbolsOrBuilderList() { + return symbols_; + } + /** + * + * + *
+     * A list of visually detected symbols on the page.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Symbol symbols = 12; + */ + @java.lang.Override + public int getSymbolsCount() { + return symbols_.size(); + } + /** + * + * + *
+     * A list of visually detected symbols on the page.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Symbol symbols = 12; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.Symbol getSymbols(int index) { + return symbols_.get(index); + } + /** + * + * + *
+     * A list of visually detected symbols on the page.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Symbol symbols = 12; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.SymbolOrBuilder getSymbolsOrBuilder( + int index) { + return symbols_.get(index); + } + + public static final int DETECTED_BARCODES_FIELD_NUMBER = 15; + + @SuppressWarnings("serial") + private java.util.List + detectedBarcodes_; + /** + * + * + *
+     * A list of detected barcodes.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode detected_barcodes = 15; + * + */ + @java.lang.Override + public java.util.List + getDetectedBarcodesList() { + return detectedBarcodes_; + } + /** + * + * + *
+     * A list of detected barcodes.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode detected_barcodes = 15; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcodeOrBuilder> + getDetectedBarcodesOrBuilderList() { + return detectedBarcodes_; + } + /** + * + * + *
+     * A list of detected barcodes.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode detected_barcodes = 15; + * + */ + @java.lang.Override + public int getDetectedBarcodesCount() { + return detectedBarcodes_.size(); + } + /** + * + * + *
+     * A list of detected barcodes.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode detected_barcodes = 15; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode getDetectedBarcodes( + int index) { + return detectedBarcodes_.get(index); + } + /** + * + * + *
+     * A list of detected barcodes.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode detected_barcodes = 15; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcodeOrBuilder + getDetectedBarcodesOrBuilder(int index) { + return detectedBarcodes_.get(index); + } + + public static final int IMAGE_QUALITY_SCORES_FIELD_NUMBER = 17; + private com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + imageQualityScores_; + /** + * + * + *
+     * Image quality scores.
+     * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores image_quality_scores = 17; + * + * + * @return Whether the imageQualityScores field is set. + */ + @java.lang.Override + public boolean hasImageQualityScores() { + return imageQualityScores_ != null; + } + /** + * + * + *
+     * Image quality scores.
+     * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores image_quality_scores = 17; + * + * + * @return The imageQualityScores. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + getImageQualityScores() { + return imageQualityScores_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + .getDefaultInstance() + : imageQualityScores_; + } + /** + * + * + *
+     * Image quality scores.
+     * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores image_quality_scores = 17; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScoresOrBuilder + getImageQualityScoresOrBuilder() { + return imageQualityScores_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + .getDefaultInstance() + : imageQualityScores_; + } + + public static final int PROVENANCE_FIELD_NUMBER = 16; + private com.google.cloud.documentai.v1beta2.Document.Provenance provenance_; + /** + * + * + *
+     * The history of this page.
+     * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 16 [deprecated = true]; + * + * + * @deprecated google.cloud.documentai.v1beta2.Document.Page.provenance is deprecated. See + * google/cloud/documentai/v1beta2/document.proto;l=577 + * @return Whether the provenance field is set. + */ + @java.lang.Override + @java.lang.Deprecated + public boolean hasProvenance() { + return provenance_ != null; + } + /** + * + * + *
+     * The history of this page.
+     * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 16 [deprecated = true]; + * + * + * @deprecated google.cloud.documentai.v1beta2.Document.Page.provenance is deprecated. See + * google/cloud/documentai/v1beta2/document.proto;l=577 + * @return The provenance. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.cloud.documentai.v1beta2.Document.Provenance getProvenance() { + return provenance_ == null + ? com.google.cloud.documentai.v1beta2.Document.Provenance.getDefaultInstance() + : provenance_; + } + /** + * + * + *
+     * The history of this page.
+     * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 16 [deprecated = true]; + * + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder + getProvenanceOrBuilder() { + return provenance_ == null + ? com.google.cloud.documentai.v1beta2.Document.Provenance.getDefaultInstance() + : provenance_; + } + + 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 (pageNumber_ != 0) { + output.writeInt32(1, pageNumber_); + } + if (dimension_ != null) { + output.writeMessage(2, getDimension()); + } + if (layout_ != null) { + output.writeMessage(3, getLayout()); + } + for (int i = 0; i < detectedLanguages_.size(); i++) { + output.writeMessage(4, detectedLanguages_.get(i)); + } + for (int i = 0; i < blocks_.size(); i++) { + output.writeMessage(5, blocks_.get(i)); + } + for (int i = 0; i < paragraphs_.size(); i++) { + output.writeMessage(6, paragraphs_.get(i)); + } + for (int i = 0; i < lines_.size(); i++) { + output.writeMessage(7, lines_.get(i)); + } + for (int i = 0; i < tokens_.size(); i++) { + output.writeMessage(8, tokens_.get(i)); + } + for (int i = 0; i < visualElements_.size(); i++) { + output.writeMessage(9, visualElements_.get(i)); + } + for (int i = 0; i < tables_.size(); i++) { + output.writeMessage(10, tables_.get(i)); + } + for (int i = 0; i < formFields_.size(); i++) { + output.writeMessage(11, formFields_.get(i)); + } + for (int i = 0; i < symbols_.size(); i++) { + output.writeMessage(12, symbols_.get(i)); + } + if (image_ != null) { + output.writeMessage(13, getImage()); + } + for (int i = 0; i < transforms_.size(); i++) { + output.writeMessage(14, transforms_.get(i)); + } + for (int i = 0; i < detectedBarcodes_.size(); i++) { + output.writeMessage(15, detectedBarcodes_.get(i)); + } + if (provenance_ != null) { + output.writeMessage(16, getProvenance()); + } + if (imageQualityScores_ != null) { + output.writeMessage(17, getImageQualityScores()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (pageNumber_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, pageNumber_); + } + if (dimension_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDimension()); + } + if (layout_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getLayout()); + } + for (int i = 0; i < detectedLanguages_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(4, detectedLanguages_.get(i)); + } + for (int i = 0; i < blocks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, blocks_.get(i)); + } + for (int i = 0; i < paragraphs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, paragraphs_.get(i)); + } + for (int i = 0; i < lines_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, lines_.get(i)); + } + for (int i = 0; i < tokens_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, tokens_.get(i)); + } + for (int i = 0; i < visualElements_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, visualElements_.get(i)); + } + for (int i = 0; i < tables_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, tables_.get(i)); + } + for (int i = 0; i < formFields_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, formFields_.get(i)); + } + for (int i = 0; i < symbols_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, symbols_.get(i)); + } + if (image_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getImage()); + } + for (int i = 0; i < transforms_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, transforms_.get(i)); + } + for (int i = 0; i < detectedBarcodes_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(15, detectedBarcodes_.get(i)); + } + if (provenance_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, getProvenance()); + } + if (imageQualityScores_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(17, getImageQualityScores()); + } + size += getUnknownFields().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.v1beta2.Document.Page)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta2.Document.Page other = + (com.google.cloud.documentai.v1beta2.Document.Page) obj; + + if (getPageNumber() != other.getPageNumber()) return false; + if (hasImage() != other.hasImage()) return false; + if (hasImage()) { + if (!getImage().equals(other.getImage())) return false; + } + if (!getTransformsList().equals(other.getTransformsList())) return false; + if (hasDimension() != other.hasDimension()) return false; + if (hasDimension()) { + if (!getDimension().equals(other.getDimension())) return false; + } + if (hasLayout() != other.hasLayout()) return false; + if (hasLayout()) { + if (!getLayout().equals(other.getLayout())) return false; + } + if (!getDetectedLanguagesList().equals(other.getDetectedLanguagesList())) return false; + if (!getBlocksList().equals(other.getBlocksList())) return false; + if (!getParagraphsList().equals(other.getParagraphsList())) return false; + if (!getLinesList().equals(other.getLinesList())) return false; + if (!getTokensList().equals(other.getTokensList())) return false; + if (!getVisualElementsList().equals(other.getVisualElementsList())) return false; + if (!getTablesList().equals(other.getTablesList())) return false; + if (!getFormFieldsList().equals(other.getFormFieldsList())) return false; + if (!getSymbolsList().equals(other.getSymbolsList())) return false; + if (!getDetectedBarcodesList().equals(other.getDetectedBarcodesList())) return false; + if (hasImageQualityScores() != other.hasImageQualityScores()) return false; + if (hasImageQualityScores()) { + if (!getImageQualityScores().equals(other.getImageQualityScores())) return false; + } + if (hasProvenance() != other.hasProvenance()) return false; + if (hasProvenance()) { + if (!getProvenance().equals(other.getProvenance())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + PAGE_NUMBER_FIELD_NUMBER; + hash = (53 * hash) + getPageNumber(); + if (hasImage()) { + hash = (37 * hash) + IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getImage().hashCode(); + } + if (getTransformsCount() > 0) { + hash = (37 * hash) + TRANSFORMS_FIELD_NUMBER; + hash = (53 * hash) + getTransformsList().hashCode(); + } + if (hasDimension()) { + hash = (37 * hash) + DIMENSION_FIELD_NUMBER; + hash = (53 * hash) + getDimension().hashCode(); + } + if (hasLayout()) { + hash = (37 * hash) + LAYOUT_FIELD_NUMBER; + hash = (53 * hash) + getLayout().hashCode(); + } + if (getDetectedLanguagesCount() > 0) { + hash = (37 * hash) + DETECTED_LANGUAGES_FIELD_NUMBER; + hash = (53 * hash) + getDetectedLanguagesList().hashCode(); + } + if (getBlocksCount() > 0) { + hash = (37 * hash) + BLOCKS_FIELD_NUMBER; + hash = (53 * hash) + getBlocksList().hashCode(); + } + if (getParagraphsCount() > 0) { + hash = (37 * hash) + PARAGRAPHS_FIELD_NUMBER; + hash = (53 * hash) + getParagraphsList().hashCode(); + } + if (getLinesCount() > 0) { + hash = (37 * hash) + LINES_FIELD_NUMBER; + hash = (53 * hash) + getLinesList().hashCode(); + } + if (getTokensCount() > 0) { + hash = (37 * hash) + TOKENS_FIELD_NUMBER; + hash = (53 * hash) + getTokensList().hashCode(); + } + if (getVisualElementsCount() > 0) { + hash = (37 * hash) + VISUAL_ELEMENTS_FIELD_NUMBER; + hash = (53 * hash) + getVisualElementsList().hashCode(); + } + if (getTablesCount() > 0) { + hash = (37 * hash) + TABLES_FIELD_NUMBER; + hash = (53 * hash) + getTablesList().hashCode(); + } + if (getFormFieldsCount() > 0) { + hash = (37 * hash) + FORM_FIELDS_FIELD_NUMBER; + hash = (53 * hash) + getFormFieldsList().hashCode(); + } + if (getSymbolsCount() > 0) { + hash = (37 * hash) + SYMBOLS_FIELD_NUMBER; + hash = (53 * hash) + getSymbolsList().hashCode(); + } + if (getDetectedBarcodesCount() > 0) { + hash = (37 * hash) + DETECTED_BARCODES_FIELD_NUMBER; + hash = (53 * hash) + getDetectedBarcodesList().hashCode(); + } + if (hasImageQualityScores()) { + hash = (37 * hash) + IMAGE_QUALITY_SCORES_FIELD_NUMBER; + hash = (53 * hash) + getImageQualityScores().hashCode(); + } + if (hasProvenance()) { + hash = (37 * hash) + PROVENANCE_FIELD_NUMBER; + hash = (53 * hash) + getProvenance().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta2.Document.Page parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page 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.v1beta2.Document.Page parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page 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.v1beta2.Document.Page parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page 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.v1beta2.Document.Page parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page 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.v1beta2.Document.Page parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page 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.v1beta2.Document.Page 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 page in a [Document][google.cloud.documentai.v1beta2.Document].
+     * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.Page) + com.google.cloud.documentai.v1beta2.Document.PageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Document.Page.class, + com.google.cloud.documentai.v1beta2.Document.Page.Builder.class); + } + + // Construct using com.google.cloud.documentai.v1beta2.Document.Page.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + pageNumber_ = 0; + image_ = null; + if (imageBuilder_ != null) { + imageBuilder_.dispose(); + imageBuilder_ = null; + } + if (transformsBuilder_ == null) { + transforms_ = java.util.Collections.emptyList(); + } else { + transforms_ = null; + transformsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + dimension_ = null; + if (dimensionBuilder_ != null) { + dimensionBuilder_.dispose(); + dimensionBuilder_ = null; + } + layout_ = null; + if (layoutBuilder_ != null) { + layoutBuilder_.dispose(); + layoutBuilder_ = null; + } + if (detectedLanguagesBuilder_ == null) { + detectedLanguages_ = java.util.Collections.emptyList(); + } else { + detectedLanguages_ = null; + detectedLanguagesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + if (blocksBuilder_ == null) { + blocks_ = java.util.Collections.emptyList(); + } else { + blocks_ = null; + blocksBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000040); + if (paragraphsBuilder_ == null) { + paragraphs_ = java.util.Collections.emptyList(); + } else { + paragraphs_ = null; + paragraphsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000080); + if (linesBuilder_ == null) { + lines_ = java.util.Collections.emptyList(); + } else { + lines_ = null; + linesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000100); + if (tokensBuilder_ == null) { + tokens_ = java.util.Collections.emptyList(); + } else { + tokens_ = null; + tokensBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000200); + if (visualElementsBuilder_ == null) { + visualElements_ = java.util.Collections.emptyList(); + } else { + visualElements_ = null; + visualElementsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000400); + if (tablesBuilder_ == null) { + tables_ = java.util.Collections.emptyList(); + } else { + tables_ = null; + tablesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000800); + if (formFieldsBuilder_ == null) { + formFields_ = java.util.Collections.emptyList(); + } else { + formFields_ = null; + formFieldsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00001000); + if (symbolsBuilder_ == null) { + symbols_ = java.util.Collections.emptyList(); + } else { + symbols_ = null; + symbolsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00002000); + if (detectedBarcodesBuilder_ == null) { + detectedBarcodes_ = java.util.Collections.emptyList(); + } else { + detectedBarcodes_ = null; + detectedBarcodesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00004000); + imageQualityScores_ = null; + if (imageQualityScoresBuilder_ != null) { + imageQualityScoresBuilder_.dispose(); + imageQualityScoresBuilder_ = null; + } + provenance_ = null; + if (provenanceBuilder_ != null) { + provenanceBuilder_.dispose(); + provenanceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Page_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta2.Document.Page.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page build() { + com.google.cloud.documentai.v1beta2.Document.Page result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page buildPartial() { + com.google.cloud.documentai.v1beta2.Document.Page result = + new com.google.cloud.documentai.v1beta2.Document.Page(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.documentai.v1beta2.Document.Page result) { + if (transformsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + transforms_ = java.util.Collections.unmodifiableList(transforms_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.transforms_ = transforms_; + } else { + result.transforms_ = transformsBuilder_.build(); + } + if (detectedLanguagesBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + detectedLanguages_ = java.util.Collections.unmodifiableList(detectedLanguages_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.detectedLanguages_ = detectedLanguages_; + } else { + result.detectedLanguages_ = detectedLanguagesBuilder_.build(); + } + if (blocksBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0)) { + blocks_ = java.util.Collections.unmodifiableList(blocks_); + bitField0_ = (bitField0_ & ~0x00000040); + } + result.blocks_ = blocks_; + } else { + result.blocks_ = blocksBuilder_.build(); + } + if (paragraphsBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0)) { + paragraphs_ = java.util.Collections.unmodifiableList(paragraphs_); + bitField0_ = (bitField0_ & ~0x00000080); + } + result.paragraphs_ = paragraphs_; + } else { + result.paragraphs_ = paragraphsBuilder_.build(); + } + if (linesBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0)) { + lines_ = java.util.Collections.unmodifiableList(lines_); + bitField0_ = (bitField0_ & ~0x00000100); + } + result.lines_ = lines_; + } else { + result.lines_ = linesBuilder_.build(); + } + if (tokensBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0)) { + tokens_ = java.util.Collections.unmodifiableList(tokens_); + bitField0_ = (bitField0_ & ~0x00000200); + } + result.tokens_ = tokens_; + } else { + result.tokens_ = tokensBuilder_.build(); + } + if (visualElementsBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0)) { + visualElements_ = java.util.Collections.unmodifiableList(visualElements_); + bitField0_ = (bitField0_ & ~0x00000400); + } + result.visualElements_ = visualElements_; + } else { + result.visualElements_ = visualElementsBuilder_.build(); + } + if (tablesBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0)) { + tables_ = java.util.Collections.unmodifiableList(tables_); + bitField0_ = (bitField0_ & ~0x00000800); + } + result.tables_ = tables_; + } else { + result.tables_ = tablesBuilder_.build(); + } + if (formFieldsBuilder_ == null) { + if (((bitField0_ & 0x00001000) != 0)) { + formFields_ = java.util.Collections.unmodifiableList(formFields_); + bitField0_ = (bitField0_ & ~0x00001000); + } + result.formFields_ = formFields_; + } else { + result.formFields_ = formFieldsBuilder_.build(); + } + if (symbolsBuilder_ == null) { + if (((bitField0_ & 0x00002000) != 0)) { + symbols_ = java.util.Collections.unmodifiableList(symbols_); + bitField0_ = (bitField0_ & ~0x00002000); + } + result.symbols_ = symbols_; + } else { + result.symbols_ = symbolsBuilder_.build(); + } + if (detectedBarcodesBuilder_ == null) { + if (((bitField0_ & 0x00004000) != 0)) { + detectedBarcodes_ = java.util.Collections.unmodifiableList(detectedBarcodes_); + bitField0_ = (bitField0_ & ~0x00004000); + } + result.detectedBarcodes_ = detectedBarcodes_; + } else { + result.detectedBarcodes_ = detectedBarcodesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.documentai.v1beta2.Document.Page result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.pageNumber_ = pageNumber_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.image_ = imageBuilder_ == null ? image_ : imageBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.dimension_ = dimensionBuilder_ == null ? dimension_ : dimensionBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.layout_ = layoutBuilder_ == null ? layout_ : layoutBuilder_.build(); + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.imageQualityScores_ = + imageQualityScoresBuilder_ == null + ? imageQualityScores_ + : imageQualityScoresBuilder_.build(); + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.provenance_ = + provenanceBuilder_ == null ? provenance_ : provenanceBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta2.Document.Page) { + return mergeFrom((com.google.cloud.documentai.v1beta2.Document.Page) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.documentai.v1beta2.Document.Page other) { + if (other == com.google.cloud.documentai.v1beta2.Document.Page.getDefaultInstance()) + return this; + if (other.getPageNumber() != 0) { + setPageNumber(other.getPageNumber()); + } + if (other.hasImage()) { + mergeImage(other.getImage()); + } + if (transformsBuilder_ == null) { + if (!other.transforms_.isEmpty()) { + if (transforms_.isEmpty()) { + transforms_ = other.transforms_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureTransformsIsMutable(); + transforms_.addAll(other.transforms_); + } + onChanged(); + } + } else { + if (!other.transforms_.isEmpty()) { + if (transformsBuilder_.isEmpty()) { + transformsBuilder_.dispose(); + transformsBuilder_ = null; + transforms_ = other.transforms_; + bitField0_ = (bitField0_ & ~0x00000004); + transformsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTransformsFieldBuilder() + : null; + } else { + transformsBuilder_.addAllMessages(other.transforms_); + } + } + } + if (other.hasDimension()) { + mergeDimension(other.getDimension()); + } + if (other.hasLayout()) { + mergeLayout(other.getLayout()); + } + if (detectedLanguagesBuilder_ == null) { + if (!other.detectedLanguages_.isEmpty()) { + if (detectedLanguages_.isEmpty()) { + detectedLanguages_ = other.detectedLanguages_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.addAll(other.detectedLanguages_); + } + onChanged(); + } + } else { + if (!other.detectedLanguages_.isEmpty()) { + if (detectedLanguagesBuilder_.isEmpty()) { + detectedLanguagesBuilder_.dispose(); + detectedLanguagesBuilder_ = null; + detectedLanguages_ = other.detectedLanguages_; + bitField0_ = (bitField0_ & ~0x00000020); + detectedLanguagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDetectedLanguagesFieldBuilder() + : null; + } else { + detectedLanguagesBuilder_.addAllMessages(other.detectedLanguages_); + } + } + } + if (blocksBuilder_ == null) { + if (!other.blocks_.isEmpty()) { + if (blocks_.isEmpty()) { + blocks_ = other.blocks_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensureBlocksIsMutable(); + blocks_.addAll(other.blocks_); + } + onChanged(); + } + } else { + if (!other.blocks_.isEmpty()) { + if (blocksBuilder_.isEmpty()) { + blocksBuilder_.dispose(); + blocksBuilder_ = null; + blocks_ = other.blocks_; + bitField0_ = (bitField0_ & ~0x00000040); + blocksBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getBlocksFieldBuilder() + : null; + } else { + blocksBuilder_.addAllMessages(other.blocks_); + } + } + } + if (paragraphsBuilder_ == null) { + if (!other.paragraphs_.isEmpty()) { + if (paragraphs_.isEmpty()) { + paragraphs_ = other.paragraphs_; + bitField0_ = (bitField0_ & ~0x00000080); + } else { + ensureParagraphsIsMutable(); + paragraphs_.addAll(other.paragraphs_); + } + onChanged(); + } + } else { + if (!other.paragraphs_.isEmpty()) { + if (paragraphsBuilder_.isEmpty()) { + paragraphsBuilder_.dispose(); + paragraphsBuilder_ = null; + paragraphs_ = other.paragraphs_; + bitField0_ = (bitField0_ & ~0x00000080); + paragraphsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getParagraphsFieldBuilder() + : null; + } else { + paragraphsBuilder_.addAllMessages(other.paragraphs_); + } + } + } + if (linesBuilder_ == null) { + if (!other.lines_.isEmpty()) { + if (lines_.isEmpty()) { + lines_ = other.lines_; + bitField0_ = (bitField0_ & ~0x00000100); + } else { + ensureLinesIsMutable(); + lines_.addAll(other.lines_); + } + onChanged(); + } + } else { + if (!other.lines_.isEmpty()) { + if (linesBuilder_.isEmpty()) { + linesBuilder_.dispose(); + linesBuilder_ = null; + lines_ = other.lines_; + bitField0_ = (bitField0_ & ~0x00000100); + linesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getLinesFieldBuilder() + : null; + } else { + linesBuilder_.addAllMessages(other.lines_); + } + } + } + if (tokensBuilder_ == null) { + if (!other.tokens_.isEmpty()) { + if (tokens_.isEmpty()) { + tokens_ = other.tokens_; + bitField0_ = (bitField0_ & ~0x00000200); + } else { + ensureTokensIsMutable(); + tokens_.addAll(other.tokens_); + } + onChanged(); + } + } else { + if (!other.tokens_.isEmpty()) { + if (tokensBuilder_.isEmpty()) { + tokensBuilder_.dispose(); + tokensBuilder_ = null; + tokens_ = other.tokens_; + bitField0_ = (bitField0_ & ~0x00000200); + tokensBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTokensFieldBuilder() + : null; + } else { + tokensBuilder_.addAllMessages(other.tokens_); + } + } + } + if (visualElementsBuilder_ == null) { + if (!other.visualElements_.isEmpty()) { + if (visualElements_.isEmpty()) { + visualElements_ = other.visualElements_; + bitField0_ = (bitField0_ & ~0x00000400); + } else { + ensureVisualElementsIsMutable(); + visualElements_.addAll(other.visualElements_); + } + onChanged(); + } + } else { + if (!other.visualElements_.isEmpty()) { + if (visualElementsBuilder_.isEmpty()) { + visualElementsBuilder_.dispose(); + visualElementsBuilder_ = null; + visualElements_ = other.visualElements_; + bitField0_ = (bitField0_ & ~0x00000400); + visualElementsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getVisualElementsFieldBuilder() + : null; + } else { + visualElementsBuilder_.addAllMessages(other.visualElements_); + } + } + } + if (tablesBuilder_ == null) { + if (!other.tables_.isEmpty()) { + if (tables_.isEmpty()) { + tables_ = other.tables_; + bitField0_ = (bitField0_ & ~0x00000800); + } else { + ensureTablesIsMutable(); + tables_.addAll(other.tables_); + } + onChanged(); + } + } else { + if (!other.tables_.isEmpty()) { + if (tablesBuilder_.isEmpty()) { + tablesBuilder_.dispose(); + tablesBuilder_ = null; + tables_ = other.tables_; + bitField0_ = (bitField0_ & ~0x00000800); + tablesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTablesFieldBuilder() + : null; + } else { + tablesBuilder_.addAllMessages(other.tables_); + } + } + } + if (formFieldsBuilder_ == null) { + if (!other.formFields_.isEmpty()) { + if (formFields_.isEmpty()) { + formFields_ = other.formFields_; + bitField0_ = (bitField0_ & ~0x00001000); + } else { + ensureFormFieldsIsMutable(); + formFields_.addAll(other.formFields_); + } + onChanged(); + } + } else { + if (!other.formFields_.isEmpty()) { + if (formFieldsBuilder_.isEmpty()) { + formFieldsBuilder_.dispose(); + formFieldsBuilder_ = null; + formFields_ = other.formFields_; + bitField0_ = (bitField0_ & ~0x00001000); + formFieldsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getFormFieldsFieldBuilder() + : null; + } else { + formFieldsBuilder_.addAllMessages(other.formFields_); + } + } + } + if (symbolsBuilder_ == null) { + if (!other.symbols_.isEmpty()) { + if (symbols_.isEmpty()) { + symbols_ = other.symbols_; + bitField0_ = (bitField0_ & ~0x00002000); + } else { + ensureSymbolsIsMutable(); + symbols_.addAll(other.symbols_); + } + onChanged(); + } + } else { + if (!other.symbols_.isEmpty()) { + if (symbolsBuilder_.isEmpty()) { + symbolsBuilder_.dispose(); + symbolsBuilder_ = null; + symbols_ = other.symbols_; + bitField0_ = (bitField0_ & ~0x00002000); + symbolsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSymbolsFieldBuilder() + : null; + } else { + symbolsBuilder_.addAllMessages(other.symbols_); + } + } + } + if (detectedBarcodesBuilder_ == null) { + if (!other.detectedBarcodes_.isEmpty()) { + if (detectedBarcodes_.isEmpty()) { + detectedBarcodes_ = other.detectedBarcodes_; + bitField0_ = (bitField0_ & ~0x00004000); + } else { + ensureDetectedBarcodesIsMutable(); + detectedBarcodes_.addAll(other.detectedBarcodes_); + } + onChanged(); + } + } else { + if (!other.detectedBarcodes_.isEmpty()) { + if (detectedBarcodesBuilder_.isEmpty()) { + detectedBarcodesBuilder_.dispose(); + detectedBarcodesBuilder_ = null; + detectedBarcodes_ = other.detectedBarcodes_; + bitField0_ = (bitField0_ & ~0x00004000); + detectedBarcodesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDetectedBarcodesFieldBuilder() + : null; + } else { + detectedBarcodesBuilder_.addAllMessages(other.detectedBarcodes_); + } + } + } + if (other.hasImageQualityScores()) { + mergeImageQualityScores(other.getImageQualityScores()); + } + if (other.hasProvenance()) { + mergeProvenance(other.getProvenance()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + pageNumber_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + input.readMessage(getDimensionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 18 + case 26: + { + input.readMessage(getLayoutFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 26 + case 34: + { + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage m = + input.readMessage( + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage + .parser(), + extensionRegistry); + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(m); + } else { + detectedLanguagesBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: + { + com.google.cloud.documentai.v1beta2.Document.Page.Block m = + input.readMessage( + com.google.cloud.documentai.v1beta2.Document.Page.Block.parser(), + extensionRegistry); + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.add(m); + } else { + blocksBuilder_.addMessage(m); + } + break; + } // case 42 + case 50: + { + com.google.cloud.documentai.v1beta2.Document.Page.Paragraph m = + input.readMessage( + com.google.cloud.documentai.v1beta2.Document.Page.Paragraph.parser(), + extensionRegistry); + if (paragraphsBuilder_ == null) { + ensureParagraphsIsMutable(); + paragraphs_.add(m); + } else { + paragraphsBuilder_.addMessage(m); + } + break; + } // case 50 + case 58: + { + com.google.cloud.documentai.v1beta2.Document.Page.Line m = + input.readMessage( + com.google.cloud.documentai.v1beta2.Document.Page.Line.parser(), + extensionRegistry); + if (linesBuilder_ == null) { + ensureLinesIsMutable(); + lines_.add(m); + } else { + linesBuilder_.addMessage(m); + } + break; + } // case 58 + case 66: + { + com.google.cloud.documentai.v1beta2.Document.Page.Token m = + input.readMessage( + com.google.cloud.documentai.v1beta2.Document.Page.Token.parser(), + extensionRegistry); + if (tokensBuilder_ == null) { + ensureTokensIsMutable(); + tokens_.add(m); + } else { + tokensBuilder_.addMessage(m); + } + break; + } // case 66 + case 74: + { + com.google.cloud.documentai.v1beta2.Document.Page.VisualElement m = + input.readMessage( + com.google.cloud.documentai.v1beta2.Document.Page.VisualElement.parser(), + extensionRegistry); + if (visualElementsBuilder_ == null) { + ensureVisualElementsIsMutable(); + visualElements_.add(m); + } else { + visualElementsBuilder_.addMessage(m); + } + break; + } // case 74 + case 82: + { + com.google.cloud.documentai.v1beta2.Document.Page.Table m = + input.readMessage( + com.google.cloud.documentai.v1beta2.Document.Page.Table.parser(), + extensionRegistry); + if (tablesBuilder_ == null) { + ensureTablesIsMutable(); + tables_.add(m); + } else { + tablesBuilder_.addMessage(m); + } + break; + } // case 82 + case 90: + { + com.google.cloud.documentai.v1beta2.Document.Page.FormField m = + input.readMessage( + com.google.cloud.documentai.v1beta2.Document.Page.FormField.parser(), + extensionRegistry); + if (formFieldsBuilder_ == null) { + ensureFormFieldsIsMutable(); + formFields_.add(m); + } else { + formFieldsBuilder_.addMessage(m); + } + break; + } // case 90 + case 98: + { + com.google.cloud.documentai.v1beta2.Document.Page.Symbol m = + input.readMessage( + com.google.cloud.documentai.v1beta2.Document.Page.Symbol.parser(), + extensionRegistry); + if (symbolsBuilder_ == null) { + ensureSymbolsIsMutable(); + symbols_.add(m); + } else { + symbolsBuilder_.addMessage(m); + } + break; + } // case 98 + case 106: + { + input.readMessage(getImageFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 106 + case 114: + { + com.google.cloud.documentai.v1beta2.Document.Page.Matrix m = + input.readMessage( + com.google.cloud.documentai.v1beta2.Document.Page.Matrix.parser(), + extensionRegistry); + if (transformsBuilder_ == null) { + ensureTransformsIsMutable(); + transforms_.add(m); + } else { + transformsBuilder_.addMessage(m); + } + break; + } // case 114 + case 122: + { + com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode m = + input.readMessage( + com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode + .parser(), + extensionRegistry); + if (detectedBarcodesBuilder_ == null) { + ensureDetectedBarcodesIsMutable(); + detectedBarcodes_.add(m); + } else { + detectedBarcodesBuilder_.addMessage(m); + } + break; + } // case 122 + case 130: + { + input.readMessage(getProvenanceFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00010000; + break; + } // case 130 + case 138: + { + input.readMessage( + getImageQualityScoresFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00008000; + break; + } // case 138 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int pageNumber_; + /** + * + * + *
+       * 1-based index for current
+       * [Page][google.cloud.documentai.v1beta2.Document.Page] in a parent
+       * [Document][google.cloud.documentai.v1beta2.Document]. Useful when a page
+       * is taken out of a [Document][google.cloud.documentai.v1beta2.Document]
+       * for individual processing.
+       * 
+ * + * int32 page_number = 1; + * + * @return The pageNumber. + */ + @java.lang.Override + public int getPageNumber() { + return pageNumber_; + } + /** + * + * + *
+       * 1-based index for current
+       * [Page][google.cloud.documentai.v1beta2.Document.Page] in a parent
+       * [Document][google.cloud.documentai.v1beta2.Document]. Useful when a page
+       * is taken out of a [Document][google.cloud.documentai.v1beta2.Document]
+       * for individual processing.
+       * 
+ * + * int32 page_number = 1; + * + * @param value The pageNumber to set. + * @return This builder for chaining. + */ + public Builder setPageNumber(int value) { + + pageNumber_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * 1-based index for current
+       * [Page][google.cloud.documentai.v1beta2.Document.Page] in a parent
+       * [Document][google.cloud.documentai.v1beta2.Document]. Useful when a page
+       * is taken out of a [Document][google.cloud.documentai.v1beta2.Document]
+       * for individual processing.
+       * 
+ * + * int32 page_number = 1; + * + * @return This builder for chaining. + */ + public Builder clearPageNumber() { + bitField0_ = (bitField0_ & ~0x00000001); + pageNumber_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.documentai.v1beta2.Document.Page.Image image_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Image, + com.google.cloud.documentai.v1beta2.Document.Page.Image.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.ImageOrBuilder> + imageBuilder_; + /** + * + * + *
+       * Rendered image for this page. This image is preprocessed to remove any
+       * skew, rotation, and distortions such that the annotation bounding boxes
+       * can be upright and axis-aligned.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Image image = 13; + * + * @return Whether the image field is set. + */ + public boolean hasImage() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * Rendered image for this page. This image is preprocessed to remove any
+       * skew, rotation, and distortions such that the annotation bounding boxes
+       * can be upright and axis-aligned.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Image image = 13; + * + * @return The image. + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Image getImage() { + if (imageBuilder_ == null) { + return image_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Image.getDefaultInstance() + : image_; + } else { + return imageBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Rendered image for this page. This image is preprocessed to remove any
+       * skew, rotation, and distortions such that the annotation bounding boxes
+       * can be upright and axis-aligned.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Image image = 13; + */ + public Builder setImage(com.google.cloud.documentai.v1beta2.Document.Page.Image value) { + if (imageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + image_ = value; + } else { + imageBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Rendered image for this page. This image is preprocessed to remove any
+       * skew, rotation, and distortions such that the annotation bounding boxes
+       * can be upright and axis-aligned.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Image image = 13; + */ + public Builder setImage( + com.google.cloud.documentai.v1beta2.Document.Page.Image.Builder builderForValue) { + if (imageBuilder_ == null) { + image_ = builderForValue.build(); + } else { + imageBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Rendered image for this page. This image is preprocessed to remove any
+       * skew, rotation, and distortions such that the annotation bounding boxes
+       * can be upright and axis-aligned.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Image image = 13; + */ + public Builder mergeImage(com.google.cloud.documentai.v1beta2.Document.Page.Image value) { + if (imageBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && image_ != null + && image_ + != com.google.cloud.documentai.v1beta2.Document.Page.Image.getDefaultInstance()) { + getImageBuilder().mergeFrom(value); + } else { + image_ = value; + } + } else { + imageBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Rendered image for this page. This image is preprocessed to remove any
+       * skew, rotation, and distortions such that the annotation bounding boxes
+       * can be upright and axis-aligned.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Image image = 13; + */ + public Builder clearImage() { + bitField0_ = (bitField0_ & ~0x00000002); + image_ = null; + if (imageBuilder_ != null) { + imageBuilder_.dispose(); + imageBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Rendered image for this page. This image is preprocessed to remove any
+       * skew, rotation, and distortions such that the annotation bounding boxes
+       * can be upright and axis-aligned.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Image image = 13; + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Image.Builder getImageBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getImageFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Rendered image for this page. This image is preprocessed to remove any
+       * skew, rotation, and distortions such that the annotation bounding boxes
+       * can be upright and axis-aligned.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Image image = 13; + */ + public com.google.cloud.documentai.v1beta2.Document.Page.ImageOrBuilder getImageOrBuilder() { + if (imageBuilder_ != null) { + return imageBuilder_.getMessageOrBuilder(); + } else { + return image_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Image.getDefaultInstance() + : image_; + } + } + /** + * + * + *
+       * Rendered image for this page. This image is preprocessed to remove any
+       * skew, rotation, and distortions such that the annotation bounding boxes
+       * can be upright and axis-aligned.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Image image = 13; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Image, + com.google.cloud.documentai.v1beta2.Document.Page.Image.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.ImageOrBuilder> + getImageFieldBuilder() { + if (imageBuilder_ == null) { + imageBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Image, + com.google.cloud.documentai.v1beta2.Document.Page.Image.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.ImageOrBuilder>( + getImage(), getParentForChildren(), isClean()); + image_ = null; + } + return imageBuilder_; + } + + private java.util.List transforms_ = + java.util.Collections.emptyList(); + + private void ensureTransformsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + transforms_ = + new java.util.ArrayList( + transforms_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Matrix, + com.google.cloud.documentai.v1beta2.Document.Page.Matrix.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.MatrixOrBuilder> + transformsBuilder_; + + /** + * + * + *
+       * Transformation matrices that were applied to the original document image
+       * to produce
+       * [Page.image][google.cloud.documentai.v1beta2.Document.Page.image].
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Matrix transforms = 14; + * + */ + public java.util.List + getTransformsList() { + if (transformsBuilder_ == null) { + return java.util.Collections.unmodifiableList(transforms_); + } else { + return transformsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Transformation matrices that were applied to the original document image
+       * to produce
+       * [Page.image][google.cloud.documentai.v1beta2.Document.Page.image].
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Matrix transforms = 14; + * + */ + public int getTransformsCount() { + if (transformsBuilder_ == null) { + return transforms_.size(); + } else { + return transformsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Transformation matrices that were applied to the original document image
+       * to produce
+       * [Page.image][google.cloud.documentai.v1beta2.Document.Page.image].
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Matrix transforms = 14; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Matrix getTransforms(int index) { + if (transformsBuilder_ == null) { + return transforms_.get(index); + } else { + return transformsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Transformation matrices that were applied to the original document image
+       * to produce
+       * [Page.image][google.cloud.documentai.v1beta2.Document.Page.image].
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Matrix transforms = 14; + * + */ + public Builder setTransforms( + int index, com.google.cloud.documentai.v1beta2.Document.Page.Matrix value) { + if (transformsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransformsIsMutable(); + transforms_.set(index, value); + onChanged(); + } else { + transformsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Transformation matrices that were applied to the original document image
+       * to produce
+       * [Page.image][google.cloud.documentai.v1beta2.Document.Page.image].
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Matrix transforms = 14; + * + */ + public Builder setTransforms( + int index, + com.google.cloud.documentai.v1beta2.Document.Page.Matrix.Builder builderForValue) { + if (transformsBuilder_ == null) { + ensureTransformsIsMutable(); + transforms_.set(index, builderForValue.build()); + onChanged(); + } else { + transformsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Transformation matrices that were applied to the original document image
+       * to produce
+       * [Page.image][google.cloud.documentai.v1beta2.Document.Page.image].
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Matrix transforms = 14; + * + */ + public Builder addTransforms(com.google.cloud.documentai.v1beta2.Document.Page.Matrix value) { + if (transformsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransformsIsMutable(); + transforms_.add(value); + onChanged(); + } else { + transformsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Transformation matrices that were applied to the original document image
+       * to produce
+       * [Page.image][google.cloud.documentai.v1beta2.Document.Page.image].
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Matrix transforms = 14; + * + */ + public Builder addTransforms( + int index, com.google.cloud.documentai.v1beta2.Document.Page.Matrix value) { + if (transformsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransformsIsMutable(); + transforms_.add(index, value); + onChanged(); + } else { + transformsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Transformation matrices that were applied to the original document image
+       * to produce
+       * [Page.image][google.cloud.documentai.v1beta2.Document.Page.image].
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Matrix transforms = 14; + * + */ + public Builder addTransforms( + com.google.cloud.documentai.v1beta2.Document.Page.Matrix.Builder builderForValue) { + if (transformsBuilder_ == null) { + ensureTransformsIsMutable(); + transforms_.add(builderForValue.build()); + onChanged(); + } else { + transformsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Transformation matrices that were applied to the original document image
+       * to produce
+       * [Page.image][google.cloud.documentai.v1beta2.Document.Page.image].
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Matrix transforms = 14; + * + */ + public Builder addTransforms( + int index, + com.google.cloud.documentai.v1beta2.Document.Page.Matrix.Builder builderForValue) { + if (transformsBuilder_ == null) { + ensureTransformsIsMutable(); + transforms_.add(index, builderForValue.build()); + onChanged(); + } else { + transformsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Transformation matrices that were applied to the original document image
+       * to produce
+       * [Page.image][google.cloud.documentai.v1beta2.Document.Page.image].
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Matrix transforms = 14; + * + */ + public Builder addAllTransforms( + java.lang.Iterable + values) { + if (transformsBuilder_ == null) { + ensureTransformsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, transforms_); + onChanged(); + } else { + transformsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Transformation matrices that were applied to the original document image
+       * to produce
+       * [Page.image][google.cloud.documentai.v1beta2.Document.Page.image].
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Matrix transforms = 14; + * + */ + public Builder clearTransforms() { + if (transformsBuilder_ == null) { + transforms_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + transformsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Transformation matrices that were applied to the original document image
+       * to produce
+       * [Page.image][google.cloud.documentai.v1beta2.Document.Page.image].
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Matrix transforms = 14; + * + */ + public Builder removeTransforms(int index) { + if (transformsBuilder_ == null) { + ensureTransformsIsMutable(); + transforms_.remove(index); + onChanged(); + } else { + transformsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Transformation matrices that were applied to the original document image
+       * to produce
+       * [Page.image][google.cloud.documentai.v1beta2.Document.Page.image].
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Matrix transforms = 14; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Matrix.Builder getTransformsBuilder( + int index) { + return getTransformsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Transformation matrices that were applied to the original document image
+       * to produce
+       * [Page.image][google.cloud.documentai.v1beta2.Document.Page.image].
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Matrix transforms = 14; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.MatrixOrBuilder + getTransformsOrBuilder(int index) { + if (transformsBuilder_ == null) { + return transforms_.get(index); + } else { + return transformsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Transformation matrices that were applied to the original document image
+       * to produce
+       * [Page.image][google.cloud.documentai.v1beta2.Document.Page.image].
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Matrix transforms = 14; + * + */ + public java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.MatrixOrBuilder> + getTransformsOrBuilderList() { + if (transformsBuilder_ != null) { + return transformsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(transforms_); + } + } + /** + * + * + *
+       * Transformation matrices that were applied to the original document image
+       * to produce
+       * [Page.image][google.cloud.documentai.v1beta2.Document.Page.image].
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Matrix transforms = 14; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Matrix.Builder + addTransformsBuilder() { + return getTransformsFieldBuilder() + .addBuilder( + com.google.cloud.documentai.v1beta2.Document.Page.Matrix.getDefaultInstance()); + } + /** + * + * + *
+       * Transformation matrices that were applied to the original document image
+       * to produce
+       * [Page.image][google.cloud.documentai.v1beta2.Document.Page.image].
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Matrix transforms = 14; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Matrix.Builder addTransformsBuilder( + int index) { + return getTransformsFieldBuilder() + .addBuilder( + index, + com.google.cloud.documentai.v1beta2.Document.Page.Matrix.getDefaultInstance()); + } + /** + * + * + *
+       * Transformation matrices that were applied to the original document image
+       * to produce
+       * [Page.image][google.cloud.documentai.v1beta2.Document.Page.image].
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Matrix transforms = 14; + * + */ + public java.util.List + getTransformsBuilderList() { + return getTransformsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Matrix, + com.google.cloud.documentai.v1beta2.Document.Page.Matrix.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.MatrixOrBuilder> + getTransformsFieldBuilder() { + if (transformsBuilder_ == null) { + transformsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Matrix, + com.google.cloud.documentai.v1beta2.Document.Page.Matrix.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.MatrixOrBuilder>( + transforms_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + transforms_ = null; + } + return transformsBuilder_; + } + + private com.google.cloud.documentai.v1beta2.Document.Page.Dimension dimension_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Dimension, + com.google.cloud.documentai.v1beta2.Document.Page.Dimension.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.DimensionOrBuilder> + dimensionBuilder_; + /** + * + * + *
+       * Physical dimension of the page.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Dimension dimension = 2; + * + * @return Whether the dimension field is set. + */ + public boolean hasDimension() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+       * Physical dimension of the page.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Dimension dimension = 2; + * + * @return The dimension. + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Dimension getDimension() { + if (dimensionBuilder_ == null) { + return dimension_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Dimension.getDefaultInstance() + : dimension_; + } else { + return dimensionBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Physical dimension of the page.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Dimension dimension = 2; + */ + public Builder setDimension( + com.google.cloud.documentai.v1beta2.Document.Page.Dimension value) { + if (dimensionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dimension_ = value; + } else { + dimensionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Physical dimension of the page.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Dimension dimension = 2; + */ + public Builder setDimension( + com.google.cloud.documentai.v1beta2.Document.Page.Dimension.Builder builderForValue) { + if (dimensionBuilder_ == null) { + dimension_ = builderForValue.build(); + } else { + dimensionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Physical dimension of the page.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Dimension dimension = 2; + */ + public Builder mergeDimension( + com.google.cloud.documentai.v1beta2.Document.Page.Dimension value) { + if (dimensionBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && dimension_ != null + && dimension_ + != com.google.cloud.documentai.v1beta2.Document.Page.Dimension + .getDefaultInstance()) { + getDimensionBuilder().mergeFrom(value); + } else { + dimension_ = value; + } + } else { + dimensionBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Physical dimension of the page.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Dimension dimension = 2; + */ + public Builder clearDimension() { + bitField0_ = (bitField0_ & ~0x00000008); + dimension_ = null; + if (dimensionBuilder_ != null) { + dimensionBuilder_.dispose(); + dimensionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Physical dimension of the page.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Dimension dimension = 2; + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Dimension.Builder + getDimensionBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getDimensionFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Physical dimension of the page.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Dimension dimension = 2; + */ + public com.google.cloud.documentai.v1beta2.Document.Page.DimensionOrBuilder + getDimensionOrBuilder() { + if (dimensionBuilder_ != null) { + return dimensionBuilder_.getMessageOrBuilder(); + } else { + return dimension_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Dimension.getDefaultInstance() + : dimension_; + } + } + /** + * + * + *
+       * Physical dimension of the page.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Dimension dimension = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Dimension, + com.google.cloud.documentai.v1beta2.Document.Page.Dimension.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.DimensionOrBuilder> + getDimensionFieldBuilder() { + if (dimensionBuilder_ == null) { + dimensionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Dimension, + com.google.cloud.documentai.v1beta2.Document.Page.Dimension.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.DimensionOrBuilder>( + getDimension(), getParentForChildren(), isClean()); + dimension_ = null; + } + return dimensionBuilder_; + } + + private com.google.cloud.documentai.v1beta2.Document.Page.Layout layout_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Layout, + com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder> + layoutBuilder_; + /** + * + * + *
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the
+       * page.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 3; + * + * @return Whether the layout field is set. + */ + public boolean hasLayout() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the
+       * page.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 3; + * + * @return The layout. + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Layout getLayout() { + if (layoutBuilder_ == null) { + return layout_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() + : layout_; + } else { + return layoutBuilder_.getMessage(); + } + } + /** + * + * + *
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the
+       * page.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 3; + */ + public Builder setLayout(com.google.cloud.documentai.v1beta2.Document.Page.Layout value) { + if (layoutBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + layout_ = value; + } else { + layoutBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the
+       * page.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 3; + */ + public Builder setLayout( + com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder builderForValue) { + if (layoutBuilder_ == null) { + layout_ = builderForValue.build(); + } else { + layoutBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the
+       * page.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 3; + */ + public Builder mergeLayout(com.google.cloud.documentai.v1beta2.Document.Page.Layout value) { + if (layoutBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && layout_ != null + && layout_ + != com.google.cloud.documentai.v1beta2.Document.Page.Layout + .getDefaultInstance()) { + getLayoutBuilder().mergeFrom(value); + } else { + layout_ = value; + } + } else { + layoutBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the
+       * page.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 3; + */ + public Builder clearLayout() { + bitField0_ = (bitField0_ & ~0x00000010); + layout_ = null; + if (layoutBuilder_ != null) { + layoutBuilder_.dispose(); + layoutBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the
+       * page.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 3; + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder getLayoutBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getLayoutFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the
+       * page.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 3; + */ + public com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder + getLayoutOrBuilder() { + if (layoutBuilder_ != null) { + return layoutBuilder_.getMessageOrBuilder(); + } else { + return layout_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() + : layout_; + } + } + /** + * + * + *
+       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the
+       * page.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Layout, + com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder> + getLayoutFieldBuilder() { + if (layoutBuilder_ == null) { + layoutBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Layout, + com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder>( + getLayout(), getParentForChildren(), isClean()); + layout_ = null; + } + return layoutBuilder_; + } + + private java.util.List + detectedLanguages_ = java.util.Collections.emptyList(); + + private void ensureDetectedLanguagesIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + detectedLanguages_ = + new java.util.ArrayList< + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage>( + detectedLanguages_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> + detectedLanguagesBuilder_; + + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public java.util.List + getDetectedLanguagesList() { + if (detectedLanguagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(detectedLanguages_); + } else { + return detectedLanguagesBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public int getDetectedLanguagesCount() { + if (detectedLanguagesBuilder_ == null) { + return detectedLanguages_.size(); + } else { + return detectedLanguagesBuilder_.getCount(); + } + } + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage + getDetectedLanguages(int index) { + if (detectedLanguagesBuilder_ == null) { + return detectedLanguages_.get(index); + } else { + return detectedLanguagesBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public Builder setDetectedLanguages( + int index, com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { + if (detectedLanguagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.set(index, value); + onChanged(); + } else { + detectedLanguagesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public Builder setDetectedLanguages( + int index, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + builderForValue) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.set(index, builderForValue.build()); + onChanged(); + } else { + detectedLanguagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public Builder addDetectedLanguages( + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { + if (detectedLanguagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(value); + onChanged(); + } else { + detectedLanguagesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public Builder addDetectedLanguages( + int index, com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { + if (detectedLanguagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(index, value); + onChanged(); + } else { + detectedLanguagesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public Builder addDetectedLanguages( + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + builderForValue) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(builderForValue.build()); + onChanged(); + } else { + detectedLanguagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public Builder addDetectedLanguages( + int index, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + builderForValue) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(index, builderForValue.build()); + onChanged(); + } else { + detectedLanguagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public Builder addAllDetectedLanguages( + java.lang.Iterable< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage> + values) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, detectedLanguages_); + onChanged(); + } else { + detectedLanguagesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public Builder clearDetectedLanguages() { + if (detectedLanguagesBuilder_ == null) { + detectedLanguages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + detectedLanguagesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public Builder removeDetectedLanguages(int index) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.remove(index); + onChanged(); + } else { + detectedLanguagesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + getDetectedLanguagesBuilder(int index) { + return getDetectedLanguagesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder + getDetectedLanguagesOrBuilder(int index) { + if (detectedLanguagesBuilder_ == null) { + return detectedLanguages_.get(index); + } else { + return detectedLanguagesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> + getDetectedLanguagesOrBuilderList() { + if (detectedLanguagesBuilder_ != null) { + return detectedLanguagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(detectedLanguages_); + } + } + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + addDetectedLanguagesBuilder() { + return getDetectedLanguagesFieldBuilder() + .addBuilder( + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage + .getDefaultInstance()); + } + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder + addDetectedLanguagesBuilder(int index) { + return getDetectedLanguagesFieldBuilder() + .addBuilder( + index, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage + .getDefaultInstance()); + } + /** + * + * + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; + * + */ + public java.util.List< + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder> + getDetectedLanguagesBuilderList() { + return getDetectedLanguagesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> + getDetectedLanguagesFieldBuilder() { + if (detectedLanguagesBuilder_ == null) { + detectedLanguagesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder>( + detectedLanguages_, + ((bitField0_ & 0x00000020) != 0), + getParentForChildren(), + isClean()); + detectedLanguages_ = null; + } + return detectedLanguagesBuilder_; + } + + private java.util.List blocks_ = + java.util.Collections.emptyList(); + + private void ensureBlocksIsMutable() { + if (!((bitField0_ & 0x00000040) != 0)) { + blocks_ = + new java.util.ArrayList( + blocks_); + bitField0_ |= 0x00000040; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Block, + com.google.cloud.documentai.v1beta2.Document.Page.Block.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.BlockOrBuilder> + blocksBuilder_; + + /** + * + * + *
+       * A list of visually detected text blocks on the page.
+       * A block has a set of lines (collected into paragraphs) that have a common
+       * line-spacing and orientation.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Block blocks = 5; + */ + public java.util.List + getBlocksList() { + if (blocksBuilder_ == null) { + return java.util.Collections.unmodifiableList(blocks_); + } else { + return blocksBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * A list of visually detected text blocks on the page.
+       * A block has a set of lines (collected into paragraphs) that have a common
+       * line-spacing and orientation.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Block blocks = 5; + */ + public int getBlocksCount() { + if (blocksBuilder_ == null) { + return blocks_.size(); + } else { + return blocksBuilder_.getCount(); + } + } + /** + * + * + *
+       * A list of visually detected text blocks on the page.
+       * A block has a set of lines (collected into paragraphs) that have a common
+       * line-spacing and orientation.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Block blocks = 5; + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Block getBlocks(int index) { + if (blocksBuilder_ == null) { + return blocks_.get(index); + } else { + return blocksBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * A list of visually detected text blocks on the page.
+       * A block has a set of lines (collected into paragraphs) that have a common
+       * line-spacing and orientation.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Block blocks = 5; + */ + public Builder setBlocks( + int index, com.google.cloud.documentai.v1beta2.Document.Page.Block value) { + if (blocksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlocksIsMutable(); + blocks_.set(index, value); + onChanged(); + } else { + blocksBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * A list of visually detected text blocks on the page.
+       * A block has a set of lines (collected into paragraphs) that have a common
+       * line-spacing and orientation.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Block blocks = 5; + */ + public Builder setBlocks( + int index, + com.google.cloud.documentai.v1beta2.Document.Page.Block.Builder builderForValue) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.set(index, builderForValue.build()); + onChanged(); + } else { + blocksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of visually detected text blocks on the page.
+       * A block has a set of lines (collected into paragraphs) that have a common
+       * line-spacing and orientation.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Block blocks = 5; + */ + public Builder addBlocks(com.google.cloud.documentai.v1beta2.Document.Page.Block value) { + if (blocksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlocksIsMutable(); + blocks_.add(value); + onChanged(); + } else { + blocksBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * A list of visually detected text blocks on the page.
+       * A block has a set of lines (collected into paragraphs) that have a common
+       * line-spacing and orientation.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Block blocks = 5; + */ + public Builder addBlocks( + int index, com.google.cloud.documentai.v1beta2.Document.Page.Block value) { + if (blocksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlocksIsMutable(); + blocks_.add(index, value); + onChanged(); + } else { + blocksBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * A list of visually detected text blocks on the page.
+       * A block has a set of lines (collected into paragraphs) that have a common
+       * line-spacing and orientation.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Block blocks = 5; + */ + public Builder addBlocks( + com.google.cloud.documentai.v1beta2.Document.Page.Block.Builder builderForValue) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.add(builderForValue.build()); + onChanged(); + } else { + blocksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of visually detected text blocks on the page.
+       * A block has a set of lines (collected into paragraphs) that have a common
+       * line-spacing and orientation.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Block blocks = 5; + */ + public Builder addBlocks( + int index, + com.google.cloud.documentai.v1beta2.Document.Page.Block.Builder builderForValue) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.add(index, builderForValue.build()); + onChanged(); + } else { + blocksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of visually detected text blocks on the page.
+       * A block has a set of lines (collected into paragraphs) that have a common
+       * line-spacing and orientation.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Block blocks = 5; + */ + public Builder addAllBlocks( + java.lang.Iterable + values) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, blocks_); + onChanged(); + } else { + blocksBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * A list of visually detected text blocks on the page.
+       * A block has a set of lines (collected into paragraphs) that have a common
+       * line-spacing and orientation.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Block blocks = 5; + */ + public Builder clearBlocks() { + if (blocksBuilder_ == null) { + blocks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + } else { + blocksBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * A list of visually detected text blocks on the page.
+       * A block has a set of lines (collected into paragraphs) that have a common
+       * line-spacing and orientation.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Block blocks = 5; + */ + public Builder removeBlocks(int index) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.remove(index); + onChanged(); + } else { + blocksBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * A list of visually detected text blocks on the page.
+       * A block has a set of lines (collected into paragraphs) that have a common
+       * line-spacing and orientation.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Block blocks = 5; + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Block.Builder getBlocksBuilder( + int index) { + return getBlocksFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * A list of visually detected text blocks on the page.
+       * A block has a set of lines (collected into paragraphs) that have a common
+       * line-spacing and orientation.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Block blocks = 5; + */ + public com.google.cloud.documentai.v1beta2.Document.Page.BlockOrBuilder getBlocksOrBuilder( + int index) { + if (blocksBuilder_ == null) { + return blocks_.get(index); + } else { + return blocksBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * A list of visually detected text blocks on the page.
+       * A block has a set of lines (collected into paragraphs) that have a common
+       * line-spacing and orientation.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Block blocks = 5; + */ + public java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.BlockOrBuilder> + getBlocksOrBuilderList() { + if (blocksBuilder_ != null) { + return blocksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(blocks_); + } + } + /** + * + * + *
+       * A list of visually detected text blocks on the page.
+       * A block has a set of lines (collected into paragraphs) that have a common
+       * line-spacing and orientation.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Block blocks = 5; + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Block.Builder addBlocksBuilder() { + return getBlocksFieldBuilder() + .addBuilder( + com.google.cloud.documentai.v1beta2.Document.Page.Block.getDefaultInstance()); + } + /** + * + * + *
+       * A list of visually detected text blocks on the page.
+       * A block has a set of lines (collected into paragraphs) that have a common
+       * line-spacing and orientation.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Block blocks = 5; + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Block.Builder addBlocksBuilder( + int index) { + return getBlocksFieldBuilder() + .addBuilder( + index, + com.google.cloud.documentai.v1beta2.Document.Page.Block.getDefaultInstance()); + } + /** + * + * + *
+       * A list of visually detected text blocks on the page.
+       * A block has a set of lines (collected into paragraphs) that have a common
+       * line-spacing and orientation.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Block blocks = 5; + */ + public java.util.List + getBlocksBuilderList() { + return getBlocksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Block, + com.google.cloud.documentai.v1beta2.Document.Page.Block.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.BlockOrBuilder> + getBlocksFieldBuilder() { + if (blocksBuilder_ == null) { + blocksBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Block, + com.google.cloud.documentai.v1beta2.Document.Page.Block.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.BlockOrBuilder>( + blocks_, ((bitField0_ & 0x00000040) != 0), getParentForChildren(), isClean()); + blocks_ = null; + } + return blocksBuilder_; + } + + private java.util.List + paragraphs_ = java.util.Collections.emptyList(); + + private void ensureParagraphsIsMutable() { + if (!((bitField0_ & 0x00000080) != 0)) { + paragraphs_ = + new java.util.ArrayList( + paragraphs_); + bitField0_ |= 0x00000080; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Paragraph, + com.google.cloud.documentai.v1beta2.Document.Page.Paragraph.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.ParagraphOrBuilder> + paragraphsBuilder_; + + /** + * + * + *
+       * A list of visually detected text paragraphs on the page.
+       * A collection of lines that a human would perceive as a paragraph.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Paragraph paragraphs = 6; + * + */ + public java.util.List + getParagraphsList() { + if (paragraphsBuilder_ == null) { + return java.util.Collections.unmodifiableList(paragraphs_); + } else { + return paragraphsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * A list of visually detected text paragraphs on the page.
+       * A collection of lines that a human would perceive as a paragraph.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Paragraph paragraphs = 6; + * + */ + public int getParagraphsCount() { + if (paragraphsBuilder_ == null) { + return paragraphs_.size(); + } else { + return paragraphsBuilder_.getCount(); + } + } + /** + * + * + *
+       * A list of visually detected text paragraphs on the page.
+       * A collection of lines that a human would perceive as a paragraph.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Paragraph paragraphs = 6; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Paragraph getParagraphs(int index) { + if (paragraphsBuilder_ == null) { + return paragraphs_.get(index); + } else { + return paragraphsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * A list of visually detected text paragraphs on the page.
+       * A collection of lines that a human would perceive as a paragraph.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Paragraph paragraphs = 6; + * + */ + public Builder setParagraphs( + int index, com.google.cloud.documentai.v1beta2.Document.Page.Paragraph value) { + if (paragraphsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParagraphsIsMutable(); + paragraphs_.set(index, value); + onChanged(); + } else { + paragraphsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * A list of visually detected text paragraphs on the page.
+       * A collection of lines that a human would perceive as a paragraph.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Paragraph paragraphs = 6; + * + */ + public Builder setParagraphs( + int index, + com.google.cloud.documentai.v1beta2.Document.Page.Paragraph.Builder builderForValue) { + if (paragraphsBuilder_ == null) { + ensureParagraphsIsMutable(); + paragraphs_.set(index, builderForValue.build()); + onChanged(); + } else { + paragraphsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of visually detected text paragraphs on the page.
+       * A collection of lines that a human would perceive as a paragraph.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Paragraph paragraphs = 6; + * + */ + public Builder addParagraphs( + com.google.cloud.documentai.v1beta2.Document.Page.Paragraph value) { + if (paragraphsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParagraphsIsMutable(); + paragraphs_.add(value); + onChanged(); + } else { + paragraphsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * A list of visually detected text paragraphs on the page.
+       * A collection of lines that a human would perceive as a paragraph.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Paragraph paragraphs = 6; + * + */ + public Builder addParagraphs( + int index, com.google.cloud.documentai.v1beta2.Document.Page.Paragraph value) { + if (paragraphsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParagraphsIsMutable(); + paragraphs_.add(index, value); + onChanged(); + } else { + paragraphsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * A list of visually detected text paragraphs on the page.
+       * A collection of lines that a human would perceive as a paragraph.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Paragraph paragraphs = 6; + * + */ + public Builder addParagraphs( + com.google.cloud.documentai.v1beta2.Document.Page.Paragraph.Builder builderForValue) { + if (paragraphsBuilder_ == null) { + ensureParagraphsIsMutable(); + paragraphs_.add(builderForValue.build()); + onChanged(); + } else { + paragraphsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of visually detected text paragraphs on the page.
+       * A collection of lines that a human would perceive as a paragraph.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Paragraph paragraphs = 6; + * + */ + public Builder addParagraphs( + int index, + com.google.cloud.documentai.v1beta2.Document.Page.Paragraph.Builder builderForValue) { + if (paragraphsBuilder_ == null) { + ensureParagraphsIsMutable(); + paragraphs_.add(index, builderForValue.build()); + onChanged(); + } else { + paragraphsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of visually detected text paragraphs on the page.
+       * A collection of lines that a human would perceive as a paragraph.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Paragraph paragraphs = 6; + * + */ + public Builder addAllParagraphs( + java.lang.Iterable + values) { + if (paragraphsBuilder_ == null) { + ensureParagraphsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, paragraphs_); + onChanged(); + } else { + paragraphsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * A list of visually detected text paragraphs on the page.
+       * A collection of lines that a human would perceive as a paragraph.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Paragraph paragraphs = 6; + * + */ + public Builder clearParagraphs() { + if (paragraphsBuilder_ == null) { + paragraphs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + } else { + paragraphsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * A list of visually detected text paragraphs on the page.
+       * A collection of lines that a human would perceive as a paragraph.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Paragraph paragraphs = 6; + * + */ + public Builder removeParagraphs(int index) { + if (paragraphsBuilder_ == null) { + ensureParagraphsIsMutable(); + paragraphs_.remove(index); + onChanged(); + } else { + paragraphsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * A list of visually detected text paragraphs on the page.
+       * A collection of lines that a human would perceive as a paragraph.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Paragraph paragraphs = 6; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Paragraph.Builder + getParagraphsBuilder(int index) { + return getParagraphsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * A list of visually detected text paragraphs on the page.
+       * A collection of lines that a human would perceive as a paragraph.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Paragraph paragraphs = 6; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.ParagraphOrBuilder + getParagraphsOrBuilder(int index) { + if (paragraphsBuilder_ == null) { + return paragraphs_.get(index); + } else { + return paragraphsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * A list of visually detected text paragraphs on the page.
+       * A collection of lines that a human would perceive as a paragraph.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Paragraph paragraphs = 6; + * + */ + public java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.ParagraphOrBuilder> + getParagraphsOrBuilderList() { + if (paragraphsBuilder_ != null) { + return paragraphsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(paragraphs_); + } + } + /** + * + * + *
+       * A list of visually detected text paragraphs on the page.
+       * A collection of lines that a human would perceive as a paragraph.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Paragraph paragraphs = 6; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Paragraph.Builder + addParagraphsBuilder() { + return getParagraphsFieldBuilder() + .addBuilder( + com.google.cloud.documentai.v1beta2.Document.Page.Paragraph.getDefaultInstance()); + } + /** + * + * + *
+       * A list of visually detected text paragraphs on the page.
+       * A collection of lines that a human would perceive as a paragraph.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Paragraph paragraphs = 6; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Paragraph.Builder + addParagraphsBuilder(int index) { + return getParagraphsFieldBuilder() + .addBuilder( + index, + com.google.cloud.documentai.v1beta2.Document.Page.Paragraph.getDefaultInstance()); + } + /** + * + * + *
+       * A list of visually detected text paragraphs on the page.
+       * A collection of lines that a human would perceive as a paragraph.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Paragraph paragraphs = 6; + * + */ + public java.util.List + getParagraphsBuilderList() { + return getParagraphsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Paragraph, + com.google.cloud.documentai.v1beta2.Document.Page.Paragraph.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.ParagraphOrBuilder> + getParagraphsFieldBuilder() { + if (paragraphsBuilder_ == null) { + paragraphsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Paragraph, + com.google.cloud.documentai.v1beta2.Document.Page.Paragraph.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.ParagraphOrBuilder>( + paragraphs_, ((bitField0_ & 0x00000080) != 0), getParentForChildren(), isClean()); + paragraphs_ = null; + } + return paragraphsBuilder_; + } + + private java.util.List lines_ = + java.util.Collections.emptyList(); + + private void ensureLinesIsMutable() { + if (!((bitField0_ & 0x00000100) != 0)) { + lines_ = + new java.util.ArrayList( + lines_); + bitField0_ |= 0x00000100; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Line, + com.google.cloud.documentai.v1beta2.Document.Page.Line.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.LineOrBuilder> + linesBuilder_; + + /** + * + * + *
+       * A list of visually detected text lines on the page.
+       * A collection of tokens that a human would perceive as a line.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Line lines = 7; + */ + public java.util.List getLinesList() { + if (linesBuilder_ == null) { + return java.util.Collections.unmodifiableList(lines_); + } else { + return linesBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * A list of visually detected text lines on the page.
+       * A collection of tokens that a human would perceive as a line.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Line lines = 7; + */ + public int getLinesCount() { + if (linesBuilder_ == null) { + return lines_.size(); + } else { + return linesBuilder_.getCount(); + } + } + /** + * + * + *
+       * A list of visually detected text lines on the page.
+       * A collection of tokens that a human would perceive as a line.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Line lines = 7; + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Line getLines(int index) { + if (linesBuilder_ == null) { + return lines_.get(index); + } else { + return linesBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * A list of visually detected text lines on the page.
+       * A collection of tokens that a human would perceive as a line.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Line lines = 7; + */ + public Builder setLines( + int index, com.google.cloud.documentai.v1beta2.Document.Page.Line value) { + if (linesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinesIsMutable(); + lines_.set(index, value); + onChanged(); + } else { + linesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * A list of visually detected text lines on the page.
+       * A collection of tokens that a human would perceive as a line.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Line lines = 7; + */ + public Builder setLines( + int index, + com.google.cloud.documentai.v1beta2.Document.Page.Line.Builder builderForValue) { + if (linesBuilder_ == null) { + ensureLinesIsMutable(); + lines_.set(index, builderForValue.build()); + onChanged(); + } else { + linesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of visually detected text lines on the page.
+       * A collection of tokens that a human would perceive as a line.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Line lines = 7; + */ + public Builder addLines(com.google.cloud.documentai.v1beta2.Document.Page.Line value) { + if (linesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinesIsMutable(); + lines_.add(value); + onChanged(); + } else { + linesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * A list of visually detected text lines on the page.
+       * A collection of tokens that a human would perceive as a line.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Line lines = 7; + */ + public Builder addLines( + int index, com.google.cloud.documentai.v1beta2.Document.Page.Line value) { + if (linesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinesIsMutable(); + lines_.add(index, value); + onChanged(); + } else { + linesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * A list of visually detected text lines on the page.
+       * A collection of tokens that a human would perceive as a line.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Line lines = 7; + */ + public Builder addLines( + com.google.cloud.documentai.v1beta2.Document.Page.Line.Builder builderForValue) { + if (linesBuilder_ == null) { + ensureLinesIsMutable(); + lines_.add(builderForValue.build()); + onChanged(); + } else { + linesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of visually detected text lines on the page.
+       * A collection of tokens that a human would perceive as a line.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Line lines = 7; + */ + public Builder addLines( + int index, + com.google.cloud.documentai.v1beta2.Document.Page.Line.Builder builderForValue) { + if (linesBuilder_ == null) { + ensureLinesIsMutable(); + lines_.add(index, builderForValue.build()); + onChanged(); + } else { + linesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of visually detected text lines on the page.
+       * A collection of tokens that a human would perceive as a line.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Line lines = 7; + */ + public Builder addAllLines( + java.lang.Iterable + values) { + if (linesBuilder_ == null) { + ensureLinesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, lines_); + onChanged(); + } else { + linesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * A list of visually detected text lines on the page.
+       * A collection of tokens that a human would perceive as a line.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Line lines = 7; + */ + public Builder clearLines() { + if (linesBuilder_ == null) { + lines_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + } else { + linesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * A list of visually detected text lines on the page.
+       * A collection of tokens that a human would perceive as a line.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Line lines = 7; + */ + public Builder removeLines(int index) { + if (linesBuilder_ == null) { + ensureLinesIsMutable(); + lines_.remove(index); + onChanged(); + } else { + linesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * A list of visually detected text lines on the page.
+       * A collection of tokens that a human would perceive as a line.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Line lines = 7; + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Line.Builder getLinesBuilder( + int index) { + return getLinesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * A list of visually detected text lines on the page.
+       * A collection of tokens that a human would perceive as a line.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Line lines = 7; + */ + public com.google.cloud.documentai.v1beta2.Document.Page.LineOrBuilder getLinesOrBuilder( + int index) { + if (linesBuilder_ == null) { + return lines_.get(index); + } else { + return linesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * A list of visually detected text lines on the page.
+       * A collection of tokens that a human would perceive as a line.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Line lines = 7; + */ + public java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.LineOrBuilder> + getLinesOrBuilderList() { + if (linesBuilder_ != null) { + return linesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(lines_); + } + } + /** + * + * + *
+       * A list of visually detected text lines on the page.
+       * A collection of tokens that a human would perceive as a line.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Line lines = 7; + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Line.Builder addLinesBuilder() { + return getLinesFieldBuilder() + .addBuilder( + com.google.cloud.documentai.v1beta2.Document.Page.Line.getDefaultInstance()); + } + /** + * + * + *
+       * A list of visually detected text lines on the page.
+       * A collection of tokens that a human would perceive as a line.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Line lines = 7; + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Line.Builder addLinesBuilder( + int index) { + return getLinesFieldBuilder() + .addBuilder( + index, com.google.cloud.documentai.v1beta2.Document.Page.Line.getDefaultInstance()); + } + /** + * + * + *
+       * A list of visually detected text lines on the page.
+       * A collection of tokens that a human would perceive as a line.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Line lines = 7; + */ + public java.util.List + getLinesBuilderList() { + return getLinesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Line, + com.google.cloud.documentai.v1beta2.Document.Page.Line.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.LineOrBuilder> + getLinesFieldBuilder() { + if (linesBuilder_ == null) { + linesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Line, + com.google.cloud.documentai.v1beta2.Document.Page.Line.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.LineOrBuilder>( + lines_, ((bitField0_ & 0x00000100) != 0), getParentForChildren(), isClean()); + lines_ = null; + } + return linesBuilder_; + } + + private java.util.List tokens_ = + java.util.Collections.emptyList(); + + private void ensureTokensIsMutable() { + if (!((bitField0_ & 0x00000200) != 0)) { + tokens_ = + new java.util.ArrayList( + tokens_); + bitField0_ |= 0x00000200; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Token, + com.google.cloud.documentai.v1beta2.Document.Page.Token.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.TokenOrBuilder> + tokensBuilder_; + + /** + * + * + *
+       * A list of visually detected tokens on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Token tokens = 8; + */ + public java.util.List + getTokensList() { + if (tokensBuilder_ == null) { + return java.util.Collections.unmodifiableList(tokens_); + } else { + return tokensBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * A list of visually detected tokens on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Token tokens = 8; + */ + public int getTokensCount() { + if (tokensBuilder_ == null) { + return tokens_.size(); + } else { + return tokensBuilder_.getCount(); + } + } + /** + * + * + *
+       * A list of visually detected tokens on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Token tokens = 8; + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Token getTokens(int index) { + if (tokensBuilder_ == null) { + return tokens_.get(index); + } else { + return tokensBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * A list of visually detected tokens on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Token tokens = 8; + */ + public Builder setTokens( + int index, com.google.cloud.documentai.v1beta2.Document.Page.Token value) { + if (tokensBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTokensIsMutable(); + tokens_.set(index, value); + onChanged(); + } else { + tokensBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * A list of visually detected tokens on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Token tokens = 8; + */ + public Builder setTokens( + int index, + com.google.cloud.documentai.v1beta2.Document.Page.Token.Builder builderForValue) { + if (tokensBuilder_ == null) { + ensureTokensIsMutable(); + tokens_.set(index, builderForValue.build()); + onChanged(); + } else { + tokensBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of visually detected tokens on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Token tokens = 8; + */ + public Builder addTokens(com.google.cloud.documentai.v1beta2.Document.Page.Token value) { + if (tokensBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTokensIsMutable(); + tokens_.add(value); + onChanged(); + } else { + tokensBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * A list of visually detected tokens on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Token tokens = 8; + */ + public Builder addTokens( + int index, com.google.cloud.documentai.v1beta2.Document.Page.Token value) { + if (tokensBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTokensIsMutable(); + tokens_.add(index, value); + onChanged(); + } else { + tokensBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * A list of visually detected tokens on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Token tokens = 8; + */ + public Builder addTokens( + com.google.cloud.documentai.v1beta2.Document.Page.Token.Builder builderForValue) { + if (tokensBuilder_ == null) { + ensureTokensIsMutable(); + tokens_.add(builderForValue.build()); + onChanged(); + } else { + tokensBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of visually detected tokens on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Token tokens = 8; + */ + public Builder addTokens( + int index, + com.google.cloud.documentai.v1beta2.Document.Page.Token.Builder builderForValue) { + if (tokensBuilder_ == null) { + ensureTokensIsMutable(); + tokens_.add(index, builderForValue.build()); + onChanged(); + } else { + tokensBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of visually detected tokens on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Token tokens = 8; + */ + public Builder addAllTokens( + java.lang.Iterable + values) { + if (tokensBuilder_ == null) { + ensureTokensIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tokens_); + onChanged(); + } else { + tokensBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * A list of visually detected tokens on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Token tokens = 8; + */ + public Builder clearTokens() { + if (tokensBuilder_ == null) { + tokens_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + } else { + tokensBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * A list of visually detected tokens on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Token tokens = 8; + */ + public Builder removeTokens(int index) { + if (tokensBuilder_ == null) { + ensureTokensIsMutable(); + tokens_.remove(index); + onChanged(); + } else { + tokensBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * A list of visually detected tokens on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Token tokens = 8; + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Token.Builder getTokensBuilder( + int index) { + return getTokensFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * A list of visually detected tokens on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Token tokens = 8; + */ + public com.google.cloud.documentai.v1beta2.Document.Page.TokenOrBuilder getTokensOrBuilder( + int index) { + if (tokensBuilder_ == null) { + return tokens_.get(index); + } else { + return tokensBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * A list of visually detected tokens on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Token tokens = 8; + */ + public java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.TokenOrBuilder> + getTokensOrBuilderList() { + if (tokensBuilder_ != null) { + return tokensBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(tokens_); + } + } + /** + * + * + *
+       * A list of visually detected tokens on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Token tokens = 8; + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Token.Builder addTokensBuilder() { + return getTokensFieldBuilder() + .addBuilder( + com.google.cloud.documentai.v1beta2.Document.Page.Token.getDefaultInstance()); + } + /** + * + * + *
+       * A list of visually detected tokens on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Token tokens = 8; + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Token.Builder addTokensBuilder( + int index) { + return getTokensFieldBuilder() + .addBuilder( + index, + com.google.cloud.documentai.v1beta2.Document.Page.Token.getDefaultInstance()); + } + /** + * + * + *
+       * A list of visually detected tokens on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Token tokens = 8; + */ + public java.util.List + getTokensBuilderList() { + return getTokensFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Token, + com.google.cloud.documentai.v1beta2.Document.Page.Token.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.TokenOrBuilder> + getTokensFieldBuilder() { + if (tokensBuilder_ == null) { + tokensBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Token, + com.google.cloud.documentai.v1beta2.Document.Page.Token.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.TokenOrBuilder>( + tokens_, ((bitField0_ & 0x00000200) != 0), getParentForChildren(), isClean()); + tokens_ = null; + } + return tokensBuilder_; + } + + private java.util.List + visualElements_ = java.util.Collections.emptyList(); + + private void ensureVisualElementsIsMutable() { + if (!((bitField0_ & 0x00000400) != 0)) { + visualElements_ = + new java.util.ArrayList< + com.google.cloud.documentai.v1beta2.Document.Page.VisualElement>(visualElements_); + bitField0_ |= 0x00000400; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.VisualElement, + com.google.cloud.documentai.v1beta2.Document.Page.VisualElement.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.VisualElementOrBuilder> + visualElementsBuilder_; + + /** + * + * + *
+       * A list of detected non-text visual elements e.g. checkbox,
+       * signature etc. on the page.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.VisualElement visual_elements = 9; + * + */ + public java.util.List + getVisualElementsList() { + if (visualElementsBuilder_ == null) { + return java.util.Collections.unmodifiableList(visualElements_); + } else { + return visualElementsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * A list of detected non-text visual elements e.g. checkbox,
+       * signature etc. on the page.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.VisualElement visual_elements = 9; + * + */ + public int getVisualElementsCount() { + if (visualElementsBuilder_ == null) { + return visualElements_.size(); + } else { + return visualElementsBuilder_.getCount(); + } + } + /** + * + * + *
+       * A list of detected non-text visual elements e.g. checkbox,
+       * signature etc. on the page.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.VisualElement visual_elements = 9; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.VisualElement getVisualElements( + int index) { + if (visualElementsBuilder_ == null) { + return visualElements_.get(index); + } else { + return visualElementsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * A list of detected non-text visual elements e.g. checkbox,
+       * signature etc. on the page.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.VisualElement visual_elements = 9; + * + */ + public Builder setVisualElements( + int index, com.google.cloud.documentai.v1beta2.Document.Page.VisualElement value) { + if (visualElementsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVisualElementsIsMutable(); + visualElements_.set(index, value); + onChanged(); + } else { + visualElementsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * A list of detected non-text visual elements e.g. checkbox,
+       * signature etc. on the page.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.VisualElement visual_elements = 9; + * + */ + public Builder setVisualElements( + int index, + com.google.cloud.documentai.v1beta2.Document.Page.VisualElement.Builder builderForValue) { + if (visualElementsBuilder_ == null) { + ensureVisualElementsIsMutable(); + visualElements_.set(index, builderForValue.build()); + onChanged(); + } else { + visualElementsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of detected non-text visual elements e.g. checkbox,
+       * signature etc. on the page.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.VisualElement visual_elements = 9; + * + */ + public Builder addVisualElements( + com.google.cloud.documentai.v1beta2.Document.Page.VisualElement value) { + if (visualElementsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVisualElementsIsMutable(); + visualElements_.add(value); + onChanged(); + } else { + visualElementsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * A list of detected non-text visual elements e.g. checkbox,
+       * signature etc. on the page.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.VisualElement visual_elements = 9; + * + */ + public Builder addVisualElements( + int index, com.google.cloud.documentai.v1beta2.Document.Page.VisualElement value) { + if (visualElementsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVisualElementsIsMutable(); + visualElements_.add(index, value); + onChanged(); + } else { + visualElementsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * A list of detected non-text visual elements e.g. checkbox,
+       * signature etc. on the page.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.VisualElement visual_elements = 9; + * + */ + public Builder addVisualElements( + com.google.cloud.documentai.v1beta2.Document.Page.VisualElement.Builder builderForValue) { + if (visualElementsBuilder_ == null) { + ensureVisualElementsIsMutable(); + visualElements_.add(builderForValue.build()); + onChanged(); + } else { + visualElementsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of detected non-text visual elements e.g. checkbox,
+       * signature etc. on the page.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.VisualElement visual_elements = 9; + * + */ + public Builder addVisualElements( + int index, + com.google.cloud.documentai.v1beta2.Document.Page.VisualElement.Builder builderForValue) { + if (visualElementsBuilder_ == null) { + ensureVisualElementsIsMutable(); + visualElements_.add(index, builderForValue.build()); + onChanged(); + } else { + visualElementsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of detected non-text visual elements e.g. checkbox,
+       * signature etc. on the page.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.VisualElement visual_elements = 9; + * + */ + public Builder addAllVisualElements( + java.lang.Iterable< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.VisualElement> + values) { + if (visualElementsBuilder_ == null) { + ensureVisualElementsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, visualElements_); + onChanged(); + } else { + visualElementsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * A list of detected non-text visual elements e.g. checkbox,
+       * signature etc. on the page.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.VisualElement visual_elements = 9; + * + */ + public Builder clearVisualElements() { + if (visualElementsBuilder_ == null) { + visualElements_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + } else { + visualElementsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * A list of detected non-text visual elements e.g. checkbox,
+       * signature etc. on the page.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.VisualElement visual_elements = 9; + * + */ + public Builder removeVisualElements(int index) { + if (visualElementsBuilder_ == null) { + ensureVisualElementsIsMutable(); + visualElements_.remove(index); + onChanged(); + } else { + visualElementsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * A list of detected non-text visual elements e.g. checkbox,
+       * signature etc. on the page.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.VisualElement visual_elements = 9; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.VisualElement.Builder + getVisualElementsBuilder(int index) { + return getVisualElementsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * A list of detected non-text visual elements e.g. checkbox,
+       * signature etc. on the page.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.VisualElement visual_elements = 9; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.VisualElementOrBuilder + getVisualElementsOrBuilder(int index) { + if (visualElementsBuilder_ == null) { + return visualElements_.get(index); + } else { + return visualElementsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * A list of detected non-text visual elements e.g. checkbox,
+       * signature etc. on the page.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.VisualElement visual_elements = 9; + * + */ + public java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.VisualElementOrBuilder> + getVisualElementsOrBuilderList() { + if (visualElementsBuilder_ != null) { + return visualElementsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(visualElements_); + } + } + /** + * + * + *
+       * A list of detected non-text visual elements e.g. checkbox,
+       * signature etc. on the page.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.VisualElement visual_elements = 9; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.VisualElement.Builder + addVisualElementsBuilder() { + return getVisualElementsFieldBuilder() + .addBuilder( + com.google.cloud.documentai.v1beta2.Document.Page.VisualElement + .getDefaultInstance()); + } + /** + * + * + *
+       * A list of detected non-text visual elements e.g. checkbox,
+       * signature etc. on the page.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.VisualElement visual_elements = 9; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.VisualElement.Builder + addVisualElementsBuilder(int index) { + return getVisualElementsFieldBuilder() + .addBuilder( + index, + com.google.cloud.documentai.v1beta2.Document.Page.VisualElement + .getDefaultInstance()); + } + /** + * + * + *
+       * A list of detected non-text visual elements e.g. checkbox,
+       * signature etc. on the page.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.VisualElement visual_elements = 9; + * + */ + public java.util.List + getVisualElementsBuilderList() { + return getVisualElementsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.VisualElement, + com.google.cloud.documentai.v1beta2.Document.Page.VisualElement.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.VisualElementOrBuilder> + getVisualElementsFieldBuilder() { + if (visualElementsBuilder_ == null) { + visualElementsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.VisualElement, + com.google.cloud.documentai.v1beta2.Document.Page.VisualElement.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.VisualElementOrBuilder>( + visualElements_, + ((bitField0_ & 0x00000400) != 0), + getParentForChildren(), + isClean()); + visualElements_ = null; + } + return visualElementsBuilder_; + } + + private java.util.List tables_ = + java.util.Collections.emptyList(); + + private void ensureTablesIsMutable() { + if (!((bitField0_ & 0x00000800) != 0)) { + tables_ = + new java.util.ArrayList( + tables_); + bitField0_ |= 0x00000800; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Table, + com.google.cloud.documentai.v1beta2.Document.Page.Table.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.TableOrBuilder> + tablesBuilder_; + + /** + * + * + *
+       * A list of visually detected tables on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table tables = 10; + */ + public java.util.List + getTablesList() { + if (tablesBuilder_ == null) { + return java.util.Collections.unmodifiableList(tables_); + } else { + return tablesBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * A list of visually detected tables on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table tables = 10; + */ + public int getTablesCount() { + if (tablesBuilder_ == null) { + return tables_.size(); + } else { + return tablesBuilder_.getCount(); + } + } + /** + * + * + *
+       * A list of visually detected tables on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table tables = 10; + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Table getTables(int index) { + if (tablesBuilder_ == null) { + return tables_.get(index); + } else { + return tablesBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * A list of visually detected tables on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table tables = 10; + */ + public Builder setTables( + int index, com.google.cloud.documentai.v1beta2.Document.Page.Table value) { + if (tablesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTablesIsMutable(); + tables_.set(index, value); + onChanged(); + } else { + tablesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * A list of visually detected tables on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table tables = 10; + */ + public Builder setTables( + int index, + com.google.cloud.documentai.v1beta2.Document.Page.Table.Builder builderForValue) { + if (tablesBuilder_ == null) { + ensureTablesIsMutable(); + tables_.set(index, builderForValue.build()); + onChanged(); + } else { + tablesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of visually detected tables on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table tables = 10; + */ + public Builder addTables(com.google.cloud.documentai.v1beta2.Document.Page.Table value) { + if (tablesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTablesIsMutable(); + tables_.add(value); + onChanged(); + } else { + tablesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * A list of visually detected tables on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table tables = 10; + */ + public Builder addTables( + int index, com.google.cloud.documentai.v1beta2.Document.Page.Table value) { + if (tablesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTablesIsMutable(); + tables_.add(index, value); + onChanged(); + } else { + tablesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * A list of visually detected tables on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table tables = 10; + */ + public Builder addTables( + com.google.cloud.documentai.v1beta2.Document.Page.Table.Builder builderForValue) { + if (tablesBuilder_ == null) { + ensureTablesIsMutable(); + tables_.add(builderForValue.build()); + onChanged(); + } else { + tablesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of visually detected tables on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table tables = 10; + */ + public Builder addTables( + int index, + com.google.cloud.documentai.v1beta2.Document.Page.Table.Builder builderForValue) { + if (tablesBuilder_ == null) { + ensureTablesIsMutable(); + tables_.add(index, builderForValue.build()); + onChanged(); + } else { + tablesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of visually detected tables on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table tables = 10; + */ + public Builder addAllTables( + java.lang.Iterable + values) { + if (tablesBuilder_ == null) { + ensureTablesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tables_); + onChanged(); + } else { + tablesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * A list of visually detected tables on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table tables = 10; + */ + public Builder clearTables() { + if (tablesBuilder_ == null) { + tables_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + } else { + tablesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * A list of visually detected tables on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table tables = 10; + */ + public Builder removeTables(int index) { + if (tablesBuilder_ == null) { + ensureTablesIsMutable(); + tables_.remove(index); + onChanged(); + } else { + tablesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * A list of visually detected tables on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table tables = 10; + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Table.Builder getTablesBuilder( + int index) { + return getTablesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * A list of visually detected tables on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table tables = 10; + */ + public com.google.cloud.documentai.v1beta2.Document.Page.TableOrBuilder getTablesOrBuilder( + int index) { + if (tablesBuilder_ == null) { + return tables_.get(index); + } else { + return tablesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * A list of visually detected tables on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table tables = 10; + */ + public java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.TableOrBuilder> + getTablesOrBuilderList() { + if (tablesBuilder_ != null) { + return tablesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(tables_); + } + } + /** + * + * + *
+       * A list of visually detected tables on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table tables = 10; + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Table.Builder addTablesBuilder() { + return getTablesFieldBuilder() + .addBuilder( + com.google.cloud.documentai.v1beta2.Document.Page.Table.getDefaultInstance()); + } + /** + * + * + *
+       * A list of visually detected tables on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table tables = 10; + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Table.Builder addTablesBuilder( + int index) { + return getTablesFieldBuilder() + .addBuilder( + index, + com.google.cloud.documentai.v1beta2.Document.Page.Table.getDefaultInstance()); + } + /** + * + * + *
+       * A list of visually detected tables on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Table tables = 10; + */ + public java.util.List + getTablesBuilderList() { + return getTablesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Table, + com.google.cloud.documentai.v1beta2.Document.Page.Table.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.TableOrBuilder> + getTablesFieldBuilder() { + if (tablesBuilder_ == null) { + tablesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Table, + com.google.cloud.documentai.v1beta2.Document.Page.Table.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.TableOrBuilder>( + tables_, ((bitField0_ & 0x00000800) != 0), getParentForChildren(), isClean()); + tables_ = null; + } + return tablesBuilder_; + } + + private java.util.List + formFields_ = java.util.Collections.emptyList(); + + private void ensureFormFieldsIsMutable() { + if (!((bitField0_ & 0x00001000) != 0)) { + formFields_ = + new java.util.ArrayList( + formFields_); + bitField0_ |= 0x00001000; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.FormField, + com.google.cloud.documentai.v1beta2.Document.Page.FormField.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.FormFieldOrBuilder> + formFieldsBuilder_; + + /** + * + * + *
+       * A list of visually detected form fields on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.FormField form_fields = 11; + * + */ + public java.util.List + getFormFieldsList() { + if (formFieldsBuilder_ == null) { + return java.util.Collections.unmodifiableList(formFields_); + } else { + return formFieldsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * A list of visually detected form fields on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.FormField form_fields = 11; + * + */ + public int getFormFieldsCount() { + if (formFieldsBuilder_ == null) { + return formFields_.size(); + } else { + return formFieldsBuilder_.getCount(); + } + } + /** + * + * + *
+       * A list of visually detected form fields on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.FormField form_fields = 11; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.FormField getFormFields(int index) { + if (formFieldsBuilder_ == null) { + return formFields_.get(index); + } else { + return formFieldsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * A list of visually detected form fields on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.FormField form_fields = 11; + * + */ + public Builder setFormFields( + int index, com.google.cloud.documentai.v1beta2.Document.Page.FormField value) { + if (formFieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFormFieldsIsMutable(); + formFields_.set(index, value); + onChanged(); + } else { + formFieldsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * A list of visually detected form fields on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.FormField form_fields = 11; + * + */ + public Builder setFormFields( + int index, + com.google.cloud.documentai.v1beta2.Document.Page.FormField.Builder builderForValue) { + if (formFieldsBuilder_ == null) { + ensureFormFieldsIsMutable(); + formFields_.set(index, builderForValue.build()); + onChanged(); + } else { + formFieldsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of visually detected form fields on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.FormField form_fields = 11; + * + */ + public Builder addFormFields( + com.google.cloud.documentai.v1beta2.Document.Page.FormField value) { + if (formFieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFormFieldsIsMutable(); + formFields_.add(value); + onChanged(); + } else { + formFieldsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * A list of visually detected form fields on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.FormField form_fields = 11; + * + */ + public Builder addFormFields( + int index, com.google.cloud.documentai.v1beta2.Document.Page.FormField value) { + if (formFieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFormFieldsIsMutable(); + formFields_.add(index, value); + onChanged(); + } else { + formFieldsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * A list of visually detected form fields on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.FormField form_fields = 11; + * + */ + public Builder addFormFields( + com.google.cloud.documentai.v1beta2.Document.Page.FormField.Builder builderForValue) { + if (formFieldsBuilder_ == null) { + ensureFormFieldsIsMutable(); + formFields_.add(builderForValue.build()); + onChanged(); + } else { + formFieldsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of visually detected form fields on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.FormField form_fields = 11; + * + */ + public Builder addFormFields( + int index, + com.google.cloud.documentai.v1beta2.Document.Page.FormField.Builder builderForValue) { + if (formFieldsBuilder_ == null) { + ensureFormFieldsIsMutable(); + formFields_.add(index, builderForValue.build()); + onChanged(); + } else { + formFieldsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of visually detected form fields on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.FormField form_fields = 11; + * + */ + public Builder addAllFormFields( + java.lang.Iterable + values) { + if (formFieldsBuilder_ == null) { + ensureFormFieldsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, formFields_); + onChanged(); + } else { + formFieldsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * A list of visually detected form fields on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.FormField form_fields = 11; + * + */ + public Builder clearFormFields() { + if (formFieldsBuilder_ == null) { + formFields_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00001000); + onChanged(); + } else { + formFieldsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * A list of visually detected form fields on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.FormField form_fields = 11; + * + */ + public Builder removeFormFields(int index) { + if (formFieldsBuilder_ == null) { + ensureFormFieldsIsMutable(); + formFields_.remove(index); + onChanged(); + } else { + formFieldsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * A list of visually detected form fields on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.FormField form_fields = 11; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.FormField.Builder + getFormFieldsBuilder(int index) { + return getFormFieldsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * A list of visually detected form fields on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.FormField form_fields = 11; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.FormFieldOrBuilder + getFormFieldsOrBuilder(int index) { + if (formFieldsBuilder_ == null) { + return formFields_.get(index); + } else { + return formFieldsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * A list of visually detected form fields on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.FormField form_fields = 11; + * + */ + public java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.FormFieldOrBuilder> + getFormFieldsOrBuilderList() { + if (formFieldsBuilder_ != null) { + return formFieldsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(formFields_); + } + } + /** + * + * + *
+       * A list of visually detected form fields on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.FormField form_fields = 11; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.FormField.Builder + addFormFieldsBuilder() { + return getFormFieldsFieldBuilder() + .addBuilder( + com.google.cloud.documentai.v1beta2.Document.Page.FormField.getDefaultInstance()); + } + /** + * + * + *
+       * A list of visually detected form fields on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.FormField form_fields = 11; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.FormField.Builder + addFormFieldsBuilder(int index) { + return getFormFieldsFieldBuilder() + .addBuilder( + index, + com.google.cloud.documentai.v1beta2.Document.Page.FormField.getDefaultInstance()); + } + /** + * + * + *
+       * A list of visually detected form fields on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.FormField form_fields = 11; + * + */ + public java.util.List + getFormFieldsBuilderList() { + return getFormFieldsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.FormField, + com.google.cloud.documentai.v1beta2.Document.Page.FormField.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.FormFieldOrBuilder> + getFormFieldsFieldBuilder() { + if (formFieldsBuilder_ == null) { + formFieldsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.FormField, + com.google.cloud.documentai.v1beta2.Document.Page.FormField.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.FormFieldOrBuilder>( + formFields_, ((bitField0_ & 0x00001000) != 0), getParentForChildren(), isClean()); + formFields_ = null; + } + return formFieldsBuilder_; + } + + private java.util.List symbols_ = + java.util.Collections.emptyList(); + + private void ensureSymbolsIsMutable() { + if (!((bitField0_ & 0x00002000) != 0)) { + symbols_ = + new java.util.ArrayList( + symbols_); + bitField0_ |= 0x00002000; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Symbol, + com.google.cloud.documentai.v1beta2.Document.Page.Symbol.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.SymbolOrBuilder> + symbolsBuilder_; + + /** + * + * + *
+       * A list of visually detected symbols on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Symbol symbols = 12; + */ + public java.util.List + getSymbolsList() { + if (symbolsBuilder_ == null) { + return java.util.Collections.unmodifiableList(symbols_); + } else { + return symbolsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * A list of visually detected symbols on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Symbol symbols = 12; + */ + public int getSymbolsCount() { + if (symbolsBuilder_ == null) { + return symbols_.size(); + } else { + return symbolsBuilder_.getCount(); + } + } + /** + * + * + *
+       * A list of visually detected symbols on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Symbol symbols = 12; + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Symbol getSymbols(int index) { + if (symbolsBuilder_ == null) { + return symbols_.get(index); + } else { + return symbolsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * A list of visually detected symbols on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Symbol symbols = 12; + */ + public Builder setSymbols( + int index, com.google.cloud.documentai.v1beta2.Document.Page.Symbol value) { + if (symbolsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSymbolsIsMutable(); + symbols_.set(index, value); + onChanged(); + } else { + symbolsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * A list of visually detected symbols on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Symbol symbols = 12; + */ + public Builder setSymbols( + int index, + com.google.cloud.documentai.v1beta2.Document.Page.Symbol.Builder builderForValue) { + if (symbolsBuilder_ == null) { + ensureSymbolsIsMutable(); + symbols_.set(index, builderForValue.build()); + onChanged(); + } else { + symbolsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of visually detected symbols on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Symbol symbols = 12; + */ + public Builder addSymbols(com.google.cloud.documentai.v1beta2.Document.Page.Symbol value) { + if (symbolsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSymbolsIsMutable(); + symbols_.add(value); + onChanged(); + } else { + symbolsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * A list of visually detected symbols on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Symbol symbols = 12; + */ + public Builder addSymbols( + int index, com.google.cloud.documentai.v1beta2.Document.Page.Symbol value) { + if (symbolsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSymbolsIsMutable(); + symbols_.add(index, value); + onChanged(); + } else { + symbolsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * A list of visually detected symbols on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Symbol symbols = 12; + */ + public Builder addSymbols( + com.google.cloud.documentai.v1beta2.Document.Page.Symbol.Builder builderForValue) { + if (symbolsBuilder_ == null) { + ensureSymbolsIsMutable(); + symbols_.add(builderForValue.build()); + onChanged(); + } else { + symbolsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of visually detected symbols on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Symbol symbols = 12; + */ + public Builder addSymbols( + int index, + com.google.cloud.documentai.v1beta2.Document.Page.Symbol.Builder builderForValue) { + if (symbolsBuilder_ == null) { + ensureSymbolsIsMutable(); + symbols_.add(index, builderForValue.build()); + onChanged(); + } else { + symbolsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of visually detected symbols on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Symbol symbols = 12; + */ + public Builder addAllSymbols( + java.lang.Iterable + values) { + if (symbolsBuilder_ == null) { + ensureSymbolsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, symbols_); + onChanged(); + } else { + symbolsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * A list of visually detected symbols on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Symbol symbols = 12; + */ + public Builder clearSymbols() { + if (symbolsBuilder_ == null) { + symbols_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00002000); + onChanged(); + } else { + symbolsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * A list of visually detected symbols on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Symbol symbols = 12; + */ + public Builder removeSymbols(int index) { + if (symbolsBuilder_ == null) { + ensureSymbolsIsMutable(); + symbols_.remove(index); + onChanged(); + } else { + symbolsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * A list of visually detected symbols on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Symbol symbols = 12; + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Symbol.Builder getSymbolsBuilder( + int index) { + return getSymbolsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * A list of visually detected symbols on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Symbol symbols = 12; + */ + public com.google.cloud.documentai.v1beta2.Document.Page.SymbolOrBuilder getSymbolsOrBuilder( + int index) { + if (symbolsBuilder_ == null) { + return symbols_.get(index); + } else { + return symbolsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * A list of visually detected symbols on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Symbol symbols = 12; + */ + public java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.SymbolOrBuilder> + getSymbolsOrBuilderList() { + if (symbolsBuilder_ != null) { + return symbolsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(symbols_); + } + } + /** + * + * + *
+       * A list of visually detected symbols on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Symbol symbols = 12; + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Symbol.Builder addSymbolsBuilder() { + return getSymbolsFieldBuilder() + .addBuilder( + com.google.cloud.documentai.v1beta2.Document.Page.Symbol.getDefaultInstance()); + } + /** + * + * + *
+       * A list of visually detected symbols on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Symbol symbols = 12; + */ + public com.google.cloud.documentai.v1beta2.Document.Page.Symbol.Builder addSymbolsBuilder( + int index) { + return getSymbolsFieldBuilder() + .addBuilder( + index, + com.google.cloud.documentai.v1beta2.Document.Page.Symbol.getDefaultInstance()); + } + /** + * + * + *
+       * A list of visually detected symbols on the page.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Page.Symbol symbols = 12; + */ + public java.util.List + getSymbolsBuilderList() { + return getSymbolsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Symbol, + com.google.cloud.documentai.v1beta2.Document.Page.Symbol.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.SymbolOrBuilder> + getSymbolsFieldBuilder() { + if (symbolsBuilder_ == null) { + symbolsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.Symbol, + com.google.cloud.documentai.v1beta2.Document.Page.Symbol.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.SymbolOrBuilder>( + symbols_, ((bitField0_ & 0x00002000) != 0), getParentForChildren(), isClean()); + symbols_ = null; + } + return symbolsBuilder_; + } + + private java.util.List + detectedBarcodes_ = java.util.Collections.emptyList(); + + private void ensureDetectedBarcodesIsMutable() { + if (!((bitField0_ & 0x00004000) != 0)) { + detectedBarcodes_ = + new java.util.ArrayList< + com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode>( + detectedBarcodes_); + bitField0_ |= 0x00004000; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcodeOrBuilder> + detectedBarcodesBuilder_; + + /** + * + * + *
+       * A list of detected barcodes.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode detected_barcodes = 15; + * + */ + public java.util.List + getDetectedBarcodesList() { + if (detectedBarcodesBuilder_ == null) { + return java.util.Collections.unmodifiableList(detectedBarcodes_); + } else { + return detectedBarcodesBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * A list of detected barcodes.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode detected_barcodes = 15; + * + */ + public int getDetectedBarcodesCount() { + if (detectedBarcodesBuilder_ == null) { + return detectedBarcodes_.size(); + } else { + return detectedBarcodesBuilder_.getCount(); + } + } + /** + * + * + *
+       * A list of detected barcodes.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode detected_barcodes = 15; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode getDetectedBarcodes( + int index) { + if (detectedBarcodesBuilder_ == null) { + return detectedBarcodes_.get(index); + } else { + return detectedBarcodesBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * A list of detected barcodes.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode detected_barcodes = 15; + * + */ + public Builder setDetectedBarcodes( + int index, com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode value) { + if (detectedBarcodesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectedBarcodesIsMutable(); + detectedBarcodes_.set(index, value); + onChanged(); + } else { + detectedBarcodesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * A list of detected barcodes.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode detected_barcodes = 15; + * + */ + public Builder setDetectedBarcodes( + int index, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode.Builder + builderForValue) { + if (detectedBarcodesBuilder_ == null) { + ensureDetectedBarcodesIsMutable(); + detectedBarcodes_.set(index, builderForValue.build()); + onChanged(); + } else { + detectedBarcodesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of detected barcodes.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode detected_barcodes = 15; + * + */ + public Builder addDetectedBarcodes( + com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode value) { + if (detectedBarcodesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectedBarcodesIsMutable(); + detectedBarcodes_.add(value); + onChanged(); + } else { + detectedBarcodesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * A list of detected barcodes.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode detected_barcodes = 15; + * + */ + public Builder addDetectedBarcodes( + int index, com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode value) { + if (detectedBarcodesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectedBarcodesIsMutable(); + detectedBarcodes_.add(index, value); + onChanged(); + } else { + detectedBarcodesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * A list of detected barcodes.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode detected_barcodes = 15; + * + */ + public Builder addDetectedBarcodes( + com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode.Builder + builderForValue) { + if (detectedBarcodesBuilder_ == null) { + ensureDetectedBarcodesIsMutable(); + detectedBarcodes_.add(builderForValue.build()); + onChanged(); + } else { + detectedBarcodesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of detected barcodes.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode detected_barcodes = 15; + * + */ + public Builder addDetectedBarcodes( + int index, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode.Builder + builderForValue) { + if (detectedBarcodesBuilder_ == null) { + ensureDetectedBarcodesIsMutable(); + detectedBarcodes_.add(index, builderForValue.build()); + onChanged(); + } else { + detectedBarcodesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of detected barcodes.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode detected_barcodes = 15; + * + */ + public Builder addAllDetectedBarcodes( + java.lang.Iterable< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode> + values) { + if (detectedBarcodesBuilder_ == null) { + ensureDetectedBarcodesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, detectedBarcodes_); + onChanged(); + } else { + detectedBarcodesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * A list of detected barcodes.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode detected_barcodes = 15; + * + */ + public Builder clearDetectedBarcodes() { + if (detectedBarcodesBuilder_ == null) { + detectedBarcodes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00004000); + onChanged(); + } else { + detectedBarcodesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * A list of detected barcodes.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode detected_barcodes = 15; + * + */ + public Builder removeDetectedBarcodes(int index) { + if (detectedBarcodesBuilder_ == null) { + ensureDetectedBarcodesIsMutable(); + detectedBarcodes_.remove(index); + onChanged(); + } else { + detectedBarcodesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * A list of detected barcodes.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode detected_barcodes = 15; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode.Builder + getDetectedBarcodesBuilder(int index) { + return getDetectedBarcodesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * A list of detected barcodes.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode detected_barcodes = 15; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcodeOrBuilder + getDetectedBarcodesOrBuilder(int index) { + if (detectedBarcodesBuilder_ == null) { + return detectedBarcodes_.get(index); + } else { + return detectedBarcodesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * A list of detected barcodes.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode detected_barcodes = 15; + * + */ + public java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcodeOrBuilder> + getDetectedBarcodesOrBuilderList() { + if (detectedBarcodesBuilder_ != null) { + return detectedBarcodesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(detectedBarcodes_); + } + } + /** + * + * + *
+       * A list of detected barcodes.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode detected_barcodes = 15; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode.Builder + addDetectedBarcodesBuilder() { + return getDetectedBarcodesFieldBuilder() + .addBuilder( + com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode + .getDefaultInstance()); + } + /** + * + * + *
+       * A list of detected barcodes.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode detected_barcodes = 15; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode.Builder + addDetectedBarcodesBuilder(int index) { + return getDetectedBarcodesFieldBuilder() + .addBuilder( + index, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode + .getDefaultInstance()); + } + /** + * + * + *
+       * A list of detected barcodes.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode detected_barcodes = 15; + * + */ + public java.util.List< + com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode.Builder> + getDetectedBarcodesBuilderList() { + return getDetectedBarcodesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcodeOrBuilder> + getDetectedBarcodesFieldBuilder() { + if (detectedBarcodesBuilder_ == null) { + detectedBarcodesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.DetectedBarcodeOrBuilder>( + detectedBarcodes_, + ((bitField0_ & 0x00004000) != 0), + getParentForChildren(), + isClean()); + detectedBarcodes_ = null; + } + return detectedBarcodesBuilder_; + } + + private com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + imageQualityScores_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores, + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScoresOrBuilder> + imageQualityScoresBuilder_; + /** + * + * + *
+       * Image quality scores.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores image_quality_scores = 17; + * + * + * @return Whether the imageQualityScores field is set. + */ + public boolean hasImageQualityScores() { + return ((bitField0_ & 0x00008000) != 0); + } + /** + * + * + *
+       * Image quality scores.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores image_quality_scores = 17; + * + * + * @return The imageQualityScores. + */ + public com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + getImageQualityScores() { + if (imageQualityScoresBuilder_ == null) { + return imageQualityScores_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + .getDefaultInstance() + : imageQualityScores_; + } else { + return imageQualityScoresBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Image quality scores.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores image_quality_scores = 17; + * + */ + public Builder setImageQualityScores( + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores value) { + if (imageQualityScoresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + imageQualityScores_ = value; + } else { + imageQualityScoresBuilder_.setMessage(value); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * + * + *
+       * Image quality scores.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores image_quality_scores = 17; + * + */ + public Builder setImageQualityScores( + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.Builder + builderForValue) { + if (imageQualityScoresBuilder_ == null) { + imageQualityScores_ = builderForValue.build(); + } else { + imageQualityScoresBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * + * + *
+       * Image quality scores.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores image_quality_scores = 17; + * + */ + public Builder mergeImageQualityScores( + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores value) { + if (imageQualityScoresBuilder_ == null) { + if (((bitField0_ & 0x00008000) != 0) + && imageQualityScores_ != null + && imageQualityScores_ + != com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + .getDefaultInstance()) { + getImageQualityScoresBuilder().mergeFrom(value); + } else { + imageQualityScores_ = value; + } + } else { + imageQualityScoresBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * + * + *
+       * Image quality scores.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores image_quality_scores = 17; + * + */ + public Builder clearImageQualityScores() { + bitField0_ = (bitField0_ & ~0x00008000); + imageQualityScores_ = null; + if (imageQualityScoresBuilder_ != null) { + imageQualityScoresBuilder_.dispose(); + imageQualityScoresBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Image quality scores.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores image_quality_scores = 17; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.Builder + getImageQualityScoresBuilder() { + bitField0_ |= 0x00008000; + onChanged(); + return getImageQualityScoresFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Image quality scores.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores image_quality_scores = 17; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScoresOrBuilder + getImageQualityScoresOrBuilder() { + if (imageQualityScoresBuilder_ != null) { + return imageQualityScoresBuilder_.getMessageOrBuilder(); + } else { + return imageQualityScores_ == null + ? com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores + .getDefaultInstance() + : imageQualityScores_; + } + } + /** + * + * + *
+       * Image quality scores.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores image_quality_scores = 17; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores, + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScoresOrBuilder> + getImageQualityScoresFieldBuilder() { + if (imageQualityScoresBuilder_ == null) { + imageQualityScoresBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores, + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScores.Builder, + com.google.cloud.documentai.v1beta2.Document.Page.ImageQualityScoresOrBuilder>( + getImageQualityScores(), getParentForChildren(), isClean()); + imageQualityScores_ = null; + } + return imageQualityScoresBuilder_; + } + + private com.google.cloud.documentai.v1beta2.Document.Provenance provenance_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Provenance, + com.google.cloud.documentai.v1beta2.Document.Provenance.Builder, + com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder> + provenanceBuilder_; + /** + * + * + *
+       * The history of this page.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 16 [deprecated = true]; + * + * + * @deprecated google.cloud.documentai.v1beta2.Document.Page.provenance is deprecated. See + * google/cloud/documentai/v1beta2/document.proto;l=577 + * @return Whether the provenance field is set. + */ + @java.lang.Deprecated + public boolean hasProvenance() { + return ((bitField0_ & 0x00010000) != 0); + } + /** + * + * + *
+       * The history of this page.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 16 [deprecated = true]; + * + * + * @deprecated google.cloud.documentai.v1beta2.Document.Page.provenance is deprecated. See + * google/cloud/documentai/v1beta2/document.proto;l=577 + * @return The provenance. + */ + @java.lang.Deprecated + public com.google.cloud.documentai.v1beta2.Document.Provenance getProvenance() { + if (provenanceBuilder_ == null) { + return provenance_ == null + ? com.google.cloud.documentai.v1beta2.Document.Provenance.getDefaultInstance() + : provenance_; + } else { + return provenanceBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The history of this page.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 16 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder setProvenance(com.google.cloud.documentai.v1beta2.Document.Provenance value) { + if (provenanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + provenance_ = value; + } else { + provenanceBuilder_.setMessage(value); + } + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * + * + *
+       * The history of this page.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 16 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder setProvenance( + com.google.cloud.documentai.v1beta2.Document.Provenance.Builder builderForValue) { + if (provenanceBuilder_ == null) { + provenance_ = builderForValue.build(); + } else { + provenanceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * + * + *
+       * The history of this page.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 16 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder mergeProvenance( + com.google.cloud.documentai.v1beta2.Document.Provenance value) { + if (provenanceBuilder_ == null) { + if (((bitField0_ & 0x00010000) != 0) + && provenance_ != null + && provenance_ + != com.google.cloud.documentai.v1beta2.Document.Provenance.getDefaultInstance()) { + getProvenanceBuilder().mergeFrom(value); + } else { + provenance_ = value; + } + } else { + provenanceBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * + * + *
+       * The history of this page.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 16 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder clearProvenance() { + bitField0_ = (bitField0_ & ~0x00010000); + provenance_ = null; + if (provenanceBuilder_ != null) { + provenanceBuilder_.dispose(); + provenanceBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * The history of this page.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 16 [deprecated = true]; + * + */ + @java.lang.Deprecated + public com.google.cloud.documentai.v1beta2.Document.Provenance.Builder + getProvenanceBuilder() { + bitField0_ |= 0x00010000; + onChanged(); + return getProvenanceFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The history of this page.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 16 [deprecated = true]; + * + */ + @java.lang.Deprecated + public com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder + getProvenanceOrBuilder() { + if (provenanceBuilder_ != null) { + return provenanceBuilder_.getMessageOrBuilder(); + } else { + return provenance_ == null + ? com.google.cloud.documentai.v1beta2.Document.Provenance.getDefaultInstance() + : provenance_; + } + } + /** + * + * + *
+       * The history of this page.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 16 [deprecated = true]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Provenance, + com.google.cloud.documentai.v1beta2.Document.Provenance.Builder, + com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder> + getProvenanceFieldBuilder() { + if (provenanceBuilder_ == null) { + provenanceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Provenance, + com.google.cloud.documentai.v1beta2.Document.Provenance.Builder, + com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder>( + getProvenance(), getParentForChildren(), isClean()); + provenance_ = null; + } + return provenanceBuilder_; + } + + @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.v1beta2.Document.Page) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.Page) + private static final com.google.cloud.documentai.v1beta2.Document.Page DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta2.Document.Page(); + } + + public static com.google.cloud.documentai.v1beta2.Document.Page getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Page parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Page getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface EntityOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.Entity) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. Provenance of the entity.
+     * Text anchor indexing into the
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the textAnchor field is set. + */ + boolean hasTextAnchor(); + /** + * + * + *
+     * Optional. Provenance of the entity.
+     * Text anchor indexing into the
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The textAnchor. + */ + com.google.cloud.documentai.v1beta2.Document.TextAnchor getTextAnchor(); + /** + * + * + *
+     * Optional. Provenance of the entity.
+     * Text anchor indexing into the
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.documentai.v1beta2.Document.TextAnchorOrBuilder getTextAnchorOrBuilder(); + + /** + * + * + *
+     * Required. Entity type from a schema e.g. `Address`.
+     * 
+ * + * string type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The type. + */ + java.lang.String getType(); + /** + * + * + *
+     * Required. Entity type from a schema e.g. `Address`.
+     * 
+ * + * string type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for type. + */ + com.google.protobuf.ByteString getTypeBytes(); + + /** + * + * + *
+     * Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.
+     * 
+ * + * string mention_text = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The mentionText. + */ + java.lang.String getMentionText(); + /** + * + * + *
+     * Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.
+     * 
+ * + * string mention_text = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for mentionText. + */ + com.google.protobuf.ByteString getMentionTextBytes(); + + /** + * + * + *
+     * Optional. Deprecated.  Use `id` field instead.
+     * 
+ * + * string mention_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The mentionId. + */ + java.lang.String getMentionId(); + /** + * + * + *
+     * Optional. Deprecated.  Use `id` field instead.
+     * 
+ * + * string mention_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for mentionId. + */ + com.google.protobuf.ByteString getMentionIdBytes(); + + /** + * + * + *
+     * Optional. Confidence of detected Schema entity. Range `[0, 1]`.
+     * 
+ * + * float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The confidence. + */ + float getConfidence(); + + /** + * + * + *
+     * Optional. Represents the provenance of this entity wrt. the location on
+     * the page where it was found.
+     * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.PageAnchor page_anchor = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the pageAnchor field is set. + */ + boolean hasPageAnchor(); + /** + * + * + *
+     * Optional. Represents the provenance of this entity wrt. the location on
+     * the page where it was found.
+     * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.PageAnchor page_anchor = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The pageAnchor. + */ + com.google.cloud.documentai.v1beta2.Document.PageAnchor getPageAnchor(); + /** + * + * + *
+     * Optional. Represents the provenance of this entity wrt. the location on
+     * the page where it was found.
+     * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.PageAnchor page_anchor = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.documentai.v1beta2.Document.PageAnchorOrBuilder getPageAnchorOrBuilder(); + + /** + * + * + *
+     * Optional. Canonical id. This will be a unique value in the entity list
+     * for this document.
+     * 
+ * + * string id = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+     * Optional. Canonical id. This will be a unique value in the entity list
+     * for this document.
+     * 
+ * + * string id = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+     * Optional. Normalized entity value. Absent if the extracted value could
+     * not be converted or the type (e.g. address) is not supported for certain
+     * parsers. This field is also only populated for certain supported document
+     * types.
+     * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue normalized_value = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the normalizedValue field is set. + */ + boolean hasNormalizedValue(); + /** + * + * + *
+     * Optional. Normalized entity value. Absent if the extracted value could
+     * not be converted or the type (e.g. address) is not supported for certain
+     * parsers. This field is also only populated for certain supported document
+     * types.
+     * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue normalized_value = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The normalizedValue. + */ + com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue getNormalizedValue(); + /** + * + * + *
+     * Optional. Normalized entity value. Absent if the extracted value could
+     * not be converted or the type (e.g. address) is not supported for certain
+     * parsers. This field is also only populated for certain supported document
+     * types.
+     * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue normalized_value = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValueOrBuilder + getNormalizedValueOrBuilder(); + + /** + * + * + *
+     * Optional. Entities can be nested to form a hierarchical data structure
+     * representing the content in the document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Entity properties = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getPropertiesList(); + /** + * + * + *
+     * Optional. Entities can be nested to form a hierarchical data structure
+     * representing the content in the document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Entity properties = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.documentai.v1beta2.Document.Entity getProperties(int index); + /** + * + * + *
+     * Optional. Entities can be nested to form a hierarchical data structure
+     * representing the content in the document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Entity properties = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getPropertiesCount(); + /** + * + * + *
+     * Optional. Entities can be nested to form a hierarchical data structure
+     * representing the content in the document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Entity properties = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getPropertiesOrBuilderList(); + /** + * + * + *
+     * Optional. Entities can be nested to form a hierarchical data structure
+     * representing the content in the document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Entity properties = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.documentai.v1beta2.Document.EntityOrBuilder getPropertiesOrBuilder(int index); + + /** + * + * + *
+     * Optional. The history of this annotation.
+     * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the provenance field is set. + */ + boolean hasProvenance(); + /** + * + * + *
+     * Optional. The history of this annotation.
+     * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The provenance. + */ + com.google.cloud.documentai.v1beta2.Document.Provenance getProvenance(); + /** + * + * + *
+     * Optional. The history of this annotation.
+     * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder getProvenanceOrBuilder(); + + /** + * + * + *
+     * Optional. Whether the entity will be redacted for de-identification
+     * purposes.
+     * 
+ * + * bool redacted = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The redacted. + */ + boolean getRedacted(); + } + /** + * + * + *
+   * An entity that could be a phrase in the text or a property that belongs to
+   * the document. It is a known entity type, such as a person, an organization,
+   * or location.
+   * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Entity} + */ + public static final class Entity extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.Entity) + EntityOrBuilder { + private static final long serialVersionUID = 0L; + // Use Entity.newBuilder() to construct. + private Entity(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Entity() { + type_ = ""; + mentionText_ = ""; + mentionId_ = ""; + id_ = ""; + properties_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Entity(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Entity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Entity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Document.Entity.class, + com.google.cloud.documentai.v1beta2.Document.Entity.Builder.class); + } + + public interface NormalizedValueOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Money value. See also:
+       * https://github.com/googleapis/googleapis/blob/master/google/type/money.proto
+       * 
+ * + * .google.type.Money money_value = 2; + * + * @return Whether the moneyValue field is set. + */ + boolean hasMoneyValue(); + /** + * + * + *
+       * Money value. See also:
+       * https://github.com/googleapis/googleapis/blob/master/google/type/money.proto
+       * 
+ * + * .google.type.Money money_value = 2; + * + * @return The moneyValue. + */ + com.google.type.Money getMoneyValue(); + /** + * + * + *
+       * Money value. See also:
+       * https://github.com/googleapis/googleapis/blob/master/google/type/money.proto
+       * 
+ * + * .google.type.Money money_value = 2; + */ + com.google.type.MoneyOrBuilder getMoneyValueOrBuilder(); + + /** + * + * + *
+       * Date value. Includes year, month, day. See also:
+       * https://github.com/googleapis/googleapis/blob/master/google/type/date.proto
+       * 
+ * + * .google.type.Date date_value = 3; + * + * @return Whether the dateValue field is set. + */ + boolean hasDateValue(); + /** + * + * + *
+       * Date value. Includes year, month, day. See also:
+       * https://github.com/googleapis/googleapis/blob/master/google/type/date.proto
+       * 
+ * + * .google.type.Date date_value = 3; + * + * @return The dateValue. + */ + com.google.type.Date getDateValue(); + /** + * + * + *
+       * Date value. Includes year, month, day. See also:
+       * https://github.com/googleapis/googleapis/blob/master/google/type/date.proto
+       * 
+ * + * .google.type.Date date_value = 3; + */ + com.google.type.DateOrBuilder getDateValueOrBuilder(); + + /** + * + * + *
+       * DateTime value. Includes date, time, and timezone. See also:
+       * https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto
+       * 
+ * + * .google.type.DateTime datetime_value = 4; + * + * @return Whether the datetimeValue field is set. + */ + boolean hasDatetimeValue(); + /** + * + * + *
+       * DateTime value. Includes date, time, and timezone. See also:
+       * https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto
+       * 
+ * + * .google.type.DateTime datetime_value = 4; + * + * @return The datetimeValue. + */ + com.google.type.DateTime getDatetimeValue(); + /** + * + * + *
+       * DateTime value. Includes date, time, and timezone. See also:
+       * https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto
+       * 
+ * + * .google.type.DateTime datetime_value = 4; + */ + com.google.type.DateTimeOrBuilder getDatetimeValueOrBuilder(); + + /** + * + * + *
+       * Postal address. See also:
+       * https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto
+       * 
+ * + * .google.type.PostalAddress address_value = 5; + * + * @return Whether the addressValue field is set. + */ + boolean hasAddressValue(); + /** + * + * + *
+       * Postal address. See also:
+       * https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto
+       * 
+ * + * .google.type.PostalAddress address_value = 5; + * + * @return The addressValue. + */ + com.google.type.PostalAddress getAddressValue(); + /** + * + * + *
+       * Postal address. See also:
+       * https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto
+       * 
+ * + * .google.type.PostalAddress address_value = 5; + */ + com.google.type.PostalAddressOrBuilder getAddressValueOrBuilder(); + + /** + * + * + *
+       * Boolean value. Can be used for entities with binary values, or for
+       * checkboxes.
+       * 
+ * + * bool boolean_value = 6; + * + * @return Whether the booleanValue field is set. + */ + boolean hasBooleanValue(); + /** + * + * + *
+       * Boolean value. Can be used for entities with binary values, or for
+       * checkboxes.
+       * 
+ * + * bool boolean_value = 6; + * + * @return The booleanValue. + */ + boolean getBooleanValue(); + + /** + * + * + *
+       * Integer value.
+       * 
+ * + * int32 integer_value = 7; + * + * @return Whether the integerValue field is set. + */ + boolean hasIntegerValue(); + /** + * + * + *
+       * Integer value.
+       * 
+ * + * int32 integer_value = 7; + * + * @return The integerValue. + */ + int getIntegerValue(); + + /** + * + * + *
+       * Float value.
+       * 
+ * + * float float_value = 8; + * + * @return Whether the floatValue field is set. + */ + boolean hasFloatValue(); + /** + * + * + *
+       * Float value.
+       * 
+ * + * float float_value = 8; + * + * @return The floatValue. + */ + float getFloatValue(); + + /** + * + * + *
+       * Optional. An optional field to store a normalized string.
+       * For some entity types, one of respective `structured_value` fields may
+       * also be populated. Also not all the types of `structured_value` will be
+       * normalized. For example, some processors may not generate `float`
+       * or `integer` normalized text by default.
+       *
+       * Below are sample formats mapped to structured values.
+       *
+       * - Money/Currency type (`money_value`) is in the ISO 4217 text format.
+       * - Date type (`date_value`) is in the ISO 8601 text format.
+       * - Datetime type (`datetime_value`) is in the ISO 8601 text format.
+       * 
+ * + * string text = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The text. + */ + java.lang.String getText(); + /** + * + * + *
+       * Optional. An optional field to store a normalized string.
+       * For some entity types, one of respective `structured_value` fields may
+       * also be populated. Also not all the types of `structured_value` will be
+       * normalized. For example, some processors may not generate `float`
+       * or `integer` normalized text by default.
+       *
+       * Below are sample formats mapped to structured values.
+       *
+       * - Money/Currency type (`money_value`) is in the ISO 4217 text format.
+       * - Date type (`date_value`) is in the ISO 8601 text format.
+       * - Datetime type (`datetime_value`) is in the ISO 8601 text format.
+       * 
+ * + * string text = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for text. + */ + com.google.protobuf.ByteString getTextBytes(); + + com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue.StructuredValueCase + getStructuredValueCase(); + } + /** + * + * + *
+     * Parsed and normalized entity value.
+     * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue} + */ + public static final class NormalizedValue extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue) + NormalizedValueOrBuilder { + private static final long serialVersionUID = 0L; + // Use NormalizedValue.newBuilder() to construct. + private NormalizedValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NormalizedValue() { + text_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NormalizedValue(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Entity_NormalizedValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Entity_NormalizedValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue.class, + com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue.Builder.class); + } + + private int structuredValueCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object structuredValue_; + + public enum StructuredValueCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + MONEY_VALUE(2), + DATE_VALUE(3), + DATETIME_VALUE(4), + ADDRESS_VALUE(5), + BOOLEAN_VALUE(6), + INTEGER_VALUE(7), + FLOAT_VALUE(8), + STRUCTUREDVALUE_NOT_SET(0); + private final int value; + + private StructuredValueCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static StructuredValueCase valueOf(int value) { + return forNumber(value); + } + + public static StructuredValueCase forNumber(int value) { + switch (value) { + case 2: + return MONEY_VALUE; + case 3: + return DATE_VALUE; + case 4: + return DATETIME_VALUE; + case 5: + return ADDRESS_VALUE; + case 6: + return BOOLEAN_VALUE; + case 7: + return INTEGER_VALUE; + case 8: + return FLOAT_VALUE; + case 0: + return STRUCTUREDVALUE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public StructuredValueCase getStructuredValueCase() { + return StructuredValueCase.forNumber(structuredValueCase_); + } + + public static final int MONEY_VALUE_FIELD_NUMBER = 2; + /** + * + * + *
+       * Money value. See also:
+       * https://github.com/googleapis/googleapis/blob/master/google/type/money.proto
+       * 
+ * + * .google.type.Money money_value = 2; + * + * @return Whether the moneyValue field is set. + */ + @java.lang.Override + public boolean hasMoneyValue() { + return structuredValueCase_ == 2; + } + /** + * + * + *
+       * Money value. See also:
+       * https://github.com/googleapis/googleapis/blob/master/google/type/money.proto
+       * 
+ * + * .google.type.Money money_value = 2; + * + * @return The moneyValue. + */ + @java.lang.Override + public com.google.type.Money getMoneyValue() { + if (structuredValueCase_ == 2) { + return (com.google.type.Money) structuredValue_; + } + return com.google.type.Money.getDefaultInstance(); + } + /** + * + * + *
+       * Money value. See also:
+       * https://github.com/googleapis/googleapis/blob/master/google/type/money.proto
+       * 
+ * + * .google.type.Money money_value = 2; + */ + @java.lang.Override + public com.google.type.MoneyOrBuilder getMoneyValueOrBuilder() { + if (structuredValueCase_ == 2) { + return (com.google.type.Money) structuredValue_; + } + return com.google.type.Money.getDefaultInstance(); + } + + public static final int DATE_VALUE_FIELD_NUMBER = 3; + /** + * + * + *
+       * Date value. Includes year, month, day. See also:
+       * https://github.com/googleapis/googleapis/blob/master/google/type/date.proto
+       * 
+ * + * .google.type.Date date_value = 3; + * + * @return Whether the dateValue field is set. + */ + @java.lang.Override + public boolean hasDateValue() { + return structuredValueCase_ == 3; + } + /** + * + * + *
+       * Date value. Includes year, month, day. See also:
+       * https://github.com/googleapis/googleapis/blob/master/google/type/date.proto
+       * 
+ * + * .google.type.Date date_value = 3; + * + * @return The dateValue. + */ + @java.lang.Override + public com.google.type.Date getDateValue() { + if (structuredValueCase_ == 3) { + return (com.google.type.Date) structuredValue_; + } + return com.google.type.Date.getDefaultInstance(); + } + /** + * + * + *
+       * Date value. Includes year, month, day. See also:
+       * https://github.com/googleapis/googleapis/blob/master/google/type/date.proto
+       * 
+ * + * .google.type.Date date_value = 3; + */ + @java.lang.Override + public com.google.type.DateOrBuilder getDateValueOrBuilder() { + if (structuredValueCase_ == 3) { + return (com.google.type.Date) structuredValue_; + } + return com.google.type.Date.getDefaultInstance(); + } + + public static final int DATETIME_VALUE_FIELD_NUMBER = 4; + /** + * + * + *
+       * DateTime value. Includes date, time, and timezone. See also:
+       * https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto
+       * 
+ * + * .google.type.DateTime datetime_value = 4; + * + * @return Whether the datetimeValue field is set. + */ + @java.lang.Override + public boolean hasDatetimeValue() { + return structuredValueCase_ == 4; + } + /** + * + * + *
+       * DateTime value. Includes date, time, and timezone. See also:
+       * https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto
+       * 
+ * + * .google.type.DateTime datetime_value = 4; + * + * @return The datetimeValue. + */ + @java.lang.Override + public com.google.type.DateTime getDatetimeValue() { + if (structuredValueCase_ == 4) { + return (com.google.type.DateTime) structuredValue_; + } + return com.google.type.DateTime.getDefaultInstance(); + } + /** + * + * + *
+       * DateTime value. Includes date, time, and timezone. See also:
+       * https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto
+       * 
+ * + * .google.type.DateTime datetime_value = 4; + */ + @java.lang.Override + public com.google.type.DateTimeOrBuilder getDatetimeValueOrBuilder() { + if (structuredValueCase_ == 4) { + return (com.google.type.DateTime) structuredValue_; + } + return com.google.type.DateTime.getDefaultInstance(); + } + + public static final int ADDRESS_VALUE_FIELD_NUMBER = 5; + /** + * + * + *
+       * Postal address. See also:
+       * https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto
+       * 
+ * + * .google.type.PostalAddress address_value = 5; + * + * @return Whether the addressValue field is set. + */ + @java.lang.Override + public boolean hasAddressValue() { + return structuredValueCase_ == 5; + } + /** + * + * + *
+       * Postal address. See also:
+       * https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto
+       * 
+ * + * .google.type.PostalAddress address_value = 5; + * + * @return The addressValue. + */ + @java.lang.Override + public com.google.type.PostalAddress getAddressValue() { + if (structuredValueCase_ == 5) { + return (com.google.type.PostalAddress) structuredValue_; + } + return com.google.type.PostalAddress.getDefaultInstance(); + } + /** + * + * + *
+       * Postal address. See also:
+       * https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto
+       * 
+ * + * .google.type.PostalAddress address_value = 5; + */ + @java.lang.Override + public com.google.type.PostalAddressOrBuilder getAddressValueOrBuilder() { + if (structuredValueCase_ == 5) { + return (com.google.type.PostalAddress) structuredValue_; + } + return com.google.type.PostalAddress.getDefaultInstance(); + } + + public static final int BOOLEAN_VALUE_FIELD_NUMBER = 6; + /** + * + * + *
+       * Boolean value. Can be used for entities with binary values, or for
+       * checkboxes.
+       * 
+ * + * bool boolean_value = 6; + * + * @return Whether the booleanValue field is set. + */ + @java.lang.Override + public boolean hasBooleanValue() { + return structuredValueCase_ == 6; + } + /** + * + * + *
+       * Boolean value. Can be used for entities with binary values, or for
+       * checkboxes.
+       * 
+ * + * bool boolean_value = 6; + * + * @return The booleanValue. + */ + @java.lang.Override + public boolean getBooleanValue() { + if (structuredValueCase_ == 6) { + return (java.lang.Boolean) structuredValue_; + } + return false; + } + + public static final int INTEGER_VALUE_FIELD_NUMBER = 7; + /** + * + * + *
+       * Integer value.
+       * 
+ * + * int32 integer_value = 7; + * + * @return Whether the integerValue field is set. + */ + @java.lang.Override + public boolean hasIntegerValue() { + return structuredValueCase_ == 7; + } + /** + * + * + *
+       * Integer value.
+       * 
+ * + * int32 integer_value = 7; + * + * @return The integerValue. + */ + @java.lang.Override + public int getIntegerValue() { + if (structuredValueCase_ == 7) { + return (java.lang.Integer) structuredValue_; + } + return 0; + } + + public static final int FLOAT_VALUE_FIELD_NUMBER = 8; + /** + * + * + *
+       * Float value.
+       * 
+ * + * float float_value = 8; + * + * @return Whether the floatValue field is set. + */ + @java.lang.Override + public boolean hasFloatValue() { + return structuredValueCase_ == 8; + } + /** + * + * + *
+       * Float value.
+       * 
+ * + * float float_value = 8; + * + * @return The floatValue. + */ + @java.lang.Override + public float getFloatValue() { + if (structuredValueCase_ == 8) { + return (java.lang.Float) structuredValue_; + } + return 0F; + } + + public static final int TEXT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object text_ = ""; + /** + * + * + *
+       * Optional. An optional field to store a normalized string.
+       * For some entity types, one of respective `structured_value` fields may
+       * also be populated. Also not all the types of `structured_value` will be
+       * normalized. For example, some processors may not generate `float`
+       * or `integer` normalized text by default.
+       *
+       * Below are sample formats mapped to structured values.
+       *
+       * - Money/Currency type (`money_value`) is in the ISO 4217 text format.
+       * - Date type (`date_value`) is in the ISO 8601 text format.
+       * - Datetime type (`datetime_value`) is in the ISO 8601 text format.
+       * 
+ * + * string text = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The text. + */ + @java.lang.Override + public java.lang.String getText() { + java.lang.Object ref = text_; + 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(); + text_ = s; + return s; + } + } + /** + * + * + *
+       * Optional. An optional field to store a normalized string.
+       * For some entity types, one of respective `structured_value` fields may
+       * also be populated. Also not all the types of `structured_value` will be
+       * normalized. For example, some processors may not generate `float`
+       * or `integer` normalized text by default.
+       *
+       * Below are sample formats mapped to structured values.
+       *
+       * - Money/Currency type (`money_value`) is in the ISO 4217 text format.
+       * - Date type (`date_value`) is in the ISO 8601 text format.
+       * - Datetime type (`datetime_value`) is in the ISO 8601 text format.
+       * 
+ * + * string text = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for text. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + text_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, text_); + } + if (structuredValueCase_ == 2) { + output.writeMessage(2, (com.google.type.Money) structuredValue_); + } + if (structuredValueCase_ == 3) { + output.writeMessage(3, (com.google.type.Date) structuredValue_); + } + if (structuredValueCase_ == 4) { + output.writeMessage(4, (com.google.type.DateTime) structuredValue_); + } + if (structuredValueCase_ == 5) { + output.writeMessage(5, (com.google.type.PostalAddress) structuredValue_); + } + if (structuredValueCase_ == 6) { + output.writeBool(6, (boolean) ((java.lang.Boolean) structuredValue_)); + } + if (structuredValueCase_ == 7) { + output.writeInt32(7, (int) ((java.lang.Integer) structuredValue_)); + } + if (structuredValueCase_ == 8) { + output.writeFloat(8, (float) ((java.lang.Float) structuredValue_)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, text_); + } + if (structuredValueCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.type.Money) structuredValue_); + } + if (structuredValueCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.type.Date) structuredValue_); + } + if (structuredValueCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.type.DateTime) structuredValue_); + } + if (structuredValueCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.type.PostalAddress) structuredValue_); + } + if (structuredValueCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 6, (boolean) ((java.lang.Boolean) structuredValue_)); + } + if (structuredValueCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size( + 7, (int) ((java.lang.Integer) structuredValue_)); + } + if (structuredValueCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeFloatSize( + 8, (float) ((java.lang.Float) structuredValue_)); + } + size += getUnknownFields().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.v1beta2.Document.Entity.NormalizedValue)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue other = + (com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue) obj; + + if (!getText().equals(other.getText())) return false; + if (!getStructuredValueCase().equals(other.getStructuredValueCase())) return false; + switch (structuredValueCase_) { + case 2: + if (!getMoneyValue().equals(other.getMoneyValue())) return false; + break; + case 3: + if (!getDateValue().equals(other.getDateValue())) return false; + break; + case 4: + if (!getDatetimeValue().equals(other.getDatetimeValue())) return false; + break; + case 5: + if (!getAddressValue().equals(other.getAddressValue())) return false; + break; + case 6: + if (getBooleanValue() != other.getBooleanValue()) return false; + break; + case 7: + if (getIntegerValue() != other.getIntegerValue()) return false; + break; + case 8: + if (java.lang.Float.floatToIntBits(getFloatValue()) + != java.lang.Float.floatToIntBits(other.getFloatValue())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + switch (structuredValueCase_) { + case 2: + hash = (37 * hash) + MONEY_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getMoneyValue().hashCode(); + break; + case 3: + hash = (37 * hash) + DATE_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getDateValue().hashCode(); + break; + case 4: + hash = (37 * hash) + DATETIME_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getDatetimeValue().hashCode(); + break; + case 5: + hash = (37 * hash) + ADDRESS_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getAddressValue().hashCode(); + break; + case 6: + hash = (37 * hash) + BOOLEAN_VALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getBooleanValue()); + break; + case 7: + hash = (37 * hash) + INTEGER_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getIntegerValue(); + break; + case 8: + hash = (37 * hash) + FLOAT_VALUE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getFloatValue()); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue 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.v1beta2.Document.Entity.NormalizedValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue 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.v1beta2.Document.Entity.NormalizedValue parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue 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.v1beta2.Document.Entity.NormalizedValue + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue + 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.v1beta2.Document.Entity.NormalizedValue parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue 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.v1beta2.Document.Entity.NormalizedValue 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; + } + /** + * + * + *
+       * Parsed and normalized entity value.
+       * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue) + com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Entity_NormalizedValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Entity_NormalizedValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue.class, + com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue.Builder + .class); + } + + // Construct using + // com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (moneyValueBuilder_ != null) { + moneyValueBuilder_.clear(); + } + if (dateValueBuilder_ != null) { + dateValueBuilder_.clear(); + } + if (datetimeValueBuilder_ != null) { + datetimeValueBuilder_.clear(); + } + if (addressValueBuilder_ != null) { + addressValueBuilder_.clear(); + } + text_ = ""; + structuredValueCase_ = 0; + structuredValue_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Entity_NormalizedValue_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue build() { + com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue buildPartial() { + com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue result = + new com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000080) != 0)) { + result.text_ = text_; + } + } + + private void buildPartialOneofs( + com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue result) { + result.structuredValueCase_ = structuredValueCase_; + result.structuredValue_ = this.structuredValue_; + if (structuredValueCase_ == 2 && moneyValueBuilder_ != null) { + result.structuredValue_ = moneyValueBuilder_.build(); + } + if (structuredValueCase_ == 3 && dateValueBuilder_ != null) { + result.structuredValue_ = dateValueBuilder_.build(); + } + if (structuredValueCase_ == 4 && datetimeValueBuilder_ != null) { + result.structuredValue_ = datetimeValueBuilder_.build(); + } + if (structuredValueCase_ == 5 && addressValueBuilder_ != null) { + result.structuredValue_ = addressValueBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue) { + return mergeFrom( + (com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue other) { + if (other + == com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue + .getDefaultInstance()) return this; + if (!other.getText().isEmpty()) { + text_ = other.text_; + bitField0_ |= 0x00000080; + onChanged(); + } + switch (other.getStructuredValueCase()) { + case MONEY_VALUE: + { + mergeMoneyValue(other.getMoneyValue()); + break; + } + case DATE_VALUE: + { + mergeDateValue(other.getDateValue()); + break; + } + case DATETIME_VALUE: + { + mergeDatetimeValue(other.getDatetimeValue()); + break; + } + case ADDRESS_VALUE: + { + mergeAddressValue(other.getAddressValue()); + break; + } + case BOOLEAN_VALUE: + { + setBooleanValue(other.getBooleanValue()); + break; + } + case INTEGER_VALUE: + { + setIntegerValue(other.getIntegerValue()); + break; + } + case FLOAT_VALUE: + { + setFloatValue(other.getFloatValue()); + break; + } + case STRUCTUREDVALUE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + text_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 10 + case 18: + { + input.readMessage(getMoneyValueFieldBuilder().getBuilder(), extensionRegistry); + structuredValueCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage(getDateValueFieldBuilder().getBuilder(), extensionRegistry); + structuredValueCase_ = 3; + break; + } // case 26 + case 34: + { + input.readMessage( + getDatetimeValueFieldBuilder().getBuilder(), extensionRegistry); + structuredValueCase_ = 4; + break; + } // case 34 + case 42: + { + input.readMessage( + getAddressValueFieldBuilder().getBuilder(), extensionRegistry); + structuredValueCase_ = 5; + break; + } // case 42 + case 48: + { + structuredValue_ = input.readBool(); + structuredValueCase_ = 6; + break; + } // case 48 + case 56: + { + structuredValue_ = input.readInt32(); + structuredValueCase_ = 7; + break; + } // case 56 + case 69: + { + structuredValue_ = input.readFloat(); + structuredValueCase_ = 8; + break; + } // case 69 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int structuredValueCase_ = 0; + private java.lang.Object structuredValue_; + + public StructuredValueCase getStructuredValueCase() { + return StructuredValueCase.forNumber(structuredValueCase_); + } + + public Builder clearStructuredValue() { + structuredValueCase_ = 0; + structuredValue_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Money, + com.google.type.Money.Builder, + com.google.type.MoneyOrBuilder> + moneyValueBuilder_; + /** + * + * + *
+         * Money value. See also:
+         * https://github.com/googleapis/googleapis/blob/master/google/type/money.proto
+         * 
+ * + * .google.type.Money money_value = 2; + * + * @return Whether the moneyValue field is set. + */ + @java.lang.Override + public boolean hasMoneyValue() { + return structuredValueCase_ == 2; + } + /** + * + * + *
+         * Money value. See also:
+         * https://github.com/googleapis/googleapis/blob/master/google/type/money.proto
+         * 
+ * + * .google.type.Money money_value = 2; + * + * @return The moneyValue. + */ + @java.lang.Override + public com.google.type.Money getMoneyValue() { + if (moneyValueBuilder_ == null) { + if (structuredValueCase_ == 2) { + return (com.google.type.Money) structuredValue_; + } + return com.google.type.Money.getDefaultInstance(); + } else { + if (structuredValueCase_ == 2) { + return moneyValueBuilder_.getMessage(); + } + return com.google.type.Money.getDefaultInstance(); + } + } + /** + * + * + *
+         * Money value. See also:
+         * https://github.com/googleapis/googleapis/blob/master/google/type/money.proto
+         * 
+ * + * .google.type.Money money_value = 2; + */ + public Builder setMoneyValue(com.google.type.Money value) { + if (moneyValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + structuredValue_ = value; + onChanged(); + } else { + moneyValueBuilder_.setMessage(value); } + structuredValueCase_ = 2; return this; } /** * * *
-         * Body rows of the table.
+         * Money value. See also:
+         * https://github.com/googleapis/googleapis/blob/master/google/type/money.proto
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; - * + * .google.type.Money money_value = 2; */ - public Builder addBodyRows( - int index, - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.Builder - builderForValue) { - if (bodyRowsBuilder_ == null) { - ensureBodyRowsIsMutable(); - bodyRows_.add(index, builderForValue.build()); + public Builder setMoneyValue(com.google.type.Money.Builder builderForValue) { + if (moneyValueBuilder_ == null) { + structuredValue_ = builderForValue.build(); onChanged(); } else { - bodyRowsBuilder_.addMessage(index, builderForValue.build()); + moneyValueBuilder_.setMessage(builderForValue.build()); } + structuredValueCase_ = 2; return this; } /** * * *
-         * Body rows of the table.
+         * Money value. See also:
+         * https://github.com/googleapis/googleapis/blob/master/google/type/money.proto
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; - * + * .google.type.Money money_value = 2; */ - public Builder addAllBodyRows( - java.lang.Iterable< - ? extends com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow> - values) { - if (bodyRowsBuilder_ == null) { - ensureBodyRowsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, bodyRows_); + public Builder mergeMoneyValue(com.google.type.Money value) { + if (moneyValueBuilder_ == null) { + if (structuredValueCase_ == 2 + && structuredValue_ != com.google.type.Money.getDefaultInstance()) { + structuredValue_ = + com.google.type.Money.newBuilder((com.google.type.Money) structuredValue_) + .mergeFrom(value) + .buildPartial(); + } else { + structuredValue_ = value; + } onChanged(); } else { - bodyRowsBuilder_.addAllMessages(values); + if (structuredValueCase_ == 2) { + moneyValueBuilder_.mergeFrom(value); + } else { + moneyValueBuilder_.setMessage(value); + } } + structuredValueCase_ = 2; return this; } /** * * *
-         * Body rows of the table.
+         * Money value. See also:
+         * https://github.com/googleapis/googleapis/blob/master/google/type/money.proto
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; - * + * .google.type.Money money_value = 2; */ - public Builder clearBodyRows() { - if (bodyRowsBuilder_ == null) { - bodyRows_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); + public Builder clearMoneyValue() { + if (moneyValueBuilder_ == null) { + if (structuredValueCase_ == 2) { + structuredValueCase_ = 0; + structuredValue_ = null; + onChanged(); + } } else { - bodyRowsBuilder_.clear(); + if (structuredValueCase_ == 2) { + structuredValueCase_ = 0; + structuredValue_ = null; + } + moneyValueBuilder_.clear(); } return this; } @@ -21390,6524 +47870,5034 @@ public Builder clearBodyRows() { * * *
-         * Body rows of the table.
+         * Money value. See also:
+         * https://github.com/googleapis/googleapis/blob/master/google/type/money.proto
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; - * + * .google.type.Money money_value = 2; */ - public Builder removeBodyRows(int index) { - if (bodyRowsBuilder_ == null) { - ensureBodyRowsIsMutable(); - bodyRows_.remove(index); + public com.google.type.Money.Builder getMoneyValueBuilder() { + return getMoneyValueFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * Money value. See also:
+         * https://github.com/googleapis/googleapis/blob/master/google/type/money.proto
+         * 
+ * + * .google.type.Money money_value = 2; + */ + @java.lang.Override + public com.google.type.MoneyOrBuilder getMoneyValueOrBuilder() { + if ((structuredValueCase_ == 2) && (moneyValueBuilder_ != null)) { + return moneyValueBuilder_.getMessageOrBuilder(); + } else { + if (structuredValueCase_ == 2) { + return (com.google.type.Money) structuredValue_; + } + return com.google.type.Money.getDefaultInstance(); + } + } + /** + * + * + *
+         * Money value. See also:
+         * https://github.com/googleapis/googleapis/blob/master/google/type/money.proto
+         * 
+ * + * .google.type.Money money_value = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Money, + com.google.type.Money.Builder, + com.google.type.MoneyOrBuilder> + getMoneyValueFieldBuilder() { + if (moneyValueBuilder_ == null) { + if (!(structuredValueCase_ == 2)) { + structuredValue_ = com.google.type.Money.getDefaultInstance(); + } + moneyValueBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Money, + com.google.type.Money.Builder, + com.google.type.MoneyOrBuilder>( + (com.google.type.Money) structuredValue_, getParentForChildren(), isClean()); + structuredValue_ = null; + } + structuredValueCase_ = 2; + onChanged(); + return moneyValueBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + dateValueBuilder_; + /** + * + * + *
+         * Date value. Includes year, month, day. See also:
+         * https://github.com/googleapis/googleapis/blob/master/google/type/date.proto
+         * 
+ * + * .google.type.Date date_value = 3; + * + * @return Whether the dateValue field is set. + */ + @java.lang.Override + public boolean hasDateValue() { + return structuredValueCase_ == 3; + } + /** + * + * + *
+         * Date value. Includes year, month, day. See also:
+         * https://github.com/googleapis/googleapis/blob/master/google/type/date.proto
+         * 
+ * + * .google.type.Date date_value = 3; + * + * @return The dateValue. + */ + @java.lang.Override + public com.google.type.Date getDateValue() { + if (dateValueBuilder_ == null) { + if (structuredValueCase_ == 3) { + return (com.google.type.Date) structuredValue_; + } + return com.google.type.Date.getDefaultInstance(); + } else { + if (structuredValueCase_ == 3) { + return dateValueBuilder_.getMessage(); + } + return com.google.type.Date.getDefaultInstance(); + } + } + /** + * + * + *
+         * Date value. Includes year, month, day. See also:
+         * https://github.com/googleapis/googleapis/blob/master/google/type/date.proto
+         * 
+ * + * .google.type.Date date_value = 3; + */ + public Builder setDateValue(com.google.type.Date value) { + if (dateValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + structuredValue_ = value; onChanged(); } else { - bodyRowsBuilder_.remove(index); + dateValueBuilder_.setMessage(value); } + structuredValueCase_ = 3; return this; } /** * * *
-         * Body rows of the table.
+         * Date value. Includes year, month, day. See also:
+         * https://github.com/googleapis/googleapis/blob/master/google/type/date.proto
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; - * + * .google.type.Date date_value = 3; */ - public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.Builder - getBodyRowsBuilder(int index) { - return getBodyRowsFieldBuilder().getBuilder(index); + public Builder setDateValue(com.google.type.Date.Builder builderForValue) { + if (dateValueBuilder_ == null) { + structuredValue_ = builderForValue.build(); + onChanged(); + } else { + dateValueBuilder_.setMessage(builderForValue.build()); + } + structuredValueCase_ = 3; + return this; } /** * * *
-         * Body rows of the table.
+         * Date value. Includes year, month, day. See also:
+         * https://github.com/googleapis/googleapis/blob/master/google/type/date.proto
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; - * + * .google.type.Date date_value = 3; */ - public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRowOrBuilder - getBodyRowsOrBuilder(int index) { - if (bodyRowsBuilder_ == null) { - return bodyRows_.get(index); + public Builder mergeDateValue(com.google.type.Date value) { + if (dateValueBuilder_ == null) { + if (structuredValueCase_ == 3 + && structuredValue_ != com.google.type.Date.getDefaultInstance()) { + structuredValue_ = + com.google.type.Date.newBuilder((com.google.type.Date) structuredValue_) + .mergeFrom(value) + .buildPartial(); + } else { + structuredValue_ = value; + } + onChanged(); } else { - return bodyRowsBuilder_.getMessageOrBuilder(index); + if (structuredValueCase_ == 3) { + dateValueBuilder_.mergeFrom(value); + } else { + dateValueBuilder_.setMessage(value); + } } + structuredValueCase_ = 3; + return this; } /** * * *
-         * Body rows of the table.
+         * Date value. Includes year, month, day. See also:
+         * https://github.com/googleapis/googleapis/blob/master/google/type/date.proto
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; - * + * .google.type.Date date_value = 3; */ - public java.util.List< - ? extends com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRowOrBuilder> - getBodyRowsOrBuilderList() { - if (bodyRowsBuilder_ != null) { - return bodyRowsBuilder_.getMessageOrBuilderList(); + public Builder clearDateValue() { + if (dateValueBuilder_ == null) { + if (structuredValueCase_ == 3) { + structuredValueCase_ = 0; + structuredValue_ = null; + onChanged(); + } } else { - return java.util.Collections.unmodifiableList(bodyRows_); + if (structuredValueCase_ == 3) { + structuredValueCase_ = 0; + structuredValue_ = null; + } + dateValueBuilder_.clear(); } + return this; } /** * * *
-         * Body rows of the table.
+         * Date value. Includes year, month, day. See also:
+         * https://github.com/googleapis/googleapis/blob/master/google/type/date.proto
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; - * + * .google.type.Date date_value = 3; */ - public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.Builder - addBodyRowsBuilder() { - return getBodyRowsFieldBuilder() - .addBuilder( - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow - .getDefaultInstance()); + public com.google.type.Date.Builder getDateValueBuilder() { + return getDateValueFieldBuilder().getBuilder(); } /** * * *
-         * Body rows of the table.
+         * Date value. Includes year, month, day. See also:
+         * https://github.com/googleapis/googleapis/blob/master/google/type/date.proto
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; - * + * .google.type.Date date_value = 3; */ - public com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.Builder - addBodyRowsBuilder(int index) { - return getBodyRowsFieldBuilder() - .addBuilder( - index, - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow - .getDefaultInstance()); + @java.lang.Override + public com.google.type.DateOrBuilder getDateValueOrBuilder() { + if ((structuredValueCase_ == 3) && (dateValueBuilder_ != null)) { + return dateValueBuilder_.getMessageOrBuilder(); + } else { + if (structuredValueCase_ == 3) { + return (com.google.type.Date) structuredValue_; + } + return com.google.type.Date.getDefaultInstance(); + } } /** * * *
-         * Body rows of the table.
+         * Date value. Includes year, month, day. See also:
+         * https://github.com/googleapis/googleapis/blob/master/google/type/date.proto
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table.TableRow body_rows = 3; - * + * .google.type.Date date_value = 3; */ - public java.util.List< - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.Builder> - getBodyRowsBuilderList() { - return getBodyRowsFieldBuilder().getBuilderList(); + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + getDateValueFieldBuilder() { + if (dateValueBuilder_ == null) { + if (!(structuredValueCase_ == 3)) { + structuredValue_ = com.google.type.Date.getDefaultInstance(); + } + dateValueBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, + com.google.type.Date.Builder, + com.google.type.DateOrBuilder>( + (com.google.type.Date) structuredValue_, getParentForChildren(), isClean()); + structuredValue_ = null; + } + structuredValueCase_ = 3; + onChanged(); + return dateValueBuilder_; } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow, - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRowOrBuilder> - getBodyRowsFieldBuilder() { - if (bodyRowsBuilder_ == null) { - bodyRowsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow, - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRow.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.Table.TableRowOrBuilder>( - bodyRows_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); - bodyRows_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.DateTime, + com.google.type.DateTime.Builder, + com.google.type.DateTimeOrBuilder> + datetimeValueBuilder_; + /** + * + * + *
+         * DateTime value. Includes date, time, and timezone. See also:
+         * https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto
+         * 
+ * + * .google.type.DateTime datetime_value = 4; + * + * @return Whether the datetimeValue field is set. + */ + @java.lang.Override + public boolean hasDatetimeValue() { + return structuredValueCase_ == 4; + } + /** + * + * + *
+         * DateTime value. Includes date, time, and timezone. See also:
+         * https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto
+         * 
+ * + * .google.type.DateTime datetime_value = 4; + * + * @return The datetimeValue. + */ + @java.lang.Override + public com.google.type.DateTime getDatetimeValue() { + if (datetimeValueBuilder_ == null) { + if (structuredValueCase_ == 4) { + return (com.google.type.DateTime) structuredValue_; + } + return com.google.type.DateTime.getDefaultInstance(); + } else { + if (structuredValueCase_ == 4) { + return datetimeValueBuilder_.getMessage(); + } + return com.google.type.DateTime.getDefaultInstance(); } - return bodyRowsBuilder_; } - - private java.util.List - detectedLanguages_ = java.util.Collections.emptyList(); - - private void ensureDetectedLanguagesIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - detectedLanguages_ = - new java.util.ArrayList< - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage>( - detectedLanguages_); - bitField0_ |= 0x00000008; + /** + * + * + *
+         * DateTime value. Includes date, time, and timezone. See also:
+         * https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto
+         * 
+ * + * .google.type.DateTime datetime_value = 4; + */ + public Builder setDatetimeValue(com.google.type.DateTime value) { + if (datetimeValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + structuredValue_ = value; + onChanged(); + } else { + datetimeValueBuilder_.setMessage(value); } + structuredValueCase_ = 4; + return this; } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> - detectedLanguagesBuilder_; - /** * * *
-         * A list of detected languages together with confidence.
+         * DateTime value. Includes date, time, and timezone. See also:
+         * https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * + * .google.type.DateTime datetime_value = 4; */ - public java.util.List - getDetectedLanguagesList() { - if (detectedLanguagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(detectedLanguages_); + public Builder setDatetimeValue(com.google.type.DateTime.Builder builderForValue) { + if (datetimeValueBuilder_ == null) { + structuredValue_ = builderForValue.build(); + onChanged(); } else { - return detectedLanguagesBuilder_.getMessageList(); + datetimeValueBuilder_.setMessage(builderForValue.build()); } + structuredValueCase_ = 4; + return this; } /** * * *
-         * A list of detected languages together with confidence.
+         * DateTime value. Includes date, time, and timezone. See also:
+         * https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * + * .google.type.DateTime datetime_value = 4; */ - public int getDetectedLanguagesCount() { - if (detectedLanguagesBuilder_ == null) { - return detectedLanguages_.size(); + public Builder mergeDatetimeValue(com.google.type.DateTime value) { + if (datetimeValueBuilder_ == null) { + if (structuredValueCase_ == 4 + && structuredValue_ != com.google.type.DateTime.getDefaultInstance()) { + structuredValue_ = + com.google.type.DateTime.newBuilder((com.google.type.DateTime) structuredValue_) + .mergeFrom(value) + .buildPartial(); + } else { + structuredValue_ = value; + } + onChanged(); } else { - return detectedLanguagesBuilder_.getCount(); + if (structuredValueCase_ == 4) { + datetimeValueBuilder_.mergeFrom(value); + } else { + datetimeValueBuilder_.setMessage(value); + } } + structuredValueCase_ = 4; + return this; } /** * * *
-         * A list of detected languages together with confidence.
+         * DateTime value. Includes date, time, and timezone. See also:
+         * https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * + * .google.type.DateTime datetime_value = 4; */ - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage - getDetectedLanguages(int index) { - if (detectedLanguagesBuilder_ == null) { - return detectedLanguages_.get(index); + public Builder clearDatetimeValue() { + if (datetimeValueBuilder_ == null) { + if (structuredValueCase_ == 4) { + structuredValueCase_ = 0; + structuredValue_ = null; + onChanged(); + } } else { - return detectedLanguagesBuilder_.getMessage(index); + if (structuredValueCase_ == 4) { + structuredValueCase_ = 0; + structuredValue_ = null; + } + datetimeValueBuilder_.clear(); } + return this; } /** * * *
-         * A list of detected languages together with confidence.
+         * DateTime value. Includes date, time, and timezone. See also:
+         * https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * + * .google.type.DateTime datetime_value = 4; */ - public Builder setDetectedLanguages( - int index, com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { - if (detectedLanguagesBuilder_ == null) { + public com.google.type.DateTime.Builder getDatetimeValueBuilder() { + return getDatetimeValueFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * DateTime value. Includes date, time, and timezone. See also:
+         * https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto
+         * 
+ * + * .google.type.DateTime datetime_value = 4; + */ + @java.lang.Override + public com.google.type.DateTimeOrBuilder getDatetimeValueOrBuilder() { + if ((structuredValueCase_ == 4) && (datetimeValueBuilder_ != null)) { + return datetimeValueBuilder_.getMessageOrBuilder(); + } else { + if (structuredValueCase_ == 4) { + return (com.google.type.DateTime) structuredValue_; + } + return com.google.type.DateTime.getDefaultInstance(); + } + } + /** + * + * + *
+         * DateTime value. Includes date, time, and timezone. See also:
+         * https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto
+         * 
+ * + * .google.type.DateTime datetime_value = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.DateTime, + com.google.type.DateTime.Builder, + com.google.type.DateTimeOrBuilder> + getDatetimeValueFieldBuilder() { + if (datetimeValueBuilder_ == null) { + if (!(structuredValueCase_ == 4)) { + structuredValue_ = com.google.type.DateTime.getDefaultInstance(); + } + datetimeValueBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.DateTime, + com.google.type.DateTime.Builder, + com.google.type.DateTimeOrBuilder>( + (com.google.type.DateTime) structuredValue_, getParentForChildren(), isClean()); + structuredValue_ = null; + } + structuredValueCase_ = 4; + onChanged(); + return datetimeValueBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.PostalAddress, + com.google.type.PostalAddress.Builder, + com.google.type.PostalAddressOrBuilder> + addressValueBuilder_; + /** + * + * + *
+         * Postal address. See also:
+         * https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto
+         * 
+ * + * .google.type.PostalAddress address_value = 5; + * + * @return Whether the addressValue field is set. + */ + @java.lang.Override + public boolean hasAddressValue() { + return structuredValueCase_ == 5; + } + /** + * + * + *
+         * Postal address. See also:
+         * https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto
+         * 
+ * + * .google.type.PostalAddress address_value = 5; + * + * @return The addressValue. + */ + @java.lang.Override + public com.google.type.PostalAddress getAddressValue() { + if (addressValueBuilder_ == null) { + if (structuredValueCase_ == 5) { + return (com.google.type.PostalAddress) structuredValue_; + } + return com.google.type.PostalAddress.getDefaultInstance(); + } else { + if (structuredValueCase_ == 5) { + return addressValueBuilder_.getMessage(); + } + return com.google.type.PostalAddress.getDefaultInstance(); + } + } + /** + * + * + *
+         * Postal address. See also:
+         * https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto
+         * 
+ * + * .google.type.PostalAddress address_value = 5; + */ + public Builder setAddressValue(com.google.type.PostalAddress value) { + if (addressValueBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.set(index, value); + structuredValue_ = value; onChanged(); } else { - detectedLanguagesBuilder_.setMessage(index, value); + addressValueBuilder_.setMessage(value); } + structuredValueCase_ = 5; return this; } /** * * *
-         * A list of detected languages together with confidence.
+         * Postal address. See also:
+         * https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * + * .google.type.PostalAddress address_value = 5; */ - public Builder setDetectedLanguages( - int index, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder - builderForValue) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.set(index, builderForValue.build()); + public Builder setAddressValue(com.google.type.PostalAddress.Builder builderForValue) { + if (addressValueBuilder_ == null) { + structuredValue_ = builderForValue.build(); onChanged(); } else { - detectedLanguagesBuilder_.setMessage(index, builderForValue.build()); + addressValueBuilder_.setMessage(builderForValue.build()); } + structuredValueCase_ = 5; return this; } /** * * *
-         * A list of detected languages together with confidence.
+         * Postal address. See also:
+         * https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * + * .google.type.PostalAddress address_value = 5; */ - public Builder addDetectedLanguages( - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { - if (detectedLanguagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); + public Builder mergeAddressValue(com.google.type.PostalAddress value) { + if (addressValueBuilder_ == null) { + if (structuredValueCase_ == 5 + && structuredValue_ != com.google.type.PostalAddress.getDefaultInstance()) { + structuredValue_ = + com.google.type.PostalAddress.newBuilder( + (com.google.type.PostalAddress) structuredValue_) + .mergeFrom(value) + .buildPartial(); + } else { + structuredValue_ = value; } - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(value); onChanged(); } else { - detectedLanguagesBuilder_.addMessage(value); + if (structuredValueCase_ == 5) { + addressValueBuilder_.mergeFrom(value); + } else { + addressValueBuilder_.setMessage(value); + } + } + structuredValueCase_ = 5; + return this; + } + /** + * + * + *
+         * Postal address. See also:
+         * https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto
+         * 
+ * + * .google.type.PostalAddress address_value = 5; + */ + public Builder clearAddressValue() { + if (addressValueBuilder_ == null) { + if (structuredValueCase_ == 5) { + structuredValueCase_ = 0; + structuredValue_ = null; + onChanged(); + } + } else { + if (structuredValueCase_ == 5) { + structuredValueCase_ = 0; + structuredValue_ = null; + } + addressValueBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * Postal address. See also:
+         * https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto
+         * 
+ * + * .google.type.PostalAddress address_value = 5; + */ + public com.google.type.PostalAddress.Builder getAddressValueBuilder() { + return getAddressValueFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * Postal address. See also:
+         * https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto
+         * 
+ * + * .google.type.PostalAddress address_value = 5; + */ + @java.lang.Override + public com.google.type.PostalAddressOrBuilder getAddressValueOrBuilder() { + if ((structuredValueCase_ == 5) && (addressValueBuilder_ != null)) { + return addressValueBuilder_.getMessageOrBuilder(); + } else { + if (structuredValueCase_ == 5) { + return (com.google.type.PostalAddress) structuredValue_; + } + return com.google.type.PostalAddress.getDefaultInstance(); + } + } + /** + * + * + *
+         * Postal address. See also:
+         * https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto
+         * 
+ * + * .google.type.PostalAddress address_value = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.PostalAddress, + com.google.type.PostalAddress.Builder, + com.google.type.PostalAddressOrBuilder> + getAddressValueFieldBuilder() { + if (addressValueBuilder_ == null) { + if (!(structuredValueCase_ == 5)) { + structuredValue_ = com.google.type.PostalAddress.getDefaultInstance(); + } + addressValueBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.PostalAddress, + com.google.type.PostalAddress.Builder, + com.google.type.PostalAddressOrBuilder>( + (com.google.type.PostalAddress) structuredValue_, + getParentForChildren(), + isClean()); + structuredValue_ = null; + } + structuredValueCase_ = 5; + onChanged(); + return addressValueBuilder_; + } + + /** + * + * + *
+         * Boolean value. Can be used for entities with binary values, or for
+         * checkboxes.
+         * 
+ * + * bool boolean_value = 6; + * + * @return Whether the booleanValue field is set. + */ + public boolean hasBooleanValue() { + return structuredValueCase_ == 6; + } + /** + * + * + *
+         * Boolean value. Can be used for entities with binary values, or for
+         * checkboxes.
+         * 
+ * + * bool boolean_value = 6; + * + * @return The booleanValue. + */ + public boolean getBooleanValue() { + if (structuredValueCase_ == 6) { + return (java.lang.Boolean) structuredValue_; + } + return false; + } + /** + * + * + *
+         * Boolean value. Can be used for entities with binary values, or for
+         * checkboxes.
+         * 
+ * + * bool boolean_value = 6; + * + * @param value The booleanValue to set. + * @return This builder for chaining. + */ + public Builder setBooleanValue(boolean value) { + + structuredValueCase_ = 6; + structuredValue_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Boolean value. Can be used for entities with binary values, or for
+         * checkboxes.
+         * 
+ * + * bool boolean_value = 6; + * + * @return This builder for chaining. + */ + public Builder clearBooleanValue() { + if (structuredValueCase_ == 6) { + structuredValueCase_ = 0; + structuredValue_ = null; + onChanged(); } return this; } + + /** + * + * + *
+         * Integer value.
+         * 
+ * + * int32 integer_value = 7; + * + * @return Whether the integerValue field is set. + */ + public boolean hasIntegerValue() { + return structuredValueCase_ == 7; + } /** * * *
-         * A list of detected languages together with confidence.
+         * Integer value.
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * + * int32 integer_value = 7; + * + * @return The integerValue. */ - public Builder addDetectedLanguages( - int index, com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { - if (detectedLanguagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(index, value); - onChanged(); - } else { - detectedLanguagesBuilder_.addMessage(index, value); + public int getIntegerValue() { + if (structuredValueCase_ == 7) { + return (java.lang.Integer) structuredValue_; } - return this; + return 0; } /** * * *
-         * A list of detected languages together with confidence.
+         * Integer value.
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * + * int32 integer_value = 7; + * + * @param value The integerValue to set. + * @return This builder for chaining. */ - public Builder addDetectedLanguages( - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder - builderForValue) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(builderForValue.build()); - onChanged(); - } else { - detectedLanguagesBuilder_.addMessage(builderForValue.build()); - } + public Builder setIntegerValue(int value) { + + structuredValueCase_ = 7; + structuredValue_ = value; + onChanged(); return this; } /** * * *
-         * A list of detected languages together with confidence.
+         * Integer value.
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * + * int32 integer_value = 7; + * + * @return This builder for chaining. */ - public Builder addDetectedLanguages( - int index, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder - builderForValue) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(index, builderForValue.build()); + public Builder clearIntegerValue() { + if (structuredValueCase_ == 7) { + structuredValueCase_ = 0; + structuredValue_ = null; onChanged(); - } else { - detectedLanguagesBuilder_.addMessage(index, builderForValue.build()); } return this; } + /** * * *
-         * A list of detected languages together with confidence.
+         * Float value.
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * + * float float_value = 8; + * + * @return Whether the floatValue field is set. */ - public Builder addAllDetectedLanguages( - java.lang.Iterable< - ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage> - values) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, detectedLanguages_); - onChanged(); - } else { - detectedLanguagesBuilder_.addAllMessages(values); - } - return this; + public boolean hasFloatValue() { + return structuredValueCase_ == 8; } /** * * *
-         * A list of detected languages together with confidence.
+         * Float value.
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * + * float float_value = 8; + * + * @return The floatValue. */ - public Builder clearDetectedLanguages() { - if (detectedLanguagesBuilder_ == null) { - detectedLanguages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - detectedLanguagesBuilder_.clear(); + public float getFloatValue() { + if (structuredValueCase_ == 8) { + return (java.lang.Float) structuredValue_; } - return this; + return 0F; } /** * * *
-         * A list of detected languages together with confidence.
+         * Float value.
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * + * float float_value = 8; + * + * @param value The floatValue to set. + * @return This builder for chaining. */ - public Builder removeDetectedLanguages(int index) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.remove(index); - onChanged(); - } else { - detectedLanguagesBuilder_.remove(index); - } + public Builder setFloatValue(float value) { + + structuredValueCase_ = 8; + structuredValue_ = value; + onChanged(); return this; } /** * * *
-         * A list of detected languages together with confidence.
+         * Float value.
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * + * float float_value = 8; + * + * @return This builder for chaining. */ - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder - getDetectedLanguagesBuilder(int index) { - return getDetectedLanguagesFieldBuilder().getBuilder(index); + public Builder clearFloatValue() { + if (structuredValueCase_ == 8) { + structuredValueCase_ = 0; + structuredValue_ = null; + onChanged(); + } + return this; } + + private java.lang.Object text_ = ""; /** * * *
-         * A list of detected languages together with confidence.
+         * Optional. An optional field to store a normalized string.
+         * For some entity types, one of respective `structured_value` fields may
+         * also be populated. Also not all the types of `structured_value` will be
+         * normalized. For example, some processors may not generate `float`
+         * or `integer` normalized text by default.
+         *
+         * Below are sample formats mapped to structured values.
+         *
+         * - Money/Currency type (`money_value`) is in the ISO 4217 text format.
+         * - Date type (`date_value`) is in the ISO 8601 text format.
+         * - Datetime type (`datetime_value`) is in the ISO 8601 text format.
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * + * string text = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The text. */ - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder - getDetectedLanguagesOrBuilder(int index) { - if (detectedLanguagesBuilder_ == null) { - return detectedLanguages_.get(index); + public java.lang.String getText() { + java.lang.Object ref = text_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; } else { - return detectedLanguagesBuilder_.getMessageOrBuilder(index); + return (java.lang.String) ref; } } /** * * *
-         * A list of detected languages together with confidence.
+         * Optional. An optional field to store a normalized string.
+         * For some entity types, one of respective `structured_value` fields may
+         * also be populated. Also not all the types of `structured_value` will be
+         * normalized. For example, some processors may not generate `float`
+         * or `integer` normalized text by default.
+         *
+         * Below are sample formats mapped to structured values.
+         *
+         * - Money/Currency type (`money_value`) is in the ISO 4217 text format.
+         * - Date type (`date_value`) is in the ISO 8601 text format.
+         * - Datetime type (`datetime_value`) is in the ISO 8601 text format.
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * + * string text = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for text. */ - public java.util.List< - ? extends - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> - getDetectedLanguagesOrBuilderList() { - if (detectedLanguagesBuilder_ != null) { - return detectedLanguagesBuilder_.getMessageOrBuilderList(); + public com.google.protobuf.ByteString getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + text_ = b; + return b; } else { - return java.util.Collections.unmodifiableList(detectedLanguages_); + return (com.google.protobuf.ByteString) ref; } } /** * * *
-         * A list of detected languages together with confidence.
+         * Optional. An optional field to store a normalized string.
+         * For some entity types, one of respective `structured_value` fields may
+         * also be populated. Also not all the types of `structured_value` will be
+         * normalized. For example, some processors may not generate `float`
+         * or `integer` normalized text by default.
+         *
+         * Below are sample formats mapped to structured values.
+         *
+         * - Money/Currency type (`money_value`) is in the ISO 4217 text format.
+         * - Date type (`date_value`) is in the ISO 8601 text format.
+         * - Datetime type (`datetime_value`) is in the ISO 8601 text format.
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * + * string text = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The text to set. + * @return This builder for chaining. */ - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder - addDetectedLanguagesBuilder() { - return getDetectedLanguagesFieldBuilder() - .addBuilder( - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage - .getDefaultInstance()); + public Builder setText(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + text_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; } /** * * *
-         * A list of detected languages together with confidence.
+         * Optional. An optional field to store a normalized string.
+         * For some entity types, one of respective `structured_value` fields may
+         * also be populated. Also not all the types of `structured_value` will be
+         * normalized. For example, some processors may not generate `float`
+         * or `integer` normalized text by default.
+         *
+         * Below are sample formats mapped to structured values.
+         *
+         * - Money/Currency type (`money_value`) is in the ISO 4217 text format.
+         * - Date type (`date_value`) is in the ISO 8601 text format.
+         * - Datetime type (`datetime_value`) is in the ISO 8601 text format.
          * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * + * string text = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. */ - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder - addDetectedLanguagesBuilder(int index) { - return getDetectedLanguagesFieldBuilder() - .addBuilder( - index, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage - .getDefaultInstance()); + public Builder clearText() { + text_ = getDefaultInstance().getText(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; } /** * * *
-         * A list of detected languages together with confidence.
-         * 
+ * Optional. An optional field to store a normalized string. + * For some entity types, one of respective `structured_value` fields may + * also be populated. Also not all the types of `structured_value` will be + * normalized. For example, some processors may not generate `float` + * or `integer` normalized text by default. * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * - */ - public java.util.List< - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder> - getDetectedLanguagesBuilderList() { - return getDetectedLanguagesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> - getDetectedLanguagesFieldBuilder() { - if (detectedLanguagesBuilder_ == null) { - detectedLanguagesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder>( - detectedLanguages_, - ((bitField0_ & 0x00000008) != 0), - getParentForChildren(), - isClean()); - detectedLanguages_ = null; - } - return detectedLanguagesBuilder_; - } - - @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.v1beta2.Document.Page.Table) - } - - // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.Page.Table) - private static final com.google.cloud.documentai.v1beta2.Document.Page.Table DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta2.Document.Page.Table(); - } - - public static com.google.cloud.documentai.v1beta2.Document.Page.Table getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser
PARSER = - new com.google.protobuf.AbstractParser
() { - @java.lang.Override - public Table parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser
parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser
getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Table getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface FormFieldOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.Page.FormField) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField] name. e.g. `Address`, `Email`,
-       * `Grand total`, `Phone number`, etc.
-       * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout field_name = 1; - * - * @return Whether the fieldName field is set. - */ - boolean hasFieldName(); - /** - * - * - *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField] name. e.g. `Address`, `Email`,
-       * `Grand total`, `Phone number`, etc.
-       * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout field_name = 1; - * - * @return The fieldName. - */ - com.google.cloud.documentai.v1beta2.Document.Page.Layout getFieldName(); - /** - * - * - *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField] name. e.g. `Address`, `Email`,
-       * `Grand total`, `Phone number`, etc.
-       * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout field_name = 1; - */ - com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder getFieldNameOrBuilder(); - - /** - * - * - *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField] value.
-       * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout field_value = 2; - * - * @return Whether the fieldValue field is set. - */ - boolean hasFieldValue(); - /** - * - * - *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField] value.
-       * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout field_value = 2; - * - * @return The fieldValue. - */ - com.google.cloud.documentai.v1beta2.Document.Page.Layout getFieldValue(); - /** - * - * - *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField] value.
-       * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout field_value = 2; - */ - com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder getFieldValueOrBuilder(); - - /** - * - * - *
-       * A list of detected languages for name together with confidence.
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; - * - */ - java.util.List - getNameDetectedLanguagesList(); - /** - * - * - *
-       * A list of detected languages for name together with confidence.
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; - * - */ - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage getNameDetectedLanguages( - int index); - /** - * - * - *
-       * A list of detected languages for name together with confidence.
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; - * - */ - int getNameDetectedLanguagesCount(); - /** - * - * - *
-       * A list of detected languages for name together with confidence.
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; - * - */ - java.util.List< - ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> - getNameDetectedLanguagesOrBuilderList(); - /** - * - * - *
-       * A list of detected languages for name together with confidence.
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; - * - */ - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder - getNameDetectedLanguagesOrBuilder(int index); - - /** - * - * - *
-       * A list of detected languages for value together with confidence.
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; - * - */ - java.util.List - getValueDetectedLanguagesList(); - /** - * - * - *
-       * A list of detected languages for value together with confidence.
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; - * - */ - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage getValueDetectedLanguages( - int index); - /** - * - * - *
-       * A list of detected languages for value together with confidence.
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; - * - */ - int getValueDetectedLanguagesCount(); - /** - * - * - *
-       * A list of detected languages for value together with confidence.
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; - * - */ - java.util.List< - ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> - getValueDetectedLanguagesOrBuilderList(); - /** - * - * - *
-       * A list of detected languages for value together with confidence.
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; - * - */ - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder - getValueDetectedLanguagesOrBuilder(int index); - - /** - * - * - *
-       * If the value is non-textual, this field represents the type. Current
-       * valid values are:
-       * - blank (this indicates the field_value is normal text)
-       * - "unfilled_checkbox"
-       * - "filled_checkbox"
-       * 
- * - * string value_type = 5; - * - * @return The valueType. - */ - java.lang.String getValueType(); - /** - * - * - *
-       * If the value is non-textual, this field represents the type. Current
-       * valid values are:
-       * - blank (this indicates the field_value is normal text)
-       * - "unfilled_checkbox"
-       * - "filled_checkbox"
-       * 
- * - * string value_type = 5; - * - * @return The bytes for valueType. - */ - com.google.protobuf.ByteString getValueTypeBytes(); + * Below are sample formats mapped to structured values. + * + * - Money/Currency type (`money_value`) is in the ISO 4217 text format. + * - Date type (`date_value`) is in the ISO 8601 text format. + * - Datetime type (`datetime_value`) is in the ISO 8601 text format. + * + * + * string text = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for text to set. + * @return This builder for chaining. + */ + public Builder setTextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + text_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } - /** - * - * - *
-       * An internal field, created for Labeling UI to export key text.
-       * 
- * - * string corrected_key_text = 6; - * - * @return The correctedKeyText. - */ - java.lang.String getCorrectedKeyText(); - /** - * - * - *
-       * An internal field, created for Labeling UI to export key text.
-       * 
- * - * string corrected_key_text = 6; - * - * @return The bytes for correctedKeyText. - */ - com.google.protobuf.ByteString getCorrectedKeyTextBytes(); + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - /** - * - * - *
-       * An internal field, created for Labeling UI to export value text.
-       * 
- * - * string corrected_value_text = 7; - * - * @return The correctedValueText. - */ - java.lang.String getCorrectedValueText(); - /** - * - * - *
-       * An internal field, created for Labeling UI to export value text.
-       * 
- * - * string corrected_value_text = 7; - * - * @return The bytes for correctedValueText. - */ - com.google.protobuf.ByteString getCorrectedValueTextBytes(); - } - /** - * - * - *
-     * A form field detected on the page.
-     * 
- * - * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.FormField} - */ - public static final class FormField extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.Page.FormField) - FormFieldOrBuilder { - private static final long serialVersionUID = 0L; - // Use FormField.newBuilder() to construct. - private FormField(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } - private FormField() { - nameDetectedLanguages_ = java.util.Collections.emptyList(); - valueDetectedLanguages_ = java.util.Collections.emptyList(); - valueType_ = ""; - correctedKeyText_ = ""; - correctedValueText_ = ""; + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue) } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new FormField(); - } + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue) + private static final com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue + DEFAULT_INSTANCE; - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_FormField_descriptor; + static { + DEFAULT_INSTANCE = + new com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue(); } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_FormField_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1beta2.Document.Page.FormField.class, - com.google.cloud.documentai.v1beta2.Document.Page.FormField.Builder.class); + public static com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue + getDefaultInstance() { + return DEFAULT_INSTANCE; } - public static final int FIELD_NAME_FIELD_NUMBER = 1; - private com.google.cloud.documentai.v1beta2.Document.Page.Layout fieldName_; - /** - * - * - *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField] name. e.g. `Address`, `Email`,
-       * `Grand total`, `Phone number`, etc.
-       * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout field_name = 1; - * - * @return Whether the fieldName field is set. - */ - @java.lang.Override - public boolean hasFieldName() { - return fieldName_ != null; - } - /** - * - * - *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField] name. e.g. `Address`, `Email`,
-       * `Grand total`, `Phone number`, etc.
-       * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout field_name = 1; - * - * @return The fieldName. - */ - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Layout getFieldName() { - return fieldName_ == null - ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() - : fieldName_; - } - /** - * - * - *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField] name. e.g. `Address`, `Email`,
-       * `Grand total`, `Phone number`, etc.
-       * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout field_name = 1; - */ - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder - getFieldNameOrBuilder() { - return fieldName_ == null - ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() - : fieldName_; - } + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NormalizedValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; - public static final int FIELD_VALUE_FIELD_NUMBER = 2; - private com.google.cloud.documentai.v1beta2.Document.Page.Layout fieldValue_; - /** - * - * - *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField] value.
-       * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout field_value = 2; - * - * @return Whether the fieldValue field is set. - */ - @java.lang.Override - public boolean hasFieldValue() { - return fieldValue_ != null; + public static com.google.protobuf.Parser parser() { + return PARSER; } - /** - * - * - *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField] value.
-       * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout field_value = 2; - * - * @return The fieldValue. - */ + @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Layout getFieldValue() { - return fieldValue_ == null - ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() - : fieldValue_; + public com.google.protobuf.Parser getParserForType() { + return PARSER; } - /** - * - * - *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField] value.
-       * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout field_value = 2; - */ + @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder - getFieldValueOrBuilder() { - return fieldValue_ == null - ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() - : fieldValue_; + public com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } + } - public static final int NAME_DETECTED_LANGUAGES_FIELD_NUMBER = 3; + public static final int TEXT_ANCHOR_FIELD_NUMBER = 1; + private com.google.cloud.documentai.v1beta2.Document.TextAnchor textAnchor_; + /** + * + * + *
+     * Optional. Provenance of the entity.
+     * Text anchor indexing into the
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the textAnchor field is set. + */ + @java.lang.Override + public boolean hasTextAnchor() { + return textAnchor_ != null; + } + /** + * + * + *
+     * Optional. Provenance of the entity.
+     * Text anchor indexing into the
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The textAnchor. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.TextAnchor getTextAnchor() { + return textAnchor_ == null + ? com.google.cloud.documentai.v1beta2.Document.TextAnchor.getDefaultInstance() + : textAnchor_; + } + /** + * + * + *
+     * Optional. Provenance of the entity.
+     * Text anchor indexing into the
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.TextAnchorOrBuilder + getTextAnchorOrBuilder() { + return textAnchor_ == null + ? com.google.cloud.documentai.v1beta2.Document.TextAnchor.getDefaultInstance() + : textAnchor_; + } - @SuppressWarnings("serial") - private java.util.List - nameDetectedLanguages_; - /** - * - * - *
-       * A list of detected languages for name together with confidence.
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; - * - */ - @java.lang.Override - public java.util.List - getNameDetectedLanguagesList() { - return nameDetectedLanguages_; - } - /** - * - * - *
-       * A list of detected languages for name together with confidence.
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; - * - */ - @java.lang.Override - public java.util.List< - ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> - getNameDetectedLanguagesOrBuilderList() { - return nameDetectedLanguages_; - } - /** - * - * - *
-       * A list of detected languages for name together with confidence.
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; - * - */ - @java.lang.Override - public int getNameDetectedLanguagesCount() { - return nameDetectedLanguages_.size(); - } - /** - * - * - *
-       * A list of detected languages for name together with confidence.
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; - * - */ - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage - getNameDetectedLanguages(int index) { - return nameDetectedLanguages_.get(index); + public static final int TYPE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object type_ = ""; + /** + * + * + *
+     * Required. Entity type from a schema e.g. `Address`.
+     * 
+ * + * string type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + 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(); + type_ = s; + return s; } - /** - * - * - *
-       * A list of detected languages for name together with confidence.
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; - * - */ - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder - getNameDetectedLanguagesOrBuilder(int index) { - return nameDetectedLanguages_.get(index); + } + /** + * + * + *
+     * Required. Entity type from a schema e.g. `Address`.
+     * 
+ * + * string type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } + } - public static final int VALUE_DETECTED_LANGUAGES_FIELD_NUMBER = 4; + public static final int MENTION_TEXT_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private java.util.List - valueDetectedLanguages_; - /** - * - * - *
-       * A list of detected languages for value together with confidence.
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; - * - */ - @java.lang.Override - public java.util.List - getValueDetectedLanguagesList() { - return valueDetectedLanguages_; - } - /** - * - * - *
-       * A list of detected languages for value together with confidence.
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; - * - */ - @java.lang.Override - public java.util.List< - ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> - getValueDetectedLanguagesOrBuilderList() { - return valueDetectedLanguages_; - } - /** - * - * - *
-       * A list of detected languages for value together with confidence.
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; - * - */ - @java.lang.Override - public int getValueDetectedLanguagesCount() { - return valueDetectedLanguages_.size(); - } - /** - * - * - *
-       * A list of detected languages for value together with confidence.
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; - * - */ - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage - getValueDetectedLanguages(int index) { - return valueDetectedLanguages_.get(index); - } - /** - * - * - *
-       * A list of detected languages for value together with confidence.
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; - * - */ - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder - getValueDetectedLanguagesOrBuilder(int index) { - return valueDetectedLanguages_.get(index); + @SuppressWarnings("serial") + private volatile java.lang.Object mentionText_ = ""; + /** + * + * + *
+     * Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.
+     * 
+ * + * string mention_text = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The mentionText. + */ + @java.lang.Override + public java.lang.String getMentionText() { + java.lang.Object ref = mentionText_; + 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(); + mentionText_ = s; + return s; + } + } + /** + * + * + *
+     * Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.
+     * 
+ * + * string mention_text = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for mentionText. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMentionTextBytes() { + java.lang.Object ref = mentionText_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mentionText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } + } - public static final int VALUE_TYPE_FIELD_NUMBER = 5; + public static final int MENTION_ID_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private volatile java.lang.Object valueType_ = ""; - /** - * - * - *
-       * If the value is non-textual, this field represents the type. Current
-       * valid values are:
-       * - blank (this indicates the field_value is normal text)
-       * - "unfilled_checkbox"
-       * - "filled_checkbox"
-       * 
- * - * string value_type = 5; - * - * @return The valueType. - */ - @java.lang.Override - public java.lang.String getValueType() { - java.lang.Object ref = valueType_; - 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(); - valueType_ = s; - return s; - } + @SuppressWarnings("serial") + private volatile java.lang.Object mentionId_ = ""; + /** + * + * + *
+     * Optional. Deprecated.  Use `id` field instead.
+     * 
+ * + * string mention_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The mentionId. + */ + @java.lang.Override + public java.lang.String getMentionId() { + java.lang.Object ref = mentionId_; + 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(); + mentionId_ = s; + return s; } - /** - * - * - *
-       * If the value is non-textual, this field represents the type. Current
-       * valid values are:
-       * - blank (this indicates the field_value is normal text)
-       * - "unfilled_checkbox"
-       * - "filled_checkbox"
-       * 
- * - * string value_type = 5; - * - * @return The bytes for valueType. - */ - @java.lang.Override - public com.google.protobuf.ByteString getValueTypeBytes() { - java.lang.Object ref = valueType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - valueType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + } + /** + * + * + *
+     * Optional. Deprecated.  Use `id` field instead.
+     * 
+ * + * string mention_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for mentionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMentionIdBytes() { + java.lang.Object ref = mentionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mentionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } + } - public static final int CORRECTED_KEY_TEXT_FIELD_NUMBER = 6; + public static final int CONFIDENCE_FIELD_NUMBER = 5; + private float confidence_ = 0F; + /** + * + * + *
+     * Optional. Confidence of detected Schema entity. Range `[0, 1]`.
+     * 
+ * + * float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } - @SuppressWarnings("serial") - private volatile java.lang.Object correctedKeyText_ = ""; - /** - * - * - *
-       * An internal field, created for Labeling UI to export key text.
-       * 
- * - * string corrected_key_text = 6; - * - * @return The correctedKeyText. - */ - @java.lang.Override - public java.lang.String getCorrectedKeyText() { - java.lang.Object ref = correctedKeyText_; - 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(); - correctedKeyText_ = s; - return s; - } - } - /** - * - * - *
-       * An internal field, created for Labeling UI to export key text.
-       * 
- * - * string corrected_key_text = 6; - * - * @return The bytes for correctedKeyText. - */ - @java.lang.Override - public com.google.protobuf.ByteString getCorrectedKeyTextBytes() { - java.lang.Object ref = correctedKeyText_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - correctedKeyText_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + public static final int PAGE_ANCHOR_FIELD_NUMBER = 6; + private com.google.cloud.documentai.v1beta2.Document.PageAnchor pageAnchor_; + /** + * + * + *
+     * Optional. Represents the provenance of this entity wrt. the location on
+     * the page where it was found.
+     * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.PageAnchor page_anchor = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the pageAnchor field is set. + */ + @java.lang.Override + public boolean hasPageAnchor() { + return pageAnchor_ != null; + } + /** + * + * + *
+     * Optional. Represents the provenance of this entity wrt. the location on
+     * the page where it was found.
+     * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.PageAnchor page_anchor = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The pageAnchor. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.PageAnchor getPageAnchor() { + return pageAnchor_ == null + ? com.google.cloud.documentai.v1beta2.Document.PageAnchor.getDefaultInstance() + : pageAnchor_; + } + /** + * + * + *
+     * Optional. Represents the provenance of this entity wrt. the location on
+     * the page where it was found.
+     * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.PageAnchor page_anchor = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.PageAnchorOrBuilder + getPageAnchorOrBuilder() { + return pageAnchor_ == null + ? com.google.cloud.documentai.v1beta2.Document.PageAnchor.getDefaultInstance() + : pageAnchor_; + } - public static final int CORRECTED_VALUE_TEXT_FIELD_NUMBER = 7; + public static final int ID_FIELD_NUMBER = 7; - @SuppressWarnings("serial") - private volatile java.lang.Object correctedValueText_ = ""; - /** - * - * - *
-       * An internal field, created for Labeling UI to export value text.
-       * 
- * - * string corrected_value_text = 7; - * - * @return The correctedValueText. - */ - @java.lang.Override - public java.lang.String getCorrectedValueText() { - java.lang.Object ref = correctedValueText_; - 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(); - correctedValueText_ = s; - return s; - } + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * + * + *
+     * Optional. Canonical id. This will be a unique value in the entity list
+     * for this document.
+     * 
+ * + * string id = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + 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(); + id_ = s; + return s; } - /** - * - * - *
-       * An internal field, created for Labeling UI to export value text.
-       * 
- * - * string corrected_value_text = 7; - * - * @return The bytes for correctedValueText. - */ - @java.lang.Override - public com.google.protobuf.ByteString getCorrectedValueTextBytes() { - java.lang.Object ref = correctedValueText_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - correctedValueText_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + } + /** + * + * + *
+     * Optional. Canonical id. This will be a unique value in the entity list
+     * for this document.
+     * 
+ * + * string id = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } + } - private byte memoizedIsInitialized = -1; + public static final int NORMALIZED_VALUE_FIELD_NUMBER = 9; + private com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue normalizedValue_; + /** + * + * + *
+     * Optional. Normalized entity value. Absent if the extracted value could
+     * not be converted or the type (e.g. address) is not supported for certain
+     * parsers. This field is also only populated for certain supported document
+     * types.
+     * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue normalized_value = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the normalizedValue field is set. + */ + @java.lang.Override + public boolean hasNormalizedValue() { + return normalizedValue_ != null; + } + /** + * + * + *
+     * Optional. Normalized entity value. Absent if the extracted value could
+     * not be converted or the type (e.g. address) is not supported for certain
+     * parsers. This field is also only populated for certain supported document
+     * types.
+     * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue normalized_value = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The normalizedValue. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue + getNormalizedValue() { + return normalizedValue_ == null + ? com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue.getDefaultInstance() + : normalizedValue_; + } + /** + * + * + *
+     * Optional. Normalized entity value. Absent if the extracted value could
+     * not be converted or the type (e.g. address) is not supported for certain
+     * parsers. This field is also only populated for certain supported document
+     * types.
+     * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue normalized_value = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValueOrBuilder + getNormalizedValueOrBuilder() { + return normalizedValue_ == null + ? com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue.getDefaultInstance() + : normalizedValue_; + } - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public static final int PROPERTIES_FIELD_NUMBER = 10; - memoizedIsInitialized = 1; - return true; - } + @SuppressWarnings("serial") + private java.util.List properties_; + /** + * + * + *
+     * Optional. Entities can be nested to form a hierarchical data structure
+     * representing the content in the document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Entity properties = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getPropertiesList() { + return properties_; + } + /** + * + * + *
+     * Optional. Entities can be nested to form a hierarchical data structure
+     * representing the content in the document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Entity properties = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getPropertiesOrBuilderList() { + return properties_; + } + /** + * + * + *
+     * Optional. Entities can be nested to form a hierarchical data structure
+     * representing the content in the document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Entity properties = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getPropertiesCount() { + return properties_.size(); + } + /** + * + * + *
+     * Optional. Entities can be nested to form a hierarchical data structure
+     * representing the content in the document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Entity properties = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Entity getProperties(int index) { + return properties_.get(index); + } + /** + * + * + *
+     * Optional. Entities can be nested to form a hierarchical data structure
+     * representing the content in the document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Entity properties = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.EntityOrBuilder getPropertiesOrBuilder( + int index) { + return properties_.get(index); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (fieldName_ != null) { - output.writeMessage(1, getFieldName()); - } - if (fieldValue_ != null) { - output.writeMessage(2, getFieldValue()); - } - for (int i = 0; i < nameDetectedLanguages_.size(); i++) { - output.writeMessage(3, nameDetectedLanguages_.get(i)); - } - for (int i = 0; i < valueDetectedLanguages_.size(); i++) { - output.writeMessage(4, valueDetectedLanguages_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(valueType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, valueType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(correctedKeyText_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, correctedKeyText_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(correctedValueText_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, correctedValueText_); - } - getUnknownFields().writeTo(output); - } + public static final int PROVENANCE_FIELD_NUMBER = 11; + private com.google.cloud.documentai.v1beta2.Document.Provenance provenance_; + /** + * + * + *
+     * Optional. The history of this annotation.
+     * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the provenance field is set. + */ + @java.lang.Override + public boolean hasProvenance() { + return provenance_ != null; + } + /** + * + * + *
+     * Optional. The history of this annotation.
+     * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The provenance. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Provenance getProvenance() { + return provenance_ == null + ? com.google.cloud.documentai.v1beta2.Document.Provenance.getDefaultInstance() + : provenance_; + } + /** + * + * + *
+     * Optional. The history of this annotation.
+     * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder + getProvenanceOrBuilder() { + return provenance_ == null + ? com.google.cloud.documentai.v1beta2.Document.Provenance.getDefaultInstance() + : provenance_; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + public static final int REDACTED_FIELD_NUMBER = 12; + private boolean redacted_ = false; + /** + * + * + *
+     * Optional. Whether the entity will be redacted for de-identification
+     * purposes.
+     * 
+ * + * bool redacted = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The redacted. + */ + @java.lang.Override + public boolean getRedacted() { + return redacted_; + } + + 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; + } - size = 0; - if (fieldName_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getFieldName()); - } - if (fieldValue_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getFieldValue()); - } - for (int i = 0; i < nameDetectedLanguages_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 3, nameDetectedLanguages_.get(i)); - } - for (int i = 0; i < valueDetectedLanguages_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 4, valueDetectedLanguages_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(valueType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, valueType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(correctedKeyText_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, correctedKeyText_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(correctedValueText_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, correctedValueText_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (textAnchor_ != null) { + output.writeMessage(1, getTextAnchor()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mentionText_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, mentionText_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mentionId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, mentionId_); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + output.writeFloat(5, confidence_); + } + if (pageAnchor_ != null) { + output.writeMessage(6, getPageAnchor()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, id_); + } + if (normalizedValue_ != null) { + output.writeMessage(9, getNormalizedValue()); + } + for (int i = 0; i < properties_.size(); i++) { + output.writeMessage(10, properties_.get(i)); + } + if (provenance_ != null) { + output.writeMessage(11, getProvenance()); + } + if (redacted_ != false) { + output.writeBool(12, redacted_); } + getUnknownFields().writeTo(output); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.documentai.v1beta2.Document.Page.FormField)) { - return super.equals(obj); - } - com.google.cloud.documentai.v1beta2.Document.Page.FormField other = - (com.google.cloud.documentai.v1beta2.Document.Page.FormField) obj; + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - if (hasFieldName() != other.hasFieldName()) return false; - if (hasFieldName()) { - if (!getFieldName().equals(other.getFieldName())) return false; - } - if (hasFieldValue() != other.hasFieldValue()) return false; - if (hasFieldValue()) { - if (!getFieldValue().equals(other.getFieldValue())) return false; - } - if (!getNameDetectedLanguagesList().equals(other.getNameDetectedLanguagesList())) - return false; - if (!getValueDetectedLanguagesList().equals(other.getValueDetectedLanguagesList())) - return false; - if (!getValueType().equals(other.getValueType())) return false; - if (!getCorrectedKeyText().equals(other.getCorrectedKeyText())) return false; - if (!getCorrectedValueText().equals(other.getCorrectedValueText())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; + size = 0; + if (textAnchor_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTextAnchor()); } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasFieldName()) { - hash = (37 * hash) + FIELD_NAME_FIELD_NUMBER; - hash = (53 * hash) + getFieldName().hashCode(); - } - if (hasFieldValue()) { - hash = (37 * hash) + FIELD_VALUE_FIELD_NUMBER; - hash = (53 * hash) + getFieldValue().hashCode(); - } - if (getNameDetectedLanguagesCount() > 0) { - hash = (37 * hash) + NAME_DETECTED_LANGUAGES_FIELD_NUMBER; - hash = (53 * hash) + getNameDetectedLanguagesList().hashCode(); - } - if (getValueDetectedLanguagesCount() > 0) { - hash = (37 * hash) + VALUE_DETECTED_LANGUAGES_FIELD_NUMBER; - hash = (53 * hash) + getValueDetectedLanguagesList().hashCode(); - } - hash = (37 * hash) + VALUE_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getValueType().hashCode(); - hash = (37 * hash) + CORRECTED_KEY_TEXT_FIELD_NUMBER; - hash = (53 * hash) + getCorrectedKeyText().hashCode(); - hash = (37 * hash) + CORRECTED_VALUE_TEXT_FIELD_NUMBER; - hash = (53 * hash) + getCorrectedValueText().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, type_); } - - public static com.google.cloud.documentai.v1beta2.Document.Page.FormField parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mentionText_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, mentionText_); } - - public static com.google.cloud.documentai.v1beta2.Document.Page.FormField parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mentionId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, mentionId_); } - - public static com.google.cloud.documentai.v1beta2.Document.Page.FormField parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(5, confidence_); } - - public static com.google.cloud.documentai.v1beta2.Document.Page.FormField parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + if (pageAnchor_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getPageAnchor()); } - - public static com.google.cloud.documentai.v1beta2.Document.Page.FormField parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, id_); } - - public static com.google.cloud.documentai.v1beta2.Document.Page.FormField parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + if (normalizedValue_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getNormalizedValue()); } - - public static com.google.cloud.documentai.v1beta2.Document.Page.FormField parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + for (int i = 0; i < properties_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, properties_.get(i)); } - - public static com.google.cloud.documentai.v1beta2.Document.Page.FormField parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + if (provenance_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getProvenance()); } - - public static com.google.cloud.documentai.v1beta2.Document.Page.FormField parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + if (redacted_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(12, redacted_); } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } - public static com.google.cloud.documentai.v1beta2.Document.Page.FormField parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; } - - public static com.google.cloud.documentai.v1beta2.Document.Page.FormField parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + if (!(obj instanceof com.google.cloud.documentai.v1beta2.Document.Entity)) { + return super.equals(obj); } + com.google.cloud.documentai.v1beta2.Document.Entity other = + (com.google.cloud.documentai.v1beta2.Document.Entity) obj; - public static com.google.cloud.documentai.v1beta2.Document.Page.FormField parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + if (hasTextAnchor() != other.hasTextAnchor()) return false; + if (hasTextAnchor()) { + if (!getTextAnchor().equals(other.getTextAnchor())) return false; } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); + if (!getType().equals(other.getType())) return false; + if (!getMentionText().equals(other.getMentionText())) return false; + if (!getMentionId().equals(other.getMentionId())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; + if (hasPageAnchor() != other.hasPageAnchor()) return false; + if (hasPageAnchor()) { + if (!getPageAnchor().equals(other.getPageAnchor())) return false; } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); + if (!getId().equals(other.getId())) return false; + if (hasNormalizedValue() != other.hasNormalizedValue()) return false; + if (hasNormalizedValue()) { + if (!getNormalizedValue().equals(other.getNormalizedValue())) return false; } - - public static Builder newBuilder( - com.google.cloud.documentai.v1beta2.Document.Page.FormField prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + if (!getPropertiesList().equals(other.getPropertiesList())) return false; + if (hasProvenance() != other.hasProvenance()) return false; + if (hasProvenance()) { + if (!getProvenance().equals(other.getProvenance())) return false; } + if (getRedacted() != other.getRedacted()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTextAnchor()) { + hash = (37 * hash) + TEXT_ANCHOR_FIELD_NUMBER; + hash = (53 * hash) + getTextAnchor().hashCode(); } - /** - * - * - *
-       * A form field detected on the page.
-       * 
- * - * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.FormField} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.Page.FormField) - com.google.cloud.documentai.v1beta2.Document.Page.FormFieldOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_FormField_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_FormField_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1beta2.Document.Page.FormField.class, - com.google.cloud.documentai.v1beta2.Document.Page.FormField.Builder.class); - } - - // Construct using com.google.cloud.documentai.v1beta2.Document.Page.FormField.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - fieldName_ = null; - if (fieldNameBuilder_ != null) { - fieldNameBuilder_.dispose(); - fieldNameBuilder_ = null; - } - fieldValue_ = null; - if (fieldValueBuilder_ != null) { - fieldValueBuilder_.dispose(); - fieldValueBuilder_ = null; - } - if (nameDetectedLanguagesBuilder_ == null) { - nameDetectedLanguages_ = java.util.Collections.emptyList(); - } else { - nameDetectedLanguages_ = null; - nameDetectedLanguagesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - if (valueDetectedLanguagesBuilder_ == null) { - valueDetectedLanguages_ = java.util.Collections.emptyList(); - } else { - valueDetectedLanguages_ = null; - valueDetectedLanguagesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - valueType_ = ""; - correctedKeyText_ = ""; - correctedValueText_ = ""; - return this; - } + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (37 * hash) + MENTION_TEXT_FIELD_NUMBER; + hash = (53 * hash) + getMentionText().hashCode(); + hash = (37 * hash) + MENTION_ID_FIELD_NUMBER; + hash = (53 * hash) + getMentionId().hashCode(); + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getConfidence()); + if (hasPageAnchor()) { + hash = (37 * hash) + PAGE_ANCHOR_FIELD_NUMBER; + hash = (53 * hash) + getPageAnchor().hashCode(); + } + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + if (hasNormalizedValue()) { + hash = (37 * hash) + NORMALIZED_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getNormalizedValue().hashCode(); + } + if (getPropertiesCount() > 0) { + hash = (37 * hash) + PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + getPropertiesList().hashCode(); + } + if (hasProvenance()) { + hash = (37 * hash) + PROVENANCE_FIELD_NUMBER; + hash = (53 * hash) + getProvenance().hashCode(); + } + hash = (37 * hash) + REDACTED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRedacted()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_FormField_descriptor; - } + public static com.google.cloud.documentai.v1beta2.Document.Entity parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.FormField - getDefaultInstanceForType() { - return com.google.cloud.documentai.v1beta2.Document.Page.FormField.getDefaultInstance(); - } + public static com.google.cloud.documentai.v1beta2.Document.Entity parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.FormField build() { - com.google.cloud.documentai.v1beta2.Document.Page.FormField result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } + public static com.google.cloud.documentai.v1beta2.Document.Entity parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.FormField buildPartial() { - com.google.cloud.documentai.v1beta2.Document.Page.FormField result = - new com.google.cloud.documentai.v1beta2.Document.Page.FormField(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } + public static com.google.cloud.documentai.v1beta2.Document.Entity parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - private void buildPartialRepeatedFields( - com.google.cloud.documentai.v1beta2.Document.Page.FormField result) { - if (nameDetectedLanguagesBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - nameDetectedLanguages_ = - java.util.Collections.unmodifiableList(nameDetectedLanguages_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.nameDetectedLanguages_ = nameDetectedLanguages_; - } else { - result.nameDetectedLanguages_ = nameDetectedLanguagesBuilder_.build(); - } - if (valueDetectedLanguagesBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - valueDetectedLanguages_ = - java.util.Collections.unmodifiableList(valueDetectedLanguages_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.valueDetectedLanguages_ = valueDetectedLanguages_; - } else { - result.valueDetectedLanguages_ = valueDetectedLanguagesBuilder_.build(); - } - } + public static com.google.cloud.documentai.v1beta2.Document.Entity parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - private void buildPartial0( - com.google.cloud.documentai.v1beta2.Document.Page.FormField result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.fieldName_ = fieldNameBuilder_ == null ? fieldName_ : fieldNameBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.fieldValue_ = - fieldValueBuilder_ == null ? fieldValue_ : fieldValueBuilder_.build(); - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.valueType_ = valueType_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.correctedKeyText_ = correctedKeyText_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.correctedValueText_ = correctedValueText_; - } - } + public static com.google.cloud.documentai.v1beta2.Document.Entity parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public Builder clone() { - return super.clone(); - } + public static com.google.cloud.documentai.v1beta2.Document.Entity parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } + public static com.google.cloud.documentai.v1beta2.Document.Entity parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } + public static com.google.cloud.documentai.v1beta2.Document.Entity parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } + public static com.google.cloud.documentai.v1beta2.Document.Entity parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } + public static com.google.cloud.documentai.v1beta2.Document.Entity parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } + public static com.google.cloud.documentai.v1beta2.Document.Entity 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 mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.documentai.v1beta2.Document.Page.FormField) { - return mergeFrom((com.google.cloud.documentai.v1beta2.Document.Page.FormField) other); - } else { - super.mergeFrom(other); - return this; - } - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - public Builder mergeFrom( - com.google.cloud.documentai.v1beta2.Document.Page.FormField other) { - if (other - == com.google.cloud.documentai.v1beta2.Document.Page.FormField.getDefaultInstance()) - return this; - if (other.hasFieldName()) { - mergeFieldName(other.getFieldName()); - } - if (other.hasFieldValue()) { - mergeFieldValue(other.getFieldValue()); - } - if (nameDetectedLanguagesBuilder_ == null) { - if (!other.nameDetectedLanguages_.isEmpty()) { - if (nameDetectedLanguages_.isEmpty()) { - nameDetectedLanguages_ = other.nameDetectedLanguages_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureNameDetectedLanguagesIsMutable(); - nameDetectedLanguages_.addAll(other.nameDetectedLanguages_); - } - onChanged(); - } - } else { - if (!other.nameDetectedLanguages_.isEmpty()) { - if (nameDetectedLanguagesBuilder_.isEmpty()) { - nameDetectedLanguagesBuilder_.dispose(); - nameDetectedLanguagesBuilder_ = null; - nameDetectedLanguages_ = other.nameDetectedLanguages_; - bitField0_ = (bitField0_ & ~0x00000004); - nameDetectedLanguagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getNameDetectedLanguagesFieldBuilder() - : null; - } else { - nameDetectedLanguagesBuilder_.addAllMessages(other.nameDetectedLanguages_); - } - } - } - if (valueDetectedLanguagesBuilder_ == null) { - if (!other.valueDetectedLanguages_.isEmpty()) { - if (valueDetectedLanguages_.isEmpty()) { - valueDetectedLanguages_ = other.valueDetectedLanguages_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureValueDetectedLanguagesIsMutable(); - valueDetectedLanguages_.addAll(other.valueDetectedLanguages_); - } - onChanged(); - } - } else { - if (!other.valueDetectedLanguages_.isEmpty()) { - if (valueDetectedLanguagesBuilder_.isEmpty()) { - valueDetectedLanguagesBuilder_.dispose(); - valueDetectedLanguagesBuilder_ = null; - valueDetectedLanguages_ = other.valueDetectedLanguages_; - bitField0_ = (bitField0_ & ~0x00000008); - valueDetectedLanguagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getValueDetectedLanguagesFieldBuilder() - : null; - } else { - valueDetectedLanguagesBuilder_.addAllMessages(other.valueDetectedLanguages_); - } - } - } - if (!other.getValueType().isEmpty()) { - valueType_ = other.valueType_; - bitField0_ |= 0x00000010; - onChanged(); - } - if (!other.getCorrectedKeyText().isEmpty()) { - correctedKeyText_ = other.correctedKeyText_; - bitField0_ |= 0x00000020; - onChanged(); - } - if (!other.getCorrectedValueText().isEmpty()) { - correctedValueText_ = other.correctedValueText_; - bitField0_ |= 0x00000040; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - @java.lang.Override - public final boolean isInitialized() { - return true; - } + public static Builder newBuilder( + com.google.cloud.documentai.v1beta2.Document.Entity prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getFieldNameFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage(getFieldValueFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage m = - input.readMessage( - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage - .parser(), - extensionRegistry); - if (nameDetectedLanguagesBuilder_ == null) { - ensureNameDetectedLanguagesIsMutable(); - nameDetectedLanguages_.add(m); - } else { - nameDetectedLanguagesBuilder_.addMessage(m); - } - break; - } // case 26 - case 34: - { - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage m = - input.readMessage( - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage - .parser(), - extensionRegistry); - if (valueDetectedLanguagesBuilder_ == null) { - ensureValueDetectedLanguagesIsMutable(); - valueDetectedLanguages_.add(m); - } else { - valueDetectedLanguagesBuilder_.addMessage(m); - } - break; - } // case 34 - case 42: - { - valueType_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 42 - case 50: - { - correctedKeyText_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - break; - } // case 50 - case 58: - { - correctedValueText_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - break; - } // case 58 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - private int bitField0_; + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * An entity that could be a phrase in the text or a property that belongs to
+     * the document. It is a known entity type, such as a person, an organization,
+     * or location.
+     * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Entity} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.Entity) + com.google.cloud.documentai.v1beta2.Document.EntityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Entity_descriptor; + } - private com.google.cloud.documentai.v1beta2.Document.Page.Layout fieldName_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Layout, - com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder> - fieldNameBuilder_; - /** - * - * - *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField] name. e.g. `Address`, `Email`,
-         * `Grand total`, `Phone number`, etc.
-         * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout field_name = 1; - * - * @return Whether the fieldName field is set. - */ - public boolean hasFieldName() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField] name. e.g. `Address`, `Email`,
-         * `Grand total`, `Phone number`, etc.
-         * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout field_name = 1; - * - * @return The fieldName. - */ - public com.google.cloud.documentai.v1beta2.Document.Page.Layout getFieldName() { - if (fieldNameBuilder_ == null) { - return fieldName_ == null - ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() - : fieldName_; - } else { - return fieldNameBuilder_.getMessage(); - } - } - /** - * - * - *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField] name. e.g. `Address`, `Email`,
-         * `Grand total`, `Phone number`, etc.
-         * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout field_name = 1; - */ - public Builder setFieldName( - com.google.cloud.documentai.v1beta2.Document.Page.Layout value) { - if (fieldNameBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - fieldName_ = value; - } else { - fieldNameBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField] name. e.g. `Address`, `Email`,
-         * `Grand total`, `Phone number`, etc.
-         * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout field_name = 1; - */ - public Builder setFieldName( - com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder builderForValue) { - if (fieldNameBuilder_ == null) { - fieldName_ = builderForValue.build(); - } else { - fieldNameBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField] name. e.g. `Address`, `Email`,
-         * `Grand total`, `Phone number`, etc.
-         * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout field_name = 1; - */ - public Builder mergeFieldName( - com.google.cloud.documentai.v1beta2.Document.Page.Layout value) { - if (fieldNameBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && fieldName_ != null - && fieldName_ - != com.google.cloud.documentai.v1beta2.Document.Page.Layout - .getDefaultInstance()) { - getFieldNameBuilder().mergeFrom(value); - } else { - fieldName_ = value; - } - } else { - fieldNameBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField] name. e.g. `Address`, `Email`,
-         * `Grand total`, `Phone number`, etc.
-         * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout field_name = 1; - */ - public Builder clearFieldName() { - bitField0_ = (bitField0_ & ~0x00000001); - fieldName_ = null; - if (fieldNameBuilder_ != null) { - fieldNameBuilder_.dispose(); - fieldNameBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField] name. e.g. `Address`, `Email`,
-         * `Grand total`, `Phone number`, etc.
-         * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout field_name = 1; - */ - public com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder - getFieldNameBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getFieldNameFieldBuilder().getBuilder(); - } - /** - * - * - *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField] name. e.g. `Address`, `Email`,
-         * `Grand total`, `Phone number`, etc.
-         * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout field_name = 1; - */ - public com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder - getFieldNameOrBuilder() { - if (fieldNameBuilder_ != null) { - return fieldNameBuilder_.getMessageOrBuilder(); - } else { - return fieldName_ == null - ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() - : fieldName_; - } - } - /** - * - * - *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField] name. e.g. `Address`, `Email`,
-         * `Grand total`, `Phone number`, etc.
-         * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout field_name = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Layout, - com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder> - getFieldNameFieldBuilder() { - if (fieldNameBuilder_ == null) { - fieldNameBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Layout, - com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder>( - getFieldName(), getParentForChildren(), isClean()); - fieldName_ = null; - } - return fieldNameBuilder_; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Entity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Document.Entity.class, + com.google.cloud.documentai.v1beta2.Document.Entity.Builder.class); + } - private com.google.cloud.documentai.v1beta2.Document.Page.Layout fieldValue_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Layout, - com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder> - fieldValueBuilder_; - /** - * - * - *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField] value.
-         * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout field_value = 2; - * - * @return Whether the fieldValue field is set. - */ - public boolean hasFieldValue() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField] value.
-         * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout field_value = 2; - * - * @return The fieldValue. - */ - public com.google.cloud.documentai.v1beta2.Document.Page.Layout getFieldValue() { - if (fieldValueBuilder_ == null) { - return fieldValue_ == null - ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() - : fieldValue_; - } else { - return fieldValueBuilder_.getMessage(); - } - } - /** - * - * - *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField] value.
-         * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout field_value = 2; - */ - public Builder setFieldValue( - com.google.cloud.documentai.v1beta2.Document.Page.Layout value) { - if (fieldValueBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - fieldValue_ = value; - } else { - fieldValueBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField] value.
-         * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout field_value = 2; - */ - public Builder setFieldValue( - com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder builderForValue) { - if (fieldValueBuilder_ == null) { - fieldValue_ = builderForValue.build(); - } else { - fieldValueBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField] value.
-         * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout field_value = 2; - */ - public Builder mergeFieldValue( - com.google.cloud.documentai.v1beta2.Document.Page.Layout value) { - if (fieldValueBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && fieldValue_ != null - && fieldValue_ - != com.google.cloud.documentai.v1beta2.Document.Page.Layout - .getDefaultInstance()) { - getFieldValueBuilder().mergeFrom(value); - } else { - fieldValue_ = value; - } - } else { - fieldValueBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; + // Construct using com.google.cloud.documentai.v1beta2.Document.Entity.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + textAnchor_ = null; + if (textAnchorBuilder_ != null) { + textAnchorBuilder_.dispose(); + textAnchorBuilder_ = null; } - /** - * - * - *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField] value.
-         * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout field_value = 2; - */ - public Builder clearFieldValue() { - bitField0_ = (bitField0_ & ~0x00000002); - fieldValue_ = null; - if (fieldValueBuilder_ != null) { - fieldValueBuilder_.dispose(); - fieldValueBuilder_ = null; - } - onChanged(); - return this; + type_ = ""; + mentionText_ = ""; + mentionId_ = ""; + confidence_ = 0F; + pageAnchor_ = null; + if (pageAnchorBuilder_ != null) { + pageAnchorBuilder_.dispose(); + pageAnchorBuilder_ = null; } - /** - * - * - *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField] value.
-         * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout field_value = 2; - */ - public com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder - getFieldValueBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getFieldValueFieldBuilder().getBuilder(); + id_ = ""; + normalizedValue_ = null; + if (normalizedValueBuilder_ != null) { + normalizedValueBuilder_.dispose(); + normalizedValueBuilder_ = null; } - /** - * - * - *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField] value.
-         * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout field_value = 2; - */ - public com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder - getFieldValueOrBuilder() { - if (fieldValueBuilder_ != null) { - return fieldValueBuilder_.getMessageOrBuilder(); - } else { - return fieldValue_ == null - ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() - : fieldValue_; - } + if (propertiesBuilder_ == null) { + properties_ = java.util.Collections.emptyList(); + } else { + properties_ = null; + propertiesBuilder_.clear(); } - /** - * - * - *
-         * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField] value.
-         * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout field_value = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Layout, - com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder> - getFieldValueFieldBuilder() { - if (fieldValueBuilder_ == null) { - fieldValueBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Layout, - com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder>( - getFieldValue(), getParentForChildren(), isClean()); - fieldValue_ = null; - } - return fieldValueBuilder_; + bitField0_ = (bitField0_ & ~0x00000100); + provenance_ = null; + if (provenanceBuilder_ != null) { + provenanceBuilder_.dispose(); + provenanceBuilder_ = null; } + redacted_ = false; + return this; + } - private java.util.List - nameDetectedLanguages_ = java.util.Collections.emptyList(); + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Entity_descriptor; + } - private void ensureNameDetectedLanguagesIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - nameDetectedLanguages_ = - new java.util.ArrayList< - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage>( - nameDetectedLanguages_); - bitField0_ |= 0x00000004; - } + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Entity getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta2.Document.Entity.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Entity build() { + com.google.cloud.documentai.v1beta2.Document.Entity result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); } + return result; + } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> - nameDetectedLanguagesBuilder_; + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Entity buildPartial() { + com.google.cloud.documentai.v1beta2.Document.Entity result = + new com.google.cloud.documentai.v1beta2.Document.Entity(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } - /** - * - * - *
-         * A list of detected languages for name together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; - * - */ - public java.util.List - getNameDetectedLanguagesList() { - if (nameDetectedLanguagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(nameDetectedLanguages_); - } else { - return nameDetectedLanguagesBuilder_.getMessageList(); + private void buildPartialRepeatedFields( + com.google.cloud.documentai.v1beta2.Document.Entity result) { + if (propertiesBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0)) { + properties_ = java.util.Collections.unmodifiableList(properties_); + bitField0_ = (bitField0_ & ~0x00000100); } + result.properties_ = properties_; + } else { + result.properties_ = propertiesBuilder_.build(); } - /** - * - * - *
-         * A list of detected languages for name together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; - * - */ - public int getNameDetectedLanguagesCount() { - if (nameDetectedLanguagesBuilder_ == null) { - return nameDetectedLanguages_.size(); - } else { - return nameDetectedLanguagesBuilder_.getCount(); - } + } + + private void buildPartial0(com.google.cloud.documentai.v1beta2.Document.Entity result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.textAnchor_ = + textAnchorBuilder_ == null ? textAnchor_ : textAnchorBuilder_.build(); } - /** - * - * - *
-         * A list of detected languages for name together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; - * - */ - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage - getNameDetectedLanguages(int index) { - if (nameDetectedLanguagesBuilder_ == null) { - return nameDetectedLanguages_.get(index); - } else { - return nameDetectedLanguagesBuilder_.getMessage(index); - } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.type_ = type_; } - /** - * - * - *
-         * A list of detected languages for name together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; - * - */ - public Builder setNameDetectedLanguages( - int index, com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { - if (nameDetectedLanguagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNameDetectedLanguagesIsMutable(); - nameDetectedLanguages_.set(index, value); - onChanged(); - } else { - nameDetectedLanguagesBuilder_.setMessage(index, value); - } - return this; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.mentionText_ = mentionText_; } - /** - * - * - *
-         * A list of detected languages for name together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; - * - */ - public Builder setNameDetectedLanguages( - int index, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder - builderForValue) { - if (nameDetectedLanguagesBuilder_ == null) { - ensureNameDetectedLanguagesIsMutable(); - nameDetectedLanguages_.set(index, builderForValue.build()); - onChanged(); - } else { - nameDetectedLanguagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.mentionId_ = mentionId_; } - /** - * - * - *
-         * A list of detected languages for name together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; - * - */ - public Builder addNameDetectedLanguages( - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { - if (nameDetectedLanguagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNameDetectedLanguagesIsMutable(); - nameDetectedLanguages_.add(value); - onChanged(); - } else { - nameDetectedLanguagesBuilder_.addMessage(value); - } - return this; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.confidence_ = confidence_; } - /** - * - * - *
-         * A list of detected languages for name together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; - * - */ - public Builder addNameDetectedLanguages( - int index, com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { - if (nameDetectedLanguagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNameDetectedLanguagesIsMutable(); - nameDetectedLanguages_.add(index, value); - onChanged(); - } else { - nameDetectedLanguagesBuilder_.addMessage(index, value); - } - return this; + if (((from_bitField0_ & 0x00000020) != 0)) { + result.pageAnchor_ = + pageAnchorBuilder_ == null ? pageAnchor_ : pageAnchorBuilder_.build(); } - /** - * - * - *
-         * A list of detected languages for name together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; - * - */ - public Builder addNameDetectedLanguages( - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder - builderForValue) { - if (nameDetectedLanguagesBuilder_ == null) { - ensureNameDetectedLanguagesIsMutable(); - nameDetectedLanguages_.add(builderForValue.build()); - onChanged(); - } else { - nameDetectedLanguagesBuilder_.addMessage(builderForValue.build()); - } - return this; + if (((from_bitField0_ & 0x00000040) != 0)) { + result.id_ = id_; } - /** - * - * - *
-         * A list of detected languages for name together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; - * - */ - public Builder addNameDetectedLanguages( - int index, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder - builderForValue) { - if (nameDetectedLanguagesBuilder_ == null) { - ensureNameDetectedLanguagesIsMutable(); - nameDetectedLanguages_.add(index, builderForValue.build()); - onChanged(); - } else { - nameDetectedLanguagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; + if (((from_bitField0_ & 0x00000080) != 0)) { + result.normalizedValue_ = + normalizedValueBuilder_ == null ? normalizedValue_ : normalizedValueBuilder_.build(); } - /** - * - * - *
-         * A list of detected languages for name together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; - * - */ - public Builder addAllNameDetectedLanguages( - java.lang.Iterable< - ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage> - values) { - if (nameDetectedLanguagesBuilder_ == null) { - ensureNameDetectedLanguagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, nameDetectedLanguages_); - onChanged(); - } else { - nameDetectedLanguagesBuilder_.addAllMessages(values); - } - return this; + if (((from_bitField0_ & 0x00000200) != 0)) { + result.provenance_ = + provenanceBuilder_ == null ? provenance_ : provenanceBuilder_.build(); } - /** - * - * - *
-         * A list of detected languages for name together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; - * - */ - public Builder clearNameDetectedLanguages() { - if (nameDetectedLanguagesBuilder_ == null) { - nameDetectedLanguages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - nameDetectedLanguagesBuilder_.clear(); - } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.redacted_ = redacted_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta2.Document.Entity) { + return mergeFrom((com.google.cloud.documentai.v1beta2.Document.Entity) other); + } else { + super.mergeFrom(other); return this; } - /** - * - * - *
-         * A list of detected languages for name together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; - * - */ - public Builder removeNameDetectedLanguages(int index) { - if (nameDetectedLanguagesBuilder_ == null) { - ensureNameDetectedLanguagesIsMutable(); - nameDetectedLanguages_.remove(index); - onChanged(); - } else { - nameDetectedLanguagesBuilder_.remove(index); - } + } + + public Builder mergeFrom(com.google.cloud.documentai.v1beta2.Document.Entity other) { + if (other == com.google.cloud.documentai.v1beta2.Document.Entity.getDefaultInstance()) return this; + if (other.hasTextAnchor()) { + mergeTextAnchor(other.getTextAnchor()); } - /** - * - * - *
-         * A list of detected languages for name together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; - * - */ - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder - getNameDetectedLanguagesBuilder(int index) { - return getNameDetectedLanguagesFieldBuilder().getBuilder(index); + if (!other.getType().isEmpty()) { + type_ = other.type_; + bitField0_ |= 0x00000002; + onChanged(); } - /** - * - * - *
-         * A list of detected languages for name together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; - * - */ - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder - getNameDetectedLanguagesOrBuilder(int index) { - if (nameDetectedLanguagesBuilder_ == null) { - return nameDetectedLanguages_.get(index); - } else { - return nameDetectedLanguagesBuilder_.getMessageOrBuilder(index); - } + if (!other.getMentionText().isEmpty()) { + mentionText_ = other.mentionText_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getMentionId().isEmpty()) { + mentionId_ = other.mentionId_; + bitField0_ |= 0x00000008; + onChanged(); } - /** - * - * - *
-         * A list of detected languages for name together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; - * - */ - public java.util.List< - ? extends - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> - getNameDetectedLanguagesOrBuilderList() { - if (nameDetectedLanguagesBuilder_ != null) { - return nameDetectedLanguagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(nameDetectedLanguages_); - } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); } - /** - * - * - *
-         * A list of detected languages for name together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; - * - */ - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder - addNameDetectedLanguagesBuilder() { - return getNameDetectedLanguagesFieldBuilder() - .addBuilder( - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage - .getDefaultInstance()); + if (other.hasPageAnchor()) { + mergePageAnchor(other.getPageAnchor()); } - /** - * - * - *
-         * A list of detected languages for name together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; - * - */ - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder - addNameDetectedLanguagesBuilder(int index) { - return getNameDetectedLanguagesFieldBuilder() - .addBuilder( - index, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage - .getDefaultInstance()); + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000040; + onChanged(); } - /** - * - * - *
-         * A list of detected languages for name together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage name_detected_languages = 3; - * - */ - public java.util.List< - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder> - getNameDetectedLanguagesBuilderList() { - return getNameDetectedLanguagesFieldBuilder().getBuilderList(); + if (other.hasNormalizedValue()) { + mergeNormalizedValue(other.getNormalizedValue()); } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> - getNameDetectedLanguagesFieldBuilder() { - if (nameDetectedLanguagesBuilder_ == null) { - nameDetectedLanguagesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder>( - nameDetectedLanguages_, - ((bitField0_ & 0x00000004) != 0), - getParentForChildren(), - isClean()); - nameDetectedLanguages_ = null; + if (propertiesBuilder_ == null) { + if (!other.properties_.isEmpty()) { + if (properties_.isEmpty()) { + properties_ = other.properties_; + bitField0_ = (bitField0_ & ~0x00000100); + } else { + ensurePropertiesIsMutable(); + properties_.addAll(other.properties_); + } + onChanged(); + } + } else { + if (!other.properties_.isEmpty()) { + if (propertiesBuilder_.isEmpty()) { + propertiesBuilder_.dispose(); + propertiesBuilder_ = null; + properties_ = other.properties_; + bitField0_ = (bitField0_ & ~0x00000100); + propertiesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPropertiesFieldBuilder() + : null; + } else { + propertiesBuilder_.addAllMessages(other.properties_); + } } - return nameDetectedLanguagesBuilder_; } + if (other.hasProvenance()) { + mergeProvenance(other.getProvenance()); + } + if (other.getRedacted() != false) { + setRedacted(other.getRedacted()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } - private java.util.List - valueDetectedLanguages_ = java.util.Collections.emptyList(); + @java.lang.Override + public final boolean isInitialized() { + return true; + } - private void ensureValueDetectedLanguagesIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - valueDetectedLanguages_ = - new java.util.ArrayList< - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage>( - valueDetectedLanguages_); - bitField0_ |= 0x00000008; - } + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getTextAnchorFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + mentionText_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + mentionId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 45: + { + confidence_ = input.readFloat(); + bitField0_ |= 0x00000010; + break; + } // case 45 + case 50: + { + input.readMessage(getPageAnchorFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 74: + { + input.readMessage( + getNormalizedValueFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 74 + case 82: + { + com.google.cloud.documentai.v1beta2.Document.Entity m = + input.readMessage( + com.google.cloud.documentai.v1beta2.Document.Entity.parser(), + extensionRegistry); + if (propertiesBuilder_ == null) { + ensurePropertiesIsMutable(); + properties_.add(m); + } else { + propertiesBuilder_.addMessage(m); + } + break; + } // case 82 + case 90: + { + input.readMessage(getProvenanceFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 90 + case 96: + { + redacted_ = input.readBool(); + bitField0_ |= 0x00000400; + break; + } // case 96 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> - valueDetectedLanguagesBuilder_; + private int bitField0_; - /** - * - * - *
-         * A list of detected languages for value together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; - * - */ - public java.util.List - getValueDetectedLanguagesList() { - if (valueDetectedLanguagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(valueDetectedLanguages_); - } else { - return valueDetectedLanguagesBuilder_.getMessageList(); - } + private com.google.cloud.documentai.v1beta2.Document.TextAnchor textAnchor_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.TextAnchor, + com.google.cloud.documentai.v1beta2.Document.TextAnchor.Builder, + com.google.cloud.documentai.v1beta2.Document.TextAnchorOrBuilder> + textAnchorBuilder_; + /** + * + * + *
+       * Optional. Provenance of the entity.
+       * Text anchor indexing into the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the textAnchor field is set. + */ + public boolean hasTextAnchor() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * Optional. Provenance of the entity.
+       * Text anchor indexing into the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The textAnchor. + */ + public com.google.cloud.documentai.v1beta2.Document.TextAnchor getTextAnchor() { + if (textAnchorBuilder_ == null) { + return textAnchor_ == null + ? com.google.cloud.documentai.v1beta2.Document.TextAnchor.getDefaultInstance() + : textAnchor_; + } else { + return textAnchorBuilder_.getMessage(); } - /** - * - * - *
-         * A list of detected languages for value together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; - * - */ - public int getValueDetectedLanguagesCount() { - if (valueDetectedLanguagesBuilder_ == null) { - return valueDetectedLanguages_.size(); - } else { - return valueDetectedLanguagesBuilder_.getCount(); + } + /** + * + * + *
+       * Optional. Provenance of the entity.
+       * Text anchor indexing into the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setTextAnchor(com.google.cloud.documentai.v1beta2.Document.TextAnchor value) { + if (textAnchorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } + textAnchor_ = value; + } else { + textAnchorBuilder_.setMessage(value); } - /** - * - * - *
-         * A list of detected languages for value together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; - * - */ - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage - getValueDetectedLanguages(int index) { - if (valueDetectedLanguagesBuilder_ == null) { - return valueDetectedLanguages_.get(index); - } else { - return valueDetectedLanguagesBuilder_.getMessage(index); - } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Provenance of the entity.
+       * Text anchor indexing into the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setTextAnchor( + com.google.cloud.documentai.v1beta2.Document.TextAnchor.Builder builderForValue) { + if (textAnchorBuilder_ == null) { + textAnchor_ = builderForValue.build(); + } else { + textAnchorBuilder_.setMessage(builderForValue.build()); } - /** - * - * - *
-         * A list of detected languages for value together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; - * - */ - public Builder setValueDetectedLanguages( - int index, com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { - if (valueDetectedLanguagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureValueDetectedLanguagesIsMutable(); - valueDetectedLanguages_.set(index, value); - onChanged(); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Provenance of the entity.
+       * Text anchor indexing into the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeTextAnchor( + com.google.cloud.documentai.v1beta2.Document.TextAnchor value) { + if (textAnchorBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && textAnchor_ != null + && textAnchor_ + != com.google.cloud.documentai.v1beta2.Document.TextAnchor.getDefaultInstance()) { + getTextAnchorBuilder().mergeFrom(value); } else { - valueDetectedLanguagesBuilder_.setMessage(index, value); + textAnchor_ = value; } - return this; + } else { + textAnchorBuilder_.mergeFrom(value); } - /** - * - * - *
-         * A list of detected languages for value together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; - * - */ - public Builder setValueDetectedLanguages( - int index, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder - builderForValue) { - if (valueDetectedLanguagesBuilder_ == null) { - ensureValueDetectedLanguagesIsMutable(); - valueDetectedLanguages_.set(index, builderForValue.build()); - onChanged(); - } else { - valueDetectedLanguagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Provenance of the entity.
+       * Text anchor indexing into the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearTextAnchor() { + bitField0_ = (bitField0_ & ~0x00000001); + textAnchor_ = null; + if (textAnchorBuilder_ != null) { + textAnchorBuilder_.dispose(); + textAnchorBuilder_ = null; } - /** - * - * - *
-         * A list of detected languages for value together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; - * - */ - public Builder addValueDetectedLanguages( - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { - if (valueDetectedLanguagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureValueDetectedLanguagesIsMutable(); - valueDetectedLanguages_.add(value); - onChanged(); - } else { - valueDetectedLanguagesBuilder_.addMessage(value); - } - return this; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Provenance of the entity.
+       * Text anchor indexing into the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.documentai.v1beta2.Document.TextAnchor.Builder + getTextAnchorBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getTextAnchorFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Optional. Provenance of the entity.
+       * Text anchor indexing into the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.documentai.v1beta2.Document.TextAnchorOrBuilder + getTextAnchorOrBuilder() { + if (textAnchorBuilder_ != null) { + return textAnchorBuilder_.getMessageOrBuilder(); + } else { + return textAnchor_ == null + ? com.google.cloud.documentai.v1beta2.Document.TextAnchor.getDefaultInstance() + : textAnchor_; + } + } + /** + * + * + *
+       * Optional. Provenance of the entity.
+       * Text anchor indexing into the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.TextAnchor, + com.google.cloud.documentai.v1beta2.Document.TextAnchor.Builder, + com.google.cloud.documentai.v1beta2.Document.TextAnchorOrBuilder> + getTextAnchorFieldBuilder() { + if (textAnchorBuilder_ == null) { + textAnchorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.TextAnchor, + com.google.cloud.documentai.v1beta2.Document.TextAnchor.Builder, + com.google.cloud.documentai.v1beta2.Document.TextAnchorOrBuilder>( + getTextAnchor(), getParentForChildren(), isClean()); + textAnchor_ = null; } - /** - * - * - *
-         * A list of detected languages for value together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; - * - */ - public Builder addValueDetectedLanguages( - int index, com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { - if (valueDetectedLanguagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureValueDetectedLanguagesIsMutable(); - valueDetectedLanguages_.add(index, value); - onChanged(); - } else { - valueDetectedLanguagesBuilder_.addMessage(index, value); - } - return this; + return textAnchorBuilder_; + } + + private java.lang.Object type_ = ""; + /** + * + * + *
+       * Required. Entity type from a schema e.g. `Address`.
+       * 
+ * + * string type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; } - /** - * - * - *
-         * A list of detected languages for value together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; - * - */ - public Builder addValueDetectedLanguages( - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder - builderForValue) { - if (valueDetectedLanguagesBuilder_ == null) { - ensureValueDetectedLanguagesIsMutable(); - valueDetectedLanguages_.add(builderForValue.build()); - onChanged(); - } else { - valueDetectedLanguagesBuilder_.addMessage(builderForValue.build()); - } - return this; + } + /** + * + * + *
+       * Required. Entity type from a schema e.g. `Address`.
+       * 
+ * + * string type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for type. + */ + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - /** - * - * - *
-         * A list of detected languages for value together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; - * - */ - public Builder addValueDetectedLanguages( - int index, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder - builderForValue) { - if (valueDetectedLanguagesBuilder_ == null) { - ensureValueDetectedLanguagesIsMutable(); - valueDetectedLanguages_.add(index, builderForValue.build()); - onChanged(); - } else { - valueDetectedLanguagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; + } + /** + * + * + *
+       * Required. Entity type from a schema e.g. `Address`.
+       * 
+ * + * string type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } - /** - * - * - *
-         * A list of detected languages for value together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; - * - */ - public Builder addAllValueDetectedLanguages( - java.lang.Iterable< - ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage> - values) { - if (valueDetectedLanguagesBuilder_ == null) { - ensureValueDetectedLanguagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, valueDetectedLanguages_); - onChanged(); - } else { - valueDetectedLanguagesBuilder_.addAllMessages(values); - } - return this; + type_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Entity type from a schema e.g. `Address`.
+       * 
+ * + * string type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearType() { + type_ = getDefaultInstance().getType(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Entity type from a schema e.g. `Address`.
+       * 
+ * + * string type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } - /** - * - * - *
-         * A list of detected languages for value together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; - * - */ - public Builder clearValueDetectedLanguages() { - if (valueDetectedLanguagesBuilder_ == null) { - valueDetectedLanguages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - valueDetectedLanguagesBuilder_.clear(); - } - return this; + checkByteStringIsUtf8(value); + type_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object mentionText_ = ""; + /** + * + * + *
+       * Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.
+       * 
+ * + * string mention_text = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The mentionText. + */ + public java.lang.String getMentionText() { + java.lang.Object ref = mentionText_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mentionText_ = s; + return s; + } else { + return (java.lang.String) ref; } - /** - * - * - *
-         * A list of detected languages for value together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; - * - */ - public Builder removeValueDetectedLanguages(int index) { - if (valueDetectedLanguagesBuilder_ == null) { - ensureValueDetectedLanguagesIsMutable(); - valueDetectedLanguages_.remove(index); - onChanged(); - } else { - valueDetectedLanguagesBuilder_.remove(index); - } - return this; + } + /** + * + * + *
+       * Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.
+       * 
+ * + * string mention_text = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for mentionText. + */ + public com.google.protobuf.ByteString getMentionTextBytes() { + java.lang.Object ref = mentionText_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mentionText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - /** - * - * - *
-         * A list of detected languages for value together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; - * - */ - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder - getValueDetectedLanguagesBuilder(int index) { - return getValueDetectedLanguagesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.
+       * 
+ * + * string mention_text = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The mentionText to set. + * @return This builder for chaining. + */ + public Builder setMentionText(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } - /** - * - * - *
-         * A list of detected languages for value together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; - * - */ - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder - getValueDetectedLanguagesOrBuilder(int index) { - if (valueDetectedLanguagesBuilder_ == null) { - return valueDetectedLanguages_.get(index); - } else { - return valueDetectedLanguagesBuilder_.getMessageOrBuilder(index); - } + mentionText_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.
+       * 
+ * + * string mention_text = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearMentionText() { + mentionText_ = getDefaultInstance().getMentionText(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.
+       * 
+ * + * string mention_text = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for mentionText to set. + * @return This builder for chaining. + */ + public Builder setMentionTextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } - /** - * - * - *
-         * A list of detected languages for value together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; - * - */ - public java.util.List< - ? extends - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> - getValueDetectedLanguagesOrBuilderList() { - if (valueDetectedLanguagesBuilder_ != null) { - return valueDetectedLanguagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(valueDetectedLanguages_); - } + checkByteStringIsUtf8(value); + mentionText_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object mentionId_ = ""; + /** + * + * + *
+       * Optional. Deprecated.  Use `id` field instead.
+       * 
+ * + * string mention_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The mentionId. + */ + public java.lang.String getMentionId() { + java.lang.Object ref = mentionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mentionId_ = s; + return s; + } else { + return (java.lang.String) ref; } - /** - * - * - *
-         * A list of detected languages for value together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; - * - */ - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder - addValueDetectedLanguagesBuilder() { - return getValueDetectedLanguagesFieldBuilder() - .addBuilder( - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage - .getDefaultInstance()); + } + /** + * + * + *
+       * Optional. Deprecated.  Use `id` field instead.
+       * 
+ * + * string mention_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for mentionId. + */ + public com.google.protobuf.ByteString getMentionIdBytes() { + java.lang.Object ref = mentionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mentionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - /** - * - * - *
-         * A list of detected languages for value together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; - * - */ - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder - addValueDetectedLanguagesBuilder(int index) { - return getValueDetectedLanguagesFieldBuilder() - .addBuilder( - index, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage - .getDefaultInstance()); + } + /** + * + * + *
+       * Optional. Deprecated.  Use `id` field instead.
+       * 
+ * + * string mention_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The mentionId to set. + * @return This builder for chaining. + */ + public Builder setMentionId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } - /** - * - * - *
-         * A list of detected languages for value together with confidence.
-         * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value_detected_languages = 4; - * - */ - public java.util.List< - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder> - getValueDetectedLanguagesBuilderList() { - return getValueDetectedLanguagesFieldBuilder().getBuilderList(); + mentionId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Deprecated.  Use `id` field instead.
+       * 
+ * + * string mention_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearMentionId() { + mentionId_ = getDefaultInstance().getMentionId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Deprecated.  Use `id` field instead.
+       * 
+ * + * string mention_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for mentionId to set. + * @return This builder for chaining. + */ + public Builder setMentionIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } + checkByteStringIsUtf8(value); + mentionId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> - getValueDetectedLanguagesFieldBuilder() { - if (valueDetectedLanguagesBuilder_ == null) { - valueDetectedLanguagesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder>( - valueDetectedLanguages_, - ((bitField0_ & 0x00000008) != 0), - getParentForChildren(), - isClean()); - valueDetectedLanguages_ = null; - } - return valueDetectedLanguagesBuilder_; - } + private float confidence_; + /** + * + * + *
+       * Optional. Confidence of detected Schema entity. Range `[0, 1]`.
+       * 
+ * + * float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + /** + * + * + *
+       * Optional. Confidence of detected Schema entity. Range `[0, 1]`.
+       * 
+ * + * float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { - private java.lang.Object valueType_ = ""; - /** - * - * - *
-         * If the value is non-textual, this field represents the type. Current
-         * valid values are:
-         * - blank (this indicates the field_value is normal text)
-         * - "unfilled_checkbox"
-         * - "filled_checkbox"
-         * 
- * - * string value_type = 5; - * - * @return The valueType. - */ - public java.lang.String getValueType() { - java.lang.Object ref = valueType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - valueType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-         * If the value is non-textual, this field represents the type. Current
-         * valid values are:
-         * - blank (this indicates the field_value is normal text)
-         * - "unfilled_checkbox"
-         * - "filled_checkbox"
-         * 
- * - * string value_type = 5; - * - * @return The bytes for valueType. - */ - public com.google.protobuf.ByteString getValueTypeBytes() { - java.lang.Object ref = valueType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - valueType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + confidence_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Confidence of detected Schema entity. Range `[0, 1]`.
+       * 
+ * + * float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearConfidence() { + bitField0_ = (bitField0_ & ~0x00000010); + confidence_ = 0F; + onChanged(); + return this; + } + + private com.google.cloud.documentai.v1beta2.Document.PageAnchor pageAnchor_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.PageAnchor, + com.google.cloud.documentai.v1beta2.Document.PageAnchor.Builder, + com.google.cloud.documentai.v1beta2.Document.PageAnchorOrBuilder> + pageAnchorBuilder_; + /** + * + * + *
+       * Optional. Represents the provenance of this entity wrt. the location on
+       * the page where it was found.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.PageAnchor page_anchor = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the pageAnchor field is set. + */ + public boolean hasPageAnchor() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+       * Optional. Represents the provenance of this entity wrt. the location on
+       * the page where it was found.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.PageAnchor page_anchor = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The pageAnchor. + */ + public com.google.cloud.documentai.v1beta2.Document.PageAnchor getPageAnchor() { + if (pageAnchorBuilder_ == null) { + return pageAnchor_ == null + ? com.google.cloud.documentai.v1beta2.Document.PageAnchor.getDefaultInstance() + : pageAnchor_; + } else { + return pageAnchorBuilder_.getMessage(); } - /** - * - * - *
-         * If the value is non-textual, this field represents the type. Current
-         * valid values are:
-         * - blank (this indicates the field_value is normal text)
-         * - "unfilled_checkbox"
-         * - "filled_checkbox"
-         * 
- * - * string value_type = 5; - * - * @param value The valueType to set. - * @return This builder for chaining. - */ - public Builder setValueType(java.lang.String value) { + } + /** + * + * + *
+       * Optional. Represents the provenance of this entity wrt. the location on
+       * the page where it was found.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.PageAnchor page_anchor = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPageAnchor(com.google.cloud.documentai.v1beta2.Document.PageAnchor value) { + if (pageAnchorBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - valueType_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-         * If the value is non-textual, this field represents the type. Current
-         * valid values are:
-         * - blank (this indicates the field_value is normal text)
-         * - "unfilled_checkbox"
-         * - "filled_checkbox"
-         * 
- * - * string value_type = 5; - * - * @return This builder for chaining. - */ - public Builder clearValueType() { - valueType_ = getDefaultInstance().getValueType(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; + pageAnchor_ = value; + } else { + pageAnchorBuilder_.setMessage(value); } - /** - * - * - *
-         * If the value is non-textual, this field represents the type. Current
-         * valid values are:
-         * - blank (this indicates the field_value is normal text)
-         * - "unfilled_checkbox"
-         * - "filled_checkbox"
-         * 
- * - * string value_type = 5; - * - * @param value The bytes for valueType to set. - * @return This builder for chaining. - */ - public Builder setValueTypeBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - valueType_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Represents the provenance of this entity wrt. the location on
+       * the page where it was found.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.PageAnchor page_anchor = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPageAnchor( + com.google.cloud.documentai.v1beta2.Document.PageAnchor.Builder builderForValue) { + if (pageAnchorBuilder_ == null) { + pageAnchor_ = builderForValue.build(); + } else { + pageAnchorBuilder_.setMessage(builderForValue.build()); } - - private java.lang.Object correctedKeyText_ = ""; - /** - * - * - *
-         * An internal field, created for Labeling UI to export key text.
-         * 
- * - * string corrected_key_text = 6; - * - * @return The correctedKeyText. - */ - public java.lang.String getCorrectedKeyText() { - java.lang.Object ref = correctedKeyText_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - correctedKeyText_ = s; - return s; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Represents the provenance of this entity wrt. the location on
+       * the page where it was found.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.PageAnchor page_anchor = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergePageAnchor( + com.google.cloud.documentai.v1beta2.Document.PageAnchor value) { + if (pageAnchorBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && pageAnchor_ != null + && pageAnchor_ + != com.google.cloud.documentai.v1beta2.Document.PageAnchor.getDefaultInstance()) { + getPageAnchorBuilder().mergeFrom(value); } else { - return (java.lang.String) ref; + pageAnchor_ = value; } + } else { + pageAnchorBuilder_.mergeFrom(value); } - /** - * - * - *
-         * An internal field, created for Labeling UI to export key text.
-         * 
- * - * string corrected_key_text = 6; - * - * @return The bytes for correctedKeyText. - */ - public com.google.protobuf.ByteString getCorrectedKeyTextBytes() { - java.lang.Object ref = correctedKeyText_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - correctedKeyText_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Represents the provenance of this entity wrt. the location on
+       * the page where it was found.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.PageAnchor page_anchor = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearPageAnchor() { + bitField0_ = (bitField0_ & ~0x00000020); + pageAnchor_ = null; + if (pageAnchorBuilder_ != null) { + pageAnchorBuilder_.dispose(); + pageAnchorBuilder_ = null; } - /** - * - * - *
-         * An internal field, created for Labeling UI to export key text.
-         * 
- * - * string corrected_key_text = 6; - * - * @param value The correctedKeyText to set. - * @return This builder for chaining. - */ - public Builder setCorrectedKeyText(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - correctedKeyText_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Represents the provenance of this entity wrt. the location on
+       * the page where it was found.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.PageAnchor page_anchor = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.documentai.v1beta2.Document.PageAnchor.Builder + getPageAnchorBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getPageAnchorFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Optional. Represents the provenance of this entity wrt. the location on
+       * the page where it was found.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.PageAnchor page_anchor = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.documentai.v1beta2.Document.PageAnchorOrBuilder + getPageAnchorOrBuilder() { + if (pageAnchorBuilder_ != null) { + return pageAnchorBuilder_.getMessageOrBuilder(); + } else { + return pageAnchor_ == null + ? com.google.cloud.documentai.v1beta2.Document.PageAnchor.getDefaultInstance() + : pageAnchor_; } - /** - * - * - *
-         * An internal field, created for Labeling UI to export key text.
-         * 
- * - * string corrected_key_text = 6; - * - * @return This builder for chaining. - */ - public Builder clearCorrectedKeyText() { - correctedKeyText_ = getDefaultInstance().getCorrectedKeyText(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; + } + /** + * + * + *
+       * Optional. Represents the provenance of this entity wrt. the location on
+       * the page where it was found.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.PageAnchor page_anchor = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.PageAnchor, + com.google.cloud.documentai.v1beta2.Document.PageAnchor.Builder, + com.google.cloud.documentai.v1beta2.Document.PageAnchorOrBuilder> + getPageAnchorFieldBuilder() { + if (pageAnchorBuilder_ == null) { + pageAnchorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.PageAnchor, + com.google.cloud.documentai.v1beta2.Document.PageAnchor.Builder, + com.google.cloud.documentai.v1beta2.Document.PageAnchorOrBuilder>( + getPageAnchor(), getParentForChildren(), isClean()); + pageAnchor_ = null; + } + return pageAnchorBuilder_; + } + + private java.lang.Object id_ = ""; + /** + * + * + *
+       * Optional. Canonical id. This will be a unique value in the entity list
+       * for this document.
+       * 
+ * + * string id = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Optional. Canonical id. This will be a unique value in the entity list
+       * for this document.
+       * 
+ * + * string id = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Optional. Canonical id. This will be a unique value in the entity list
+       * for this document.
+       * 
+ * + * string id = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } - /** - * - * - *
-         * An internal field, created for Labeling UI to export key text.
-         * 
- * - * string corrected_key_text = 6; - * - * @param value The bytes for correctedKeyText to set. - * @return This builder for chaining. - */ - public Builder setCorrectedKeyTextBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - correctedKeyText_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; + id_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Canonical id. This will be a unique value in the entity list
+       * for this document.
+       * 
+ * + * string id = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Canonical id. This will be a unique value in the entity list
+       * for this document.
+       * 
+ * + * string id = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } - private java.lang.Object correctedValueText_ = ""; - /** - * - * - *
-         * An internal field, created for Labeling UI to export value text.
-         * 
- * - * string corrected_value_text = 7; - * - * @return The correctedValueText. - */ - public java.lang.String getCorrectedValueText() { - java.lang.Object ref = correctedValueText_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - correctedValueText_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-         * An internal field, created for Labeling UI to export value text.
-         * 
- * - * string corrected_value_text = 7; - * - * @return The bytes for correctedValueText. - */ - public com.google.protobuf.ByteString getCorrectedValueTextBytes() { - java.lang.Object ref = correctedValueText_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - correctedValueText_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + private com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue normalizedValue_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue, + com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue.Builder, + com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValueOrBuilder> + normalizedValueBuilder_; + /** + * + * + *
+       * Optional. Normalized entity value. Absent if the extracted value could
+       * not be converted or the type (e.g. address) is not supported for certain
+       * parsers. This field is also only populated for certain supported document
+       * types.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue normalized_value = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the normalizedValue field is set. + */ + public boolean hasNormalizedValue() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+       * Optional. Normalized entity value. Absent if the extracted value could
+       * not be converted or the type (e.g. address) is not supported for certain
+       * parsers. This field is also only populated for certain supported document
+       * types.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue normalized_value = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The normalizedValue. + */ + public com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue + getNormalizedValue() { + if (normalizedValueBuilder_ == null) { + return normalizedValue_ == null + ? com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue + .getDefaultInstance() + : normalizedValue_; + } else { + return normalizedValueBuilder_.getMessage(); } - /** - * - * - *
-         * An internal field, created for Labeling UI to export value text.
-         * 
- * - * string corrected_value_text = 7; - * - * @param value The correctedValueText to set. - * @return This builder for chaining. - */ - public Builder setCorrectedValueText(java.lang.String value) { + } + /** + * + * + *
+       * Optional. Normalized entity value. Absent if the extracted value could
+       * not be converted or the type (e.g. address) is not supported for certain
+       * parsers. This field is also only populated for certain supported document
+       * types.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue normalized_value = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setNormalizedValue( + com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue value) { + if (normalizedValueBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - correctedValueText_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; + normalizedValue_ = value; + } else { + normalizedValueBuilder_.setMessage(value); } - /** - * - * - *
-         * An internal field, created for Labeling UI to export value text.
-         * 
- * - * string corrected_value_text = 7; - * - * @return This builder for chaining. - */ - public Builder clearCorrectedValueText() { - correctedValueText_ = getDefaultInstance().getCorrectedValueText(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - return this; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Normalized entity value. Absent if the extracted value could
+       * not be converted or the type (e.g. address) is not supported for certain
+       * parsers. This field is also only populated for certain supported document
+       * types.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue normalized_value = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setNormalizedValue( + com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue.Builder + builderForValue) { + if (normalizedValueBuilder_ == null) { + normalizedValue_ = builderForValue.build(); + } else { + normalizedValueBuilder_.setMessage(builderForValue.build()); } - /** - * - * - *
-         * An internal field, created for Labeling UI to export value text.
-         * 
- * - * string corrected_value_text = 7; - * - * @param value The bytes for correctedValueText to set. - * @return This builder for chaining. - */ - public Builder setCorrectedValueTextBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Normalized entity value. Absent if the extracted value could
+       * not be converted or the type (e.g. address) is not supported for certain
+       * parsers. This field is also only populated for certain supported document
+       * types.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue normalized_value = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeNormalizedValue( + com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue value) { + if (normalizedValueBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && normalizedValue_ != null + && normalizedValue_ + != com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue + .getDefaultInstance()) { + getNormalizedValueBuilder().mergeFrom(value); + } else { + normalizedValue_ = value; } - checkByteStringIsUtf8(value); - correctedValueText_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + } else { + normalizedValueBuilder_.mergeFrom(value); } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Normalized entity value. Absent if the extracted value could
+       * not be converted or the type (e.g. address) is not supported for certain
+       * parsers. This field is also only populated for certain supported document
+       * types.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue normalized_value = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearNormalizedValue() { + bitField0_ = (bitField0_ & ~0x00000080); + normalizedValue_ = null; + if (normalizedValueBuilder_ != null) { + normalizedValueBuilder_.dispose(); + normalizedValueBuilder_ = null; } - - // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta2.Document.Page.FormField) + onChanged(); + return this; } - - // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.Page.FormField) - private static final com.google.cloud.documentai.v1beta2.Document.Page.FormField - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta2.Document.Page.FormField(); + /** + * + * + *
+       * Optional. Normalized entity value. Absent if the extracted value could
+       * not be converted or the type (e.g. address) is not supported for certain
+       * parsers. This field is also only populated for certain supported document
+       * types.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue normalized_value = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue.Builder + getNormalizedValueBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getNormalizedValueFieldBuilder().getBuilder(); } - - public static com.google.cloud.documentai.v1beta2.Document.Page.FormField - getDefaultInstance() { - return DEFAULT_INSTANCE; + /** + * + * + *
+       * Optional. Normalized entity value. Absent if the extracted value could
+       * not be converted or the type (e.g. address) is not supported for certain
+       * parsers. This field is also only populated for certain supported document
+       * types.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue normalized_value = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValueOrBuilder + getNormalizedValueOrBuilder() { + if (normalizedValueBuilder_ != null) { + return normalizedValueBuilder_.getMessageOrBuilder(); + } else { + return normalizedValue_ == null + ? com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue + .getDefaultInstance() + : normalizedValue_; + } } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FormField parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; + /** + * + * + *
+       * Optional. Normalized entity value. Absent if the extracted value could
+       * not be converted or the type (e.g. address) is not supported for certain
+       * parsers. This field is also only populated for certain supported document
+       * types.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue normalized_value = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue, + com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue.Builder, + com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValueOrBuilder> + getNormalizedValueFieldBuilder() { + if (normalizedValueBuilder_ == null) { + normalizedValueBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue, + com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValue.Builder, + com.google.cloud.documentai.v1beta2.Document.Entity.NormalizedValueOrBuilder>( + getNormalizedValue(), getParentForChildren(), isClean()); + normalizedValue_ = null; + } + return normalizedValueBuilder_; } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + private java.util.List properties_ = + java.util.Collections.emptyList(); - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.FormField - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; + private void ensurePropertiesIsMutable() { + if (!((bitField0_ & 0x00000100) != 0)) { + properties_ = + new java.util.ArrayList( + properties_); + bitField0_ |= 0x00000100; + } } - } - public interface DetectedLanguageOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage) - com.google.protobuf.MessageOrBuilder { + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Entity, + com.google.cloud.documentai.v1beta2.Document.Entity.Builder, + com.google.cloud.documentai.v1beta2.Document.EntityOrBuilder> + propertiesBuilder_; /** * * *
-       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-       * information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * Optional. Entities can be nested to form a hierarchical data structure
+       * representing the content in the document.
        * 
* - * string language_code = 1; + * + * repeated .google.cloud.documentai.v1beta2.Document.Entity properties = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getPropertiesList() { + if (propertiesBuilder_ == null) { + return java.util.Collections.unmodifiableList(properties_); + } else { + return propertiesBuilder_.getMessageList(); + } + } + /** * - * @return The languageCode. + * + *
+       * Optional. Entities can be nested to form a hierarchical data structure
+       * representing the content in the document.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Entity properties = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ - java.lang.String getLanguageCode(); + public int getPropertiesCount() { + if (propertiesBuilder_ == null) { + return properties_.size(); + } else { + return propertiesBuilder_.getCount(); + } + } /** * * *
-       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-       * information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * Optional. Entities can be nested to form a hierarchical data structure
+       * representing the content in the document.
        * 
* - * string language_code = 1; + * + * repeated .google.cloud.documentai.v1beta2.Document.Entity properties = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Entity getProperties(int index) { + if (propertiesBuilder_ == null) { + return properties_.get(index); + } else { + return propertiesBuilder_.getMessage(index); + } + } + /** * - * @return The bytes for languageCode. + * + *
+       * Optional. Entities can be nested to form a hierarchical data structure
+       * representing the content in the document.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Entity properties = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ - com.google.protobuf.ByteString getLanguageCodeBytes(); - + public Builder setProperties( + int index, com.google.cloud.documentai.v1beta2.Document.Entity value) { + if (propertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropertiesIsMutable(); + properties_.set(index, value); + onChanged(); + } else { + propertiesBuilder_.setMessage(index, value); + } + return this; + } /** * * *
-       * Confidence of detected language. Range [0, 1].
+       * Optional. Entities can be nested to form a hierarchical data structure
+       * representing the content in the document.
        * 
* - * float confidence = 2; + * + * repeated .google.cloud.documentai.v1beta2.Document.Entity properties = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setProperties( + int index, com.google.cloud.documentai.v1beta2.Document.Entity.Builder builderForValue) { + if (propertiesBuilder_ == null) { + ensurePropertiesIsMutable(); + properties_.set(index, builderForValue.build()); + onChanged(); + } else { + propertiesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** * - * @return The confidence. + * + *
+       * Optional. Entities can be nested to form a hierarchical data structure
+       * representing the content in the document.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Entity properties = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ - float getConfidence(); - } - /** - * - * - *
-     * Detected language for a structural component.
-     * 
- * - * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage} - */ - public static final class DetectedLanguage extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage) - DetectedLanguageOrBuilder { - private static final long serialVersionUID = 0L; - // Use DetectedLanguage.newBuilder() to construct. - private DetectedLanguage(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); + public Builder addProperties(com.google.cloud.documentai.v1beta2.Document.Entity value) { + if (propertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropertiesIsMutable(); + properties_.add(value); + onChanged(); + } else { + propertiesBuilder_.addMessage(value); + } + return this; } - - private DetectedLanguage() { - languageCode_ = ""; + /** + * + * + *
+       * Optional. Entities can be nested to form a hierarchical data structure
+       * representing the content in the document.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Entity properties = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addProperties( + int index, com.google.cloud.documentai.v1beta2.Document.Entity value) { + if (propertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropertiesIsMutable(); + properties_.add(index, value); + onChanged(); + } else { + propertiesBuilder_.addMessage(index, value); + } + return this; } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DetectedLanguage(); + /** + * + * + *
+       * Optional. Entities can be nested to form a hierarchical data structure
+       * representing the content in the document.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Entity properties = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addProperties( + com.google.cloud.documentai.v1beta2.Document.Entity.Builder builderForValue) { + if (propertiesBuilder_ == null) { + ensurePropertiesIsMutable(); + properties_.add(builderForValue.build()); + onChanged(); + } else { + propertiesBuilder_.addMessage(builderForValue.build()); + } + return this; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_DetectedLanguage_descriptor; + /** + * + * + *
+       * Optional. Entities can be nested to form a hierarchical data structure
+       * representing the content in the document.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Entity properties = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addProperties( + int index, com.google.cloud.documentai.v1beta2.Document.Entity.Builder builderForValue) { + if (propertiesBuilder_ == null) { + ensurePropertiesIsMutable(); + properties_.add(index, builderForValue.build()); + onChanged(); + } else { + propertiesBuilder_.addMessage(index, builderForValue.build()); + } + return this; } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_DetectedLanguage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.class, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder.class); + /** + * + * + *
+       * Optional. Entities can be nested to form a hierarchical data structure
+       * representing the content in the document.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Entity properties = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllProperties( + java.lang.Iterable + values) { + if (propertiesBuilder_ == null) { + ensurePropertiesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, properties_); + onChanged(); + } else { + propertiesBuilder_.addAllMessages(values); + } + return this; } - - public static final int LANGUAGE_CODE_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object languageCode_ = ""; /** * * *
-       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-       * information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * Optional. Entities can be nested to form a hierarchical data structure
+       * representing the content in the document.
        * 
* - * string language_code = 1; - * - * @return The languageCode. + * + * repeated .google.cloud.documentai.v1beta2.Document.Entity properties = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ - @java.lang.Override - public java.lang.String getLanguageCode() { - java.lang.Object ref = languageCode_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; + public Builder clearProperties() { + if (propertiesBuilder_ == null) { + properties_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - languageCode_ = s; - return s; + propertiesBuilder_.clear(); } + return this; } /** * * *
-       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-       * information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * Optional. Entities can be nested to form a hierarchical data structure
+       * representing the content in the document.
        * 
* - * string language_code = 1; - * - * @return The bytes for languageCode. + * + * repeated .google.cloud.documentai.v1beta2.Document.Entity properties = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ - @java.lang.Override - public com.google.protobuf.ByteString getLanguageCodeBytes() { - java.lang.Object ref = languageCode_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - languageCode_ = b; - return b; + public Builder removeProperties(int index) { + if (propertiesBuilder_ == null) { + ensurePropertiesIsMutable(); + properties_.remove(index); + onChanged(); } else { - return (com.google.protobuf.ByteString) ref; + propertiesBuilder_.remove(index); } + return this; } - - public static final int CONFIDENCE_FIELD_NUMBER = 2; - private float confidence_ = 0F; /** * * *
-       * Confidence of detected language. Range [0, 1].
+       * Optional. Entities can be nested to form a hierarchical data structure
+       * representing the content in the document.
        * 
* - * float confidence = 2; - * - * @return The confidence. + * + * repeated .google.cloud.documentai.v1beta2.Document.Entity properties = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - - 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, languageCode_); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - output.writeFloat(2, confidence_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, languageCode_); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, confidence_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; + public com.google.cloud.documentai.v1beta2.Document.Entity.Builder getPropertiesBuilder( + int index) { + return getPropertiesFieldBuilder().getBuilder(index); } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage)) { - return super.equals(obj); + /** + * + * + *
+       * Optional. Entities can be nested to form a hierarchical data structure
+       * representing the content in the document.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Entity properties = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.documentai.v1beta2.Document.EntityOrBuilder getPropertiesOrBuilder( + int index) { + if (propertiesBuilder_ == null) { + return properties_.get(index); + } else { + return propertiesBuilder_.getMessageOrBuilder(index); } - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage other = - (com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage) obj; - - if (!getLanguageCode().equals(other.getLanguageCode())) return false; - if (java.lang.Float.floatToIntBits(getConfidence()) - != java.lang.Float.floatToIntBits(other.getConfidence())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; + /** + * + * + *
+       * Optional. Entities can be nested to form a hierarchical data structure
+       * representing the content in the document.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Entity properties = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getPropertiesOrBuilderList() { + if (propertiesBuilder_ != null) { + return propertiesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(properties_); } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; - hash = (53 * hash) + getLanguageCode().hashCode(); - hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getConfidence()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage 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.v1beta2.Document.Page.DetectedLanguage parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage 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.v1beta2.Document.Page.DetectedLanguage parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage 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.v1beta2.Document.Page.DetectedLanguage - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage - 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.v1beta2.Document.Page.DetectedLanguage parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage 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.v1beta2.Document.Page.DetectedLanguage 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; } /** * * *
-       * Detected language for a structural component.
+       * Optional. Entities can be nested to form a hierarchical data structure
+       * representing the content in the document.
        * 
* - * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage} + * + * repeated .google.cloud.documentai.v1beta2.Document.Entity properties = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage) - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_DetectedLanguage_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_DetectedLanguage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.class, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder.class); - } - - // Construct using - // com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - languageCode_ = ""; - confidence_ = 0F; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_DetectedLanguage_descriptor; - } - - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage - getDefaultInstanceForType() { - return com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage build() { - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage buildPartial() { - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage result = - new com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.languageCode_ = languageCode_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.confidence_ = confidence_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage) { - return mergeFrom( - (com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage other) { - if (other - == com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage - .getDefaultInstance()) return this; - if (!other.getLanguageCode().isEmpty()) { - languageCode_ = other.languageCode_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.getConfidence() != 0F) { - setConfidence(other.getConfidence()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - languageCode_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 21: - { - confidence_ = input.readFloat(); - bitField0_ |= 0x00000002; - break; - } // case 21 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object languageCode_ = ""; - /** - * - * - *
-         * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-         * information, see
-         * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-         * 
- * - * string language_code = 1; - * - * @return The languageCode. - */ - public java.lang.String getLanguageCode() { - java.lang.Object ref = languageCode_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - languageCode_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-         * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-         * information, see
-         * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-         * 
- * - * string language_code = 1; - * - * @return The bytes for languageCode. - */ - public com.google.protobuf.ByteString getLanguageCodeBytes() { - java.lang.Object ref = languageCode_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - languageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-         * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-         * information, see
-         * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-         * 
- * - * string language_code = 1; - * - * @param value The languageCode to set. - * @return This builder for chaining. - */ - public Builder setLanguageCode(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - languageCode_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; + public com.google.cloud.documentai.v1beta2.Document.Entity.Builder addPropertiesBuilder() { + return getPropertiesFieldBuilder() + .addBuilder(com.google.cloud.documentai.v1beta2.Document.Entity.getDefaultInstance()); + } + /** + * + * + *
+       * Optional. Entities can be nested to form a hierarchical data structure
+       * representing the content in the document.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Entity properties = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Entity.Builder addPropertiesBuilder( + int index) { + return getPropertiesFieldBuilder() + .addBuilder( + index, com.google.cloud.documentai.v1beta2.Document.Entity.getDefaultInstance()); + } + /** + * + * + *
+       * Optional. Entities can be nested to form a hierarchical data structure
+       * representing the content in the document.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Entity properties = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getPropertiesBuilderList() { + return getPropertiesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Entity, + com.google.cloud.documentai.v1beta2.Document.Entity.Builder, + com.google.cloud.documentai.v1beta2.Document.EntityOrBuilder> + getPropertiesFieldBuilder() { + if (propertiesBuilder_ == null) { + propertiesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Entity, + com.google.cloud.documentai.v1beta2.Document.Entity.Builder, + com.google.cloud.documentai.v1beta2.Document.EntityOrBuilder>( + properties_, ((bitField0_ & 0x00000100) != 0), getParentForChildren(), isClean()); + properties_ = null; } - /** - * - * - *
-         * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-         * information, see
-         * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-         * 
- * - * string language_code = 1; - * - * @return This builder for chaining. - */ - public Builder clearLanguageCode() { - languageCode_ = getDefaultInstance().getLanguageCode(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; + return propertiesBuilder_; + } + + private com.google.cloud.documentai.v1beta2.Document.Provenance provenance_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Provenance, + com.google.cloud.documentai.v1beta2.Document.Provenance.Builder, + com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder> + provenanceBuilder_; + /** + * + * + *
+       * Optional. The history of this annotation.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the provenance field is set. + */ + public boolean hasProvenance() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + * + * + *
+       * Optional. The history of this annotation.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The provenance. + */ + public com.google.cloud.documentai.v1beta2.Document.Provenance getProvenance() { + if (provenanceBuilder_ == null) { + return provenance_ == null + ? com.google.cloud.documentai.v1beta2.Document.Provenance.getDefaultInstance() + : provenance_; + } else { + return provenanceBuilder_.getMessage(); } - /** - * - * - *
-         * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-         * information, see
-         * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-         * 
- * - * string language_code = 1; - * - * @param value The bytes for languageCode to set. - * @return This builder for chaining. - */ - public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + } + /** + * + * + *
+       * Optional. The history of this annotation.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setProvenance(com.google.cloud.documentai.v1beta2.Document.Provenance value) { + if (provenanceBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - languageCode_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; + provenance_ = value; + } else { + provenanceBuilder_.setMessage(value); } - - private float confidence_; - /** - * - * - *
-         * Confidence of detected language. Range [0, 1].
-         * 
- * - * float confidence = 2; - * - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. The history of this annotation.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setProvenance( + com.google.cloud.documentai.v1beta2.Document.Provenance.Builder builderForValue) { + if (provenanceBuilder_ == null) { + provenance_ = builderForValue.build(); + } else { + provenanceBuilder_.setMessage(builderForValue.build()); } - /** - * - * - *
-         * Confidence of detected language. Range [0, 1].
-         * 
- * - * float confidence = 2; - * - * @param value The confidence to set. - * @return This builder for chaining. - */ - public Builder setConfidence(float value) { - - confidence_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. The history of this annotation.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeProvenance( + com.google.cloud.documentai.v1beta2.Document.Provenance value) { + if (provenanceBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && provenance_ != null + && provenance_ + != com.google.cloud.documentai.v1beta2.Document.Provenance.getDefaultInstance()) { + getProvenanceBuilder().mergeFrom(value); + } else { + provenance_ = value; + } + } else { + provenanceBuilder_.mergeFrom(value); } - /** - * - * - *
-         * Confidence of detected language. Range [0, 1].
-         * 
- * - * float confidence = 2; - * - * @return This builder for chaining. - */ - public Builder clearConfidence() { - bitField0_ = (bitField0_ & ~0x00000002); - confidence_ = 0F; - onChanged(); - return this; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. The history of this annotation.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearProvenance() { + bitField0_ = (bitField0_ & ~0x00000200); + provenance_ = null; + if (provenanceBuilder_ != null) { + provenanceBuilder_.dispose(); + provenanceBuilder_ = null; } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. The history of this annotation.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Provenance.Builder + getProvenanceBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getProvenanceFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Optional. The history of this annotation.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder + getProvenanceOrBuilder() { + if (provenanceBuilder_ != null) { + return provenanceBuilder_.getMessageOrBuilder(); + } else { + return provenance_ == null + ? com.google.cloud.documentai.v1beta2.Document.Provenance.getDefaultInstance() + : provenance_; } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + } + /** + * + * + *
+       * Optional. The history of this annotation.
+       * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.Provenance provenance = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Provenance, + com.google.cloud.documentai.v1beta2.Document.Provenance.Builder, + com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder> + getProvenanceFieldBuilder() { + if (provenanceBuilder_ == null) { + provenanceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Provenance, + com.google.cloud.documentai.v1beta2.Document.Provenance.Builder, + com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder>( + getProvenance(), getParentForChildren(), isClean()); + provenance_ = null; } - - // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage) + return provenanceBuilder_; } - // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage) - private static final com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage(); + private boolean redacted_; + /** + * + * + *
+       * Optional. Whether the entity will be redacted for de-identification
+       * purposes.
+       * 
+ * + * bool redacted = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The redacted. + */ + @java.lang.Override + public boolean getRedacted() { + return redacted_; } + /** + * + * + *
+       * Optional. Whether the entity will be redacted for de-identification
+       * purposes.
+       * 
+ * + * bool redacted = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The redacted to set. + * @return This builder for chaining. + */ + public Builder setRedacted(boolean value) { - public static com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage - getDefaultInstance() { - return DEFAULT_INSTANCE; + redacted_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DetectedLanguage parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; + /** + * + * + *
+       * Optional. Whether the entity will be redacted for de-identification
+       * purposes.
+       * 
+ * + * bool redacted = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRedacted() { + bitField0_ = (bitField0_ & ~0x00000400); + redacted_ = false; + onChanged(); + return this; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); } @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public static final int PAGE_NUMBER_FIELD_NUMBER = 1; - private int pageNumber_ = 0; - /** - * - * - *
-     * 1-based index for current [Page][google.cloud.documentai.v1beta2.Document.Page] in a parent [Document][google.cloud.documentai.v1beta2.Document].
-     * Useful when a page is taken out of a [Document][google.cloud.documentai.v1beta2.Document] for individual
-     * processing.
-     * 
- * - * int32 page_number = 1; - * - * @return The pageNumber. - */ - @java.lang.Override - public int getPageNumber() { - return pageNumber_; - } - - public static final int DIMENSION_FIELD_NUMBER = 2; - private com.google.cloud.documentai.v1beta2.Document.Page.Dimension dimension_; - /** - * - * - *
-     * Physical dimension of the page.
-     * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Dimension dimension = 2; - * - * @return Whether the dimension field is set. - */ - @java.lang.Override - public boolean hasDimension() { - return dimension_ != null; - } - /** - * - * - *
-     * Physical dimension of the page.
-     * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Dimension dimension = 2; - * - * @return The dimension. - */ - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Dimension getDimension() { - return dimension_ == null - ? com.google.cloud.documentai.v1beta2.Document.Page.Dimension.getDefaultInstance() - : dimension_; - } - /** - * - * - *
-     * Physical dimension of the page.
-     * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Dimension dimension = 2; - */ - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.DimensionOrBuilder - getDimensionOrBuilder() { - return dimension_ == null - ? com.google.cloud.documentai.v1beta2.Document.Page.Dimension.getDefaultInstance() - : dimension_; - } - - public static final int LAYOUT_FIELD_NUMBER = 3; - private com.google.cloud.documentai.v1beta2.Document.Page.Layout layout_; - /** - * - * - *
-     * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the page.
-     * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 3; - * - * @return Whether the layout field is set. - */ - @java.lang.Override - public boolean hasLayout() { - return layout_ != null; - } - /** - * - * - *
-     * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the page.
-     * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 3; - * - * @return The layout. - */ - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Layout getLayout() { - return layout_ == null - ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() - : layout_; - } - /** - * - * - *
-     * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the page.
-     * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 3; - */ - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder getLayoutOrBuilder() { - return layout_ == null - ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() - : layout_; - } - - public static final int DETECTED_LANGUAGES_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private java.util.List - detectedLanguages_; - /** - * - * - *
-     * A list of detected languages together with confidence.
-     * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * - */ - @java.lang.Override - public java.util.List - getDetectedLanguagesList() { - return detectedLanguages_; - } - /** - * - * - *
-     * A list of detected languages together with confidence.
-     * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * - */ - @java.lang.Override - public java.util.List< - ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> - getDetectedLanguagesOrBuilderList() { - return detectedLanguages_; - } - /** - * - * - *
-     * A list of detected languages together with confidence.
-     * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * - */ - @java.lang.Override - public int getDetectedLanguagesCount() { - return detectedLanguages_.size(); - } - /** - * - * - *
-     * A list of detected languages together with confidence.
-     * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * - */ - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage getDetectedLanguages( - int index) { - return detectedLanguages_.get(index); - } - /** - * - * - *
-     * A list of detected languages together with confidence.
-     * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * - */ - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder - getDetectedLanguagesOrBuilder(int index) { - return detectedLanguages_.get(index); + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta2.Document.Entity) } - public static final int BLOCKS_FIELD_NUMBER = 5; + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.Entity) + private static final com.google.cloud.documentai.v1beta2.Document.Entity DEFAULT_INSTANCE; - @SuppressWarnings("serial") - private java.util.List blocks_; - /** - * - * - *
-     * A list of visually detected text blocks on the page.
-     * A block has a set of lines (collected into paragraphs) that have a common
-     * line-spacing and orientation.
-     * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Block blocks = 5; - */ - @java.lang.Override - public java.util.List getBlocksList() { - return blocks_; - } - /** - * - * - *
-     * A list of visually detected text blocks on the page.
-     * A block has a set of lines (collected into paragraphs) that have a common
-     * line-spacing and orientation.
-     * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Block blocks = 5; - */ - @java.lang.Override - public java.util.List< - ? extends com.google.cloud.documentai.v1beta2.Document.Page.BlockOrBuilder> - getBlocksOrBuilderList() { - return blocks_; - } - /** - * - * - *
-     * A list of visually detected text blocks on the page.
-     * A block has a set of lines (collected into paragraphs) that have a common
-     * line-spacing and orientation.
-     * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Block blocks = 5; - */ - @java.lang.Override - public int getBlocksCount() { - return blocks_.size(); - } - /** - * - * - *
-     * A list of visually detected text blocks on the page.
-     * A block has a set of lines (collected into paragraphs) that have a common
-     * line-spacing and orientation.
-     * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Block blocks = 5; - */ - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Block getBlocks(int index) { - return blocks_.get(index); + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta2.Document.Entity(); } - /** - * - * - *
-     * A list of visually detected text blocks on the page.
-     * A block has a set of lines (collected into paragraphs) that have a common
-     * line-spacing and orientation.
-     * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Block blocks = 5; - */ - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.BlockOrBuilder getBlocksOrBuilder( - int index) { - return blocks_.get(index); + + public static com.google.cloud.documentai.v1beta2.Document.Entity getDefaultInstance() { + return DEFAULT_INSTANCE; } - public static final int PARAGRAPHS_FIELD_NUMBER = 6; + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Entity parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; - @SuppressWarnings("serial") - private java.util.List paragraphs_; - /** - * - * - *
-     * A list of visually detected text paragraphs on the page.
-     * A collection of lines that a human would perceive as a paragraph.
-     * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Paragraph paragraphs = 6; - * - */ - @java.lang.Override - public java.util.List - getParagraphsList() { - return paragraphs_; - } - /** - * - * - *
-     * A list of visually detected text paragraphs on the page.
-     * A collection of lines that a human would perceive as a paragraph.
-     * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Paragraph paragraphs = 6; - * - */ - @java.lang.Override - public java.util.List< - ? extends com.google.cloud.documentai.v1beta2.Document.Page.ParagraphOrBuilder> - getParagraphsOrBuilderList() { - return paragraphs_; - } - /** - * - * - *
-     * A list of visually detected text paragraphs on the page.
-     * A collection of lines that a human would perceive as a paragraph.
-     * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Paragraph paragraphs = 6; - * - */ - @java.lang.Override - public int getParagraphsCount() { - return paragraphs_.size(); + public static com.google.protobuf.Parser parser() { + return PARSER; } - /** - * - * - *
-     * A list of visually detected text paragraphs on the page.
-     * A collection of lines that a human would perceive as a paragraph.
-     * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Paragraph paragraphs = 6; - * - */ + @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Paragraph getParagraphs(int index) { - return paragraphs_.get(index); + public com.google.protobuf.Parser getParserForType() { + return PARSER; } - /** - * - * - *
-     * A list of visually detected text paragraphs on the page.
-     * A collection of lines that a human would perceive as a paragraph.
-     * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Paragraph paragraphs = 6; - * - */ + @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.ParagraphOrBuilder - getParagraphsOrBuilder(int index) { - return paragraphs_.get(index); + public com.google.cloud.documentai.v1beta2.Document.Entity getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } + } - public static final int LINES_FIELD_NUMBER = 7; + public interface EntityRelationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.EntityRelation) + com.google.protobuf.MessageOrBuilder { - @SuppressWarnings("serial") - private java.util.List lines_; - /** - * - * - *
-     * A list of visually detected text lines on the page.
-     * A collection of tokens that a human would perceive as a line.
-     * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Line lines = 7; - */ - @java.lang.Override - public java.util.List getLinesList() { - return lines_; - } /** * * *
-     * A list of visually detected text lines on the page.
-     * A collection of tokens that a human would perceive as a line.
+     * Subject entity id.
      * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Page.Line lines = 7; - */ - @java.lang.Override - public java.util.List - getLinesOrBuilderList() { - return lines_; - } - /** - * - * - *
-     * A list of visually detected text lines on the page.
-     * A collection of tokens that a human would perceive as a line.
-     * 
+ * string subject_id = 1; * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Line lines = 7; + * @return The subjectId. */ - @java.lang.Override - public int getLinesCount() { - return lines_.size(); - } + java.lang.String getSubjectId(); /** * * *
-     * A list of visually detected text lines on the page.
-     * A collection of tokens that a human would perceive as a line.
+     * Subject entity id.
      * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Page.Line lines = 7; - */ - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Line getLines(int index) { - return lines_.get(index); - } - /** - * - * - *
-     * A list of visually detected text lines on the page.
-     * A collection of tokens that a human would perceive as a line.
-     * 
+ * string subject_id = 1; * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Line lines = 7; + * @return The bytes for subjectId. */ - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.LineOrBuilder getLinesOrBuilder( - int index) { - return lines_.get(index); - } - - public static final int TOKENS_FIELD_NUMBER = 8; + com.google.protobuf.ByteString getSubjectIdBytes(); - @SuppressWarnings("serial") - private java.util.List tokens_; /** * * *
-     * A list of visually detected tokens on the page.
-     * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Token tokens = 8; - */ - @java.lang.Override - public java.util.List getTokensList() { - return tokens_; - } - /** - * - * - *
-     * A list of visually detected tokens on the page.
+     * Object entity id.
      * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Page.Token tokens = 8; - */ - @java.lang.Override - public java.util.List< - ? extends com.google.cloud.documentai.v1beta2.Document.Page.TokenOrBuilder> - getTokensOrBuilderList() { - return tokens_; - } - /** - * - * - *
-     * A list of visually detected tokens on the page.
-     * 
+ * string object_id = 2; * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Token tokens = 8; + * @return The objectId. */ - @java.lang.Override - public int getTokensCount() { - return tokens_.size(); - } + java.lang.String getObjectId(); /** * * *
-     * A list of visually detected tokens on the page.
+     * Object entity id.
      * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Page.Token tokens = 8; - */ - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Token getTokens(int index) { - return tokens_.get(index); - } - /** - * - * - *
-     * A list of visually detected tokens on the page.
-     * 
+ * string object_id = 2; * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Token tokens = 8; + * @return The bytes for objectId. */ - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.TokenOrBuilder getTokensOrBuilder( - int index) { - return tokens_.get(index); - } - - public static final int VISUAL_ELEMENTS_FIELD_NUMBER = 9; + com.google.protobuf.ByteString getObjectIdBytes(); - @SuppressWarnings("serial") - private java.util.List - visualElements_; - /** - * - * - *
-     * A list of detected non-text visual elements e.g. checkbox,
-     * signature etc. on the page.
-     * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.VisualElement visual_elements = 9; - * - */ - @java.lang.Override - public java.util.List - getVisualElementsList() { - return visualElements_; - } /** * * *
-     * A list of detected non-text visual elements e.g. checkbox,
-     * signature etc. on the page.
+     * Relationship description.
      * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.VisualElement visual_elements = 9; - * - */ - @java.lang.Override - public java.util.List< - ? extends com.google.cloud.documentai.v1beta2.Document.Page.VisualElementOrBuilder> - getVisualElementsOrBuilderList() { - return visualElements_; - } - /** - * - * - *
-     * A list of detected non-text visual elements e.g. checkbox,
-     * signature etc. on the page.
-     * 
+ * string relation = 3; * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.VisualElement visual_elements = 9; - * + * @return The relation. */ - @java.lang.Override - public int getVisualElementsCount() { - return visualElements_.size(); - } + java.lang.String getRelation(); /** * * *
-     * A list of detected non-text visual elements e.g. checkbox,
-     * signature etc. on the page.
+     * Relationship description.
      * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.VisualElement visual_elements = 9; - * - */ - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.VisualElement getVisualElements( - int index) { - return visualElements_.get(index); - } - /** - * - * - *
-     * A list of detected non-text visual elements e.g. checkbox,
-     * signature etc. on the page.
-     * 
+ * string relation = 3; * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.VisualElement visual_elements = 9; - * + * @return The bytes for relation. */ - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.VisualElementOrBuilder - getVisualElementsOrBuilder(int index) { - return visualElements_.get(index); + com.google.protobuf.ByteString getRelationBytes(); + } + /** + * + * + *
+   * Relationship between
+   * [Entities][google.cloud.documentai.v1beta2.Document.Entity].
+   * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.EntityRelation} + */ + public static final class EntityRelation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.EntityRelation) + EntityRelationOrBuilder { + private static final long serialVersionUID = 0L; + // Use EntityRelation.newBuilder() to construct. + private EntityRelation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); } - public static final int TABLES_FIELD_NUMBER = 10; - - @SuppressWarnings("serial") - private java.util.List tables_; - /** - * - * - *
-     * A list of visually detected tables on the page.
-     * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table tables = 10; - */ - @java.lang.Override - public java.util.List getTablesList() { - return tables_; - } - /** - * - * - *
-     * A list of visually detected tables on the page.
-     * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table tables = 10; - */ - @java.lang.Override - public java.util.List< - ? extends com.google.cloud.documentai.v1beta2.Document.Page.TableOrBuilder> - getTablesOrBuilderList() { - return tables_; + private EntityRelation() { + subjectId_ = ""; + objectId_ = ""; + relation_ = ""; } - /** - * - * - *
-     * A list of visually detected tables on the page.
-     * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table tables = 10; - */ + @java.lang.Override - public int getTablesCount() { - return tables_.size(); + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new EntityRelation(); } - /** - * - * - *
-     * A list of visually detected tables on the page.
-     * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table tables = 10; - */ - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.Table getTables(int index) { - return tables_.get(index); + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_EntityRelation_descriptor; } - /** - * - * - *
-     * A list of visually detected tables on the page.
-     * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table tables = 10; - */ + @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.TableOrBuilder getTablesOrBuilder( - int index) { - return tables_.get(index); + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_EntityRelation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Document.EntityRelation.class, + com.google.cloud.documentai.v1beta2.Document.EntityRelation.Builder.class); } - public static final int FORM_FIELDS_FIELD_NUMBER = 11; + public static final int SUBJECT_ID_FIELD_NUMBER = 1; @SuppressWarnings("serial") - private java.util.List formFields_; + private volatile java.lang.Object subjectId_ = ""; /** * * *
-     * A list of visually detected form fields on the page.
+     * Subject entity id.
      * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Page.FormField form_fields = 11; - * + * string subject_id = 1; + * + * @return The subjectId. */ @java.lang.Override - public java.util.List - getFormFieldsList() { - return formFields_; + public java.lang.String getSubjectId() { + java.lang.Object ref = subjectId_; + 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(); + subjectId_ = s; + return s; + } } /** * * *
-     * A list of visually detected form fields on the page.
+     * Subject entity id.
      * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Page.FormField form_fields = 11; - * + * string subject_id = 1; + * + * @return The bytes for subjectId. */ @java.lang.Override - public java.util.List< - ? extends com.google.cloud.documentai.v1beta2.Document.Page.FormFieldOrBuilder> - getFormFieldsOrBuilderList() { - return formFields_; + public com.google.protobuf.ByteString getSubjectIdBytes() { + java.lang.Object ref = subjectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subjectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } + + public static final int OBJECT_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object objectId_ = ""; /** * * *
-     * A list of visually detected form fields on the page.
+     * Object entity id.
      * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Page.FormField form_fields = 11; - * + * string object_id = 2; + * + * @return The objectId. */ @java.lang.Override - public int getFormFieldsCount() { - return formFields_.size(); + public java.lang.String getObjectId() { + java.lang.Object ref = objectId_; + 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(); + objectId_ = s; + return s; + } } /** * * *
-     * A list of visually detected form fields on the page.
+     * Object entity id.
      * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Page.FormField form_fields = 11; - * + * string object_id = 2; + * + * @return The bytes for objectId. */ @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.FormField getFormFields(int index) { - return formFields_.get(index); + public com.google.protobuf.ByteString getObjectIdBytes() { + java.lang.Object ref = objectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + objectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } + + public static final int RELATION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object relation_ = ""; /** * * *
-     * A list of visually detected form fields on the page.
+     * Relationship description.
      * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Page.FormField form_fields = 11; - * + * string relation = 3; + * + * @return The relation. */ @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page.FormFieldOrBuilder - getFormFieldsOrBuilder(int index) { - return formFields_.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 (pageNumber_ != 0) { - output.writeInt32(1, pageNumber_); - } - if (dimension_ != null) { - output.writeMessage(2, getDimension()); - } - if (layout_ != null) { - output.writeMessage(3, getLayout()); - } - for (int i = 0; i < detectedLanguages_.size(); i++) { - output.writeMessage(4, detectedLanguages_.get(i)); - } - for (int i = 0; i < blocks_.size(); i++) { - output.writeMessage(5, blocks_.get(i)); - } - for (int i = 0; i < paragraphs_.size(); i++) { - output.writeMessage(6, paragraphs_.get(i)); - } - for (int i = 0; i < lines_.size(); i++) { - output.writeMessage(7, lines_.get(i)); - } - for (int i = 0; i < tokens_.size(); i++) { - output.writeMessage(8, tokens_.get(i)); - } - for (int i = 0; i < visualElements_.size(); i++) { - output.writeMessage(9, visualElements_.get(i)); - } - for (int i = 0; i < tables_.size(); i++) { - output.writeMessage(10, tables_.get(i)); - } - for (int i = 0; i < formFields_.size(); i++) { - output.writeMessage(11, formFields_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (pageNumber_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, pageNumber_); - } - if (dimension_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDimension()); - } - if (layout_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getLayout()); - } - for (int i = 0; i < detectedLanguages_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(4, detectedLanguages_.get(i)); - } - for (int i = 0; i < blocks_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, blocks_.get(i)); - } - for (int i = 0; i < paragraphs_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, paragraphs_.get(i)); - } - for (int i = 0; i < lines_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, lines_.get(i)); - } - for (int i = 0; i < tokens_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, tokens_.get(i)); - } - for (int i = 0; i < visualElements_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, visualElements_.get(i)); - } - for (int i = 0; i < tables_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, tables_.get(i)); - } - for (int i = 0; i < formFields_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, formFields_.get(i)); - } - size += getUnknownFields().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.v1beta2.Document.Page)) { - return super.equals(obj); - } - com.google.cloud.documentai.v1beta2.Document.Page other = - (com.google.cloud.documentai.v1beta2.Document.Page) obj; - - if (getPageNumber() != other.getPageNumber()) return false; - if (hasDimension() != other.hasDimension()) return false; - if (hasDimension()) { - if (!getDimension().equals(other.getDimension())) return false; - } - if (hasLayout() != other.hasLayout()) return false; - if (hasLayout()) { - if (!getLayout().equals(other.getLayout())) return false; - } - if (!getDetectedLanguagesList().equals(other.getDetectedLanguagesList())) return false; - if (!getBlocksList().equals(other.getBlocksList())) return false; - if (!getParagraphsList().equals(other.getParagraphsList())) return false; - if (!getLinesList().equals(other.getLinesList())) return false; - if (!getTokensList().equals(other.getTokensList())) return false; - if (!getVisualElementsList().equals(other.getVisualElementsList())) return false; - if (!getTablesList().equals(other.getTablesList())) return false; - if (!getFormFieldsList().equals(other.getFormFieldsList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + PAGE_NUMBER_FIELD_NUMBER; - hash = (53 * hash) + getPageNumber(); - if (hasDimension()) { - hash = (37 * hash) + DIMENSION_FIELD_NUMBER; - hash = (53 * hash) + getDimension().hashCode(); - } - if (hasLayout()) { - hash = (37 * hash) + LAYOUT_FIELD_NUMBER; - hash = (53 * hash) + getLayout().hashCode(); - } - if (getDetectedLanguagesCount() > 0) { - hash = (37 * hash) + DETECTED_LANGUAGES_FIELD_NUMBER; - hash = (53 * hash) + getDetectedLanguagesList().hashCode(); - } - if (getBlocksCount() > 0) { - hash = (37 * hash) + BLOCKS_FIELD_NUMBER; - hash = (53 * hash) + getBlocksList().hashCode(); - } - if (getParagraphsCount() > 0) { - hash = (37 * hash) + PARAGRAPHS_FIELD_NUMBER; - hash = (53 * hash) + getParagraphsList().hashCode(); - } - if (getLinesCount() > 0) { - hash = (37 * hash) + LINES_FIELD_NUMBER; - hash = (53 * hash) + getLinesList().hashCode(); - } - if (getTokensCount() > 0) { - hash = (37 * hash) + TOKENS_FIELD_NUMBER; - hash = (53 * hash) + getTokensList().hashCode(); - } - if (getVisualElementsCount() > 0) { - hash = (37 * hash) + VISUAL_ELEMENTS_FIELD_NUMBER; - hash = (53 * hash) + getVisualElementsList().hashCode(); - } - if (getTablesCount() > 0) { - hash = (37 * hash) + TABLES_FIELD_NUMBER; - hash = (53 * hash) + getTablesList().hashCode(); - } - if (getFormFieldsCount() > 0) { - hash = (37 * hash) + FORM_FIELDS_FIELD_NUMBER; - hash = (53 * hash) + getFormFieldsList().hashCode(); + public java.lang.String getRelation() { + java.lang.Object ref = relation_; + 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(); + relation_ = s; + return s; } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.documentai.v1beta2.Document.Page parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.documentai.v1beta2.Document.Page 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.v1beta2.Document.Page parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.documentai.v1beta2.Document.Page 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.v1beta2.Document.Page parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.documentai.v1beta2.Document.Page parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.documentai.v1beta2.Document.Page parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.documentai.v1beta2.Document.Page 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.v1beta2.Document.Page parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.documentai.v1beta2.Document.Page 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.v1beta2.Document.Page parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.documentai.v1beta2.Document.Page 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.v1beta2.Document.Page 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 page in a [Document][google.cloud.documentai.v1beta2.Document].
+     * Relationship description.
      * 
* - * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Page} + * string relation = 3; + * + * @return The bytes for relation. */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.Page) - com.google.cloud.documentai.v1beta2.Document.PageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1beta2.Document.Page.class, - com.google.cloud.documentai.v1beta2.Document.Page.Builder.class); - } - - // Construct using com.google.cloud.documentai.v1beta2.Document.Page.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - pageNumber_ = 0; - dimension_ = null; - if (dimensionBuilder_ != null) { - dimensionBuilder_.dispose(); - dimensionBuilder_ = null; - } - layout_ = null; - if (layoutBuilder_ != null) { - layoutBuilder_.dispose(); - layoutBuilder_ = null; - } - if (detectedLanguagesBuilder_ == null) { - detectedLanguages_ = java.util.Collections.emptyList(); - } else { - detectedLanguages_ = null; - detectedLanguagesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - if (blocksBuilder_ == null) { - blocks_ = java.util.Collections.emptyList(); - } else { - blocks_ = null; - blocksBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000010); - if (paragraphsBuilder_ == null) { - paragraphs_ = java.util.Collections.emptyList(); - } else { - paragraphs_ = null; - paragraphsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000020); - if (linesBuilder_ == null) { - lines_ = java.util.Collections.emptyList(); - } else { - lines_ = null; - linesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000040); - if (tokensBuilder_ == null) { - tokens_ = java.util.Collections.emptyList(); - } else { - tokens_ = null; - tokensBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000080); - if (visualElementsBuilder_ == null) { - visualElements_ = java.util.Collections.emptyList(); - } else { - visualElements_ = null; - visualElementsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000100); - if (tablesBuilder_ == null) { - tables_ = java.util.Collections.emptyList(); - } else { - tables_ = null; - tablesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000200); - if (formFieldsBuilder_ == null) { - formFields_ = java.util.Collections.emptyList(); - } else { - formFields_ = null; - formFieldsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000400); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Page_descriptor; + @java.lang.Override + public com.google.protobuf.ByteString getRelationBytes() { + java.lang.Object ref = relation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + relation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } + } - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page getDefaultInstanceForType() { - return com.google.cloud.documentai.v1beta2.Document.Page.getDefaultInstance(); - } + private byte memoizedIsInitialized = -1; - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page build() { - com.google.cloud.documentai.v1beta2.Document.Page result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page buildPartial() { - com.google.cloud.documentai.v1beta2.Document.Page result = - new com.google.cloud.documentai.v1beta2.Document.Page(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } + memoizedIsInitialized = 1; + return true; + } - private void buildPartialRepeatedFields( - com.google.cloud.documentai.v1beta2.Document.Page result) { - if (detectedLanguagesBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - detectedLanguages_ = java.util.Collections.unmodifiableList(detectedLanguages_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.detectedLanguages_ = detectedLanguages_; - } else { - result.detectedLanguages_ = detectedLanguagesBuilder_.build(); - } - if (blocksBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0)) { - blocks_ = java.util.Collections.unmodifiableList(blocks_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.blocks_ = blocks_; - } else { - result.blocks_ = blocksBuilder_.build(); - } - if (paragraphsBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0)) { - paragraphs_ = java.util.Collections.unmodifiableList(paragraphs_); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.paragraphs_ = paragraphs_; - } else { - result.paragraphs_ = paragraphsBuilder_.build(); - } - if (linesBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0)) { - lines_ = java.util.Collections.unmodifiableList(lines_); - bitField0_ = (bitField0_ & ~0x00000040); - } - result.lines_ = lines_; - } else { - result.lines_ = linesBuilder_.build(); - } - if (tokensBuilder_ == null) { - if (((bitField0_ & 0x00000080) != 0)) { - tokens_ = java.util.Collections.unmodifiableList(tokens_); - bitField0_ = (bitField0_ & ~0x00000080); - } - result.tokens_ = tokens_; - } else { - result.tokens_ = tokensBuilder_.build(); - } - if (visualElementsBuilder_ == null) { - if (((bitField0_ & 0x00000100) != 0)) { - visualElements_ = java.util.Collections.unmodifiableList(visualElements_); - bitField0_ = (bitField0_ & ~0x00000100); - } - result.visualElements_ = visualElements_; - } else { - result.visualElements_ = visualElementsBuilder_.build(); - } - if (tablesBuilder_ == null) { - if (((bitField0_ & 0x00000200) != 0)) { - tables_ = java.util.Collections.unmodifiableList(tables_); - bitField0_ = (bitField0_ & ~0x00000200); - } - result.tables_ = tables_; - } else { - result.tables_ = tablesBuilder_.build(); - } - if (formFieldsBuilder_ == null) { - if (((bitField0_ & 0x00000400) != 0)) { - formFields_ = java.util.Collections.unmodifiableList(formFields_); - bitField0_ = (bitField0_ & ~0x00000400); - } - result.formFields_ = formFields_; - } else { - result.formFields_ = formFieldsBuilder_.build(); - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subjectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, subjectId_); } - - private void buildPartial0(com.google.cloud.documentai.v1beta2.Document.Page result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.pageNumber_ = pageNumber_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.dimension_ = dimensionBuilder_ == null ? dimension_ : dimensionBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.layout_ = layoutBuilder_ == null ? layout_ : layoutBuilder_.build(); - } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(objectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, objectId_); } - - @java.lang.Override - public Builder clone() { - return super.clone(); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(relation_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, relation_); } + getUnknownFields().writeTo(output); + } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subjectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, subjectId_); } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(objectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, objectId_); } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(relation_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, relation_); } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.documentai.v1beta2.Document.Page) { - return mergeFrom((com.google.cloud.documentai.v1beta2.Document.Page) other); - } else { - super.mergeFrom(other); - return this; - } + if (!(obj instanceof com.google.cloud.documentai.v1beta2.Document.EntityRelation)) { + return super.equals(obj); } + com.google.cloud.documentai.v1beta2.Document.EntityRelation other = + (com.google.cloud.documentai.v1beta2.Document.EntityRelation) obj; - public Builder mergeFrom(com.google.cloud.documentai.v1beta2.Document.Page other) { - if (other == com.google.cloud.documentai.v1beta2.Document.Page.getDefaultInstance()) - return this; - if (other.getPageNumber() != 0) { - setPageNumber(other.getPageNumber()); - } - if (other.hasDimension()) { - mergeDimension(other.getDimension()); - } - if (other.hasLayout()) { - mergeLayout(other.getLayout()); - } - if (detectedLanguagesBuilder_ == null) { - if (!other.detectedLanguages_.isEmpty()) { - if (detectedLanguages_.isEmpty()) { - detectedLanguages_ = other.detectedLanguages_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.addAll(other.detectedLanguages_); - } - onChanged(); - } - } else { - if (!other.detectedLanguages_.isEmpty()) { - if (detectedLanguagesBuilder_.isEmpty()) { - detectedLanguagesBuilder_.dispose(); - detectedLanguagesBuilder_ = null; - detectedLanguages_ = other.detectedLanguages_; - bitField0_ = (bitField0_ & ~0x00000008); - detectedLanguagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getDetectedLanguagesFieldBuilder() - : null; - } else { - detectedLanguagesBuilder_.addAllMessages(other.detectedLanguages_); - } - } - } - if (blocksBuilder_ == null) { - if (!other.blocks_.isEmpty()) { - if (blocks_.isEmpty()) { - blocks_ = other.blocks_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureBlocksIsMutable(); - blocks_.addAll(other.blocks_); - } - onChanged(); - } - } else { - if (!other.blocks_.isEmpty()) { - if (blocksBuilder_.isEmpty()) { - blocksBuilder_.dispose(); - blocksBuilder_ = null; - blocks_ = other.blocks_; - bitField0_ = (bitField0_ & ~0x00000010); - blocksBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getBlocksFieldBuilder() - : null; - } else { - blocksBuilder_.addAllMessages(other.blocks_); - } - } - } - if (paragraphsBuilder_ == null) { - if (!other.paragraphs_.isEmpty()) { - if (paragraphs_.isEmpty()) { - paragraphs_ = other.paragraphs_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureParagraphsIsMutable(); - paragraphs_.addAll(other.paragraphs_); - } - onChanged(); - } - } else { - if (!other.paragraphs_.isEmpty()) { - if (paragraphsBuilder_.isEmpty()) { - paragraphsBuilder_.dispose(); - paragraphsBuilder_ = null; - paragraphs_ = other.paragraphs_; - bitField0_ = (bitField0_ & ~0x00000020); - paragraphsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getParagraphsFieldBuilder() - : null; - } else { - paragraphsBuilder_.addAllMessages(other.paragraphs_); - } - } - } - if (linesBuilder_ == null) { - if (!other.lines_.isEmpty()) { - if (lines_.isEmpty()) { - lines_ = other.lines_; - bitField0_ = (bitField0_ & ~0x00000040); - } else { - ensureLinesIsMutable(); - lines_.addAll(other.lines_); - } - onChanged(); - } - } else { - if (!other.lines_.isEmpty()) { - if (linesBuilder_.isEmpty()) { - linesBuilder_.dispose(); - linesBuilder_ = null; - lines_ = other.lines_; - bitField0_ = (bitField0_ & ~0x00000040); - linesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getLinesFieldBuilder() - : null; - } else { - linesBuilder_.addAllMessages(other.lines_); - } - } - } - if (tokensBuilder_ == null) { - if (!other.tokens_.isEmpty()) { - if (tokens_.isEmpty()) { - tokens_ = other.tokens_; - bitField0_ = (bitField0_ & ~0x00000080); - } else { - ensureTokensIsMutable(); - tokens_.addAll(other.tokens_); - } - onChanged(); - } - } else { - if (!other.tokens_.isEmpty()) { - if (tokensBuilder_.isEmpty()) { - tokensBuilder_.dispose(); - tokensBuilder_ = null; - tokens_ = other.tokens_; - bitField0_ = (bitField0_ & ~0x00000080); - tokensBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getTokensFieldBuilder() - : null; - } else { - tokensBuilder_.addAllMessages(other.tokens_); - } - } - } - if (visualElementsBuilder_ == null) { - if (!other.visualElements_.isEmpty()) { - if (visualElements_.isEmpty()) { - visualElements_ = other.visualElements_; - bitField0_ = (bitField0_ & ~0x00000100); - } else { - ensureVisualElementsIsMutable(); - visualElements_.addAll(other.visualElements_); - } - onChanged(); - } - } else { - if (!other.visualElements_.isEmpty()) { - if (visualElementsBuilder_.isEmpty()) { - visualElementsBuilder_.dispose(); - visualElementsBuilder_ = null; - visualElements_ = other.visualElements_; - bitField0_ = (bitField0_ & ~0x00000100); - visualElementsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getVisualElementsFieldBuilder() - : null; - } else { - visualElementsBuilder_.addAllMessages(other.visualElements_); - } - } - } - if (tablesBuilder_ == null) { - if (!other.tables_.isEmpty()) { - if (tables_.isEmpty()) { - tables_ = other.tables_; - bitField0_ = (bitField0_ & ~0x00000200); - } else { - ensureTablesIsMutable(); - tables_.addAll(other.tables_); - } - onChanged(); - } - } else { - if (!other.tables_.isEmpty()) { - if (tablesBuilder_.isEmpty()) { - tablesBuilder_.dispose(); - tablesBuilder_ = null; - tables_ = other.tables_; - bitField0_ = (bitField0_ & ~0x00000200); - tablesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getTablesFieldBuilder() - : null; - } else { - tablesBuilder_.addAllMessages(other.tables_); - } - } - } - if (formFieldsBuilder_ == null) { - if (!other.formFields_.isEmpty()) { - if (formFields_.isEmpty()) { - formFields_ = other.formFields_; - bitField0_ = (bitField0_ & ~0x00000400); - } else { - ensureFormFieldsIsMutable(); - formFields_.addAll(other.formFields_); - } - onChanged(); - } - } else { - if (!other.formFields_.isEmpty()) { - if (formFieldsBuilder_.isEmpty()) { - formFieldsBuilder_.dispose(); - formFieldsBuilder_ = null; - formFields_ = other.formFields_; - bitField0_ = (bitField0_ & ~0x00000400); - formFieldsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getFormFieldsFieldBuilder() - : null; - } else { - formFieldsBuilder_.addAllMessages(other.formFields_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; + if (!getSubjectId().equals(other.getSubjectId())) return false; + if (!getObjectId().equals(other.getObjectId())) return false; + if (!getRelation().equals(other.getRelation())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + SUBJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getSubjectId().hashCode(); + hash = (37 * hash) + OBJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getObjectId().hashCode(); + hash = (37 * hash) + RELATION_FIELD_NUMBER; + hash = (53 * hash) + getRelation().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta2.Document.EntityRelation parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.EntityRelation 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.v1beta2.Document.EntityRelation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.EntityRelation 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.v1beta2.Document.EntityRelation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.EntityRelation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta2.Document.EntityRelation parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.EntityRelation 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.v1beta2.Document.EntityRelation parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.EntityRelation 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.v1beta2.Document.EntityRelation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.EntityRelation 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 final boolean isInitialized() { - return true; + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.documentai.v1beta2.Document.EntityRelation 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; + } + /** + * + * + *
+     * Relationship between
+     * [Entities][google.cloud.documentai.v1beta2.Document.Entity].
+     * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.EntityRelation} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.EntityRelation) + com.google.cloud.documentai.v1beta2.Document.EntityRelationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_EntityRelation_descriptor; } @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - pageNumber_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 18: - { - input.readMessage(getDimensionFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - input.readMessage(getLayoutFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage m = - input.readMessage( - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage - .parser(), - extensionRegistry); - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(m); - } else { - detectedLanguagesBuilder_.addMessage(m); - } - break; - } // case 34 - case 42: - { - com.google.cloud.documentai.v1beta2.Document.Page.Block m = - input.readMessage( - com.google.cloud.documentai.v1beta2.Document.Page.Block.parser(), - extensionRegistry); - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - blocks_.add(m); - } else { - blocksBuilder_.addMessage(m); - } - break; - } // case 42 - case 50: - { - com.google.cloud.documentai.v1beta2.Document.Page.Paragraph m = - input.readMessage( - com.google.cloud.documentai.v1beta2.Document.Page.Paragraph.parser(), - extensionRegistry); - if (paragraphsBuilder_ == null) { - ensureParagraphsIsMutable(); - paragraphs_.add(m); - } else { - paragraphsBuilder_.addMessage(m); - } - break; - } // case 50 - case 58: - { - com.google.cloud.documentai.v1beta2.Document.Page.Line m = - input.readMessage( - com.google.cloud.documentai.v1beta2.Document.Page.Line.parser(), - extensionRegistry); - if (linesBuilder_ == null) { - ensureLinesIsMutable(); - lines_.add(m); - } else { - linesBuilder_.addMessage(m); - } - break; - } // case 58 - case 66: - { - com.google.cloud.documentai.v1beta2.Document.Page.Token m = - input.readMessage( - com.google.cloud.documentai.v1beta2.Document.Page.Token.parser(), - extensionRegistry); - if (tokensBuilder_ == null) { - ensureTokensIsMutable(); - tokens_.add(m); - } else { - tokensBuilder_.addMessage(m); - } - break; - } // case 66 - case 74: - { - com.google.cloud.documentai.v1beta2.Document.Page.VisualElement m = - input.readMessage( - com.google.cloud.documentai.v1beta2.Document.Page.VisualElement.parser(), - extensionRegistry); - if (visualElementsBuilder_ == null) { - ensureVisualElementsIsMutable(); - visualElements_.add(m); - } else { - visualElementsBuilder_.addMessage(m); - } - break; - } // case 74 - case 82: - { - com.google.cloud.documentai.v1beta2.Document.Page.Table m = - input.readMessage( - com.google.cloud.documentai.v1beta2.Document.Page.Table.parser(), - extensionRegistry); - if (tablesBuilder_ == null) { - ensureTablesIsMutable(); - tables_.add(m); - } else { - tablesBuilder_.addMessage(m); - } - break; - } // case 82 - case 90: - { - com.google.cloud.documentai.v1beta2.Document.Page.FormField m = - input.readMessage( - com.google.cloud.documentai.v1beta2.Document.Page.FormField.parser(), - extensionRegistry); - if (formFieldsBuilder_ == null) { - ensureFormFieldsIsMutable(); - formFields_.add(m); - } else { - formFieldsBuilder_.addMessage(m); - } - break; - } // case 90 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_EntityRelation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Document.EntityRelation.class, + com.google.cloud.documentai.v1beta2.Document.EntityRelation.Builder.class); } - private int bitField0_; + // Construct using com.google.cloud.documentai.v1beta2.Document.EntityRelation.newBuilder() + private Builder() {} - private int pageNumber_; - /** - * - * - *
-       * 1-based index for current [Page][google.cloud.documentai.v1beta2.Document.Page] in a parent [Document][google.cloud.documentai.v1beta2.Document].
-       * Useful when a page is taken out of a [Document][google.cloud.documentai.v1beta2.Document] for individual
-       * processing.
-       * 
- * - * int32 page_number = 1; - * - * @return The pageNumber. - */ - @java.lang.Override - public int getPageNumber() { - return pageNumber_; + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); } - /** - * - * - *
-       * 1-based index for current [Page][google.cloud.documentai.v1beta2.Document.Page] in a parent [Document][google.cloud.documentai.v1beta2.Document].
-       * Useful when a page is taken out of a [Document][google.cloud.documentai.v1beta2.Document] for individual
-       * processing.
-       * 
- * - * int32 page_number = 1; - * - * @param value The pageNumber to set. - * @return This builder for chaining. - */ - public Builder setPageNumber(int value) { - pageNumber_ = value; - bitField0_ |= 0x00000001; - onChanged(); + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + subjectId_ = ""; + objectId_ = ""; + relation_ = ""; return this; } - /** - * - * - *
-       * 1-based index for current [Page][google.cloud.documentai.v1beta2.Document.Page] in a parent [Document][google.cloud.documentai.v1beta2.Document].
-       * Useful when a page is taken out of a [Document][google.cloud.documentai.v1beta2.Document] for individual
-       * processing.
-       * 
- * - * int32 page_number = 1; - * - * @return This builder for chaining. - */ - public Builder clearPageNumber() { - bitField0_ = (bitField0_ & ~0x00000001); - pageNumber_ = 0; - onChanged(); - return this; + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_EntityRelation_descriptor; } - private com.google.cloud.documentai.v1beta2.Document.Page.Dimension dimension_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Dimension, - com.google.cloud.documentai.v1beta2.Document.Page.Dimension.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.DimensionOrBuilder> - dimensionBuilder_; - /** - * - * - *
-       * Physical dimension of the page.
-       * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Dimension dimension = 2; - * - * @return Whether the dimension field is set. - */ - public boolean hasDimension() { - return ((bitField0_ & 0x00000002) != 0); + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.EntityRelation + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta2.Document.EntityRelation.getDefaultInstance(); } - /** - * - * - *
-       * Physical dimension of the page.
-       * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Dimension dimension = 2; - * - * @return The dimension. - */ - public com.google.cloud.documentai.v1beta2.Document.Page.Dimension getDimension() { - if (dimensionBuilder_ == null) { - return dimension_ == null - ? com.google.cloud.documentai.v1beta2.Document.Page.Dimension.getDefaultInstance() - : dimension_; - } else { - return dimensionBuilder_.getMessage(); + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.EntityRelation build() { + com.google.cloud.documentai.v1beta2.Document.EntityRelation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); } + return result; } - /** - * - * - *
-       * Physical dimension of the page.
-       * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Dimension dimension = 2; - */ - public Builder setDimension( - com.google.cloud.documentai.v1beta2.Document.Page.Dimension value) { - if (dimensionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - dimension_ = value; - } else { - dimensionBuilder_.setMessage(value); + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.EntityRelation buildPartial() { + com.google.cloud.documentai.v1beta2.Document.EntityRelation result = + new com.google.cloud.documentai.v1beta2.Document.EntityRelation(this); + if (bitField0_ != 0) { + buildPartial0(result); } - bitField0_ |= 0x00000002; - onChanged(); - return this; + onBuilt(); + return result; } - /** - * - * - *
-       * Physical dimension of the page.
-       * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Dimension dimension = 2; - */ - public Builder setDimension( - com.google.cloud.documentai.v1beta2.Document.Page.Dimension.Builder builderForValue) { - if (dimensionBuilder_ == null) { - dimension_ = builderForValue.build(); - } else { - dimensionBuilder_.setMessage(builderForValue.build()); + + private void buildPartial0( + com.google.cloud.documentai.v1beta2.Document.EntityRelation result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.subjectId_ = subjectId_; } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-       * Physical dimension of the page.
-       * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Dimension dimension = 2; - */ - public Builder mergeDimension( - com.google.cloud.documentai.v1beta2.Document.Page.Dimension value) { - if (dimensionBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && dimension_ != null - && dimension_ - != com.google.cloud.documentai.v1beta2.Document.Page.Dimension - .getDefaultInstance()) { - getDimensionBuilder().mergeFrom(value); - } else { - dimension_ = value; - } - } else { - dimensionBuilder_.mergeFrom(value); + if (((from_bitField0_ & 0x00000002) != 0)) { + result.objectId_ = objectId_; } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-       * Physical dimension of the page.
-       * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Dimension dimension = 2; - */ - public Builder clearDimension() { - bitField0_ = (bitField0_ & ~0x00000002); - dimension_ = null; - if (dimensionBuilder_ != null) { - dimensionBuilder_.dispose(); - dimensionBuilder_ = null; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.relation_ = relation_; } - onChanged(); - return this; } - /** - * - * - *
-       * Physical dimension of the page.
-       * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Dimension dimension = 2; - */ - public com.google.cloud.documentai.v1beta2.Document.Page.Dimension.Builder - getDimensionBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getDimensionFieldBuilder().getBuilder(); + + @java.lang.Override + public Builder clone() { + return super.clone(); } - /** - * - * - *
-       * Physical dimension of the page.
-       * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Dimension dimension = 2; - */ - public com.google.cloud.documentai.v1beta2.Document.Page.DimensionOrBuilder - getDimensionOrBuilder() { - if (dimensionBuilder_ != null) { - return dimensionBuilder_.getMessageOrBuilder(); - } else { - return dimension_ == null - ? com.google.cloud.documentai.v1beta2.Document.Page.Dimension.getDefaultInstance() - : dimension_; - } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); } - /** - * - * - *
-       * Physical dimension of the page.
-       * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Dimension dimension = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Dimension, - com.google.cloud.documentai.v1beta2.Document.Page.Dimension.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.DimensionOrBuilder> - getDimensionFieldBuilder() { - if (dimensionBuilder_ == null) { - dimensionBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Dimension, - com.google.cloud.documentai.v1beta2.Document.Page.Dimension.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.DimensionOrBuilder>( - getDimension(), getParentForChildren(), isClean()); - dimension_ = null; - } - return dimensionBuilder_; + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); } - private com.google.cloud.documentai.v1beta2.Document.Page.Layout layout_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Layout, - com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder> - layoutBuilder_; - /** - * - * - *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the page.
-       * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 3; - * - * @return Whether the layout field is set. - */ - public boolean hasLayout() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * - * - *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the page.
-       * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 3; - * - * @return The layout. - */ - public com.google.cloud.documentai.v1beta2.Document.Page.Layout getLayout() { - if (layoutBuilder_ == null) { - return layout_ == null - ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() - : layout_; + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta2.Document.EntityRelation) { + return mergeFrom((com.google.cloud.documentai.v1beta2.Document.EntityRelation) other); } else { - return layoutBuilder_.getMessage(); + super.mergeFrom(other); + return this; } } - /** - * - * - *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the page.
-       * 
- * - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 3; - */ - public Builder setLayout(com.google.cloud.documentai.v1beta2.Document.Page.Layout value) { - if (layoutBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - layout_ = value; - } else { - layoutBuilder_.setMessage(value); + + public Builder mergeFrom(com.google.cloud.documentai.v1beta2.Document.EntityRelation other) { + if (other + == com.google.cloud.documentai.v1beta2.Document.EntityRelation.getDefaultInstance()) + return this; + if (!other.getSubjectId().isEmpty()) { + subjectId_ = other.subjectId_; + bitField0_ |= 0x00000001; + onChanged(); } - bitField0_ |= 0x00000004; + if (!other.getObjectId().isEmpty()) { + objectId_ = other.objectId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getRelation().isEmpty()) { + relation_ = other.relation_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + subjectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + objectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + relation_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object subjectId_ = ""; /** * * *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the page.
+       * Subject entity id.
        * 
* - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 3; + * string subject_id = 1; + * + * @return The subjectId. */ - public Builder setLayout( - com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder builderForValue) { - if (layoutBuilder_ == null) { - layout_ = builderForValue.build(); + public java.lang.String getSubjectId() { + java.lang.Object ref = subjectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subjectId_ = s; + return s; } else { - layoutBuilder_.setMessage(builderForValue.build()); + return (java.lang.String) ref; } - bitField0_ |= 0x00000004; - onChanged(); - return this; } /** * * *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the page.
+       * Subject entity id.
        * 
* - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 3; + * string subject_id = 1; + * + * @return The bytes for subjectId. */ - public Builder mergeLayout(com.google.cloud.documentai.v1beta2.Document.Page.Layout value) { - if (layoutBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && layout_ != null - && layout_ - != com.google.cloud.documentai.v1beta2.Document.Page.Layout - .getDefaultInstance()) { - getLayoutBuilder().mergeFrom(value); - } else { - layout_ = value; - } + public com.google.protobuf.ByteString getSubjectIdBytes() { + java.lang.Object ref = subjectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subjectId_ = b; + return b; } else { - layoutBuilder_.mergeFrom(value); + return (com.google.protobuf.ByteString) ref; } - bitField0_ |= 0x00000004; - onChanged(); - return this; } /** * * *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the page.
+       * Subject entity id.
        * 
* - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 3; + * string subject_id = 1; + * + * @param value The subjectId to set. + * @return This builder for chaining. */ - public Builder clearLayout() { - bitField0_ = (bitField0_ & ~0x00000004); - layout_ = null; - if (layoutBuilder_ != null) { - layoutBuilder_.dispose(); - layoutBuilder_ = null; + public Builder setSubjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } + subjectId_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -27915,1370 +52905,1828 @@ public Builder clearLayout() { * * *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the page.
+       * Subject entity id.
        * 
* - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 3; + * string subject_id = 1; + * + * @return This builder for chaining. */ - public com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder getLayoutBuilder() { - bitField0_ |= 0x00000004; + public Builder clearSubjectId() { + subjectId_ = getDefaultInstance().getSubjectId(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); - return getLayoutFieldBuilder().getBuilder(); + return this; } /** * * *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the page.
+       * Subject entity id.
        * 
* - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 3; - */ - public com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder - getLayoutOrBuilder() { - if (layoutBuilder_ != null) { - return layoutBuilder_.getMessageOrBuilder(); - } else { - return layout_ == null - ? com.google.cloud.documentai.v1beta2.Document.Page.Layout.getDefaultInstance() - : layout_; - } - } - /** - * - * - *
-       * [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the page.
-       * 
+ * string subject_id = 1; * - * .google.cloud.documentai.v1beta2.Document.Page.Layout layout = 3; + * @param value The bytes for subjectId to set. + * @return This builder for chaining. */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Layout, - com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder> - getLayoutFieldBuilder() { - if (layoutBuilder_ == null) { - layoutBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Layout, - com.google.cloud.documentai.v1beta2.Document.Page.Layout.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.LayoutOrBuilder>( - getLayout(), getParentForChildren(), isClean()); - layout_ = null; - } - return layoutBuilder_; - } - - private java.util.List - detectedLanguages_ = java.util.Collections.emptyList(); - - private void ensureDetectedLanguagesIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - detectedLanguages_ = - new java.util.ArrayList< - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage>( - detectedLanguages_); - bitField0_ |= 0x00000008; + public Builder setSubjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } + checkByteStringIsUtf8(value); + subjectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> - detectedLanguagesBuilder_; - + private java.lang.Object objectId_ = ""; /** * * *
-       * A list of detected languages together with confidence.
+       * Object entity id.
        * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * - */ - public java.util.List - getDetectedLanguagesList() { - if (detectedLanguagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(detectedLanguages_); - } else { - return detectedLanguagesBuilder_.getMessageList(); - } - } - /** - * - * - *
-       * A list of detected languages together with confidence.
-       * 
+ * string object_id = 2; * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * + * @return The objectId. */ - public int getDetectedLanguagesCount() { - if (detectedLanguagesBuilder_ == null) { - return detectedLanguages_.size(); + public java.lang.String getObjectId() { + java.lang.Object ref = objectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + objectId_ = s; + return s; } else { - return detectedLanguagesBuilder_.getCount(); + return (java.lang.String) ref; } } /** * * *
-       * A list of detected languages together with confidence.
+       * Object entity id.
        * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * - */ - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage - getDetectedLanguages(int index) { - if (detectedLanguagesBuilder_ == null) { - return detectedLanguages_.get(index); - } else { - return detectedLanguagesBuilder_.getMessage(index); - } - } - /** - * - * - *
-       * A list of detected languages together with confidence.
-       * 
+ * string object_id = 2; * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * + * @return The bytes for objectId. */ - public Builder setDetectedLanguages( - int index, com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { - if (detectedLanguagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.set(index, value); - onChanged(); + public com.google.protobuf.ByteString getObjectIdBytes() { + java.lang.Object ref = objectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + objectId_ = b; + return b; } else { - detectedLanguagesBuilder_.setMessage(index, value); + return (com.google.protobuf.ByteString) ref; } - return this; } /** * * *
-       * A list of detected languages together with confidence.
+       * Object entity id.
        * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * - */ - public Builder setDetectedLanguages( - int index, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder - builderForValue) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.set(index, builderForValue.build()); - onChanged(); - } else { - detectedLanguagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-       * A list of detected languages together with confidence.
-       * 
+ * string object_id = 2; * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * + * @param value The objectId to set. + * @return This builder for chaining. */ - public Builder addDetectedLanguages( - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { - if (detectedLanguagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(value); - onChanged(); - } else { - detectedLanguagesBuilder_.addMessage(value); + public Builder setObjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } + objectId_ = value; + bitField0_ |= 0x00000002; + onChanged(); return this; } /** * * *
-       * A list of detected languages together with confidence.
+       * Object entity id.
        * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * + * string object_id = 2; + * + * @return This builder for chaining. */ - public Builder addDetectedLanguages( - int index, com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage value) { - if (detectedLanguagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(index, value); - onChanged(); - } else { - detectedLanguagesBuilder_.addMessage(index, value); - } + public Builder clearObjectId() { + objectId_ = getDefaultInstance().getObjectId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); return this; } /** * * *
-       * A list of detected languages together with confidence.
+       * Object entity id.
        * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * + * string object_id = 2; + * + * @param value The bytes for objectId to set. + * @return This builder for chaining. */ - public Builder addDetectedLanguages( - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder - builderForValue) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(builderForValue.build()); - onChanged(); - } else { - detectedLanguagesBuilder_.addMessage(builderForValue.build()); + public Builder setObjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } + checkByteStringIsUtf8(value); + objectId_ = value; + bitField0_ |= 0x00000002; + onChanged(); return this; } + + private java.lang.Object relation_ = ""; /** * * *
-       * A list of detected languages together with confidence.
+       * Relationship description.
        * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * + * string relation = 3; + * + * @return The relation. */ - public Builder addDetectedLanguages( - int index, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder - builderForValue) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(index, builderForValue.build()); - onChanged(); + public java.lang.String getRelation() { + java.lang.Object ref = relation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + relation_ = s; + return s; } else { - detectedLanguagesBuilder_.addMessage(index, builderForValue.build()); + return (java.lang.String) ref; } - return this; } /** * * *
-       * A list of detected languages together with confidence.
+       * Relationship description.
        * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * + * string relation = 3; + * + * @return The bytes for relation. */ - public Builder addAllDetectedLanguages( - java.lang.Iterable< - ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage> - values) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, detectedLanguages_); - onChanged(); + public com.google.protobuf.ByteString getRelationBytes() { + java.lang.Object ref = relation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + relation_ = b; + return b; } else { - detectedLanguagesBuilder_.addAllMessages(values); + return (com.google.protobuf.ByteString) ref; } - return this; } /** * * *
-       * A list of detected languages together with confidence.
+       * Relationship description.
        * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * + * string relation = 3; + * + * @param value The relation to set. + * @return This builder for chaining. */ - public Builder clearDetectedLanguages() { - if (detectedLanguagesBuilder_ == null) { - detectedLanguages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - detectedLanguagesBuilder_.clear(); + public Builder setRelation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } + relation_ = value; + bitField0_ |= 0x00000004; + onChanged(); return this; } /** * * *
-       * A list of detected languages together with confidence.
+       * Relationship description.
        * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * + * string relation = 3; + * + * @return This builder for chaining. */ - public Builder removeDetectedLanguages(int index) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.remove(index); - onChanged(); - } else { - detectedLanguagesBuilder_.remove(index); - } + public Builder clearRelation() { + relation_ = getDefaultInstance().getRelation(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); return this; } /** * * *
-       * A list of detected languages together with confidence.
+       * Relationship description.
        * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * + * string relation = 3; + * + * @param value The bytes for relation to set. + * @return This builder for chaining. */ - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder - getDetectedLanguagesBuilder(int index) { - return getDetectedLanguagesFieldBuilder().getBuilder(index); + public Builder setRelationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + relation_ = value; + bitField0_ |= 0x00000004; + 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.v1beta2.Document.EntityRelation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.EntityRelation) + private static final com.google.cloud.documentai.v1beta2.Document.EntityRelation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta2.Document.EntityRelation(); + } + + public static com.google.cloud.documentai.v1beta2.Document.EntityRelation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EntityRelation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.EntityRelation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TextAnchorOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.TextAnchor) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The text segments from the
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; + * + */ + java.util.List + getTextSegmentsList(); + /** + * + * + *
+     * The text segments from the
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; + * + */ + com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment getTextSegments(int index); + /** + * + * + *
+     * The text segments from the
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; + * + */ + int getTextSegmentsCount(); + /** + * + * + *
+     * The text segments from the
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; + * + */ + java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegmentOrBuilder> + getTextSegmentsOrBuilderList(); + /** + * + * + *
+     * The text segments from the
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; + * + */ + com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegmentOrBuilder + getTextSegmentsOrBuilder(int index); + + /** + * + * + *
+     * Contains the content of the text span so that users do
+     * not have to look it up in the text_segments.  It is always
+     * populated for formFields.
+     * 
+ * + * string content = 2; + * + * @return The content. + */ + java.lang.String getContent(); + /** + * + * + *
+     * Contains the content of the text span so that users do
+     * not have to look it up in the text_segments.  It is always
+     * populated for formFields.
+     * 
+ * + * string content = 2; + * + * @return The bytes for content. + */ + com.google.protobuf.ByteString getContentBytes(); + } + /** + * + * + *
+   * Text reference indexing into the
+   * [Document.text][google.cloud.documentai.v1beta2.Document.text].
+   * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.TextAnchor} + */ + public static final class TextAnchor extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.TextAnchor) + TextAnchorOrBuilder { + private static final long serialVersionUID = 0L; + // Use TextAnchor.newBuilder() to construct. + private TextAnchor(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TextAnchor() { + textSegments_ = java.util.Collections.emptyList(); + content_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TextAnchor(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_TextAnchor_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_TextAnchor_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Document.TextAnchor.class, + com.google.cloud.documentai.v1beta2.Document.TextAnchor.Builder.class); + } + + public interface TextSegmentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment) + com.google.protobuf.MessageOrBuilder { + /** * * *
-       * A list of detected languages together with confidence.
+       * [TextSegment][google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment]
+       * start UTF-8 char index in the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].
        * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * + * int64 start_index = 1; + * + * @return The startIndex. */ - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder - getDetectedLanguagesOrBuilder(int index) { - if (detectedLanguagesBuilder_ == null) { - return detectedLanguages_.get(index); - } else { - return detectedLanguagesBuilder_.getMessageOrBuilder(index); - } - } + long getStartIndex(); + /** * * *
-       * A list of detected languages together with confidence.
+       * [TextSegment][google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment]
+       * half open end UTF-8 char index in the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].
        * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * + * int64 end_index = 2; + * + * @return The endIndex. */ - public java.util.List< - ? extends com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> - getDetectedLanguagesOrBuilderList() { - if (detectedLanguagesBuilder_ != null) { - return detectedLanguagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(detectedLanguages_); - } + long getEndIndex(); + } + /** + * + * + *
+     * A text segment in the
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text]. The
+     * indices may be out of bounds which indicate that the text extends into
+     * another document shard for large sharded documents. See
+     * [ShardInfo.text_offset][google.cloud.documentai.v1beta2.Document.ShardInfo.text_offset]
+     * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment} + */ + public static final class TextSegment extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment) + TextSegmentOrBuilder { + private static final long serialVersionUID = 0L; + // Use TextSegment.newBuilder() to construct. + private TextSegment(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); } + + private TextSegment() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TextSegment(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_TextAnchor_TextSegment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_TextAnchor_TextSegment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment.class, + com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment.Builder.class); + } + + public static final int START_INDEX_FIELD_NUMBER = 1; + private long startIndex_ = 0L; /** * * *
-       * A list of detected languages together with confidence.
+       * [TextSegment][google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment]
+       * start UTF-8 char index in the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].
        * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * + * int64 start_index = 1; + * + * @return The startIndex. */ - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder - addDetectedLanguagesBuilder() { - return getDetectedLanguagesFieldBuilder() - .addBuilder( - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage - .getDefaultInstance()); + @java.lang.Override + public long getStartIndex() { + return startIndex_; } + + public static final int END_INDEX_FIELD_NUMBER = 2; + private long endIndex_ = 0L; /** * * *
-       * A list of detected languages together with confidence.
+       * [TextSegment][google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment]
+       * half open end UTF-8 char index in the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].
        * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * + * int64 end_index = 2; + * + * @return The endIndex. */ - public com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder - addDetectedLanguagesBuilder(int index) { - return getDetectedLanguagesFieldBuilder() - .addBuilder( - index, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage - .getDefaultInstance()); + @java.lang.Override + public long getEndIndex() { + return endIndex_; + } + + 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 (startIndex_ != 0L) { + output.writeInt64(1, startIndex_); + } + if (endIndex_ != 0L) { + output.writeInt64(2, endIndex_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (startIndex_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, startIndex_); + } + if (endIndex_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, endIndex_); + } + size += getUnknownFields().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.v1beta2.Document.TextAnchor.TextSegment)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment other = + (com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment) obj; + + if (getStartIndex() != other.getStartIndex()) return false; + if (getEndIndex() != other.getEndIndex()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + START_INDEX_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getStartIndex()); + hash = (37 * hash) + END_INDEX_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getEndIndex()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment 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.v1beta2.Document.TextAnchor.TextSegment parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment 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.v1beta2.Document.TextAnchor.TextSegment parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment 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.v1beta2.Document.TextAnchor.TextSegment + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); } - /** - * - * - *
-       * A list of detected languages together with confidence.
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage detected_languages = 4; - * - */ - public java.util.List< - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder> - getDetectedLanguagesBuilderList() { - return getDetectedLanguagesFieldBuilder().getBuilderList(); + + public static com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder> - getDetectedLanguagesFieldBuilder() { - if (detectedLanguagesBuilder_ == null) { - detectedLanguagesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguage.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.DetectedLanguageOrBuilder>( - detectedLanguages_, - ((bitField0_ & 0x00000008) != 0), - getParentForChildren(), - isClean()); - detectedLanguages_ = null; - } - return detectedLanguagesBuilder_; + public static com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } - private java.util.List blocks_ = - java.util.Collections.emptyList(); + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - private void ensureBlocksIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - blocks_ = - new java.util.ArrayList( - blocks_); - bitField0_ |= 0x00000010; - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Block, - com.google.cloud.documentai.v1beta2.Document.Page.Block.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.BlockOrBuilder> - blocksBuilder_; + public static Builder newBuilder( + com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - /** - * - * - *
-       * A list of visually detected text blocks on the page.
-       * A block has a set of lines (collected into paragraphs) that have a common
-       * line-spacing and orientation.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Block blocks = 5; - */ - public java.util.List - getBlocksList() { - if (blocksBuilder_ == null) { - return java.util.Collections.unmodifiableList(blocks_); - } else { - return blocksBuilder_.getMessageList(); - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } - /** - * - * - *
-       * A list of visually detected text blocks on the page.
-       * A block has a set of lines (collected into paragraphs) that have a common
-       * line-spacing and orientation.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Block blocks = 5; - */ - public int getBlocksCount() { - if (blocksBuilder_ == null) { - return blocks_.size(); - } else { - return blocksBuilder_.getCount(); - } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; } /** * * *
-       * A list of visually detected text blocks on the page.
-       * A block has a set of lines (collected into paragraphs) that have a common
-       * line-spacing and orientation.
+       * A text segment in the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text]. The
+       * indices may be out of bounds which indicate that the text extends into
+       * another document shard for large sharded documents. See
+       * [ShardInfo.text_offset][google.cloud.documentai.v1beta2.Document.ShardInfo.text_offset]
        * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Page.Block blocks = 5; + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment} */ - public com.google.cloud.documentai.v1beta2.Document.Page.Block getBlocks(int index) { - if (blocksBuilder_ == null) { - return blocks_.get(index); - } else { - return blocksBuilder_.getMessage(index); + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment) + com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegmentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_TextAnchor_TextSegment_descriptor; } - } - /** - * - * - *
-       * A list of visually detected text blocks on the page.
-       * A block has a set of lines (collected into paragraphs) that have a common
-       * line-spacing and orientation.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Block blocks = 5; - */ - public Builder setBlocks( - int index, com.google.cloud.documentai.v1beta2.Document.Page.Block value) { - if (blocksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_TextAnchor_TextSegment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment.class, + com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment.Builder + .class); + } + + // Construct using + // com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + startIndex_ = 0L; + endIndex_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_TextAnchor_TextSegment_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment build() { + com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); } - ensureBlocksIsMutable(); - blocks_.set(index, value); + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment buildPartial() { + com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment result = + new com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.startIndex_ = startIndex_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.endIndex_ = endIndex_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment) { + return mergeFrom( + (com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment other) { + if (other + == com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment + .getDefaultInstance()) return this; + if (other.getStartIndex() != 0L) { + setStartIndex(other.getStartIndex()); + } + if (other.getEndIndex() != 0L) { + setEndIndex(other.getEndIndex()); + } + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); - } else { - blocksBuilder_.setMessage(index, value); + return this; } - return this; - } - /** - * - * - *
-       * A list of visually detected text blocks on the page.
-       * A block has a set of lines (collected into paragraphs) that have a common
-       * line-spacing and orientation.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Block blocks = 5; - */ - public Builder setBlocks( - int index, - com.google.cloud.documentai.v1beta2.Document.Page.Block.Builder builderForValue) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - blocks_.set(index, builderForValue.build()); + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + startIndex_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + endIndex_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long startIndex_; + /** + * + * + *
+         * [TextSegment][google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment]
+         * start UTF-8 char index in the
+         * [Document.text][google.cloud.documentai.v1beta2.Document.text].
+         * 
+ * + * int64 start_index = 1; + * + * @return The startIndex. + */ + @java.lang.Override + public long getStartIndex() { + return startIndex_; + } + /** + * + * + *
+         * [TextSegment][google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment]
+         * start UTF-8 char index in the
+         * [Document.text][google.cloud.documentai.v1beta2.Document.text].
+         * 
+ * + * int64 start_index = 1; + * + * @param value The startIndex to set. + * @return This builder for chaining. + */ + public Builder setStartIndex(long value) { + + startIndex_ = value; + bitField0_ |= 0x00000001; onChanged(); - } else { - blocksBuilder_.setMessage(index, builderForValue.build()); + return this; } - return this; + /** + * + * + *
+         * [TextSegment][google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment]
+         * start UTF-8 char index in the
+         * [Document.text][google.cloud.documentai.v1beta2.Document.text].
+         * 
+ * + * int64 start_index = 1; + * + * @return This builder for chaining. + */ + public Builder clearStartIndex() { + bitField0_ = (bitField0_ & ~0x00000001); + startIndex_ = 0L; + onChanged(); + return this; + } + + private long endIndex_; + /** + * + * + *
+         * [TextSegment][google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment]
+         * half open end UTF-8 char index in the
+         * [Document.text][google.cloud.documentai.v1beta2.Document.text].
+         * 
+ * + * int64 end_index = 2; + * + * @return The endIndex. + */ + @java.lang.Override + public long getEndIndex() { + return endIndex_; + } + /** + * + * + *
+         * [TextSegment][google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment]
+         * half open end UTF-8 char index in the
+         * [Document.text][google.cloud.documentai.v1beta2.Document.text].
+         * 
+ * + * int64 end_index = 2; + * + * @param value The endIndex to set. + * @return This builder for chaining. + */ + public Builder setEndIndex(long value) { + + endIndex_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * [TextSegment][google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment]
+         * half open end UTF-8 char index in the
+         * [Document.text][google.cloud.documentai.v1beta2.Document.text].
+         * 
+ * + * int64 end_index = 2; + * + * @return This builder for chaining. + */ + public Builder clearEndIndex() { + bitField0_ = (bitField0_ & ~0x00000002); + endIndex_ = 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.v1beta2.Document.TextAnchor.TextSegment) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment) + private static final com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment(); + } + + public static com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TextSegment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; } - /** - * - * - *
-       * A list of visually detected text blocks on the page.
-       * A block has a set of lines (collected into paragraphs) that have a common
-       * line-spacing and orientation.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Block blocks = 5; - */ - public Builder addBlocks(com.google.cloud.documentai.v1beta2.Document.Page.Block value) { - if (blocksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBlocksIsMutable(); - blocks_.add(value); - onChanged(); - } else { - blocksBuilder_.addMessage(value); - } - return this; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; } - /** - * - * - *
-       * A list of visually detected text blocks on the page.
-       * A block has a set of lines (collected into paragraphs) that have a common
-       * line-spacing and orientation.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Block blocks = 5; - */ - public Builder addBlocks( - int index, com.google.cloud.documentai.v1beta2.Document.Page.Block value) { - if (blocksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBlocksIsMutable(); - blocks_.add(index, value); - onChanged(); - } else { - blocksBuilder_.addMessage(index, value); - } - return this; + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - /** - * - * - *
-       * A list of visually detected text blocks on the page.
-       * A block has a set of lines (collected into paragraphs) that have a common
-       * line-spacing and orientation.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Block blocks = 5; - */ - public Builder addBlocks( - com.google.cloud.documentai.v1beta2.Document.Page.Block.Builder builderForValue) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - blocks_.add(builderForValue.build()); - onChanged(); - } else { - blocksBuilder_.addMessage(builderForValue.build()); - } - return this; + } + + public static final int TEXT_SEGMENTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + textSegments_; + /** + * + * + *
+     * The text segments from the
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; + * + */ + @java.lang.Override + public java.util.List + getTextSegmentsList() { + return textSegments_; + } + /** + * + * + *
+     * The text segments from the
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegmentOrBuilder> + getTextSegmentsOrBuilderList() { + return textSegments_; + } + /** + * + * + *
+     * The text segments from the
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; + * + */ + @java.lang.Override + public int getTextSegmentsCount() { + return textSegments_.size(); + } + /** + * + * + *
+     * The text segments from the
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment getTextSegments( + int index) { + return textSegments_.get(index); + } + /** + * + * + *
+     * The text segments from the
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegmentOrBuilder + getTextSegmentsOrBuilder(int index) { + return textSegments_.get(index); + } + + public static final int CONTENT_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object content_ = ""; + /** + * + * + *
+     * Contains the content of the text span so that users do
+     * not have to look it up in the text_segments.  It is always
+     * populated for formFields.
+     * 
+ * + * string content = 2; + * + * @return The content. + */ + @java.lang.Override + public java.lang.String getContent() { + java.lang.Object ref = content_; + 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(); + content_ = s; + return s; } - /** - * - * - *
-       * A list of visually detected text blocks on the page.
-       * A block has a set of lines (collected into paragraphs) that have a common
-       * line-spacing and orientation.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Block blocks = 5; - */ - public Builder addBlocks( - int index, - com.google.cloud.documentai.v1beta2.Document.Page.Block.Builder builderForValue) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - blocks_.add(index, builderForValue.build()); - onChanged(); - } else { - blocksBuilder_.addMessage(index, builderForValue.build()); - } - return this; + } + /** + * + * + *
+     * Contains the content of the text span so that users do
+     * not have to look it up in the text_segments.  It is always
+     * populated for formFields.
+     * 
+ * + * string content = 2; + * + * @return The bytes for content. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - /** - * - * - *
-       * A list of visually detected text blocks on the page.
-       * A block has a set of lines (collected into paragraphs) that have a common
-       * line-spacing and orientation.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Block blocks = 5; - */ - public Builder addAllBlocks( - java.lang.Iterable - values) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, blocks_); - onChanged(); - } else { - blocksBuilder_.addAllMessages(values); - } - return this; + } + + 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 < textSegments_.size(); i++) { + output.writeMessage(1, textSegments_.get(i)); } - /** - * - * - *
-       * A list of visually detected text blocks on the page.
-       * A block has a set of lines (collected into paragraphs) that have a common
-       * line-spacing and orientation.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Block blocks = 5; - */ - public Builder clearBlocks() { - if (blocksBuilder_ == null) { - blocks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - } else { - blocksBuilder_.clear(); - } - return this; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, content_); } - /** - * - * - *
-       * A list of visually detected text blocks on the page.
-       * A block has a set of lines (collected into paragraphs) that have a common
-       * line-spacing and orientation.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Block blocks = 5; - */ - public Builder removeBlocks(int index) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - blocks_.remove(index); - onChanged(); - } else { - blocksBuilder_.remove(index); - } - return this; + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < textSegments_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, textSegments_.get(i)); } - /** - * - * - *
-       * A list of visually detected text blocks on the page.
-       * A block has a set of lines (collected into paragraphs) that have a common
-       * line-spacing and orientation.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Block blocks = 5; - */ - public com.google.cloud.documentai.v1beta2.Document.Page.Block.Builder getBlocksBuilder( - int index) { - return getBlocksFieldBuilder().getBuilder(index); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, content_); } - /** - * - * - *
-       * A list of visually detected text blocks on the page.
-       * A block has a set of lines (collected into paragraphs) that have a common
-       * line-spacing and orientation.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Block blocks = 5; - */ - public com.google.cloud.documentai.v1beta2.Document.Page.BlockOrBuilder getBlocksOrBuilder( - int index) { - if (blocksBuilder_ == null) { - return blocks_.get(index); - } else { - return blocksBuilder_.getMessageOrBuilder(index); - } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; } - /** - * - * - *
-       * A list of visually detected text blocks on the page.
-       * A block has a set of lines (collected into paragraphs) that have a common
-       * line-spacing and orientation.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Block blocks = 5; - */ - public java.util.List< - ? extends com.google.cloud.documentai.v1beta2.Document.Page.BlockOrBuilder> - getBlocksOrBuilderList() { - if (blocksBuilder_ != null) { - return blocksBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(blocks_); - } + if (!(obj instanceof com.google.cloud.documentai.v1beta2.Document.TextAnchor)) { + return super.equals(obj); } - /** - * - * - *
-       * A list of visually detected text blocks on the page.
-       * A block has a set of lines (collected into paragraphs) that have a common
-       * line-spacing and orientation.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Block blocks = 5; - */ - public com.google.cloud.documentai.v1beta2.Document.Page.Block.Builder addBlocksBuilder() { - return getBlocksFieldBuilder() - .addBuilder( - com.google.cloud.documentai.v1beta2.Document.Page.Block.getDefaultInstance()); + com.google.cloud.documentai.v1beta2.Document.TextAnchor other = + (com.google.cloud.documentai.v1beta2.Document.TextAnchor) obj; + + if (!getTextSegmentsList().equals(other.getTextSegmentsList())) return false; + if (!getContent().equals(other.getContent())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; } - /** - * - * - *
-       * A list of visually detected text blocks on the page.
-       * A block has a set of lines (collected into paragraphs) that have a common
-       * line-spacing and orientation.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Block blocks = 5; - */ - public com.google.cloud.documentai.v1beta2.Document.Page.Block.Builder addBlocksBuilder( - int index) { - return getBlocksFieldBuilder() - .addBuilder( - index, - com.google.cloud.documentai.v1beta2.Document.Page.Block.getDefaultInstance()); + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getTextSegmentsCount() > 0) { + hash = (37 * hash) + TEXT_SEGMENTS_FIELD_NUMBER; + hash = (53 * hash) + getTextSegmentsList().hashCode(); } - /** - * - * - *
-       * A list of visually detected text blocks on the page.
-       * A block has a set of lines (collected into paragraphs) that have a common
-       * line-spacing and orientation.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Block blocks = 5; - */ - public java.util.List - getBlocksBuilderList() { - return getBlocksFieldBuilder().getBuilderList(); + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta2.Document.TextAnchor parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.TextAnchor 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.v1beta2.Document.TextAnchor parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.TextAnchor 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.v1beta2.Document.TextAnchor parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.TextAnchor parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta2.Document.TextAnchor parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.TextAnchor 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.v1beta2.Document.TextAnchor parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.TextAnchor 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.v1beta2.Document.TextAnchor parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.TextAnchor 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.v1beta2.Document.TextAnchor 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; + } + /** + * + * + *
+     * Text reference indexing into the
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.TextAnchor} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.TextAnchor) + com.google.cloud.documentai.v1beta2.Document.TextAnchorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_TextAnchor_descriptor; } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Block, - com.google.cloud.documentai.v1beta2.Document.Page.Block.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.BlockOrBuilder> - getBlocksFieldBuilder() { - if (blocksBuilder_ == null) { - blocksBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Block, - com.google.cloud.documentai.v1beta2.Document.Page.Block.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.BlockOrBuilder>( - blocks_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); - blocks_ = null; - } - return blocksBuilder_; + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_TextAnchor_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Document.TextAnchor.class, + com.google.cloud.documentai.v1beta2.Document.TextAnchor.Builder.class); } - private java.util.List - paragraphs_ = java.util.Collections.emptyList(); + // Construct using com.google.cloud.documentai.v1beta2.Document.TextAnchor.newBuilder() + private Builder() {} - private void ensureParagraphsIsMutable() { - if (!((bitField0_ & 0x00000020) != 0)) { - paragraphs_ = - new java.util.ArrayList( - paragraphs_); - bitField0_ |= 0x00000020; - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Paragraph, - com.google.cloud.documentai.v1beta2.Document.Page.Paragraph.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.ParagraphOrBuilder> - paragraphsBuilder_; - - /** - * - * - *
-       * A list of visually detected text paragraphs on the page.
-       * A collection of lines that a human would perceive as a paragraph.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Paragraph paragraphs = 6; - * - */ - public java.util.List - getParagraphsList() { - if (paragraphsBuilder_ == null) { - return java.util.Collections.unmodifiableList(paragraphs_); + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (textSegmentsBuilder_ == null) { + textSegments_ = java.util.Collections.emptyList(); } else { - return paragraphsBuilder_.getMessageList(); + textSegments_ = null; + textSegmentsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); + content_ = ""; + return this; } - /** - * - * - *
-       * A list of visually detected text paragraphs on the page.
-       * A collection of lines that a human would perceive as a paragraph.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Paragraph paragraphs = 6; - * - */ - public int getParagraphsCount() { - if (paragraphsBuilder_ == null) { - return paragraphs_.size(); - } else { - return paragraphsBuilder_.getCount(); - } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_TextAnchor_descriptor; } - /** - * - * - *
-       * A list of visually detected text paragraphs on the page.
-       * A collection of lines that a human would perceive as a paragraph.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Paragraph paragraphs = 6; - * - */ - public com.google.cloud.documentai.v1beta2.Document.Page.Paragraph getParagraphs(int index) { - if (paragraphsBuilder_ == null) { - return paragraphs_.get(index); - } else { - return paragraphsBuilder_.getMessage(index); - } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.TextAnchor getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta2.Document.TextAnchor.getDefaultInstance(); } - /** - * - * - *
-       * A list of visually detected text paragraphs on the page.
-       * A collection of lines that a human would perceive as a paragraph.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Paragraph paragraphs = 6; - * - */ - public Builder setParagraphs( - int index, com.google.cloud.documentai.v1beta2.Document.Page.Paragraph value) { - if (paragraphsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureParagraphsIsMutable(); - paragraphs_.set(index, value); - onChanged(); - } else { - paragraphsBuilder_.setMessage(index, value); + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.TextAnchor build() { + com.google.cloud.documentai.v1beta2.Document.TextAnchor result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); } - return this; + return result; } - /** - * - * - *
-       * A list of visually detected text paragraphs on the page.
-       * A collection of lines that a human would perceive as a paragraph.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Paragraph paragraphs = 6; - * - */ - public Builder setParagraphs( - int index, - com.google.cloud.documentai.v1beta2.Document.Page.Paragraph.Builder builderForValue) { - if (paragraphsBuilder_ == null) { - ensureParagraphsIsMutable(); - paragraphs_.set(index, builderForValue.build()); - onChanged(); - } else { - paragraphsBuilder_.setMessage(index, builderForValue.build()); + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.TextAnchor buildPartial() { + com.google.cloud.documentai.v1beta2.Document.TextAnchor result = + new com.google.cloud.documentai.v1beta2.Document.TextAnchor(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); } - return this; + onBuilt(); + return result; } - /** - * - * - *
-       * A list of visually detected text paragraphs on the page.
-       * A collection of lines that a human would perceive as a paragraph.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Paragraph paragraphs = 6; - * - */ - public Builder addParagraphs( - com.google.cloud.documentai.v1beta2.Document.Page.Paragraph value) { - if (paragraphsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); + + private void buildPartialRepeatedFields( + com.google.cloud.documentai.v1beta2.Document.TextAnchor result) { + if (textSegmentsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + textSegments_ = java.util.Collections.unmodifiableList(textSegments_); + bitField0_ = (bitField0_ & ~0x00000001); } - ensureParagraphsIsMutable(); - paragraphs_.add(value); - onChanged(); + result.textSegments_ = textSegments_; } else { - paragraphsBuilder_.addMessage(value); + result.textSegments_ = textSegmentsBuilder_.build(); } - return this; } - /** - * - * - *
-       * A list of visually detected text paragraphs on the page.
-       * A collection of lines that a human would perceive as a paragraph.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Paragraph paragraphs = 6; - * - */ - public Builder addParagraphs( - int index, com.google.cloud.documentai.v1beta2.Document.Page.Paragraph value) { - if (paragraphsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureParagraphsIsMutable(); - paragraphs_.add(index, value); - onChanged(); - } else { - paragraphsBuilder_.addMessage(index, value); + + private void buildPartial0(com.google.cloud.documentai.v1beta2.Document.TextAnchor result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.content_ = content_; } - return this; } - /** - * - * - *
-       * A list of visually detected text paragraphs on the page.
-       * A collection of lines that a human would perceive as a paragraph.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Paragraph paragraphs = 6; - * - */ - public Builder addParagraphs( - com.google.cloud.documentai.v1beta2.Document.Page.Paragraph.Builder builderForValue) { - if (paragraphsBuilder_ == null) { - ensureParagraphsIsMutable(); - paragraphs_.add(builderForValue.build()); - onChanged(); - } else { - paragraphsBuilder_.addMessage(builderForValue.build()); - } - return this; + + @java.lang.Override + public Builder clone() { + return super.clone(); } - /** - * - * - *
-       * A list of visually detected text paragraphs on the page.
-       * A collection of lines that a human would perceive as a paragraph.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Paragraph paragraphs = 6; - * - */ - public Builder addParagraphs( - int index, - com.google.cloud.documentai.v1beta2.Document.Page.Paragraph.Builder builderForValue) { - if (paragraphsBuilder_ == null) { - ensureParagraphsIsMutable(); - paragraphs_.add(index, builderForValue.build()); - onChanged(); - } else { - paragraphsBuilder_.addMessage(index, builderForValue.build()); - } - return this; + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); } - /** - * - * - *
-       * A list of visually detected text paragraphs on the page.
-       * A collection of lines that a human would perceive as a paragraph.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Paragraph paragraphs = 6; - * - */ - public Builder addAllParagraphs( - java.lang.Iterable - values) { - if (paragraphsBuilder_ == null) { - ensureParagraphsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, paragraphs_); - onChanged(); - } else { - paragraphsBuilder_.addAllMessages(values); - } - return this; + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); } - /** - * - * - *
-       * A list of visually detected text paragraphs on the page.
-       * A collection of lines that a human would perceive as a paragraph.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Paragraph paragraphs = 6; - * - */ - public Builder clearParagraphs() { - if (paragraphsBuilder_ == null) { - paragraphs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - } else { - paragraphsBuilder_.clear(); - } - return this; + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); } - /** - * - * - *
-       * A list of visually detected text paragraphs on the page.
-       * A collection of lines that a human would perceive as a paragraph.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Paragraph paragraphs = 6; - * - */ - public Builder removeParagraphs(int index) { - if (paragraphsBuilder_ == null) { - ensureParagraphsIsMutable(); - paragraphs_.remove(index); - onChanged(); - } else { - paragraphsBuilder_.remove(index); - } - return this; + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); } - /** - * - * - *
-       * A list of visually detected text paragraphs on the page.
-       * A collection of lines that a human would perceive as a paragraph.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Paragraph paragraphs = 6; - * - */ - public com.google.cloud.documentai.v1beta2.Document.Page.Paragraph.Builder - getParagraphsBuilder(int index) { - return getParagraphsFieldBuilder().getBuilder(index); + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); } - /** - * - * - *
-       * A list of visually detected text paragraphs on the page.
-       * A collection of lines that a human would perceive as a paragraph.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Paragraph paragraphs = 6; - * - */ - public com.google.cloud.documentai.v1beta2.Document.Page.ParagraphOrBuilder - getParagraphsOrBuilder(int index) { - if (paragraphsBuilder_ == null) { - return paragraphs_.get(index); + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta2.Document.TextAnchor) { + return mergeFrom((com.google.cloud.documentai.v1beta2.Document.TextAnchor) other); } else { - return paragraphsBuilder_.getMessageOrBuilder(index); + super.mergeFrom(other); + return this; } } - /** - * - * - *
-       * A list of visually detected text paragraphs on the page.
-       * A collection of lines that a human would perceive as a paragraph.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Paragraph paragraphs = 6; - * - */ - public java.util.List< - ? extends com.google.cloud.documentai.v1beta2.Document.Page.ParagraphOrBuilder> - getParagraphsOrBuilderList() { - if (paragraphsBuilder_ != null) { - return paragraphsBuilder_.getMessageOrBuilderList(); + + public Builder mergeFrom(com.google.cloud.documentai.v1beta2.Document.TextAnchor other) { + if (other == com.google.cloud.documentai.v1beta2.Document.TextAnchor.getDefaultInstance()) + return this; + if (textSegmentsBuilder_ == null) { + if (!other.textSegments_.isEmpty()) { + if (textSegments_.isEmpty()) { + textSegments_ = other.textSegments_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTextSegmentsIsMutable(); + textSegments_.addAll(other.textSegments_); + } + onChanged(); + } } else { - return java.util.Collections.unmodifiableList(paragraphs_); + if (!other.textSegments_.isEmpty()) { + if (textSegmentsBuilder_.isEmpty()) { + textSegmentsBuilder_.dispose(); + textSegmentsBuilder_ = null; + textSegments_ = other.textSegments_; + bitField0_ = (bitField0_ & ~0x00000001); + textSegmentsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTextSegmentsFieldBuilder() + : null; + } else { + textSegmentsBuilder_.addAllMessages(other.textSegments_); + } + } } + if (!other.getContent().isEmpty()) { + content_ = other.content_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; } - /** - * - * - *
-       * A list of visually detected text paragraphs on the page.
-       * A collection of lines that a human would perceive as a paragraph.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Paragraph paragraphs = 6; - * - */ - public com.google.cloud.documentai.v1beta2.Document.Page.Paragraph.Builder - addParagraphsBuilder() { - return getParagraphsFieldBuilder() - .addBuilder( - com.google.cloud.documentai.v1beta2.Document.Page.Paragraph.getDefaultInstance()); - } - /** - * - * - *
-       * A list of visually detected text paragraphs on the page.
-       * A collection of lines that a human would perceive as a paragraph.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Paragraph paragraphs = 6; - * - */ - public com.google.cloud.documentai.v1beta2.Document.Page.Paragraph.Builder - addParagraphsBuilder(int index) { - return getParagraphsFieldBuilder() - .addBuilder( - index, - com.google.cloud.documentai.v1beta2.Document.Page.Paragraph.getDefaultInstance()); - } - /** - * - * - *
-       * A list of visually detected text paragraphs on the page.
-       * A collection of lines that a human would perceive as a paragraph.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Paragraph paragraphs = 6; - * - */ - public java.util.List - getParagraphsBuilderList() { - return getParagraphsFieldBuilder().getBuilderList(); + + @java.lang.Override + public final boolean isInitialized() { + return true; } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Paragraph, - com.google.cloud.documentai.v1beta2.Document.Page.Paragraph.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.ParagraphOrBuilder> - getParagraphsFieldBuilder() { - if (paragraphsBuilder_ == null) { - paragraphsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Paragraph, - com.google.cloud.documentai.v1beta2.Document.Page.Paragraph.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.ParagraphOrBuilder>( - paragraphs_, ((bitField0_ & 0x00000020) != 0), getParentForChildren(), isClean()); - paragraphs_ = null; + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); } - return paragraphsBuilder_; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment m = + input.readMessage( + com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment + .parser(), + extensionRegistry); + if (textSegmentsBuilder_ == null) { + ensureTextSegmentsIsMutable(); + textSegments_.add(m); + } else { + textSegmentsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + content_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; } - private java.util.List lines_ = - java.util.Collections.emptyList(); + private int bitField0_; - private void ensureLinesIsMutable() { - if (!((bitField0_ & 0x00000040) != 0)) { - lines_ = - new java.util.ArrayList( - lines_); - bitField0_ |= 0x00000040; + private java.util.List + textSegments_ = java.util.Collections.emptyList(); + + private void ensureTextSegmentsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + textSegments_ = + new java.util.ArrayList< + com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment>( + textSegments_); + bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Line, - com.google.cloud.documentai.v1beta2.Document.Page.Line.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.LineOrBuilder> - linesBuilder_; + com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment, + com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment.Builder, + com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegmentOrBuilder> + textSegmentsBuilder_; /** * * *
-       * A list of visually detected text lines on the page.
-       * A collection of tokens that a human would perceive as a line.
+       * The text segments from the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].
        * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Page.Line lines = 7; + * + * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; + * */ - public java.util.List getLinesList() { - if (linesBuilder_ == null) { - return java.util.Collections.unmodifiableList(lines_); + public java.util.List + getTextSegmentsList() { + if (textSegmentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(textSegments_); } else { - return linesBuilder_.getMessageList(); + return textSegmentsBuilder_.getMessageList(); } } /** * * *
-       * A list of visually detected text lines on the page.
-       * A collection of tokens that a human would perceive as a line.
+       * The text segments from the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].
        * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Page.Line lines = 7; + * + * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; + * */ - public int getLinesCount() { - if (linesBuilder_ == null) { - return lines_.size(); + public int getTextSegmentsCount() { + if (textSegmentsBuilder_ == null) { + return textSegments_.size(); } else { - return linesBuilder_.getCount(); + return textSegmentsBuilder_.getCount(); } } /** * * *
-       * A list of visually detected text lines on the page.
-       * A collection of tokens that a human would perceive as a line.
+       * The text segments from the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].
        * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Page.Line lines = 7; + * + * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; + * */ - public com.google.cloud.documentai.v1beta2.Document.Page.Line getLines(int index) { - if (linesBuilder_ == null) { - return lines_.get(index); + public com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment getTextSegments( + int index) { + if (textSegmentsBuilder_ == null) { + return textSegments_.get(index); } else { - return linesBuilder_.getMessage(index); + return textSegmentsBuilder_.getMessage(index); } } /** * * *
-       * A list of visually detected text lines on the page.
-       * A collection of tokens that a human would perceive as a line.
+       * The text segments from the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].
        * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Page.Line lines = 7; + * + * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; + * */ - public Builder setLines( - int index, com.google.cloud.documentai.v1beta2.Document.Page.Line value) { - if (linesBuilder_ == null) { + public Builder setTextSegments( + int index, com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment value) { + if (textSegmentsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureLinesIsMutable(); - lines_.set(index, value); + ensureTextSegmentsIsMutable(); + textSegments_.set(index, value); onChanged(); } else { - linesBuilder_.setMessage(index, value); + textSegmentsBuilder_.setMessage(index, value); } return this; } @@ -29286,21 +54734,24 @@ public Builder setLines( * * *
-       * A list of visually detected text lines on the page.
-       * A collection of tokens that a human would perceive as a line.
+       * The text segments from the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].
        * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Page.Line lines = 7; + * + * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; + * */ - public Builder setLines( + public Builder setTextSegments( int index, - com.google.cloud.documentai.v1beta2.Document.Page.Line.Builder builderForValue) { - if (linesBuilder_ == null) { - ensureLinesIsMutable(); - lines_.set(index, builderForValue.build()); + com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment.Builder + builderForValue) { + if (textSegmentsBuilder_ == null) { + ensureTextSegmentsIsMutable(); + textSegments_.set(index, builderForValue.build()); onChanged(); } else { - linesBuilder_.setMessage(index, builderForValue.build()); + textSegmentsBuilder_.setMessage(index, builderForValue.build()); } return this; } @@ -29308,22 +54759,25 @@ public Builder setLines( * * *
-       * A list of visually detected text lines on the page.
-       * A collection of tokens that a human would perceive as a line.
+       * The text segments from the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].
        * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Page.Line lines = 7; + * + * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; + * */ - public Builder addLines(com.google.cloud.documentai.v1beta2.Document.Page.Line value) { - if (linesBuilder_ == null) { + public Builder addTextSegments( + com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment value) { + if (textSegmentsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureLinesIsMutable(); - lines_.add(value); + ensureTextSegmentsIsMutable(); + textSegments_.add(value); onChanged(); } else { - linesBuilder_.addMessage(value); + textSegmentsBuilder_.addMessage(value); } return this; } @@ -29331,128 +54785,25 @@ public Builder addLines(com.google.cloud.documentai.v1beta2.Document.Page.Line v * * *
-       * A list of visually detected text lines on the page.
-       * A collection of tokens that a human would perceive as a line.
+       * The text segments from the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].
        * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Page.Line lines = 7; + * + * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; + * */ - public Builder addLines( - int index, com.google.cloud.documentai.v1beta2.Document.Page.Line value) { - if (linesBuilder_ == null) { + public Builder addTextSegments( + int index, com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment value) { + if (textSegmentsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureLinesIsMutable(); - lines_.add(index, value); - onChanged(); - } else { - linesBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-       * A list of visually detected text lines on the page.
-       * A collection of tokens that a human would perceive as a line.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Line lines = 7; - */ - public Builder addLines( - com.google.cloud.documentai.v1beta2.Document.Page.Line.Builder builderForValue) { - if (linesBuilder_ == null) { - ensureLinesIsMutable(); - lines_.add(builderForValue.build()); - onChanged(); - } else { - linesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-       * A list of visually detected text lines on the page.
-       * A collection of tokens that a human would perceive as a line.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Line lines = 7; - */ - public Builder addLines( - int index, - com.google.cloud.documentai.v1beta2.Document.Page.Line.Builder builderForValue) { - if (linesBuilder_ == null) { - ensureLinesIsMutable(); - lines_.add(index, builderForValue.build()); - onChanged(); - } else { - linesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-       * A list of visually detected text lines on the page.
-       * A collection of tokens that a human would perceive as a line.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Line lines = 7; - */ - public Builder addAllLines( - java.lang.Iterable - values) { - if (linesBuilder_ == null) { - ensureLinesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, lines_); - onChanged(); - } else { - linesBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-       * A list of visually detected text lines on the page.
-       * A collection of tokens that a human would perceive as a line.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Line lines = 7; - */ - public Builder clearLines() { - if (linesBuilder_ == null) { - lines_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - } else { - linesBuilder_.clear(); - } - return this; - } - /** - * - * - *
-       * A list of visually detected text lines on the page.
-       * A collection of tokens that a human would perceive as a line.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Line lines = 7; - */ - public Builder removeLines(int index) { - if (linesBuilder_ == null) { - ensureLinesIsMutable(); - lines_.remove(index); + ensureTextSegmentsIsMutable(); + textSegments_.add(index, value); onChanged(); } else { - linesBuilder_.remove(index); + textSegmentsBuilder_.addMessage(index, value); } return this; } @@ -29460,203 +54811,95 @@ public Builder removeLines(int index) { * * *
-       * A list of visually detected text lines on the page.
-       * A collection of tokens that a human would perceive as a line.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Line lines = 7; - */ - public com.google.cloud.documentai.v1beta2.Document.Page.Line.Builder getLinesBuilder( - int index) { - return getLinesFieldBuilder().getBuilder(index); - } - /** - * - * - *
-       * A list of visually detected text lines on the page.
-       * A collection of tokens that a human would perceive as a line.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Line lines = 7; - */ - public com.google.cloud.documentai.v1beta2.Document.Page.LineOrBuilder getLinesOrBuilder( - int index) { - if (linesBuilder_ == null) { - return lines_.get(index); - } else { - return linesBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-       * A list of visually detected text lines on the page.
-       * A collection of tokens that a human would perceive as a line.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Line lines = 7; - */ - public java.util.List< - ? extends com.google.cloud.documentai.v1beta2.Document.Page.LineOrBuilder> - getLinesOrBuilderList() { - if (linesBuilder_ != null) { - return linesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(lines_); - } - } - /** - * - * - *
-       * A list of visually detected text lines on the page.
-       * A collection of tokens that a human would perceive as a line.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Line lines = 7; - */ - public com.google.cloud.documentai.v1beta2.Document.Page.Line.Builder addLinesBuilder() { - return getLinesFieldBuilder() - .addBuilder( - com.google.cloud.documentai.v1beta2.Document.Page.Line.getDefaultInstance()); - } - /** - * - * - *
-       * A list of visually detected text lines on the page.
-       * A collection of tokens that a human would perceive as a line.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Line lines = 7; - */ - public com.google.cloud.documentai.v1beta2.Document.Page.Line.Builder addLinesBuilder( - int index) { - return getLinesFieldBuilder() - .addBuilder( - index, com.google.cloud.documentai.v1beta2.Document.Page.Line.getDefaultInstance()); - } - /** - * - * - *
-       * A list of visually detected text lines on the page.
-       * A collection of tokens that a human would perceive as a line.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Line lines = 7; - */ - public java.util.List - getLinesBuilderList() { - return getLinesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Line, - com.google.cloud.documentai.v1beta2.Document.Page.Line.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.LineOrBuilder> - getLinesFieldBuilder() { - if (linesBuilder_ == null) { - linesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Line, - com.google.cloud.documentai.v1beta2.Document.Page.Line.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.LineOrBuilder>( - lines_, ((bitField0_ & 0x00000040) != 0), getParentForChildren(), isClean()); - lines_ = null; - } - return linesBuilder_; - } - - private java.util.List tokens_ = - java.util.Collections.emptyList(); - - private void ensureTokensIsMutable() { - if (!((bitField0_ & 0x00000080) != 0)) { - tokens_ = - new java.util.ArrayList( - tokens_); - bitField0_ |= 0x00000080; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Token, - com.google.cloud.documentai.v1beta2.Document.Page.Token.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.TokenOrBuilder> - tokensBuilder_; - - /** - * - * - *
-       * A list of visually detected tokens on the page.
+       * The text segments from the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].
        * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Page.Token tokens = 8; + * + * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; + * */ - public java.util.List - getTokensList() { - if (tokensBuilder_ == null) { - return java.util.Collections.unmodifiableList(tokens_); + public Builder addTextSegments( + com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment.Builder + builderForValue) { + if (textSegmentsBuilder_ == null) { + ensureTextSegmentsIsMutable(); + textSegments_.add(builderForValue.build()); + onChanged(); } else { - return tokensBuilder_.getMessageList(); + textSegmentsBuilder_.addMessage(builderForValue.build()); } + return this; } /** * * *
-       * A list of visually detected tokens on the page.
+       * The text segments from the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].
        * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Page.Token tokens = 8; + * + * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; + * */ - public int getTokensCount() { - if (tokensBuilder_ == null) { - return tokens_.size(); + public Builder addTextSegments( + int index, + com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment.Builder + builderForValue) { + if (textSegmentsBuilder_ == null) { + ensureTextSegmentsIsMutable(); + textSegments_.add(index, builderForValue.build()); + onChanged(); } else { - return tokensBuilder_.getCount(); + textSegmentsBuilder_.addMessage(index, builderForValue.build()); } + return this; } /** * * *
-       * A list of visually detected tokens on the page.
+       * The text segments from the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].
        * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Page.Token tokens = 8; + * + * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; + * */ - public com.google.cloud.documentai.v1beta2.Document.Page.Token getTokens(int index) { - if (tokensBuilder_ == null) { - return tokens_.get(index); + public Builder addAllTextSegments( + java.lang.Iterable< + ? extends com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment> + values) { + if (textSegmentsBuilder_ == null) { + ensureTextSegmentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, textSegments_); + onChanged(); } else { - return tokensBuilder_.getMessage(index); + textSegmentsBuilder_.addAllMessages(values); } + return this; } /** * * *
-       * A list of visually detected tokens on the page.
+       * The text segments from the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].
        * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Page.Token tokens = 8; + * + * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; + * */ - public Builder setTokens( - int index, com.google.cloud.documentai.v1beta2.Document.Page.Token value) { - if (tokensBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTokensIsMutable(); - tokens_.set(index, value); + public Builder clearTextSegments() { + if (textSegmentsBuilder_ == null) { + textSegments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { - tokensBuilder_.setMessage(index, value); + textSegmentsBuilder_.clear(); } return this; } @@ -29664,20 +54907,21 @@ public Builder setTokens( * * *
-       * A list of visually detected tokens on the page.
+       * The text segments from the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].
        * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Page.Token tokens = 8; + * + * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; + * */ - public Builder setTokens( - int index, - com.google.cloud.documentai.v1beta2.Document.Page.Token.Builder builderForValue) { - if (tokensBuilder_ == null) { - ensureTokensIsMutable(); - tokens_.set(index, builderForValue.build()); + public Builder removeTextSegments(int index) { + if (textSegmentsBuilder_ == null) { + ensureTextSegmentsIsMutable(); + textSegments_.remove(index); onChanged(); } else { - tokensBuilder_.setMessage(index, builderForValue.build()); + textSegmentsBuilder_.remove(index); } return this; } @@ -29685,2084 +54929,2323 @@ public Builder setTokens( * * *
-       * A list of visually detected tokens on the page.
+       * The text segments from the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].
        * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Page.Token tokens = 8; + * + * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; + * */ - public Builder addTokens(com.google.cloud.documentai.v1beta2.Document.Page.Token value) { - if (tokensBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTokensIsMutable(); - tokens_.add(value); - onChanged(); - } else { - tokensBuilder_.addMessage(value); - } - return this; + public com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment.Builder + getTextSegmentsBuilder(int index) { + return getTextSegmentsFieldBuilder().getBuilder(index); } /** * * *
-       * A list of visually detected tokens on the page.
+       * The text segments from the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].
        * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Page.Token tokens = 8; + * + * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; + * */ - public Builder addTokens( - int index, com.google.cloud.documentai.v1beta2.Document.Page.Token value) { - if (tokensBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTokensIsMutable(); - tokens_.add(index, value); - onChanged(); + public com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegmentOrBuilder + getTextSegmentsOrBuilder(int index) { + if (textSegmentsBuilder_ == null) { + return textSegments_.get(index); } else { - tokensBuilder_.addMessage(index, value); + return textSegmentsBuilder_.getMessageOrBuilder(index); } - return this; } /** * * *
-       * A list of visually detected tokens on the page.
+       * The text segments from the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].
        * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Page.Token tokens = 8; + * + * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; + * */ - public Builder addTokens( - com.google.cloud.documentai.v1beta2.Document.Page.Token.Builder builderForValue) { - if (tokensBuilder_ == null) { - ensureTokensIsMutable(); - tokens_.add(builderForValue.build()); - onChanged(); + public java.util.List< + ? extends + com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegmentOrBuilder> + getTextSegmentsOrBuilderList() { + if (textSegmentsBuilder_ != null) { + return textSegmentsBuilder_.getMessageOrBuilderList(); } else { - tokensBuilder_.addMessage(builderForValue.build()); + return java.util.Collections.unmodifiableList(textSegments_); } - return this; } /** * * *
-       * A list of visually detected tokens on the page.
+       * The text segments from the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].
        * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Page.Token tokens = 8; + * + * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; + * */ - public Builder addTokens( - int index, - com.google.cloud.documentai.v1beta2.Document.Page.Token.Builder builderForValue) { - if (tokensBuilder_ == null) { - ensureTokensIsMutable(); - tokens_.add(index, builderForValue.build()); - onChanged(); - } else { - tokensBuilder_.addMessage(index, builderForValue.build()); + public com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment.Builder + addTextSegmentsBuilder() { + return getTextSegmentsFieldBuilder() + .addBuilder( + com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment + .getDefaultInstance()); + } + /** + * + * + *
+       * The text segments from the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; + * + */ + public com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment.Builder + addTextSegmentsBuilder(int index) { + return getTextSegmentsFieldBuilder() + .addBuilder( + index, + com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment + .getDefaultInstance()); + } + /** + * + * + *
+       * The text segments from the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; + * + */ + public java.util.List< + com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment.Builder> + getTextSegmentsBuilderList() { + return getTextSegmentsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment, + com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment.Builder, + com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegmentOrBuilder> + getTextSegmentsFieldBuilder() { + if (textSegmentsBuilder_ == null) { + textSegmentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment, + com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment.Builder, + com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegmentOrBuilder>( + textSegments_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + textSegments_ = null; } - return this; + return textSegmentsBuilder_; } + + private java.lang.Object content_ = ""; /** * * *
-       * A list of visually detected tokens on the page.
+       * Contains the content of the text span so that users do
+       * not have to look it up in the text_segments.  It is always
+       * populated for formFields.
        * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Page.Token tokens = 8; + * string content = 2; + * + * @return The content. */ - public Builder addAllTokens( - java.lang.Iterable - values) { - if (tokensBuilder_ == null) { - ensureTokensIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tokens_); - onChanged(); + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; } else { - tokensBuilder_.addAllMessages(values); + return (java.lang.String) ref; } - return this; } /** * * *
-       * A list of visually detected tokens on the page.
+       * Contains the content of the text span so that users do
+       * not have to look it up in the text_segments.  It is always
+       * populated for formFields.
        * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Page.Token tokens = 8; + * string content = 2; + * + * @return The bytes for content. */ - public Builder clearTokens() { - if (tokensBuilder_ == null) { - tokens_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); + public com.google.protobuf.ByteString getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + content_ = b; + return b; } else { - tokensBuilder_.clear(); + return (com.google.protobuf.ByteString) ref; } - return this; } /** * * *
-       * A list of visually detected tokens on the page.
+       * Contains the content of the text span so that users do
+       * not have to look it up in the text_segments.  It is always
+       * populated for formFields.
        * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Page.Token tokens = 8; + * string content = 2; + * + * @param value The content to set. + * @return This builder for chaining. */ - public Builder removeTokens(int index) { - if (tokensBuilder_ == null) { - ensureTokensIsMutable(); - tokens_.remove(index); - onChanged(); - } else { - tokensBuilder_.remove(index); + public Builder setContent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } + content_ = value; + bitField0_ |= 0x00000002; + onChanged(); return this; } /** * * *
-       * A list of visually detected tokens on the page.
+       * Contains the content of the text span so that users do
+       * not have to look it up in the text_segments.  It is always
+       * populated for formFields.
        * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Page.Token tokens = 8; + * string content = 2; + * + * @return This builder for chaining. */ - public com.google.cloud.documentai.v1beta2.Document.Page.Token.Builder getTokensBuilder( - int index) { - return getTokensFieldBuilder().getBuilder(index); + public Builder clearContent() { + content_ = getDefaultInstance().getContent(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; } /** * * *
-       * A list of visually detected tokens on the page.
+       * Contains the content of the text span so that users do
+       * not have to look it up in the text_segments.  It is always
+       * populated for formFields.
        * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Page.Token tokens = 8; + * string content = 2; + * + * @param value The bytes for content to set. + * @return This builder for chaining. */ - public com.google.cloud.documentai.v1beta2.Document.Page.TokenOrBuilder getTokensOrBuilder( - int index) { - if (tokensBuilder_ == null) { - return tokens_.get(index); - } else { - return tokensBuilder_.getMessageOrBuilder(index); + public Builder setContentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } + checkByteStringIsUtf8(value); + content_ = value; + bitField0_ |= 0x00000002; + 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.v1beta2.Document.TextAnchor) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.TextAnchor) + private static final com.google.cloud.documentai.v1beta2.Document.TextAnchor DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta2.Document.TextAnchor(); + } + + public static com.google.cloud.documentai.v1beta2.Document.TextAnchor getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TextAnchor parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.TextAnchor getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface PageAnchorOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.PageAnchor) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * One or more references to visual page elements
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; + * + */ + java.util.List + getPageRefsList(); + /** + * + * + *
+     * One or more references to visual page elements
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; + * + */ + com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef getPageRefs(int index); + /** + * + * + *
+     * One or more references to visual page elements
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; + * + */ + int getPageRefsCount(); + /** + * + * + *
+     * One or more references to visual page elements
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; + * + */ + java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRefOrBuilder> + getPageRefsOrBuilderList(); + /** + * + * + *
+     * One or more references to visual page elements
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; + * + */ + com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRefOrBuilder getPageRefsOrBuilder( + int index); + } + /** + * + * + *
+   * Referencing the visual context of the entity in the
+   * [Document.pages][google.cloud.documentai.v1beta2.Document.pages]. Page
+   * anchors can be cross-page, consist of multiple bounding polygons and
+   * optionally reference specific layout element types.
+   * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.PageAnchor} + */ + public static final class PageAnchor extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.PageAnchor) + PageAnchorOrBuilder { + private static final long serialVersionUID = 0L; + // Use PageAnchor.newBuilder() to construct. + private PageAnchor(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PageAnchor() { + pageRefs_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PageAnchor(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_PageAnchor_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_PageAnchor_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Document.PageAnchor.class, + com.google.cloud.documentai.v1beta2.Document.PageAnchor.Builder.class); + } + + public interface PageRefOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef) + com.google.protobuf.MessageOrBuilder { + /** * * *
-       * A list of visually detected tokens on the page.
+       * Required. Index into the
+       * [Document.pages][google.cloud.documentai.v1beta2.Document.pages]
+       * element, for example using
+       * `[Document.pages][page_refs.page]` to locate the related page element.
+       * This field is skipped when its value is the default `0`. See
+       * https://developers.google.com/protocol-buffers/docs/proto3#json.
        * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Page.Token tokens = 8; - */ - public java.util.List< - ? extends com.google.cloud.documentai.v1beta2.Document.Page.TokenOrBuilder> - getTokensOrBuilderList() { - if (tokensBuilder_ != null) { - return tokensBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(tokens_); - } - } - /** - * - * - *
-       * A list of visually detected tokens on the page.
-       * 
+ * int64 page = 1 [(.google.api.field_behavior) = REQUIRED]; * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Token tokens = 8; + * @return The page. */ - public com.google.cloud.documentai.v1beta2.Document.Page.Token.Builder addTokensBuilder() { - return getTokensFieldBuilder() - .addBuilder( - com.google.cloud.documentai.v1beta2.Document.Page.Token.getDefaultInstance()); - } + long getPage(); + /** * * *
-       * A list of visually detected tokens on the page.
+       * Optional. The type of the layout element that is being referenced if
+       * any.
        * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Page.Token tokens = 8; - */ - public com.google.cloud.documentai.v1beta2.Document.Page.Token.Builder addTokensBuilder( - int index) { - return getTokensFieldBuilder() - .addBuilder( - index, - com.google.cloud.documentai.v1beta2.Document.Page.Token.getDefaultInstance()); - } - /** - * - * - *
-       * A list of visually detected tokens on the page.
-       * 
+ * + * .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.LayoutType layout_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Token tokens = 8; + * @return The enum numeric value on the wire for layoutType. */ - public java.util.List - getTokensBuilderList() { - return getTokensFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Token, - com.google.cloud.documentai.v1beta2.Document.Page.Token.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.TokenOrBuilder> - getTokensFieldBuilder() { - if (tokensBuilder_ == null) { - tokensBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Token, - com.google.cloud.documentai.v1beta2.Document.Page.Token.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.TokenOrBuilder>( - tokens_, ((bitField0_ & 0x00000080) != 0), getParentForChildren(), isClean()); - tokens_ = null; - } - return tokensBuilder_; - } - - private java.util.List - visualElements_ = java.util.Collections.emptyList(); - - private void ensureVisualElementsIsMutable() { - if (!((bitField0_ & 0x00000100) != 0)) { - visualElements_ = - new java.util.ArrayList< - com.google.cloud.documentai.v1beta2.Document.Page.VisualElement>(visualElements_); - bitField0_ |= 0x00000100; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.VisualElement, - com.google.cloud.documentai.v1beta2.Document.Page.VisualElement.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.VisualElementOrBuilder> - visualElementsBuilder_; - + int getLayoutTypeValue(); /** * * *
-       * A list of detected non-text visual elements e.g. checkbox,
-       * signature etc. on the page.
+       * Optional. The type of the layout element that is being referenced if
+       * any.
        * 
* * - * repeated .google.cloud.documentai.v1beta2.Document.Page.VisualElement visual_elements = 9; + * .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.LayoutType layout_type = 2 [(.google.api.field_behavior) = OPTIONAL]; * + * + * @return The layoutType. */ - public java.util.List - getVisualElementsList() { - if (visualElementsBuilder_ == null) { - return java.util.Collections.unmodifiableList(visualElements_); - } else { - return visualElementsBuilder_.getMessageList(); - } - } + com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.LayoutType getLayoutType(); + /** * * *
-       * A list of detected non-text visual elements e.g. checkbox,
-       * signature etc. on the page.
+       * Optional. Deprecated.  Use
+       * [PageRef.bounding_poly][google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.bounding_poly]
+       * instead.
        * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.VisualElement visual_elements = 9; + * string layout_id = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * + * + * @deprecated google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.layout_id is + * deprecated. See google/cloud/documentai/v1beta2/document.proto;l=782 + * @return The layoutId. */ - public int getVisualElementsCount() { - if (visualElementsBuilder_ == null) { - return visualElements_.size(); - } else { - return visualElementsBuilder_.getCount(); - } - } + @java.lang.Deprecated + java.lang.String getLayoutId(); /** * * *
-       * A list of detected non-text visual elements e.g. checkbox,
-       * signature etc. on the page.
+       * Optional. Deprecated.  Use
+       * [PageRef.bounding_poly][google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.bounding_poly]
+       * instead.
        * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.VisualElement visual_elements = 9; + * string layout_id = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * + * + * @deprecated google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.layout_id is + * deprecated. See google/cloud/documentai/v1beta2/document.proto;l=782 + * @return The bytes for layoutId. */ - public com.google.cloud.documentai.v1beta2.Document.Page.VisualElement getVisualElements( - int index) { - if (visualElementsBuilder_ == null) { - return visualElements_.get(index); - } else { - return visualElementsBuilder_.getMessage(index); - } - } + @java.lang.Deprecated + com.google.protobuf.ByteString getLayoutIdBytes(); + /** * * *
-       * A list of detected non-text visual elements e.g. checkbox,
-       * signature etc. on the page.
+       * Optional. Identifies the bounding polygon of a layout element on the
+       * page.
        * 
* * - * repeated .google.cloud.documentai.v1beta2.Document.Page.VisualElement visual_elements = 9; + * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly = 4 [(.google.api.field_behavior) = OPTIONAL]; * + * + * @return Whether the boundingPoly field is set. */ - public Builder setVisualElements( - int index, com.google.cloud.documentai.v1beta2.Document.Page.VisualElement value) { - if (visualElementsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVisualElementsIsMutable(); - visualElements_.set(index, value); - onChanged(); - } else { - visualElementsBuilder_.setMessage(index, value); - } - return this; - } + boolean hasBoundingPoly(); /** * * *
-       * A list of detected non-text visual elements e.g. checkbox,
-       * signature etc. on the page.
+       * Optional. Identifies the bounding polygon of a layout element on the
+       * page.
        * 
* * - * repeated .google.cloud.documentai.v1beta2.Document.Page.VisualElement visual_elements = 9; + * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly = 4 [(.google.api.field_behavior) = OPTIONAL]; * + * + * @return The boundingPoly. */ - public Builder setVisualElements( - int index, - com.google.cloud.documentai.v1beta2.Document.Page.VisualElement.Builder builderForValue) { - if (visualElementsBuilder_ == null) { - ensureVisualElementsIsMutable(); - visualElements_.set(index, builderForValue.build()); - onChanged(); - } else { - visualElementsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } + com.google.cloud.documentai.v1beta2.BoundingPoly getBoundingPoly(); /** * * *
-       * A list of detected non-text visual elements e.g. checkbox,
-       * signature etc. on the page.
+       * Optional. Identifies the bounding polygon of a layout element on the
+       * page.
        * 
* * - * repeated .google.cloud.documentai.v1beta2.Document.Page.VisualElement visual_elements = 9; + * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder addVisualElements( - com.google.cloud.documentai.v1beta2.Document.Page.VisualElement value) { - if (visualElementsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVisualElementsIsMutable(); - visualElements_.add(value); - onChanged(); - } else { - visualElementsBuilder_.addMessage(value); - } - return this; - } + com.google.cloud.documentai.v1beta2.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); + /** * * *
-       * A list of detected non-text visual elements e.g. checkbox,
-       * signature etc. on the page.
+       * Optional. Confidence of detected page element, if applicable. Range
+       * `[0, 1]`.
        * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.VisualElement visual_elements = 9; - * + * float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The confidence. */ - public Builder addVisualElements( - int index, com.google.cloud.documentai.v1beta2.Document.Page.VisualElement value) { - if (visualElementsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVisualElementsIsMutable(); - visualElements_.add(index, value); - onChanged(); - } else { - visualElementsBuilder_.addMessage(index, value); - } - return this; + float getConfidence(); + } + /** + * + * + *
+     * Represents a weak reference to a page element within a document.
+     * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef} + */ + public static final class PageRef extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef) + PageRefOrBuilder { + private static final long serialVersionUID = 0L; + // Use PageRef.newBuilder() to construct. + private PageRef(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PageRef() { + layoutType_ = 0; + layoutId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PageRef(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_PageAnchor_PageRef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_PageAnchor_PageRef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.class, + com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.Builder.class); } + /** * * *
-       * A list of detected non-text visual elements e.g. checkbox,
-       * signature etc. on the page.
+       * The type of layout that is being referenced.
        * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.VisualElement visual_elements = 9; - * + * Protobuf enum {@code + * google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.LayoutType} */ - public Builder addVisualElements( - com.google.cloud.documentai.v1beta2.Document.Page.VisualElement.Builder builderForValue) { - if (visualElementsBuilder_ == null) { - ensureVisualElementsIsMutable(); - visualElements_.add(builderForValue.build()); - onChanged(); - } else { - visualElementsBuilder_.addMessage(builderForValue.build()); + public enum LayoutType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+         * Layout Unspecified.
+         * 
+ * + * LAYOUT_TYPE_UNSPECIFIED = 0; + */ + LAYOUT_TYPE_UNSPECIFIED(0), + /** + * + * + *
+         * References a
+         * [Page.blocks][google.cloud.documentai.v1beta2.Document.Page.blocks]
+         * element.
+         * 
+ * + * BLOCK = 1; + */ + BLOCK(1), + /** + * + * + *
+         * References a
+         * [Page.paragraphs][google.cloud.documentai.v1beta2.Document.Page.paragraphs]
+         * element.
+         * 
+ * + * PARAGRAPH = 2; + */ + PARAGRAPH(2), + /** + * + * + *
+         * References a
+         * [Page.lines][google.cloud.documentai.v1beta2.Document.Page.lines]
+         * element.
+         * 
+ * + * LINE = 3; + */ + LINE(3), + /** + * + * + *
+         * References a
+         * [Page.tokens][google.cloud.documentai.v1beta2.Document.Page.tokens]
+         * element.
+         * 
+ * + * TOKEN = 4; + */ + TOKEN(4), + /** + * + * + *
+         * References a
+         * [Page.visual_elements][google.cloud.documentai.v1beta2.Document.Page.visual_elements]
+         * element.
+         * 
+ * + * VISUAL_ELEMENT = 5; + */ + VISUAL_ELEMENT(5), + /** + * + * + *
+         * Refrrences a
+         * [Page.tables][google.cloud.documentai.v1beta2.Document.Page.tables]
+         * element.
+         * 
+ * + * TABLE = 6; + */ + TABLE(6), + /** + * + * + *
+         * References a
+         * [Page.form_fields][google.cloud.documentai.v1beta2.Document.Page.form_fields]
+         * element.
+         * 
+ * + * FORM_FIELD = 7; + */ + FORM_FIELD(7), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+         * Layout Unspecified.
+         * 
+ * + * LAYOUT_TYPE_UNSPECIFIED = 0; + */ + public static final int LAYOUT_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+         * References a
+         * [Page.blocks][google.cloud.documentai.v1beta2.Document.Page.blocks]
+         * element.
+         * 
+ * + * BLOCK = 1; + */ + public static final int BLOCK_VALUE = 1; + /** + * + * + *
+         * References a
+         * [Page.paragraphs][google.cloud.documentai.v1beta2.Document.Page.paragraphs]
+         * element.
+         * 
+ * + * PARAGRAPH = 2; + */ + public static final int PARAGRAPH_VALUE = 2; + /** + * + * + *
+         * References a
+         * [Page.lines][google.cloud.documentai.v1beta2.Document.Page.lines]
+         * element.
+         * 
+ * + * LINE = 3; + */ + public static final int LINE_VALUE = 3; + /** + * + * + *
+         * References a
+         * [Page.tokens][google.cloud.documentai.v1beta2.Document.Page.tokens]
+         * element.
+         * 
+ * + * TOKEN = 4; + */ + public static final int TOKEN_VALUE = 4; + /** + * + * + *
+         * References a
+         * [Page.visual_elements][google.cloud.documentai.v1beta2.Document.Page.visual_elements]
+         * element.
+         * 
+ * + * VISUAL_ELEMENT = 5; + */ + public static final int VISUAL_ELEMENT_VALUE = 5; + /** + * + * + *
+         * Refrrences a
+         * [Page.tables][google.cloud.documentai.v1beta2.Document.Page.tables]
+         * element.
+         * 
+ * + * TABLE = 6; + */ + public static final int TABLE_VALUE = 6; + /** + * + * + *
+         * References a
+         * [Page.form_fields][google.cloud.documentai.v1beta2.Document.Page.form_fields]
+         * element.
+         * 
+ * + * FORM_FIELD = 7; + */ + public static final int FORM_FIELD_VALUE = 7; + + 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 LayoutType 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 LayoutType forNumber(int value) { + switch (value) { + case 0: + return LAYOUT_TYPE_UNSPECIFIED; + case 1: + return BLOCK; + case 2: + return PARAGRAPH; + case 3: + return LINE; + case 4: + return TOKEN; + case 5: + return VISUAL_ELEMENT; + case 6: + return TABLE; + case 7: + return FORM_FIELD; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public LayoutType findValueByNumber(int number) { + return LayoutType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final LayoutType[] VALUES = values(); + + public static LayoutType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; } - return this; + + private final int value; + + private LayoutType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.LayoutType) } + + public static final int PAGE_FIELD_NUMBER = 1; + private long page_ = 0L; /** * * *
-       * A list of detected non-text visual elements e.g. checkbox,
-       * signature etc. on the page.
+       * Required. Index into the
+       * [Document.pages][google.cloud.documentai.v1beta2.Document.pages]
+       * element, for example using
+       * `[Document.pages][page_refs.page]` to locate the related page element.
+       * This field is skipped when its value is the default `0`. See
+       * https://developers.google.com/protocol-buffers/docs/proto3#json.
        * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.VisualElement visual_elements = 9; - * + * int64 page = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The page. */ - public Builder addVisualElements( - int index, - com.google.cloud.documentai.v1beta2.Document.Page.VisualElement.Builder builderForValue) { - if (visualElementsBuilder_ == null) { - ensureVisualElementsIsMutable(); - visualElements_.add(index, builderForValue.build()); - onChanged(); - } else { - visualElementsBuilder_.addMessage(index, builderForValue.build()); - } - return this; + @java.lang.Override + public long getPage() { + return page_; } + + public static final int LAYOUT_TYPE_FIELD_NUMBER = 2; + private int layoutType_ = 0; /** * * *
-       * A list of detected non-text visual elements e.g. checkbox,
-       * signature etc. on the page.
+       * Optional. The type of the layout element that is being referenced if
+       * any.
        * 
* * - * repeated .google.cloud.documentai.v1beta2.Document.Page.VisualElement visual_elements = 9; + * .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.LayoutType layout_type = 2 [(.google.api.field_behavior) = OPTIONAL]; * + * + * @return The enum numeric value on the wire for layoutType. */ - public Builder addAllVisualElements( - java.lang.Iterable< - ? extends com.google.cloud.documentai.v1beta2.Document.Page.VisualElement> - values) { - if (visualElementsBuilder_ == null) { - ensureVisualElementsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, visualElements_); - onChanged(); - } else { - visualElementsBuilder_.addAllMessages(values); - } - return this; + @java.lang.Override + public int getLayoutTypeValue() { + return layoutType_; } /** * * *
-       * A list of detected non-text visual elements e.g. checkbox,
-       * signature etc. on the page.
+       * Optional. The type of the layout element that is being referenced if
+       * any.
        * 
* * - * repeated .google.cloud.documentai.v1beta2.Document.Page.VisualElement visual_elements = 9; + * .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.LayoutType layout_type = 2 [(.google.api.field_behavior) = OPTIONAL]; * + * + * @return The layoutType. */ - public Builder clearVisualElements() { - if (visualElementsBuilder_ == null) { - visualElements_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000100); - onChanged(); - } else { - visualElementsBuilder_.clear(); - } - return this; + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.LayoutType + getLayoutType() { + com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.LayoutType result = + com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.LayoutType.forNumber( + layoutType_); + return result == null + ? com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.LayoutType + .UNRECOGNIZED + : result; } + + public static final int LAYOUT_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object layoutId_ = ""; /** * * *
-       * A list of detected non-text visual elements e.g. checkbox,
-       * signature etc. on the page.
+       * Optional. Deprecated.  Use
+       * [PageRef.bounding_poly][google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.bounding_poly]
+       * instead.
        * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.VisualElement visual_elements = 9; + * string layout_id = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * + * + * @deprecated google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.layout_id is + * deprecated. See google/cloud/documentai/v1beta2/document.proto;l=782 + * @return The layoutId. */ - public Builder removeVisualElements(int index) { - if (visualElementsBuilder_ == null) { - ensureVisualElementsIsMutable(); - visualElements_.remove(index); - onChanged(); + @java.lang.Override + @java.lang.Deprecated + public java.lang.String getLayoutId() { + java.lang.Object ref = layoutId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { - visualElementsBuilder_.remove(index); + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + layoutId_ = s; + return s; } - return this; } /** * * *
-       * A list of detected non-text visual elements e.g. checkbox,
-       * signature etc. on the page.
+       * Optional. Deprecated.  Use
+       * [PageRef.bounding_poly][google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.bounding_poly]
+       * instead.
        * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.VisualElement visual_elements = 9; + * string layout_id = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * - */ - public com.google.cloud.documentai.v1beta2.Document.Page.VisualElement.Builder - getVisualElementsBuilder(int index) { - return getVisualElementsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-       * A list of detected non-text visual elements e.g. checkbox,
-       * signature etc. on the page.
-       * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.VisualElement visual_elements = 9; - * + * @deprecated google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.layout_id is + * deprecated. See google/cloud/documentai/v1beta2/document.proto;l=782 + * @return The bytes for layoutId. */ - public com.google.cloud.documentai.v1beta2.Document.Page.VisualElementOrBuilder - getVisualElementsOrBuilder(int index) { - if (visualElementsBuilder_ == null) { - return visualElements_.get(index); + @java.lang.Override + @java.lang.Deprecated + public com.google.protobuf.ByteString getLayoutIdBytes() { + java.lang.Object ref = layoutId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + layoutId_ = b; + return b; } else { - return visualElementsBuilder_.getMessageOrBuilder(index); + return (com.google.protobuf.ByteString) ref; } } + + public static final int BOUNDING_POLY_FIELD_NUMBER = 4; + private com.google.cloud.documentai.v1beta2.BoundingPoly boundingPoly_; /** * * *
-       * A list of detected non-text visual elements e.g. checkbox,
-       * signature etc. on the page.
+       * Optional. Identifies the bounding polygon of a layout element on the
+       * page.
        * 
* * - * repeated .google.cloud.documentai.v1beta2.Document.Page.VisualElement visual_elements = 9; + * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly = 4 [(.google.api.field_behavior) = OPTIONAL]; * + * + * @return Whether the boundingPoly field is set. */ - public java.util.List< - ? extends com.google.cloud.documentai.v1beta2.Document.Page.VisualElementOrBuilder> - getVisualElementsOrBuilderList() { - if (visualElementsBuilder_ != null) { - return visualElementsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(visualElements_); - } + @java.lang.Override + public boolean hasBoundingPoly() { + return boundingPoly_ != null; } /** * * *
-       * A list of detected non-text visual elements e.g. checkbox,
-       * signature etc. on the page.
+       * Optional. Identifies the bounding polygon of a layout element on the
+       * page.
        * 
* * - * repeated .google.cloud.documentai.v1beta2.Document.Page.VisualElement visual_elements = 9; + * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly = 4 [(.google.api.field_behavior) = OPTIONAL]; * + * + * @return The boundingPoly. */ - public com.google.cloud.documentai.v1beta2.Document.Page.VisualElement.Builder - addVisualElementsBuilder() { - return getVisualElementsFieldBuilder() - .addBuilder( - com.google.cloud.documentai.v1beta2.Document.Page.VisualElement - .getDefaultInstance()); + @java.lang.Override + public com.google.cloud.documentai.v1beta2.BoundingPoly getBoundingPoly() { + return boundingPoly_ == null + ? com.google.cloud.documentai.v1beta2.BoundingPoly.getDefaultInstance() + : boundingPoly_; } /** * * *
-       * A list of detected non-text visual elements e.g. checkbox,
-       * signature etc. on the page.
+       * Optional. Identifies the bounding polygon of a layout element on the
+       * page.
        * 
* * - * repeated .google.cloud.documentai.v1beta2.Document.Page.VisualElement visual_elements = 9; + * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.documentai.v1beta2.Document.Page.VisualElement.Builder - addVisualElementsBuilder(int index) { - return getVisualElementsFieldBuilder() - .addBuilder( - index, - com.google.cloud.documentai.v1beta2.Document.Page.VisualElement - .getDefaultInstance()); + @java.lang.Override + public com.google.cloud.documentai.v1beta2.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + return boundingPoly_ == null + ? com.google.cloud.documentai.v1beta2.BoundingPoly.getDefaultInstance() + : boundingPoly_; } + + public static final int CONFIDENCE_FIELD_NUMBER = 5; + private float confidence_ = 0F; /** * * *
-       * A list of detected non-text visual elements e.g. checkbox,
-       * signature etc. on the page.
+       * Optional. Confidence of detected page element, if applicable. Range
+       * `[0, 1]`.
        * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.Page.VisualElement visual_elements = 9; - * + * float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The confidence. */ - public java.util.List - getVisualElementsBuilderList() { - return getVisualElementsFieldBuilder().getBuilderList(); + @java.lang.Override + public float getConfidence() { + return confidence_; } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.VisualElement, - com.google.cloud.documentai.v1beta2.Document.Page.VisualElement.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.VisualElementOrBuilder> - getVisualElementsFieldBuilder() { - if (visualElementsBuilder_ == null) { - visualElementsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.VisualElement, - com.google.cloud.documentai.v1beta2.Document.Page.VisualElement.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.VisualElementOrBuilder>( - visualElements_, - ((bitField0_ & 0x00000100) != 0), - getParentForChildren(), - isClean()); - visualElements_ = null; + 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 (page_ != 0L) { + output.writeInt64(1, page_); } - return visualElementsBuilder_; + if (layoutType_ + != com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.LayoutType + .LAYOUT_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, layoutType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(layoutId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, layoutId_); + } + if (boundingPoly_ != null) { + output.writeMessage(4, getBoundingPoly()); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + output.writeFloat(5, confidence_); + } + getUnknownFields().writeTo(output); } - private java.util.List tables_ = - java.util.Collections.emptyList(); + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - private void ensureTablesIsMutable() { - if (!((bitField0_ & 0x00000200) != 0)) { - tables_ = - new java.util.ArrayList( - tables_); - bitField0_ |= 0x00000200; + size = 0; + if (page_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, page_); + } + if (layoutType_ + != com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.LayoutType + .LAYOUT_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, layoutType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(layoutId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, layoutId_); + } + if (boundingPoly_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getBoundingPoly()); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(5, confidence_); } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Table, - com.google.cloud.documentai.v1beta2.Document.Page.Table.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.TableOrBuilder> - tablesBuilder_; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef other = + (com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef) obj; - /** - * - * - *
-       * A list of visually detected tables on the page.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table tables = 10; - */ - public java.util.List - getTablesList() { - if (tablesBuilder_ == null) { - return java.util.Collections.unmodifiableList(tables_); - } else { - return tablesBuilder_.getMessageList(); + if (getPage() != other.getPage()) return false; + if (layoutType_ != other.layoutType_) return false; + if (!getLayoutId().equals(other.getLayoutId())) return false; + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; + if (hasBoundingPoly()) { + if (!getBoundingPoly().equals(other.getBoundingPoly())) return false; } + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } - /** - * - * - *
-       * A list of visually detected tables on the page.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table tables = 10; - */ - public int getTablesCount() { - if (tablesBuilder_ == null) { - return tables_.size(); - } else { - return tablesBuilder_.getCount(); + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; } - } - /** - * - * - *
-       * A list of visually detected tables on the page.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table tables = 10; - */ - public com.google.cloud.documentai.v1beta2.Document.Page.Table getTables(int index) { - if (tablesBuilder_ == null) { - return tables_.get(index); - } else { - return tablesBuilder_.getMessage(index); + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PAGE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getPage()); + hash = (37 * hash) + LAYOUT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + layoutType_; + hash = (37 * hash) + LAYOUT_ID_FIELD_NUMBER; + hash = (53 * hash) + getLayoutId().hashCode(); + if (hasBoundingPoly()) { + hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; + hash = (53 * hash) + getBoundingPoly().hashCode(); } + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getConfidence()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; } - /** - * - * - *
-       * A list of visually detected tables on the page.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table tables = 10; - */ - public Builder setTables( - int index, com.google.cloud.documentai.v1beta2.Document.Page.Table value) { - if (tablesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTablesIsMutable(); - tables_.set(index, value); - onChanged(); - } else { - tablesBuilder_.setMessage(index, value); - } - return this; + + public static com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - /** - * - * - *
-       * A list of visually detected tables on the page.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table tables = 10; - */ - public Builder setTables( - int index, - com.google.cloud.documentai.v1beta2.Document.Page.Table.Builder builderForValue) { - if (tablesBuilder_ == null) { - ensureTablesIsMutable(); - tables_.set(index, builderForValue.build()); - onChanged(); - } else { - tablesBuilder_.setMessage(index, builderForValue.build()); - } - return this; + + public static com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef 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.v1beta2.Document.PageAnchor.PageRef parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef 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.v1beta2.Document.PageAnchor.PageRef parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef 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.v1beta2.Document.PageAnchor.PageRef + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef + 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.v1beta2.Document.PageAnchor.PageRef parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef 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.v1beta2.Document.PageAnchor.PageRef 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 list of visually detected tables on the page.
+       * Represents a weak reference to a page element within a document.
        * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table tables = 10; + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef} */ - public Builder addTables(com.google.cloud.documentai.v1beta2.Document.Page.Table value) { - if (tablesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef) + com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRefOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_PageAnchor_PageRef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_PageAnchor_PageRef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.class, + com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.Builder.class); + } + + // Construct using + // com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + page_ = 0L; + layoutType_ = 0; + layoutId_ = ""; + boundingPoly_ = null; + if (boundingPolyBuilder_ != null) { + boundingPolyBuilder_.dispose(); + boundingPolyBuilder_ = null; } - ensureTablesIsMutable(); - tables_.add(value); - onChanged(); - } else { - tablesBuilder_.addMessage(value); + confidence_ = 0F; + return this; } - return this; - } - /** - * - * - *
-       * A list of visually detected tables on the page.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table tables = 10; - */ - public Builder addTables( - int index, com.google.cloud.documentai.v1beta2.Document.Page.Table value) { - if (tablesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_PageAnchor_PageRef_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef build() { + com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); } - ensureTablesIsMutable(); - tables_.add(index, value); - onChanged(); - } else { - tablesBuilder_.addMessage(index, value); + return result; } - return this; - } - /** - * - * - *
-       * A list of visually detected tables on the page.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table tables = 10; - */ - public Builder addTables( - com.google.cloud.documentai.v1beta2.Document.Page.Table.Builder builderForValue) { - if (tablesBuilder_ == null) { - ensureTablesIsMutable(); - tables_.add(builderForValue.build()); - onChanged(); - } else { - tablesBuilder_.addMessage(builderForValue.build()); + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef buildPartial() { + com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef result = + new com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; } - return this; - } - /** - * - * - *
-       * A list of visually detected tables on the page.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table tables = 10; - */ - public Builder addTables( - int index, - com.google.cloud.documentai.v1beta2.Document.Page.Table.Builder builderForValue) { - if (tablesBuilder_ == null) { - ensureTablesIsMutable(); - tables_.add(index, builderForValue.build()); - onChanged(); - } else { - tablesBuilder_.addMessage(index, builderForValue.build()); + + private void buildPartial0( + com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.page_ = page_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.layoutType_ = layoutType_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.layoutId_ = layoutId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.boundingPoly_ = + boundingPolyBuilder_ == null ? boundingPoly_ : boundingPolyBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.confidence_ = confidence_; + } } - return this; - } - /** - * - * - *
-       * A list of visually detected tables on the page.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table tables = 10; - */ - public Builder addAllTables( - java.lang.Iterable - values) { - if (tablesBuilder_ == null) { - ensureTablesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tables_); - onChanged(); - } else { - tablesBuilder_.addAllMessages(values); + + @java.lang.Override + public Builder clone() { + return super.clone(); } - return this; - } - /** - * - * - *
-       * A list of visually detected tables on the page.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table tables = 10; - */ - public Builder clearTables() { - if (tablesBuilder_ == null) { - tables_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000200); - onChanged(); - } else { - tablesBuilder_.clear(); + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); } - return this; - } - /** - * - * - *
-       * A list of visually detected tables on the page.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table tables = 10; - */ - public Builder removeTables(int index) { - if (tablesBuilder_ == null) { - ensureTablesIsMutable(); - tables_.remove(index); - onChanged(); - } else { - tablesBuilder_.remove(index); + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); } - return this; - } - /** - * - * - *
-       * A list of visually detected tables on the page.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table tables = 10; - */ - public com.google.cloud.documentai.v1beta2.Document.Page.Table.Builder getTablesBuilder( - int index) { - return getTablesFieldBuilder().getBuilder(index); - } - /** - * - * - *
-       * A list of visually detected tables on the page.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table tables = 10; - */ - public com.google.cloud.documentai.v1beta2.Document.Page.TableOrBuilder getTablesOrBuilder( - int index) { - if (tablesBuilder_ == null) { - return tables_.get(index); - } else { - return tablesBuilder_.getMessageOrBuilder(index); + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); } - } - /** - * - * - *
-       * A list of visually detected tables on the page.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table tables = 10; - */ - public java.util.List< - ? extends com.google.cloud.documentai.v1beta2.Document.Page.TableOrBuilder> - getTablesOrBuilderList() { - if (tablesBuilder_ != null) { - return tablesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(tables_); + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); } - } - /** - * - * - *
-       * A list of visually detected tables on the page.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table tables = 10; - */ - public com.google.cloud.documentai.v1beta2.Document.Page.Table.Builder addTablesBuilder() { - return getTablesFieldBuilder() - .addBuilder( - com.google.cloud.documentai.v1beta2.Document.Page.Table.getDefaultInstance()); - } - /** - * - * - *
-       * A list of visually detected tables on the page.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table tables = 10; - */ - public com.google.cloud.documentai.v1beta2.Document.Page.Table.Builder addTablesBuilder( - int index) { - return getTablesFieldBuilder() - .addBuilder( - index, - com.google.cloud.documentai.v1beta2.Document.Page.Table.getDefaultInstance()); - } - /** - * - * - *
-       * A list of visually detected tables on the page.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.Table tables = 10; - */ - public java.util.List - getTablesBuilderList() { - return getTablesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Table, - com.google.cloud.documentai.v1beta2.Document.Page.Table.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.TableOrBuilder> - getTablesFieldBuilder() { - if (tablesBuilder_ == null) { - tablesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.Table, - com.google.cloud.documentai.v1beta2.Document.Page.Table.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.TableOrBuilder>( - tables_, ((bitField0_ & 0x00000200) != 0), getParentForChildren(), isClean()); - tables_ = null; + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); } - return tablesBuilder_; - } - private java.util.List - formFields_ = java.util.Collections.emptyList(); + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef) { + return mergeFrom( + (com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef) other); + } else { + super.mergeFrom(other); + return this; + } + } - private void ensureFormFieldsIsMutable() { - if (!((bitField0_ & 0x00000400) != 0)) { - formFields_ = - new java.util.ArrayList( - formFields_); - bitField0_ |= 0x00000400; + public Builder mergeFrom( + com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef other) { + if (other + == com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef + .getDefaultInstance()) return this; + if (other.getPage() != 0L) { + setPage(other.getPage()); + } + if (other.layoutType_ != 0) { + setLayoutTypeValue(other.getLayoutTypeValue()); + } + if (!other.getLayoutId().isEmpty()) { + layoutId_ = other.layoutId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasBoundingPoly()) { + mergeBoundingPoly(other.getBoundingPoly()); + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; } - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.FormField, - com.google.cloud.documentai.v1beta2.Document.Page.FormField.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.FormFieldOrBuilder> - formFieldsBuilder_; + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + page_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + layoutType_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + layoutId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage( + getBoundingPolyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 45: + { + confidence_ = input.readFloat(); + bitField0_ |= 0x00000010; + break; + } // case 45 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long page_; + /** + * + * + *
+         * Required. Index into the
+         * [Document.pages][google.cloud.documentai.v1beta2.Document.pages]
+         * element, for example using
+         * `[Document.pages][page_refs.page]` to locate the related page element.
+         * This field is skipped when its value is the default `0`. See
+         * https://developers.google.com/protocol-buffers/docs/proto3#json.
+         * 
+ * + * int64 page = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The page. + */ + @java.lang.Override + public long getPage() { + return page_; + } + /** + * + * + *
+         * Required. Index into the
+         * [Document.pages][google.cloud.documentai.v1beta2.Document.pages]
+         * element, for example using
+         * `[Document.pages][page_refs.page]` to locate the related page element.
+         * This field is skipped when its value is the default `0`. See
+         * https://developers.google.com/protocol-buffers/docs/proto3#json.
+         * 
+ * + * int64 page = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The page to set. + * @return This builder for chaining. + */ + public Builder setPage(long value) { + + page_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. Index into the
+         * [Document.pages][google.cloud.documentai.v1beta2.Document.pages]
+         * element, for example using
+         * `[Document.pages][page_refs.page]` to locate the related page element.
+         * This field is skipped when its value is the default `0`. See
+         * https://developers.google.com/protocol-buffers/docs/proto3#json.
+         * 
+ * + * int64 page = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearPage() { + bitField0_ = (bitField0_ & ~0x00000001); + page_ = 0L; + onChanged(); + return this; + } - /** - * - * - *
-       * A list of visually detected form fields on the page.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.FormField form_fields = 11; - * - */ - public java.util.List - getFormFieldsList() { - if (formFieldsBuilder_ == null) { - return java.util.Collections.unmodifiableList(formFields_); - } else { - return formFieldsBuilder_.getMessageList(); + private int layoutType_ = 0; + /** + * + * + *
+         * Optional. The type of the layout element that is being referenced if
+         * any.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.LayoutType layout_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for layoutType. + */ + @java.lang.Override + public int getLayoutTypeValue() { + return layoutType_; } - } - /** - * - * - *
-       * A list of visually detected form fields on the page.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.FormField form_fields = 11; - * - */ - public int getFormFieldsCount() { - if (formFieldsBuilder_ == null) { - return formFields_.size(); - } else { - return formFieldsBuilder_.getCount(); + /** + * + * + *
+         * Optional. The type of the layout element that is being referenced if
+         * any.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.LayoutType layout_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for layoutType to set. + * @return This builder for chaining. + */ + public Builder setLayoutTypeValue(int value) { + layoutType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; } - } - /** - * - * - *
-       * A list of visually detected form fields on the page.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.FormField form_fields = 11; - * - */ - public com.google.cloud.documentai.v1beta2.Document.Page.FormField getFormFields(int index) { - if (formFieldsBuilder_ == null) { - return formFields_.get(index); - } else { - return formFieldsBuilder_.getMessage(index); + /** + * + * + *
+         * Optional. The type of the layout element that is being referenced if
+         * any.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.LayoutType layout_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The layoutType. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.LayoutType + getLayoutType() { + com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.LayoutType result = + com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.LayoutType.forNumber( + layoutType_); + return result == null + ? com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.LayoutType + .UNRECOGNIZED + : result; } - } - /** - * - * - *
-       * A list of visually detected form fields on the page.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.FormField form_fields = 11; - * - */ - public Builder setFormFields( - int index, com.google.cloud.documentai.v1beta2.Document.Page.FormField value) { - if (formFieldsBuilder_ == null) { + /** + * + * + *
+         * Optional. The type of the layout element that is being referenced if
+         * any.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.LayoutType layout_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The layoutType to set. + * @return This builder for chaining. + */ + public Builder setLayoutType( + com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.LayoutType value) { if (value == null) { throw new NullPointerException(); } - ensureFormFieldsIsMutable(); - formFields_.set(index, value); + bitField0_ |= 0x00000002; + layoutType_ = value.getNumber(); onChanged(); - } else { - formFieldsBuilder_.setMessage(index, value); + return this; } - return this; - } - /** - * - * - *
-       * A list of visually detected form fields on the page.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.FormField form_fields = 11; - * - */ - public Builder setFormFields( - int index, - com.google.cloud.documentai.v1beta2.Document.Page.FormField.Builder builderForValue) { - if (formFieldsBuilder_ == null) { - ensureFormFieldsIsMutable(); - formFields_.set(index, builderForValue.build()); + /** + * + * + *
+         * Optional. The type of the layout element that is being referenced if
+         * any.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.LayoutType layout_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearLayoutType() { + bitField0_ = (bitField0_ & ~0x00000002); + layoutType_ = 0; onChanged(); - } else { - formFieldsBuilder_.setMessage(index, builderForValue.build()); + return this; } - return this; - } - /** - * - * - *
-       * A list of visually detected form fields on the page.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.FormField form_fields = 11; - * - */ - public Builder addFormFields( - com.google.cloud.documentai.v1beta2.Document.Page.FormField value) { - if (formFieldsBuilder_ == null) { + + private java.lang.Object layoutId_ = ""; + /** + * + * + *
+         * Optional. Deprecated.  Use
+         * [PageRef.bounding_poly][google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.bounding_poly]
+         * instead.
+         * 
+ * + * string layout_id = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @deprecated google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.layout_id is + * deprecated. See google/cloud/documentai/v1beta2/document.proto;l=782 + * @return The layoutId. + */ + @java.lang.Deprecated + public java.lang.String getLayoutId() { + java.lang.Object ref = layoutId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + layoutId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Optional. Deprecated.  Use
+         * [PageRef.bounding_poly][google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.bounding_poly]
+         * instead.
+         * 
+ * + * string layout_id = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @deprecated google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.layout_id is + * deprecated. See google/cloud/documentai/v1beta2/document.proto;l=782 + * @return The bytes for layoutId. + */ + @java.lang.Deprecated + public com.google.protobuf.ByteString getLayoutIdBytes() { + java.lang.Object ref = layoutId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + layoutId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Optional. Deprecated.  Use
+         * [PageRef.bounding_poly][google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.bounding_poly]
+         * instead.
+         * 
+ * + * string layout_id = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @deprecated google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.layout_id is + * deprecated. See google/cloud/documentai/v1beta2/document.proto;l=782 + * @param value The layoutId to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setLayoutId(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - ensureFormFieldsIsMutable(); - formFields_.add(value); + layoutId_ = value; + bitField0_ |= 0x00000004; onChanged(); - } else { - formFieldsBuilder_.addMessage(value); + return this; } - return this; - } - /** - * - * - *
-       * A list of visually detected form fields on the page.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.FormField form_fields = 11; - * - */ - public Builder addFormFields( - int index, com.google.cloud.documentai.v1beta2.Document.Page.FormField value) { - if (formFieldsBuilder_ == null) { + /** + * + * + *
+         * Optional. Deprecated.  Use
+         * [PageRef.bounding_poly][google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.bounding_poly]
+         * instead.
+         * 
+ * + * string layout_id = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @deprecated google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.layout_id is + * deprecated. See google/cloud/documentai/v1beta2/document.proto;l=782 + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearLayoutId() { + layoutId_ = getDefaultInstance().getLayoutId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+         * Optional. Deprecated.  Use
+         * [PageRef.bounding_poly][google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.bounding_poly]
+         * instead.
+         * 
+ * + * string layout_id = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @deprecated google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.layout_id is + * deprecated. See google/cloud/documentai/v1beta2/document.proto;l=782 + * @param value The bytes for layoutId to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setLayoutIdBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - ensureFormFieldsIsMutable(); - formFields_.add(index, value); + checkByteStringIsUtf8(value); + layoutId_ = value; + bitField0_ |= 0x00000004; onChanged(); - } else { - formFieldsBuilder_.addMessage(index, value); + return this; } - return this; - } - /** - * - * - *
-       * A list of visually detected form fields on the page.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.FormField form_fields = 11; - * - */ - public Builder addFormFields( - com.google.cloud.documentai.v1beta2.Document.Page.FormField.Builder builderForValue) { - if (formFieldsBuilder_ == null) { - ensureFormFieldsIsMutable(); - formFields_.add(builderForValue.build()); - onChanged(); - } else { - formFieldsBuilder_.addMessage(builderForValue.build()); + + private com.google.cloud.documentai.v1beta2.BoundingPoly boundingPoly_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.BoundingPoly, + com.google.cloud.documentai.v1beta2.BoundingPoly.Builder, + com.google.cloud.documentai.v1beta2.BoundingPolyOrBuilder> + boundingPolyBuilder_; + /** + * + * + *
+         * Optional. Identifies the bounding polygon of a layout element on the
+         * page.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the boundingPoly field is set. + */ + public boolean hasBoundingPoly() { + return ((bitField0_ & 0x00000008) != 0); } - return this; - } - /** - * - * - *
-       * A list of visually detected form fields on the page.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.FormField form_fields = 11; - * - */ - public Builder addFormFields( - int index, - com.google.cloud.documentai.v1beta2.Document.Page.FormField.Builder builderForValue) { - if (formFieldsBuilder_ == null) { - ensureFormFieldsIsMutable(); - formFields_.add(index, builderForValue.build()); + /** + * + * + *
+         * Optional. Identifies the bounding polygon of a layout element on the
+         * page.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The boundingPoly. + */ + public com.google.cloud.documentai.v1beta2.BoundingPoly getBoundingPoly() { + if (boundingPolyBuilder_ == null) { + return boundingPoly_ == null + ? com.google.cloud.documentai.v1beta2.BoundingPoly.getDefaultInstance() + : boundingPoly_; + } else { + return boundingPolyBuilder_.getMessage(); + } + } + /** + * + * + *
+         * Optional. Identifies the bounding polygon of a layout element on the
+         * page.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setBoundingPoly(com.google.cloud.documentai.v1beta2.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundingPoly_ = value; + } else { + boundingPolyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; onChanged(); - } else { - formFieldsBuilder_.addMessage(index, builderForValue.build()); + return this; } - return this; - } - /** - * - * - *
-       * A list of visually detected form fields on the page.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.FormField form_fields = 11; - * - */ - public Builder addAllFormFields( - java.lang.Iterable - values) { - if (formFieldsBuilder_ == null) { - ensureFormFieldsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, formFields_); + /** + * + * + *
+         * Optional. Identifies the bounding polygon of a layout element on the
+         * page.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setBoundingPoly( + com.google.cloud.documentai.v1beta2.BoundingPoly.Builder builderForValue) { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = builderForValue.build(); + } else { + boundingPolyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; onChanged(); - } else { - formFieldsBuilder_.addAllMessages(values); + return this; } - return this; - } - /** - * - * - *
-       * A list of visually detected form fields on the page.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.FormField form_fields = 11; - * - */ - public Builder clearFormFields() { - if (formFieldsBuilder_ == null) { - formFields_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000400); + /** + * + * + *
+         * Optional. Identifies the bounding polygon of a layout element on the
+         * page.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeBoundingPoly(com.google.cloud.documentai.v1beta2.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && boundingPoly_ != null + && boundingPoly_ + != com.google.cloud.documentai.v1beta2.BoundingPoly.getDefaultInstance()) { + getBoundingPolyBuilder().mergeFrom(value); + } else { + boundingPoly_ = value; + } + } else { + boundingPolyBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+         * Optional. Identifies the bounding polygon of a layout element on the
+         * page.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearBoundingPoly() { + bitField0_ = (bitField0_ & ~0x00000008); + boundingPoly_ = null; + if (boundingPolyBuilder_ != null) { + boundingPolyBuilder_.dispose(); + boundingPolyBuilder_ = null; + } onChanged(); - } else { - formFieldsBuilder_.clear(); + return this; } - return this; - } - /** - * - * - *
-       * A list of visually detected form fields on the page.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.FormField form_fields = 11; - * - */ - public Builder removeFormFields(int index) { - if (formFieldsBuilder_ == null) { - ensureFormFieldsIsMutable(); - formFields_.remove(index); + /** + * + * + *
+         * Optional. Identifies the bounding polygon of a layout element on the
+         * page.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.documentai.v1beta2.BoundingPoly.Builder getBoundingPolyBuilder() { + bitField0_ |= 0x00000008; onChanged(); - } else { - formFieldsBuilder_.remove(index); + return getBoundingPolyFieldBuilder().getBuilder(); } - return this; - } - /** - * - * - *
-       * A list of visually detected form fields on the page.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.FormField form_fields = 11; - * - */ - public com.google.cloud.documentai.v1beta2.Document.Page.FormField.Builder - getFormFieldsBuilder(int index) { - return getFormFieldsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-       * A list of visually detected form fields on the page.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.FormField form_fields = 11; - * - */ - public com.google.cloud.documentai.v1beta2.Document.Page.FormFieldOrBuilder - getFormFieldsOrBuilder(int index) { - if (formFieldsBuilder_ == null) { - return formFields_.get(index); - } else { - return formFieldsBuilder_.getMessageOrBuilder(index); + /** + * + * + *
+         * Optional. Identifies the bounding polygon of a layout element on the
+         * page.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.documentai.v1beta2.BoundingPolyOrBuilder + getBoundingPolyOrBuilder() { + if (boundingPolyBuilder_ != null) { + return boundingPolyBuilder_.getMessageOrBuilder(); + } else { + return boundingPoly_ == null + ? com.google.cloud.documentai.v1beta2.BoundingPoly.getDefaultInstance() + : boundingPoly_; + } } - } - /** - * - * - *
-       * A list of visually detected form fields on the page.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.FormField form_fields = 11; - * - */ - public java.util.List< - ? extends com.google.cloud.documentai.v1beta2.Document.Page.FormFieldOrBuilder> - getFormFieldsOrBuilderList() { - if (formFieldsBuilder_ != null) { - return formFieldsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(formFields_); + /** + * + * + *
+         * Optional. Identifies the bounding polygon of a layout element on the
+         * page.
+         * 
+ * + * + * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.BoundingPoly, + com.google.cloud.documentai.v1beta2.BoundingPoly.Builder, + com.google.cloud.documentai.v1beta2.BoundingPolyOrBuilder> + getBoundingPolyFieldBuilder() { + if (boundingPolyBuilder_ == null) { + boundingPolyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.BoundingPoly, + com.google.cloud.documentai.v1beta2.BoundingPoly.Builder, + com.google.cloud.documentai.v1beta2.BoundingPolyOrBuilder>( + getBoundingPoly(), getParentForChildren(), isClean()); + boundingPoly_ = null; + } + return boundingPolyBuilder_; } - } - /** - * - * - *
-       * A list of visually detected form fields on the page.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.FormField form_fields = 11; - * - */ - public com.google.cloud.documentai.v1beta2.Document.Page.FormField.Builder - addFormFieldsBuilder() { - return getFormFieldsFieldBuilder() - .addBuilder( - com.google.cloud.documentai.v1beta2.Document.Page.FormField.getDefaultInstance()); - } - /** - * - * - *
-       * A list of visually detected form fields on the page.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.FormField form_fields = 11; - * - */ - public com.google.cloud.documentai.v1beta2.Document.Page.FormField.Builder - addFormFieldsBuilder(int index) { - return getFormFieldsFieldBuilder() - .addBuilder( - index, - com.google.cloud.documentai.v1beta2.Document.Page.FormField.getDefaultInstance()); - } - /** - * - * - *
-       * A list of visually detected form fields on the page.
-       * 
- * - * repeated .google.cloud.documentai.v1beta2.Document.Page.FormField form_fields = 11; - * - */ - public java.util.List - getFormFieldsBuilderList() { - return getFormFieldsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.FormField, - com.google.cloud.documentai.v1beta2.Document.Page.FormField.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.FormFieldOrBuilder> - getFormFieldsFieldBuilder() { - if (formFieldsBuilder_ == null) { - formFieldsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.Page.FormField, - com.google.cloud.documentai.v1beta2.Document.Page.FormField.Builder, - com.google.cloud.documentai.v1beta2.Document.Page.FormFieldOrBuilder>( - formFields_, ((bitField0_ & 0x00000400) != 0), getParentForChildren(), isClean()); - formFields_ = null; + private float confidence_; + /** + * + * + *
+         * Optional. Confidence of detected page element, if applicable. Range
+         * `[0, 1]`.
+         * 
+ * + * float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; } - return formFieldsBuilder_; - } - - @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.v1beta2.Document.Page) - } - - // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.Page) - private static final com.google.cloud.documentai.v1beta2.Document.Page DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta2.Document.Page(); - } - - public static com.google.cloud.documentai.v1beta2.Document.Page getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Page parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Page getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface EntityOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.Entity) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Provenance of the entity.
-     * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-     * 
- * - * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; - * - * @return Whether the textAnchor field is set. - */ - boolean hasTextAnchor(); - /** - * - * - *
-     * Provenance of the entity.
-     * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-     * 
- * - * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; - * - * @return The textAnchor. - */ - com.google.cloud.documentai.v1beta2.Document.TextAnchor getTextAnchor(); - /** - * - * - *
-     * Provenance of the entity.
-     * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-     * 
- * - * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; - */ - com.google.cloud.documentai.v1beta2.Document.TextAnchorOrBuilder getTextAnchorOrBuilder(); - - /** - * - * - *
-     * Required. Entity type from a schema e.g. `Address`.
-     * 
- * - * string type = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The type. - */ - java.lang.String getType(); - /** - * - * - *
-     * Required. Entity type from a schema e.g. `Address`.
-     * 
- * - * string type = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for type. - */ - com.google.protobuf.ByteString getTypeBytes(); - - /** - * - * - *
-     * Text value in the document e.g. `1600 Amphitheatre Pkwy`.
-     * 
- * - * string mention_text = 3; - * - * @return The mentionText. - */ - java.lang.String getMentionText(); - /** - * - * - *
-     * Text value in the document e.g. `1600 Amphitheatre Pkwy`.
-     * 
- * - * string mention_text = 3; - * - * @return The bytes for mentionText. - */ - com.google.protobuf.ByteString getMentionTextBytes(); - - /** - * - * - *
-     * Deprecated.  Use `id` field instead.
-     * 
- * - * string mention_id = 4; - * - * @return The mentionId. - */ - java.lang.String getMentionId(); - /** - * - * - *
-     * Deprecated.  Use `id` field instead.
-     * 
- * - * string mention_id = 4; - * - * @return The bytes for mentionId. - */ - com.google.protobuf.ByteString getMentionIdBytes(); - - /** - * - * - *
-     * Optional. Confidence of detected Schema entity. Range [0, 1].
-     * 
- * - * float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The confidence. - */ - float getConfidence(); - - /** - * - * - *
-     * Optional. Represents the provenance of this entity wrt. the location on the
-     * page where it was found.
-     * 
- * - * - * .google.cloud.documentai.v1beta2.Document.PageAnchor page_anchor = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the pageAnchor field is set. - */ - boolean hasPageAnchor(); - /** - * - * - *
-     * Optional. Represents the provenance of this entity wrt. the location on the
-     * page where it was found.
-     * 
- * - * - * .google.cloud.documentai.v1beta2.Document.PageAnchor page_anchor = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The pageAnchor. - */ - com.google.cloud.documentai.v1beta2.Document.PageAnchor getPageAnchor(); - /** - * - * - *
-     * Optional. Represents the provenance of this entity wrt. the location on the
-     * page where it was found.
-     * 
- * - * - * .google.cloud.documentai.v1beta2.Document.PageAnchor page_anchor = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.documentai.v1beta2.Document.PageAnchorOrBuilder getPageAnchorOrBuilder(); - - /** - * - * - *
-     * Optional. Canonical id. This will be a unique value in the entity list
-     * for this document.
-     * 
- * - * string id = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The id. - */ - java.lang.String getId(); - /** - * - * - *
-     * Optional. Canonical id. This will be a unique value in the entity list
-     * for this document.
-     * 
- * - * string id = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for id. - */ - com.google.protobuf.ByteString getIdBytes(); - } - /** - * - * - *
-   * A phrase in the text that is a known entity type, such as a person, an
-   * organization, or location.
-   * 
- * - * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Entity} - */ - public static final class Entity extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.Entity) - EntityOrBuilder { - private static final long serialVersionUID = 0L; - // Use Entity.newBuilder() to construct. - private Entity(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Entity() { - type_ = ""; - mentionText_ = ""; - mentionId_ = ""; - id_ = ""; - } + /** + * + * + *
+         * Optional. Confidence of detected page element, if applicable. Range
+         * `[0, 1]`.
+         * 
+ * + * float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Entity(); - } + confidence_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+         * Optional. Confidence of detected page element, if applicable. Range
+         * `[0, 1]`.
+         * 
+ * + * float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearConfidence() { + bitField0_ = (bitField0_ & ~0x00000010); + confidence_ = 0F; + onChanged(); + return this; + } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Entity_descriptor; - } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Entity_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1beta2.Document.Entity.class, - com.google.cloud.documentai.v1beta2.Document.Entity.Builder.class); - } + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } - public static final int TEXT_ANCHOR_FIELD_NUMBER = 1; - private com.google.cloud.documentai.v1beta2.Document.TextAnchor textAnchor_; - /** - * - * - *
-     * Provenance of the entity.
-     * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-     * 
- * - * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; - * - * @return Whether the textAnchor field is set. - */ - @java.lang.Override - public boolean hasTextAnchor() { - return textAnchor_ != null; - } - /** - * - * - *
-     * Provenance of the entity.
-     * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-     * 
- * - * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; - * - * @return The textAnchor. - */ - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.TextAnchor getTextAnchor() { - return textAnchor_ == null - ? com.google.cloud.documentai.v1beta2.Document.TextAnchor.getDefaultInstance() - : textAnchor_; - } - /** - * - * - *
-     * Provenance of the entity.
-     * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-     * 
- * - * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; - */ - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.TextAnchorOrBuilder - getTextAnchorOrBuilder() { - return textAnchor_ == null - ? com.google.cloud.documentai.v1beta2.Document.TextAnchor.getDefaultInstance() - : textAnchor_; - } + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef) + } - public static final int TYPE_FIELD_NUMBER = 2; + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef) + private static final com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef + DEFAULT_INSTANCE; - @SuppressWarnings("serial") - private volatile java.lang.Object type_ = ""; - /** - * - * - *
-     * Required. Entity type from a schema e.g. `Address`.
-     * 
- * - * string type = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The type. - */ - @java.lang.Override - public java.lang.String getType() { - java.lang.Object ref = type_; - 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(); - type_ = s; - return s; + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef(); } - } - /** - * - * - *
-     * Required. Entity type from a schema e.g. `Address`.
-     * 
- * - * string type = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for type. - */ - @java.lang.Override - public com.google.protobuf.ByteString getTypeBytes() { - java.lang.Object ref = type_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - type_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + + public static com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef + getDefaultInstance() { + return DEFAULT_INSTANCE; } - } - public static final int MENTION_TEXT_FIELD_NUMBER = 3; + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PageRef parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; - @SuppressWarnings("serial") - private volatile java.lang.Object mentionText_ = ""; - /** - * - * - *
-     * Text value in the document e.g. `1600 Amphitheatre Pkwy`.
-     * 
- * - * string mention_text = 3; - * - * @return The mentionText. - */ - @java.lang.Override - public java.lang.String getMentionText() { - java.lang.Object ref = mentionText_; - 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(); - mentionText_ = s; - return s; - } - } - /** - * - * - *
-     * Text value in the document e.g. `1600 Amphitheatre Pkwy`.
-     * 
- * - * string mention_text = 3; - * - * @return The bytes for mentionText. - */ - @java.lang.Override - public com.google.protobuf.ByteString getMentionTextBytes() { - java.lang.Object ref = mentionText_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - mentionText_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + public static com.google.protobuf.Parser parser() { + return PARSER; } - } - public static final int MENTION_ID_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object mentionId_ = ""; - /** - * - * - *
-     * Deprecated.  Use `id` field instead.
-     * 
- * - * string mention_id = 4; - * - * @return The mentionId. - */ - @java.lang.Override - public java.lang.String getMentionId() { - java.lang.Object ref = mentionId_; - 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(); - mentionId_ = s; - return s; + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; } - } - /** - * - * - *
-     * Deprecated.  Use `id` field instead.
-     * 
- * - * string mention_id = 4; - * - * @return The bytes for mentionId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getMentionIdBytes() { - java.lang.Object ref = mentionId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - mentionId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } } - public static final int CONFIDENCE_FIELD_NUMBER = 5; - private float confidence_ = 0F; - /** - * - * - *
-     * Optional. Confidence of detected Schema entity. Range [0, 1].
-     * 
- * - * float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } + public static final int PAGE_REFS_FIELD_NUMBER = 1; - public static final int PAGE_ANCHOR_FIELD_NUMBER = 6; - private com.google.cloud.documentai.v1beta2.Document.PageAnchor pageAnchor_; + @SuppressWarnings("serial") + private java.util.List + pageRefs_; /** * * *
-     * Optional. Represents the provenance of this entity wrt. the location on the
-     * page where it was found.
+     * One or more references to visual page elements
      * 
* - * - * .google.cloud.documentai.v1beta2.Document.PageAnchor page_anchor = 6 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; * - * - * @return Whether the pageAnchor field is set. */ @java.lang.Override - public boolean hasPageAnchor() { - return pageAnchor_ != null; + public java.util.List + getPageRefsList() { + return pageRefs_; } /** * * *
-     * Optional. Represents the provenance of this entity wrt. the location on the
-     * page where it was found.
+     * One or more references to visual page elements
      * 
* - * - * .google.cloud.documentai.v1beta2.Document.PageAnchor page_anchor = 6 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; * - * - * @return The pageAnchor. */ @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.PageAnchor getPageAnchor() { - return pageAnchor_ == null - ? com.google.cloud.documentai.v1beta2.Document.PageAnchor.getDefaultInstance() - : pageAnchor_; + public java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRefOrBuilder> + getPageRefsOrBuilderList() { + return pageRefs_; } /** * * *
-     * Optional. Represents the provenance of this entity wrt. the location on the
-     * page where it was found.
+     * One or more references to visual page elements
      * 
* - * - * .google.cloud.documentai.v1beta2.Document.PageAnchor page_anchor = 6 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; * */ @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.PageAnchorOrBuilder - getPageAnchorOrBuilder() { - return pageAnchor_ == null - ? com.google.cloud.documentai.v1beta2.Document.PageAnchor.getDefaultInstance() - : pageAnchor_; + public int getPageRefsCount() { + return pageRefs_.size(); } - - public static final int ID_FIELD_NUMBER = 7; - - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; /** * * *
-     * Optional. Canonical id. This will be a unique value in the entity list
-     * for this document.
+     * One or more references to visual page elements
      * 
* - * string id = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The id. + * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; + * */ @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - 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(); - id_ = s; - return s; - } + public com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef getPageRefs(int index) { + return pageRefs_.get(index); } /** * * *
-     * Optional. Canonical id. This will be a unique value in the entity list
-     * for this document.
+     * One or more references to visual page elements
      * 
* - * string id = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for id. + * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; + * */ @java.lang.Override - public com.google.protobuf.ByteString getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRefOrBuilder + getPageRefsOrBuilder(int index) { + return pageRefs_.get(index); } private byte memoizedIsInitialized = -1; @@ -31779,26 +57262,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (textAnchor_ != null) { - output.writeMessage(1, getTextAnchor()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, type_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mentionText_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, mentionText_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mentionId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, mentionId_); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - output.writeFloat(5, confidence_); - } - if (pageAnchor_ != null) { - output.writeMessage(6, getPageAnchor()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, id_); + for (int i = 0; i < pageRefs_.size(); i++) { + output.writeMessage(1, pageRefs_.get(i)); } getUnknownFields().writeTo(output); } @@ -31809,26 +57274,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (textAnchor_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTextAnchor()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, type_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mentionText_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, mentionText_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mentionId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, mentionId_); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(5, confidence_); - } - if (pageAnchor_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getPageAnchor()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, id_); + for (int i = 0; i < pageRefs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, pageRefs_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -31840,26 +57287,13 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.documentai.v1beta2.Document.Entity)) { + if (!(obj instanceof com.google.cloud.documentai.v1beta2.Document.PageAnchor)) { return super.equals(obj); } - com.google.cloud.documentai.v1beta2.Document.Entity other = - (com.google.cloud.documentai.v1beta2.Document.Entity) obj; + com.google.cloud.documentai.v1beta2.Document.PageAnchor other = + (com.google.cloud.documentai.v1beta2.Document.PageAnchor) obj; - if (hasTextAnchor() != other.hasTextAnchor()) return false; - if (hasTextAnchor()) { - if (!getTextAnchor().equals(other.getTextAnchor())) return false; - } - if (!getType().equals(other.getType())) return false; - if (!getMentionText().equals(other.getMentionText())) return false; - if (!getMentionId().equals(other.getMentionId())) return false; - if (java.lang.Float.floatToIntBits(getConfidence()) - != java.lang.Float.floatToIntBits(other.getConfidence())) return false; - if (hasPageAnchor() != other.hasPageAnchor()) return false; - if (hasPageAnchor()) { - if (!getPageAnchor().equals(other.getPageAnchor())) return false; - } - if (!getId().equals(other.getId())) return false; + if (!getPageRefsList().equals(other.getPageRefsList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -31871,94 +57305,80 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (hasTextAnchor()) { - hash = (37 * hash) + TEXT_ANCHOR_FIELD_NUMBER; - hash = (53 * hash) + getTextAnchor().hashCode(); - } - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + getType().hashCode(); - hash = (37 * hash) + MENTION_TEXT_FIELD_NUMBER; - hash = (53 * hash) + getMentionText().hashCode(); - hash = (37 * hash) + MENTION_ID_FIELD_NUMBER; - hash = (53 * hash) + getMentionId().hashCode(); - hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getConfidence()); - if (hasPageAnchor()) { - hash = (37 * hash) + PAGE_ANCHOR_FIELD_NUMBER; - hash = (53 * hash) + getPageAnchor().hashCode(); + if (getPageRefsCount() > 0) { + hash = (37 * hash) + PAGE_REFS_FIELD_NUMBER; + hash = (53 * hash) + getPageRefsList().hashCode(); } - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.documentai.v1beta2.Document.Entity parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.PageAnchor parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.documentai.v1beta2.Document.Entity parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.PageAnchor 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.v1beta2.Document.Entity parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.PageAnchor parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.documentai.v1beta2.Document.Entity parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.PageAnchor 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.v1beta2.Document.Entity parseFrom(byte[] data) + public static com.google.cloud.documentai.v1beta2.Document.PageAnchor parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.documentai.v1beta2.Document.Entity parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.PageAnchor parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.documentai.v1beta2.Document.Entity parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.PageAnchor parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.documentai.v1beta2.Document.Entity parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.PageAnchor 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.v1beta2.Document.Entity parseDelimitedFrom( + public static com.google.cloud.documentai.v1beta2.Document.PageAnchor parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.documentai.v1beta2.Document.Entity parseDelimitedFrom( + public static com.google.cloud.documentai.v1beta2.Document.PageAnchor 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.v1beta2.Document.Entity parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.PageAnchor parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.documentai.v1beta2.Document.Entity parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.PageAnchor parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -31976,7 +57396,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.documentai.v1beta2.Document.Entity prototype) { + com.google.cloud.documentai.v1beta2.Document.PageAnchor prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -31995,75 +57415,69 @@ protected Builder newBuilderForType( * * *
-     * A phrase in the text that is a known entity type, such as a person, an
-     * organization, or location.
+     * Referencing the visual context of the entity in the
+     * [Document.pages][google.cloud.documentai.v1beta2.Document.pages]. Page
+     * anchors can be cross-page, consist of multiple bounding polygons and
+     * optionally reference specific layout element types.
      * 
* - * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Entity} + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.PageAnchor} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.Entity) - com.google.cloud.documentai.v1beta2.Document.EntityOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.PageAnchor) + com.google.cloud.documentai.v1beta2.Document.PageAnchorOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Entity_descriptor; + .internal_static_google_cloud_documentai_v1beta2_Document_PageAnchor_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Entity_fieldAccessorTable + .internal_static_google_cloud_documentai_v1beta2_Document_PageAnchor_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1beta2.Document.Entity.class, - com.google.cloud.documentai.v1beta2.Document.Entity.Builder.class); - } - - // Construct using com.google.cloud.documentai.v1beta2.Document.Entity.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); + com.google.cloud.documentai.v1beta2.Document.PageAnchor.class, + com.google.cloud.documentai.v1beta2.Document.PageAnchor.Builder.class); } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - textAnchor_ = null; - if (textAnchorBuilder_ != null) { - textAnchorBuilder_.dispose(); - textAnchorBuilder_ = null; - } - type_ = ""; - mentionText_ = ""; - mentionId_ = ""; - confidence_ = 0F; - pageAnchor_ = null; - if (pageAnchorBuilder_ != null) { - pageAnchorBuilder_.dispose(); - pageAnchorBuilder_ = null; + // Construct using com.google.cloud.documentai.v1beta2.Document.PageAnchor.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (pageRefsBuilder_ == null) { + pageRefs_ = java.util.Collections.emptyList(); + } else { + pageRefs_ = null; + pageRefsBuilder_.clear(); } - id_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_Entity_descriptor; + .internal_static_google_cloud_documentai_v1beta2_Document_PageAnchor_descriptor; } @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Entity getDefaultInstanceForType() { - return com.google.cloud.documentai.v1beta2.Document.Entity.getDefaultInstance(); + public com.google.cloud.documentai.v1beta2.Document.PageAnchor getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta2.Document.PageAnchor.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Entity build() { - com.google.cloud.documentai.v1beta2.Document.Entity result = buildPartial(); + public com.google.cloud.documentai.v1beta2.Document.PageAnchor build() { + com.google.cloud.documentai.v1beta2.Document.PageAnchor result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -32071,9 +57485,10 @@ public com.google.cloud.documentai.v1beta2.Document.Entity build() { } @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Entity buildPartial() { - com.google.cloud.documentai.v1beta2.Document.Entity result = - new com.google.cloud.documentai.v1beta2.Document.Entity(this); + public com.google.cloud.documentai.v1beta2.Document.PageAnchor buildPartial() { + com.google.cloud.documentai.v1beta2.Document.PageAnchor result = + new com.google.cloud.documentai.v1beta2.Document.PageAnchor(this); + buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } @@ -32081,33 +57496,23 @@ public com.google.cloud.documentai.v1beta2.Document.Entity buildPartial() { return result; } - private void buildPartial0(com.google.cloud.documentai.v1beta2.Document.Entity result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.textAnchor_ = - textAnchorBuilder_ == null ? textAnchor_ : textAnchorBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.type_ = type_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.mentionText_ = mentionText_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.mentionId_ = mentionId_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.confidence_ = confidence_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.pageAnchor_ = - pageAnchorBuilder_ == null ? pageAnchor_ : pageAnchorBuilder_.build(); - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.id_ = id_; + private void buildPartialRepeatedFields( + com.google.cloud.documentai.v1beta2.Document.PageAnchor result) { + if (pageRefsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + pageRefs_ = java.util.Collections.unmodifiableList(pageRefs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.pageRefs_ = pageRefs_; + } else { + result.pageRefs_ = pageRefsBuilder_.build(); } } + private void buildPartial0(com.google.cloud.documentai.v1beta2.Document.PageAnchor result) { + int from_bitField0_ = bitField0_; + } + @java.lang.Override public Builder clone() { return super.clone(); @@ -32138,1032 +57543,497 @@ public Builder setRepeatedField( } @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.documentai.v1beta2.Document.Entity) { - return mergeFrom((com.google.cloud.documentai.v1beta2.Document.Entity) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.documentai.v1beta2.Document.Entity other) { - if (other == com.google.cloud.documentai.v1beta2.Document.Entity.getDefaultInstance()) - return this; - if (other.hasTextAnchor()) { - mergeTextAnchor(other.getTextAnchor()); - } - if (!other.getType().isEmpty()) { - type_ = other.type_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getMentionText().isEmpty()) { - mentionText_ = other.mentionText_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.getMentionId().isEmpty()) { - mentionId_ = other.mentionId_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (other.getConfidence() != 0F) { - setConfidence(other.getConfidence()); - } - if (other.hasPageAnchor()) { - mergePageAnchor(other.getPageAnchor()); - } - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000040; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getTextAnchorFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - type_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - mentionText_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - mentionId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 45: - { - confidence_ = input.readFloat(); - bitField0_ |= 0x00000010; - break; - } // case 45 - case 50: - { - input.readMessage(getPageAnchorFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000020; - break; - } // case 50 - case 58: - { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - break; - } // case 58 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private com.google.cloud.documentai.v1beta2.Document.TextAnchor textAnchor_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.TextAnchor, - com.google.cloud.documentai.v1beta2.Document.TextAnchor.Builder, - com.google.cloud.documentai.v1beta2.Document.TextAnchorOrBuilder> - textAnchorBuilder_; - /** - * - * - *
-       * Provenance of the entity.
-       * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-       * 
- * - * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; - * - * @return Whether the textAnchor field is set. - */ - public boolean hasTextAnchor() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-       * Provenance of the entity.
-       * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-       * 
- * - * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; - * - * @return The textAnchor. - */ - public com.google.cloud.documentai.v1beta2.Document.TextAnchor getTextAnchor() { - if (textAnchorBuilder_ == null) { - return textAnchor_ == null - ? com.google.cloud.documentai.v1beta2.Document.TextAnchor.getDefaultInstance() - : textAnchor_; - } else { - return textAnchorBuilder_.getMessage(); - } - } - /** - * - * - *
-       * Provenance of the entity.
-       * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-       * 
- * - * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; - */ - public Builder setTextAnchor(com.google.cloud.documentai.v1beta2.Document.TextAnchor value) { - if (textAnchorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - textAnchor_ = value; - } else { - textAnchorBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-       * Provenance of the entity.
-       * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-       * 
- * - * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; - */ - public Builder setTextAnchor( - com.google.cloud.documentai.v1beta2.Document.TextAnchor.Builder builderForValue) { - if (textAnchorBuilder_ == null) { - textAnchor_ = builderForValue.build(); - } else { - textAnchorBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-       * Provenance of the entity.
-       * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-       * 
- * - * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; - */ - public Builder mergeTextAnchor( - com.google.cloud.documentai.v1beta2.Document.TextAnchor value) { - if (textAnchorBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && textAnchor_ != null - && textAnchor_ - != com.google.cloud.documentai.v1beta2.Document.TextAnchor.getDefaultInstance()) { - getTextAnchorBuilder().mergeFrom(value); - } else { - textAnchor_ = value; - } - } else { - textAnchorBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-       * Provenance of the entity.
-       * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-       * 
- * - * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; - */ - public Builder clearTextAnchor() { - bitField0_ = (bitField0_ & ~0x00000001); - textAnchor_ = null; - if (textAnchorBuilder_ != null) { - textAnchorBuilder_.dispose(); - textAnchorBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-       * Provenance of the entity.
-       * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-       * 
- * - * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; - */ - public com.google.cloud.documentai.v1beta2.Document.TextAnchor.Builder - getTextAnchorBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getTextAnchorFieldBuilder().getBuilder(); - } - /** - * - * - *
-       * Provenance of the entity.
-       * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-       * 
- * - * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; - */ - public com.google.cloud.documentai.v1beta2.Document.TextAnchorOrBuilder - getTextAnchorOrBuilder() { - if (textAnchorBuilder_ != null) { - return textAnchorBuilder_.getMessageOrBuilder(); - } else { - return textAnchor_ == null - ? com.google.cloud.documentai.v1beta2.Document.TextAnchor.getDefaultInstance() - : textAnchor_; - } - } - /** - * - * - *
-       * Provenance of the entity.
-       * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-       * 
- * - * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.TextAnchor, - com.google.cloud.documentai.v1beta2.Document.TextAnchor.Builder, - com.google.cloud.documentai.v1beta2.Document.TextAnchorOrBuilder> - getTextAnchorFieldBuilder() { - if (textAnchorBuilder_ == null) { - textAnchorBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.TextAnchor, - com.google.cloud.documentai.v1beta2.Document.TextAnchor.Builder, - com.google.cloud.documentai.v1beta2.Document.TextAnchorOrBuilder>( - getTextAnchor(), getParentForChildren(), isClean()); - textAnchor_ = null; - } - return textAnchorBuilder_; - } - - private java.lang.Object type_ = ""; - /** - * - * - *
-       * Required. Entity type from a schema e.g. `Address`.
-       * 
- * - * string type = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The type. - */ - public java.lang.String getType() { - java.lang.Object ref = type_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - type_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * Required. Entity type from a schema e.g. `Address`.
-       * 
- * - * string type = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for type. - */ - public com.google.protobuf.ByteString getTypeBytes() { - java.lang.Object ref = type_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - type_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * Required. Entity type from a schema e.g. `Address`.
-       * 
- * - * string type = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-       * Required. Entity type from a schema e.g. `Address`.
-       * 
- * - * string type = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearType() { - type_ = getDefaultInstance().getType(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-       * Required. Entity type from a schema e.g. `Address`.
-       * 
- * - * string type = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for type to set. - * @return This builder for chaining. - */ - public Builder setTypeBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - type_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object mentionText_ = ""; - /** - * - * - *
-       * Text value in the document e.g. `1600 Amphitheatre Pkwy`.
-       * 
- * - * string mention_text = 3; - * - * @return The mentionText. - */ - public java.lang.String getMentionText() { - java.lang.Object ref = mentionText_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mentionText_ = s; - return s; - } else { - return (java.lang.String) ref; - } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); } - /** - * - * - *
-       * Text value in the document e.g. `1600 Amphitheatre Pkwy`.
-       * 
- * - * string mention_text = 3; - * - * @return The bytes for mentionText. - */ - public com.google.protobuf.ByteString getMentionTextBytes() { - java.lang.Object ref = mentionText_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - mentionText_ = b; - return b; + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta2.Document.PageAnchor) { + return mergeFrom((com.google.cloud.documentai.v1beta2.Document.PageAnchor) other); } else { - return (com.google.protobuf.ByteString) ref; + super.mergeFrom(other); + return this; } } - /** - * - * - *
-       * Text value in the document e.g. `1600 Amphitheatre Pkwy`.
-       * 
- * - * string mention_text = 3; - * - * @param value The mentionText to set. - * @return This builder for chaining. - */ - public Builder setMentionText(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + + public Builder mergeFrom(com.google.cloud.documentai.v1beta2.Document.PageAnchor other) { + if (other == com.google.cloud.documentai.v1beta2.Document.PageAnchor.getDefaultInstance()) + return this; + if (pageRefsBuilder_ == null) { + if (!other.pageRefs_.isEmpty()) { + if (pageRefs_.isEmpty()) { + pageRefs_ = other.pageRefs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePageRefsIsMutable(); + pageRefs_.addAll(other.pageRefs_); + } + onChanged(); + } + } else { + if (!other.pageRefs_.isEmpty()) { + if (pageRefsBuilder_.isEmpty()) { + pageRefsBuilder_.dispose(); + pageRefsBuilder_ = null; + pageRefs_ = other.pageRefs_; + bitField0_ = (bitField0_ & ~0x00000001); + pageRefsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPageRefsFieldBuilder() + : null; + } else { + pageRefsBuilder_.addAllMessages(other.pageRefs_); + } + } } - mentionText_ = value; - bitField0_ |= 0x00000004; + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } - /** - * - * - *
-       * Text value in the document e.g. `1600 Amphitheatre Pkwy`.
-       * 
- * - * string mention_text = 3; - * - * @return This builder for chaining. - */ - public Builder clearMentionText() { - mentionText_ = getDefaultInstance().getMentionText(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; + + @java.lang.Override + public final boolean isInitialized() { + return true; } - /** - * - * - *
-       * Text value in the document e.g. `1600 Amphitheatre Pkwy`.
-       * 
- * - * string mention_text = 3; - * - * @param value The bytes for mentionText to set. - * @return This builder for chaining. - */ - public Builder setMentionTextBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); } - checkByteStringIsUtf8(value); - mentionText_ = value; - bitField0_ |= 0x00000004; - onChanged(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef m = + input.readMessage( + com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.parser(), + extensionRegistry); + if (pageRefsBuilder_ == null) { + ensurePageRefsIsMutable(); + pageRefs_.add(m); + } else { + pageRefsBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally return this; } - private java.lang.Object mentionId_ = ""; - /** - * - * - *
-       * Deprecated.  Use `id` field instead.
-       * 
- * - * string mention_id = 4; - * - * @return The mentionId. - */ - public java.lang.String getMentionId() { - java.lang.Object ref = mentionId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mentionId_ = s; - return s; - } else { - return (java.lang.String) ref; + private int bitField0_; + + private java.util.List + pageRefs_ = java.util.Collections.emptyList(); + + private void ensurePageRefsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + pageRefs_ = + new java.util.ArrayList< + com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef>(pageRefs_); + bitField0_ |= 0x00000001; } } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef, + com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.Builder, + com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRefOrBuilder> + pageRefsBuilder_; + /** * * *
-       * Deprecated.  Use `id` field instead.
+       * One or more references to visual page elements
        * 
* - * string mention_id = 4; - * - * @return The bytes for mentionId. + * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; + * */ - public com.google.protobuf.ByteString getMentionIdBytes() { - java.lang.Object ref = mentionId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - mentionId_ = b; - return b; + public java.util.List + getPageRefsList() { + if (pageRefsBuilder_ == null) { + return java.util.Collections.unmodifiableList(pageRefs_); } else { - return (com.google.protobuf.ByteString) ref; + return pageRefsBuilder_.getMessageList(); } } /** * * *
-       * Deprecated.  Use `id` field instead.
+       * One or more references to visual page elements
        * 
* - * string mention_id = 4; - * - * @param value The mentionId to set. - * @return This builder for chaining. + * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; + * */ - public Builder setMentionId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public int getPageRefsCount() { + if (pageRefsBuilder_ == null) { + return pageRefs_.size(); + } else { + return pageRefsBuilder_.getCount(); } - mentionId_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-       * Deprecated.  Use `id` field instead.
-       * 
- * - * string mention_id = 4; - * - * @return This builder for chaining. - */ - public Builder clearMentionId() { - mentionId_ = getDefaultInstance().getMentionId(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; } /** * * *
-       * Deprecated.  Use `id` field instead.
+       * One or more references to visual page elements
        * 
* - * string mention_id = 4; - * - * @param value The bytes for mentionId to set. - * @return This builder for chaining. + * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; + * */ - public Builder setMentionIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef getPageRefs( + int index) { + if (pageRefsBuilder_ == null) { + return pageRefs_.get(index); + } else { + return pageRefsBuilder_.getMessage(index); } - checkByteStringIsUtf8(value); - mentionId_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private float confidence_; - /** - * - * - *
-       * Optional. Confidence of detected Schema entity. Range [0, 1].
-       * 
- * - * float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - /** - * - * - *
-       * Optional. Confidence of detected Schema entity. Range [0, 1].
-       * 
- * - * float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The confidence to set. - * @return This builder for chaining. - */ - public Builder setConfidence(float value) { - - confidence_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; } /** * * *
-       * Optional. Confidence of detected Schema entity. Range [0, 1].
+       * One or more references to visual page elements
        * 
* - * float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. + * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; + * */ - public Builder clearConfidence() { - bitField0_ = (bitField0_ & ~0x00000010); - confidence_ = 0F; - onChanged(); + public Builder setPageRefs( + int index, com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef value) { + if (pageRefsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePageRefsIsMutable(); + pageRefs_.set(index, value); + onChanged(); + } else { + pageRefsBuilder_.setMessage(index, value); + } return this; } - - private com.google.cloud.documentai.v1beta2.Document.PageAnchor pageAnchor_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.PageAnchor, - com.google.cloud.documentai.v1beta2.Document.PageAnchor.Builder, - com.google.cloud.documentai.v1beta2.Document.PageAnchorOrBuilder> - pageAnchorBuilder_; /** * * *
-       * Optional. Represents the provenance of this entity wrt. the location on the
-       * page where it was found.
+       * One or more references to visual page elements
        * 
* - * - * .google.cloud.documentai.v1beta2.Document.PageAnchor page_anchor = 6 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; * - * - * @return Whether the pageAnchor field is set. */ - public boolean hasPageAnchor() { - return ((bitField0_ & 0x00000020) != 0); + public Builder setPageRefs( + int index, + com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.Builder builderForValue) { + if (pageRefsBuilder_ == null) { + ensurePageRefsIsMutable(); + pageRefs_.set(index, builderForValue.build()); + onChanged(); + } else { + pageRefsBuilder_.setMessage(index, builderForValue.build()); + } + return this; } /** * * *
-       * Optional. Represents the provenance of this entity wrt. the location on the
-       * page where it was found.
+       * One or more references to visual page elements
        * 
* - * - * .google.cloud.documentai.v1beta2.Document.PageAnchor page_anchor = 6 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; * - * - * @return The pageAnchor. */ - public com.google.cloud.documentai.v1beta2.Document.PageAnchor getPageAnchor() { - if (pageAnchorBuilder_ == null) { - return pageAnchor_ == null - ? com.google.cloud.documentai.v1beta2.Document.PageAnchor.getDefaultInstance() - : pageAnchor_; + public Builder addPageRefs( + com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef value) { + if (pageRefsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePageRefsIsMutable(); + pageRefs_.add(value); + onChanged(); } else { - return pageAnchorBuilder_.getMessage(); + pageRefsBuilder_.addMessage(value); } + return this; } /** * * *
-       * Optional. Represents the provenance of this entity wrt. the location on the
-       * page where it was found.
+       * One or more references to visual page elements
        * 
* - * - * .google.cloud.documentai.v1beta2.Document.PageAnchor page_anchor = 6 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; * */ - public Builder setPageAnchor(com.google.cloud.documentai.v1beta2.Document.PageAnchor value) { - if (pageAnchorBuilder_ == null) { + public Builder addPageRefs( + int index, com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef value) { + if (pageRefsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - pageAnchor_ = value; + ensurePageRefsIsMutable(); + pageRefs_.add(index, value); + onChanged(); } else { - pageAnchorBuilder_.setMessage(value); + pageRefsBuilder_.addMessage(index, value); } - bitField0_ |= 0x00000020; - onChanged(); return this; } /** * * *
-       * Optional. Represents the provenance of this entity wrt. the location on the
-       * page where it was found.
+       * One or more references to visual page elements
        * 
* - * - * .google.cloud.documentai.v1beta2.Document.PageAnchor page_anchor = 6 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; * */ - public Builder setPageAnchor( - com.google.cloud.documentai.v1beta2.Document.PageAnchor.Builder builderForValue) { - if (pageAnchorBuilder_ == null) { - pageAnchor_ = builderForValue.build(); + public Builder addPageRefs( + com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.Builder builderForValue) { + if (pageRefsBuilder_ == null) { + ensurePageRefsIsMutable(); + pageRefs_.add(builderForValue.build()); + onChanged(); } else { - pageAnchorBuilder_.setMessage(builderForValue.build()); + pageRefsBuilder_.addMessage(builderForValue.build()); } - bitField0_ |= 0x00000020; - onChanged(); return this; } /** * * *
-       * Optional. Represents the provenance of this entity wrt. the location on the
-       * page where it was found.
+       * One or more references to visual page elements
        * 
* - * - * .google.cloud.documentai.v1beta2.Document.PageAnchor page_anchor = 6 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; * */ - public Builder mergePageAnchor( - com.google.cloud.documentai.v1beta2.Document.PageAnchor value) { - if (pageAnchorBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) - && pageAnchor_ != null - && pageAnchor_ - != com.google.cloud.documentai.v1beta2.Document.PageAnchor.getDefaultInstance()) { - getPageAnchorBuilder().mergeFrom(value); - } else { - pageAnchor_ = value; - } + public Builder addPageRefs( + int index, + com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.Builder builderForValue) { + if (pageRefsBuilder_ == null) { + ensurePageRefsIsMutable(); + pageRefs_.add(index, builderForValue.build()); + onChanged(); } else { - pageAnchorBuilder_.mergeFrom(value); + pageRefsBuilder_.addMessage(index, builderForValue.build()); } - bitField0_ |= 0x00000020; - onChanged(); return this; } /** * * *
-       * Optional. Represents the provenance of this entity wrt. the location on the
-       * page where it was found.
+       * One or more references to visual page elements
        * 
* - * - * .google.cloud.documentai.v1beta2.Document.PageAnchor page_anchor = 6 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; * */ - public Builder clearPageAnchor() { - bitField0_ = (bitField0_ & ~0x00000020); - pageAnchor_ = null; - if (pageAnchorBuilder_ != null) { - pageAnchorBuilder_.dispose(); - pageAnchorBuilder_ = null; + public Builder addAllPageRefs( + java.lang.Iterable< + ? extends com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef> + values) { + if (pageRefsBuilder_ == null) { + ensurePageRefsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, pageRefs_); + onChanged(); + } else { + pageRefsBuilder_.addAllMessages(values); } - onChanged(); return this; } /** * * *
-       * Optional. Represents the provenance of this entity wrt. the location on the
-       * page where it was found.
+       * One or more references to visual page elements
        * 
* - * - * .google.cloud.documentai.v1beta2.Document.PageAnchor page_anchor = 6 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; * */ - public com.google.cloud.documentai.v1beta2.Document.PageAnchor.Builder - getPageAnchorBuilder() { - bitField0_ |= 0x00000020; - onChanged(); - return getPageAnchorFieldBuilder().getBuilder(); + public Builder clearPageRefs() { + if (pageRefsBuilder_ == null) { + pageRefs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + pageRefsBuilder_.clear(); + } + return this; } /** * * *
-       * Optional. Represents the provenance of this entity wrt. the location on the
-       * page where it was found.
+       * One or more references to visual page elements
        * 
* - * - * .google.cloud.documentai.v1beta2.Document.PageAnchor page_anchor = 6 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; * */ - public com.google.cloud.documentai.v1beta2.Document.PageAnchorOrBuilder - getPageAnchorOrBuilder() { - if (pageAnchorBuilder_ != null) { - return pageAnchorBuilder_.getMessageOrBuilder(); + public Builder removePageRefs(int index) { + if (pageRefsBuilder_ == null) { + ensurePageRefsIsMutable(); + pageRefs_.remove(index); + onChanged(); } else { - return pageAnchor_ == null - ? com.google.cloud.documentai.v1beta2.Document.PageAnchor.getDefaultInstance() - : pageAnchor_; + pageRefsBuilder_.remove(index); } + return this; } /** * * *
-       * Optional. Represents the provenance of this entity wrt. the location on the
-       * page where it was found.
+       * One or more references to visual page elements
        * 
* - * - * .google.cloud.documentai.v1beta2.Document.PageAnchor page_anchor = 6 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; * */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.PageAnchor, - com.google.cloud.documentai.v1beta2.Document.PageAnchor.Builder, - com.google.cloud.documentai.v1beta2.Document.PageAnchorOrBuilder> - getPageAnchorFieldBuilder() { - if (pageAnchorBuilder_ == null) { - pageAnchorBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.PageAnchor, - com.google.cloud.documentai.v1beta2.Document.PageAnchor.Builder, - com.google.cloud.documentai.v1beta2.Document.PageAnchorOrBuilder>( - getPageAnchor(), getParentForChildren(), isClean()); - pageAnchor_ = null; - } - return pageAnchorBuilder_; + public com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.Builder + getPageRefsBuilder(int index) { + return getPageRefsFieldBuilder().getBuilder(index); } - - private java.lang.Object id_ = ""; /** * * *
-       * Optional. Canonical id. This will be a unique value in the entity list
-       * for this document.
+       * One or more references to visual page elements
        * 
* - * string id = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The id. + * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; + * */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; + public com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRefOrBuilder + getPageRefsOrBuilder(int index) { + if (pageRefsBuilder_ == null) { + return pageRefs_.get(index); } else { - return (java.lang.String) ref; + return pageRefsBuilder_.getMessageOrBuilder(index); } } /** * * *
-       * Optional. Canonical id. This will be a unique value in the entity list
-       * for this document.
+       * One or more references to visual page elements
        * 
* - * string id = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for id. + * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; + * */ - public com.google.protobuf.ByteString getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - id_ = b; - return b; + public java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRefOrBuilder> + getPageRefsOrBuilderList() { + if (pageRefsBuilder_ != null) { + return pageRefsBuilder_.getMessageOrBuilderList(); } else { - return (com.google.protobuf.ByteString) ref; + return java.util.Collections.unmodifiableList(pageRefs_); } } /** * * *
-       * Optional. Canonical id. This will be a unique value in the entity list
-       * for this document.
+       * One or more references to visual page elements
        * 
* - * string id = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The id to set. - * @return This builder for chaining. + * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; + * */ - public Builder setId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - id_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; + public com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.Builder + addPageRefsBuilder() { + return getPageRefsFieldBuilder() + .addBuilder( + com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef + .getDefaultInstance()); } /** * * *
-       * Optional. Canonical id. This will be a unique value in the entity list
-       * for this document.
+       * One or more references to visual page elements
        * 
* - * string id = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. + * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; + * */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - return this; + public com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.Builder + addPageRefsBuilder(int index) { + return getPageRefsFieldBuilder() + .addBuilder( + index, + com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef + .getDefaultInstance()); } /** * * *
-       * Optional. Canonical id. This will be a unique value in the entity list
-       * for this document.
+       * One or more references to visual page elements
        * 
* - * string id = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for id to set. - * @return This builder for chaining. + * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; + * */ - public Builder setIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public java.util.List + getPageRefsBuilderList() { + return getPageRefsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef, + com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.Builder, + com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRefOrBuilder> + getPageRefsFieldBuilder() { + if (pageRefsBuilder_ == null) { + pageRefsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef, + com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.Builder, + com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRefOrBuilder>( + pageRefs_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + pageRefs_ = null; } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; + return pageRefsBuilder_; } @java.lang.Override @@ -33178,24 +58048,24 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta2.Document.Entity) + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta2.Document.PageAnchor) } - // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.Entity) - private static final com.google.cloud.documentai.v1beta2.Document.Entity DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.PageAnchor) + private static final com.google.cloud.documentai.v1beta2.Document.PageAnchor DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta2.Document.Entity(); + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta2.Document.PageAnchor(); } - public static com.google.cloud.documentai.v1beta2.Document.Entity getDefaultInstance() { + public static com.google.cloud.documentai.v1beta2.Document.PageAnchor getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public Entity parsePartialFrom( + public PageAnchor parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -33215,4498 +58085,6470 @@ public Entity parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.Entity getDefaultInstanceForType() { + public com.google.cloud.documentai.v1beta2.Document.PageAnchor getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface EntityRelationOrBuilder + public interface ProvenanceOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.EntityRelation) + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.Provenance) com.google.protobuf.MessageOrBuilder { /** * * *
-     * Subject entity id.
-     * 
- * - * string subject_id = 1; - * - * @return The subjectId. - */ - java.lang.String getSubjectId(); - /** - * - * - *
-     * Subject entity id.
-     * 
- * - * string subject_id = 1; - * - * @return The bytes for subjectId. - */ - com.google.protobuf.ByteString getSubjectIdBytes(); - - /** - * - * - *
-     * Object entity id.
-     * 
- * - * string object_id = 2; - * - * @return The objectId. - */ - java.lang.String getObjectId(); - /** - * - * - *
-     * Object entity id.
+     * The index of the revision that produced this element.
      * 
* - * string object_id = 2; + * int32 revision = 1 [deprecated = true]; * - * @return The bytes for objectId. + * @deprecated google.cloud.documentai.v1beta2.Document.Provenance.revision is deprecated. See + * google/cloud/documentai/v1beta2/document.proto;l=849 + * @return The revision. */ - com.google.protobuf.ByteString getObjectIdBytes(); + @java.lang.Deprecated + int getRevision(); /** * * *
-     * Relationship description.
-     * 
- * - * string relation = 3; - * - * @return The relation. - */ - java.lang.String getRelation(); - /** - * - * - *
-     * Relationship description.
+     * The Id of this operation.  Needs to be unique within the scope of the
+     * revision.
      * 
* - * string relation = 3; + * int32 id = 2 [deprecated = true]; * - * @return The bytes for relation. + * @deprecated google.cloud.documentai.v1beta2.Document.Provenance.id is deprecated. See + * google/cloud/documentai/v1beta2/document.proto;l=853 + * @return The id. */ - com.google.protobuf.ByteString getRelationBytes(); - } - /** - * - * - *
-   * Relationship between [Entities][google.cloud.documentai.v1beta2.Document.Entity].
-   * 
- * - * Protobuf type {@code google.cloud.documentai.v1beta2.Document.EntityRelation} - */ - public static final class EntityRelation extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.EntityRelation) - EntityRelationOrBuilder { - private static final long serialVersionUID = 0L; - // Use EntityRelation.newBuilder() to construct. - private EntityRelation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private EntityRelation() { - subjectId_ = ""; - objectId_ = ""; - relation_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new EntityRelation(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_EntityRelation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_EntityRelation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1beta2.Document.EntityRelation.class, - com.google.cloud.documentai.v1beta2.Document.EntityRelation.Builder.class); - } - - public static final int SUBJECT_ID_FIELD_NUMBER = 1; + @java.lang.Deprecated + int getId(); - @SuppressWarnings("serial") - private volatile java.lang.Object subjectId_ = ""; - /** - * - * - *
-     * Subject entity id.
-     * 
- * - * string subject_id = 1; - * - * @return The subjectId. - */ - @java.lang.Override - public java.lang.String getSubjectId() { - java.lang.Object ref = subjectId_; - 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(); - subjectId_ = s; - return s; - } - } /** * * *
-     * Subject entity id.
+     * References to the original elements that are replaced.
      * 
* - * string subject_id = 1; - * - * @return The bytes for subjectId. + * repeated .google.cloud.documentai.v1beta2.Document.Provenance.Parent parents = 3; + * */ - @java.lang.Override - public com.google.protobuf.ByteString getSubjectIdBytes() { - java.lang.Object ref = subjectId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - subjectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int OBJECT_ID_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object objectId_ = ""; + java.util.List getParentsList(); /** * * *
-     * Object entity id.
+     * References to the original elements that are replaced.
      * 
* - * string object_id = 2; - * - * @return The objectId. + * repeated .google.cloud.documentai.v1beta2.Document.Provenance.Parent parents = 3; + * */ - @java.lang.Override - public java.lang.String getObjectId() { - java.lang.Object ref = objectId_; - 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(); - objectId_ = s; - return s; - } - } + com.google.cloud.documentai.v1beta2.Document.Provenance.Parent getParents(int index); /** * * *
-     * Object entity id.
+     * References to the original elements that are replaced.
      * 
* - * string object_id = 2; - * - * @return The bytes for objectId. + * repeated .google.cloud.documentai.v1beta2.Document.Provenance.Parent parents = 3; + * */ - @java.lang.Override - public com.google.protobuf.ByteString getObjectIdBytes() { - java.lang.Object ref = objectId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - objectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RELATION_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object relation_ = ""; + int getParentsCount(); /** * * *
-     * Relationship description.
+     * References to the original elements that are replaced.
      * 
* - * string relation = 3; - * - * @return The relation. + * repeated .google.cloud.documentai.v1beta2.Document.Provenance.Parent parents = 3; + * */ - @java.lang.Override - public java.lang.String getRelation() { - java.lang.Object ref = relation_; - 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(); - relation_ = s; - return s; - } - } + java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.Provenance.ParentOrBuilder> + getParentsOrBuilderList(); /** * * *
-     * Relationship description.
-     * 
- * - * string relation = 3; - * - * @return The bytes for relation. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRelationBytes() { - java.lang.Object ref = relation_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - relation_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subjectId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, subjectId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(objectId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, objectId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(relation_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, relation_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subjectId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, subjectId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(objectId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, objectId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(relation_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, relation_); - } - size += getUnknownFields().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.v1beta2.Document.EntityRelation)) { - return super.equals(obj); - } - com.google.cloud.documentai.v1beta2.Document.EntityRelation other = - (com.google.cloud.documentai.v1beta2.Document.EntityRelation) obj; - - if (!getSubjectId().equals(other.getSubjectId())) return false; - if (!getObjectId().equals(other.getObjectId())) return false; - if (!getRelation().equals(other.getRelation())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + SUBJECT_ID_FIELD_NUMBER; - hash = (53 * hash) + getSubjectId().hashCode(); - hash = (37 * hash) + OBJECT_ID_FIELD_NUMBER; - hash = (53 * hash) + getObjectId().hashCode(); - hash = (37 * hash) + RELATION_FIELD_NUMBER; - hash = (53 * hash) + getRelation().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.documentai.v1beta2.Document.EntityRelation parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.documentai.v1beta2.Document.EntityRelation 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.v1beta2.Document.EntityRelation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.documentai.v1beta2.Document.EntityRelation 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.v1beta2.Document.EntityRelation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.documentai.v1beta2.Document.EntityRelation parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.documentai.v1beta2.Document.EntityRelation parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.documentai.v1beta2.Document.EntityRelation 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.v1beta2.Document.EntityRelation parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.documentai.v1beta2.Document.EntityRelation parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + * References to the original elements that are replaced. + * + * + * repeated .google.cloud.documentai.v1beta2.Document.Provenance.Parent parents = 3; + * + */ + com.google.cloud.documentai.v1beta2.Document.Provenance.ParentOrBuilder getParentsOrBuilder( + int index); - public static com.google.cloud.documentai.v1beta2.Document.EntityRelation parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + /** + * + * + *
+     * The type of provenance operation.
+     * 
+ * + * .google.cloud.documentai.v1beta2.Document.Provenance.OperationType type = 4; + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+     * The type of provenance operation.
+     * 
+ * + * .google.cloud.documentai.v1beta2.Document.Provenance.OperationType type = 4; + * + * @return The type. + */ + com.google.cloud.documentai.v1beta2.Document.Provenance.OperationType getType(); + } + /** + * + * + *
+   * Structure to identify provenance relationships between annotations in
+   * different revisions.
+   * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Provenance} + */ + public static final class Provenance extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.Provenance) + ProvenanceOrBuilder { + private static final long serialVersionUID = 0L; + // Use Provenance.newBuilder() to construct. + private Provenance(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); } - public static com.google.cloud.documentai.v1beta2.Document.EntityRelation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + private Provenance() { + parents_ = java.util.Collections.emptyList(); + type_ = 0; } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Provenance(); } - public static Builder newBuilder( - com.google.cloud.documentai.v1beta2.Document.EntityRelation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Provenance_descriptor; } @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Provenance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Document.Provenance.class, + com.google.cloud.documentai.v1beta2.Document.Provenance.Builder.class); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } /** * * *
-     * Relationship between [Entities][google.cloud.documentai.v1beta2.Document.Entity].
+     * If a processor or agent does an explicit operation on existing elements.
      * 
* - * Protobuf type {@code google.cloud.documentai.v1beta2.Document.EntityRelation} + * Protobuf enum {@code google.cloud.documentai.v1beta2.Document.Provenance.OperationType} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.EntityRelation) - com.google.cloud.documentai.v1beta2.Document.EntityRelationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_EntityRelation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_EntityRelation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1beta2.Document.EntityRelation.class, - com.google.cloud.documentai.v1beta2.Document.EntityRelation.Builder.class); - } - - // Construct using com.google.cloud.documentai.v1beta2.Document.EntityRelation.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - subjectId_ = ""; - objectId_ = ""; - relation_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_EntityRelation_descriptor; - } + public enum OperationType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Operation type unspecified. If no operation is specified a provenance
+       * entry is simply used to match against a `parent`.
+       * 
+ * + * OPERATION_TYPE_UNSPECIFIED = 0; + */ + OPERATION_TYPE_UNSPECIFIED(0), + /** + * + * + *
+       * Add an element.
+       * 
+ * + * ADD = 1; + */ + ADD(1), + /** + * + * + *
+       * Remove an element identified by `parent`.
+       * 
+ * + * REMOVE = 2; + */ + REMOVE(2), + /** + * + * + *
+       * Updates any fields within the given provenance scope of the message. It
+       * overwrites the fields rather than replacing them.  Use this when you
+       * want to update a field value of an entity without also updating all the
+       * child properties.
+       * 
+ * + * UPDATE = 7; + */ + UPDATE(7), + /** + * + * + *
+       * Currently unused. Replace an element identified by `parent`.
+       * 
+ * + * REPLACE = 3; + */ + REPLACE(3), + /** + * + * + *
+       * Deprecated. Request human review for the element identified by
+       * `parent`.
+       * 
+ * + * EVAL_REQUESTED = 4 [deprecated = true]; + */ + @java.lang.Deprecated + EVAL_REQUESTED(4), + /** + * + * + *
+       * Deprecated. Element is reviewed and approved at human review,
+       * confidence will be set to 1.0.
+       * 
+ * + * EVAL_APPROVED = 5 [deprecated = true]; + */ + @java.lang.Deprecated + EVAL_APPROVED(5), + /** + * + * + *
+       * Deprecated. Element is skipped in the validation process.
+       * 
+ * + * EVAL_SKIPPED = 6 [deprecated = true]; + */ + @java.lang.Deprecated + EVAL_SKIPPED(6), + UNRECOGNIZED(-1), + ; - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.EntityRelation - getDefaultInstanceForType() { - return com.google.cloud.documentai.v1beta2.Document.EntityRelation.getDefaultInstance(); - } + /** + * + * + *
+       * Operation type unspecified. If no operation is specified a provenance
+       * entry is simply used to match against a `parent`.
+       * 
+ * + * OPERATION_TYPE_UNSPECIFIED = 0; + */ + public static final int OPERATION_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * Add an element.
+       * 
+ * + * ADD = 1; + */ + public static final int ADD_VALUE = 1; + /** + * + * + *
+       * Remove an element identified by `parent`.
+       * 
+ * + * REMOVE = 2; + */ + public static final int REMOVE_VALUE = 2; + /** + * + * + *
+       * Updates any fields within the given provenance scope of the message. It
+       * overwrites the fields rather than replacing them.  Use this when you
+       * want to update a field value of an entity without also updating all the
+       * child properties.
+       * 
+ * + * UPDATE = 7; + */ + public static final int UPDATE_VALUE = 7; + /** + * + * + *
+       * Currently unused. Replace an element identified by `parent`.
+       * 
+ * + * REPLACE = 3; + */ + public static final int REPLACE_VALUE = 3; + /** + * + * + *
+       * Deprecated. Request human review for the element identified by
+       * `parent`.
+       * 
+ * + * EVAL_REQUESTED = 4 [deprecated = true]; + */ + @java.lang.Deprecated public static final int EVAL_REQUESTED_VALUE = 4; + /** + * + * + *
+       * Deprecated. Element is reviewed and approved at human review,
+       * confidence will be set to 1.0.
+       * 
+ * + * EVAL_APPROVED = 5 [deprecated = true]; + */ + @java.lang.Deprecated public static final int EVAL_APPROVED_VALUE = 5; + /** + * + * + *
+       * Deprecated. Element is skipped in the validation process.
+       * 
+ * + * EVAL_SKIPPED = 6 [deprecated = true]; + */ + @java.lang.Deprecated public static final int EVAL_SKIPPED_VALUE = 6; - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.EntityRelation build() { - com.google.cloud.documentai.v1beta2.Document.EntityRelation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); } - return result; + return value; } - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.EntityRelation buildPartial() { - com.google.cloud.documentai.v1beta2.Document.EntityRelation result = - new com.google.cloud.documentai.v1beta2.Document.EntityRelation(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; + /** + * @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 OperationType valueOf(int value) { + return forNumber(value); } - private void buildPartial0( - com.google.cloud.documentai.v1beta2.Document.EntityRelation result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.subjectId_ = subjectId_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.objectId_ = objectId_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.relation_ = relation_; + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static OperationType forNumber(int value) { + switch (value) { + case 0: + return OPERATION_TYPE_UNSPECIFIED; + case 1: + return ADD; + case 2: + return REMOVE; + case 7: + return UPDATE; + case 3: + return REPLACE; + case 4: + return EVAL_REQUESTED; + case 5: + return EVAL_APPROVED; + case 6: + return EVAL_SKIPPED; + default: + return null; } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public OperationType findValueByNumber(int number) { + return OperationType.forNumber(number); + } + }; - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.Document.Provenance.getDescriptor() + .getEnumTypes() + .get(0); } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.documentai.v1beta2.Document.EntityRelation) { - return mergeFrom((com.google.cloud.documentai.v1beta2.Document.EntityRelation) other); - } else { - super.mergeFrom(other); - return this; - } - } + private static final OperationType[] VALUES = values(); - public Builder mergeFrom(com.google.cloud.documentai.v1beta2.Document.EntityRelation other) { - if (other - == com.google.cloud.documentai.v1beta2.Document.EntityRelation.getDefaultInstance()) - return this; - if (!other.getSubjectId().isEmpty()) { - subjectId_ = other.subjectId_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getObjectId().isEmpty()) { - objectId_ = other.objectId_; - bitField0_ |= 0x00000002; - onChanged(); + public static OperationType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); } - if (!other.getRelation().isEmpty()) { - relation_ = other.relation_; - bitField0_ |= 0x00000004; - onChanged(); + if (desc.getIndex() == -1) { + return UNRECOGNIZED; } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; + return VALUES[desc.getIndex()]; } - @java.lang.Override - public final boolean isInitialized() { - return true; - } + private final int value; - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - subjectId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - objectId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - relation_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; + private OperationType(int value) { + this.value = value; } - private int bitField0_; + // @@protoc_insertion_point(enum_scope:google.cloud.documentai.v1beta2.Document.Provenance.OperationType) + } + + public interface ParentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.Provenance.Parent) + com.google.protobuf.MessageOrBuilder { - private java.lang.Object subjectId_ = ""; /** * * *
-       * Subject entity id.
+       * The index of the index into current revision's parent_ids list.
        * 
* - * string subject_id = 1; + * int32 revision = 1; * - * @return The subjectId. + * @return The revision. */ - public java.lang.String getSubjectId() { - java.lang.Object ref = subjectId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - subjectId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } + int getRevision(); + /** * * *
-       * Subject entity id.
+       * The index of the parent item in the corresponding item list (eg. list
+       * of entities, properties within entities, etc.) in the parent revision.
        * 
* - * string subject_id = 1; + * int32 index = 3; * - * @return The bytes for subjectId. + * @return The index. */ - public com.google.protobuf.ByteString getSubjectIdBytes() { - java.lang.Object ref = subjectId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - subjectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + int getIndex(); + /** * * *
-       * Subject entity id.
+       * The id of the parent provenance.
        * 
* - * string subject_id = 1; + * int32 id = 2 [deprecated = true]; * - * @param value The subjectId to set. - * @return This builder for chaining. + * @deprecated google.cloud.documentai.v1beta2.Document.Provenance.Parent.id is deprecated. + * See google/cloud/documentai/v1beta2/document.proto;l=812 + * @return The id. */ - public Builder setSubjectId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - subjectId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; + @java.lang.Deprecated + int getId(); + } + /** + * + * + *
+     * The parent element the current element is based on. Used for
+     * referencing/aligning, removal and replacement operations.
+     * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Provenance.Parent} + */ + public static final class Parent extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.Provenance.Parent) + ParentOrBuilder { + private static final long serialVersionUID = 0L; + // Use Parent.newBuilder() to construct. + private Parent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); } - /** - * - * - *
-       * Subject entity id.
-       * 
- * - * string subject_id = 1; - * - * @return This builder for chaining. - */ - public Builder clearSubjectId() { - subjectId_ = getDefaultInstance().getSubjectId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; + + private Parent() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Parent(); } - /** - * - * - *
-       * Subject entity id.
-       * 
- * - * string subject_id = 1; - * - * @param value The bytes for subjectId to set. - * @return This builder for chaining. - */ - public Builder setSubjectIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - subjectId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Provenance_Parent_descriptor; } - private java.lang.Object objectId_ = ""; - /** - * - * - *
-       * Object entity id.
-       * 
- * - * string object_id = 2; - * - * @return The objectId. - */ - public java.lang.String getObjectId() { - java.lang.Object ref = objectId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - objectId_ = s; - return s; - } else { - return (java.lang.String) ref; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Provenance_Parent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Document.Provenance.Parent.class, + com.google.cloud.documentai.v1beta2.Document.Provenance.Parent.Builder.class); } + + public static final int REVISION_FIELD_NUMBER = 1; + private int revision_ = 0; /** * * *
-       * Object entity id.
+       * The index of the index into current revision's parent_ids list.
        * 
* - * string object_id = 2; + * int32 revision = 1; * - * @return The bytes for objectId. + * @return The revision. */ - public com.google.protobuf.ByteString getObjectIdBytes() { - java.lang.Object ref = objectId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - objectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + @java.lang.Override + public int getRevision() { + return revision_; } + + public static final int INDEX_FIELD_NUMBER = 3; + private int index_ = 0; /** * * *
-       * Object entity id.
+       * The index of the parent item in the corresponding item list (eg. list
+       * of entities, properties within entities, etc.) in the parent revision.
        * 
* - * string object_id = 2; + * int32 index = 3; * - * @param value The objectId to set. - * @return This builder for chaining. + * @return The index. */ - public Builder setObjectId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - objectId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; + @java.lang.Override + public int getIndex() { + return index_; } + + public static final int ID_FIELD_NUMBER = 2; + private int id_ = 0; /** * * *
-       * Object entity id.
+       * The id of the parent provenance.
        * 
* - * string object_id = 2; + * int32 id = 2 [deprecated = true]; * - * @return This builder for chaining. + * @deprecated google.cloud.documentai.v1beta2.Document.Provenance.Parent.id is deprecated. + * See google/cloud/documentai/v1beta2/document.proto;l=812 + * @return The id. */ - public Builder clearObjectId() { - objectId_ = getDefaultInstance().getObjectId(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; + @java.lang.Override + @java.lang.Deprecated + public int getId() { + return id_; } - /** - * - * - *
-       * Object entity id.
-       * 
- * - * string object_id = 2; - * - * @param value The bytes for objectId to set. - * @return This builder for chaining. - */ - public Builder setObjectIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + + 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 (revision_ != 0) { + output.writeInt32(1, revision_); } - checkByteStringIsUtf8(value); - objectId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; + if (id_ != 0) { + output.writeInt32(2, id_); + } + if (index_ != 0) { + output.writeInt32(3, index_); + } + getUnknownFields().writeTo(output); } - private java.lang.Object relation_ = ""; - /** - * - * - *
-       * Relationship description.
-       * 
- * - * string relation = 3; - * - * @return The relation. - */ - public java.lang.String getRelation() { - java.lang.Object ref = relation_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - relation_ = s; - return s; - } else { - return (java.lang.String) ref; + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (revision_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, revision_); + } + if (id_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, id_); + } + if (index_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, index_); + } + size += getUnknownFields().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.v1beta2.Document.Provenance.Parent)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta2.Document.Provenance.Parent other = + (com.google.cloud.documentai.v1beta2.Document.Provenance.Parent) obj; + + if (getRevision() != other.getRevision()) return false; + if (getIndex() != other.getIndex()) return false; + if (getId() != other.getId()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + REVISION_FIELD_NUMBER; + hash = (53 * hash) + getRevision(); + hash = (37 * hash) + INDEX_FIELD_NUMBER; + hash = (53 * hash) + getIndex(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta2.Document.Provenance.Parent parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.Provenance.Parent 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.v1beta2.Document.Provenance.Parent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.Provenance.Parent 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.v1beta2.Document.Provenance.Parent parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.Provenance.Parent parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta2.Document.Provenance.Parent parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.Provenance.Parent 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.v1beta2.Document.Provenance.Parent + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.Provenance.Parent + 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.v1beta2.Document.Provenance.Parent parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.Provenance.Parent 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.v1beta2.Document.Provenance.Parent 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; } /** * * *
-       * Relationship description.
+       * The parent element the current element is based on. Used for
+       * referencing/aligning, removal and replacement operations.
        * 
* - * string relation = 3; - * - * @return The bytes for relation. + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Provenance.Parent} */ - public com.google.protobuf.ByteString getRelationBytes() { - java.lang.Object ref = relation_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - relation_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.Provenance.Parent) + com.google.cloud.documentai.v1beta2.Document.Provenance.ParentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Provenance_Parent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Provenance_Parent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Document.Provenance.Parent.class, + com.google.cloud.documentai.v1beta2.Document.Provenance.Parent.Builder.class); + } + + // Construct using + // com.google.cloud.documentai.v1beta2.Document.Provenance.Parent.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + revision_ = 0; + index_ = 0; + id_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Provenance_Parent_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Provenance.Parent + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta2.Document.Provenance.Parent + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Provenance.Parent build() { + com.google.cloud.documentai.v1beta2.Document.Provenance.Parent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Provenance.Parent buildPartial() { + com.google.cloud.documentai.v1beta2.Document.Provenance.Parent result = + new com.google.cloud.documentai.v1beta2.Document.Provenance.Parent(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.documentai.v1beta2.Document.Provenance.Parent result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.revision_ = revision_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.index_ = index_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.id_ = id_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta2.Document.Provenance.Parent) { + return mergeFrom( + (com.google.cloud.documentai.v1beta2.Document.Provenance.Parent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1beta2.Document.Provenance.Parent other) { + if (other + == com.google.cloud.documentai.v1beta2.Document.Provenance.Parent + .getDefaultInstance()) return this; + if (other.getRevision() != 0) { + setRevision(other.getRevision()); + } + if (other.getIndex() != 0) { + setIndex(other.getIndex()); + } + if (other.getId() != 0) { + setId(other.getId()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + revision_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + id_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 16 + case 24: + { + index_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int revision_; + /** + * + * + *
+         * The index of the index into current revision's parent_ids list.
+         * 
+ * + * int32 revision = 1; + * + * @return The revision. + */ + @java.lang.Override + public int getRevision() { + return revision_; + } + /** + * + * + *
+         * The index of the index into current revision's parent_ids list.
+         * 
+ * + * int32 revision = 1; + * + * @param value The revision to set. + * @return This builder for chaining. + */ + public Builder setRevision(int value) { + + revision_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * The index of the index into current revision's parent_ids list.
+         * 
+ * + * int32 revision = 1; + * + * @return This builder for chaining. + */ + public Builder clearRevision() { + bitField0_ = (bitField0_ & ~0x00000001); + revision_ = 0; + onChanged(); + return this; + } + + private int index_; + /** + * + * + *
+         * The index of the parent item in the corresponding item list (eg. list
+         * of entities, properties within entities, etc.) in the parent revision.
+         * 
+ * + * int32 index = 3; + * + * @return The index. + */ + @java.lang.Override + public int getIndex() { + return index_; + } + /** + * + * + *
+         * The index of the parent item in the corresponding item list (eg. list
+         * of entities, properties within entities, etc.) in the parent revision.
+         * 
+ * + * int32 index = 3; + * + * @param value The index to set. + * @return This builder for chaining. + */ + public Builder setIndex(int value) { + + index_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * The index of the parent item in the corresponding item list (eg. list
+         * of entities, properties within entities, etc.) in the parent revision.
+         * 
+ * + * int32 index = 3; + * + * @return This builder for chaining. + */ + public Builder clearIndex() { + bitField0_ = (bitField0_ & ~0x00000002); + index_ = 0; + onChanged(); + return this; + } + + private int id_; + /** + * + * + *
+         * The id of the parent provenance.
+         * 
+ * + * int32 id = 2 [deprecated = true]; + * + * @deprecated google.cloud.documentai.v1beta2.Document.Provenance.Parent.id is deprecated. + * See google/cloud/documentai/v1beta2/document.proto;l=812 + * @return The id. + */ + @java.lang.Override + @java.lang.Deprecated + public int getId() { + return id_; + } + /** + * + * + *
+         * The id of the parent provenance.
+         * 
+ * + * int32 id = 2 [deprecated = true]; + * + * @deprecated google.cloud.documentai.v1beta2.Document.Provenance.Parent.id is deprecated. + * See google/cloud/documentai/v1beta2/document.proto;l=812 + * @param value The id to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setId(int value) { + + id_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; } - } - /** - * - * - *
-       * Relationship description.
-       * 
- * - * string relation = 3; - * - * @param value The relation to set. - * @return This builder for chaining. - */ - public Builder setRelation(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + /** + * + * + *
+         * The id of the parent provenance.
+         * 
+ * + * int32 id = 2 [deprecated = true]; + * + * @deprecated google.cloud.documentai.v1beta2.Document.Provenance.Parent.id is deprecated. + * See google/cloud/documentai/v1beta2/document.proto;l=812 + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearId() { + bitField0_ = (bitField0_ & ~0x00000004); + id_ = 0; + onChanged(); + return this; } - relation_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-       * Relationship description.
-       * 
- * - * string relation = 3; - * - * @return This builder for chaining. - */ - public Builder clearRelation() { - relation_ = getDefaultInstance().getRelation(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-       * Relationship description.
-       * 
- * - * string relation = 3; - * - * @param value The bytes for relation to set. - * @return This builder for chaining. - */ - public Builder setRelationBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); } - checkByteStringIsUtf8(value); - relation_ = value; - bitField0_ |= 0x00000004; - 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); + } - @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.v1beta2.Document.Provenance.Parent) } - // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta2.Document.EntityRelation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.EntityRelation) - private static final com.google.cloud.documentai.v1beta2.Document.EntityRelation - DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.Provenance.Parent) + private static final com.google.cloud.documentai.v1beta2.Document.Provenance.Parent + DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta2.Document.EntityRelation(); - } + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta2.Document.Provenance.Parent(); + } - public static com.google.cloud.documentai.v1beta2.Document.EntityRelation getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static com.google.cloud.documentai.v1beta2.Document.Provenance.Parent + getDefaultInstance() { + return DEFAULT_INSTANCE; + } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EntityRelation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Parent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } - return builder.buildPartial(); - } - }; + }; - public static com.google.protobuf.Parser parser() { - return PARSER; + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Provenance.Parent + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } + public static final int REVISION_FIELD_NUMBER = 1; + private int revision_ = 0; + /** + * + * + *
+     * The index of the revision that produced this element.
+     * 
+ * + * int32 revision = 1 [deprecated = true]; + * + * @deprecated google.cloud.documentai.v1beta2.Document.Provenance.revision is deprecated. See + * google/cloud/documentai/v1beta2/document.proto;l=849 + * @return The revision. + */ @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + @java.lang.Deprecated + public int getRevision() { + return revision_; } + public static final int ID_FIELD_NUMBER = 2; + private int id_ = 0; + /** + * + * + *
+     * The Id of this operation.  Needs to be unique within the scope of the
+     * revision.
+     * 
+ * + * int32 id = 2 [deprecated = true]; + * + * @deprecated google.cloud.documentai.v1beta2.Document.Provenance.id is deprecated. See + * google/cloud/documentai/v1beta2/document.proto;l=853 + * @return The id. + */ @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.EntityRelation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; + @java.lang.Deprecated + public int getId() { + return id_; } - } - public interface TextAnchorOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.TextAnchor) - com.google.protobuf.MessageOrBuilder { + public static final int PARENTS_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private java.util.List parents_; /** * * *
-     * The text segments from the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * References to the original elements that are replaced.
      * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; + * repeated .google.cloud.documentai.v1beta2.Document.Provenance.Parent parents = 3; * */ - java.util.List - getTextSegmentsList(); + @java.lang.Override + public java.util.List + getParentsList() { + return parents_; + } /** * * *
-     * The text segments from the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * References to the original elements that are replaced.
      * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; + * repeated .google.cloud.documentai.v1beta2.Document.Provenance.Parent parents = 3; * */ - com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment getTextSegments(int index); + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.Provenance.ParentOrBuilder> + getParentsOrBuilderList() { + return parents_; + } /** * * *
-     * The text segments from the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * References to the original elements that are replaced.
      * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; + * repeated .google.cloud.documentai.v1beta2.Document.Provenance.Parent parents = 3; * */ - int getTextSegmentsCount(); + @java.lang.Override + public int getParentsCount() { + return parents_.size(); + } /** * * *
-     * The text segments from the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * References to the original elements that are replaced.
      * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; + * repeated .google.cloud.documentai.v1beta2.Document.Provenance.Parent parents = 3; * */ - java.util.List< - ? extends com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegmentOrBuilder> - getTextSegmentsOrBuilderList(); + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Provenance.Parent getParents(int index) { + return parents_.get(index); + } /** * * *
-     * The text segments from the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * References to the original elements that are replaced.
      * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; + * repeated .google.cloud.documentai.v1beta2.Document.Provenance.Parent parents = 3; * */ - com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegmentOrBuilder - getTextSegmentsOrBuilder(int index); + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Provenance.ParentOrBuilder + getParentsOrBuilder(int index) { + return parents_.get(index); + } + public static final int TYPE_FIELD_NUMBER = 4; + private int type_ = 0; /** * * *
-     * Contains the content of the text span so that users do
-     * not have to look it up in the text_segments.
+     * The type of provenance operation.
      * 
* - * string content = 2; + * .google.cloud.documentai.v1beta2.Document.Provenance.OperationType type = 4; * - * @return The content. + * @return The enum numeric value on the wire for type. */ - java.lang.String getContent(); + @java.lang.Override + public int getTypeValue() { + return type_; + } /** * * *
-     * Contains the content of the text span so that users do
-     * not have to look it up in the text_segments.
+     * The type of provenance operation.
      * 
* - * string content = 2; + * .google.cloud.documentai.v1beta2.Document.Provenance.OperationType type = 4; * - * @return The bytes for content. + * @return The type. */ - com.google.protobuf.ByteString getContentBytes(); - } - /** - * - * - *
-   * Text reference indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-   * 
- * - * Protobuf type {@code google.cloud.documentai.v1beta2.Document.TextAnchor} - */ - public static final class TextAnchor extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.TextAnchor) - TextAnchorOrBuilder { - private static final long serialVersionUID = 0L; - // Use TextAnchor.newBuilder() to construct. - private TextAnchor(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Provenance.OperationType getType() { + com.google.cloud.documentai.v1beta2.Document.Provenance.OperationType result = + com.google.cloud.documentai.v1beta2.Document.Provenance.OperationType.forNumber(type_); + return result == null + ? com.google.cloud.documentai.v1beta2.Document.Provenance.OperationType.UNRECOGNIZED + : result; } - private TextAnchor() { - textSegments_ = java.util.Collections.emptyList(); - content_ = ""; + 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 - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new TextAnchor(); + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (revision_ != 0) { + output.writeInt32(1, revision_); + } + if (id_ != 0) { + output.writeInt32(2, id_); + } + for (int i = 0; i < parents_.size(); i++) { + output.writeMessage(3, parents_.get(i)); + } + if (type_ + != com.google.cloud.documentai.v1beta2.Document.Provenance.OperationType + .OPERATION_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, type_); + } + getUnknownFields().writeTo(output); } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_TextAnchor_descriptor; + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (revision_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, revision_); + } + if (id_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, id_); + } + for (int i = 0; i < parents_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, parents_.get(i)); + } + if (type_ + != com.google.cloud.documentai.v1beta2.Document.Provenance.OperationType + .OPERATION_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, type_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_TextAnchor_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1beta2.Document.TextAnchor.class, - com.google.cloud.documentai.v1beta2.Document.TextAnchor.Builder.class); + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.documentai.v1beta2.Document.Provenance)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta2.Document.Provenance other = + (com.google.cloud.documentai.v1beta2.Document.Provenance) obj; + + if (getRevision() != other.getRevision()) return false; + if (getId() != other.getId()) return false; + if (!getParentsList().equals(other.getParentsList())) return false; + if (type_ != other.type_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } - public interface TextSegmentOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + REVISION_FIELD_NUMBER; + hash = (53 * hash) + getRevision(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId(); + if (getParentsCount() > 0) { + hash = (37 * hash) + PARENTS_FIELD_NUMBER; + hash = (53 * hash) + getParentsList().hashCode(); + } + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } - /** - * - * - *
-       * [TextSegment][google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment] start UTF-8 char index in the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-       * 
- * - * int64 start_index = 1; - * - * @return The startIndex. - */ - long getStartIndex(); + public static com.google.cloud.documentai.v1beta2.Document.Provenance parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * - * - *
-       * [TextSegment][google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment] half open end UTF-8 char index in the
-       * [Document.text][google.cloud.documentai.v1beta2.Document.text].
-       * 
- * - * int64 end_index = 2; - * - * @return The endIndex. - */ - long getEndIndex(); + public static com.google.cloud.documentai.v1beta2.Document.Provenance 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.v1beta2.Document.Provenance parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.Provenance 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.v1beta2.Document.Provenance parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.Provenance parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta2.Document.Provenance parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.Provenance 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.v1beta2.Document.Provenance parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.Provenance 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.v1beta2.Document.Provenance parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.Provenance 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.v1beta2.Document.Provenance 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 text segment in the [Document.text][google.cloud.documentai.v1beta2.Document.text]. The indices may be out of bounds
-     * which indicate that the text extends into another document shard for
-     * large sharded documents. See [ShardInfo.text_offset][google.cloud.documentai.v1beta2.Document.ShardInfo.text_offset]
+     * Structure to identify provenance relationships between annotations in
+     * different revisions.
      * 
* - * Protobuf type {@code google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment} + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Provenance} */ - public static final class TextSegment extends com.google.protobuf.GeneratedMessageV3 + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment) - TextSegmentOrBuilder { - private static final long serialVersionUID = 0L; - // Use TextSegment.newBuilder() to construct. - private TextSegment(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private TextSegment() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new TextSegment(); - } - + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.Provenance) + com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_TextAnchor_TextSegment_descriptor; + .internal_static_google_cloud_documentai_v1beta2_Document_Provenance_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_TextAnchor_TextSegment_fieldAccessorTable + .internal_static_google_cloud_documentai_v1beta2_Document_Provenance_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment.class, - com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment.Builder.class); - } - - public static final int START_INDEX_FIELD_NUMBER = 1; - private long startIndex_ = 0L; - /** - * - * - *
-       * [TextSegment][google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment] start UTF-8 char index in the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-       * 
- * - * int64 start_index = 1; - * - * @return The startIndex. - */ - @java.lang.Override - public long getStartIndex() { - return startIndex_; - } - - public static final int END_INDEX_FIELD_NUMBER = 2; - private long endIndex_ = 0L; - /** - * - * - *
-       * [TextSegment][google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment] half open end UTF-8 char index in the
-       * [Document.text][google.cloud.documentai.v1beta2.Document.text].
-       * 
- * - * int64 end_index = 2; - * - * @return The endIndex. - */ - @java.lang.Override - public long getEndIndex() { - return endIndex_; + com.google.cloud.documentai.v1beta2.Document.Provenance.class, + com.google.cloud.documentai.v1beta2.Document.Provenance.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; + // Construct using com.google.cloud.documentai.v1beta2.Document.Provenance.newBuilder() + private Builder() {} - memoizedIsInitialized = 1; - return true; + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (startIndex_ != 0L) { - output.writeInt64(1, startIndex_); - } - if (endIndex_ != 0L) { - output.writeInt64(2, endIndex_); + public Builder clear() { + super.clear(); + bitField0_ = 0; + revision_ = 0; + id_ = 0; + if (parentsBuilder_ == null) { + parents_ = java.util.Collections.emptyList(); + } else { + parents_ = null; + parentsBuilder_.clear(); } - getUnknownFields().writeTo(output); + bitField0_ = (bitField0_ & ~0x00000004); + type_ = 0; + return this; } @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Provenance_descriptor; + } - size = 0; - if (startIndex_ != 0L) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, startIndex_); - } - if (endIndex_ != 0L) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, endIndex_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Provenance getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta2.Document.Provenance.getDefaultInstance(); } @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment)) { - return super.equals(obj); + public com.google.cloud.documentai.v1beta2.Document.Provenance build() { + com.google.cloud.documentai.v1beta2.Document.Provenance result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); } - com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment other = - (com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment) obj; - - if (getStartIndex() != other.getStartIndex()) return false; - if (getEndIndex() != other.getEndIndex()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; + return result; } @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; + public com.google.cloud.documentai.v1beta2.Document.Provenance buildPartial() { + com.google.cloud.documentai.v1beta2.Document.Provenance result = + new com.google.cloud.documentai.v1beta2.Document.Provenance(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + START_INDEX_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getStartIndex()); - hash = (37 * hash) + END_INDEX_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getEndIndex()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; + onBuilt(); + return result; } - public static com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + private void buildPartialRepeatedFields( + com.google.cloud.documentai.v1beta2.Document.Provenance result) { + if (parentsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + parents_ = java.util.Collections.unmodifiableList(parents_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.parents_ = parents_; + } else { + result.parents_ = parentsBuilder_.build(); + } } - public static com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + private void buildPartial0(com.google.cloud.documentai.v1beta2.Document.Provenance result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.revision_ = revision_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.type_ = type_; + } } - public static com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + @java.lang.Override + public Builder clone() { + return super.clone(); } - public static com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); } - public static com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); } - public static com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); } - public static com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); } - public static com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); } - public static com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta2.Document.Provenance) { + return mergeFrom((com.google.cloud.documentai.v1beta2.Document.Provenance) other); + } else { + super.mergeFrom(other); + return this; + } } - public static com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + public Builder mergeFrom(com.google.cloud.documentai.v1beta2.Document.Provenance other) { + if (other == com.google.cloud.documentai.v1beta2.Document.Provenance.getDefaultInstance()) + return this; + if (other.getRevision() != 0) { + setRevision(other.getRevision()); + } + if (other.getId() != 0) { + setId(other.getId()); + } + if (parentsBuilder_ == null) { + if (!other.parents_.isEmpty()) { + if (parents_.isEmpty()) { + parents_ = other.parents_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureParentsIsMutable(); + parents_.addAll(other.parents_); + } + onChanged(); + } + } else { + if (!other.parents_.isEmpty()) { + if (parentsBuilder_.isEmpty()) { + parentsBuilder_.dispose(); + parentsBuilder_ = null; + parents_ = other.parents_; + bitField0_ = (bitField0_ & ~0x00000004); + parentsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getParentsFieldBuilder() + : null; + } else { + parentsBuilder_.addAllMessages(other.parents_); + } + } + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; } - public static com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + @java.lang.Override + public final boolean isInitialized() { + return true; } - public static com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment parseFrom( + @java.lang.Override + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + revision_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + id_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + com.google.cloud.documentai.v1beta2.Document.Provenance.Parent m = + input.readMessage( + com.google.cloud.documentai.v1beta2.Document.Provenance.Parent.parser(), + extensionRegistry); + if (parentsBuilder_ == null) { + ensureParentsIsMutable(); + parents_.add(m); + } else { + parentsBuilder_.addMessage(m); + } + break; + } // case 26 + case 32: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; } + private int bitField0_; + + private int revision_; + /** + * + * + *
+       * The index of the revision that produced this element.
+       * 
+ * + * int32 revision = 1 [deprecated = true]; + * + * @deprecated google.cloud.documentai.v1beta2.Document.Provenance.revision is deprecated. See + * google/cloud/documentai/v1beta2/document.proto;l=849 + * @return The revision. + */ @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); + @java.lang.Deprecated + public int getRevision() { + return revision_; } + /** + * + * + *
+       * The index of the revision that produced this element.
+       * 
+ * + * int32 revision = 1 [deprecated = true]; + * + * @deprecated google.cloud.documentai.v1beta2.Document.Provenance.revision is deprecated. See + * google/cloud/documentai/v1beta2/document.proto;l=849 + * @param value The revision to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setRevision(int value) { - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); + revision_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; } - - public static Builder newBuilder( - com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + /** + * + * + *
+       * The index of the revision that produced this element.
+       * 
+ * + * int32 revision = 1 [deprecated = true]; + * + * @deprecated google.cloud.documentai.v1beta2.Document.Provenance.revision is deprecated. See + * google/cloud/documentai/v1beta2/document.proto;l=849 + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearRevision() { + bitField0_ = (bitField0_ & ~0x00000001); + revision_ = 0; + onChanged(); + return this; } + private int id_; + /** + * + * + *
+       * The Id of this operation.  Needs to be unique within the scope of the
+       * revision.
+       * 
+ * + * int32 id = 2 [deprecated = true]; + * + * @deprecated google.cloud.documentai.v1beta2.Document.Provenance.id is deprecated. See + * google/cloud/documentai/v1beta2/document.proto;l=853 + * @return The id. + */ @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + @java.lang.Deprecated + public int getId() { + return id_; } + /** + * + * + *
+       * The Id of this operation.  Needs to be unique within the scope of the
+       * revision.
+       * 
+ * + * int32 id = 2 [deprecated = true]; + * + * @deprecated google.cloud.documentai.v1beta2.Document.Provenance.id is deprecated. See + * google/cloud/documentai/v1beta2/document.proto;l=853 + * @param value The id to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setId(int value) { - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; + id_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; } /** * * *
-       * A text segment in the [Document.text][google.cloud.documentai.v1beta2.Document.text]. The indices may be out of bounds
-       * which indicate that the text extends into another document shard for
-       * large sharded documents. See [ShardInfo.text_offset][google.cloud.documentai.v1beta2.Document.ShardInfo.text_offset]
+       * The Id of this operation.  Needs to be unique within the scope of the
+       * revision.
        * 
* - * Protobuf type {@code google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment} + * int32 id = 2 [deprecated = true]; + * + * @deprecated google.cloud.documentai.v1beta2.Document.Provenance.id is deprecated. See + * google/cloud/documentai/v1beta2/document.proto;l=853 + * @return This builder for chaining. */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment) - com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegmentOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_TextAnchor_TextSegment_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_TextAnchor_TextSegment_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment.class, - com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment.Builder - .class); - } - - // Construct using - // com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - startIndex_ = 0L; - endIndex_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_TextAnchor_TextSegment_descriptor; - } - - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment - getDefaultInstanceForType() { - return com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment build() { - com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment buildPartial() { - com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment result = - new com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.startIndex_ = startIndex_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.endIndex_ = endIndex_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } + @java.lang.Deprecated + public Builder clearId() { + bitField0_ = (bitField0_ & ~0x00000002); + id_ = 0; + onChanged(); + return this; + } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } + private java.util.List + parents_ = java.util.Collections.emptyList(); - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); + private void ensureParentsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + parents_ = + new java.util.ArrayList< + com.google.cloud.documentai.v1beta2.Document.Provenance.Parent>(parents_); + bitField0_ |= 0x00000004; } + } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Provenance.Parent, + com.google.cloud.documentai.v1beta2.Document.Provenance.Parent.Builder, + com.google.cloud.documentai.v1beta2.Document.Provenance.ParentOrBuilder> + parentsBuilder_; - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); + /** + * + * + *
+       * References to the original elements that are replaced.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Provenance.Parent parents = 3; + * + */ + public java.util.List + getParentsList() { + if (parentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(parents_); + } else { + return parentsBuilder_.getMessageList(); } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + } + /** + * + * + *
+       * References to the original elements that are replaced.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Provenance.Parent parents = 3; + * + */ + public int getParentsCount() { + if (parentsBuilder_ == null) { + return parents_.size(); + } else { + return parentsBuilder_.getCount(); } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment) { - return mergeFrom( - (com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment) other); - } else { - super.mergeFrom(other); - return this; - } + } + /** + * + * + *
+       * References to the original elements that are replaced.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Provenance.Parent parents = 3; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Provenance.Parent getParents(int index) { + if (parentsBuilder_ == null) { + return parents_.get(index); + } else { + return parentsBuilder_.getMessage(index); } - - public Builder mergeFrom( - com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment other) { - if (other - == com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment - .getDefaultInstance()) return this; - if (other.getStartIndex() != 0L) { - setStartIndex(other.getStartIndex()); - } - if (other.getEndIndex() != 0L) { - setEndIndex(other.getEndIndex()); + } + /** + * + * + *
+       * References to the original elements that are replaced.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Provenance.Parent parents = 3; + * + */ + public Builder setParents( + int index, com.google.cloud.documentai.v1beta2.Document.Provenance.Parent value) { + if (parentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } - this.mergeUnknownFields(other.getUnknownFields()); + ensureParentsIsMutable(); + parents_.set(index, value); onChanged(); - return this; + } else { + parentsBuilder_.setMessage(index, value); } - - @java.lang.Override - public final boolean isInitialized() { - return true; + return this; + } + /** + * + * + *
+       * References to the original elements that are replaced.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Provenance.Parent parents = 3; + * + */ + public Builder setParents( + int index, + com.google.cloud.documentai.v1beta2.Document.Provenance.Parent.Builder builderForValue) { + if (parentsBuilder_ == null) { + ensureParentsIsMutable(); + parents_.set(index, builderForValue.build()); + onChanged(); + } else { + parentsBuilder_.setMessage(index, builderForValue.build()); } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); + return this; + } + /** + * + * + *
+       * References to the original elements that are replaced.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Provenance.Parent parents = 3; + * + */ + public Builder addParents( + com.google.cloud.documentai.v1beta2.Document.Provenance.Parent value) { + if (parentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - startIndex_ = input.readInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: - { - endIndex_ = input.readInt64(); - bitField0_ |= 0x00000002; - break; - } // case 16 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; + ensureParentsIsMutable(); + parents_.add(value); + onChanged(); + } else { + parentsBuilder_.addMessage(value); } - - private int bitField0_; - - private long startIndex_; - /** - * - * - *
-         * [TextSegment][google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment] start UTF-8 char index in the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-         * 
- * - * int64 start_index = 1; - * - * @return The startIndex. - */ - @java.lang.Override - public long getStartIndex() { - return startIndex_; + return this; + } + /** + * + * + *
+       * References to the original elements that are replaced.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Provenance.Parent parents = 3; + * + */ + public Builder addParents( + int index, com.google.cloud.documentai.v1beta2.Document.Provenance.Parent value) { + if (parentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParentsIsMutable(); + parents_.add(index, value); + onChanged(); + } else { + parentsBuilder_.addMessage(index, value); } - /** - * - * - *
-         * [TextSegment][google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment] start UTF-8 char index in the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-         * 
- * - * int64 start_index = 1; - * - * @param value The startIndex to set. - * @return This builder for chaining. - */ - public Builder setStartIndex(long value) { - - startIndex_ = value; - bitField0_ |= 0x00000001; + return this; + } + /** + * + * + *
+       * References to the original elements that are replaced.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Provenance.Parent parents = 3; + * + */ + public Builder addParents( + com.google.cloud.documentai.v1beta2.Document.Provenance.Parent.Builder builderForValue) { + if (parentsBuilder_ == null) { + ensureParentsIsMutable(); + parents_.add(builderForValue.build()); onChanged(); - return this; + } else { + parentsBuilder_.addMessage(builderForValue.build()); } - /** - * - * - *
-         * [TextSegment][google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment] start UTF-8 char index in the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-         * 
- * - * int64 start_index = 1; - * - * @return This builder for chaining. - */ - public Builder clearStartIndex() { - bitField0_ = (bitField0_ & ~0x00000001); - startIndex_ = 0L; + return this; + } + /** + * + * + *
+       * References to the original elements that are replaced.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Provenance.Parent parents = 3; + * + */ + public Builder addParents( + int index, + com.google.cloud.documentai.v1beta2.Document.Provenance.Parent.Builder builderForValue) { + if (parentsBuilder_ == null) { + ensureParentsIsMutable(); + parents_.add(index, builderForValue.build()); onChanged(); - return this; + } else { + parentsBuilder_.addMessage(index, builderForValue.build()); } - - private long endIndex_; - /** - * - * - *
-         * [TextSegment][google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment] half open end UTF-8 char index in the
-         * [Document.text][google.cloud.documentai.v1beta2.Document.text].
-         * 
- * - * int64 end_index = 2; - * - * @return The endIndex. - */ - @java.lang.Override - public long getEndIndex() { - return endIndex_; + return this; + } + /** + * + * + *
+       * References to the original elements that are replaced.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Provenance.Parent parents = 3; + * + */ + public Builder addAllParents( + java.lang.Iterable< + ? extends com.google.cloud.documentai.v1beta2.Document.Provenance.Parent> + values) { + if (parentsBuilder_ == null) { + ensureParentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, parents_); + onChanged(); + } else { + parentsBuilder_.addAllMessages(values); } - /** - * - * - *
-         * [TextSegment][google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment] half open end UTF-8 char index in the
-         * [Document.text][google.cloud.documentai.v1beta2.Document.text].
-         * 
- * - * int64 end_index = 2; - * - * @param value The endIndex to set. - * @return This builder for chaining. - */ - public Builder setEndIndex(long value) { - - endIndex_ = value; - bitField0_ |= 0x00000002; + return this; + } + /** + * + * + *
+       * References to the original elements that are replaced.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Provenance.Parent parents = 3; + * + */ + public Builder clearParents() { + if (parentsBuilder_ == null) { + parents_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); - return this; + } else { + parentsBuilder_.clear(); } - /** - * - * - *
-         * [TextSegment][google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment] half open end UTF-8 char index in the
-         * [Document.text][google.cloud.documentai.v1beta2.Document.text].
-         * 
- * - * int64 end_index = 2; - * - * @return This builder for chaining. - */ - public Builder clearEndIndex() { - bitField0_ = (bitField0_ & ~0x00000002); - endIndex_ = 0L; + return this; + } + /** + * + * + *
+       * References to the original elements that are replaced.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Provenance.Parent parents = 3; + * + */ + public Builder removeParents(int index) { + if (parentsBuilder_ == null) { + ensureParentsIsMutable(); + parents_.remove(index); onChanged(); - return this; + } else { + parentsBuilder_.remove(index); } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + return this; + } + /** + * + * + *
+       * References to the original elements that are replaced.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Provenance.Parent parents = 3; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Provenance.Parent.Builder + getParentsBuilder(int index) { + return getParentsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * References to the original elements that are replaced.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Provenance.Parent parents = 3; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Provenance.ParentOrBuilder + getParentsOrBuilder(int index) { + if (parentsBuilder_ == null) { + return parents_.get(index); + } else { + return parentsBuilder_.getMessageOrBuilder(index); } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + } + /** + * + * + *
+       * References to the original elements that are replaced.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Provenance.Parent parents = 3; + * + */ + public java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.Provenance.ParentOrBuilder> + getParentsOrBuilderList() { + if (parentsBuilder_ != null) { + return parentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(parents_); } - - // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment) } - - // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment) - private static final com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment(); + /** + * + * + *
+       * References to the original elements that are replaced.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Provenance.Parent parents = 3; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Provenance.Parent.Builder + addParentsBuilder() { + return getParentsFieldBuilder() + .addBuilder( + com.google.cloud.documentai.v1beta2.Document.Provenance.Parent + .getDefaultInstance()); } - - public static com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment - getDefaultInstance() { - return DEFAULT_INSTANCE; + /** + * + * + *
+       * References to the original elements that are replaced.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Provenance.Parent parents = 3; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Provenance.Parent.Builder + addParentsBuilder(int index) { + return getParentsFieldBuilder() + .addBuilder( + index, + com.google.cloud.documentai.v1beta2.Document.Provenance.Parent + .getDefaultInstance()); + } + /** + * + * + *
+       * References to the original elements that are replaced.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Provenance.Parent parents = 3; + * + */ + public java.util.List + getParentsBuilderList() { + return getParentsFieldBuilder().getBuilderList(); } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TextSegment parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Provenance.Parent, + com.google.cloud.documentai.v1beta2.Document.Provenance.Parent.Builder, + com.google.cloud.documentai.v1beta2.Document.Provenance.ParentOrBuilder> + getParentsFieldBuilder() { + if (parentsBuilder_ == null) { + parentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Provenance.Parent, + com.google.cloud.documentai.v1beta2.Document.Provenance.Parent.Builder, + com.google.cloud.documentai.v1beta2.Document.Provenance.ParentOrBuilder>( + parents_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + parents_ = null; + } + return parentsBuilder_; + } - public static com.google.protobuf.Parser parser() { - return PARSER; + private int type_ = 0; + /** + * + * + *
+       * The type of provenance operation.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Provenance.OperationType type = 4; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+       * The type of provenance operation.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Provenance.OperationType type = 4; + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * The type of provenance operation.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Provenance.OperationType type = 4; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Provenance.OperationType getType() { + com.google.cloud.documentai.v1beta2.Document.Provenance.OperationType result = + com.google.cloud.documentai.v1beta2.Document.Provenance.OperationType.forNumber(type_); + return result == null + ? com.google.cloud.documentai.v1beta2.Document.Provenance.OperationType.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * The type of provenance operation.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Provenance.OperationType type = 4; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + com.google.cloud.documentai.v1beta2.Document.Provenance.OperationType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * The type of provenance operation.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Provenance.OperationType type = 4; + * + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000008); + type_ = 0; + onChanged(); + return this; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); } @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); } + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta2.Document.Provenance) } - public static final int TEXT_SEGMENTS_FIELD_NUMBER = 1; + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.Provenance) + private static final com.google.cloud.documentai.v1beta2.Document.Provenance DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta2.Document.Provenance(); + } + + public static com.google.cloud.documentai.v1beta2.Document.Provenance getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Provenance parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Provenance getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface RevisionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.Revision) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * If the change was made by a person specify the name or id of that
+     * person.
+     * 
+ * + * string agent = 4; + * + * @return Whether the agent field is set. + */ + boolean hasAgent(); + /** + * + * + *
+     * If the change was made by a person specify the name or id of that
+     * person.
+     * 
+ * + * string agent = 4; + * + * @return The agent. + */ + java.lang.String getAgent(); + /** + * + * + *
+     * If the change was made by a person specify the name or id of that
+     * person.
+     * 
+ * + * string agent = 4; + * + * @return The bytes for agent. + */ + com.google.protobuf.ByteString getAgentBytes(); + + /** + * + * + *
+     * If the annotation was made by processor identify the processor by its
+     * resource name.
+     * 
+ * + * string processor = 5; + * + * @return Whether the processor field is set. + */ + boolean hasProcessor(); + /** + * + * + *
+     * If the annotation was made by processor identify the processor by its
+     * resource name.
+     * 
+ * + * string processor = 5; + * + * @return The processor. + */ + java.lang.String getProcessor(); + /** + * + * + *
+     * If the annotation was made by processor identify the processor by its
+     * resource name.
+     * 
+ * + * string processor = 5; + * + * @return The bytes for processor. + */ + com.google.protobuf.ByteString getProcessorBytes(); + + /** + * + * + *
+     * Id of the revision, internally generated by doc proto storage.
+     * Unique within the context of the document.
+     * 
+ * + * string id = 1; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+     * Id of the revision, internally generated by doc proto storage.
+     * Unique within the context of the document.
+     * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); - @SuppressWarnings("serial") - private java.util.List - textSegments_; /** * * *
-     * The text segments from the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * The revisions that this revision is based on.  This can include one or
+     * more parent (when documents are merged.)  This field represents the
+     * index into the `revisions` field.
      * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; - * + * repeated int32 parent = 2 [deprecated = true]; + * + * @deprecated google.cloud.documentai.v1beta2.Document.Revision.parent is deprecated. See + * google/cloud/documentai/v1beta2/document.proto;l=892 + * @return A list containing the parent. */ - @java.lang.Override - public java.util.List - getTextSegmentsList() { - return textSegments_; - } + @java.lang.Deprecated + java.util.List getParentList(); /** * * *
-     * The text segments from the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * The revisions that this revision is based on.  This can include one or
+     * more parent (when documents are merged.)  This field represents the
+     * index into the `revisions` field.
      * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; - * + * repeated int32 parent = 2 [deprecated = true]; + * + * @deprecated google.cloud.documentai.v1beta2.Document.Revision.parent is deprecated. See + * google/cloud/documentai/v1beta2/document.proto;l=892 + * @return The count of parent. */ - @java.lang.Override - public java.util.List< - ? extends com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegmentOrBuilder> - getTextSegmentsOrBuilderList() { - return textSegments_; - } + @java.lang.Deprecated + int getParentCount(); /** * * *
-     * The text segments from the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * The revisions that this revision is based on.  This can include one or
+     * more parent (when documents are merged.)  This field represents the
+     * index into the `revisions` field.
      * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; - * + * repeated int32 parent = 2 [deprecated = true]; + * + * @deprecated google.cloud.documentai.v1beta2.Document.Revision.parent is deprecated. See + * google/cloud/documentai/v1beta2/document.proto;l=892 + * @param index The index of the element to return. + * @return The parent at the given index. */ - @java.lang.Override - public int getTextSegmentsCount() { - return textSegments_.size(); - } + @java.lang.Deprecated + int getParent(int index); + /** * * *
-     * The text segments from the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * The revisions that this revision is based on. Must include all the ids
+     * that have anything to do with this revision - eg. there are
+     * `provenance.parent.revision` fields that index into this field.
      * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; - * + * repeated string parent_ids = 7; + * + * @return A list containing the parentIds. */ - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment getTextSegments( - int index) { - return textSegments_.get(index); - } + java.util.List getParentIdsList(); /** * * *
-     * The text segments from the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * The revisions that this revision is based on. Must include all the ids
+     * that have anything to do with this revision - eg. there are
+     * `provenance.parent.revision` fields that index into this field.
      * 
* - * - * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; - * + * repeated string parent_ids = 7; + * + * @return The count of parentIds. */ - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegmentOrBuilder - getTextSegmentsOrBuilder(int index) { - return textSegments_.get(index); - } + int getParentIdsCount(); + /** + * + * + *
+     * The revisions that this revision is based on. Must include all the ids
+     * that have anything to do with this revision - eg. there are
+     * `provenance.parent.revision` fields that index into this field.
+     * 
+ * + * repeated string parent_ids = 7; + * + * @param index The index of the element to return. + * @return The parentIds at the given index. + */ + java.lang.String getParentIds(int index); + /** + * + * + *
+     * The revisions that this revision is based on. Must include all the ids
+     * that have anything to do with this revision - eg. there are
+     * `provenance.parent.revision` fields that index into this field.
+     * 
+ * + * repeated string parent_ids = 7; + * + * @param index The index of the value to return. + * @return The bytes of the parentIds at the given index. + */ + com.google.protobuf.ByteString getParentIdsBytes(int index); - public static final int CONTENT_FIELD_NUMBER = 2; + /** + * + * + *
+     * The time that the revision was created, internally generated by
+     * doc proto storage at the time of create.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+     * The time that the revision was created, internally generated by
+     * doc proto storage at the time of create.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+     * The time that the revision was created, internally generated by
+     * doc proto storage at the time of create.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - @SuppressWarnings("serial") - private volatile java.lang.Object content_ = ""; /** * * *
-     * Contains the content of the text span so that users do
-     * not have to look it up in the text_segments.
+     * Human Review information of this revision.
      * 
* - * string content = 2; + * .google.cloud.documentai.v1beta2.Document.Revision.HumanReview human_review = 6; * - * @return The content. + * @return Whether the humanReview field is set. */ - @java.lang.Override - public java.lang.String getContent() { - java.lang.Object ref = content_; - 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(); - content_ = s; - return s; - } - } + boolean hasHumanReview(); /** * * *
-     * Contains the content of the text span so that users do
-     * not have to look it up in the text_segments.
+     * Human Review information of this revision.
      * 
* - * string content = 2; + * .google.cloud.documentai.v1beta2.Document.Revision.HumanReview human_review = 6; * - * @return The bytes for content. + * @return The humanReview. */ - @java.lang.Override - public com.google.protobuf.ByteString getContentBytes() { - java.lang.Object ref = content_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - content_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview getHumanReview(); + /** + * + * + *
+     * Human Review information of this revision.
+     * 
+ * + * .google.cloud.documentai.v1beta2.Document.Revision.HumanReview human_review = 6; + */ + com.google.cloud.documentai.v1beta2.Document.Revision.HumanReviewOrBuilder + getHumanReviewOrBuilder(); + + com.google.cloud.documentai.v1beta2.Document.Revision.SourceCase getSourceCase(); + } + /** + * + * + *
+   * Contains past or forward revisions of this document.
+   * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Revision} + */ + public static final class Revision extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.Revision) + RevisionOrBuilder { + private static final long serialVersionUID = 0L; + // Use Revision.newBuilder() to construct. + private Revision(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); } - private byte memoizedIsInitialized = -1; + private Revision() { + id_ = ""; + parent_ = emptyIntList(); + parentIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Revision(); } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < textSegments_.size(); i++) { - output.writeMessage(1, textSegments_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, content_); - } - getUnknownFields().writeTo(output); + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Revision_descriptor; } @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < textSegments_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, textSegments_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, content_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Revision_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Document.Revision.class, + com.google.cloud.documentai.v1beta2.Document.Revision.Builder.class); } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.documentai.v1beta2.Document.TextAnchor)) { - return super.equals(obj); - } - com.google.cloud.documentai.v1beta2.Document.TextAnchor other = - (com.google.cloud.documentai.v1beta2.Document.TextAnchor) obj; + public interface HumanReviewOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.Revision.HumanReview) + com.google.protobuf.MessageOrBuilder { - if (!getTextSegmentsList().equals(other.getTextSegmentsList())) return false; - if (!getContent().equals(other.getContent())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } + /** + * + * + *
+       * Human review state. e.g. `requested`, `succeeded`, `rejected`.
+       * 
+ * + * string state = 1; + * + * @return The state. + */ + java.lang.String getState(); + /** + * + * + *
+       * Human review state. e.g. `requested`, `succeeded`, `rejected`.
+       * 
+ * + * string state = 1; + * + * @return The bytes for state. + */ + com.google.protobuf.ByteString getStateBytes(); - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; + /** + * + * + *
+       * A message providing more details about the current state of processing.
+       * For example, the rejection reason when the state is `rejected`.
+       * 
+ * + * 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 rejection reason when the state is `rejected`.
+       * 
+ * + * string state_message = 2; + * + * @return The bytes for stateMessage. + */ + com.google.protobuf.ByteString getStateMessageBytes(); + } + /** + * + * + *
+     * Human Review information of the document.
+     * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Revision.HumanReview} + */ + public static final class HumanReview extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.Revision.HumanReview) + HumanReviewOrBuilder { + private static final long serialVersionUID = 0L; + // Use HumanReview.newBuilder() to construct. + private HumanReview(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getTextSegmentsCount() > 0) { - hash = (37 * hash) + TEXT_SEGMENTS_FIELD_NUMBER; - hash = (53 * hash) + getTextSegmentsList().hashCode(); + + private HumanReview() { + state_ = ""; + stateMessage_ = ""; } - hash = (37 * hash) + CONTENT_FIELD_NUMBER; - hash = (53 * hash) + getContent().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - public static com.google.cloud.documentai.v1beta2.Document.TextAnchor parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new HumanReview(); + } - public static com.google.cloud.documentai.v1beta2.Document.TextAnchor parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Revision_HumanReview_descriptor; + } - public static com.google.cloud.documentai.v1beta2.Document.TextAnchor parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Revision_HumanReview_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview.class, + com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview.Builder.class); + } - public static com.google.cloud.documentai.v1beta2.Document.TextAnchor parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + public static final int STATE_FIELD_NUMBER = 1; - public static com.google.cloud.documentai.v1beta2.Document.TextAnchor parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + @SuppressWarnings("serial") + private volatile java.lang.Object state_ = ""; + /** + * + * + *
+       * Human review state. e.g. `requested`, `succeeded`, `rejected`.
+       * 
+ * + * string state = 1; + * + * @return The state. + */ + @java.lang.Override + public java.lang.String getState() { + java.lang.Object ref = state_; + 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(); + state_ = s; + return s; + } + } + /** + * + * + *
+       * Human review state. e.g. `requested`, `succeeded`, `rejected`.
+       * 
+ * + * string state = 1; + * + * @return The bytes for state. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStateBytes() { + java.lang.Object ref = state_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + state_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - public static com.google.cloud.documentai.v1beta2.Document.TextAnchor parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + public static final int STATE_MESSAGE_FIELD_NUMBER = 2; - public static com.google.cloud.documentai.v1beta2.Document.TextAnchor parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } + @SuppressWarnings("serial") + private volatile java.lang.Object stateMessage_ = ""; + /** + * + * + *
+       * A message providing more details about the current state of processing.
+       * For example, the rejection reason when the state is `rejected`.
+       * 
+ * + * 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 rejection reason when the state is `rejected`.
+       * 
+ * + * 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 com.google.cloud.documentai.v1beta2.Document.TextAnchor parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } + private byte memoizedIsInitialized = -1; - public static com.google.cloud.documentai.v1beta2.Document.TextAnchor parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - public static com.google.cloud.documentai.v1beta2.Document.TextAnchor parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + memoizedIsInitialized = 1; + return true; + } - public static com.google.cloud.documentai.v1beta2.Document.TextAnchor parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(state_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateMessage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, stateMessage_); + } + getUnknownFields().writeTo(output); + } - public static com.google.cloud.documentai.v1beta2.Document.TextAnchor 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 int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(state_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateMessage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, stateMessage_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview other = + (com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview) obj; - public static Builder newBuilder( - com.google.cloud.documentai.v1beta2.Document.TextAnchor prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + if (!getState().equals(other.getState())) return false; + if (!getStateMessage().equals(other.getStateMessage())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + @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) + getState().hashCode(); + hash = (37 * hash) + STATE_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getStateMessage().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-     * Text reference indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-     * 
- * - * Protobuf type {@code google.cloud.documentai.v1beta2.Document.TextAnchor} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.TextAnchor) - com.google.cloud.documentai.v1beta2.Document.TextAnchorOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_TextAnchor_descriptor; + public static com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_TextAnchor_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1beta2.Document.TextAnchor.class, - com.google.cloud.documentai.v1beta2.Document.TextAnchor.Builder.class); + public static com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - // Construct using com.google.cloud.documentai.v1beta2.Document.TextAnchor.newBuilder() - private Builder() {} + public static com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); + public static com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (textSegmentsBuilder_ == null) { - textSegments_ = java.util.Collections.emptyList(); - } else { - textSegments_ = null; - textSegmentsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - content_ = ""; - return this; + public static com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_TextAnchor_descriptor; + public static com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.TextAnchor getDefaultInstanceForType() { - return com.google.cloud.documentai.v1beta2.Document.TextAnchor.getDefaultInstance(); + public static com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.TextAnchor build() { - com.google.cloud.documentai.v1beta2.Document.TextAnchor result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; + public static com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.TextAnchor buildPartial() { - com.google.cloud.documentai.v1beta2.Document.TextAnchor result = - new com.google.cloud.documentai.v1beta2.Document.TextAnchor(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; + public static com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - private void buildPartialRepeatedFields( - com.google.cloud.documentai.v1beta2.Document.TextAnchor result) { - if (textSegmentsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - textSegments_ = java.util.Collections.unmodifiableList(textSegments_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.textSegments_ = textSegments_; - } else { - result.textSegments_ = textSegmentsBuilder_.build(); - } + public static com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); } - private void buildPartial0(com.google.cloud.documentai.v1beta2.Document.TextAnchor result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.content_ = content_; - } + public static com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - @java.lang.Override - public Builder clone() { - return super.clone(); + public static com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview 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 setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); + public Builder newBuilderForType() { + return newBuilder(); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); + public static Builder newBuilder( + com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; } + /** + * + * + *
+       * Human Review information of the document.
+       * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Revision.HumanReview} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.Revision.HumanReview) + com.google.cloud.documentai.v1beta2.Document.Revision.HumanReviewOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Revision_HumanReview_descriptor; + } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.documentai.v1beta2.Document.TextAnchor) { - return mergeFrom((com.google.cloud.documentai.v1beta2.Document.TextAnchor) other); - } else { - super.mergeFrom(other); - return this; + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Revision_HumanReview_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview.class, + com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview.Builder.class); } - } - public Builder mergeFrom(com.google.cloud.documentai.v1beta2.Document.TextAnchor other) { - if (other == com.google.cloud.documentai.v1beta2.Document.TextAnchor.getDefaultInstance()) + // Construct using + // com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + state_ = ""; + stateMessage_ = ""; return this; - if (textSegmentsBuilder_ == null) { - if (!other.textSegments_.isEmpty()) { - if (textSegments_.isEmpty()) { - textSegments_ = other.textSegments_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureTextSegmentsIsMutable(); - textSegments_.addAll(other.textSegments_); - } - onChanged(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Revision_HumanReview_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview build() { + com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); } - } else { - if (!other.textSegments_.isEmpty()) { - if (textSegmentsBuilder_.isEmpty()) { - textSegmentsBuilder_.dispose(); - textSegmentsBuilder_ = null; - textSegments_ = other.textSegments_; - bitField0_ = (bitField0_ & ~0x00000001); - textSegmentsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getTextSegmentsFieldBuilder() - : null; - } else { - textSegmentsBuilder_.addAllMessages(other.textSegments_); - } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview buildPartial() { + com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview result = + new com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview(this); + if (bitField0_ != 0) { + buildPartial0(result); } + onBuilt(); + return result; } - if (!other.getContent().isEmpty()) { - content_ = other.content_; - bitField0_ |= 0x00000002; - onChanged(); + + private void buildPartial0( + com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.stateMessage_ = stateMessage_; + } } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - @java.lang.Override - public final boolean isInitialized() { - return true; - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment m = - input.readMessage( - com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment - .parser(), - extensionRegistry); - if (textSegmentsBuilder_ == null) { - ensureTextSegmentsIsMutable(); - textSegments_.add(m); - } else { - textSegmentsBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: - { - content_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - private java.util.List - textSegments_ = java.util.Collections.emptyList(); + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } - private void ensureTextSegmentsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - textSegments_ = - new java.util.ArrayList< - com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment>( - textSegments_); - bitField0_ |= 0x00000001; + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); } - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment, - com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment.Builder, - com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegmentOrBuilder> - textSegmentsBuilder_; + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } - /** - * - * - *
-       * The text segments from the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; - * - */ - public java.util.List - getTextSegmentsList() { - if (textSegmentsBuilder_ == null) { - return java.util.Collections.unmodifiableList(textSegments_); - } else { - return textSegmentsBuilder_.getMessageList(); + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview) { + return mergeFrom( + (com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview) other); + } else { + super.mergeFrom(other); + return this; + } } - } - /** - * - * - *
-       * The text segments from the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; - * - */ - public int getTextSegmentsCount() { - if (textSegmentsBuilder_ == null) { - return textSegments_.size(); - } else { - return textSegmentsBuilder_.getCount(); + + public Builder mergeFrom( + com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview other) { + if (other + == com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview + .getDefaultInstance()) return this; + if (!other.getState().isEmpty()) { + state_ = other.state_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getStateMessage().isEmpty()) { + stateMessage_ = other.stateMessage_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; } - } - /** - * - * - *
-       * The text segments from the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; - * - */ - public com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment getTextSegments( - int index) { - if (textSegmentsBuilder_ == null) { - return textSegments_.get(index); - } else { - return textSegmentsBuilder_.getMessage(index); + + @java.lang.Override + public final boolean isInitialized() { + return true; } - } - /** - * - * - *
-       * The text segments from the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; - * - */ - public Builder setTextSegments( - int index, com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment value) { - if (textSegmentsBuilder_ == null) { + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + state_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + stateMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object state_ = ""; + /** + * + * + *
+         * Human review state. e.g. `requested`, `succeeded`, `rejected`.
+         * 
+ * + * string state = 1; + * + * @return The state. + */ + public java.lang.String getState() { + java.lang.Object ref = state_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + state_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Human review state. e.g. `requested`, `succeeded`, `rejected`.
+         * 
+ * + * string state = 1; + * + * @return The bytes for state. + */ + public com.google.protobuf.ByteString getStateBytes() { + java.lang.Object ref = state_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + state_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Human review state. e.g. `requested`, `succeeded`, `rejected`.
+         * 
+ * + * string state = 1; + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + state_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Human review state. e.g. `requested`, `succeeded`, `rejected`.
+         * 
+ * + * string state = 1; + * + * @return This builder for chaining. + */ + public Builder clearState() { + state_ = getDefaultInstance().getState(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+         * Human review state. e.g. `requested`, `succeeded`, `rejected`.
+         * 
+ * + * string state = 1; + * + * @param value The bytes for state to set. + * @return This builder for chaining. + */ + public Builder setStateBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - ensureTextSegmentsIsMutable(); - textSegments_.set(index, value); + checkByteStringIsUtf8(value); + state_ = value; + bitField0_ |= 0x00000001; onChanged(); - } else { - textSegmentsBuilder_.setMessage(index, value); + return this; } - return this; - } - /** - * - * - *
-       * The text segments from the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; - * - */ - public Builder setTextSegments( - int index, - com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment.Builder - builderForValue) { - if (textSegmentsBuilder_ == null) { - ensureTextSegmentsIsMutable(); - textSegments_.set(index, builderForValue.build()); - onChanged(); - } else { - textSegmentsBuilder_.setMessage(index, builderForValue.build()); + + private java.lang.Object stateMessage_ = ""; + /** + * + * + *
+         * A message providing more details about the current state of processing.
+         * For example, the rejection reason when the state is `rejected`.
+         * 
+ * + * 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; + } } - return this; - } - /** - * - * - *
-       * The text segments from the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; - * - */ - public Builder addTextSegments( - com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment value) { - if (textSegmentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); + /** + * + * + *
+         * A message providing more details about the current state of processing.
+         * For example, the rejection reason when the state is `rejected`.
+         * 
+ * + * 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; } - ensureTextSegmentsIsMutable(); - textSegments_.add(value); - onChanged(); - } else { - textSegmentsBuilder_.addMessage(value); } - return this; - } - /** - * - * - *
-       * The text segments from the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; - * - */ - public Builder addTextSegments( - int index, com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment value) { - if (textSegmentsBuilder_ == null) { + /** + * + * + *
+         * A message providing more details about the current state of processing.
+         * For example, the rejection reason when the state is `rejected`.
+         * 
+ * + * 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(); } - ensureTextSegmentsIsMutable(); - textSegments_.add(index, value); + stateMessage_ = value; + bitField0_ |= 0x00000002; onChanged(); - } else { - textSegmentsBuilder_.addMessage(index, value); + return this; } - return this; - } - /** - * - * - *
-       * The text segments from the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; - * - */ - public Builder addTextSegments( - com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment.Builder - builderForValue) { - if (textSegmentsBuilder_ == null) { - ensureTextSegmentsIsMutable(); - textSegments_.add(builderForValue.build()); + /** + * + * + *
+         * A message providing more details about the current state of processing.
+         * For example, the rejection reason when the state is `rejected`.
+         * 
+ * + * string state_message = 2; + * + * @return This builder for chaining. + */ + public Builder clearStateMessage() { + stateMessage_ = getDefaultInstance().getStateMessage(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); - } else { - textSegmentsBuilder_.addMessage(builderForValue.build()); + return this; } - return this; - } - /** - * - * - *
-       * The text segments from the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; - * - */ - public Builder addTextSegments( - int index, - com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment.Builder - builderForValue) { - if (textSegmentsBuilder_ == null) { - ensureTextSegmentsIsMutable(); - textSegments_.add(index, builderForValue.build()); + /** + * + * + *
+         * A message providing more details about the current state of processing.
+         * For example, the rejection reason when the state is `rejected`.
+         * 
+ * + * 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; + bitField0_ |= 0x00000002; onChanged(); - } else { - textSegmentsBuilder_.addMessage(index, builderForValue.build()); + return this; } - return this; - } - /** - * - * - *
-       * The text segments from the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; - * - */ - public Builder addAllTextSegments( - java.lang.Iterable< - ? extends com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment> - values) { - if (textSegmentsBuilder_ == null) { - ensureTextSegmentsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, textSegments_); - onChanged(); - } else { - textSegmentsBuilder_.addAllMessages(values); + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); } - return this; - } - /** - * - * - *
-       * The text segments from the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; - * - */ - public Builder clearTextSegments() { - if (textSegmentsBuilder_ == null) { - textSegments_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - textSegmentsBuilder_.clear(); + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); } - return this; + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta2.Document.Revision.HumanReview) } - /** - * - * - *
-       * The text segments from the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; - * - */ - public Builder removeTextSegments(int index) { - if (textSegmentsBuilder_ == null) { - ensureTextSegmentsIsMutable(); - textSegments_.remove(index); - onChanged(); - } else { - textSegmentsBuilder_.remove(index); - } - return this; + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.Revision.HumanReview) + private static final com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview(); } - /** - * - * - *
-       * The text segments from the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; - * - */ - public com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment.Builder - getTextSegmentsBuilder(int index) { - return getTextSegmentsFieldBuilder().getBuilder(index); + + public static com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview + getDefaultInstance() { + return DEFAULT_INSTANCE; } - /** - * - * - *
-       * The text segments from the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; - * - */ - public com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegmentOrBuilder - getTextSegmentsOrBuilder(int index) { - if (textSegmentsBuilder_ == null) { - return textSegments_.get(index); - } else { - return textSegmentsBuilder_.getMessageOrBuilder(index); - } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HumanReview parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; } - /** - * - * - *
-       * The text segments from the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; - * - */ - public java.util.List< - ? extends - com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegmentOrBuilder> - getTextSegmentsOrBuilderList() { - if (textSegmentsBuilder_ != null) { - return textSegmentsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(textSegments_); - } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; } - /** - * - * - *
-       * The text segments from the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; - * - */ - public com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment.Builder - addTextSegmentsBuilder() { - return getTextSegmentsFieldBuilder() - .addBuilder( - com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment - .getDefaultInstance()); + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - /** - * - * - *
-       * The text segments from the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; - * - */ - public com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment.Builder - addTextSegmentsBuilder(int index) { - return getTextSegmentsFieldBuilder() - .addBuilder( - index, - com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment - .getDefaultInstance()); + } + + private int sourceCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object source_; + + public enum SourceCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + AGENT(4), + PROCESSOR(5), + SOURCE_NOT_SET(0); + private final int value; + + private SourceCase(int value) { + this.value = value; } /** - * - * - *
-       * The text segments from the [Document.text][google.cloud.documentai.v1beta2.Document.text].
-       * 
- * - * - * repeated .google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment text_segments = 1; - * + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. */ - public java.util.List< - com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment.Builder> - getTextSegmentsBuilderList() { - return getTextSegmentsFieldBuilder().getBuilderList(); + @java.lang.Deprecated + public static SourceCase valueOf(int value) { + return forNumber(value); } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment, - com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment.Builder, - com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegmentOrBuilder> - getTextSegmentsFieldBuilder() { - if (textSegmentsBuilder_ == null) { - textSegmentsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment, - com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment.Builder, - com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegmentOrBuilder>( - textSegments_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - textSegments_ = null; + public static SourceCase forNumber(int value) { + switch (value) { + case 4: + return AGENT; + case 5: + return PROCESSOR; + case 0: + return SOURCE_NOT_SET; + default: + return null; } - return textSegmentsBuilder_; } - private java.lang.Object content_ = ""; - /** - * - * - *
-       * Contains the content of the text span so that users do
-       * not have to look it up in the text_segments.
-       * 
- * - * string content = 2; - * - * @return The content. - */ - public java.lang.String getContent() { - java.lang.Object ref = content_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - content_ = s; - return s; - } else { - return (java.lang.String) ref; + public int getNumber() { + return this.value; + } + }; + + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } + + public static final int AGENT_FIELD_NUMBER = 4; + /** + * + * + *
+     * If the change was made by a person specify the name or id of that
+     * person.
+     * 
+ * + * string agent = 4; + * + * @return Whether the agent field is set. + */ + public boolean hasAgent() { + return sourceCase_ == 4; + } + /** + * + * + *
+     * If the change was made by a person specify the name or id of that
+     * person.
+     * 
+ * + * string agent = 4; + * + * @return The agent. + */ + public java.lang.String getAgent() { + java.lang.Object ref = ""; + if (sourceCase_ == 4) { + ref = source_; + } + 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(); + if (sourceCase_ == 4) { + source_ = s; } + return s; } - /** - * - * - *
-       * Contains the content of the text span so that users do
-       * not have to look it up in the text_segments.
-       * 
- * - * string content = 2; - * - * @return The bytes for content. - */ - public com.google.protobuf.ByteString getContentBytes() { - java.lang.Object ref = content_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - content_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + } + /** + * + * + *
+     * If the change was made by a person specify the name or id of that
+     * person.
+     * 
+ * + * string agent = 4; + * + * @return The bytes for agent. + */ + public com.google.protobuf.ByteString getAgentBytes() { + java.lang.Object ref = ""; + if (sourceCase_ == 4) { + ref = source_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (sourceCase_ == 4) { + source_ = b; } + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - /** - * - * - *
-       * Contains the content of the text span so that users do
-       * not have to look it up in the text_segments.
-       * 
- * - * string content = 2; - * - * @param value The content to set. - * @return This builder for chaining. - */ - public Builder setContent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + } + + public static final int PROCESSOR_FIELD_NUMBER = 5; + /** + * + * + *
+     * If the annotation was made by processor identify the processor by its
+     * resource name.
+     * 
+ * + * string processor = 5; + * + * @return Whether the processor field is set. + */ + public boolean hasProcessor() { + return sourceCase_ == 5; + } + /** + * + * + *
+     * If the annotation was made by processor identify the processor by its
+     * resource name.
+     * 
+ * + * string processor = 5; + * + * @return The processor. + */ + public java.lang.String getProcessor() { + java.lang.Object ref = ""; + if (sourceCase_ == 5) { + ref = source_; + } + 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(); + if (sourceCase_ == 5) { + source_ = s; } - content_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; + return s; } - /** - * - * - *
-       * Contains the content of the text span so that users do
-       * not have to look it up in the text_segments.
-       * 
- * - * string content = 2; - * - * @return This builder for chaining. - */ - public Builder clearContent() { - content_ = getDefaultInstance().getContent(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; + } + /** + * + * + *
+     * If the annotation was made by processor identify the processor by its
+     * resource name.
+     * 
+ * + * string processor = 5; + * + * @return The bytes for processor. + */ + public com.google.protobuf.ByteString getProcessorBytes() { + java.lang.Object ref = ""; + if (sourceCase_ == 5) { + ref = source_; } - /** - * - * - *
-       * Contains the content of the text span so that users do
-       * not have to look it up in the text_segments.
-       * 
- * - * string content = 2; - * - * @param value The bytes for content to set. - * @return This builder for chaining. - */ - public Builder setContentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (sourceCase_ == 5) { + source_ = b; } - checkByteStringIsUtf8(value); - content_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } + } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } + public static final int ID_FIELD_NUMBER = 1; - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * + * + *
+     * Id of the revision, internally generated by doc proto storage.
+     * Unique within the context of the document.
+     * 
+ * + * string id = 1; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + 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(); + id_ = s; + return s; + } + } + /** + * + * + *
+     * Id of the revision, internally generated by doc proto storage.
+     * Unique within the context of the document.
+     * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - - // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta2.Document.TextAnchor) } - // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.TextAnchor) - private static final com.google.cloud.documentai.v1beta2.Document.TextAnchor DEFAULT_INSTANCE; + public static final int PARENT_FIELD_NUMBER = 2; - static { - DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta2.Document.TextAnchor(); + @SuppressWarnings("serial") + private com.google.protobuf.Internal.IntList parent_; + /** + * + * + *
+     * The revisions that this revision is based on.  This can include one or
+     * more parent (when documents are merged.)  This field represents the
+     * index into the `revisions` field.
+     * 
+ * + * repeated int32 parent = 2 [deprecated = true]; + * + * @deprecated google.cloud.documentai.v1beta2.Document.Revision.parent is deprecated. See + * google/cloud/documentai/v1beta2/document.proto;l=892 + * @return A list containing the parent. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.List getParentList() { + return parent_; } - - public static com.google.cloud.documentai.v1beta2.Document.TextAnchor getDefaultInstance() { - return DEFAULT_INSTANCE; + /** + * + * + *
+     * The revisions that this revision is based on.  This can include one or
+     * more parent (when documents are merged.)  This field represents the
+     * index into the `revisions` field.
+     * 
+ * + * repeated int32 parent = 2 [deprecated = true]; + * + * @deprecated google.cloud.documentai.v1beta2.Document.Revision.parent is deprecated. See + * google/cloud/documentai/v1beta2/document.proto;l=892 + * @return The count of parent. + */ + @java.lang.Deprecated + public int getParentCount() { + return parent_.size(); + } + /** + * + * + *
+     * The revisions that this revision is based on.  This can include one or
+     * more parent (when documents are merged.)  This field represents the
+     * index into the `revisions` field.
+     * 
+ * + * repeated int32 parent = 2 [deprecated = true]; + * + * @deprecated google.cloud.documentai.v1beta2.Document.Revision.parent is deprecated. See + * google/cloud/documentai/v1beta2/document.proto;l=892 + * @param index The index of the element to return. + * @return The parent at the given index. + */ + @java.lang.Deprecated + public int getParent(int index) { + return parent_.getInt(index); } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TextAnchor parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private int parentMemoizedSerializedSize = -1; - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public static final int PARENT_IDS_FIELD_NUMBER = 7; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList parentIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+     * The revisions that this revision is based on. Must include all the ids
+     * that have anything to do with this revision - eg. there are
+     * `provenance.parent.revision` fields that index into this field.
+     * 
+ * + * repeated string parent_ids = 7; + * + * @return A list containing the parentIds. + */ + public com.google.protobuf.ProtocolStringList getParentIdsList() { + return parentIds_; + } + /** + * + * + *
+     * The revisions that this revision is based on. Must include all the ids
+     * that have anything to do with this revision - eg. there are
+     * `provenance.parent.revision` fields that index into this field.
+     * 
+ * + * repeated string parent_ids = 7; + * + * @return The count of parentIds. + */ + public int getParentIdsCount() { + return parentIds_.size(); + } + /** + * + * + *
+     * The revisions that this revision is based on. Must include all the ids
+     * that have anything to do with this revision - eg. there are
+     * `provenance.parent.revision` fields that index into this field.
+     * 
+ * + * repeated string parent_ids = 7; + * + * @param index The index of the element to return. + * @return The parentIds at the given index. + */ + public java.lang.String getParentIds(int index) { + return parentIds_.get(index); + } + /** + * + * + *
+     * The revisions that this revision is based on. Must include all the ids
+     * that have anything to do with this revision - eg. there are
+     * `provenance.parent.revision` fields that index into this field.
+     * 
+ * + * repeated string parent_ids = 7; + * + * @param index The index of the value to return. + * @return The bytes of the parentIds at the given index. + */ + public com.google.protobuf.ByteString getParentIdsBytes(int index) { + return parentIds_.getByteString(index); } + public static final int CREATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+     * The time that the revision was created, internally generated by
+     * doc proto storage at the time of create.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3; + * + * @return Whether the createTime field is set. + */ @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.TextAnchor getDefaultInstanceForType() { - return DEFAULT_INSTANCE; + public boolean hasCreateTime() { + return createTime_ != null; } - } - - public interface PageAnchorOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.PageAnchor) - com.google.protobuf.MessageOrBuilder { - /** * * *
-     * One or more references to visual page elements
+     * The time that the revision was created, internally generated by
+     * doc proto storage at the time of create.
      * 
* - * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; - * + * .google.protobuf.Timestamp create_time = 3; + * + * @return The createTime. */ - java.util.List - getPageRefsList(); + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } /** * * *
-     * One or more references to visual page elements
+     * The time that the revision was created, internally generated by
+     * doc proto storage at the time of create.
      * 
* - * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; - * + * .google.protobuf.Timestamp create_time = 3; */ - com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef getPageRefs(int index); + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int HUMAN_REVIEW_FIELD_NUMBER = 6; + private com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview humanReview_; /** * * *
-     * One or more references to visual page elements
+     * Human Review information of this revision.
      * 
* - * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; - * + * .google.cloud.documentai.v1beta2.Document.Revision.HumanReview human_review = 6; + * + * @return Whether the humanReview field is set. */ - int getPageRefsCount(); + @java.lang.Override + public boolean hasHumanReview() { + return humanReview_ != null; + } /** * * *
-     * One or more references to visual page elements
+     * Human Review information of this revision.
      * 
* - * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; - * + * .google.cloud.documentai.v1beta2.Document.Revision.HumanReview human_review = 6; + * + * @return The humanReview. */ - java.util.List< - ? extends com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRefOrBuilder> - getPageRefsOrBuilderList(); + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview getHumanReview() { + return humanReview_ == null + ? com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview.getDefaultInstance() + : humanReview_; + } /** * * *
-     * One or more references to visual page elements
+     * Human Review information of this revision.
      * 
* - * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; - * + * .google.cloud.documentai.v1beta2.Document.Revision.HumanReview human_review = 6; */ - com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRefOrBuilder getPageRefsOrBuilder( - int index); - } - /** - * - * - *
-   * Referencing elements in [Document.pages][google.cloud.documentai.v1beta2.Document.pages].
-   * 
- * - * Protobuf type {@code google.cloud.documentai.v1beta2.Document.PageAnchor} - */ - public static final class PageAnchor extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.PageAnchor) - PageAnchorOrBuilder { - private static final long serialVersionUID = 0L; - // Use PageAnchor.newBuilder() to construct. - private PageAnchor(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Revision.HumanReviewOrBuilder + getHumanReviewOrBuilder() { + return humanReview_ == null + ? com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview.getDefaultInstance() + : humanReview_; } - private PageAnchor() { - pageRefs_ = java.util.Collections.emptyList(); + 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 - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new PageAnchor(); + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (getParentList().size() > 0) { + output.writeUInt32NoTag(18); + output.writeUInt32NoTag(parentMemoizedSerializedSize); + } + for (int i = 0; i < parent_.size(); i++) { + output.writeInt32NoTag(parent_.getInt(i)); + } + if (createTime_ != null) { + output.writeMessage(3, getCreateTime()); + } + if (sourceCase_ == 4) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, source_); + } + if (sourceCase_ == 5) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, source_); + } + if (humanReview_ != null) { + output.writeMessage(6, getHumanReview()); + } + for (int i = 0; i < parentIds_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, parentIds_.getRaw(i)); + } + getUnknownFields().writeTo(output); } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_PageAnchor_descriptor; + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + { + int dataSize = 0; + for (int i = 0; i < parent_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(parent_.getInt(i)); + } + size += dataSize; + if (!getParentList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + parentMemoizedSerializedSize = dataSize; + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCreateTime()); + } + if (sourceCase_ == 4) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, source_); + } + if (sourceCase_ == 5) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, source_); + } + if (humanReview_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getHumanReview()); + } + { + int dataSize = 0; + for (int i = 0; i < parentIds_.size(); i++) { + dataSize += computeStringSizeNoTag(parentIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getParentIdsList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_PageAnchor_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1beta2.Document.PageAnchor.class, - com.google.cloud.documentai.v1beta2.Document.PageAnchor.Builder.class); + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.documentai.v1beta2.Document.Revision)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta2.Document.Revision other = + (com.google.cloud.documentai.v1beta2.Document.Revision) obj; + + if (!getId().equals(other.getId())) return false; + if (!getParentList().equals(other.getParentList())) return false; + if (!getParentIdsList().equals(other.getParentIdsList())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasHumanReview() != other.hasHumanReview()) return false; + if (hasHumanReview()) { + if (!getHumanReview().equals(other.getHumanReview())) return false; + } + if (!getSourceCase().equals(other.getSourceCase())) return false; + switch (sourceCase_) { + case 4: + if (!getAgent().equals(other.getAgent())) return false; + break; + case 5: + if (!getProcessor().equals(other.getProcessor())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } - public interface PageRefOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + if (getParentCount() > 0) { + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParentList().hashCode(); + } + if (getParentIdsCount() > 0) { + hash = (37 * hash) + PARENT_IDS_FIELD_NUMBER; + hash = (53 * hash) + getParentIdsList().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasHumanReview()) { + hash = (37 * hash) + HUMAN_REVIEW_FIELD_NUMBER; + hash = (53 * hash) + getHumanReview().hashCode(); + } + switch (sourceCase_) { + case 4: + hash = (37 * hash) + AGENT_FIELD_NUMBER; + hash = (53 * hash) + getAgent().hashCode(); + break; + case 5: + hash = (37 * hash) + PROCESSOR_FIELD_NUMBER; + hash = (53 * hash) + getProcessor().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta2.Document.Revision parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.Revision 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.v1beta2.Document.Revision parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.Revision 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.v1beta2.Document.Revision parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta2.Document.Revision parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta2.Document.Revision parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.Revision 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.v1beta2.Document.Revision parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.Revision 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.v1beta2.Document.Revision parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta2.Document.Revision 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(); + } - /** - * - * - *
-       * Required. Index into the [Document.pages][google.cloud.documentai.v1beta2.Document.pages] element
-       * 
- * - * int64 page = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The page. - */ - long getPage(); + public static Builder newBuilder( + com.google.cloud.documentai.v1beta2.Document.Revision prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - /** - * - * - *
-       * Optional. The type of the layout element that is being referenced.  If not
-       * specified the whole page is assumed to be referenced.
-       * 
- * - * - * .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.LayoutType layout_type = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for layoutType. - */ - int getLayoutTypeValue(); - /** - * - * - *
-       * Optional. The type of the layout element that is being referenced.  If not
-       * specified the whole page is assumed to be referenced.
-       * 
- * - * - * .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.LayoutType layout_type = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The layoutType. - */ - com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.LayoutType getLayoutType(); + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - /** - * - * - *
-       * Optional. The [Page.Layout.id][google.cloud.documentai.v1beta2.Document.Page.Layout.id] on the page that this element
-       * references.  If [LayoutRef.type][] is specified this id must also be
-       * specified.
-       * 
- * - * string layout_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The layoutId. - */ - java.lang.String getLayoutId(); - /** - * - * - *
-       * Optional. The [Page.Layout.id][google.cloud.documentai.v1beta2.Document.Page.Layout.id] on the page that this element
-       * references.  If [LayoutRef.type][] is specified this id must also be
-       * specified.
-       * 
- * - * string layout_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for layoutId. - */ - com.google.protobuf.ByteString getLayoutIdBytes(); + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; } /** * * *
-     * Represents a weak reference to a page element within a document.
+     * Contains past or forward revisions of this document.
      * 
* - * Protobuf type {@code google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef} + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.Revision} */ - public static final class PageRef extends com.google.protobuf.GeneratedMessageV3 + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef) - PageRefOrBuilder { - private static final long serialVersionUID = 0L; - // Use PageRef.newBuilder() to construct. - private PageRef(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.Revision) + com.google.cloud.documentai.v1beta2.Document.RevisionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Revision_descriptor; } - private PageRef() { - layoutType_ = 0; - layoutId_ = ""; + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_Revision_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Document.Revision.class, + com.google.cloud.documentai.v1beta2.Document.Revision.Builder.class); + } + + // Construct using com.google.cloud.documentai.v1beta2.Document.Revision.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); } @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new PageRef(); + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + parent_ = emptyIntList(); + parentIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + humanReview_ = null; + if (humanReviewBuilder_ != null) { + humanReviewBuilder_.dispose(); + humanReviewBuilder_ = null; + } + sourceCase_ = 0; + source_ = null; + return this; } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_PageAnchor_PageRef_descriptor; + .internal_static_google_cloud_documentai_v1beta2_Document_Revision_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_PageAnchor_PageRef_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.class, - com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.Builder.class); + public com.google.cloud.documentai.v1beta2.Document.Revision getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta2.Document.Revision.getDefaultInstance(); } - /** - * - * - *
-       * The type of layout that is being referenced.
-       * 
- * - * Protobuf enum {@code - * google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.LayoutType} - */ - public enum LayoutType implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-         * Layout Unspecified.
-         * 
- * - * LAYOUT_TYPE_UNSPECIFIED = 0; - */ - LAYOUT_TYPE_UNSPECIFIED(0), - /** - * - * - *
-         * References a [Page.blocks][google.cloud.documentai.v1beta2.Document.Page.blocks] element.
-         * 
- * - * BLOCK = 1; - */ - BLOCK(1), - /** - * - * - *
-         * References a [Page.paragraphs][google.cloud.documentai.v1beta2.Document.Page.paragraphs] element.
-         * 
- * - * PARAGRAPH = 2; - */ - PARAGRAPH(2), - /** - * - * - *
-         * References a [Page.lines][google.cloud.documentai.v1beta2.Document.Page.lines] element.
-         * 
- * - * LINE = 3; - */ - LINE(3), - /** - * - * - *
-         * References a [Page.tokens][google.cloud.documentai.v1beta2.Document.Page.tokens] element.
-         * 
- * - * TOKEN = 4; - */ - TOKEN(4), - /** - * - * - *
-         * References a [Page.visual_elements][google.cloud.documentai.v1beta2.Document.Page.visual_elements] element.
-         * 
- * - * VISUAL_ELEMENT = 5; - */ - VISUAL_ELEMENT(5), - /** - * - * - *
-         * Refrrences a [Page.tables][google.cloud.documentai.v1beta2.Document.Page.tables] element.
-         * 
- * - * TABLE = 6; - */ - TABLE(6), - /** - * - * - *
-         * References a [Page.form_fields][google.cloud.documentai.v1beta2.Document.Page.form_fields] element.
-         * 
- * - * FORM_FIELD = 7; - */ - FORM_FIELD(7), - UNRECOGNIZED(-1), - ; + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Revision build() { + com.google.cloud.documentai.v1beta2.Document.Revision result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - /** - * - * - *
-         * Layout Unspecified.
-         * 
- * - * LAYOUT_TYPE_UNSPECIFIED = 0; - */ - public static final int LAYOUT_TYPE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-         * References a [Page.blocks][google.cloud.documentai.v1beta2.Document.Page.blocks] element.
-         * 
- * - * BLOCK = 1; - */ - public static final int BLOCK_VALUE = 1; - /** - * - * - *
-         * References a [Page.paragraphs][google.cloud.documentai.v1beta2.Document.Page.paragraphs] element.
-         * 
- * - * PARAGRAPH = 2; - */ - public static final int PARAGRAPH_VALUE = 2; - /** - * - * - *
-         * References a [Page.lines][google.cloud.documentai.v1beta2.Document.Page.lines] element.
-         * 
- * - * LINE = 3; - */ - public static final int LINE_VALUE = 3; - /** - * - * - *
-         * References a [Page.tokens][google.cloud.documentai.v1beta2.Document.Page.tokens] element.
-         * 
- * - * TOKEN = 4; - */ - public static final int TOKEN_VALUE = 4; - /** - * - * - *
-         * References a [Page.visual_elements][google.cloud.documentai.v1beta2.Document.Page.visual_elements] element.
-         * 
- * - * VISUAL_ELEMENT = 5; - */ - public static final int VISUAL_ELEMENT_VALUE = 5; - /** - * - * - *
-         * Refrrences a [Page.tables][google.cloud.documentai.v1beta2.Document.Page.tables] element.
-         * 
- * - * TABLE = 6; - */ - public static final int TABLE_VALUE = 6; - /** - * - * - *
-         * References a [Page.form_fields][google.cloud.documentai.v1beta2.Document.Page.form_fields] element.
-         * 
- * - * FORM_FIELD = 7; - */ - public static final int FORM_FIELD_VALUE = 7; + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Revision buildPartial() { + com.google.cloud.documentai.v1beta2.Document.Revision result = + new com.google.cloud.documentai.v1beta2.Document.Revision(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; + private void buildPartialRepeatedFields( + com.google.cloud.documentai.v1beta2.Document.Revision result) { + if (((bitField0_ & 0x00000008) != 0)) { + parent_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000008); } + result.parent_ = parent_; + } - /** - * @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 LayoutType valueOf(int value) { - return forNumber(value); + private void buildPartial0(com.google.cloud.documentai.v1beta2.Document.Revision result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.id_ = id_; } + if (((from_bitField0_ & 0x00000010) != 0)) { + parentIds_.makeImmutable(); + result.parentIds_ = parentIds_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.createTime_ = + createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.humanReview_ = + humanReviewBuilder_ == null ? humanReview_ : humanReviewBuilder_.build(); + } + } - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static LayoutType forNumber(int value) { - switch (value) { - case 0: - return LAYOUT_TYPE_UNSPECIFIED; - case 1: - return BLOCK; - case 2: - return PARAGRAPH; - case 3: - return LINE; - case 4: - return TOKEN; - case 5: - return VISUAL_ELEMENT; - case 6: - return TABLE; - case 7: - return FORM_FIELD; - default: - return null; - } + private void buildPartialOneofs( + com.google.cloud.documentai.v1beta2.Document.Revision result) { + result.sourceCase_ = sourceCase_; + result.source_ = this.source_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta2.Document.Revision) { + return mergeFrom((com.google.cloud.documentai.v1beta2.Document.Revision) other); + } else { + super.mergeFrom(other); + return this; } + } - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; + public Builder mergeFrom(com.google.cloud.documentai.v1beta2.Document.Revision other) { + if (other == com.google.cloud.documentai.v1beta2.Document.Revision.getDefaultInstance()) + return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.parent_.isEmpty()) { + if (parent_.isEmpty()) { + parent_ = other.parent_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureParentIsMutable(); + parent_.addAll(other.parent_); + } + onChanged(); + } + if (!other.parentIds_.isEmpty()) { + if (parentIds_.isEmpty()) { + parentIds_ = other.parentIds_; + bitField0_ |= 0x00000010; + } else { + ensureParentIdsIsMutable(); + parentIds_.addAll(other.parentIds_); + } + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasHumanReview()) { + mergeHumanReview(other.getHumanReview()); + } + switch (other.getSourceCase()) { + case AGENT: + { + sourceCase_ = 4; + source_ = other.source_; + onChanged(); + break; + } + case PROCESSOR: + { + sourceCase_ = 5; + source_ = other.source_; + onChanged(); + break; + } + case SOURCE_NOT_SET: + { + break; + } } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public LayoutType findValueByNumber(int number) { - return LayoutType.forNumber(number); - } - }; + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 10 + case 16: + { + int v = input.readInt32(); + ensureParentIsMutable(); + parent_.addInt(v); + break; + } // case 16 + case 18: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureParentIsMutable(); + while (input.getBytesUntilLimit() > 0) { + parent_.addInt(input.readInt32()); + } + input.popLimit(limit); + break; + } // case 18 + case 26: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + sourceCase_ = 4; + source_ = s; + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + sourceCase_ = 5; + source_ = s; + break; + } // case 42 + case 50: + { + input.readMessage(getHumanReviewFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 50 + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureParentIdsIsMutable(); + parentIds_.add(s); + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } + private int sourceCase_ = 0; + private java.lang.Object source_; - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.getDescriptor() - .getEnumTypes() - .get(0); - } + public Builder clearSource() { + sourceCase_ = 0; + source_ = null; + onChanged(); + return this; + } - private static final LayoutType[] VALUES = values(); + private int bitField0_; - public static LayoutType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); + /** + * + * + *
+       * If the change was made by a person specify the name or id of that
+       * person.
+       * 
+ * + * string agent = 4; + * + * @return Whether the agent field is set. + */ + @java.lang.Override + public boolean hasAgent() { + return sourceCase_ == 4; + } + /** + * + * + *
+       * If the change was made by a person specify the name or id of that
+       * person.
+       * 
+ * + * string agent = 4; + * + * @return The agent. + */ + @java.lang.Override + public java.lang.String getAgent() { + java.lang.Object ref = ""; + if (sourceCase_ == 4) { + ref = source_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (sourceCase_ == 4) { + source_ = s; } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * If the change was made by a person specify the name or id of that
+       * person.
+       * 
+ * + * string agent = 4; + * + * @return The bytes for agent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAgentBytes() { + java.lang.Object ref = ""; + if (sourceCase_ == 4) { + ref = source_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (sourceCase_ == 4) { + source_ = b; } - return VALUES[desc.getIndex()]; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - - private final int value; - - private LayoutType(int value) { - this.value = value; + } + /** + * + * + *
+       * If the change was made by a person specify the name or id of that
+       * person.
+       * 
+ * + * string agent = 4; + * + * @param value The agent to set. + * @return This builder for chaining. + */ + public Builder setAgent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } - - // @@protoc_insertion_point(enum_scope:google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.LayoutType) + sourceCase_ = 4; + source_ = value; + onChanged(); + return this; } - - public static final int PAGE_FIELD_NUMBER = 1; - private long page_ = 0L; /** * * *
-       * Required. Index into the [Document.pages][google.cloud.documentai.v1beta2.Document.pages] element
+       * If the change was made by a person specify the name or id of that
+       * person.
        * 
* - * int64 page = 1 [(.google.api.field_behavior) = REQUIRED]; + * string agent = 4; * - * @return The page. + * @return This builder for chaining. */ - @java.lang.Override - public long getPage() { - return page_; + public Builder clearAgent() { + if (sourceCase_ == 4) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + return this; } - - public static final int LAYOUT_TYPE_FIELD_NUMBER = 2; - private int layoutType_ = 0; /** * * *
-       * Optional. The type of the layout element that is being referenced.  If not
-       * specified the whole page is assumed to be referenced.
+       * If the change was made by a person specify the name or id of that
+       * person.
        * 
* - * - * .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.LayoutType layout_type = 2 [(.google.api.field_behavior) = OPTIONAL]; - * + * string agent = 4; * - * @return The enum numeric value on the wire for layoutType. + * @param value The bytes for agent to set. + * @return This builder for chaining. */ - @java.lang.Override - public int getLayoutTypeValue() { - return layoutType_; + public Builder setAgentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sourceCase_ = 4; + source_ = value; + onChanged(); + return this; } + /** * * *
-       * Optional. The type of the layout element that is being referenced.  If not
-       * specified the whole page is assumed to be referenced.
+       * If the annotation was made by processor identify the processor by its
+       * resource name.
        * 
* - * - * .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.LayoutType layout_type = 2 [(.google.api.field_behavior) = OPTIONAL]; - * + * string processor = 5; * - * @return The layoutType. + * @return Whether the processor field is set. */ @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.LayoutType - getLayoutType() { - com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.LayoutType result = - com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.LayoutType.forNumber( - layoutType_); - return result == null - ? com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.LayoutType - .UNRECOGNIZED - : result; + public boolean hasProcessor() { + return sourceCase_ == 5; } - - public static final int LAYOUT_ID_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object layoutId_ = ""; /** * * *
-       * Optional. The [Page.Layout.id][google.cloud.documentai.v1beta2.Document.Page.Layout.id] on the page that this element
-       * references.  If [LayoutRef.type][] is specified this id must also be
-       * specified.
+       * If the annotation was made by processor identify the processor by its
+       * resource name.
        * 
* - * string layout_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * string processor = 5; * - * @return The layoutId. + * @return The processor. */ @java.lang.Override - public java.lang.String getLayoutId() { - java.lang.Object ref = layoutId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { + public java.lang.String getProcessor() { + java.lang.Object ref = ""; + if (sourceCase_ == 5) { + ref = source_; + } + if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - layoutId_ = s; + if (sourceCase_ == 5) { + source_ = s; + } return s; + } else { + return (java.lang.String) ref; } } /** * * *
-       * Optional. The [Page.Layout.id][google.cloud.documentai.v1beta2.Document.Page.Layout.id] on the page that this element
-       * references.  If [LayoutRef.type][] is specified this id must also be
-       * specified.
+       * If the annotation was made by processor identify the processor by its
+       * resource name.
        * 
* - * string layout_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * string processor = 5; * - * @return The bytes for layoutId. + * @return The bytes for processor. */ @java.lang.Override - public com.google.protobuf.ByteString getLayoutIdBytes() { - java.lang.Object ref = layoutId_; - if (ref instanceof java.lang.String) { + public com.google.protobuf.ByteString getProcessorBytes() { + java.lang.Object ref = ""; + if (sourceCase_ == 5) { + ref = source_; + } + if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - layoutId_ = b; + if (sourceCase_ == 5) { + source_ = 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 (page_ != 0L) { - output.writeInt64(1, page_); - } - if (layoutType_ - != com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.LayoutType - .LAYOUT_TYPE_UNSPECIFIED - .getNumber()) { - output.writeEnum(2, layoutType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(layoutId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, layoutId_); + /** + * + * + *
+       * If the annotation was made by processor identify the processor by its
+       * resource name.
+       * 
+ * + * string processor = 5; + * + * @param value The processor to set. + * @return This builder for chaining. + */ + public Builder setProcessor(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } - getUnknownFields().writeTo(output); + sourceCase_ = 5; + source_ = value; + onChanged(); + return this; } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (page_ != 0L) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, page_); - } - if (layoutType_ - != com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.LayoutType - .LAYOUT_TYPE_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, layoutType_); + /** + * + * + *
+       * If the annotation was made by processor identify the processor by its
+       * resource name.
+       * 
+ * + * string processor = 5; + * + * @return This builder for chaining. + */ + public Builder clearProcessor() { + if (sourceCase_ == 5) { + sourceCase_ = 0; + source_ = null; + onChanged(); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(layoutId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, layoutId_); + return this; + } + /** + * + * + *
+       * If the annotation was made by processor identify the processor by its
+       * resource name.
+       * 
+ * + * string processor = 5; + * + * @param value The bytes for processor to set. + * @return This builder for chaining. + */ + public Builder setProcessorBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; + checkByteStringIsUtf8(value); + sourceCase_ = 5; + source_ = value; + onChanged(); + return this; } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef)) { - return super.equals(obj); + private java.lang.Object id_ = ""; + /** + * + * + *
+       * Id of the revision, internally generated by doc proto storage.
+       * Unique within the context of the document.
+       * 
+ * + * string id = 1; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; } - com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef other = - (com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef) obj; - - if (getPage() != other.getPage()) return false; - if (layoutType_ != other.layoutType_) return false; - if (!getLayoutId().equals(other.getLayoutId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; + /** + * + * + *
+       * Id of the revision, internally generated by doc proto storage.
+       * Unique within the context of the document.
+       * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PAGE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getPage()); - hash = (37 * hash) + LAYOUT_TYPE_FIELD_NUMBER; - hash = (53 * hash) + layoutType_; - hash = (37 * hash) + LAYOUT_ID_FIELD_NUMBER; - hash = (53 * hash) + getLayoutId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; } - - public static com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + /** + * + * + *
+       * Id of the revision, internally generated by doc proto storage.
+       * Unique within the context of the document.
+       * 
+ * + * string id = 1; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + id_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; } - - public static com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + /** + * + * + *
+       * Id of the revision, internally generated by doc proto storage.
+       * Unique within the context of the document.
+       * 
+ * + * string id = 1; + * + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; } - - public static com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + /** + * + * + *
+       * Id of the revision, internally generated by doc proto storage.
+       * Unique within the context of the document.
+       * 
+ * + * string id = 1; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; } - public static com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + private com.google.protobuf.Internal.IntList parent_ = emptyIntList(); - public static com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + private void ensureParentIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + parent_ = mutableCopy(parent_); + bitField0_ |= 0x00000008; + } } - - public static com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + /** + * + * + *
+       * The revisions that this revision is based on.  This can include one or
+       * more parent (when documents are merged.)  This field represents the
+       * index into the `revisions` field.
+       * 
+ * + * repeated int32 parent = 2 [deprecated = true]; + * + * @deprecated google.cloud.documentai.v1beta2.Document.Revision.parent is deprecated. See + * google/cloud/documentai/v1beta2/document.proto;l=892 + * @return A list containing the parent. + */ + @java.lang.Deprecated + public java.util.List getParentList() { + return ((bitField0_ & 0x00000008) != 0) + ? java.util.Collections.unmodifiableList(parent_) + : parent_; } - - public static com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + /** + * + * + *
+       * The revisions that this revision is based on.  This can include one or
+       * more parent (when documents are merged.)  This field represents the
+       * index into the `revisions` field.
+       * 
+ * + * repeated int32 parent = 2 [deprecated = true]; + * + * @deprecated google.cloud.documentai.v1beta2.Document.Revision.parent is deprecated. See + * google/cloud/documentai/v1beta2/document.proto;l=892 + * @return The count of parent. + */ + @java.lang.Deprecated + public int getParentCount() { + return parent_.size(); } - - public static com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + /** + * + * + *
+       * The revisions that this revision is based on.  This can include one or
+       * more parent (when documents are merged.)  This field represents the
+       * index into the `revisions` field.
+       * 
+ * + * repeated int32 parent = 2 [deprecated = true]; + * + * @deprecated google.cloud.documentai.v1beta2.Document.Revision.parent is deprecated. See + * google/cloud/documentai/v1beta2/document.proto;l=892 + * @param index The index of the element to return. + * @return The parent at the given index. + */ + @java.lang.Deprecated + public int getParent(int index) { + return parent_.getInt(index); } + /** + * + * + *
+       * The revisions that this revision is based on.  This can include one or
+       * more parent (when documents are merged.)  This field represents the
+       * index into the `revisions` field.
+       * 
+ * + * repeated int32 parent = 2 [deprecated = true]; + * + * @deprecated google.cloud.documentai.v1beta2.Document.Revision.parent is deprecated. See + * google/cloud/documentai/v1beta2/document.proto;l=892 + * @param index The index to set the value at. + * @param value The parent to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setParent(int index, int value) { - public static com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + ensureParentIsMutable(); + parent_.setInt(index, value); + onChanged(); + return this; } + /** + * + * + *
+       * The revisions that this revision is based on.  This can include one or
+       * more parent (when documents are merged.)  This field represents the
+       * index into the `revisions` field.
+       * 
+ * + * repeated int32 parent = 2 [deprecated = true]; + * + * @deprecated google.cloud.documentai.v1beta2.Document.Revision.parent is deprecated. See + * google/cloud/documentai/v1beta2/document.proto;l=892 + * @param value The parent to add. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder addParent(int value) { - public static com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + ensureParentIsMutable(); + parent_.addInt(value); + onChanged(); + return this; } - - public static com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + /** + * + * + *
+       * The revisions that this revision is based on.  This can include one or
+       * more parent (when documents are merged.)  This field represents the
+       * index into the `revisions` field.
+       * 
+ * + * repeated int32 parent = 2 [deprecated = true]; + * + * @deprecated google.cloud.documentai.v1beta2.Document.Revision.parent is deprecated. See + * google/cloud/documentai/v1beta2/document.proto;l=892 + * @param values The parent to add. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder addAllParent(java.lang.Iterable values) { + ensureParentIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, parent_); + onChanged(); + return this; } - - public static com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + /** + * + * + *
+       * The revisions that this revision is based on.  This can include one or
+       * more parent (when documents are merged.)  This field represents the
+       * index into the `revisions` field.
+       * 
+ * + * repeated int32 parent = 2 [deprecated = true]; + * + * @deprecated google.cloud.documentai.v1beta2.Document.Revision.parent is deprecated. See + * google/cloud/documentai/v1beta2/document.proto;l=892 + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearParent() { + parent_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; } - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + private com.google.protobuf.LazyStringArrayList parentIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); + private void ensureParentIdsIsMutable() { + if (!parentIds_.isModifiable()) { + parentIds_ = new com.google.protobuf.LazyStringArrayList(parentIds_); + } + bitField0_ |= 0x00000010; } - - public static Builder newBuilder( - com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + /** + * + * + *
+       * The revisions that this revision is based on. Must include all the ids
+       * that have anything to do with this revision - eg. there are
+       * `provenance.parent.revision` fields that index into this field.
+       * 
+ * + * repeated string parent_ids = 7; + * + * @return A list containing the parentIds. + */ + public com.google.protobuf.ProtocolStringList getParentIdsList() { + parentIds_.makeImmutable(); + return parentIds_; } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + /** + * + * + *
+       * The revisions that this revision is based on. Must include all the ids
+       * that have anything to do with this revision - eg. there are
+       * `provenance.parent.revision` fields that index into this field.
+       * 
+ * + * repeated string parent_ids = 7; + * + * @return The count of parentIds. + */ + public int getParentIdsCount() { + return parentIds_.size(); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; + /** + * + * + *
+       * The revisions that this revision is based on. Must include all the ids
+       * that have anything to do with this revision - eg. there are
+       * `provenance.parent.revision` fields that index into this field.
+       * 
+ * + * repeated string parent_ids = 7; + * + * @param index The index of the element to return. + * @return The parentIds at the given index. + */ + public java.lang.String getParentIds(int index) { + return parentIds_.get(index); } /** * * *
-       * Represents a weak reference to a page element within a document.
+       * The revisions that this revision is based on. Must include all the ids
+       * that have anything to do with this revision - eg. there are
+       * `provenance.parent.revision` fields that index into this field.
        * 
* - * Protobuf type {@code google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef} + * repeated string parent_ids = 7; + * + * @param index The index of the value to return. + * @return The bytes of the parentIds at the given index. */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef) - com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRefOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_PageAnchor_PageRef_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_PageAnchor_PageRef_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.class, - com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.Builder.class); - } - - // Construct using - // com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - page_ = 0L; - layoutType_ = 0; - layoutId_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_PageAnchor_PageRef_descriptor; - } - - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef - getDefaultInstanceForType() { - return com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef build() { - com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef buildPartial() { - com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef result = - new com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.page_ = page_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.layoutType_ = layoutType_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.layoutId_ = layoutId_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef) { - return mergeFrom( - (com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef other) { - if (other - == com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef - .getDefaultInstance()) return this; - if (other.getPage() != 0L) { - setPage(other.getPage()); - } - if (other.layoutType_ != 0) { - setLayoutTypeValue(other.getLayoutTypeValue()); - } - if (!other.getLayoutId().isEmpty()) { - layoutId_ = other.layoutId_; - bitField0_ |= 0x00000004; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - page_ = input.readInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: - { - layoutType_ = input.readEnum(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 26: - { - layoutId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private long page_; - /** - * - * - *
-         * Required. Index into the [Document.pages][google.cloud.documentai.v1beta2.Document.pages] element
-         * 
- * - * int64 page = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The page. - */ - @java.lang.Override - public long getPage() { - return page_; + public com.google.protobuf.ByteString getParentIdsBytes(int index) { + return parentIds_.getByteString(index); + } + /** + * + * + *
+       * The revisions that this revision is based on. Must include all the ids
+       * that have anything to do with this revision - eg. there are
+       * `provenance.parent.revision` fields that index into this field.
+       * 
+ * + * repeated string parent_ids = 7; + * + * @param index The index to set the value at. + * @param value The parentIds to set. + * @return This builder for chaining. + */ + public Builder setParentIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } - /** - * - * - *
-         * Required. Index into the [Document.pages][google.cloud.documentai.v1beta2.Document.pages] element
-         * 
- * - * int64 page = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The page to set. - * @return This builder for chaining. - */ - public Builder setPage(long value) { - - page_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; + ensureParentIdsIsMutable(); + parentIds_.set(index, value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * The revisions that this revision is based on. Must include all the ids
+       * that have anything to do with this revision - eg. there are
+       * `provenance.parent.revision` fields that index into this field.
+       * 
+ * + * repeated string parent_ids = 7; + * + * @param value The parentIds to add. + * @return This builder for chaining. + */ + public Builder addParentIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } - /** - * - * - *
-         * Required. Index into the [Document.pages][google.cloud.documentai.v1beta2.Document.pages] element
-         * 
- * - * int64 page = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearPage() { - bitField0_ = (bitField0_ & ~0x00000001); - page_ = 0L; - onChanged(); - return this; + ensureParentIdsIsMutable(); + parentIds_.add(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * The revisions that this revision is based on. Must include all the ids
+       * that have anything to do with this revision - eg. there are
+       * `provenance.parent.revision` fields that index into this field.
+       * 
+ * + * repeated string parent_ids = 7; + * + * @param values The parentIds to add. + * @return This builder for chaining. + */ + public Builder addAllParentIds(java.lang.Iterable values) { + ensureParentIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, parentIds_); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * The revisions that this revision is based on. Must include all the ids
+       * that have anything to do with this revision - eg. there are
+       * `provenance.parent.revision` fields that index into this field.
+       * 
+ * + * repeated string parent_ids = 7; + * + * @return This builder for chaining. + */ + public Builder clearParentIds() { + parentIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + ; + onChanged(); + return this; + } + /** + * + * + *
+       * The revisions that this revision is based on. Must include all the ids
+       * that have anything to do with this revision - eg. there are
+       * `provenance.parent.revision` fields that index into this field.
+       * 
+ * + * repeated string parent_ids = 7; + * + * @param value The bytes of the parentIds to add. + * @return This builder for chaining. + */ + public Builder addParentIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureParentIdsIsMutable(); + parentIds_.add(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } - private int layoutType_ = 0; - /** - * - * - *
-         * Optional. The type of the layout element that is being referenced.  If not
-         * specified the whole page is assumed to be referenced.
-         * 
- * - * - * .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.LayoutType layout_type = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for layoutType. - */ - @java.lang.Override - public int getLayoutTypeValue() { - return layoutType_; - } - /** - * - * - *
-         * Optional. The type of the layout element that is being referenced.  If not
-         * specified the whole page is assumed to be referenced.
-         * 
- * - * - * .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.LayoutType layout_type = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The enum numeric value on the wire for layoutType to set. - * @return This builder for chaining. - */ - public Builder setLayoutTypeValue(int value) { - layoutType_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-         * Optional. The type of the layout element that is being referenced.  If not
-         * specified the whole page is assumed to be referenced.
-         * 
- * - * - * .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.LayoutType layout_type = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The layoutType. - */ - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.LayoutType - getLayoutType() { - com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.LayoutType result = - com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.LayoutType.forNumber( - layoutType_); - return result == null - ? com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.LayoutType - .UNRECOGNIZED - : result; - } - /** - * - * - *
-         * Optional. The type of the layout element that is being referenced.  If not
-         * specified the whole page is assumed to be referenced.
-         * 
- * - * - * .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.LayoutType layout_type = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The layoutType to set. - * @return This builder for chaining. - */ - public Builder setLayoutType( - com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.LayoutType value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - layoutType_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-         * Optional. The type of the layout element that is being referenced.  If not
-         * specified the whole page is assumed to be referenced.
-         * 
- * - * - * .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.LayoutType layout_type = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearLayoutType() { - bitField0_ = (bitField0_ & ~0x00000002); - layoutType_ = 0; - 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 time that the revision was created, internally generated by
+       * doc proto storage at the time of create.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 3; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+       * The time that the revision was created, internally generated by
+       * doc proto storage at the time of create.
+       * 
+ * + * .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(); } - - private java.lang.Object layoutId_ = ""; - /** - * - * - *
-         * Optional. The [Page.Layout.id][google.cloud.documentai.v1beta2.Document.Page.Layout.id] on the page that this element
-         * references.  If [LayoutRef.type][] is specified this id must also be
-         * specified.
-         * 
- * - * string layout_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The layoutId. - */ - public java.lang.String getLayoutId() { - java.lang.Object ref = layoutId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - layoutId_ = s; - return s; - } else { - return (java.lang.String) ref; + } + /** + * + * + *
+       * The time that the revision was created, internally generated by
+       * doc proto storage at the time of create.
+       * 
+ * + * .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; + } else { + createTimeBuilder_.setMessage(value); } - /** - * - * - *
-         * Optional. The [Page.Layout.id][google.cloud.documentai.v1beta2.Document.Page.Layout.id] on the page that this element
-         * references.  If [LayoutRef.type][] is specified this id must also be
-         * specified.
-         * 
- * - * string layout_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for layoutId. - */ - public com.google.protobuf.ByteString getLayoutIdBytes() { - java.lang.Object ref = layoutId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - layoutId_ = b; - return b; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+       * The time that the revision was created, internally generated by
+       * doc proto storage at the time of create.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 3; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+       * The time that the revision was created, internally generated by
+       * doc proto storage at the time of create.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 3; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); } else { - return (com.google.protobuf.ByteString) ref; + createTime_ = value; } + } else { + createTimeBuilder_.mergeFrom(value); } - /** - * - * - *
-         * Optional. The [Page.Layout.id][google.cloud.documentai.v1beta2.Document.Page.Layout.id] on the page that this element
-         * references.  If [LayoutRef.type][] is specified this id must also be
-         * specified.
-         * 
- * - * string layout_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The layoutId to set. - * @return This builder for chaining. - */ - public Builder setLayoutId(java.lang.String value) { + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+       * The time that the revision was created, internally generated by
+       * doc proto storage at the time of create.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 3; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000020); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * The time that the revision was created, internally generated by
+       * doc proto storage at the time of create.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 3; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The time that the revision was created, internally generated by
+       * doc proto storage at the time of create.
+       * 
+ * + * .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 time that the revision was created, internally generated by
+       * doc proto storage at the time of create.
+       * 
+ * + * .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.cloud.documentai.v1beta2.Document.Revision.HumanReview humanReview_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview, + com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview.Builder, + com.google.cloud.documentai.v1beta2.Document.Revision.HumanReviewOrBuilder> + humanReviewBuilder_; + /** + * + * + *
+       * Human Review information of this revision.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Revision.HumanReview human_review = 6; + * + * + * @return Whether the humanReview field is set. + */ + public boolean hasHumanReview() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+       * Human Review information of this revision.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Revision.HumanReview human_review = 6; + * + * + * @return The humanReview. + */ + public com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview getHumanReview() { + if (humanReviewBuilder_ == null) { + return humanReview_ == null + ? com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview + .getDefaultInstance() + : humanReview_; + } else { + return humanReviewBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Human Review information of this revision.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Revision.HumanReview human_review = 6; + * + */ + public Builder setHumanReview( + com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview value) { + if (humanReviewBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - layoutId_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; + humanReview_ = value; + } else { + humanReviewBuilder_.setMessage(value); } - /** - * - * - *
-         * Optional. The [Page.Layout.id][google.cloud.documentai.v1beta2.Document.Page.Layout.id] on the page that this element
-         * references.  If [LayoutRef.type][] is specified this id must also be
-         * specified.
-         * 
- * - * string layout_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearLayoutId() { - layoutId_ = getDefaultInstance().getLayoutId(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+       * Human Review information of this revision.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Revision.HumanReview human_review = 6; + * + */ + public Builder setHumanReview( + com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview.Builder + builderForValue) { + if (humanReviewBuilder_ == null) { + humanReview_ = builderForValue.build(); + } else { + humanReviewBuilder_.setMessage(builderForValue.build()); } - /** - * - * - *
-         * Optional. The [Page.Layout.id][google.cloud.documentai.v1beta2.Document.Page.Layout.id] on the page that this element
-         * references.  If [LayoutRef.type][] is specified this id must also be
-         * specified.
-         * 
- * - * string layout_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for layoutId to set. - * @return This builder for chaining. - */ - public Builder setLayoutIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+       * Human Review information of this revision.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Revision.HumanReview human_review = 6; + * + */ + public Builder mergeHumanReview( + com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview value) { + if (humanReviewBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && humanReview_ != null + && humanReview_ + != com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview + .getDefaultInstance()) { + getHumanReviewBuilder().mergeFrom(value); + } else { + humanReview_ = value; } - checkByteStringIsUtf8(value); - layoutId_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; + } else { + humanReviewBuilder_.mergeFrom(value); } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+       * Human Review information of this revision.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Revision.HumanReview human_review = 6; + * + */ + public Builder clearHumanReview() { + bitField0_ = (bitField0_ & ~0x00000040); + humanReview_ = null; + if (humanReviewBuilder_ != null) { + humanReviewBuilder_.dispose(); + humanReviewBuilder_ = null; } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + onChanged(); + return this; + } + /** + * + * + *
+       * Human Review information of this revision.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Revision.HumanReview human_review = 6; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview.Builder + getHumanReviewBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getHumanReviewFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Human Review information of this revision.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Revision.HumanReview human_review = 6; + * + */ + public com.google.cloud.documentai.v1beta2.Document.Revision.HumanReviewOrBuilder + getHumanReviewOrBuilder() { + if (humanReviewBuilder_ != null) { + return humanReviewBuilder_.getMessageOrBuilder(); + } else { + return humanReview_ == null + ? com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview + .getDefaultInstance() + : humanReview_; } - - // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef) + } + /** + * + * + *
+       * Human Review information of this revision.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.Revision.HumanReview human_review = 6; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview, + com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview.Builder, + com.google.cloud.documentai.v1beta2.Document.Revision.HumanReviewOrBuilder> + getHumanReviewFieldBuilder() { + if (humanReviewBuilder_ == null) { + humanReviewBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview, + com.google.cloud.documentai.v1beta2.Document.Revision.HumanReview.Builder, + com.google.cloud.documentai.v1beta2.Document.Revision.HumanReviewOrBuilder>( + getHumanReview(), getParentForChildren(), isClean()); + humanReview_ = null; + } + return humanReviewBuilder_; } - // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef) - private static final com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef(); + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); } - public static com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef - getDefaultInstance() { - return DEFAULT_INSTANCE; + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PageRef parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta2.Document.Revision) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.Revision) + private static final com.google.cloud.documentai.v1beta2.Document.Revision DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta2.Document.Revision(); + } + + public static com.google.cloud.documentai.v1beta2.Document.Revision getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Revision parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); } - }; + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Revision getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TextChangeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.TextChange) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Provenance of the correction.
+     * Text anchor indexing into the
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].  There
+     * can only be a single `TextAnchor.text_segments` element.  If the start
+     * and end index of the text segment are the same, the text change is
+     * inserted before that index.
+     * 
+ * + * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; + * + * @return Whether the textAnchor field is set. + */ + boolean hasTextAnchor(); + /** + * + * + *
+     * Provenance of the correction.
+     * Text anchor indexing into the
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].  There
+     * can only be a single `TextAnchor.text_segments` element.  If the start
+     * and end index of the text segment are the same, the text change is
+     * inserted before that index.
+     * 
+ * + * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; + * + * @return The textAnchor. + */ + com.google.cloud.documentai.v1beta2.Document.TextAnchor getTextAnchor(); + /** + * + * + *
+     * Provenance of the correction.
+     * Text anchor indexing into the
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].  There
+     * can only be a single `TextAnchor.text_segments` element.  If the start
+     * and end index of the text segment are the same, the text change is
+     * inserted before that index.
+     * 
+ * + * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; + */ + com.google.cloud.documentai.v1beta2.Document.TextAnchorOrBuilder getTextAnchorOrBuilder(); + + /** + * + * + *
+     * The text that replaces the text identified in the `text_anchor`.
+     * 
+ * + * string changed_text = 2; + * + * @return The changedText. + */ + java.lang.String getChangedText(); + /** + * + * + *
+     * The text that replaces the text identified in the `text_anchor`.
+     * 
+ * + * string changed_text = 2; + * + * @return The bytes for changedText. + */ + com.google.protobuf.ByteString getChangedTextBytes(); + + /** + * + * + *
+     * The history of this annotation.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; + * + */ + @java.lang.Deprecated + java.util.List getProvenanceList(); + /** + * + * + *
+     * The history of this annotation.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; + * + */ + @java.lang.Deprecated + com.google.cloud.documentai.v1beta2.Document.Provenance getProvenance(int index); + /** + * + * + *
+     * The history of this annotation.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; + * + */ + @java.lang.Deprecated + int getProvenanceCount(); + /** + * + * + *
+     * The history of this annotation.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; + * + */ + @java.lang.Deprecated + java.util.List + getProvenanceOrBuilderList(); + /** + * + * + *
+     * The history of this annotation.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; + * + */ + @java.lang.Deprecated + com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder getProvenanceOrBuilder( + int index); + } + /** + * + * + *
+   * This message is used for text changes aka. OCR corrections.
+   * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.TextChange} + */ + public static final class TextChange extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta2.Document.TextChange) + TextChangeOrBuilder { + private static final long serialVersionUID = 0L; + // Use TextChange.newBuilder() to construct. + private TextChange(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TextChange() { + changedText_ = ""; + provenance_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TextChange(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_TextChange_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta2.DocumentProto + .internal_static_google_cloud_documentai_v1beta2_Document_TextChange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta2.Document.TextChange.class, + com.google.cloud.documentai.v1beta2.Document.TextChange.Builder.class); + } + + public static final int TEXT_ANCHOR_FIELD_NUMBER = 1; + private com.google.cloud.documentai.v1beta2.Document.TextAnchor textAnchor_; + /** + * + * + *
+     * Provenance of the correction.
+     * Text anchor indexing into the
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].  There
+     * can only be a single `TextAnchor.text_segments` element.  If the start
+     * and end index of the text segment are the same, the text change is
+     * inserted before that index.
+     * 
+ * + * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; + * + * @return Whether the textAnchor field is set. + */ + @java.lang.Override + public boolean hasTextAnchor() { + return textAnchor_ != null; + } + /** + * + * + *
+     * Provenance of the correction.
+     * Text anchor indexing into the
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].  There
+     * can only be a single `TextAnchor.text_segments` element.  If the start
+     * and end index of the text segment are the same, the text change is
+     * inserted before that index.
+     * 
+ * + * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; + * + * @return The textAnchor. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.TextAnchor getTextAnchor() { + return textAnchor_ == null + ? com.google.cloud.documentai.v1beta2.Document.TextAnchor.getDefaultInstance() + : textAnchor_; + } + /** + * + * + *
+     * Provenance of the correction.
+     * Text anchor indexing into the
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].  There
+     * can only be a single `TextAnchor.text_segments` element.  If the start
+     * and end index of the text segment are the same, the text change is
+     * inserted before that index.
+     * 
+ * + * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.TextAnchorOrBuilder + getTextAnchorOrBuilder() { + return textAnchor_ == null + ? com.google.cloud.documentai.v1beta2.Document.TextAnchor.getDefaultInstance() + : textAnchor_; + } - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public static final int CHANGED_TEXT_FIELD_NUMBER = 2; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + @SuppressWarnings("serial") + private volatile java.lang.Object changedText_ = ""; + /** + * + * + *
+     * The text that replaces the text identified in the `text_anchor`.
+     * 
+ * + * string changed_text = 2; + * + * @return The changedText. + */ + @java.lang.Override + public java.lang.String getChangedText() { + java.lang.Object ref = changedText_; + 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(); + changedText_ = s; + return s; } - - @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; + } + /** + * + * + *
+     * The text that replaces the text identified in the `text_anchor`.
+     * 
+ * + * string changed_text = 2; + * + * @return The bytes for changedText. + */ + @java.lang.Override + public com.google.protobuf.ByteString getChangedTextBytes() { + java.lang.Object ref = changedText_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + changedText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } } - public static final int PAGE_REFS_FIELD_NUMBER = 1; + public static final int PROVENANCE_FIELD_NUMBER = 3; @SuppressWarnings("serial") - private java.util.List - pageRefs_; + private java.util.List provenance_; /** * * *
-     * One or more references to visual page elements
+     * The history of this annotation.
      * 
* - * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; + * + * repeated .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; * */ @java.lang.Override - public java.util.List - getPageRefsList() { - return pageRefs_; + @java.lang.Deprecated + public java.util.List + getProvenanceList() { + return provenance_; } /** * * *
-     * One or more references to visual page elements
+     * The history of this annotation.
      * 
* - * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; + * + * repeated .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; * */ @java.lang.Override + @java.lang.Deprecated public java.util.List< - ? extends com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRefOrBuilder> - getPageRefsOrBuilderList() { - return pageRefs_; + ? extends com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder> + getProvenanceOrBuilderList() { + return provenance_; } /** * * *
-     * One or more references to visual page elements
+     * The history of this annotation.
      * 
* - * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; + * + * repeated .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; * */ @java.lang.Override - public int getPageRefsCount() { - return pageRefs_.size(); + @java.lang.Deprecated + public int getProvenanceCount() { + return provenance_.size(); } /** * * *
-     * One or more references to visual page elements
+     * The history of this annotation.
      * 
* - * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; + * + * repeated .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; * */ @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef getPageRefs(int index) { - return pageRefs_.get(index); + @java.lang.Deprecated + public com.google.cloud.documentai.v1beta2.Document.Provenance getProvenance(int index) { + return provenance_.get(index); } /** * * *
-     * One or more references to visual page elements
+     * The history of this annotation.
      * 
* - * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; + * + * repeated .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; * */ @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRefOrBuilder - getPageRefsOrBuilder(int index) { - return pageRefs_.get(index); + @java.lang.Deprecated + public com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder getProvenanceOrBuilder( + int index) { + return provenance_.get(index); } private byte memoizedIsInitialized = -1; @@ -37723,8 +64565,14 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < pageRefs_.size(); i++) { - output.writeMessage(1, pageRefs_.get(i)); + if (textAnchor_ != null) { + output.writeMessage(1, getTextAnchor()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(changedText_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, changedText_); + } + for (int i = 0; i < provenance_.size(); i++) { + output.writeMessage(3, provenance_.get(i)); } getUnknownFields().writeTo(output); } @@ -37735,8 +64583,14 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - for (int i = 0; i < pageRefs_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, pageRefs_.get(i)); + if (textAnchor_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTextAnchor()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(changedText_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, changedText_); + } + for (int i = 0; i < provenance_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, provenance_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -37748,13 +64602,18 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.documentai.v1beta2.Document.PageAnchor)) { + if (!(obj instanceof com.google.cloud.documentai.v1beta2.Document.TextChange)) { return super.equals(obj); } - com.google.cloud.documentai.v1beta2.Document.PageAnchor other = - (com.google.cloud.documentai.v1beta2.Document.PageAnchor) obj; + com.google.cloud.documentai.v1beta2.Document.TextChange other = + (com.google.cloud.documentai.v1beta2.Document.TextChange) obj; - if (!getPageRefsList().equals(other.getPageRefsList())) return false; + if (hasTextAnchor() != other.hasTextAnchor()) return false; + if (hasTextAnchor()) { + if (!getTextAnchor().equals(other.getTextAnchor())) return false; + } + if (!getChangedText().equals(other.getChangedText())) return false; + if (!getProvenanceList().equals(other.getProvenanceList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -37766,80 +64625,86 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (getPageRefsCount() > 0) { - hash = (37 * hash) + PAGE_REFS_FIELD_NUMBER; - hash = (53 * hash) + getPageRefsList().hashCode(); + if (hasTextAnchor()) { + hash = (37 * hash) + TEXT_ANCHOR_FIELD_NUMBER; + hash = (53 * hash) + getTextAnchor().hashCode(); + } + hash = (37 * hash) + CHANGED_TEXT_FIELD_NUMBER; + hash = (53 * hash) + getChangedText().hashCode(); + if (getProvenanceCount() > 0) { + hash = (37 * hash) + PROVENANCE_FIELD_NUMBER; + hash = (53 * hash) + getProvenanceList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.documentai.v1beta2.Document.PageAnchor parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.TextChange parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.documentai.v1beta2.Document.PageAnchor parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.TextChange 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.v1beta2.Document.PageAnchor parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.TextChange parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.documentai.v1beta2.Document.PageAnchor parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.TextChange 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.v1beta2.Document.PageAnchor parseFrom(byte[] data) + public static com.google.cloud.documentai.v1beta2.Document.TextChange parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.documentai.v1beta2.Document.PageAnchor parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.TextChange parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.documentai.v1beta2.Document.PageAnchor parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.TextChange parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.documentai.v1beta2.Document.PageAnchor parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.TextChange 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.v1beta2.Document.PageAnchor parseDelimitedFrom( + public static com.google.cloud.documentai.v1beta2.Document.TextChange parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.documentai.v1beta2.Document.PageAnchor parseDelimitedFrom( + public static com.google.cloud.documentai.v1beta2.Document.TextChange 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.v1beta2.Document.PageAnchor parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.TextChange parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.documentai.v1beta2.Document.PageAnchor parseFrom( + public static com.google.cloud.documentai.v1beta2.Document.TextChange parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -37857,7 +64722,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.documentai.v1beta2.Document.PageAnchor prototype) { + com.google.cloud.documentai.v1beta2.Document.TextChange prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -37876,32 +64741,32 @@ protected Builder newBuilderForType( * * *
-     * Referencing elements in [Document.pages][google.cloud.documentai.v1beta2.Document.pages].
+     * This message is used for text changes aka. OCR corrections.
      * 
* - * Protobuf type {@code google.cloud.documentai.v1beta2.Document.PageAnchor} + * Protobuf type {@code google.cloud.documentai.v1beta2.Document.TextChange} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.PageAnchor) - com.google.cloud.documentai.v1beta2.Document.PageAnchorOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta2.Document.TextChange) + com.google.cloud.documentai.v1beta2.Document.TextChangeOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_PageAnchor_descriptor; + .internal_static_google_cloud_documentai_v1beta2_Document_TextChange_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_PageAnchor_fieldAccessorTable + .internal_static_google_cloud_documentai_v1beta2_Document_TextChange_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1beta2.Document.PageAnchor.class, - com.google.cloud.documentai.v1beta2.Document.PageAnchor.Builder.class); + com.google.cloud.documentai.v1beta2.Document.TextChange.class, + com.google.cloud.documentai.v1beta2.Document.TextChange.Builder.class); } - // Construct using com.google.cloud.documentai.v1beta2.Document.PageAnchor.newBuilder() + // Construct using com.google.cloud.documentai.v1beta2.Document.TextChange.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { @@ -37912,30 +64777,36 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { public Builder clear() { super.clear(); bitField0_ = 0; - if (pageRefsBuilder_ == null) { - pageRefs_ = java.util.Collections.emptyList(); + textAnchor_ = null; + if (textAnchorBuilder_ != null) { + textAnchorBuilder_.dispose(); + textAnchorBuilder_ = null; + } + changedText_ = ""; + if (provenanceBuilder_ == null) { + provenance_ = java.util.Collections.emptyList(); } else { - pageRefs_ = null; - pageRefsBuilder_.clear(); + provenance_ = null; + provenanceBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.documentai.v1beta2.DocumentProto - .internal_static_google_cloud_documentai_v1beta2_Document_PageAnchor_descriptor; + .internal_static_google_cloud_documentai_v1beta2_Document_TextChange_descriptor; } @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.PageAnchor getDefaultInstanceForType() { - return com.google.cloud.documentai.v1beta2.Document.PageAnchor.getDefaultInstance(); + public com.google.cloud.documentai.v1beta2.Document.TextChange getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta2.Document.TextChange.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.PageAnchor build() { - com.google.cloud.documentai.v1beta2.Document.PageAnchor result = buildPartial(); + public com.google.cloud.documentai.v1beta2.Document.TextChange build() { + com.google.cloud.documentai.v1beta2.Document.TextChange result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -37943,9 +64814,9 @@ public com.google.cloud.documentai.v1beta2.Document.PageAnchor build() { } @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.PageAnchor buildPartial() { - com.google.cloud.documentai.v1beta2.Document.PageAnchor result = - new com.google.cloud.documentai.v1beta2.Document.PageAnchor(this); + public com.google.cloud.documentai.v1beta2.Document.TextChange buildPartial() { + com.google.cloud.documentai.v1beta2.Document.TextChange result = + new com.google.cloud.documentai.v1beta2.Document.TextChange(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); @@ -37955,20 +64826,27 @@ public com.google.cloud.documentai.v1beta2.Document.PageAnchor buildPartial() { } private void buildPartialRepeatedFields( - com.google.cloud.documentai.v1beta2.Document.PageAnchor result) { - if (pageRefsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - pageRefs_ = java.util.Collections.unmodifiableList(pageRefs_); - bitField0_ = (bitField0_ & ~0x00000001); + com.google.cloud.documentai.v1beta2.Document.TextChange result) { + if (provenanceBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + provenance_ = java.util.Collections.unmodifiableList(provenance_); + bitField0_ = (bitField0_ & ~0x00000004); } - result.pageRefs_ = pageRefs_; + result.provenance_ = provenance_; } else { - result.pageRefs_ = pageRefsBuilder_.build(); + result.provenance_ = provenanceBuilder_.build(); } } - private void buildPartial0(com.google.cloud.documentai.v1beta2.Document.PageAnchor result) { + private void buildPartial0(com.google.cloud.documentai.v1beta2.Document.TextChange result) { int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.textAnchor_ = + textAnchorBuilder_ == null ? textAnchor_ : textAnchorBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.changedText_ = changedText_; + } } @java.lang.Override @@ -38008,195 +64886,561 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.documentai.v1beta2.Document.PageAnchor) { - return mergeFrom((com.google.cloud.documentai.v1beta2.Document.PageAnchor) other); + if (other instanceof com.google.cloud.documentai.v1beta2.Document.TextChange) { + return mergeFrom((com.google.cloud.documentai.v1beta2.Document.TextChange) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.cloud.documentai.v1beta2.Document.PageAnchor other) { - if (other == com.google.cloud.documentai.v1beta2.Document.PageAnchor.getDefaultInstance()) + public Builder mergeFrom(com.google.cloud.documentai.v1beta2.Document.TextChange other) { + if (other == com.google.cloud.documentai.v1beta2.Document.TextChange.getDefaultInstance()) return this; - if (pageRefsBuilder_ == null) { - if (!other.pageRefs_.isEmpty()) { - if (pageRefs_.isEmpty()) { - pageRefs_ = other.pageRefs_; - bitField0_ = (bitField0_ & ~0x00000001); + if (other.hasTextAnchor()) { + mergeTextAnchor(other.getTextAnchor()); + } + if (!other.getChangedText().isEmpty()) { + changedText_ = other.changedText_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (provenanceBuilder_ == null) { + if (!other.provenance_.isEmpty()) { + if (provenance_.isEmpty()) { + provenance_ = other.provenance_; + bitField0_ = (bitField0_ & ~0x00000004); } else { - ensurePageRefsIsMutable(); - pageRefs_.addAll(other.pageRefs_); + ensureProvenanceIsMutable(); + provenance_.addAll(other.provenance_); } onChanged(); } } else { - if (!other.pageRefs_.isEmpty()) { - if (pageRefsBuilder_.isEmpty()) { - pageRefsBuilder_.dispose(); - pageRefsBuilder_ = null; - pageRefs_ = other.pageRefs_; - bitField0_ = (bitField0_ & ~0x00000001); - pageRefsBuilder_ = + if (!other.provenance_.isEmpty()) { + if (provenanceBuilder_.isEmpty()) { + provenanceBuilder_.dispose(); + provenanceBuilder_ = null; + provenance_ = other.provenance_; + bitField0_ = (bitField0_ & ~0x00000004); + provenanceBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getPageRefsFieldBuilder() + ? getProvenanceFieldBuilder() : null; } else { - pageRefsBuilder_.addAllMessages(other.pageRefs_); + provenanceBuilder_.addAllMessages(other.provenance_); } } } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getTextAnchorFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + changedText_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + com.google.cloud.documentai.v1beta2.Document.Provenance m = + input.readMessage( + com.google.cloud.documentai.v1beta2.Document.Provenance.parser(), + extensionRegistry); + if (provenanceBuilder_ == null) { + ensureProvenanceIsMutable(); + provenance_.add(m); + } else { + provenanceBuilder_.addMessage(m); + } + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.documentai.v1beta2.Document.TextAnchor textAnchor_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.TextAnchor, + com.google.cloud.documentai.v1beta2.Document.TextAnchor.Builder, + com.google.cloud.documentai.v1beta2.Document.TextAnchorOrBuilder> + textAnchorBuilder_; + /** + * + * + *
+       * Provenance of the correction.
+       * Text anchor indexing into the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].  There
+       * can only be a single `TextAnchor.text_segments` element.  If the start
+       * and end index of the text segment are the same, the text change is
+       * inserted before that index.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; + * + * @return Whether the textAnchor field is set. + */ + public boolean hasTextAnchor() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * Provenance of the correction.
+       * Text anchor indexing into the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].  There
+       * can only be a single `TextAnchor.text_segments` element.  If the start
+       * and end index of the text segment are the same, the text change is
+       * inserted before that index.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; + * + * @return The textAnchor. + */ + public com.google.cloud.documentai.v1beta2.Document.TextAnchor getTextAnchor() { + if (textAnchorBuilder_ == null) { + return textAnchor_ == null + ? com.google.cloud.documentai.v1beta2.Document.TextAnchor.getDefaultInstance() + : textAnchor_; + } else { + return textAnchorBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Provenance of the correction.
+       * Text anchor indexing into the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].  There
+       * can only be a single `TextAnchor.text_segments` element.  If the start
+       * and end index of the text segment are the same, the text change is
+       * inserted before that index.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; + */ + public Builder setTextAnchor(com.google.cloud.documentai.v1beta2.Document.TextAnchor value) { + if (textAnchorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + textAnchor_ = value; + } else { + textAnchorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Provenance of the correction.
+       * Text anchor indexing into the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].  There
+       * can only be a single `TextAnchor.text_segments` element.  If the start
+       * and end index of the text segment are the same, the text change is
+       * inserted before that index.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; + */ + public Builder setTextAnchor( + com.google.cloud.documentai.v1beta2.Document.TextAnchor.Builder builderForValue) { + if (textAnchorBuilder_ == null) { + textAnchor_ = builderForValue.build(); + } else { + textAnchorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Provenance of the correction.
+       * Text anchor indexing into the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].  There
+       * can only be a single `TextAnchor.text_segments` element.  If the start
+       * and end index of the text segment are the same, the text change is
+       * inserted before that index.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; + */ + public Builder mergeTextAnchor( + com.google.cloud.documentai.v1beta2.Document.TextAnchor value) { + if (textAnchorBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && textAnchor_ != null + && textAnchor_ + != com.google.cloud.documentai.v1beta2.Document.TextAnchor.getDefaultInstance()) { + getTextAnchorBuilder().mergeFrom(value); + } else { + textAnchor_ = value; + } + } else { + textAnchorBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Provenance of the correction.
+       * Text anchor indexing into the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].  There
+       * can only be a single `TextAnchor.text_segments` element.  If the start
+       * and end index of the text segment are the same, the text change is
+       * inserted before that index.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; + */ + public Builder clearTextAnchor() { + bitField0_ = (bitField0_ & ~0x00000001); + textAnchor_ = null; + if (textAnchorBuilder_ != null) { + textAnchorBuilder_.dispose(); + textAnchorBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Provenance of the correction.
+       * Text anchor indexing into the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].  There
+       * can only be a single `TextAnchor.text_segments` element.  If the start
+       * and end index of the text segment are the same, the text change is
+       * inserted before that index.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; + */ + public com.google.cloud.documentai.v1beta2.Document.TextAnchor.Builder + getTextAnchorBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getTextAnchorFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Provenance of the correction.
+       * Text anchor indexing into the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].  There
+       * can only be a single `TextAnchor.text_segments` element.  If the start
+       * and end index of the text segment are the same, the text change is
+       * inserted before that index.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; + */ + public com.google.cloud.documentai.v1beta2.Document.TextAnchorOrBuilder + getTextAnchorOrBuilder() { + if (textAnchorBuilder_ != null) { + return textAnchorBuilder_.getMessageOrBuilder(); + } else { + return textAnchor_ == null + ? com.google.cloud.documentai.v1beta2.Document.TextAnchor.getDefaultInstance() + : textAnchor_; + } + } + /** + * + * + *
+       * Provenance of the correction.
+       * Text anchor indexing into the
+       * [Document.text][google.cloud.documentai.v1beta2.Document.text].  There
+       * can only be a single `TextAnchor.text_segments` element.  If the start
+       * and end index of the text segment are the same, the text change is
+       * inserted before that index.
+       * 
+ * + * .google.cloud.documentai.v1beta2.Document.TextAnchor text_anchor = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.TextAnchor, + com.google.cloud.documentai.v1beta2.Document.TextAnchor.Builder, + com.google.cloud.documentai.v1beta2.Document.TextAnchorOrBuilder> + getTextAnchorFieldBuilder() { + if (textAnchorBuilder_ == null) { + textAnchorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.TextAnchor, + com.google.cloud.documentai.v1beta2.Document.TextAnchor.Builder, + com.google.cloud.documentai.v1beta2.Document.TextAnchorOrBuilder>( + getTextAnchor(), getParentForChildren(), isClean()); + textAnchor_ = null; + } + return textAnchorBuilder_; + } + + private java.lang.Object changedText_ = ""; + /** + * + * + *
+       * The text that replaces the text identified in the `text_anchor`.
+       * 
+ * + * string changed_text = 2; + * + * @return The changedText. + */ + public java.lang.String getChangedText() { + java.lang.Object ref = changedText_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + changedText_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The text that replaces the text identified in the `text_anchor`.
+       * 
+ * + * string changed_text = 2; + * + * @return The bytes for changedText. + */ + public com.google.protobuf.ByteString getChangedTextBytes() { + java.lang.Object ref = changedText_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + changedText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The text that replaces the text identified in the `text_anchor`.
+       * 
+ * + * string changed_text = 2; + * + * @param value The changedText to set. + * @return This builder for chaining. + */ + public Builder setChangedText(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + changedText_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } - - @java.lang.Override - public final boolean isInitialized() { - return true; + /** + * + * + *
+       * The text that replaces the text identified in the `text_anchor`.
+       * 
+ * + * string changed_text = 2; + * + * @return This builder for chaining. + */ + public Builder clearChangedText() { + changedText_ = getDefaultInstance().getChangedText(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); + /** + * + * + *
+       * The text that replaces the text identified in the `text_anchor`.
+       * 
+ * + * string changed_text = 2; + * + * @param value The bytes for changedText to set. + * @return This builder for chaining. + */ + public Builder setChangedTextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef m = - input.readMessage( - com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.parser(), - extensionRegistry); - if (pageRefsBuilder_ == null) { - ensurePageRefsIsMutable(); - pageRefs_.add(m); - } else { - pageRefsBuilder_.addMessage(m); - } - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally + checkByteStringIsUtf8(value); + changedText_ = value; + bitField0_ |= 0x00000002; + onChanged(); return this; } - private int bitField0_; - - private java.util.List - pageRefs_ = java.util.Collections.emptyList(); + private java.util.List provenance_ = + java.util.Collections.emptyList(); - private void ensurePageRefsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - pageRefs_ = - new java.util.ArrayList< - com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef>(pageRefs_); - bitField0_ |= 0x00000001; + private void ensureProvenanceIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + provenance_ = + new java.util.ArrayList( + provenance_); + bitField0_ |= 0x00000004; } } private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef, - com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.Builder, - com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRefOrBuilder> - pageRefsBuilder_; + com.google.cloud.documentai.v1beta2.Document.Provenance, + com.google.cloud.documentai.v1beta2.Document.Provenance.Builder, + com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder> + provenanceBuilder_; /** * * *
-       * One or more references to visual page elements
+       * The history of this annotation.
        * 
* - * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; + * + * repeated .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; * */ - public java.util.List - getPageRefsList() { - if (pageRefsBuilder_ == null) { - return java.util.Collections.unmodifiableList(pageRefs_); + @java.lang.Deprecated + public java.util.List + getProvenanceList() { + if (provenanceBuilder_ == null) { + return java.util.Collections.unmodifiableList(provenance_); } else { - return pageRefsBuilder_.getMessageList(); + return provenanceBuilder_.getMessageList(); } } /** * * *
-       * One or more references to visual page elements
+       * The history of this annotation.
        * 
* - * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; + * + * repeated .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; * */ - public int getPageRefsCount() { - if (pageRefsBuilder_ == null) { - return pageRefs_.size(); + @java.lang.Deprecated + public int getProvenanceCount() { + if (provenanceBuilder_ == null) { + return provenance_.size(); } else { - return pageRefsBuilder_.getCount(); + return provenanceBuilder_.getCount(); } } /** * * *
-       * One or more references to visual page elements
+       * The history of this annotation.
        * 
* - * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; + * + * repeated .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; * */ - public com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef getPageRefs( - int index) { - if (pageRefsBuilder_ == null) { - return pageRefs_.get(index); + @java.lang.Deprecated + public com.google.cloud.documentai.v1beta2.Document.Provenance getProvenance(int index) { + if (provenanceBuilder_ == null) { + return provenance_.get(index); } else { - return pageRefsBuilder_.getMessage(index); + return provenanceBuilder_.getMessage(index); } } /** * * *
-       * One or more references to visual page elements
+       * The history of this annotation.
        * 
* - * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; + * + * repeated .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; * */ - public Builder setPageRefs( - int index, com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef value) { - if (pageRefsBuilder_ == null) { + @java.lang.Deprecated + public Builder setProvenance( + int index, com.google.cloud.documentai.v1beta2.Document.Provenance value) { + if (provenanceBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensurePageRefsIsMutable(); - pageRefs_.set(index, value); + ensureProvenanceIsMutable(); + provenance_.set(index, value); onChanged(); } else { - pageRefsBuilder_.setMessage(index, value); + provenanceBuilder_.setMessage(index, value); } return this; } @@ -38204,21 +65448,23 @@ public Builder setPageRefs( * * *
-       * One or more references to visual page elements
+       * The history of this annotation.
        * 
* - * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; + * + * repeated .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; * */ - public Builder setPageRefs( + @java.lang.Deprecated + public Builder setProvenance( int index, - com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.Builder builderForValue) { - if (pageRefsBuilder_ == null) { - ensurePageRefsIsMutable(); - pageRefs_.set(index, builderForValue.build()); + com.google.cloud.documentai.v1beta2.Document.Provenance.Builder builderForValue) { + if (provenanceBuilder_ == null) { + ensureProvenanceIsMutable(); + provenance_.set(index, builderForValue.build()); onChanged(); } else { - pageRefsBuilder_.setMessage(index, builderForValue.build()); + provenanceBuilder_.setMessage(index, builderForValue.build()); } return this; } @@ -38226,23 +65472,24 @@ public Builder setPageRefs( * * *
-       * One or more references to visual page elements
+       * The history of this annotation.
        * 
* - * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; + * + * repeated .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; * */ - public Builder addPageRefs( - com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef value) { - if (pageRefsBuilder_ == null) { + @java.lang.Deprecated + public Builder addProvenance(com.google.cloud.documentai.v1beta2.Document.Provenance value) { + if (provenanceBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensurePageRefsIsMutable(); - pageRefs_.add(value); + ensureProvenanceIsMutable(); + provenance_.add(value); onChanged(); } else { - pageRefsBuilder_.addMessage(value); + provenanceBuilder_.addMessage(value); } return this; } @@ -38250,23 +65497,25 @@ public Builder addPageRefs( * * *
-       * One or more references to visual page elements
+       * The history of this annotation.
        * 
* - * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; + * + * repeated .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; * */ - public Builder addPageRefs( - int index, com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef value) { - if (pageRefsBuilder_ == null) { + @java.lang.Deprecated + public Builder addProvenance( + int index, com.google.cloud.documentai.v1beta2.Document.Provenance value) { + if (provenanceBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensurePageRefsIsMutable(); - pageRefs_.add(index, value); + ensureProvenanceIsMutable(); + provenance_.add(index, value); onChanged(); } else { - pageRefsBuilder_.addMessage(index, value); + provenanceBuilder_.addMessage(index, value); } return this; } @@ -38274,20 +65523,22 @@ public Builder addPageRefs( * * *
-       * One or more references to visual page elements
+       * The history of this annotation.
        * 
* - * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; + * + * repeated .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; * */ - public Builder addPageRefs( - com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.Builder builderForValue) { - if (pageRefsBuilder_ == null) { - ensurePageRefsIsMutable(); - pageRefs_.add(builderForValue.build()); + @java.lang.Deprecated + public Builder addProvenance( + com.google.cloud.documentai.v1beta2.Document.Provenance.Builder builderForValue) { + if (provenanceBuilder_ == null) { + ensureProvenanceIsMutable(); + provenance_.add(builderForValue.build()); onChanged(); } else { - pageRefsBuilder_.addMessage(builderForValue.build()); + provenanceBuilder_.addMessage(builderForValue.build()); } return this; } @@ -38295,21 +65546,23 @@ public Builder addPageRefs( * * *
-       * One or more references to visual page elements
+       * The history of this annotation.
        * 
* - * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; + * + * repeated .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; * */ - public Builder addPageRefs( + @java.lang.Deprecated + public Builder addProvenance( int index, - com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.Builder builderForValue) { - if (pageRefsBuilder_ == null) { - ensurePageRefsIsMutable(); - pageRefs_.add(index, builderForValue.build()); + com.google.cloud.documentai.v1beta2.Document.Provenance.Builder builderForValue) { + if (provenanceBuilder_ == null) { + ensureProvenanceIsMutable(); + provenance_.add(index, builderForValue.build()); onChanged(); } else { - pageRefsBuilder_.addMessage(index, builderForValue.build()); + provenanceBuilder_.addMessage(index, builderForValue.build()); } return this; } @@ -38317,22 +65570,23 @@ public Builder addPageRefs( * * *
-       * One or more references to visual page elements
+       * The history of this annotation.
        * 
* - * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; + * + * repeated .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; * */ - public Builder addAllPageRefs( - java.lang.Iterable< - ? extends com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef> + @java.lang.Deprecated + public Builder addAllProvenance( + java.lang.Iterable values) { - if (pageRefsBuilder_ == null) { - ensurePageRefsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, pageRefs_); + if (provenanceBuilder_ == null) { + ensureProvenanceIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, provenance_); onChanged(); } else { - pageRefsBuilder_.addAllMessages(values); + provenanceBuilder_.addAllMessages(values); } return this; } @@ -38340,19 +65594,21 @@ public Builder addAllPageRefs( * * *
-       * One or more references to visual page elements
+       * The history of this annotation.
        * 
* - * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; + * + * repeated .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; * */ - public Builder clearPageRefs() { - if (pageRefsBuilder_ == null) { - pageRefs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + @java.lang.Deprecated + public Builder clearProvenance() { + if (provenanceBuilder_ == null) { + provenance_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { - pageRefsBuilder_.clear(); + provenanceBuilder_.clear(); } return this; } @@ -38360,19 +65616,21 @@ public Builder clearPageRefs() { * * *
-       * One or more references to visual page elements
+       * The history of this annotation.
        * 
* - * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; + * + * repeated .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; * */ - public Builder removePageRefs(int index) { - if (pageRefsBuilder_ == null) { - ensurePageRefsIsMutable(); - pageRefs_.remove(index); + @java.lang.Deprecated + public Builder removeProvenance(int index) { + if (provenanceBuilder_ == null) { + ensureProvenanceIsMutable(); + provenance_.remove(index); onChanged(); } else { - pageRefsBuilder_.remove(index); + provenanceBuilder_.remove(index); } return this; } @@ -38380,118 +65638,128 @@ public Builder removePageRefs(int index) { * * *
-       * One or more references to visual page elements
+       * The history of this annotation.
        * 
* - * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; + * + * repeated .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; * */ - public com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.Builder - getPageRefsBuilder(int index) { - return getPageRefsFieldBuilder().getBuilder(index); + @java.lang.Deprecated + public com.google.cloud.documentai.v1beta2.Document.Provenance.Builder getProvenanceBuilder( + int index) { + return getProvenanceFieldBuilder().getBuilder(index); } /** * * *
-       * One or more references to visual page elements
+       * The history of this annotation.
        * 
* - * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; + * + * repeated .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; * */ - public com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRefOrBuilder - getPageRefsOrBuilder(int index) { - if (pageRefsBuilder_ == null) { - return pageRefs_.get(index); + @java.lang.Deprecated + public com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder + getProvenanceOrBuilder(int index) { + if (provenanceBuilder_ == null) { + return provenance_.get(index); } else { - return pageRefsBuilder_.getMessageOrBuilder(index); + return provenanceBuilder_.getMessageOrBuilder(index); } } /** * * *
-       * One or more references to visual page elements
+       * The history of this annotation.
        * 
* - * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; + * + * repeated .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; * */ + @java.lang.Deprecated public java.util.List< - ? extends com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRefOrBuilder> - getPageRefsOrBuilderList() { - if (pageRefsBuilder_ != null) { - return pageRefsBuilder_.getMessageOrBuilderList(); + ? extends com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder> + getProvenanceOrBuilderList() { + if (provenanceBuilder_ != null) { + return provenanceBuilder_.getMessageOrBuilderList(); } else { - return java.util.Collections.unmodifiableList(pageRefs_); + return java.util.Collections.unmodifiableList(provenance_); } } /** * * *
-       * One or more references to visual page elements
+       * The history of this annotation.
        * 
* - * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; + * + * repeated .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; * */ - public com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.Builder - addPageRefsBuilder() { - return getPageRefsFieldBuilder() + @java.lang.Deprecated + public com.google.cloud.documentai.v1beta2.Document.Provenance.Builder + addProvenanceBuilder() { + return getProvenanceFieldBuilder() .addBuilder( - com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef - .getDefaultInstance()); + com.google.cloud.documentai.v1beta2.Document.Provenance.getDefaultInstance()); } /** * * *
-       * One or more references to visual page elements
+       * The history of this annotation.
        * 
* - * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; + * + * repeated .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; * */ - public com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.Builder - addPageRefsBuilder(int index) { - return getPageRefsFieldBuilder() + @java.lang.Deprecated + public com.google.cloud.documentai.v1beta2.Document.Provenance.Builder addProvenanceBuilder( + int index) { + return getProvenanceFieldBuilder() .addBuilder( index, - com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef - .getDefaultInstance()); + com.google.cloud.documentai.v1beta2.Document.Provenance.getDefaultInstance()); } /** * * *
-       * One or more references to visual page elements
+       * The history of this annotation.
        * 
* - * repeated .google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef page_refs = 1; + * + * repeated .google.cloud.documentai.v1beta2.Document.Provenance provenance = 3 [deprecated = true]; * */ - public java.util.List - getPageRefsBuilderList() { - return getPageRefsFieldBuilder().getBuilderList(); + @java.lang.Deprecated + public java.util.List + getProvenanceBuilderList() { + return getProvenanceFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef, - com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.Builder, - com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRefOrBuilder> - getPageRefsFieldBuilder() { - if (pageRefsBuilder_ == null) { - pageRefsBuilder_ = + com.google.cloud.documentai.v1beta2.Document.Provenance, + com.google.cloud.documentai.v1beta2.Document.Provenance.Builder, + com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder> + getProvenanceFieldBuilder() { + if (provenanceBuilder_ == null) { + provenanceBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef, - com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.Builder, - com.google.cloud.documentai.v1beta2.Document.PageAnchor.PageRefOrBuilder>( - pageRefs_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - pageRefs_ = null; + com.google.cloud.documentai.v1beta2.Document.Provenance, + com.google.cloud.documentai.v1beta2.Document.Provenance.Builder, + com.google.cloud.documentai.v1beta2.Document.ProvenanceOrBuilder>( + provenance_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + provenance_ = null; } - return pageRefsBuilder_; + return provenanceBuilder_; } @java.lang.Override @@ -38506,24 +65774,24 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta2.Document.PageAnchor) + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta2.Document.TextChange) } - // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.PageAnchor) - private static final com.google.cloud.documentai.v1beta2.Document.PageAnchor DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta2.Document.TextChange) + private static final com.google.cloud.documentai.v1beta2.Document.TextChange DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta2.Document.PageAnchor(); + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta2.Document.TextChange(); } - public static com.google.cloud.documentai.v1beta2.Document.PageAnchor getDefaultInstance() { + public static com.google.cloud.documentai.v1beta2.Document.TextChange getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public PageAnchor parsePartialFrom( + public TextChange parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -38543,17 +65811,17 @@ public PageAnchor parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.documentai.v1beta2.Document.PageAnchor getDefaultInstanceForType() { + public com.google.cloud.documentai.v1beta2.Document.TextChange getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } @@ -38612,14 +65880,13 @@ public SourceCase getSourceCase() { * * *
-   * Currently supports Google Cloud Storage URI of the form
-   *    `gs://bucket_name/object_name`. Object versioning is not supported.
-   *    See [Google Cloud Storage Request
-   *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
-   *    info.
+   * Optional. Currently supports Google Cloud Storage URI of the form
+   * `gs://bucket_name/object_name`. Object versioning is not supported.
+   * For more information, refer to [Google Cloud Storage Request
+   * URIs](https://cloud.google.com/storage/docs/reference-uris).
    * 
* - * string uri = 1; + * string uri = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return Whether the uri field is set. */ @@ -38630,14 +65897,13 @@ public boolean hasUri() { * * *
-   * Currently supports Google Cloud Storage URI of the form
-   *    `gs://bucket_name/object_name`. Object versioning is not supported.
-   *    See [Google Cloud Storage Request
-   *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
-   *    info.
+   * Optional. Currently supports Google Cloud Storage URI of the form
+   * `gs://bucket_name/object_name`. Object versioning is not supported.
+   * For more information, refer to [Google Cloud Storage Request
+   * URIs](https://cloud.google.com/storage/docs/reference-uris).
    * 
* - * string uri = 1; + * string uri = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The uri. */ @@ -38661,14 +65927,13 @@ public java.lang.String getUri() { * * *
-   * Currently supports Google Cloud Storage URI of the form
-   *    `gs://bucket_name/object_name`. Object versioning is not supported.
-   *    See [Google Cloud Storage Request
-   *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
-   *    info.
+   * Optional. Currently supports Google Cloud Storage URI of the form
+   * `gs://bucket_name/object_name`. Object versioning is not supported.
+   * For more information, refer to [Google Cloud Storage Request
+   * URIs](https://cloud.google.com/storage/docs/reference-uris).
    * 
* - * string uri = 1; + * string uri = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for uri. */ @@ -38694,12 +65959,12 @@ public com.google.protobuf.ByteString getUriBytes() { * * *
-   * Inline document content, represented as a stream of bytes.
+   * Optional. Inline document content, represented as a stream of bytes.
    * Note: As with all `bytes` fields, protobuffers use a pure binary
    * representation, whereas JSON representations use base64.
    * 
* - * bytes content = 2; + * bytes content = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return Whether the content field is set. */ @@ -38711,12 +65976,12 @@ public boolean hasContent() { * * *
-   * Inline document content, represented as a stream of bytes.
+   * Optional. Inline document content, represented as a stream of bytes.
    * Note: As with all `bytes` fields, protobuffers use a pure binary
    * representation, whereas JSON representations use base64.
    * 
* - * bytes content = 2; + * bytes content = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The content. */ @@ -38736,9 +66001,8 @@ public com.google.protobuf.ByteString getContent() { * * *
-   * An IANA published MIME type (also referred to as media type). For more
-   * information, see
-   * https://www.iana.org/assignments/media-types/media-types.xhtml.
+   * An IANA published [media type (MIME
+   * type)](https://www.iana.org/assignments/media-types/media-types.xhtml).
    * 
* * string mime_type = 3; @@ -38761,9 +66025,8 @@ public java.lang.String getMimeType() { * * *
-   * An IANA published MIME type (also referred to as media type). For more
-   * information, see
-   * https://www.iana.org/assignments/media-types/media-types.xhtml.
+   * An IANA published [media type (MIME
+   * type)](https://www.iana.org/assignments/media-types/media-types.xhtml).
    * 
* * string mime_type = 3; @@ -38791,10 +66054,10 @@ public com.google.protobuf.ByteString getMimeTypeBytes() { * * *
-   * UTF-8 encoded text in reading order from the document.
+   * Optional. UTF-8 encoded text in reading order from the document.
    * 
* - * string text = 4; + * string text = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The text. */ @@ -38814,10 +66077,10 @@ public java.lang.String getText() { * * *
-   * UTF-8 encoded text in reading order from the document.
+   * Optional. UTF-8 encoded text in reading order from the document.
    * 
* - * string text = 4; + * string text = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for text. */ @@ -38842,12 +66105,16 @@ public com.google.protobuf.ByteString getTextBytes() { * * *
-   * Styles for the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+   * Styles for the
+   * [Document.text][google.cloud.documentai.v1beta2.Document.text].
    * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5; + * + * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5 [deprecated = true]; + * */ @java.lang.Override + @java.lang.Deprecated public java.util.List getTextStylesList() { return textStyles_; } @@ -38855,12 +66122,16 @@ public java.util.List getTex * * *
-   * Styles for the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+   * Styles for the
+   * [Document.text][google.cloud.documentai.v1beta2.Document.text].
    * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5; + * + * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5 [deprecated = true]; + * */ @java.lang.Override + @java.lang.Deprecated public java.util.List getTextStylesOrBuilderList() { return textStyles_; @@ -38869,12 +66140,16 @@ public java.util.List getTex * * *
-   * Styles for the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+   * Styles for the
+   * [Document.text][google.cloud.documentai.v1beta2.Document.text].
    * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5; + * + * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5 [deprecated = true]; + * */ @java.lang.Override + @java.lang.Deprecated public int getTextStylesCount() { return textStyles_.size(); } @@ -38882,12 +66157,16 @@ public int getTextStylesCount() { * * *
-   * Styles for the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+   * Styles for the
+   * [Document.text][google.cloud.documentai.v1beta2.Document.text].
    * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5; + * + * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5 [deprecated = true]; + * */ @java.lang.Override + @java.lang.Deprecated public com.google.cloud.documentai.v1beta2.Document.Style getTextStyles(int index) { return textStyles_.get(index); } @@ -38895,12 +66174,16 @@ public com.google.cloud.documentai.v1beta2.Document.Style getTextStyles(int inde * * *
-   * Styles for the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+   * Styles for the
+   * [Document.text][google.cloud.documentai.v1beta2.Document.text].
    * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5; + * + * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5 [deprecated = true]; + * */ @java.lang.Override + @java.lang.Deprecated public com.google.cloud.documentai.v1beta2.Document.StyleOrBuilder getTextStylesOrBuilder( int index) { return textStyles_.get(index); @@ -38914,7 +66197,8 @@ public com.google.cloud.documentai.v1beta2.Document.StyleOrBuilder getTextStyles * * *
-   * Visual page layout for the [Document][google.cloud.documentai.v1beta2.Document].
+   * Visual page layout for the
+   * [Document][google.cloud.documentai.v1beta2.Document].
    * 
* * repeated .google.cloud.documentai.v1beta2.Document.Page pages = 6; @@ -38927,7 +66211,8 @@ public java.util.List getPage * * *
-   * Visual page layout for the [Document][google.cloud.documentai.v1beta2.Document].
+   * Visual page layout for the
+   * [Document][google.cloud.documentai.v1beta2.Document].
    * 
* * repeated .google.cloud.documentai.v1beta2.Document.Page pages = 6; @@ -38941,7 +66226,8 @@ public java.util.List getPage * * *
-   * Visual page layout for the [Document][google.cloud.documentai.v1beta2.Document].
+   * Visual page layout for the
+   * [Document][google.cloud.documentai.v1beta2.Document].
    * 
* * repeated .google.cloud.documentai.v1beta2.Document.Page pages = 6; @@ -38954,7 +66240,8 @@ public int getPagesCount() { * * *
-   * Visual page layout for the [Document][google.cloud.documentai.v1beta2.Document].
+   * Visual page layout for the
+   * [Document][google.cloud.documentai.v1beta2.Document].
    * 
* * repeated .google.cloud.documentai.v1beta2.Document.Page pages = 6; @@ -38967,7 +66254,8 @@ public com.google.cloud.documentai.v1beta2.Document.Page getPages(int index) { * * *
-   * Visual page layout for the [Document][google.cloud.documentai.v1beta2.Document].
+   * Visual page layout for the
+   * [Document][google.cloud.documentai.v1beta2.Document].
    * 
* * repeated .google.cloud.documentai.v1beta2.Document.Page pages = 6; @@ -38985,8 +66273,9 @@ public com.google.cloud.documentai.v1beta2.Document.PageOrBuilder getPagesOrBuil * * *
-   * A list of entities detected on [Document.text][google.cloud.documentai.v1beta2.Document.text]. For document shards,
-   * entities in this list may cross shard boundaries.
+   * A list of entities detected on
+   * [Document.text][google.cloud.documentai.v1beta2.Document.text]. For
+   * document shards, entities in this list may cross shard boundaries.
    * 
* * repeated .google.cloud.documentai.v1beta2.Document.Entity entities = 7; @@ -38999,8 +66288,9 @@ public java.util.List getEn * * *
-   * A list of entities detected on [Document.text][google.cloud.documentai.v1beta2.Document.text]. For document shards,
-   * entities in this list may cross shard boundaries.
+   * A list of entities detected on
+   * [Document.text][google.cloud.documentai.v1beta2.Document.text]. For
+   * document shards, entities in this list may cross shard boundaries.
    * 
* * repeated .google.cloud.documentai.v1beta2.Document.Entity entities = 7; @@ -39014,8 +66304,9 @@ public java.util.List getEn * * *
-   * A list of entities detected on [Document.text][google.cloud.documentai.v1beta2.Document.text]. For document shards,
-   * entities in this list may cross shard boundaries.
+   * A list of entities detected on
+   * [Document.text][google.cloud.documentai.v1beta2.Document.text]. For
+   * document shards, entities in this list may cross shard boundaries.
    * 
* * repeated .google.cloud.documentai.v1beta2.Document.Entity entities = 7; @@ -39028,8 +66319,9 @@ public int getEntitiesCount() { * * *
-   * A list of entities detected on [Document.text][google.cloud.documentai.v1beta2.Document.text]. For document shards,
-   * entities in this list may cross shard boundaries.
+   * A list of entities detected on
+   * [Document.text][google.cloud.documentai.v1beta2.Document.text]. For
+   * document shards, entities in this list may cross shard boundaries.
    * 
* * repeated .google.cloud.documentai.v1beta2.Document.Entity entities = 7; @@ -39042,8 +66334,9 @@ public com.google.cloud.documentai.v1beta2.Document.Entity getEntities(int index * * *
-   * A list of entities detected on [Document.text][google.cloud.documentai.v1beta2.Document.text]. For document shards,
-   * entities in this list may cross shard boundaries.
+   * A list of entities detected on
+   * [Document.text][google.cloud.documentai.v1beta2.Document.text]. For
+   * document shards, entities in this list may cross shard boundaries.
    * 
* * repeated .google.cloud.documentai.v1beta2.Document.Entity entities = 7; @@ -39063,7 +66356,8 @@ public com.google.cloud.documentai.v1beta2.Document.EntityOrBuilder getEntitiesO * * *
-   * Relationship among [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
+   * Placeholder.  Relationship among
+   * [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
    * 
* * repeated .google.cloud.documentai.v1beta2.Document.EntityRelation entity_relations = 8; @@ -39078,7 +66372,8 @@ public com.google.cloud.documentai.v1beta2.Document.EntityOrBuilder getEntitiesO * * *
-   * Relationship among [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
+   * Placeholder.  Relationship among
+   * [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
    * 
* * repeated .google.cloud.documentai.v1beta2.Document.EntityRelation entity_relations = 8; @@ -39094,7 +66389,8 @@ public com.google.cloud.documentai.v1beta2.Document.EntityOrBuilder getEntitiesO * * *
-   * Relationship among [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
+   * Placeholder.  Relationship among
+   * [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
    * 
* * repeated .google.cloud.documentai.v1beta2.Document.EntityRelation entity_relations = 8; @@ -39108,7 +66404,8 @@ public int getEntityRelationsCount() { * * *
-   * Relationship among [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
+   * Placeholder.  Relationship among
+   * [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
    * 
* * repeated .google.cloud.documentai.v1beta2.Document.EntityRelation entity_relations = 8; @@ -39122,7 +66419,8 @@ public com.google.cloud.documentai.v1beta2.Document.EntityRelation getEntityRela * * *
-   * Relationship among [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
+   * Placeholder.  Relationship among
+   * [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
    * 
* * repeated .google.cloud.documentai.v1beta2.Document.EntityRelation entity_relations = 8; @@ -39134,6 +66432,94 @@ public com.google.cloud.documentai.v1beta2.Document.EntityRelation getEntityRela return entityRelations_.get(index); } + public static final int TEXT_CHANGES_FIELD_NUMBER = 14; + + @SuppressWarnings("serial") + private java.util.List textChanges_; + /** + * + * + *
+   * Placeholder.  A list of text corrections made to
+   * [Document.text][google.cloud.documentai.v1beta2.Document.text].  This is
+   * usually used for annotating corrections to OCR mistakes.  Text changes for
+   * a given revision may not overlap with each other.
+   * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.TextChange text_changes = 14; + */ + @java.lang.Override + public java.util.List + getTextChangesList() { + return textChanges_; + } + /** + * + * + *
+   * Placeholder.  A list of text corrections made to
+   * [Document.text][google.cloud.documentai.v1beta2.Document.text].  This is
+   * usually used for annotating corrections to OCR mistakes.  Text changes for
+   * a given revision may not overlap with each other.
+   * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.TextChange text_changes = 14; + */ + @java.lang.Override + public java.util.List + getTextChangesOrBuilderList() { + return textChanges_; + } + /** + * + * + *
+   * Placeholder.  A list of text corrections made to
+   * [Document.text][google.cloud.documentai.v1beta2.Document.text].  This is
+   * usually used for annotating corrections to OCR mistakes.  Text changes for
+   * a given revision may not overlap with each other.
+   * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.TextChange text_changes = 14; + */ + @java.lang.Override + public int getTextChangesCount() { + return textChanges_.size(); + } + /** + * + * + *
+   * Placeholder.  A list of text corrections made to
+   * [Document.text][google.cloud.documentai.v1beta2.Document.text].  This is
+   * usually used for annotating corrections to OCR mistakes.  Text changes for
+   * a given revision may not overlap with each other.
+   * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.TextChange text_changes = 14; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.TextChange getTextChanges(int index) { + return textChanges_.get(index); + } + /** + * + * + *
+   * Placeholder.  A list of text corrections made to
+   * [Document.text][google.cloud.documentai.v1beta2.Document.text].  This is
+   * usually used for annotating corrections to OCR mistakes.  Text changes for
+   * a given revision may not overlap with each other.
+   * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.TextChange text_changes = 14; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.TextChangeOrBuilder getTextChangesOrBuilder( + int index) { + return textChanges_.get(index); + } + public static final int SHARD_INFO_FIELD_NUMBER = 9; private com.google.cloud.documentai.v1beta2.Document.ShardInfo shardInfo_; /** @@ -39304,6 +66690,78 @@ public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; } + public static final int REVISIONS_FIELD_NUMBER = 13; + + @SuppressWarnings("serial") + private java.util.List revisions_; + /** + * + * + *
+   * Placeholder. Revision history of this document.
+   * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Revision revisions = 13; + */ + @java.lang.Override + public java.util.List getRevisionsList() { + return revisions_; + } + /** + * + * + *
+   * Placeholder. Revision history of this document.
+   * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Revision revisions = 13; + */ + @java.lang.Override + public java.util.List + getRevisionsOrBuilderList() { + return revisions_; + } + /** + * + * + *
+   * Placeholder. Revision history of this document.
+   * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Revision revisions = 13; + */ + @java.lang.Override + public int getRevisionsCount() { + return revisions_.size(); + } + /** + * + * + *
+   * Placeholder. Revision history of this document.
+   * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Revision revisions = 13; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.Revision getRevisions(int index) { + return revisions_.get(index); + } + /** + * + * + *
+   * Placeholder. Revision history of this document.
+   * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Revision revisions = 13; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta2.Document.RevisionOrBuilder getRevisionsOrBuilder( + int index) { + return revisions_.get(index); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -39351,6 +66809,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < labels_.size(); i++) { output.writeMessage(11, labels_.get(i)); } + for (int i = 0; i < revisions_.size(); i++) { + output.writeMessage(13, revisions_.get(i)); + } + for (int i = 0; i < textChanges_.size(); i++) { + output.writeMessage(14, textChanges_.get(i)); + } getUnknownFields().writeTo(output); } @@ -39395,6 +66859,12 @@ public int getSerializedSize() { for (int i = 0; i < labels_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, labels_.get(i)); } + for (int i = 0; i < revisions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, revisions_.get(i)); + } + for (int i = 0; i < textChanges_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, textChanges_.get(i)); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -39417,6 +66887,7 @@ public boolean equals(final java.lang.Object obj) { if (!getPagesList().equals(other.getPagesList())) return false; if (!getEntitiesList().equals(other.getEntitiesList())) return false; if (!getEntityRelationsList().equals(other.getEntityRelationsList())) return false; + if (!getTextChangesList().equals(other.getTextChangesList())) return false; if (hasShardInfo() != other.hasShardInfo()) return false; if (hasShardInfo()) { if (!getShardInfo().equals(other.getShardInfo())) return false; @@ -39426,6 +66897,7 @@ public boolean equals(final java.lang.Object obj) { if (hasError()) { if (!getError().equals(other.getError())) return false; } + if (!getRevisionsList().equals(other.getRevisionsList())) return false; if (!getSourceCase().equals(other.getSourceCase())) return false; switch (sourceCase_) { case 1: @@ -39468,6 +66940,10 @@ public int hashCode() { hash = (37 * hash) + ENTITY_RELATIONS_FIELD_NUMBER; hash = (53 * hash) + getEntityRelationsList().hashCode(); } + if (getTextChangesCount() > 0) { + hash = (37 * hash) + TEXT_CHANGES_FIELD_NUMBER; + hash = (53 * hash) + getTextChangesList().hashCode(); + } if (hasShardInfo()) { hash = (37 * hash) + SHARD_INFO_FIELD_NUMBER; hash = (53 * hash) + getShardInfo().hashCode(); @@ -39480,6 +66956,10 @@ public int hashCode() { hash = (37 * hash) + ERROR_FIELD_NUMBER; hash = (53 * hash) + getError().hashCode(); } + if (getRevisionsCount() > 0) { + hash = (37 * hash) + REVISIONS_FIELD_NUMBER; + hash = (53 * hash) + getRevisionsList().hashCode(); + } switch (sourceCase_) { case 1: hash = (37 * hash) + URI_FIELD_NUMBER; @@ -39596,11 +67076,10 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * 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.
+   * Document represents the canonical document resource in Document AI. It is an
+   * interchange format that provides insights into documents and allows for
+   * collaboration between users and Document AI to iterate and optimize for
+   * quality.
    * 
* * Protobuf type {@code google.cloud.documentai.v1beta2.Document} @@ -39665,6 +67144,13 @@ public Builder clear() { entityRelationsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000080); + if (textChangesBuilder_ == null) { + textChanges_ = java.util.Collections.emptyList(); + } else { + textChanges_ = null; + textChangesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000100); shardInfo_ = null; if (shardInfoBuilder_ != null) { shardInfoBuilder_.dispose(); @@ -39676,12 +67162,19 @@ public Builder clear() { labels_ = null; labelsBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000400); error_ = null; if (errorBuilder_ != null) { errorBuilder_.dispose(); errorBuilder_ = null; } + if (revisionsBuilder_ == null) { + revisions_ = java.util.Collections.emptyList(); + } else { + revisions_ = null; + revisionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00001000); sourceCase_ = 0; source_ = null; return this; @@ -39757,15 +67250,33 @@ private void buildPartialRepeatedFields(com.google.cloud.documentai.v1beta2.Docu } else { result.entityRelations_ = entityRelationsBuilder_.build(); } + if (textChangesBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0)) { + textChanges_ = java.util.Collections.unmodifiableList(textChanges_); + bitField0_ = (bitField0_ & ~0x00000100); + } + result.textChanges_ = textChanges_; + } else { + result.textChanges_ = textChangesBuilder_.build(); + } if (labelsBuilder_ == null) { - if (((bitField0_ & 0x00000200) != 0)) { + if (((bitField0_ & 0x00000400) != 0)) { labels_ = java.util.Collections.unmodifiableList(labels_); - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000400); } result.labels_ = labels_; } else { result.labels_ = labelsBuilder_.build(); } + if (revisionsBuilder_ == null) { + if (((bitField0_ & 0x00001000) != 0)) { + revisions_ = java.util.Collections.unmodifiableList(revisions_); + bitField0_ = (bitField0_ & ~0x00001000); + } + result.revisions_ = revisions_; + } else { + result.revisions_ = revisionsBuilder_.build(); + } } private void buildPartial0(com.google.cloud.documentai.v1beta2.Document result) { @@ -39776,10 +67287,10 @@ private void buildPartial0(com.google.cloud.documentai.v1beta2.Document result) if (((from_bitField0_ & 0x00000008) != 0)) { result.text_ = text_; } - if (((from_bitField0_ & 0x00000100) != 0)) { + if (((from_bitField0_ & 0x00000200) != 0)) { result.shardInfo_ = shardInfoBuilder_ == null ? shardInfo_ : shardInfoBuilder_.build(); } - if (((from_bitField0_ & 0x00000400) != 0)) { + if (((from_bitField0_ & 0x00000800) != 0)) { result.error_ = errorBuilder_ == null ? error_ : errorBuilder_.build(); } } @@ -39952,6 +67463,33 @@ public Builder mergeFrom(com.google.cloud.documentai.v1beta2.Document other) { } } } + if (textChangesBuilder_ == null) { + if (!other.textChanges_.isEmpty()) { + if (textChanges_.isEmpty()) { + textChanges_ = other.textChanges_; + bitField0_ = (bitField0_ & ~0x00000100); + } else { + ensureTextChangesIsMutable(); + textChanges_.addAll(other.textChanges_); + } + onChanged(); + } + } else { + if (!other.textChanges_.isEmpty()) { + if (textChangesBuilder_.isEmpty()) { + textChangesBuilder_.dispose(); + textChangesBuilder_ = null; + textChanges_ = other.textChanges_; + bitField0_ = (bitField0_ & ~0x00000100); + textChangesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTextChangesFieldBuilder() + : null; + } else { + textChangesBuilder_.addAllMessages(other.textChanges_); + } + } + } if (other.hasShardInfo()) { mergeShardInfo(other.getShardInfo()); } @@ -39959,7 +67497,7 @@ public Builder mergeFrom(com.google.cloud.documentai.v1beta2.Document other) { if (!other.labels_.isEmpty()) { if (labels_.isEmpty()) { labels_ = other.labels_; - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000400); } else { ensureLabelsIsMutable(); labels_.addAll(other.labels_); @@ -39972,7 +67510,7 @@ public Builder mergeFrom(com.google.cloud.documentai.v1beta2.Document other) { labelsBuilder_.dispose(); labelsBuilder_ = null; labels_ = other.labels_; - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000400); labelsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getLabelsFieldBuilder() @@ -39985,6 +67523,33 @@ public Builder mergeFrom(com.google.cloud.documentai.v1beta2.Document other) { if (other.hasError()) { mergeError(other.getError()); } + if (revisionsBuilder_ == null) { + if (!other.revisions_.isEmpty()) { + if (revisions_.isEmpty()) { + revisions_ = other.revisions_; + bitField0_ = (bitField0_ & ~0x00001000); + } else { + ensureRevisionsIsMutable(); + revisions_.addAll(other.revisions_); + } + onChanged(); + } + } else { + if (!other.revisions_.isEmpty()) { + if (revisionsBuilder_.isEmpty()) { + revisionsBuilder_.dispose(); + revisionsBuilder_ = null; + revisions_ = other.revisions_; + bitField0_ = (bitField0_ & ~0x00001000); + revisionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRevisionsFieldBuilder() + : null; + } else { + revisionsBuilder_.addAllMessages(other.revisions_); + } + } + } switch (other.getSourceCase()) { case URI: { @@ -40113,13 +67678,13 @@ public Builder mergeFrom( case 74: { input.readMessage(getShardInfoFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; break; } // case 74 case 82: { input.readMessage(getErrorFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; break; } // case 82 case 90: @@ -40136,6 +67701,34 @@ public Builder mergeFrom( } break; } // case 90 + case 106: + { + com.google.cloud.documentai.v1beta2.Document.Revision m = + input.readMessage( + com.google.cloud.documentai.v1beta2.Document.Revision.parser(), + extensionRegistry); + if (revisionsBuilder_ == null) { + ensureRevisionsIsMutable(); + revisions_.add(m); + } else { + revisionsBuilder_.addMessage(m); + } + break; + } // case 106 + case 114: + { + com.google.cloud.documentai.v1beta2.Document.TextChange m = + input.readMessage( + com.google.cloud.documentai.v1beta2.Document.TextChange.parser(), + extensionRegistry); + if (textChangesBuilder_ == null) { + ensureTextChangesIsMutable(); + textChanges_.add(m); + } else { + textChangesBuilder_.addMessage(m); + } + break; + } // case 114 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -40173,14 +67766,13 @@ public Builder clearSource() { * * *
-     * Currently supports Google Cloud Storage URI of the form
-     *    `gs://bucket_name/object_name`. Object versioning is not supported.
-     *    See [Google Cloud Storage Request
-     *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
-     *    info.
+     * Optional. Currently supports Google Cloud Storage URI of the form
+     * `gs://bucket_name/object_name`. Object versioning is not supported.
+     * For more information, refer to [Google Cloud Storage Request
+     * URIs](https://cloud.google.com/storage/docs/reference-uris).
      * 
* - * string uri = 1; + * string uri = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return Whether the uri field is set. */ @@ -40192,14 +67784,13 @@ public boolean hasUri() { * * *
-     * Currently supports Google Cloud Storage URI of the form
-     *    `gs://bucket_name/object_name`. Object versioning is not supported.
-     *    See [Google Cloud Storage Request
-     *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
-     *    info.
+     * Optional. Currently supports Google Cloud Storage URI of the form
+     * `gs://bucket_name/object_name`. Object versioning is not supported.
+     * For more information, refer to [Google Cloud Storage Request
+     * URIs](https://cloud.google.com/storage/docs/reference-uris).
      * 
* - * string uri = 1; + * string uri = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The uri. */ @@ -40224,14 +67815,13 @@ public java.lang.String getUri() { * * *
-     * Currently supports Google Cloud Storage URI of the form
-     *    `gs://bucket_name/object_name`. Object versioning is not supported.
-     *    See [Google Cloud Storage Request
-     *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
-     *    info.
+     * Optional. Currently supports Google Cloud Storage URI of the form
+     * `gs://bucket_name/object_name`. Object versioning is not supported.
+     * For more information, refer to [Google Cloud Storage Request
+     * URIs](https://cloud.google.com/storage/docs/reference-uris).
      * 
* - * string uri = 1; + * string uri = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for uri. */ @@ -40256,14 +67846,13 @@ public com.google.protobuf.ByteString getUriBytes() { * * *
-     * Currently supports Google Cloud Storage URI of the form
-     *    `gs://bucket_name/object_name`. Object versioning is not supported.
-     *    See [Google Cloud Storage Request
-     *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
-     *    info.
+     * Optional. Currently supports Google Cloud Storage URI of the form
+     * `gs://bucket_name/object_name`. Object versioning is not supported.
+     * For more information, refer to [Google Cloud Storage Request
+     * URIs](https://cloud.google.com/storage/docs/reference-uris).
      * 
* - * string uri = 1; + * string uri = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The uri to set. * @return This builder for chaining. @@ -40281,14 +67870,13 @@ public Builder setUri(java.lang.String value) { * * *
-     * Currently supports Google Cloud Storage URI of the form
-     *    `gs://bucket_name/object_name`. Object versioning is not supported.
-     *    See [Google Cloud Storage Request
-     *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
-     *    info.
+     * Optional. Currently supports Google Cloud Storage URI of the form
+     * `gs://bucket_name/object_name`. Object versioning is not supported.
+     * For more information, refer to [Google Cloud Storage Request
+     * URIs](https://cloud.google.com/storage/docs/reference-uris).
      * 
* - * string uri = 1; + * string uri = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -40304,14 +67892,13 @@ public Builder clearUri() { * * *
-     * Currently supports Google Cloud Storage URI of the form
-     *    `gs://bucket_name/object_name`. Object versioning is not supported.
-     *    See [Google Cloud Storage Request
-     *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
-     *    info.
+     * Optional. Currently supports Google Cloud Storage URI of the form
+     * `gs://bucket_name/object_name`. Object versioning is not supported.
+     * For more information, refer to [Google Cloud Storage Request
+     * URIs](https://cloud.google.com/storage/docs/reference-uris).
      * 
* - * string uri = 1; + * string uri = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for uri to set. * @return This builder for chaining. @@ -40331,12 +67918,12 @@ public Builder setUriBytes(com.google.protobuf.ByteString value) { * * *
-     * Inline document content, represented as a stream of bytes.
+     * Optional. Inline document content, represented as a stream of bytes.
      * Note: As with all `bytes` fields, protobuffers use a pure binary
      * representation, whereas JSON representations use base64.
      * 
* - * bytes content = 2; + * bytes content = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return Whether the content field is set. */ @@ -40347,12 +67934,12 @@ public boolean hasContent() { * * *
-     * Inline document content, represented as a stream of bytes.
+     * Optional. Inline document content, represented as a stream of bytes.
      * Note: As with all `bytes` fields, protobuffers use a pure binary
      * representation, whereas JSON representations use base64.
      * 
* - * bytes content = 2; + * bytes content = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The content. */ @@ -40366,12 +67953,12 @@ public com.google.protobuf.ByteString getContent() { * * *
-     * Inline document content, represented as a stream of bytes.
+     * Optional. Inline document content, represented as a stream of bytes.
      * Note: As with all `bytes` fields, protobuffers use a pure binary
      * representation, whereas JSON representations use base64.
      * 
* - * bytes content = 2; + * bytes content = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The content to set. * @return This builder for chaining. @@ -40389,12 +67976,12 @@ public Builder setContent(com.google.protobuf.ByteString value) { * * *
-     * Inline document content, represented as a stream of bytes.
+     * Optional. Inline document content, represented as a stream of bytes.
      * Note: As with all `bytes` fields, protobuffers use a pure binary
      * representation, whereas JSON representations use base64.
      * 
* - * bytes content = 2; + * bytes content = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -40412,9 +67999,8 @@ public Builder clearContent() { * * *
-     * An IANA published MIME type (also referred to as media type). For more
-     * information, see
-     * https://www.iana.org/assignments/media-types/media-types.xhtml.
+     * An IANA published [media type (MIME
+     * type)](https://www.iana.org/assignments/media-types/media-types.xhtml).
      * 
* * string mime_type = 3; @@ -40436,9 +68022,8 @@ public java.lang.String getMimeType() { * * *
-     * An IANA published MIME type (also referred to as media type). For more
-     * information, see
-     * https://www.iana.org/assignments/media-types/media-types.xhtml.
+     * An IANA published [media type (MIME
+     * type)](https://www.iana.org/assignments/media-types/media-types.xhtml).
      * 
* * string mime_type = 3; @@ -40460,9 +68045,8 @@ public com.google.protobuf.ByteString getMimeTypeBytes() { * * *
-     * An IANA published MIME type (also referred to as media type). For more
-     * information, see
-     * https://www.iana.org/assignments/media-types/media-types.xhtml.
+     * An IANA published [media type (MIME
+     * type)](https://www.iana.org/assignments/media-types/media-types.xhtml).
      * 
* * string mime_type = 3; @@ -40483,9 +68067,8 @@ public Builder setMimeType(java.lang.String value) { * * *
-     * An IANA published MIME type (also referred to as media type). For more
-     * information, see
-     * https://www.iana.org/assignments/media-types/media-types.xhtml.
+     * An IANA published [media type (MIME
+     * type)](https://www.iana.org/assignments/media-types/media-types.xhtml).
      * 
* * string mime_type = 3; @@ -40502,9 +68085,8 @@ public Builder clearMimeType() { * * *
-     * An IANA published MIME type (also referred to as media type). For more
-     * information, see
-     * https://www.iana.org/assignments/media-types/media-types.xhtml.
+     * An IANA published [media type (MIME
+     * type)](https://www.iana.org/assignments/media-types/media-types.xhtml).
      * 
* * string mime_type = 3; @@ -40528,10 +68110,10 @@ public Builder setMimeTypeBytes(com.google.protobuf.ByteString value) { * * *
-     * UTF-8 encoded text in reading order from the document.
+     * Optional. UTF-8 encoded text in reading order from the document.
      * 
* - * string text = 4; + * string text = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The text. */ @@ -40550,10 +68132,10 @@ public java.lang.String getText() { * * *
-     * UTF-8 encoded text in reading order from the document.
+     * Optional. UTF-8 encoded text in reading order from the document.
      * 
* - * string text = 4; + * string text = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for text. */ @@ -40572,10 +68154,10 @@ public com.google.protobuf.ByteString getTextBytes() { * * *
-     * UTF-8 encoded text in reading order from the document.
+     * Optional. UTF-8 encoded text in reading order from the document.
      * 
* - * string text = 4; + * string text = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The text to set. * @return This builder for chaining. @@ -40593,10 +68175,10 @@ public Builder setText(java.lang.String value) { * * *
-     * UTF-8 encoded text in reading order from the document.
+     * Optional. UTF-8 encoded text in reading order from the document.
      * 
* - * string text = 4; + * string text = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -40610,10 +68192,10 @@ public Builder clearText() { * * *
-     * UTF-8 encoded text in reading order from the document.
+     * Optional. UTF-8 encoded text in reading order from the document.
      * 
* - * string text = 4; + * string text = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for text to set. * @return This builder for chaining. @@ -40651,11 +68233,15 @@ private void ensureTextStylesIsMutable() { * * *
-     * Styles for the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * Styles for the
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].
      * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5; + * + * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5 [deprecated = true]; + * */ + @java.lang.Deprecated public java.util.List getTextStylesList() { if (textStylesBuilder_ == null) { return java.util.Collections.unmodifiableList(textStyles_); @@ -40667,11 +68253,15 @@ public java.util.List getTex * * *
-     * Styles for the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * Styles for the
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].
      * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5; + * + * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5 [deprecated = true]; + * */ + @java.lang.Deprecated public int getTextStylesCount() { if (textStylesBuilder_ == null) { return textStyles_.size(); @@ -40683,11 +68273,15 @@ public int getTextStylesCount() { * * *
-     * Styles for the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * Styles for the
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].
      * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5; + * + * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5 [deprecated = true]; + * */ + @java.lang.Deprecated public com.google.cloud.documentai.v1beta2.Document.Style getTextStyles(int index) { if (textStylesBuilder_ == null) { return textStyles_.get(index); @@ -40699,11 +68293,15 @@ public com.google.cloud.documentai.v1beta2.Document.Style getTextStyles(int inde * * *
-     * Styles for the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * Styles for the
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].
      * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5; + * + * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5 [deprecated = true]; + * */ + @java.lang.Deprecated public Builder setTextStyles( int index, com.google.cloud.documentai.v1beta2.Document.Style value) { if (textStylesBuilder_ == null) { @@ -40722,11 +68320,15 @@ public Builder setTextStyles( * * *
-     * Styles for the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * Styles for the
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].
      * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5; + * + * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5 [deprecated = true]; + * */ + @java.lang.Deprecated public Builder setTextStyles( int index, com.google.cloud.documentai.v1beta2.Document.Style.Builder builderForValue) { if (textStylesBuilder_ == null) { @@ -40742,11 +68344,15 @@ public Builder setTextStyles( * * *
-     * Styles for the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * Styles for the
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].
      * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5; + * + * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5 [deprecated = true]; + * */ + @java.lang.Deprecated public Builder addTextStyles(com.google.cloud.documentai.v1beta2.Document.Style value) { if (textStylesBuilder_ == null) { if (value == null) { @@ -40764,11 +68370,15 @@ public Builder addTextStyles(com.google.cloud.documentai.v1beta2.Document.Style * * *
-     * Styles for the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * Styles for the
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].
      * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5; + * + * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5 [deprecated = true]; + * */ + @java.lang.Deprecated public Builder addTextStyles( int index, com.google.cloud.documentai.v1beta2.Document.Style value) { if (textStylesBuilder_ == null) { @@ -40787,11 +68397,15 @@ public Builder addTextStyles( * * *
-     * Styles for the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * Styles for the
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].
      * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5; + * + * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5 [deprecated = true]; + * */ + @java.lang.Deprecated public Builder addTextStyles( com.google.cloud.documentai.v1beta2.Document.Style.Builder builderForValue) { if (textStylesBuilder_ == null) { @@ -40807,11 +68421,15 @@ public Builder addTextStyles( * * *
-     * Styles for the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * Styles for the
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].
      * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5; + * + * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5 [deprecated = true]; + * */ + @java.lang.Deprecated public Builder addTextStyles( int index, com.google.cloud.documentai.v1beta2.Document.Style.Builder builderForValue) { if (textStylesBuilder_ == null) { @@ -40827,11 +68445,15 @@ public Builder addTextStyles( * * *
-     * Styles for the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * Styles for the
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].
      * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5; + * + * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5 [deprecated = true]; + * */ + @java.lang.Deprecated public Builder addAllTextStyles( java.lang.Iterable values) { if (textStylesBuilder_ == null) { @@ -40847,11 +68469,15 @@ public Builder addAllTextStyles( * * *
-     * Styles for the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * Styles for the
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].
      * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5; + * + * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5 [deprecated = true]; + * */ + @java.lang.Deprecated public Builder clearTextStyles() { if (textStylesBuilder_ == null) { textStyles_ = java.util.Collections.emptyList(); @@ -40866,11 +68492,15 @@ public Builder clearTextStyles() { * * *
-     * Styles for the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * Styles for the
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].
      * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5; + * + * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5 [deprecated = true]; + * */ + @java.lang.Deprecated public Builder removeTextStyles(int index) { if (textStylesBuilder_ == null) { ensureTextStylesIsMutable(); @@ -40885,11 +68515,15 @@ public Builder removeTextStyles(int index) { * * *
-     * Styles for the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * Styles for the
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].
      * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5; + * + * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5 [deprecated = true]; + * */ + @java.lang.Deprecated public com.google.cloud.documentai.v1beta2.Document.Style.Builder getTextStylesBuilder( int index) { return getTextStylesFieldBuilder().getBuilder(index); @@ -40898,11 +68532,15 @@ public com.google.cloud.documentai.v1beta2.Document.Style.Builder getTextStylesB * * *
-     * Styles for the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * Styles for the
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].
      * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5; + * + * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5 [deprecated = true]; + * */ + @java.lang.Deprecated public com.google.cloud.documentai.v1beta2.Document.StyleOrBuilder getTextStylesOrBuilder( int index) { if (textStylesBuilder_ == null) { @@ -40915,11 +68553,15 @@ public com.google.cloud.documentai.v1beta2.Document.StyleOrBuilder getTextStyles * * *
-     * Styles for the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * Styles for the
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].
      * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5; + * + * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5 [deprecated = true]; + * */ + @java.lang.Deprecated public java.util.List getTextStylesOrBuilderList() { if (textStylesBuilder_ != null) { @@ -40932,11 +68574,15 @@ public com.google.cloud.documentai.v1beta2.Document.StyleOrBuilder getTextStyles * * *
-     * Styles for the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * Styles for the
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].
      * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5; + * + * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5 [deprecated = true]; + * */ + @java.lang.Deprecated public com.google.cloud.documentai.v1beta2.Document.Style.Builder addTextStylesBuilder() { return getTextStylesFieldBuilder() .addBuilder(com.google.cloud.documentai.v1beta2.Document.Style.getDefaultInstance()); @@ -40945,11 +68591,15 @@ public com.google.cloud.documentai.v1beta2.Document.Style.Builder addTextStylesB * * *
-     * Styles for the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * Styles for the
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].
      * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5; + * + * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5 [deprecated = true]; + * */ + @java.lang.Deprecated public com.google.cloud.documentai.v1beta2.Document.Style.Builder addTextStylesBuilder( int index) { return getTextStylesFieldBuilder() @@ -40960,11 +68610,15 @@ public com.google.cloud.documentai.v1beta2.Document.Style.Builder addTextStylesB * * *
-     * Styles for the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+     * Styles for the
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].
      * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5; + * + * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5 [deprecated = true]; + * */ + @java.lang.Deprecated public java.util.List getTextStylesBuilderList() { return getTextStylesFieldBuilder().getBuilderList(); @@ -41007,7 +68661,8 @@ private void ensurePagesIsMutable() { * * *
-     * Visual page layout for the [Document][google.cloud.documentai.v1beta2.Document].
+     * Visual page layout for the
+     * [Document][google.cloud.documentai.v1beta2.Document].
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.Page pages = 6; @@ -41023,7 +68678,8 @@ public java.util.List getPage * * *
-     * Visual page layout for the [Document][google.cloud.documentai.v1beta2.Document].
+     * Visual page layout for the
+     * [Document][google.cloud.documentai.v1beta2.Document].
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.Page pages = 6; @@ -41039,7 +68695,8 @@ public int getPagesCount() { * * *
-     * Visual page layout for the [Document][google.cloud.documentai.v1beta2.Document].
+     * Visual page layout for the
+     * [Document][google.cloud.documentai.v1beta2.Document].
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.Page pages = 6; @@ -41055,7 +68712,8 @@ public com.google.cloud.documentai.v1beta2.Document.Page getPages(int index) { * * *
-     * Visual page layout for the [Document][google.cloud.documentai.v1beta2.Document].
+     * Visual page layout for the
+     * [Document][google.cloud.documentai.v1beta2.Document].
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.Page pages = 6; @@ -41077,7 +68735,8 @@ public Builder setPages(int index, com.google.cloud.documentai.v1beta2.Document. * * *
-     * Visual page layout for the [Document][google.cloud.documentai.v1beta2.Document].
+     * Visual page layout for the
+     * [Document][google.cloud.documentai.v1beta2.Document].
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.Page pages = 6; @@ -41097,7 +68756,8 @@ public Builder setPages( * * *
-     * Visual page layout for the [Document][google.cloud.documentai.v1beta2.Document].
+     * Visual page layout for the
+     * [Document][google.cloud.documentai.v1beta2.Document].
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.Page pages = 6; @@ -41119,7 +68779,8 @@ public Builder addPages(com.google.cloud.documentai.v1beta2.Document.Page value) * * *
-     * Visual page layout for the [Document][google.cloud.documentai.v1beta2.Document].
+     * Visual page layout for the
+     * [Document][google.cloud.documentai.v1beta2.Document].
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.Page pages = 6; @@ -41141,7 +68802,8 @@ public Builder addPages(int index, com.google.cloud.documentai.v1beta2.Document. * * *
-     * Visual page layout for the [Document][google.cloud.documentai.v1beta2.Document].
+     * Visual page layout for the
+     * [Document][google.cloud.documentai.v1beta2.Document].
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.Page pages = 6; @@ -41161,7 +68823,8 @@ public Builder addPages( * * *
-     * Visual page layout for the [Document][google.cloud.documentai.v1beta2.Document].
+     * Visual page layout for the
+     * [Document][google.cloud.documentai.v1beta2.Document].
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.Page pages = 6; @@ -41181,7 +68844,8 @@ public Builder addPages( * * *
-     * Visual page layout for the [Document][google.cloud.documentai.v1beta2.Document].
+     * Visual page layout for the
+     * [Document][google.cloud.documentai.v1beta2.Document].
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.Page pages = 6; @@ -41201,7 +68865,8 @@ public Builder addAllPages( * * *
-     * Visual page layout for the [Document][google.cloud.documentai.v1beta2.Document].
+     * Visual page layout for the
+     * [Document][google.cloud.documentai.v1beta2.Document].
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.Page pages = 6; @@ -41220,7 +68885,8 @@ public Builder clearPages() { * * *
-     * Visual page layout for the [Document][google.cloud.documentai.v1beta2.Document].
+     * Visual page layout for the
+     * [Document][google.cloud.documentai.v1beta2.Document].
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.Page pages = 6; @@ -41239,7 +68905,8 @@ public Builder removePages(int index) { * * *
-     * Visual page layout for the [Document][google.cloud.documentai.v1beta2.Document].
+     * Visual page layout for the
+     * [Document][google.cloud.documentai.v1beta2.Document].
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.Page pages = 6; @@ -41251,7 +68918,8 @@ public com.google.cloud.documentai.v1beta2.Document.Page.Builder getPagesBuilder * * *
-     * Visual page layout for the [Document][google.cloud.documentai.v1beta2.Document].
+     * Visual page layout for the
+     * [Document][google.cloud.documentai.v1beta2.Document].
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.Page pages = 6; @@ -41267,7 +68935,8 @@ public com.google.cloud.documentai.v1beta2.Document.PageOrBuilder getPagesOrBuil * * *
-     * Visual page layout for the [Document][google.cloud.documentai.v1beta2.Document].
+     * Visual page layout for the
+     * [Document][google.cloud.documentai.v1beta2.Document].
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.Page pages = 6; @@ -41284,7 +68953,8 @@ public com.google.cloud.documentai.v1beta2.Document.PageOrBuilder getPagesOrBuil * * *
-     * Visual page layout for the [Document][google.cloud.documentai.v1beta2.Document].
+     * Visual page layout for the
+     * [Document][google.cloud.documentai.v1beta2.Document].
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.Page pages = 6; @@ -41297,7 +68967,8 @@ public com.google.cloud.documentai.v1beta2.Document.Page.Builder addPagesBuilder * * *
-     * Visual page layout for the [Document][google.cloud.documentai.v1beta2.Document].
+     * Visual page layout for the
+     * [Document][google.cloud.documentai.v1beta2.Document].
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.Page pages = 6; @@ -41311,7 +68982,8 @@ public com.google.cloud.documentai.v1beta2.Document.Page.Builder addPagesBuilder * * *
-     * Visual page layout for the [Document][google.cloud.documentai.v1beta2.Document].
+     * Visual page layout for the
+     * [Document][google.cloud.documentai.v1beta2.Document].
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.Page pages = 6; @@ -41359,8 +69031,9 @@ private void ensureEntitiesIsMutable() { * * *
-     * A list of entities detected on [Document.text][google.cloud.documentai.v1beta2.Document.text]. For document shards,
-     * entities in this list may cross shard boundaries.
+     * A list of entities detected on
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text]. For
+     * document shards, entities in this list may cross shard boundaries.
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.Entity entities = 7; @@ -41376,8 +69049,9 @@ public java.util.List getEn * * *
-     * A list of entities detected on [Document.text][google.cloud.documentai.v1beta2.Document.text]. For document shards,
-     * entities in this list may cross shard boundaries.
+     * A list of entities detected on
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text]. For
+     * document shards, entities in this list may cross shard boundaries.
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.Entity entities = 7; @@ -41393,8 +69067,9 @@ public int getEntitiesCount() { * * *
-     * A list of entities detected on [Document.text][google.cloud.documentai.v1beta2.Document.text]. For document shards,
-     * entities in this list may cross shard boundaries.
+     * A list of entities detected on
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text]. For
+     * document shards, entities in this list may cross shard boundaries.
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.Entity entities = 7; @@ -41410,8 +69085,9 @@ public com.google.cloud.documentai.v1beta2.Document.Entity getEntities(int index * * *
-     * A list of entities detected on [Document.text][google.cloud.documentai.v1beta2.Document.text]. For document shards,
-     * entities in this list may cross shard boundaries.
+     * A list of entities detected on
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text]. For
+     * document shards, entities in this list may cross shard boundaries.
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.Entity entities = 7; @@ -41434,8 +69110,9 @@ public Builder setEntities( * * *
-     * A list of entities detected on [Document.text][google.cloud.documentai.v1beta2.Document.text]. For document shards,
-     * entities in this list may cross shard boundaries.
+     * A list of entities detected on
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text]. For
+     * document shards, entities in this list may cross shard boundaries.
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.Entity entities = 7; @@ -41455,8 +69132,9 @@ public Builder setEntities( * * *
-     * A list of entities detected on [Document.text][google.cloud.documentai.v1beta2.Document.text]. For document shards,
-     * entities in this list may cross shard boundaries.
+     * A list of entities detected on
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text]. For
+     * document shards, entities in this list may cross shard boundaries.
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.Entity entities = 7; @@ -41478,8 +69156,9 @@ public Builder addEntities(com.google.cloud.documentai.v1beta2.Document.Entity v * * *
-     * A list of entities detected on [Document.text][google.cloud.documentai.v1beta2.Document.text]. For document shards,
-     * entities in this list may cross shard boundaries.
+     * A list of entities detected on
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text]. For
+     * document shards, entities in this list may cross shard boundaries.
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.Entity entities = 7; @@ -41502,8 +69181,9 @@ public Builder addEntities( * * *
-     * A list of entities detected on [Document.text][google.cloud.documentai.v1beta2.Document.text]. For document shards,
-     * entities in this list may cross shard boundaries.
+     * A list of entities detected on
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text]. For
+     * document shards, entities in this list may cross shard boundaries.
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.Entity entities = 7; @@ -41523,8 +69203,9 @@ public Builder addEntities( * * *
-     * A list of entities detected on [Document.text][google.cloud.documentai.v1beta2.Document.text]. For document shards,
-     * entities in this list may cross shard boundaries.
+     * A list of entities detected on
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text]. For
+     * document shards, entities in this list may cross shard boundaries.
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.Entity entities = 7; @@ -41544,8 +69225,9 @@ public Builder addEntities( * * *
-     * A list of entities detected on [Document.text][google.cloud.documentai.v1beta2.Document.text]. For document shards,
-     * entities in this list may cross shard boundaries.
+     * A list of entities detected on
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text]. For
+     * document shards, entities in this list may cross shard boundaries.
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.Entity entities = 7; @@ -41565,8 +69247,9 @@ public Builder addAllEntities( * * *
-     * A list of entities detected on [Document.text][google.cloud.documentai.v1beta2.Document.text]. For document shards,
-     * entities in this list may cross shard boundaries.
+     * A list of entities detected on
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text]. For
+     * document shards, entities in this list may cross shard boundaries.
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.Entity entities = 7; @@ -41585,8 +69268,9 @@ public Builder clearEntities() { * * *
-     * A list of entities detected on [Document.text][google.cloud.documentai.v1beta2.Document.text]. For document shards,
-     * entities in this list may cross shard boundaries.
+     * A list of entities detected on
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text]. For
+     * document shards, entities in this list may cross shard boundaries.
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.Entity entities = 7; @@ -41605,8 +69289,9 @@ public Builder removeEntities(int index) { * * *
-     * A list of entities detected on [Document.text][google.cloud.documentai.v1beta2.Document.text]. For document shards,
-     * entities in this list may cross shard boundaries.
+     * A list of entities detected on
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text]. For
+     * document shards, entities in this list may cross shard boundaries.
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.Entity entities = 7; @@ -41619,8 +69304,9 @@ public com.google.cloud.documentai.v1beta2.Document.Entity.Builder getEntitiesBu * * *
-     * A list of entities detected on [Document.text][google.cloud.documentai.v1beta2.Document.text]. For document shards,
-     * entities in this list may cross shard boundaries.
+     * A list of entities detected on
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text]. For
+     * document shards, entities in this list may cross shard boundaries.
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.Entity entities = 7; @@ -41637,8 +69323,9 @@ public com.google.cloud.documentai.v1beta2.Document.EntityOrBuilder getEntitiesO * * *
-     * A list of entities detected on [Document.text][google.cloud.documentai.v1beta2.Document.text]. For document shards,
-     * entities in this list may cross shard boundaries.
+     * A list of entities detected on
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text]. For
+     * document shards, entities in this list may cross shard boundaries.
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.Entity entities = 7; @@ -41655,8 +69342,9 @@ public com.google.cloud.documentai.v1beta2.Document.EntityOrBuilder getEntitiesO * * *
-     * A list of entities detected on [Document.text][google.cloud.documentai.v1beta2.Document.text]. For document shards,
-     * entities in this list may cross shard boundaries.
+     * A list of entities detected on
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text]. For
+     * document shards, entities in this list may cross shard boundaries.
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.Entity entities = 7; @@ -41669,8 +69357,9 @@ public com.google.cloud.documentai.v1beta2.Document.Entity.Builder addEntitiesBu * * *
-     * A list of entities detected on [Document.text][google.cloud.documentai.v1beta2.Document.text]. For document shards,
-     * entities in this list may cross shard boundaries.
+     * A list of entities detected on
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text]. For
+     * document shards, entities in this list may cross shard boundaries.
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.Entity entities = 7; @@ -41685,8 +69374,9 @@ public com.google.cloud.documentai.v1beta2.Document.Entity.Builder addEntitiesBu * * *
-     * A list of entities detected on [Document.text][google.cloud.documentai.v1beta2.Document.text]. For document shards,
-     * entities in this list may cross shard boundaries.
+     * A list of entities detected on
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text]. For
+     * document shards, entities in this list may cross shard boundaries.
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.Entity entities = 7; @@ -41735,7 +69425,8 @@ private void ensureEntityRelationsIsMutable() { * * *
-     * Relationship among [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
+     * Placeholder.  Relationship among
+     * [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.EntityRelation entity_relations = 8; @@ -41753,7 +69444,8 @@ private void ensureEntityRelationsIsMutable() { * * *
-     * Relationship among [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
+     * Placeholder.  Relationship among
+     * [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.EntityRelation entity_relations = 8; @@ -41770,7 +69462,8 @@ public int getEntityRelationsCount() { * * *
-     * Relationship among [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
+     * Placeholder.  Relationship among
+     * [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.EntityRelation entity_relations = 8; @@ -41788,7 +69481,8 @@ public com.google.cloud.documentai.v1beta2.Document.EntityRelation getEntityRela * * *
-     * Relationship among [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
+     * Placeholder.  Relationship among
+     * [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.EntityRelation entity_relations = 8; @@ -41812,7 +69506,8 @@ public Builder setEntityRelations( * * *
-     * Relationship among [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
+     * Placeholder.  Relationship among
+     * [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.EntityRelation entity_relations = 8; @@ -41834,7 +69529,8 @@ public Builder setEntityRelations( * * *
-     * Relationship among [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
+     * Placeholder.  Relationship among
+     * [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.EntityRelation entity_relations = 8; @@ -41858,7 +69554,8 @@ public Builder addEntityRelations( * * *
-     * Relationship among [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
+     * Placeholder.  Relationship among
+     * [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.EntityRelation entity_relations = 8; @@ -41882,7 +69579,8 @@ public Builder addEntityRelations( * * *
-     * Relationship among [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
+     * Placeholder.  Relationship among
+     * [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.EntityRelation entity_relations = 8; @@ -41903,7 +69601,8 @@ public Builder addEntityRelations( * * *
-     * Relationship among [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
+     * Placeholder.  Relationship among
+     * [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.EntityRelation entity_relations = 8; @@ -41925,7 +69624,8 @@ public Builder addEntityRelations( * * *
-     * Relationship among [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
+     * Placeholder.  Relationship among
+     * [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.EntityRelation entity_relations = 8; @@ -41947,7 +69647,8 @@ public Builder addAllEntityRelations( * * *
-     * Relationship among [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
+     * Placeholder.  Relationship among
+     * [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.EntityRelation entity_relations = 8; @@ -41967,7 +69668,8 @@ public Builder clearEntityRelations() { * * *
-     * Relationship among [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
+     * Placeholder.  Relationship among
+     * [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.EntityRelation entity_relations = 8; @@ -41987,7 +69689,8 @@ public Builder removeEntityRelations(int index) { * * *
-     * Relationship among [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
+     * Placeholder.  Relationship among
+     * [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.EntityRelation entity_relations = 8; @@ -42001,7 +69704,8 @@ public Builder removeEntityRelations(int index) { * * *
-     * Relationship among [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
+     * Placeholder.  Relationship among
+     * [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.EntityRelation entity_relations = 8; @@ -42019,7 +69723,8 @@ public Builder removeEntityRelations(int index) { * * *
-     * Relationship among [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
+     * Placeholder.  Relationship among
+     * [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.EntityRelation entity_relations = 8; @@ -42038,7 +69743,8 @@ public Builder removeEntityRelations(int index) { * * *
-     * Relationship among [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
+     * Placeholder.  Relationship among
+     * [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.EntityRelation entity_relations = 8; @@ -42054,7 +69760,8 @@ public Builder removeEntityRelations(int index) { * * *
-     * Relationship among [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
+     * Placeholder.  Relationship among
+     * [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.EntityRelation entity_relations = 8; @@ -42071,7 +69778,8 @@ public Builder removeEntityRelations(int index) { * * *
-     * Relationship among [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
+     * Placeholder.  Relationship among
+     * [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
      * 
* * repeated .google.cloud.documentai.v1beta2.Document.EntityRelation entity_relations = 8; @@ -42102,6 +69810,423 @@ public Builder removeEntityRelations(int index) { return entityRelationsBuilder_; } + private java.util.List textChanges_ = + java.util.Collections.emptyList(); + + private void ensureTextChangesIsMutable() { + if (!((bitField0_ & 0x00000100) != 0)) { + textChanges_ = + new java.util.ArrayList( + textChanges_); + bitField0_ |= 0x00000100; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.TextChange, + com.google.cloud.documentai.v1beta2.Document.TextChange.Builder, + com.google.cloud.documentai.v1beta2.Document.TextChangeOrBuilder> + textChangesBuilder_; + + /** + * + * + *
+     * Placeholder.  A list of text corrections made to
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].  This is
+     * usually used for annotating corrections to OCR mistakes.  Text changes for
+     * a given revision may not overlap with each other.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.TextChange text_changes = 14; + */ + public java.util.List + getTextChangesList() { + if (textChangesBuilder_ == null) { + return java.util.Collections.unmodifiableList(textChanges_); + } else { + return textChangesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Placeholder.  A list of text corrections made to
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].  This is
+     * usually used for annotating corrections to OCR mistakes.  Text changes for
+     * a given revision may not overlap with each other.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.TextChange text_changes = 14; + */ + public int getTextChangesCount() { + if (textChangesBuilder_ == null) { + return textChanges_.size(); + } else { + return textChangesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Placeholder.  A list of text corrections made to
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].  This is
+     * usually used for annotating corrections to OCR mistakes.  Text changes for
+     * a given revision may not overlap with each other.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.TextChange text_changes = 14; + */ + public com.google.cloud.documentai.v1beta2.Document.TextChange getTextChanges(int index) { + if (textChangesBuilder_ == null) { + return textChanges_.get(index); + } else { + return textChangesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Placeholder.  A list of text corrections made to
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].  This is
+     * usually used for annotating corrections to OCR mistakes.  Text changes for
+     * a given revision may not overlap with each other.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.TextChange text_changes = 14; + */ + public Builder setTextChanges( + int index, com.google.cloud.documentai.v1beta2.Document.TextChange value) { + if (textChangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTextChangesIsMutable(); + textChanges_.set(index, value); + onChanged(); + } else { + textChangesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Placeholder.  A list of text corrections made to
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].  This is
+     * usually used for annotating corrections to OCR mistakes.  Text changes for
+     * a given revision may not overlap with each other.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.TextChange text_changes = 14; + */ + public Builder setTextChanges( + int index, + com.google.cloud.documentai.v1beta2.Document.TextChange.Builder builderForValue) { + if (textChangesBuilder_ == null) { + ensureTextChangesIsMutable(); + textChanges_.set(index, builderForValue.build()); + onChanged(); + } else { + textChangesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Placeholder.  A list of text corrections made to
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].  This is
+     * usually used for annotating corrections to OCR mistakes.  Text changes for
+     * a given revision may not overlap with each other.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.TextChange text_changes = 14; + */ + public Builder addTextChanges(com.google.cloud.documentai.v1beta2.Document.TextChange value) { + if (textChangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTextChangesIsMutable(); + textChanges_.add(value); + onChanged(); + } else { + textChangesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Placeholder.  A list of text corrections made to
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].  This is
+     * usually used for annotating corrections to OCR mistakes.  Text changes for
+     * a given revision may not overlap with each other.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.TextChange text_changes = 14; + */ + public Builder addTextChanges( + int index, com.google.cloud.documentai.v1beta2.Document.TextChange value) { + if (textChangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTextChangesIsMutable(); + textChanges_.add(index, value); + onChanged(); + } else { + textChangesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Placeholder.  A list of text corrections made to
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].  This is
+     * usually used for annotating corrections to OCR mistakes.  Text changes for
+     * a given revision may not overlap with each other.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.TextChange text_changes = 14; + */ + public Builder addTextChanges( + com.google.cloud.documentai.v1beta2.Document.TextChange.Builder builderForValue) { + if (textChangesBuilder_ == null) { + ensureTextChangesIsMutable(); + textChanges_.add(builderForValue.build()); + onChanged(); + } else { + textChangesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Placeholder.  A list of text corrections made to
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].  This is
+     * usually used for annotating corrections to OCR mistakes.  Text changes for
+     * a given revision may not overlap with each other.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.TextChange text_changes = 14; + */ + public Builder addTextChanges( + int index, + com.google.cloud.documentai.v1beta2.Document.TextChange.Builder builderForValue) { + if (textChangesBuilder_ == null) { + ensureTextChangesIsMutable(); + textChanges_.add(index, builderForValue.build()); + onChanged(); + } else { + textChangesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Placeholder.  A list of text corrections made to
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].  This is
+     * usually used for annotating corrections to OCR mistakes.  Text changes for
+     * a given revision may not overlap with each other.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.TextChange text_changes = 14; + */ + public Builder addAllTextChanges( + java.lang.Iterable + values) { + if (textChangesBuilder_ == null) { + ensureTextChangesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, textChanges_); + onChanged(); + } else { + textChangesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Placeholder.  A list of text corrections made to
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].  This is
+     * usually used for annotating corrections to OCR mistakes.  Text changes for
+     * a given revision may not overlap with each other.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.TextChange text_changes = 14; + */ + public Builder clearTextChanges() { + if (textChangesBuilder_ == null) { + textChanges_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + } else { + textChangesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Placeholder.  A list of text corrections made to
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].  This is
+     * usually used for annotating corrections to OCR mistakes.  Text changes for
+     * a given revision may not overlap with each other.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.TextChange text_changes = 14; + */ + public Builder removeTextChanges(int index) { + if (textChangesBuilder_ == null) { + ensureTextChangesIsMutable(); + textChanges_.remove(index); + onChanged(); + } else { + textChangesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Placeholder.  A list of text corrections made to
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].  This is
+     * usually used for annotating corrections to OCR mistakes.  Text changes for
+     * a given revision may not overlap with each other.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.TextChange text_changes = 14; + */ + public com.google.cloud.documentai.v1beta2.Document.TextChange.Builder getTextChangesBuilder( + int index) { + return getTextChangesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Placeholder.  A list of text corrections made to
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].  This is
+     * usually used for annotating corrections to OCR mistakes.  Text changes for
+     * a given revision may not overlap with each other.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.TextChange text_changes = 14; + */ + public com.google.cloud.documentai.v1beta2.Document.TextChangeOrBuilder getTextChangesOrBuilder( + int index) { + if (textChangesBuilder_ == null) { + return textChanges_.get(index); + } else { + return textChangesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Placeholder.  A list of text corrections made to
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].  This is
+     * usually used for annotating corrections to OCR mistakes.  Text changes for
+     * a given revision may not overlap with each other.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.TextChange text_changes = 14; + */ + public java.util.List< + ? extends com.google.cloud.documentai.v1beta2.Document.TextChangeOrBuilder> + getTextChangesOrBuilderList() { + if (textChangesBuilder_ != null) { + return textChangesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(textChanges_); + } + } + /** + * + * + *
+     * Placeholder.  A list of text corrections made to
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].  This is
+     * usually used for annotating corrections to OCR mistakes.  Text changes for
+     * a given revision may not overlap with each other.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.TextChange text_changes = 14; + */ + public com.google.cloud.documentai.v1beta2.Document.TextChange.Builder addTextChangesBuilder() { + return getTextChangesFieldBuilder() + .addBuilder(com.google.cloud.documentai.v1beta2.Document.TextChange.getDefaultInstance()); + } + /** + * + * + *
+     * Placeholder.  A list of text corrections made to
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].  This is
+     * usually used for annotating corrections to OCR mistakes.  Text changes for
+     * a given revision may not overlap with each other.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.TextChange text_changes = 14; + */ + public com.google.cloud.documentai.v1beta2.Document.TextChange.Builder addTextChangesBuilder( + int index) { + return getTextChangesFieldBuilder() + .addBuilder( + index, com.google.cloud.documentai.v1beta2.Document.TextChange.getDefaultInstance()); + } + /** + * + * + *
+     * Placeholder.  A list of text corrections made to
+     * [Document.text][google.cloud.documentai.v1beta2.Document.text].  This is
+     * usually used for annotating corrections to OCR mistakes.  Text changes for
+     * a given revision may not overlap with each other.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.TextChange text_changes = 14; + */ + public java.util.List + getTextChangesBuilderList() { + return getTextChangesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.TextChange, + com.google.cloud.documentai.v1beta2.Document.TextChange.Builder, + com.google.cloud.documentai.v1beta2.Document.TextChangeOrBuilder> + getTextChangesFieldBuilder() { + if (textChangesBuilder_ == null) { + textChangesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.TextChange, + com.google.cloud.documentai.v1beta2.Document.TextChange.Builder, + com.google.cloud.documentai.v1beta2.Document.TextChangeOrBuilder>( + textChanges_, ((bitField0_ & 0x00000100) != 0), getParentForChildren(), isClean()); + textChanges_ = null; + } + return textChangesBuilder_; + } + private com.google.cloud.documentai.v1beta2.Document.ShardInfo shardInfo_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.documentai.v1beta2.Document.ShardInfo, @@ -42121,7 +70246,7 @@ public Builder removeEntityRelations(int index) { * @return Whether the shardInfo field is set. */ public boolean hasShardInfo() { - return ((bitField0_ & 0x00000100) != 0); + return ((bitField0_ & 0x00000200) != 0); } /** * @@ -42163,7 +70288,7 @@ public Builder setShardInfo(com.google.cloud.documentai.v1beta2.Document.ShardIn } else { shardInfoBuilder_.setMessage(value); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -42184,7 +70309,7 @@ public Builder setShardInfo( } else { shardInfoBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -42200,7 +70325,7 @@ public Builder setShardInfo( */ public Builder mergeShardInfo(com.google.cloud.documentai.v1beta2.Document.ShardInfo value) { if (shardInfoBuilder_ == null) { - if (((bitField0_ & 0x00000100) != 0) + if (((bitField0_ & 0x00000200) != 0) && shardInfo_ != null && shardInfo_ != com.google.cloud.documentai.v1beta2.Document.ShardInfo.getDefaultInstance()) { @@ -42211,7 +70336,7 @@ public Builder mergeShardInfo(com.google.cloud.documentai.v1beta2.Document.Shard } else { shardInfoBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -42226,7 +70351,7 @@ public Builder mergeShardInfo(com.google.cloud.documentai.v1beta2.Document.Shard * .google.cloud.documentai.v1beta2.Document.ShardInfo shard_info = 9; */ public Builder clearShardInfo() { - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000200); shardInfo_ = null; if (shardInfoBuilder_ != null) { shardInfoBuilder_.dispose(); @@ -42246,7 +70371,7 @@ public Builder clearShardInfo() { * .google.cloud.documentai.v1beta2.Document.ShardInfo shard_info = 9; */ public com.google.cloud.documentai.v1beta2.Document.ShardInfo.Builder getShardInfoBuilder() { - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return getShardInfoFieldBuilder().getBuilder(); } @@ -42300,10 +70425,10 @@ public com.google.cloud.documentai.v1beta2.Document.ShardInfoOrBuilder getShardI java.util.Collections.emptyList(); private void ensureLabelsIsMutable() { - if (!((bitField0_ & 0x00000200) != 0)) { + if (!((bitField0_ & 0x00000400) != 0)) { labels_ = new java.util.ArrayList(labels_); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; } } @@ -42519,7 +70644,7 @@ public Builder addAllLabels( public Builder clearLabels() { if (labelsBuilder_ == null) { labels_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000400); onChanged(); } else { labelsBuilder_.clear(); @@ -42643,7 +70768,7 @@ public com.google.cloud.documentai.v1beta2.Document.Label.Builder addLabelsBuild com.google.cloud.documentai.v1beta2.Document.Label, com.google.cloud.documentai.v1beta2.Document.Label.Builder, com.google.cloud.documentai.v1beta2.Document.LabelOrBuilder>( - labels_, ((bitField0_ & 0x00000200) != 0), getParentForChildren(), isClean()); + labels_, ((bitField0_ & 0x00000400) != 0), getParentForChildren(), isClean()); labels_ = null; } return labelsBuilder_; @@ -42665,7 +70790,7 @@ public com.google.cloud.documentai.v1beta2.Document.Label.Builder addLabelsBuild * @return Whether the error field is set. */ public boolean hasError() { - return ((bitField0_ & 0x00000400) != 0); + return ((bitField0_ & 0x00000800) != 0); } /** * @@ -42703,7 +70828,7 @@ public Builder setError(com.google.rpc.Status value) { } else { errorBuilder_.setMessage(value); } - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -42722,7 +70847,7 @@ public Builder setError(com.google.rpc.Status.Builder builderForValue) { } else { errorBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -42737,7 +70862,7 @@ public Builder setError(com.google.rpc.Status.Builder builderForValue) { */ public Builder mergeError(com.google.rpc.Status value) { if (errorBuilder_ == null) { - if (((bitField0_ & 0x00000400) != 0) + if (((bitField0_ & 0x00000800) != 0) && error_ != null && error_ != com.google.rpc.Status.getDefaultInstance()) { getErrorBuilder().mergeFrom(value); @@ -42747,7 +70872,7 @@ public Builder mergeError(com.google.rpc.Status value) { } else { errorBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -42761,7 +70886,7 @@ public Builder mergeError(com.google.rpc.Status value) { * .google.rpc.Status error = 10; */ public Builder clearError() { - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00000800); error_ = null; if (errorBuilder_ != null) { errorBuilder_.dispose(); @@ -42780,7 +70905,7 @@ public Builder clearError() { * .google.rpc.Status error = 10; */ public com.google.rpc.Status.Builder getErrorBuilder() { - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; onChanged(); return getErrorFieldBuilder().getBuilder(); } @@ -42823,6 +70948,366 @@ public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { return errorBuilder_; } + private java.util.List revisions_ = + java.util.Collections.emptyList(); + + private void ensureRevisionsIsMutable() { + if (!((bitField0_ & 0x00001000) != 0)) { + revisions_ = + new java.util.ArrayList( + revisions_); + bitField0_ |= 0x00001000; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Revision, + com.google.cloud.documentai.v1beta2.Document.Revision.Builder, + com.google.cloud.documentai.v1beta2.Document.RevisionOrBuilder> + revisionsBuilder_; + + /** + * + * + *
+     * Placeholder. Revision history of this document.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Revision revisions = 13; + */ + public java.util.List + getRevisionsList() { + if (revisionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(revisions_); + } else { + return revisionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Placeholder. Revision history of this document.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Revision revisions = 13; + */ + public int getRevisionsCount() { + if (revisionsBuilder_ == null) { + return revisions_.size(); + } else { + return revisionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Placeholder. Revision history of this document.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Revision revisions = 13; + */ + public com.google.cloud.documentai.v1beta2.Document.Revision getRevisions(int index) { + if (revisionsBuilder_ == null) { + return revisions_.get(index); + } else { + return revisionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Placeholder. Revision history of this document.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Revision revisions = 13; + */ + public Builder setRevisions( + int index, com.google.cloud.documentai.v1beta2.Document.Revision value) { + if (revisionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRevisionsIsMutable(); + revisions_.set(index, value); + onChanged(); + } else { + revisionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Placeholder. Revision history of this document.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Revision revisions = 13; + */ + public Builder setRevisions( + int index, com.google.cloud.documentai.v1beta2.Document.Revision.Builder builderForValue) { + if (revisionsBuilder_ == null) { + ensureRevisionsIsMutable(); + revisions_.set(index, builderForValue.build()); + onChanged(); + } else { + revisionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Placeholder. Revision history of this document.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Revision revisions = 13; + */ + public Builder addRevisions(com.google.cloud.documentai.v1beta2.Document.Revision value) { + if (revisionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRevisionsIsMutable(); + revisions_.add(value); + onChanged(); + } else { + revisionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Placeholder. Revision history of this document.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Revision revisions = 13; + */ + public Builder addRevisions( + int index, com.google.cloud.documentai.v1beta2.Document.Revision value) { + if (revisionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRevisionsIsMutable(); + revisions_.add(index, value); + onChanged(); + } else { + revisionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Placeholder. Revision history of this document.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Revision revisions = 13; + */ + public Builder addRevisions( + com.google.cloud.documentai.v1beta2.Document.Revision.Builder builderForValue) { + if (revisionsBuilder_ == null) { + ensureRevisionsIsMutable(); + revisions_.add(builderForValue.build()); + onChanged(); + } else { + revisionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Placeholder. Revision history of this document.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Revision revisions = 13; + */ + public Builder addRevisions( + int index, com.google.cloud.documentai.v1beta2.Document.Revision.Builder builderForValue) { + if (revisionsBuilder_ == null) { + ensureRevisionsIsMutable(); + revisions_.add(index, builderForValue.build()); + onChanged(); + } else { + revisionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Placeholder. Revision history of this document.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Revision revisions = 13; + */ + public Builder addAllRevisions( + java.lang.Iterable + values) { + if (revisionsBuilder_ == null) { + ensureRevisionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, revisions_); + onChanged(); + } else { + revisionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Placeholder. Revision history of this document.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Revision revisions = 13; + */ + public Builder clearRevisions() { + if (revisionsBuilder_ == null) { + revisions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00001000); + onChanged(); + } else { + revisionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Placeholder. Revision history of this document.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Revision revisions = 13; + */ + public Builder removeRevisions(int index) { + if (revisionsBuilder_ == null) { + ensureRevisionsIsMutable(); + revisions_.remove(index); + onChanged(); + } else { + revisionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Placeholder. Revision history of this document.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Revision revisions = 13; + */ + public com.google.cloud.documentai.v1beta2.Document.Revision.Builder getRevisionsBuilder( + int index) { + return getRevisionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Placeholder. Revision history of this document.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Revision revisions = 13; + */ + public com.google.cloud.documentai.v1beta2.Document.RevisionOrBuilder getRevisionsOrBuilder( + int index) { + if (revisionsBuilder_ == null) { + return revisions_.get(index); + } else { + return revisionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Placeholder. Revision history of this document.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Revision revisions = 13; + */ + public java.util.List + getRevisionsOrBuilderList() { + if (revisionsBuilder_ != null) { + return revisionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(revisions_); + } + } + /** + * + * + *
+     * Placeholder. Revision history of this document.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Revision revisions = 13; + */ + public com.google.cloud.documentai.v1beta2.Document.Revision.Builder addRevisionsBuilder() { + return getRevisionsFieldBuilder() + .addBuilder(com.google.cloud.documentai.v1beta2.Document.Revision.getDefaultInstance()); + } + /** + * + * + *
+     * Placeholder. Revision history of this document.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Revision revisions = 13; + */ + public com.google.cloud.documentai.v1beta2.Document.Revision.Builder addRevisionsBuilder( + int index) { + return getRevisionsFieldBuilder() + .addBuilder( + index, com.google.cloud.documentai.v1beta2.Document.Revision.getDefaultInstance()); + } + /** + * + * + *
+     * Placeholder. Revision history of this document.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Revision revisions = 13; + */ + public java.util.List + getRevisionsBuilderList() { + return getRevisionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Revision, + com.google.cloud.documentai.v1beta2.Document.Revision.Builder, + com.google.cloud.documentai.v1beta2.Document.RevisionOrBuilder> + getRevisionsFieldBuilder() { + if (revisionsBuilder_ == null) { + revisionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta2.Document.Revision, + com.google.cloud.documentai.v1beta2.Document.Revision.Builder, + com.google.cloud.documentai.v1beta2.Document.RevisionOrBuilder>( + revisions_, ((bitField0_ & 0x00001000) != 0), getParentForChildren(), isClean()); + revisions_ = null; + } + return revisionsBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/DocumentAiProto.java b/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/DocumentAiProto.java index c19fd2066932..463f722584b2 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/DocumentAiProto.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/DocumentAiProto.java @@ -111,85 +111,85 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ogle/protobuf/timestamp.proto\"\177\n\034BatchPr" + "ocessDocumentsRequest\022O\n\010requests\030\001 \003(\0132" + "7.google.cloud.documentai.v1beta2.Proces" - + "sDocumentRequestB\004\342A\001\002\022\016\n\006parent\030\002 \001(\t\"\346" + + "sDocumentRequestB\004\342A\001\002\022\016\n\006parent\030\002 \001(\t\"\340" + "\004\n\026ProcessDocumentRequest\022\016\n\006parent\030\t \001(" + "\t\022H\n\014input_config\030\001 \001(\0132,.google.cloud.d" - + "ocumentai.v1beta2.InputConfigB\004\342A\001\002\022J\n\ro" + + "ocumentai.v1beta2.InputConfigB\004\342A\001\002\022D\n\ro" + "utput_config\030\002 \001(\0132-.google.cloud.docume" - + "ntai.v1beta2.OutputConfigB\004\342A\001\001\022\025\n\rdocum" - + "ent_type\030\003 \001(\t\022W\n\027table_extraction_param" - + "s\030\004 \001(\01326.google.cloud.documentai.v1beta" - + "2.TableExtractionParams\022U\n\026form_extracti" - + "on_params\030\005 \001(\01325.google.cloud.documenta" - + "i.v1beta2.FormExtractionParams\022Y\n\030entity" - + "_extraction_params\030\006 \001(\01327.google.cloud." - + "documentai.v1beta2.EntityExtractionParam" - + "s\022>\n\nocr_params\030\007 \001(\0132*.google.cloud.doc" - + "umentai.v1beta2.OcrParams\022D\n\rautoml_para" - + "ms\030\010 \001(\0132-.google.cloud.documentai.v1bet" - + "a2.AutoMlParams\"l\n\035BatchProcessDocuments" - + "Response\022K\n\tresponses\030\001 \003(\01328.google.clo" - + "ud.documentai.v1beta2.ProcessDocumentRes" - + "ponse\"\243\001\n\027ProcessDocumentResponse\022B\n\014inp" - + "ut_config\030\001 \001(\0132,.google.cloud.documenta" - + "i.v1beta2.InputConfig\022D\n\routput_config\030\002" - + " \001(\0132-.google.cloud.documentai.v1beta2.O" - + "utputConfig\"#\n\tOcrParams\022\026\n\016language_hin" - + "ts\030\001 \003(\t\"\255\001\n\025TableExtractionParams\022\017\n\007en" - + "abled\030\001 \001(\010\022P\n\021table_bound_hints\030\002 \003(\0132/" - + ".google.cloud.documentai.v1beta2.TableBo" - + "undHintB\004\342A\001\001\022\032\n\014header_hints\030\003 \003(\tB\004\342A\001" - + "\001\022\025\n\rmodel_version\030\004 \001(\t\"p\n\016TableBoundHi" - + "nt\022\031\n\013page_number\030\001 \001(\005B\004\342A\001\001\022C\n\014boundin" - + "g_box\030\002 \001(\0132-.google.cloud.documentai.v1" - + "beta2.BoundingPoly\"\217\001\n\024FormExtractionPar" - + "ams\022\017\n\007enabled\030\001 \001(\010\022O\n\024key_value_pair_h" - + "ints\030\002 \003(\01321.google.cloud.documentai.v1b" - + "eta2.KeyValuePairHint\022\025\n\rmodel_version\030\003" - + " \001(\t\"4\n\020KeyValuePairHint\022\013\n\003key\030\001 \001(\t\022\023\n" - + "\013value_types\030\002 \003(\t\"@\n\026EntityExtractionPa" - + "rams\022\017\n\007enabled\030\001 \001(\010\022\025\n\rmodel_version\030\002" - + " \001(\t\"\035\n\014AutoMlParams\022\r\n\005model\030\001 \001(\t\"\206\001\n\013" - + "InputConfig\022@\n\ngcs_source\030\001 \001(\0132*.google" - + ".cloud.documentai.v1beta2.GcsSourceH\000\022\022\n" - + "\010contents\030\003 \001(\014H\000\022\027\n\tmime_type\030\002 \001(\tB\004\342A" - + "\001\002B\010\n\006source\"\202\001\n\014OutputConfig\022J\n\017gcs_des" - + "tination\030\001 \001(\0132/.google.cloud.documentai" - + ".v1beta2.GcsDestinationH\000\022\027\n\017pages_per_s" - + "hard\030\002 \001(\005B\r\n\013destination\"\036\n\tGcsSource\022\021" - + "\n\003uri\030\001 \001(\tB\004\342A\001\002\"#\n\016GcsDestination\022\021\n\003u" - + "ri\030\001 \001(\tB\004\342A\001\002\"\307\002\n\021OperationMetadata\022G\n\005" - + "state\030\001 \001(\01628.google.cloud.documentai.v1" - + "beta2.OperationMetadata.State\022\025\n\rstate_m" - + "essage\030\002 \001(\t\022/\n\013create_time\030\003 \001(\0132\032.goog" - + "le.protobuf.Timestamp\022/\n\013update_time\030\004 \001" - + "(\0132\032.google.protobuf.Timestamp\"p\n\005State\022" - + "\025\n\021STATE_UNSPECIFIED\020\000\022\014\n\010ACCEPTED\020\001\022\013\n\007" - + "WAITING\020\002\022\013\n\007RUNNING\020\003\022\r\n\tSUCCEEDED\020\004\022\r\n" - + "\tCANCELLED\020\005\022\n\n\006FAILED\020\0062\240\005\n\034DocumentUnd" - + "erstandingService\022\274\002\n\025BatchProcessDocume" - + "nts\022=.google.cloud.documentai.v1beta2.Ba" - + "tchProcessDocumentsRequest\032\035.google.long" - + "running.Operation\"\304\001\312A2\n\035BatchProcessDoc" - + "umentsResponse\022\021OperationMetadata\332A\010requ" - + "ests\202\323\344\223\002~\"?/v1beta2/{parent=projects/*/" - + "locations/*}/documents:batchProcess:\001*Z8" - + "\"3/v1beta2/{parent=projects/*}/documents" - + ":batchProcess:\001*\022\361\001\n\017ProcessDocument\0227.g" - + "oogle.cloud.documentai.v1beta2.ProcessDo" - + "cumentRequest\032).google.cloud.documentai." - + "v1beta2.Document\"z\202\323\344\223\002t\":/v1beta2/{pare" - + "nt=projects/*/locations/*}/documents:pro" - + "cess:\001*Z3\"./v1beta2/{parent=projects/*}/" - + "documents:process:\001*\032M\312A\031documentai.goog" - + "leapis.com\322A.https://www.googleapis.com/" - + "auth/cloud-platformB\346\001\n#com.google.cloud" - + ".documentai.v1beta2B\017DocumentAiProtoP\001ZC" - + "cloud.google.com/go/documentai/apiv1beta" - + "2/documentaipb;documentaipb\252\002\037Google.Clo" - + "ud.DocumentAI.V1Beta2\312\002\037Google\\Cloud\\Doc" - + "umentAI\\V1beta2\352\002\"Google::Cloud::Documen" - + "tAI::V1beta2b\006proto3" + + "ntai.v1beta2.OutputConfig\022\025\n\rdocument_ty" + + "pe\030\003 \001(\t\022W\n\027table_extraction_params\030\004 \001(" + + "\01326.google.cloud.documentai.v1beta2.Tabl" + + "eExtractionParams\022U\n\026form_extraction_par" + + "ams\030\005 \001(\01325.google.cloud.documentai.v1be" + + "ta2.FormExtractionParams\022Y\n\030entity_extra" + + "ction_params\030\006 \001(\01327.google.cloud.docume" + + "ntai.v1beta2.EntityExtractionParams\022>\n\no" + + "cr_params\030\007 \001(\0132*.google.cloud.documenta" + + "i.v1beta2.OcrParams\022D\n\rautoml_params\030\010 \001" + + "(\0132-.google.cloud.documentai.v1beta2.Aut" + + "oMlParams\"l\n\035BatchProcessDocumentsRespon" + + "se\022K\n\tresponses\030\001 \003(\01328.google.cloud.doc" + + "umentai.v1beta2.ProcessDocumentResponse\"" + + "\243\001\n\027ProcessDocumentResponse\022B\n\014input_con" + + "fig\030\001 \001(\0132,.google.cloud.documentai.v1be" + + "ta2.InputConfig\022D\n\routput_config\030\002 \001(\0132-" + + ".google.cloud.documentai.v1beta2.OutputC" + + "onfig\"#\n\tOcrParams\022\026\n\016language_hints\030\001 \003" + + "(\t\"\255\001\n\025TableExtractionParams\022\017\n\007enabled\030" + + "\001 \001(\010\022P\n\021table_bound_hints\030\002 \003(\0132/.googl" + + "e.cloud.documentai.v1beta2.TableBoundHin" + + "tB\004\342A\001\001\022\032\n\014header_hints\030\003 \003(\tB\004\342A\001\001\022\025\n\rm" + + "odel_version\030\004 \001(\t\"p\n\016TableBoundHint\022\031\n\013" + + "page_number\030\001 \001(\005B\004\342A\001\001\022C\n\014bounding_box\030" + + "\002 \001(\0132-.google.cloud.documentai.v1beta2." + + "BoundingPoly\"\217\001\n\024FormExtractionParams\022\017\n" + + "\007enabled\030\001 \001(\010\022O\n\024key_value_pair_hints\030\002" + + " \003(\01321.google.cloud.documentai.v1beta2.K" + + "eyValuePairHint\022\025\n\rmodel_version\030\003 \001(\t\"4" + + "\n\020KeyValuePairHint\022\013\n\003key\030\001 \001(\t\022\023\n\013value" + + "_types\030\002 \003(\t\"@\n\026EntityExtractionParams\022\017" + + "\n\007enabled\030\001 \001(\010\022\025\n\rmodel_version\030\002 \001(\t\"\035" + + "\n\014AutoMlParams\022\r\n\005model\030\001 \001(\t\"\206\001\n\013InputC" + + "onfig\022@\n\ngcs_source\030\001 \001(\0132*.google.cloud" + + ".documentai.v1beta2.GcsSourceH\000\022\022\n\010conte" + + "nts\030\003 \001(\014H\000\022\027\n\tmime_type\030\002 \001(\tB\004\342A\001\002B\010\n\006" + + "source\"\202\001\n\014OutputConfig\022J\n\017gcs_destinati" + + "on\030\001 \001(\0132/.google.cloud.documentai.v1bet" + + "a2.GcsDestinationH\000\022\027\n\017pages_per_shard\030\002" + + " \001(\005B\r\n\013destination\"\036\n\tGcsSource\022\021\n\003uri\030" + + "\001 \001(\tB\004\342A\001\002\"#\n\016GcsDestination\022\021\n\003uri\030\001 \001" + + "(\tB\004\342A\001\002\"\307\002\n\021OperationMetadata\022G\n\005state\030" + + "\001 \001(\01628.google.cloud.documentai.v1beta2." + + "OperationMetadata.State\022\025\n\rstate_message" + + "\030\002 \001(\t\022/\n\013create_time\030\003 \001(\0132\032.google.pro" + + "tobuf.Timestamp\022/\n\013update_time\030\004 \001(\0132\032.g" + + "oogle.protobuf.Timestamp\"p\n\005State\022\025\n\021STA" + + "TE_UNSPECIFIED\020\000\022\014\n\010ACCEPTED\020\001\022\013\n\007WAITIN" + + "G\020\002\022\013\n\007RUNNING\020\003\022\r\n\tSUCCEEDED\020\004\022\r\n\tCANCE" + + "LLED\020\005\022\n\n\006FAILED\020\0062\240\005\n\034DocumentUnderstan" + + "dingService\022\274\002\n\025BatchProcessDocuments\022=." + + "google.cloud.documentai.v1beta2.BatchPro" + + "cessDocumentsRequest\032\035.google.longrunnin" + + "g.Operation\"\304\001\312A2\n\035BatchProcessDocuments" + + "Response\022\021OperationMetadata\332A\010requests\202\323" + + "\344\223\002~\"?/v1beta2/{parent=projects/*/locati" + + "ons/*}/documents:batchProcess:\001*Z8\"3/v1b" + + "eta2/{parent=projects/*}/documents:batch" + + "Process:\001*\022\361\001\n\017ProcessDocument\0227.google." + + "cloud.documentai.v1beta2.ProcessDocument" + + "Request\032).google.cloud.documentai.v1beta" + + "2.Document\"z\202\323\344\223\002t\":/v1beta2/{parent=pro" + + "jects/*/locations/*}/documents:process:\001" + + "*Z3\"./v1beta2/{parent=projects/*}/docume" + + "nts:process:\001*\032M\312A\031documentai.googleapis" + + ".com\322A.https://www.googleapis.com/auth/c" + + "loud-platformB\346\001\n#com.google.cloud.docum" + + "entai.v1beta2B\017DocumentAiProtoP\001ZCcloud." + + "google.com/go/documentai/apiv1beta2/docu" + + "mentaipb;documentaipb\252\002\037Google.Cloud.Doc" + + "umentAI.V1Beta2\312\002\037Google\\Cloud\\DocumentA" + + "I\\V1beta2\352\002\"Google::Cloud::DocumentAI::V" + + "1beta2b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/DocumentOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/DocumentOrBuilder.java index 6197a3e1b9a2..164834e7e8af 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/DocumentOrBuilder.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/DocumentOrBuilder.java @@ -27,14 +27,13 @@ public interface DocumentOrBuilder * * *
-   * Currently supports Google Cloud Storage URI of the form
-   *    `gs://bucket_name/object_name`. Object versioning is not supported.
-   *    See [Google Cloud Storage Request
-   *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
-   *    info.
+   * Optional. Currently supports Google Cloud Storage URI of the form
+   * `gs://bucket_name/object_name`. Object versioning is not supported.
+   * For more information, refer to [Google Cloud Storage Request
+   * URIs](https://cloud.google.com/storage/docs/reference-uris).
    * 
* - * string uri = 1; + * string uri = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return Whether the uri field is set. */ @@ -43,14 +42,13 @@ public interface DocumentOrBuilder * * *
-   * Currently supports Google Cloud Storage URI of the form
-   *    `gs://bucket_name/object_name`. Object versioning is not supported.
-   *    See [Google Cloud Storage Request
-   *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
-   *    info.
+   * Optional. Currently supports Google Cloud Storage URI of the form
+   * `gs://bucket_name/object_name`. Object versioning is not supported.
+   * For more information, refer to [Google Cloud Storage Request
+   * URIs](https://cloud.google.com/storage/docs/reference-uris).
    * 
* - * string uri = 1; + * string uri = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The uri. */ @@ -59,14 +57,13 @@ public interface DocumentOrBuilder * * *
-   * Currently supports Google Cloud Storage URI of the form
-   *    `gs://bucket_name/object_name`. Object versioning is not supported.
-   *    See [Google Cloud Storage Request
-   *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
-   *    info.
+   * Optional. Currently supports Google Cloud Storage URI of the form
+   * `gs://bucket_name/object_name`. Object versioning is not supported.
+   * For more information, refer to [Google Cloud Storage Request
+   * URIs](https://cloud.google.com/storage/docs/reference-uris).
    * 
* - * string uri = 1; + * string uri = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for uri. */ @@ -76,12 +73,12 @@ public interface DocumentOrBuilder * * *
-   * Inline document content, represented as a stream of bytes.
+   * Optional. Inline document content, represented as a stream of bytes.
    * Note: As with all `bytes` fields, protobuffers use a pure binary
    * representation, whereas JSON representations use base64.
    * 
* - * bytes content = 2; + * bytes content = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return Whether the content field is set. */ @@ -90,12 +87,12 @@ public interface DocumentOrBuilder * * *
-   * Inline document content, represented as a stream of bytes.
+   * Optional. Inline document content, represented as a stream of bytes.
    * Note: As with all `bytes` fields, protobuffers use a pure binary
    * representation, whereas JSON representations use base64.
    * 
* - * bytes content = 2; + * bytes content = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The content. */ @@ -105,9 +102,8 @@ public interface DocumentOrBuilder * * *
-   * An IANA published MIME type (also referred to as media type). For more
-   * information, see
-   * https://www.iana.org/assignments/media-types/media-types.xhtml.
+   * An IANA published [media type (MIME
+   * type)](https://www.iana.org/assignments/media-types/media-types.xhtml).
    * 
* * string mime_type = 3; @@ -119,9 +115,8 @@ public interface DocumentOrBuilder * * *
-   * An IANA published MIME type (also referred to as media type). For more
-   * information, see
-   * https://www.iana.org/assignments/media-types/media-types.xhtml.
+   * An IANA published [media type (MIME
+   * type)](https://www.iana.org/assignments/media-types/media-types.xhtml).
    * 
* * string mime_type = 3; @@ -134,10 +129,10 @@ public interface DocumentOrBuilder * * *
-   * UTF-8 encoded text in reading order from the document.
+   * Optional. UTF-8 encoded text in reading order from the document.
    * 
* - * string text = 4; + * string text = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The text. */ @@ -146,10 +141,10 @@ public interface DocumentOrBuilder * * *
-   * UTF-8 encoded text in reading order from the document.
+   * Optional. UTF-8 encoded text in reading order from the document.
    * 
* - * string text = 4; + * string text = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for text. */ @@ -159,59 +154,80 @@ public interface DocumentOrBuilder * * *
-   * Styles for the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+   * Styles for the
+   * [Document.text][google.cloud.documentai.v1beta2.Document.text].
    * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5; + * + * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5 [deprecated = true]; + * */ + @java.lang.Deprecated java.util.List getTextStylesList(); /** * * *
-   * Styles for the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+   * Styles for the
+   * [Document.text][google.cloud.documentai.v1beta2.Document.text].
    * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5; + * + * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5 [deprecated = true]; + * */ + @java.lang.Deprecated com.google.cloud.documentai.v1beta2.Document.Style getTextStyles(int index); /** * * *
-   * Styles for the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+   * Styles for the
+   * [Document.text][google.cloud.documentai.v1beta2.Document.text].
    * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5; + * + * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5 [deprecated = true]; + * */ + @java.lang.Deprecated int getTextStylesCount(); /** * * *
-   * Styles for the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+   * Styles for the
+   * [Document.text][google.cloud.documentai.v1beta2.Document.text].
    * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5; + * + * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5 [deprecated = true]; + * */ + @java.lang.Deprecated java.util.List getTextStylesOrBuilderList(); /** * * *
-   * Styles for the [Document.text][google.cloud.documentai.v1beta2.Document.text].
+   * Styles for the
+   * [Document.text][google.cloud.documentai.v1beta2.Document.text].
    * 
* - * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5; + * + * repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5 [deprecated = true]; + * */ + @java.lang.Deprecated com.google.cloud.documentai.v1beta2.Document.StyleOrBuilder getTextStylesOrBuilder(int index); /** * * *
-   * Visual page layout for the [Document][google.cloud.documentai.v1beta2.Document].
+   * Visual page layout for the
+   * [Document][google.cloud.documentai.v1beta2.Document].
    * 
* * repeated .google.cloud.documentai.v1beta2.Document.Page pages = 6; @@ -221,7 +237,8 @@ public interface DocumentOrBuilder * * *
-   * Visual page layout for the [Document][google.cloud.documentai.v1beta2.Document].
+   * Visual page layout for the
+   * [Document][google.cloud.documentai.v1beta2.Document].
    * 
* * repeated .google.cloud.documentai.v1beta2.Document.Page pages = 6; @@ -231,7 +248,8 @@ public interface DocumentOrBuilder * * *
-   * Visual page layout for the [Document][google.cloud.documentai.v1beta2.Document].
+   * Visual page layout for the
+   * [Document][google.cloud.documentai.v1beta2.Document].
    * 
* * repeated .google.cloud.documentai.v1beta2.Document.Page pages = 6; @@ -241,7 +259,8 @@ public interface DocumentOrBuilder * * *
-   * Visual page layout for the [Document][google.cloud.documentai.v1beta2.Document].
+   * Visual page layout for the
+   * [Document][google.cloud.documentai.v1beta2.Document].
    * 
* * repeated .google.cloud.documentai.v1beta2.Document.Page pages = 6; @@ -252,7 +271,8 @@ public interface DocumentOrBuilder * * *
-   * Visual page layout for the [Document][google.cloud.documentai.v1beta2.Document].
+   * Visual page layout for the
+   * [Document][google.cloud.documentai.v1beta2.Document].
    * 
* * repeated .google.cloud.documentai.v1beta2.Document.Page pages = 6; @@ -263,8 +283,9 @@ public interface DocumentOrBuilder * * *
-   * A list of entities detected on [Document.text][google.cloud.documentai.v1beta2.Document.text]. For document shards,
-   * entities in this list may cross shard boundaries.
+   * A list of entities detected on
+   * [Document.text][google.cloud.documentai.v1beta2.Document.text]. For
+   * document shards, entities in this list may cross shard boundaries.
    * 
* * repeated .google.cloud.documentai.v1beta2.Document.Entity entities = 7; @@ -274,8 +295,9 @@ public interface DocumentOrBuilder * * *
-   * A list of entities detected on [Document.text][google.cloud.documentai.v1beta2.Document.text]. For document shards,
-   * entities in this list may cross shard boundaries.
+   * A list of entities detected on
+   * [Document.text][google.cloud.documentai.v1beta2.Document.text]. For
+   * document shards, entities in this list may cross shard boundaries.
    * 
* * repeated .google.cloud.documentai.v1beta2.Document.Entity entities = 7; @@ -285,8 +307,9 @@ public interface DocumentOrBuilder * * *
-   * A list of entities detected on [Document.text][google.cloud.documentai.v1beta2.Document.text]. For document shards,
-   * entities in this list may cross shard boundaries.
+   * A list of entities detected on
+   * [Document.text][google.cloud.documentai.v1beta2.Document.text]. For
+   * document shards, entities in this list may cross shard boundaries.
    * 
* * repeated .google.cloud.documentai.v1beta2.Document.Entity entities = 7; @@ -296,8 +319,9 @@ public interface DocumentOrBuilder * * *
-   * A list of entities detected on [Document.text][google.cloud.documentai.v1beta2.Document.text]. For document shards,
-   * entities in this list may cross shard boundaries.
+   * A list of entities detected on
+   * [Document.text][google.cloud.documentai.v1beta2.Document.text]. For
+   * document shards, entities in this list may cross shard boundaries.
    * 
* * repeated .google.cloud.documentai.v1beta2.Document.Entity entities = 7; @@ -308,8 +332,9 @@ public interface DocumentOrBuilder * * *
-   * A list of entities detected on [Document.text][google.cloud.documentai.v1beta2.Document.text]. For document shards,
-   * entities in this list may cross shard boundaries.
+   * A list of entities detected on
+   * [Document.text][google.cloud.documentai.v1beta2.Document.text]. For
+   * document shards, entities in this list may cross shard boundaries.
    * 
* * repeated .google.cloud.documentai.v1beta2.Document.Entity entities = 7; @@ -320,7 +345,8 @@ public interface DocumentOrBuilder * * *
-   * Relationship among [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
+   * Placeholder.  Relationship among
+   * [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
    * 
* * repeated .google.cloud.documentai.v1beta2.Document.EntityRelation entity_relations = 8; @@ -332,7 +358,8 @@ public interface DocumentOrBuilder * * *
-   * Relationship among [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
+   * Placeholder.  Relationship among
+   * [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
    * 
* * repeated .google.cloud.documentai.v1beta2.Document.EntityRelation entity_relations = 8; @@ -343,7 +370,8 @@ public interface DocumentOrBuilder * * *
-   * Relationship among [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
+   * Placeholder.  Relationship among
+   * [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
    * 
* * repeated .google.cloud.documentai.v1beta2.Document.EntityRelation entity_relations = 8; @@ -354,7 +382,8 @@ public interface DocumentOrBuilder * * *
-   * Relationship among [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
+   * Placeholder.  Relationship among
+   * [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
    * 
* * repeated .google.cloud.documentai.v1beta2.Document.EntityRelation entity_relations = 8; @@ -366,7 +395,8 @@ public interface DocumentOrBuilder * * *
-   * Relationship among [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
+   * Placeholder.  Relationship among
+   * [Document.entities][google.cloud.documentai.v1beta2.Document.entities].
    * 
* * repeated .google.cloud.documentai.v1beta2.Document.EntityRelation entity_relations = 8; @@ -375,6 +405,74 @@ public interface DocumentOrBuilder com.google.cloud.documentai.v1beta2.Document.EntityRelationOrBuilder getEntityRelationsOrBuilder( int index); + /** + * + * + *
+   * Placeholder.  A list of text corrections made to
+   * [Document.text][google.cloud.documentai.v1beta2.Document.text].  This is
+   * usually used for annotating corrections to OCR mistakes.  Text changes for
+   * a given revision may not overlap with each other.
+   * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.TextChange text_changes = 14; + */ + java.util.List getTextChangesList(); + /** + * + * + *
+   * Placeholder.  A list of text corrections made to
+   * [Document.text][google.cloud.documentai.v1beta2.Document.text].  This is
+   * usually used for annotating corrections to OCR mistakes.  Text changes for
+   * a given revision may not overlap with each other.
+   * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.TextChange text_changes = 14; + */ + com.google.cloud.documentai.v1beta2.Document.TextChange getTextChanges(int index); + /** + * + * + *
+   * Placeholder.  A list of text corrections made to
+   * [Document.text][google.cloud.documentai.v1beta2.Document.text].  This is
+   * usually used for annotating corrections to OCR mistakes.  Text changes for
+   * a given revision may not overlap with each other.
+   * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.TextChange text_changes = 14; + */ + int getTextChangesCount(); + /** + * + * + *
+   * Placeholder.  A list of text corrections made to
+   * [Document.text][google.cloud.documentai.v1beta2.Document.text].  This is
+   * usually used for annotating corrections to OCR mistakes.  Text changes for
+   * a given revision may not overlap with each other.
+   * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.TextChange text_changes = 14; + */ + java.util.List + getTextChangesOrBuilderList(); + /** + * + * + *
+   * Placeholder.  A list of text corrections made to
+   * [Document.text][google.cloud.documentai.v1beta2.Document.text].  This is
+   * usually used for annotating corrections to OCR mistakes.  Text changes for
+   * a given revision may not overlap with each other.
+   * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.TextChange text_changes = 14; + */ + com.google.cloud.documentai.v1beta2.Document.TextChangeOrBuilder getTextChangesOrBuilder( + int index); + /** * * @@ -500,5 +598,57 @@ com.google.cloud.documentai.v1beta2.Document.EntityRelationOrBuilder getEntityRe */ com.google.rpc.StatusOrBuilder getErrorOrBuilder(); + /** + * + * + *
+   * Placeholder. Revision history of this document.
+   * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Revision revisions = 13; + */ + java.util.List getRevisionsList(); + /** + * + * + *
+   * Placeholder. Revision history of this document.
+   * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Revision revisions = 13; + */ + com.google.cloud.documentai.v1beta2.Document.Revision getRevisions(int index); + /** + * + * + *
+   * Placeholder. Revision history of this document.
+   * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Revision revisions = 13; + */ + int getRevisionsCount(); + /** + * + * + *
+   * Placeholder. Revision history of this document.
+   * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Revision revisions = 13; + */ + java.util.List + getRevisionsOrBuilderList(); + /** + * + * + *
+   * Placeholder. Revision history of this document.
+   * 
+ * + * repeated .google.cloud.documentai.v1beta2.Document.Revision revisions = 13; + */ + com.google.cloud.documentai.v1beta2.Document.RevisionOrBuilder getRevisionsOrBuilder(int index); + com.google.cloud.documentai.v1beta2.Document.SourceCase getSourceCase(); } diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/DocumentProto.java b/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/DocumentProto.java index 68b6116eb8ca..f92e5b4514e5 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/DocumentProto.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/DocumentProto.java @@ -55,6 +55,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_documentai_v1beta2_Document_Page_Dimension_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_documentai_v1beta2_Document_Page_Dimension_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta2_Document_Page_Image_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta2_Document_Page_Image_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta2_Document_Page_Matrix_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta2_Document_Page_Matrix_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_documentai_v1beta2_Document_Page_Layout_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -79,6 +87,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_documentai_v1beta2_Document_Page_Token_DetectedBreak_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_documentai_v1beta2_Document_Page_Token_DetectedBreak_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta2_Document_Page_Token_StyleInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta2_Document_Page_Token_StyleInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta2_Document_Page_Symbol_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta2_Document_Page_Symbol_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_documentai_v1beta2_Document_Page_VisualElement_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -99,14 +115,30 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_documentai_v1beta2_Document_Page_FormField_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_documentai_v1beta2_Document_Page_FormField_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta2_Document_Page_DetectedBarcode_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta2_Document_Page_DetectedBarcode_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_documentai_v1beta2_Document_Page_DetectedLanguage_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_documentai_v1beta2_Document_Page_DetectedLanguage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta2_Document_Page_ImageQualityScores_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta2_Document_Page_ImageQualityScores_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta2_Document_Page_ImageQualityScores_DetectedDefect_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta2_Document_Page_ImageQualityScores_DetectedDefect_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_documentai_v1beta2_Document_Entity_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_documentai_v1beta2_Document_Entity_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta2_Document_Entity_NormalizedValue_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta2_Document_Entity_NormalizedValue_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_documentai_v1beta2_Document_EntityRelation_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -127,6 +159,26 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_documentai_v1beta2_Document_PageAnchor_PageRef_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_documentai_v1beta2_Document_PageAnchor_PageRef_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta2_Document_Provenance_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta2_Document_Provenance_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta2_Document_Provenance_Parent_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta2_Document_Provenance_Parent_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta2_Document_Revision_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta2_Document_Revision_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta2_Document_Revision_HumanReview_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta2_Document_Revision_HumanReview_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta2_Document_TextChange_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta2_Document_TextChange_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -138,27 +190,36 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n.google/cloud/documentai/v1beta2/docume" + "nt.proto\022\037google.cloud.documentai.v1beta" - + "2\032\037google/api/field_behavior.proto\032.goog" - + "le/cloud/documentai/v1beta2/geometry.pro" + + "2\032\037google/api/field_behavior.proto\032-goog" + + "le/cloud/documentai/v1beta2/barcode.prot" + + "o\032.google/cloud/documentai/v1beta2/geome" + + "try.proto\032\037google/protobuf/timestamp.pro" + "to\032\027google/rpc/status.proto\032\027google/type" - + "/color.proto\"\203+\n\010Document\022\r\n\003uri\030\001 \001(\tH\000" - + "\022\021\n\007content\030\002 \001(\014H\000\022\021\n\tmime_type\030\003 \001(\t\022\014" - + "\n\004text\030\004 \001(\t\022D\n\013text_styles\030\005 \003(\0132/.goog" - + "le.cloud.documentai.v1beta2.Document.Sty" - + "le\022=\n\005pages\030\006 \003(\0132..google.cloud.documen" - + "tai.v1beta2.Document.Page\022B\n\010entities\030\007 " - + "\003(\01320.google.cloud.documentai.v1beta2.Do" - + "cument.Entity\022R\n\020entity_relations\030\010 \003(\0132" - + "8.google.cloud.documentai.v1beta2.Docume" - + "nt.EntityRelation\022G\n\nshard_info\030\t \001(\01323." - + "google.cloud.documentai.v1beta2.Document" - + ".ShardInfo\022?\n\006labels\030\013 \003(\0132/.google.clou" - + "d.documentai.v1beta2.Document.Label\022!\n\005e" - + "rror\030\n \001(\0132\022.google.rpc.Status\032J\n\tShardI" + + "/color.proto\032\026google/type/date.proto\032\032go" + + "ogle/type/datetime.proto\032\027google/type/mo" + + "ney.proto\032 google/type/postal_address.pr" + + "oto\"\252I\n\010Document\022\023\n\003uri\030\001 \001(\tB\004\342A\001\001H\000\022\027\n" + + "\007content\030\002 \001(\014B\004\342A\001\001H\000\022\021\n\tmime_type\030\003 \001(" + + "\t\022\022\n\004text\030\004 \001(\tB\004\342A\001\001\022H\n\013text_styles\030\005 \003" + + "(\0132/.google.cloud.documentai.v1beta2.Doc" + + "ument.StyleB\002\030\001\022=\n\005pages\030\006 \003(\0132..google." + + "cloud.documentai.v1beta2.Document.Page\022B" + + "\n\010entities\030\007 \003(\01320.google.cloud.document" + + "ai.v1beta2.Document.Entity\022R\n\020entity_rel" + + "ations\030\010 \003(\01328.google.cloud.documentai.v" + + "1beta2.Document.EntityRelation\022J\n\014text_c" + + "hanges\030\016 \003(\01324.google.cloud.documentai.v" + + "1beta2.Document.TextChange\022G\n\nshard_info" + + "\030\t \001(\01323.google.cloud.documentai.v1beta2" + + ".Document.ShardInfo\022?\n\006labels\030\013 \003(\0132/.go" + + "ogle.cloud.documentai.v1beta2.Document.L" + + "abel\022!\n\005error\030\n \001(\0132\022.google.rpc.Status\022" + + "E\n\trevisions\030\r \003(\01322.google.cloud.docume" + + "ntai.v1beta2.Document.Revision\032J\n\tShardI" + "nfo\022\023\n\013shard_index\030\001 \001(\003\022\023\n\013shard_count\030" + "\002 \001(\003\022\023\n\013text_offset\030\003 \001(\003\032K\n\005Label\022\026\n\014a" + "utoml_model\030\002 \001(\tH\000\022\014\n\004name\030\001 \001(\t\022\022\n\ncon" - + "fidence\030\003 \001(\002B\010\n\006source\032\332\002\n\005Style\022I\n\013tex" + + "fidence\030\003 \001(\002B\010\n\006source\032\357\002\n\005Style\022I\n\013tex" + "t_anchor\030\001 \001(\01324.google.cloud.documentai" + ".v1beta2.Document.TextAnchor\022!\n\005color\030\002 " + "\001(\0132\022.google.type.Color\022,\n\020background_co" @@ -166,135 +227,233 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ight\030\004 \001(\t\022\022\n\ntext_style\030\005 \001(\t\022\027\n\017text_d" + "ecoration\030\006 \001(\t\022K\n\tfont_size\030\007 \001(\01328.goo" + "gle.cloud.documentai.v1beta2.Document.St" - + "yle.FontSize\032&\n\010FontSize\022\014\n\004size\030\001 \001(\002\022\014" - + "\n\004unit\030\002 \001(\t\032\326\033\n\004Page\022\023\n\013page_number\030\001 \001" - + "(\005\022K\n\tdimension\030\002 \001(\01328.google.cloud.doc" - + "umentai.v1beta2.Document.Page.Dimension\022" - + "E\n\006layout\030\003 \001(\01325.google.cloud.documenta" - + "i.v1beta2.Document.Page.Layout\022[\n\022detect" - + "ed_languages\030\004 \003(\0132?.google.cloud.docume" - + "ntai.v1beta2.Document.Page.DetectedLangu" - + "age\022D\n\006blocks\030\005 \003(\01324.google.cloud.docum" - + "entai.v1beta2.Document.Page.Block\022L\n\npar" - + "agraphs\030\006 \003(\01328.google.cloud.documentai." - + "v1beta2.Document.Page.Paragraph\022B\n\005lines" - + "\030\007 \003(\01323.google.cloud.documentai.v1beta2" - + ".Document.Page.Line\022D\n\006tokens\030\010 \003(\01324.go" - + "ogle.cloud.documentai.v1beta2.Document.P" - + "age.Token\022U\n\017visual_elements\030\t \003(\0132<.goo" - + "gle.cloud.documentai.v1beta2.Document.Pa" - + "ge.VisualElement\022D\n\006tables\030\n \003(\01324.googl" + + "yle.FontSize\022\023\n\013font_family\030\010 \001(\t\032&\n\010Fon" + + "tSize\022\014\n\004size\030\001 \001(\002\022\014\n\004unit\030\002 \001(\t\032\320+\n\004Pa" + + "ge\022\023\n\013page_number\030\001 \001(\005\022C\n\005image\030\r \001(\01324" + + ".google.cloud.documentai.v1beta2.Documen" + + "t.Page.Image\022I\n\ntransforms\030\016 \003(\01325.googl" + "e.cloud.documentai.v1beta2.Document.Page" - + ".Table\022M\n\013form_fields\030\013 \003(\01328.google.clo" - + "ud.documentai.v1beta2.Document.Page.Form" - + "Field\0328\n\tDimension\022\r\n\005width\030\001 \001(\002\022\016\n\006hei" - + "ght\030\002 \001(\002\022\014\n\004unit\030\003 \001(\t\032\376\002\n\006Layout\022I\n\013te" - + "xt_anchor\030\001 \001(\01324.google.cloud.documenta" - + "i.v1beta2.Document.TextAnchor\022\022\n\nconfide" - + "nce\030\002 \001(\002\022D\n\rbounding_poly\030\003 \001(\0132-.googl" - + "e.cloud.documentai.v1beta2.BoundingPoly\022" - + "V\n\013orientation\030\004 \001(\0162A.google.cloud.docu" - + "mentai.v1beta2.Document.Page.Layout.Orie" - + "ntation\022\020\n\002id\030\005 \001(\tB\004\342A\001\001\"e\n\013Orientation" - + "\022\033\n\027ORIENTATION_UNSPECIFIED\020\000\022\013\n\007PAGE_UP" - + "\020\001\022\016\n\nPAGE_RIGHT\020\002\022\r\n\tPAGE_DOWN\020\003\022\r\n\tPAG" - + "E_LEFT\020\004\032\253\001\n\005Block\022E\n\006layout\030\001 \001(\01325.goo" - + "gle.cloud.documentai.v1beta2.Document.Pa" - + "ge.Layout\022[\n\022detected_languages\030\002 \003(\0132?." + + ".Matrix\022K\n\tdimension\030\002 \001(\01328.google.clou" + + "d.documentai.v1beta2.Document.Page.Dimen" + + "sion\022E\n\006layout\030\003 \001(\01325.google.cloud.docu" + + "mentai.v1beta2.Document.Page.Layout\022[\n\022d" + + "etected_languages\030\004 \003(\0132?.google.cloud.d" + + "ocumentai.v1beta2.Document.Page.Detected" + + "Language\022D\n\006blocks\030\005 \003(\01324.google.cloud." + + "documentai.v1beta2.Document.Page.Block\022L" + + "\n\nparagraphs\030\006 \003(\01328.google.cloud.docume" + + "ntai.v1beta2.Document.Page.Paragraph\022B\n\005" + + "lines\030\007 \003(\01323.google.cloud.documentai.v1" + + "beta2.Document.Page.Line\022D\n\006tokens\030\010 \003(\013" + + "24.google.cloud.documentai.v1beta2.Docum" + + "ent.Page.Token\022U\n\017visual_elements\030\t \003(\0132" + + "<.google.cloud.documentai.v1beta2.Docume" + + "nt.Page.VisualElement\022D\n\006tables\030\n \003(\01324." + "google.cloud.documentai.v1beta2.Document" - + ".Page.DetectedLanguage\032\257\001\n\tParagraph\022E\n\006" - + "layout\030\001 \001(\01325.google.cloud.documentai.v" - + "1beta2.Document.Page.Layout\022[\n\022detected_" - + "languages\030\002 \003(\0132?.google.cloud.documenta" - + "i.v1beta2.Document.Page.DetectedLanguage" - + "\032\252\001\n\004Line\022E\n\006layout\030\001 \001(\01325.google.cloud" + + ".Page.Table\022M\n\013form_fields\030\013 \003(\01328.googl" + + "e.cloud.documentai.v1beta2.Document.Page" + + ".FormField\022F\n\007symbols\030\014 \003(\01325.google.clo" + + "ud.documentai.v1beta2.Document.Page.Symb" + + "ol\022Y\n\021detected_barcodes\030\017 \003(\0132>.google.c" + + "loud.documentai.v1beta2.Document.Page.De" + + "tectedBarcode\022_\n\024image_quality_scores\030\021 " + + "\001(\0132A.google.cloud.documentai.v1beta2.Do" + + "cument.Page.ImageQualityScores\022L\n\nproven" + + "ance\030\020 \001(\01324.google.cloud.documentai.v1b" + + "eta2.Document.ProvenanceB\002\030\001\0328\n\tDimensio" + + "n\022\r\n\005width\030\001 \001(\002\022\016\n\006height\030\002 \001(\002\022\014\n\004unit" + + "\030\003 \001(\t\032J\n\005Image\022\017\n\007content\030\001 \001(\014\022\021\n\tmime" + + "_type\030\002 \001(\t\022\r\n\005width\030\003 \001(\005\022\016\n\006height\030\004 \001" + + "(\005\032@\n\006Matrix\022\014\n\004rows\030\001 \001(\005\022\014\n\004cols\030\002 \001(\005" + + "\022\014\n\004type\030\003 \001(\005\022\014\n\004data\030\004 \001(\014\032\354\002\n\006Layout\022" + + "I\n\013text_anchor\030\001 \001(\01324.google.cloud.docu" + + "mentai.v1beta2.Document.TextAnchor\022\022\n\nco" + + "nfidence\030\002 \001(\002\022D\n\rbounding_poly\030\003 \001(\0132-." + + "google.cloud.documentai.v1beta2.Bounding" + + "Poly\022V\n\013orientation\030\004 \001(\0162A.google.cloud" + ".documentai.v1beta2.Document.Page.Layout" - + "\022[\n\022detected_languages\030\002 \003(\0132?.google.cl" - + "oud.documentai.v1beta2.Document.Page.Det" - + "ectedLanguage\032\265\003\n\005Token\022E\n\006layout\030\001 \001(\0132" - + "5.google.cloud.documentai.v1beta2.Docume" - + "nt.Page.Layout\022Z\n\016detected_break\030\002 \001(\0132B" - + ".google.cloud.documentai.v1beta2.Documen" - + "t.Page.Token.DetectedBreak\022[\n\022detected_l" - + "anguages\030\003 \003(\0132?.google.cloud.documentai" - + ".v1beta2.Document.Page.DetectedLanguage\032" - + "\253\001\n\rDetectedBreak\022U\n\004type\030\001 \001(\0162G.google" - + ".cloud.documentai.v1beta2.Document.Page." - + "Token.DetectedBreak.Type\"C\n\004Type\022\024\n\020TYPE" - + "_UNSPECIFIED\020\000\022\t\n\005SPACE\020\001\022\016\n\nWIDE_SPACE\020" - + "\002\022\n\n\006HYPHEN\020\003\032\301\001\n\rVisualElement\022E\n\006layou" - + "t\030\001 \001(\01325.google.cloud.documentai.v1beta" - + "2.Document.Page.Layout\022\014\n\004type\030\002 \001(\t\022[\n\022" - + "detected_languages\030\003 \003(\0132?.google.cloud." + + ".Orientation\"e\n\013Orientation\022\033\n\027ORIENTATI" + + "ON_UNSPECIFIED\020\000\022\013\n\007PAGE_UP\020\001\022\016\n\nPAGE_RI" + + "GHT\020\002\022\r\n\tPAGE_DOWN\020\003\022\r\n\tPAGE_LEFT\020\004\032\371\001\n\005" + + "Block\022E\n\006layout\030\001 \001(\01325.google.cloud.doc" + + "umentai.v1beta2.Document.Page.Layout\022[\n\022" + + "detected_languages\030\002 \003(\0132?.google.cloud." + "documentai.v1beta2.Document.Page.Detecte" - + "dLanguage\032\202\005\n\005Table\022E\n\006layout\030\001 \001(\01325.go" + + "dLanguage\022L\n\nprovenance\030\003 \001(\01324.google.c" + + "loud.documentai.v1beta2.Document.Provena" + + "nceB\002\030\001\032\375\001\n\tParagraph\022E\n\006layout\030\001 \001(\01325." + + "google.cloud.documentai.v1beta2.Document" + + ".Page.Layout\022[\n\022detected_languages\030\002 \003(\013" + + "2?.google.cloud.documentai.v1beta2.Docum" + + "ent.Page.DetectedLanguage\022L\n\nprovenance\030" + + "\003 \001(\01324.google.cloud.documentai.v1beta2." + + "Document.ProvenanceB\002\030\001\032\370\001\n\004Line\022E\n\006layo" + + "ut\030\001 \001(\01325.google.cloud.documentai.v1bet" + + "a2.Document.Page.Layout\022[\n\022detected_lang" + + "uages\030\002 \003(\0132?.google.cloud.documentai.v1" + + "beta2.Document.Page.DetectedLanguage\022L\n\n" + + "provenance\030\003 \001(\01324.google.cloud.document" + + "ai.v1beta2.Document.ProvenanceB\002\030\001\032\274\007\n\005T" + + "oken\022E\n\006layout\030\001 \001(\01325.google.cloud.docu" + + "mentai.v1beta2.Document.Page.Layout\022Z\n\016d" + + "etected_break\030\002 \001(\0132B.google.cloud.docum" + + "entai.v1beta2.Document.Page.Token.Detect" + + "edBreak\022[\n\022detected_languages\030\003 \003(\0132?.go" + "ogle.cloud.documentai.v1beta2.Document.P" - + "age.Layout\022R\n\013header_rows\030\002 \003(\0132=.google" - + ".cloud.documentai.v1beta2.Document.Page." - + "Table.TableRow\022P\n\tbody_rows\030\003 \003(\0132=.goog" - + "le.cloud.documentai.v1beta2.Document.Pag" - + "e.Table.TableRow\022[\n\022detected_languages\030\004" - + " \003(\0132?.google.cloud.documentai.v1beta2.D" - + "ocument.Page.DetectedLanguage\032Y\n\010TableRo" - + "w\022M\n\005cells\030\001 \003(\0132>.google.cloud.document" - + "ai.v1beta2.Document.Page.Table.TableCell" - + "\032\323\001\n\tTableCell\022E\n\006layout\030\001 \001(\01325.google." + + "age.DetectedLanguage\022L\n\nprovenance\030\004 \001(\013" + + "24.google.cloud.documentai.v1beta2.Docum" + + "ent.ProvenanceB\002\030\001\022R\n\nstyle_info\030\005 \001(\0132>" + + ".google.cloud.documentai.v1beta2.Documen" + + "t.Page.Token.StyleInfo\032\253\001\n\rDetectedBreak" + + "\022U\n\004type\030\001 \001(\0162G.google.cloud.documentai" + + ".v1beta2.Document.Page.Token.DetectedBre" + + "ak.Type\"C\n\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022\t\n" + + "\005SPACE\020\001\022\016\n\nWIDE_SPACE\020\002\022\n\n\006HYPHEN\020\003\032\342\002\n" + + "\tStyleInfo\022\021\n\tfont_size\030\001 \001(\005\022\027\n\017pixel_f" + + "ont_size\030\002 \001(\001\022\026\n\016letter_spacing\030\003 \001(\001\022\021" + + "\n\tfont_type\030\004 \001(\t\022\014\n\004bold\030\005 \001(\010\022\016\n\006itali" + + "c\030\006 \001(\010\022\022\n\nunderlined\030\007 \001(\010\022\021\n\tstrikeout" + + "\030\010 \001(\010\022\021\n\tsubscript\030\t \001(\010\022\023\n\013superscript" + + "\030\n \001(\010\022\021\n\tsmallcaps\030\013 \001(\010\022\023\n\013font_weight" + + "\030\014 \001(\005\022\023\n\013handwritten\030\r \001(\010\022&\n\ntext_colo" + + "r\030\016 \001(\0132\022.google.type.Color\022,\n\020backgroun" + + "d_color\030\017 \001(\0132\022.google.type.Color\032\254\001\n\006Sy" + + "mbol\022E\n\006layout\030\001 \001(\01325.google.cloud.docu" + + "mentai.v1beta2.Document.Page.Layout\022[\n\022d" + + "etected_languages\030\002 \003(\0132?.google.cloud.d" + + "ocumentai.v1beta2.Document.Page.Detected" + + "Language\032\301\001\n\rVisualElement\022E\n\006layout\030\001 \001" + + "(\01325.google.cloud.documentai.v1beta2.Doc" + + "ument.Page.Layout\022\014\n\004type\030\002 \001(\t\022[\n\022detec" + + "ted_languages\030\003 \003(\0132?.google.cloud.docum" + + "entai.v1beta2.Document.Page.DetectedLang" + + "uage\032\320\005\n\005Table\022E\n\006layout\030\001 \001(\01325.google." + "cloud.documentai.v1beta2.Document.Page.L" - + "ayout\022\020\n\010row_span\030\002 \001(\005\022\020\n\010col_span\030\003 \001(" - + "\005\022[\n\022detected_languages\030\004 \003(\0132?.google.c" - + "loud.documentai.v1beta2.Document.Page.De" - + "tectedLanguage\032\265\003\n\tFormField\022I\n\nfield_na" - + "me\030\001 \001(\01325.google.cloud.documentai.v1bet" - + "a2.Document.Page.Layout\022J\n\013field_value\030\002" - + " \001(\01325.google.cloud.documentai.v1beta2.D" - + "ocument.Page.Layout\022`\n\027name_detected_lan" - + "guages\030\003 \003(\0132?.google.cloud.documentai.v" - + "1beta2.Document.Page.DetectedLanguage\022a\n" - + "\030value_detected_languages\030\004 \003(\0132?.google" - + ".cloud.documentai.v1beta2.Document.Page." - + "DetectedLanguage\022\022\n\nvalue_type\030\005 \001(\t\022\032\n\022" - + "corrected_key_text\030\006 \001(\t\022\034\n\024corrected_va" - + "lue_text\030\007 \001(\t\032=\n\020DetectedLanguage\022\025\n\rla" - + "nguage_code\030\001 \001(\t\022\022\n\nconfidence\030\002 \001(\002\032\216\002" - + "\n\006Entity\022I\n\013text_anchor\030\001 \001(\01324.google.c" - + "loud.documentai.v1beta2.Document.TextAnc" - + "hor\022\022\n\004type\030\002 \001(\tB\004\342A\001\002\022\024\n\014mention_text\030" - + "\003 \001(\t\022\022\n\nmention_id\030\004 \001(\t\022\030\n\nconfidence\030" - + "\005 \001(\002B\004\342A\001\001\022O\n\013page_anchor\030\006 \001(\01324.googl" - + "e.cloud.documentai.v1beta2.Document.Page" - + "AnchorB\004\342A\001\001\022\020\n\002id\030\007 \001(\tB\004\342A\001\001\032I\n\016Entity" - + "Relation\022\022\n\nsubject_id\030\001 \001(\t\022\021\n\tobject_i" - + "d\030\002 \001(\t\022\020\n\010relation\030\003 \001(\t\032\255\001\n\nTextAnchor" - + "\022W\n\rtext_segments\030\001 \003(\0132@.google.cloud.d" - + "ocumentai.v1beta2.Document.TextAnchor.Te" - + "xtSegment\022\017\n\007content\030\002 \001(\t\0325\n\013TextSegmen" - + "t\022\023\n\013start_index\030\001 \001(\003\022\021\n\tend_index\030\002 \001(" - + "\003\032\204\003\n\nPageAnchor\022O\n\tpage_refs\030\001 \003(\0132<.go" - + "ogle.cloud.documentai.v1beta2.Document.P" - + "ageAnchor.PageRef\032\244\002\n\007PageRef\022\022\n\004page\030\001 " - + "\001(\003B\004\342A\001\002\022b\n\013layout_type\030\002 \001(\0162G.google." - + "cloud.documentai.v1beta2.Document.PageAn" - + "chor.PageRef.LayoutTypeB\004\342A\001\001\022\027\n\tlayout_" - + "id\030\003 \001(\tB\004\342A\001\001\"\207\001\n\nLayoutType\022\033\n\027LAYOUT_" - + "TYPE_UNSPECIFIED\020\000\022\t\n\005BLOCK\020\001\022\r\n\tPARAGRA" - + "PH\020\002\022\010\n\004LINE\020\003\022\t\n\005TOKEN\020\004\022\022\n\016VISUAL_ELEM" - + "ENT\020\005\022\t\n\005TABLE\020\006\022\016\n\nFORM_FIELD\020\007B\010\n\006sour" - + "ceB\344\001\n#com.google.cloud.documentai.v1bet" - + "a2B\rDocumentProtoP\001ZCcloud.google.com/go" - + "/documentai/apiv1beta2/documentaipb;docu" - + "mentaipb\252\002\037Google.Cloud.DocumentAI.V1Bet" - + "a2\312\002\037Google\\Cloud\\DocumentAI\\V1beta2\352\002\"G" - + "oogle::Cloud::DocumentAI::V1beta2b\006proto" - + "3" + + "ayout\022R\n\013header_rows\030\002 \003(\0132=.google.clou" + + "d.documentai.v1beta2.Document.Page.Table" + + ".TableRow\022P\n\tbody_rows\030\003 \003(\0132=.google.cl" + + "oud.documentai.v1beta2.Document.Page.Tab" + + "le.TableRow\022[\n\022detected_languages\030\004 \003(\0132" + + "?.google.cloud.documentai.v1beta2.Docume" + + "nt.Page.DetectedLanguage\022L\n\nprovenance\030\005" + + " \001(\01324.google.cloud.documentai.v1beta2.D" + + "ocument.ProvenanceB\002\030\001\032Y\n\010TableRow\022M\n\005ce" + + "lls\030\001 \003(\0132>.google.cloud.documentai.v1be" + + "ta2.Document.Page.Table.TableCell\032\323\001\n\tTa" + + "bleCell\022E\n\006layout\030\001 \001(\01325.google.cloud.d" + + "ocumentai.v1beta2.Document.Page.Layout\022\020" + + "\n\010row_span\030\002 \001(\005\022\020\n\010col_span\030\003 \001(\005\022[\n\022de" + + "tected_languages\030\004 \003(\0132?.google.cloud.do" + + "cumentai.v1beta2.Document.Page.DetectedL" + + "anguage\032\377\003\n\tFormField\022I\n\nfield_name\030\001 \001(" + + "\01325.google.cloud.documentai.v1beta2.Docu" + + "ment.Page.Layout\022J\n\013field_value\030\002 \001(\01325." + + "google.cloud.documentai.v1beta2.Document" + + ".Page.Layout\022`\n\027name_detected_languages\030" + + "\003 \003(\0132?.google.cloud.documentai.v1beta2." + + "Document.Page.DetectedLanguage\022a\n\030value_" + + "detected_languages\030\004 \003(\0132?.google.cloud." + + "documentai.v1beta2.Document.Page.Detecte" + + "dLanguage\022\022\n\nvalue_type\030\005 \001(\t\022\032\n\022correct" + + "ed_key_text\030\006 \001(\t\022\034\n\024corrected_value_tex" + + "t\030\007 \001(\t\022H\n\nprovenance\030\010 \001(\01324.google.clo" + + "ud.documentai.v1beta2.Document.Provenanc" + + "e\032\223\001\n\017DetectedBarcode\022E\n\006layout\030\001 \001(\01325." + + "google.cloud.documentai.v1beta2.Document" + + ".Page.Layout\0229\n\007barcode\030\002 \001(\0132(.google.c" + + "loud.documentai.v1beta2.Barcode\032=\n\020Detec" + + "tedLanguage\022\025\n\rlanguage_code\030\001 \001(\t\022\022\n\nco" + + "nfidence\030\002 \001(\002\032\313\001\n\022ImageQualityScores\022\025\n" + + "\rquality_score\030\001 \001(\002\022j\n\020detected_defects" + + "\030\002 \003(\0132P.google.cloud.documentai.v1beta2" + + ".Document.Page.ImageQualityScores.Detect" + + "edDefect\0322\n\016DetectedDefect\022\014\n\004type\030\001 \001(\t" + + "\022\022\n\nconfidence\030\002 \001(\002\032\365\006\n\006Entity\022O\n\013text_" + + "anchor\030\001 \001(\01324.google.cloud.documentai.v" + + "1beta2.Document.TextAnchorB\004\342A\001\001\022\022\n\004type" + + "\030\002 \001(\tB\004\342A\001\002\022\032\n\014mention_text\030\003 \001(\tB\004\342A\001\001" + + "\022\030\n\nmention_id\030\004 \001(\tB\004\342A\001\001\022\030\n\nconfidence" + + "\030\005 \001(\002B\004\342A\001\001\022O\n\013page_anchor\030\006 \001(\01324.goog" + + "le.cloud.documentai.v1beta2.Document.Pag" + + "eAnchorB\004\342A\001\001\022\020\n\002id\030\007 \001(\tB\004\342A\001\001\022`\n\020norma" + + "lized_value\030\t \001(\0132@.google.cloud.documen" + + "tai.v1beta2.Document.Entity.NormalizedVa" + + "lueB\004\342A\001\001\022J\n\nproperties\030\n \003(\01320.google.c" + + "loud.documentai.v1beta2.Document.EntityB" + + "\004\342A\001\001\022N\n\nprovenance\030\013 \001(\01324.google.cloud" + + ".documentai.v1beta2.Document.ProvenanceB" + + "\004\342A\001\001\022\026\n\010redacted\030\014 \001(\010B\004\342A\001\001\032\274\002\n\017Normal" + + "izedValue\022)\n\013money_value\030\002 \001(\0132\022.google." + + "type.MoneyH\000\022\'\n\ndate_value\030\003 \001(\0132\021.googl" + + "e.type.DateH\000\022/\n\016datetime_value\030\004 \001(\0132\025." + + "google.type.DateTimeH\000\0223\n\raddress_value\030" + + "\005 \001(\0132\032.google.type.PostalAddressH\000\022\027\n\rb" + + "oolean_value\030\006 \001(\010H\000\022\027\n\rinteger_value\030\007 " + + "\001(\005H\000\022\025\n\013float_value\030\010 \001(\002H\000\022\022\n\004text\030\001 \001" + + "(\tB\004\342A\001\001B\022\n\020structured_value\032I\n\016EntityRe" + + "lation\022\022\n\nsubject_id\030\001 \001(\t\022\021\n\tobject_id\030" + + "\002 \001(\t\022\020\n\010relation\030\003 \001(\t\032\255\001\n\nTextAnchor\022W" + + "\n\rtext_segments\030\001 \003(\0132@.google.cloud.doc" + + "umentai.v1beta2.Document.TextAnchor.Text" + + "Segment\022\017\n\007content\030\002 \001(\t\0325\n\013TextSegment\022" + + "\023\n\013start_index\030\001 \001(\003\022\021\n\tend_index\030\002 \001(\003\032" + + "\354\003\n\nPageAnchor\022O\n\tpage_refs\030\001 \003(\0132<.goog" + + "le.cloud.documentai.v1beta2.Document.Pag" + + "eAnchor.PageRef\032\214\003\n\007PageRef\022\022\n\004page\030\001 \001(" + + "\003B\004\342A\001\002\022b\n\013layout_type\030\002 \001(\0162G.google.cl" + + "oud.documentai.v1beta2.Document.PageAnch" + + "or.PageRef.LayoutTypeB\004\342A\001\001\022\031\n\tlayout_id" + + "\030\003 \001(\tB\006\030\001\342A\001\001\022J\n\rbounding_poly\030\004 \001(\0132-." + + "google.cloud.documentai.v1beta2.Bounding" + + "PolyB\004\342A\001\001\022\030\n\nconfidence\030\005 \001(\002B\004\342A\001\001\"\207\001\n" + + "\nLayoutType\022\033\n\027LAYOUT_TYPE_UNSPECIFIED\020\000" + + "\022\t\n\005BLOCK\020\001\022\r\n\tPARAGRAPH\020\002\022\010\n\004LINE\020\003\022\t\n\005" + + "TOKEN\020\004\022\022\n\016VISUAL_ELEMENT\020\005\022\t\n\005TABLE\020\006\022\016" + + "\n\nFORM_FIELD\020\007\032\262\003\n\nProvenance\022\024\n\010revisio" + + "n\030\001 \001(\005B\002\030\001\022\016\n\002id\030\002 \001(\005B\002\030\001\022L\n\007parents\030\003" + + " \003(\0132;.google.cloud.documentai.v1beta2.D" + + "ocument.Provenance.Parent\022P\n\004type\030\004 \001(\0162" + + "B.google.cloud.documentai.v1beta2.Docume" + + "nt.Provenance.OperationType\0329\n\006Parent\022\020\n" + + "\010revision\030\001 \001(\005\022\r\n\005index\030\003 \001(\005\022\016\n\002id\030\002 \001" + + "(\005B\002\030\001\"\242\001\n\rOperationType\022\036\n\032OPERATION_TY" + + "PE_UNSPECIFIED\020\000\022\007\n\003ADD\020\001\022\n\n\006REMOVE\020\002\022\n\n" + + "\006UPDATE\020\007\022\013\n\007REPLACE\020\003\022\026\n\016EVAL_REQUESTED" + + "\020\004\032\002\010\001\022\025\n\rEVAL_APPROVED\020\005\032\002\010\001\022\024\n\014EVAL_SK" + + "IPPED\020\006\032\002\010\001\032\252\002\n\010Revision\022\017\n\005agent\030\004 \001(\tH" + + "\000\022\023\n\tprocessor\030\005 \001(\tH\000\022\n\n\002id\030\001 \001(\t\022\022\n\006pa" + + "rent\030\002 \003(\005B\002\030\001\022\022\n\nparent_ids\030\007 \003(\t\022/\n\013cr" + + "eate_time\030\003 \001(\0132\032.google.protobuf.Timest" + + "amp\022T\n\014human_review\030\006 \001(\0132>.google.cloud" + + ".documentai.v1beta2.Document.Revision.Hu" + + "manReview\0323\n\013HumanReview\022\r\n\005state\030\001 \001(\t\022" + + "\025\n\rstate_message\030\002 \001(\tB\010\n\006source\032\273\001\n\nTex" + + "tChange\022I\n\013text_anchor\030\001 \001(\01324.google.cl" + + "oud.documentai.v1beta2.Document.TextAnch" + + "or\022\024\n\014changed_text\030\002 \001(\t\022L\n\nprovenance\030\003" + + " \003(\01324.google.cloud.documentai.v1beta2.D" + + "ocument.ProvenanceB\002\030\001B\010\n\006sourceB\344\001\n#com" + + ".google.cloud.documentai.v1beta2B\rDocume" + + "ntProtoP\001ZCcloud.google.com/go/documenta" + + "i/apiv1beta2/documentaipb;documentaipb\252\002" + + "\037Google.Cloud.DocumentAI.V1Beta2\312\002\037Googl" + + "e\\Cloud\\DocumentAI\\V1beta2\352\002\"Google::Clo" + + "ud::DocumentAI::V1beta2b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.cloud.documentai.v1beta2.BarcodeProto.getDescriptor(), com.google.cloud.documentai.v1beta2.GeometryProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), com.google.rpc.StatusProto.getDescriptor(), com.google.type.ColorProto.getDescriptor(), + com.google.type.DateProto.getDescriptor(), + com.google.type.DateTimeProto.getDescriptor(), + com.google.type.MoneyProto.getDescriptor(), + com.google.type.PostalAddressProto.getDescriptor(), }); internal_static_google_cloud_documentai_v1beta2_Document_descriptor = getDescriptor().getMessageTypes().get(0); @@ -310,9 +469,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Pages", "Entities", "EntityRelations", + "TextChanges", "ShardInfo", "Labels", "Error", + "Revisions", "Source", }); internal_static_google_cloud_documentai_v1beta2_Document_ShardInfo_descriptor = @@ -344,6 +505,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "TextStyle", "TextDecoration", "FontSize", + "FontFamily", }); internal_static_google_cloud_documentai_v1beta2_Document_Style_FontSize_descriptor = internal_static_google_cloud_documentai_v1beta2_Document_Style_descriptor @@ -362,6 +524,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { internal_static_google_cloud_documentai_v1beta2_Document_Page_descriptor, new java.lang.String[] { "PageNumber", + "Image", + "Transforms", "Dimension", "Layout", "DetectedLanguages", @@ -372,6 +536,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "VisualElements", "Tables", "FormFields", + "Symbols", + "DetectedBarcodes", + "ImageQualityScores", + "Provenance", }); internal_static_google_cloud_documentai_v1beta2_Document_Page_Dimension_descriptor = internal_static_google_cloud_documentai_v1beta2_Document_Page_descriptor @@ -383,55 +551,75 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Width", "Height", "Unit", }); - internal_static_google_cloud_documentai_v1beta2_Document_Page_Layout_descriptor = + internal_static_google_cloud_documentai_v1beta2_Document_Page_Image_descriptor = internal_static_google_cloud_documentai_v1beta2_Document_Page_descriptor .getNestedTypes() .get(1); + internal_static_google_cloud_documentai_v1beta2_Document_Page_Image_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta2_Document_Page_Image_descriptor, + new java.lang.String[] { + "Content", "MimeType", "Width", "Height", + }); + internal_static_google_cloud_documentai_v1beta2_Document_Page_Matrix_descriptor = + internal_static_google_cloud_documentai_v1beta2_Document_Page_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_documentai_v1beta2_Document_Page_Matrix_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta2_Document_Page_Matrix_descriptor, + new java.lang.String[] { + "Rows", "Cols", "Type", "Data", + }); + internal_static_google_cloud_documentai_v1beta2_Document_Page_Layout_descriptor = + internal_static_google_cloud_documentai_v1beta2_Document_Page_descriptor + .getNestedTypes() + .get(3); internal_static_google_cloud_documentai_v1beta2_Document_Page_Layout_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1beta2_Document_Page_Layout_descriptor, new java.lang.String[] { - "TextAnchor", "Confidence", "BoundingPoly", "Orientation", "Id", + "TextAnchor", "Confidence", "BoundingPoly", "Orientation", }); internal_static_google_cloud_documentai_v1beta2_Document_Page_Block_descriptor = internal_static_google_cloud_documentai_v1beta2_Document_Page_descriptor .getNestedTypes() - .get(2); + .get(4); internal_static_google_cloud_documentai_v1beta2_Document_Page_Block_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1beta2_Document_Page_Block_descriptor, new java.lang.String[] { - "Layout", "DetectedLanguages", + "Layout", "DetectedLanguages", "Provenance", }); internal_static_google_cloud_documentai_v1beta2_Document_Page_Paragraph_descriptor = internal_static_google_cloud_documentai_v1beta2_Document_Page_descriptor .getNestedTypes() - .get(3); + .get(5); internal_static_google_cloud_documentai_v1beta2_Document_Page_Paragraph_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1beta2_Document_Page_Paragraph_descriptor, new java.lang.String[] { - "Layout", "DetectedLanguages", + "Layout", "DetectedLanguages", "Provenance", }); internal_static_google_cloud_documentai_v1beta2_Document_Page_Line_descriptor = internal_static_google_cloud_documentai_v1beta2_Document_Page_descriptor .getNestedTypes() - .get(4); + .get(6); internal_static_google_cloud_documentai_v1beta2_Document_Page_Line_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1beta2_Document_Page_Line_descriptor, new java.lang.String[] { - "Layout", "DetectedLanguages", + "Layout", "DetectedLanguages", "Provenance", }); internal_static_google_cloud_documentai_v1beta2_Document_Page_Token_descriptor = internal_static_google_cloud_documentai_v1beta2_Document_Page_descriptor .getNestedTypes() - .get(5); + .get(7); internal_static_google_cloud_documentai_v1beta2_Document_Page_Token_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1beta2_Document_Page_Token_descriptor, new java.lang.String[] { - "Layout", "DetectedBreak", "DetectedLanguages", + "Layout", "DetectedBreak", "DetectedLanguages", "Provenance", "StyleInfo", }); internal_static_google_cloud_documentai_v1beta2_Document_Page_Token_DetectedBreak_descriptor = internal_static_google_cloud_documentai_v1beta2_Document_Page_Token_descriptor @@ -443,10 +631,44 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Type", }); + internal_static_google_cloud_documentai_v1beta2_Document_Page_Token_StyleInfo_descriptor = + internal_static_google_cloud_documentai_v1beta2_Document_Page_Token_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_documentai_v1beta2_Document_Page_Token_StyleInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta2_Document_Page_Token_StyleInfo_descriptor, + new java.lang.String[] { + "FontSize", + "PixelFontSize", + "LetterSpacing", + "FontType", + "Bold", + "Italic", + "Underlined", + "Strikeout", + "Subscript", + "Superscript", + "Smallcaps", + "FontWeight", + "Handwritten", + "TextColor", + "BackgroundColor", + }); + internal_static_google_cloud_documentai_v1beta2_Document_Page_Symbol_descriptor = + internal_static_google_cloud_documentai_v1beta2_Document_Page_descriptor + .getNestedTypes() + .get(8); + internal_static_google_cloud_documentai_v1beta2_Document_Page_Symbol_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta2_Document_Page_Symbol_descriptor, + new java.lang.String[] { + "Layout", "DetectedLanguages", + }); internal_static_google_cloud_documentai_v1beta2_Document_Page_VisualElement_descriptor = internal_static_google_cloud_documentai_v1beta2_Document_Page_descriptor .getNestedTypes() - .get(6); + .get(9); internal_static_google_cloud_documentai_v1beta2_Document_Page_VisualElement_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1beta2_Document_Page_VisualElement_descriptor, @@ -456,12 +678,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { internal_static_google_cloud_documentai_v1beta2_Document_Page_Table_descriptor = internal_static_google_cloud_documentai_v1beta2_Document_Page_descriptor .getNestedTypes() - .get(7); + .get(10); internal_static_google_cloud_documentai_v1beta2_Document_Page_Table_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1beta2_Document_Page_Table_descriptor, new java.lang.String[] { - "Layout", "HeaderRows", "BodyRows", "DetectedLanguages", + "Layout", "HeaderRows", "BodyRows", "DetectedLanguages", "Provenance", }); internal_static_google_cloud_documentai_v1beta2_Document_Page_Table_TableRow_descriptor = internal_static_google_cloud_documentai_v1beta2_Document_Page_Table_descriptor @@ -486,7 +708,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { internal_static_google_cloud_documentai_v1beta2_Document_Page_FormField_descriptor = internal_static_google_cloud_documentai_v1beta2_Document_Page_descriptor .getNestedTypes() - .get(8); + .get(11); internal_static_google_cloud_documentai_v1beta2_Document_Page_FormField_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1beta2_Document_Page_FormField_descriptor, @@ -498,24 +720,83 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ValueType", "CorrectedKeyText", "CorrectedValueText", + "Provenance", + }); + internal_static_google_cloud_documentai_v1beta2_Document_Page_DetectedBarcode_descriptor = + internal_static_google_cloud_documentai_v1beta2_Document_Page_descriptor + .getNestedTypes() + .get(12); + internal_static_google_cloud_documentai_v1beta2_Document_Page_DetectedBarcode_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta2_Document_Page_DetectedBarcode_descriptor, + new java.lang.String[] { + "Layout", "Barcode", }); internal_static_google_cloud_documentai_v1beta2_Document_Page_DetectedLanguage_descriptor = internal_static_google_cloud_documentai_v1beta2_Document_Page_descriptor .getNestedTypes() - .get(9); + .get(13); internal_static_google_cloud_documentai_v1beta2_Document_Page_DetectedLanguage_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1beta2_Document_Page_DetectedLanguage_descriptor, new java.lang.String[] { "LanguageCode", "Confidence", }); + internal_static_google_cloud_documentai_v1beta2_Document_Page_ImageQualityScores_descriptor = + internal_static_google_cloud_documentai_v1beta2_Document_Page_descriptor + .getNestedTypes() + .get(14); + internal_static_google_cloud_documentai_v1beta2_Document_Page_ImageQualityScores_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta2_Document_Page_ImageQualityScores_descriptor, + new java.lang.String[] { + "QualityScore", "DetectedDefects", + }); + internal_static_google_cloud_documentai_v1beta2_Document_Page_ImageQualityScores_DetectedDefect_descriptor = + internal_static_google_cloud_documentai_v1beta2_Document_Page_ImageQualityScores_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_documentai_v1beta2_Document_Page_ImageQualityScores_DetectedDefect_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta2_Document_Page_ImageQualityScores_DetectedDefect_descriptor, + new java.lang.String[] { + "Type", "Confidence", + }); internal_static_google_cloud_documentai_v1beta2_Document_Entity_descriptor = internal_static_google_cloud_documentai_v1beta2_Document_descriptor.getNestedTypes().get(4); internal_static_google_cloud_documentai_v1beta2_Document_Entity_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1beta2_Document_Entity_descriptor, new java.lang.String[] { - "TextAnchor", "Type", "MentionText", "MentionId", "Confidence", "PageAnchor", "Id", + "TextAnchor", + "Type", + "MentionText", + "MentionId", + "Confidence", + "PageAnchor", + "Id", + "NormalizedValue", + "Properties", + "Provenance", + "Redacted", + }); + internal_static_google_cloud_documentai_v1beta2_Document_Entity_NormalizedValue_descriptor = + internal_static_google_cloud_documentai_v1beta2_Document_Entity_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_documentai_v1beta2_Document_Entity_NormalizedValue_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta2_Document_Entity_NormalizedValue_descriptor, + new java.lang.String[] { + "MoneyValue", + "DateValue", + "DatetimeValue", + "AddressValue", + "BooleanValue", + "IntegerValue", + "FloatValue", + "Text", + "StructuredValue", }); internal_static_google_cloud_documentai_v1beta2_Document_EntityRelation_descriptor = internal_static_google_cloud_documentai_v1beta2_Document_descriptor.getNestedTypes().get(5); @@ -559,7 +840,60 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1beta2_Document_PageAnchor_PageRef_descriptor, new java.lang.String[] { - "Page", "LayoutType", "LayoutId", + "Page", "LayoutType", "LayoutId", "BoundingPoly", "Confidence", + }); + internal_static_google_cloud_documentai_v1beta2_Document_Provenance_descriptor = + internal_static_google_cloud_documentai_v1beta2_Document_descriptor.getNestedTypes().get(8); + internal_static_google_cloud_documentai_v1beta2_Document_Provenance_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta2_Document_Provenance_descriptor, + new java.lang.String[] { + "Revision", "Id", "Parents", "Type", + }); + internal_static_google_cloud_documentai_v1beta2_Document_Provenance_Parent_descriptor = + internal_static_google_cloud_documentai_v1beta2_Document_Provenance_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_documentai_v1beta2_Document_Provenance_Parent_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta2_Document_Provenance_Parent_descriptor, + new java.lang.String[] { + "Revision", "Index", "Id", + }); + internal_static_google_cloud_documentai_v1beta2_Document_Revision_descriptor = + internal_static_google_cloud_documentai_v1beta2_Document_descriptor.getNestedTypes().get(9); + internal_static_google_cloud_documentai_v1beta2_Document_Revision_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta2_Document_Revision_descriptor, + new java.lang.String[] { + "Agent", + "Processor", + "Id", + "Parent", + "ParentIds", + "CreateTime", + "HumanReview", + "Source", + }); + internal_static_google_cloud_documentai_v1beta2_Document_Revision_HumanReview_descriptor = + internal_static_google_cloud_documentai_v1beta2_Document_Revision_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_documentai_v1beta2_Document_Revision_HumanReview_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta2_Document_Revision_HumanReview_descriptor, + new java.lang.String[] { + "State", "StateMessage", + }); + internal_static_google_cloud_documentai_v1beta2_Document_TextChange_descriptor = + internal_static_google_cloud_documentai_v1beta2_Document_descriptor + .getNestedTypes() + .get(10); + internal_static_google_cloud_documentai_v1beta2_Document_TextChange_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta2_Document_TextChange_descriptor, + new java.lang.String[] { + "TextAnchor", "ChangedText", "Provenance", }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); @@ -567,9 +901,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.cloud.documentai.v1beta2.BarcodeProto.getDescriptor(); com.google.cloud.documentai.v1beta2.GeometryProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); com.google.rpc.StatusProto.getDescriptor(); com.google.type.ColorProto.getDescriptor(); + com.google.type.DateProto.getDescriptor(); + com.google.type.DateTimeProto.getDescriptor(); + com.google.type.MoneyProto.getDescriptor(); + com.google.type.PostalAddressProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/FormExtractionParams.java b/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/FormExtractionParams.java index f09adb27ca20..faf75dc8df29 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/FormExtractionParams.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/FormExtractionParams.java @@ -89,18 +89,7 @@ public boolean getEnabled() { * * *
-   * User can provide pairs of (key text, value type) to improve the parsing
-   * result.
-   *
-   * For example, if a document has a field called "Date" that holds a date
-   * value and a field called "Amount" that may hold either a currency value
-   * (e.g., "$500.00") or a simple number value (e.g., "20"), you could use the
-   * following hints: [ {"key": "Date", value_types: [ "DATE"]}, {"key":
-   * "Amount", "value_types": [ "PRICE", "NUMBER" ]} ]
-   *
-   * If the value type is unknown, but you want to provide hints for the keys,
-   * you can leave the value_types field blank. e.g. {"key": "Date",
-   * "value_types": []}
+   * Reserved for future use.
    * 
* * repeated .google.cloud.documentai.v1beta2.KeyValuePairHint key_value_pair_hints = 2; @@ -115,18 +104,7 @@ public boolean getEnabled() { * * *
-   * User can provide pairs of (key text, value type) to improve the parsing
-   * result.
-   *
-   * For example, if a document has a field called "Date" that holds a date
-   * value and a field called "Amount" that may hold either a currency value
-   * (e.g., "$500.00") or a simple number value (e.g., "20"), you could use the
-   * following hints: [ {"key": "Date", value_types: [ "DATE"]}, {"key":
-   * "Amount", "value_types": [ "PRICE", "NUMBER" ]} ]
-   *
-   * If the value type is unknown, but you want to provide hints for the keys,
-   * you can leave the value_types field blank. e.g. {"key": "Date",
-   * "value_types": []}
+   * Reserved for future use.
    * 
* * repeated .google.cloud.documentai.v1beta2.KeyValuePairHint key_value_pair_hints = 2; @@ -141,18 +119,7 @@ public boolean getEnabled() { * * *
-   * User can provide pairs of (key text, value type) to improve the parsing
-   * result.
-   *
-   * For example, if a document has a field called "Date" that holds a date
-   * value and a field called "Amount" that may hold either a currency value
-   * (e.g., "$500.00") or a simple number value (e.g., "20"), you could use the
-   * following hints: [ {"key": "Date", value_types: [ "DATE"]}, {"key":
-   * "Amount", "value_types": [ "PRICE", "NUMBER" ]} ]
-   *
-   * If the value type is unknown, but you want to provide hints for the keys,
-   * you can leave the value_types field blank. e.g. {"key": "Date",
-   * "value_types": []}
+   * Reserved for future use.
    * 
* * repeated .google.cloud.documentai.v1beta2.KeyValuePairHint key_value_pair_hints = 2; @@ -166,18 +133,7 @@ public int getKeyValuePairHintsCount() { * * *
-   * User can provide pairs of (key text, value type) to improve the parsing
-   * result.
-   *
-   * For example, if a document has a field called "Date" that holds a date
-   * value and a field called "Amount" that may hold either a currency value
-   * (e.g., "$500.00") or a simple number value (e.g., "20"), you could use the
-   * following hints: [ {"key": "Date", value_types: [ "DATE"]}, {"key":
-   * "Amount", "value_types": [ "PRICE", "NUMBER" ]} ]
-   *
-   * If the value type is unknown, but you want to provide hints for the keys,
-   * you can leave the value_types field blank. e.g. {"key": "Date",
-   * "value_types": []}
+   * Reserved for future use.
    * 
* * repeated .google.cloud.documentai.v1beta2.KeyValuePairHint key_value_pair_hints = 2; @@ -191,18 +147,7 @@ public com.google.cloud.documentai.v1beta2.KeyValuePairHint getKeyValuePairHints * * *
-   * User can provide pairs of (key text, value type) to improve the parsing
-   * result.
-   *
-   * For example, if a document has a field called "Date" that holds a date
-   * value and a field called "Amount" that may hold either a currency value
-   * (e.g., "$500.00") or a simple number value (e.g., "20"), you could use the
-   * following hints: [ {"key": "Date", value_types: [ "DATE"]}, {"key":
-   * "Amount", "value_types": [ "PRICE", "NUMBER" ]} ]
-   *
-   * If the value type is unknown, but you want to provide hints for the keys,
-   * you can leave the value_types field blank. e.g. {"key": "Date",
-   * "value_types": []}
+   * Reserved for future use.
    * 
* * repeated .google.cloud.documentai.v1beta2.KeyValuePairHint key_value_pair_hints = 2; @@ -224,7 +169,7 @@ public com.google.cloud.documentai.v1beta2.KeyValuePairHint getKeyValuePairHints *
    * Model version of the form extraction system. Default is
    * "builtin/stable". Specify "builtin/latest" for the latest model.
-   * For custom form models, specify: “custom/{model_name}". Model name
+   * For custom form models, specify: "custom/{model_name}". Model name
    * format is "bucket_name/path/to/modeldir" corresponding to
    * "gs://bucket_name/path/to/modeldir" where annotated examples are stored.
    * 
@@ -251,7 +196,7 @@ public java.lang.String getModelVersion() { *
    * Model version of the form extraction system. Default is
    * "builtin/stable". Specify "builtin/latest" for the latest model.
-   * For custom form models, specify: “custom/{model_name}". Model name
+   * For custom form models, specify: "custom/{model_name}". Model name
    * format is "bucket_name/path/to/modeldir" corresponding to
    * "gs://bucket_name/path/to/modeldir" where annotated examples are stored.
    * 
@@ -787,18 +732,7 @@ private void ensureKeyValuePairHintsIsMutable() { * * *
-     * User can provide pairs of (key text, value type) to improve the parsing
-     * result.
-     *
-     * For example, if a document has a field called "Date" that holds a date
-     * value and a field called "Amount" that may hold either a currency value
-     * (e.g., "$500.00") or a simple number value (e.g., "20"), you could use the
-     * following hints: [ {"key": "Date", value_types: [ "DATE"]}, {"key":
-     * "Amount", "value_types": [ "PRICE", "NUMBER" ]} ]
-     *
-     * If the value type is unknown, but you want to provide hints for the keys,
-     * you can leave the value_types field blank. e.g. {"key": "Date",
-     * "value_types": []}
+     * Reserved for future use.
      * 
* * repeated .google.cloud.documentai.v1beta2.KeyValuePairHint key_value_pair_hints = 2; @@ -816,18 +750,7 @@ private void ensureKeyValuePairHintsIsMutable() { * * *
-     * User can provide pairs of (key text, value type) to improve the parsing
-     * result.
-     *
-     * For example, if a document has a field called "Date" that holds a date
-     * value and a field called "Amount" that may hold either a currency value
-     * (e.g., "$500.00") or a simple number value (e.g., "20"), you could use the
-     * following hints: [ {"key": "Date", value_types: [ "DATE"]}, {"key":
-     * "Amount", "value_types": [ "PRICE", "NUMBER" ]} ]
-     *
-     * If the value type is unknown, but you want to provide hints for the keys,
-     * you can leave the value_types field blank. e.g. {"key": "Date",
-     * "value_types": []}
+     * Reserved for future use.
      * 
* * repeated .google.cloud.documentai.v1beta2.KeyValuePairHint key_value_pair_hints = 2; @@ -844,18 +767,7 @@ public int getKeyValuePairHintsCount() { * * *
-     * User can provide pairs of (key text, value type) to improve the parsing
-     * result.
-     *
-     * For example, if a document has a field called "Date" that holds a date
-     * value and a field called "Amount" that may hold either a currency value
-     * (e.g., "$500.00") or a simple number value (e.g., "20"), you could use the
-     * following hints: [ {"key": "Date", value_types: [ "DATE"]}, {"key":
-     * "Amount", "value_types": [ "PRICE", "NUMBER" ]} ]
-     *
-     * If the value type is unknown, but you want to provide hints for the keys,
-     * you can leave the value_types field blank. e.g. {"key": "Date",
-     * "value_types": []}
+     * Reserved for future use.
      * 
* * repeated .google.cloud.documentai.v1beta2.KeyValuePairHint key_value_pair_hints = 2; @@ -872,18 +784,7 @@ public com.google.cloud.documentai.v1beta2.KeyValuePairHint getKeyValuePairHints * * *
-     * User can provide pairs of (key text, value type) to improve the parsing
-     * result.
-     *
-     * For example, if a document has a field called "Date" that holds a date
-     * value and a field called "Amount" that may hold either a currency value
-     * (e.g., "$500.00") or a simple number value (e.g., "20"), you could use the
-     * following hints: [ {"key": "Date", value_types: [ "DATE"]}, {"key":
-     * "Amount", "value_types": [ "PRICE", "NUMBER" ]} ]
-     *
-     * If the value type is unknown, but you want to provide hints for the keys,
-     * you can leave the value_types field blank. e.g. {"key": "Date",
-     * "value_types": []}
+     * Reserved for future use.
      * 
* * repeated .google.cloud.documentai.v1beta2.KeyValuePairHint key_value_pair_hints = 2; @@ -907,18 +808,7 @@ public Builder setKeyValuePairHints( * * *
-     * User can provide pairs of (key text, value type) to improve the parsing
-     * result.
-     *
-     * For example, if a document has a field called "Date" that holds a date
-     * value and a field called "Amount" that may hold either a currency value
-     * (e.g., "$500.00") or a simple number value (e.g., "20"), you could use the
-     * following hints: [ {"key": "Date", value_types: [ "DATE"]}, {"key":
-     * "Amount", "value_types": [ "PRICE", "NUMBER" ]} ]
-     *
-     * If the value type is unknown, but you want to provide hints for the keys,
-     * you can leave the value_types field blank. e.g. {"key": "Date",
-     * "value_types": []}
+     * Reserved for future use.
      * 
* * repeated .google.cloud.documentai.v1beta2.KeyValuePairHint key_value_pair_hints = 2; @@ -939,18 +829,7 @@ public Builder setKeyValuePairHints( * * *
-     * User can provide pairs of (key text, value type) to improve the parsing
-     * result.
-     *
-     * For example, if a document has a field called "Date" that holds a date
-     * value and a field called "Amount" that may hold either a currency value
-     * (e.g., "$500.00") or a simple number value (e.g., "20"), you could use the
-     * following hints: [ {"key": "Date", value_types: [ "DATE"]}, {"key":
-     * "Amount", "value_types": [ "PRICE", "NUMBER" ]} ]
-     *
-     * If the value type is unknown, but you want to provide hints for the keys,
-     * you can leave the value_types field blank. e.g. {"key": "Date",
-     * "value_types": []}
+     * Reserved for future use.
      * 
* * repeated .google.cloud.documentai.v1beta2.KeyValuePairHint key_value_pair_hints = 2; @@ -974,18 +853,7 @@ public Builder addKeyValuePairHints( * * *
-     * User can provide pairs of (key text, value type) to improve the parsing
-     * result.
-     *
-     * For example, if a document has a field called "Date" that holds a date
-     * value and a field called "Amount" that may hold either a currency value
-     * (e.g., "$500.00") or a simple number value (e.g., "20"), you could use the
-     * following hints: [ {"key": "Date", value_types: [ "DATE"]}, {"key":
-     * "Amount", "value_types": [ "PRICE", "NUMBER" ]} ]
-     *
-     * If the value type is unknown, but you want to provide hints for the keys,
-     * you can leave the value_types field blank. e.g. {"key": "Date",
-     * "value_types": []}
+     * Reserved for future use.
      * 
* * repeated .google.cloud.documentai.v1beta2.KeyValuePairHint key_value_pair_hints = 2; @@ -1009,18 +877,7 @@ public Builder addKeyValuePairHints( * * *
-     * User can provide pairs of (key text, value type) to improve the parsing
-     * result.
-     *
-     * For example, if a document has a field called "Date" that holds a date
-     * value and a field called "Amount" that may hold either a currency value
-     * (e.g., "$500.00") or a simple number value (e.g., "20"), you could use the
-     * following hints: [ {"key": "Date", value_types: [ "DATE"]}, {"key":
-     * "Amount", "value_types": [ "PRICE", "NUMBER" ]} ]
-     *
-     * If the value type is unknown, but you want to provide hints for the keys,
-     * you can leave the value_types field blank. e.g. {"key": "Date",
-     * "value_types": []}
+     * Reserved for future use.
      * 
* * repeated .google.cloud.documentai.v1beta2.KeyValuePairHint key_value_pair_hints = 2; @@ -1041,18 +898,7 @@ public Builder addKeyValuePairHints( * * *
-     * User can provide pairs of (key text, value type) to improve the parsing
-     * result.
-     *
-     * For example, if a document has a field called "Date" that holds a date
-     * value and a field called "Amount" that may hold either a currency value
-     * (e.g., "$500.00") or a simple number value (e.g., "20"), you could use the
-     * following hints: [ {"key": "Date", value_types: [ "DATE"]}, {"key":
-     * "Amount", "value_types": [ "PRICE", "NUMBER" ]} ]
-     *
-     * If the value type is unknown, but you want to provide hints for the keys,
-     * you can leave the value_types field blank. e.g. {"key": "Date",
-     * "value_types": []}
+     * Reserved for future use.
      * 
* * repeated .google.cloud.documentai.v1beta2.KeyValuePairHint key_value_pair_hints = 2; @@ -1073,18 +919,7 @@ public Builder addKeyValuePairHints( * * *
-     * User can provide pairs of (key text, value type) to improve the parsing
-     * result.
-     *
-     * For example, if a document has a field called "Date" that holds a date
-     * value and a field called "Amount" that may hold either a currency value
-     * (e.g., "$500.00") or a simple number value (e.g., "20"), you could use the
-     * following hints: [ {"key": "Date", value_types: [ "DATE"]}, {"key":
-     * "Amount", "value_types": [ "PRICE", "NUMBER" ]} ]
-     *
-     * If the value type is unknown, but you want to provide hints for the keys,
-     * you can leave the value_types field blank. e.g. {"key": "Date",
-     * "value_types": []}
+     * Reserved for future use.
      * 
* * repeated .google.cloud.documentai.v1beta2.KeyValuePairHint key_value_pair_hints = 2; @@ -1105,18 +940,7 @@ public Builder addAllKeyValuePairHints( * * *
-     * User can provide pairs of (key text, value type) to improve the parsing
-     * result.
-     *
-     * For example, if a document has a field called "Date" that holds a date
-     * value and a field called "Amount" that may hold either a currency value
-     * (e.g., "$500.00") or a simple number value (e.g., "20"), you could use the
-     * following hints: [ {"key": "Date", value_types: [ "DATE"]}, {"key":
-     * "Amount", "value_types": [ "PRICE", "NUMBER" ]} ]
-     *
-     * If the value type is unknown, but you want to provide hints for the keys,
-     * you can leave the value_types field blank. e.g. {"key": "Date",
-     * "value_types": []}
+     * Reserved for future use.
      * 
* * repeated .google.cloud.documentai.v1beta2.KeyValuePairHint key_value_pair_hints = 2; @@ -1136,18 +960,7 @@ public Builder clearKeyValuePairHints() { * * *
-     * User can provide pairs of (key text, value type) to improve the parsing
-     * result.
-     *
-     * For example, if a document has a field called "Date" that holds a date
-     * value and a field called "Amount" that may hold either a currency value
-     * (e.g., "$500.00") or a simple number value (e.g., "20"), you could use the
-     * following hints: [ {"key": "Date", value_types: [ "DATE"]}, {"key":
-     * "Amount", "value_types": [ "PRICE", "NUMBER" ]} ]
-     *
-     * If the value type is unknown, but you want to provide hints for the keys,
-     * you can leave the value_types field blank. e.g. {"key": "Date",
-     * "value_types": []}
+     * Reserved for future use.
      * 
* * repeated .google.cloud.documentai.v1beta2.KeyValuePairHint key_value_pair_hints = 2; @@ -1167,18 +980,7 @@ public Builder removeKeyValuePairHints(int index) { * * *
-     * User can provide pairs of (key text, value type) to improve the parsing
-     * result.
-     *
-     * For example, if a document has a field called "Date" that holds a date
-     * value and a field called "Amount" that may hold either a currency value
-     * (e.g., "$500.00") or a simple number value (e.g., "20"), you could use the
-     * following hints: [ {"key": "Date", value_types: [ "DATE"]}, {"key":
-     * "Amount", "value_types": [ "PRICE", "NUMBER" ]} ]
-     *
-     * If the value type is unknown, but you want to provide hints for the keys,
-     * you can leave the value_types field blank. e.g. {"key": "Date",
-     * "value_types": []}
+     * Reserved for future use.
      * 
* * repeated .google.cloud.documentai.v1beta2.KeyValuePairHint key_value_pair_hints = 2; @@ -1192,18 +994,7 @@ public com.google.cloud.documentai.v1beta2.KeyValuePairHint.Builder getKeyValueP * * *
-     * User can provide pairs of (key text, value type) to improve the parsing
-     * result.
-     *
-     * For example, if a document has a field called "Date" that holds a date
-     * value and a field called "Amount" that may hold either a currency value
-     * (e.g., "$500.00") or a simple number value (e.g., "20"), you could use the
-     * following hints: [ {"key": "Date", value_types: [ "DATE"]}, {"key":
-     * "Amount", "value_types": [ "PRICE", "NUMBER" ]} ]
-     *
-     * If the value type is unknown, but you want to provide hints for the keys,
-     * you can leave the value_types field blank. e.g. {"key": "Date",
-     * "value_types": []}
+     * Reserved for future use.
      * 
* * repeated .google.cloud.documentai.v1beta2.KeyValuePairHint key_value_pair_hints = 2; @@ -1221,18 +1012,7 @@ public com.google.cloud.documentai.v1beta2.KeyValuePairHint.Builder getKeyValueP * * *
-     * User can provide pairs of (key text, value type) to improve the parsing
-     * result.
-     *
-     * For example, if a document has a field called "Date" that holds a date
-     * value and a field called "Amount" that may hold either a currency value
-     * (e.g., "$500.00") or a simple number value (e.g., "20"), you could use the
-     * following hints: [ {"key": "Date", value_types: [ "DATE"]}, {"key":
-     * "Amount", "value_types": [ "PRICE", "NUMBER" ]} ]
-     *
-     * If the value type is unknown, but you want to provide hints for the keys,
-     * you can leave the value_types field blank. e.g. {"key": "Date",
-     * "value_types": []}
+     * Reserved for future use.
      * 
* * repeated .google.cloud.documentai.v1beta2.KeyValuePairHint key_value_pair_hints = 2; @@ -1250,18 +1030,7 @@ public com.google.cloud.documentai.v1beta2.KeyValuePairHint.Builder getKeyValueP * * *
-     * User can provide pairs of (key text, value type) to improve the parsing
-     * result.
-     *
-     * For example, if a document has a field called "Date" that holds a date
-     * value and a field called "Amount" that may hold either a currency value
-     * (e.g., "$500.00") or a simple number value (e.g., "20"), you could use the
-     * following hints: [ {"key": "Date", value_types: [ "DATE"]}, {"key":
-     * "Amount", "value_types": [ "PRICE", "NUMBER" ]} ]
-     *
-     * If the value type is unknown, but you want to provide hints for the keys,
-     * you can leave the value_types field blank. e.g. {"key": "Date",
-     * "value_types": []}
+     * Reserved for future use.
      * 
* * repeated .google.cloud.documentai.v1beta2.KeyValuePairHint key_value_pair_hints = 2; @@ -1276,18 +1045,7 @@ public com.google.cloud.documentai.v1beta2.KeyValuePairHint.Builder getKeyValueP * * *
-     * User can provide pairs of (key text, value type) to improve the parsing
-     * result.
-     *
-     * For example, if a document has a field called "Date" that holds a date
-     * value and a field called "Amount" that may hold either a currency value
-     * (e.g., "$500.00") or a simple number value (e.g., "20"), you could use the
-     * following hints: [ {"key": "Date", value_types: [ "DATE"]}, {"key":
-     * "Amount", "value_types": [ "PRICE", "NUMBER" ]} ]
-     *
-     * If the value type is unknown, but you want to provide hints for the keys,
-     * you can leave the value_types field blank. e.g. {"key": "Date",
-     * "value_types": []}
+     * Reserved for future use.
      * 
* * repeated .google.cloud.documentai.v1beta2.KeyValuePairHint key_value_pair_hints = 2; @@ -1303,18 +1061,7 @@ public com.google.cloud.documentai.v1beta2.KeyValuePairHint.Builder addKeyValueP * * *
-     * User can provide pairs of (key text, value type) to improve the parsing
-     * result.
-     *
-     * For example, if a document has a field called "Date" that holds a date
-     * value and a field called "Amount" that may hold either a currency value
-     * (e.g., "$500.00") or a simple number value (e.g., "20"), you could use the
-     * following hints: [ {"key": "Date", value_types: [ "DATE"]}, {"key":
-     * "Amount", "value_types": [ "PRICE", "NUMBER" ]} ]
-     *
-     * If the value type is unknown, but you want to provide hints for the keys,
-     * you can leave the value_types field blank. e.g. {"key": "Date",
-     * "value_types": []}
+     * Reserved for future use.
      * 
* * repeated .google.cloud.documentai.v1beta2.KeyValuePairHint key_value_pair_hints = 2; @@ -1352,7 +1099,7 @@ public com.google.cloud.documentai.v1beta2.KeyValuePairHint.Builder addKeyValueP *
      * Model version of the form extraction system. Default is
      * "builtin/stable". Specify "builtin/latest" for the latest model.
-     * For custom form models, specify: “custom/{model_name}". Model name
+     * For custom form models, specify: "custom/{model_name}". Model name
      * format is "bucket_name/path/to/modeldir" corresponding to
      * "gs://bucket_name/path/to/modeldir" where annotated examples are stored.
      * 
@@ -1378,7 +1125,7 @@ public java.lang.String getModelVersion() { *
      * Model version of the form extraction system. Default is
      * "builtin/stable". Specify "builtin/latest" for the latest model.
-     * For custom form models, specify: “custom/{model_name}". Model name
+     * For custom form models, specify: "custom/{model_name}". Model name
      * format is "bucket_name/path/to/modeldir" corresponding to
      * "gs://bucket_name/path/to/modeldir" where annotated examples are stored.
      * 
@@ -1404,7 +1151,7 @@ public com.google.protobuf.ByteString getModelVersionBytes() { *
      * Model version of the form extraction system. Default is
      * "builtin/stable". Specify "builtin/latest" for the latest model.
-     * For custom form models, specify: “custom/{model_name}". Model name
+     * For custom form models, specify: "custom/{model_name}". Model name
      * format is "bucket_name/path/to/modeldir" corresponding to
      * "gs://bucket_name/path/to/modeldir" where annotated examples are stored.
      * 
@@ -1429,7 +1176,7 @@ public Builder setModelVersion(java.lang.String value) { *
      * Model version of the form extraction system. Default is
      * "builtin/stable". Specify "builtin/latest" for the latest model.
-     * For custom form models, specify: “custom/{model_name}". Model name
+     * For custom form models, specify: "custom/{model_name}". Model name
      * format is "bucket_name/path/to/modeldir" corresponding to
      * "gs://bucket_name/path/to/modeldir" where annotated examples are stored.
      * 
@@ -1450,7 +1197,7 @@ public Builder clearModelVersion() { *
      * Model version of the form extraction system. Default is
      * "builtin/stable". Specify "builtin/latest" for the latest model.
-     * For custom form models, specify: “custom/{model_name}". Model name
+     * For custom form models, specify: "custom/{model_name}". Model name
      * format is "bucket_name/path/to/modeldir" corresponding to
      * "gs://bucket_name/path/to/modeldir" where annotated examples are stored.
      * 
diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/FormExtractionParamsOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/FormExtractionParamsOrBuilder.java index 9f5824737814..7eea32e402f7 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/FormExtractionParamsOrBuilder.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/FormExtractionParamsOrBuilder.java @@ -40,18 +40,7 @@ public interface FormExtractionParamsOrBuilder * * *
-   * User can provide pairs of (key text, value type) to improve the parsing
-   * result.
-   *
-   * For example, if a document has a field called "Date" that holds a date
-   * value and a field called "Amount" that may hold either a currency value
-   * (e.g., "$500.00") or a simple number value (e.g., "20"), you could use the
-   * following hints: [ {"key": "Date", value_types: [ "DATE"]}, {"key":
-   * "Amount", "value_types": [ "PRICE", "NUMBER" ]} ]
-   *
-   * If the value type is unknown, but you want to provide hints for the keys,
-   * you can leave the value_types field blank. e.g. {"key": "Date",
-   * "value_types": []}
+   * Reserved for future use.
    * 
* * repeated .google.cloud.documentai.v1beta2.KeyValuePairHint key_value_pair_hints = 2; @@ -62,18 +51,7 @@ public interface FormExtractionParamsOrBuilder * * *
-   * User can provide pairs of (key text, value type) to improve the parsing
-   * result.
-   *
-   * For example, if a document has a field called "Date" that holds a date
-   * value and a field called "Amount" that may hold either a currency value
-   * (e.g., "$500.00") or a simple number value (e.g., "20"), you could use the
-   * following hints: [ {"key": "Date", value_types: [ "DATE"]}, {"key":
-   * "Amount", "value_types": [ "PRICE", "NUMBER" ]} ]
-   *
-   * If the value type is unknown, but you want to provide hints for the keys,
-   * you can leave the value_types field blank. e.g. {"key": "Date",
-   * "value_types": []}
+   * Reserved for future use.
    * 
* * repeated .google.cloud.documentai.v1beta2.KeyValuePairHint key_value_pair_hints = 2; @@ -84,18 +62,7 @@ public interface FormExtractionParamsOrBuilder * * *
-   * User can provide pairs of (key text, value type) to improve the parsing
-   * result.
-   *
-   * For example, if a document has a field called "Date" that holds a date
-   * value and a field called "Amount" that may hold either a currency value
-   * (e.g., "$500.00") or a simple number value (e.g., "20"), you could use the
-   * following hints: [ {"key": "Date", value_types: [ "DATE"]}, {"key":
-   * "Amount", "value_types": [ "PRICE", "NUMBER" ]} ]
-   *
-   * If the value type is unknown, but you want to provide hints for the keys,
-   * you can leave the value_types field blank. e.g. {"key": "Date",
-   * "value_types": []}
+   * Reserved for future use.
    * 
* * repeated .google.cloud.documentai.v1beta2.KeyValuePairHint key_value_pair_hints = 2; @@ -106,18 +73,7 @@ public interface FormExtractionParamsOrBuilder * * *
-   * User can provide pairs of (key text, value type) to improve the parsing
-   * result.
-   *
-   * For example, if a document has a field called "Date" that holds a date
-   * value and a field called "Amount" that may hold either a currency value
-   * (e.g., "$500.00") or a simple number value (e.g., "20"), you could use the
-   * following hints: [ {"key": "Date", value_types: [ "DATE"]}, {"key":
-   * "Amount", "value_types": [ "PRICE", "NUMBER" ]} ]
-   *
-   * If the value type is unknown, but you want to provide hints for the keys,
-   * you can leave the value_types field blank. e.g. {"key": "Date",
-   * "value_types": []}
+   * Reserved for future use.
    * 
* * repeated .google.cloud.documentai.v1beta2.KeyValuePairHint key_value_pair_hints = 2; @@ -129,18 +85,7 @@ public interface FormExtractionParamsOrBuilder * * *
-   * User can provide pairs of (key text, value type) to improve the parsing
-   * result.
-   *
-   * For example, if a document has a field called "Date" that holds a date
-   * value and a field called "Amount" that may hold either a currency value
-   * (e.g., "$500.00") or a simple number value (e.g., "20"), you could use the
-   * following hints: [ {"key": "Date", value_types: [ "DATE"]}, {"key":
-   * "Amount", "value_types": [ "PRICE", "NUMBER" ]} ]
-   *
-   * If the value type is unknown, but you want to provide hints for the keys,
-   * you can leave the value_types field blank. e.g. {"key": "Date",
-   * "value_types": []}
+   * Reserved for future use.
    * 
* * repeated .google.cloud.documentai.v1beta2.KeyValuePairHint key_value_pair_hints = 2; @@ -155,7 +100,7 @@ com.google.cloud.documentai.v1beta2.KeyValuePairHintOrBuilder getKeyValuePairHin *
    * Model version of the form extraction system. Default is
    * "builtin/stable". Specify "builtin/latest" for the latest model.
-   * For custom form models, specify: “custom/{model_name}". Model name
+   * For custom form models, specify: "custom/{model_name}". Model name
    * format is "bucket_name/path/to/modeldir" corresponding to
    * "gs://bucket_name/path/to/modeldir" where annotated examples are stored.
    * 
@@ -171,7 +116,7 @@ com.google.cloud.documentai.v1beta2.KeyValuePairHintOrBuilder getKeyValuePairHin *
    * Model version of the form extraction system. Default is
    * "builtin/stable". Specify "builtin/latest" for the latest model.
-   * For custom form models, specify: “custom/{model_name}". Model name
+   * For custom form models, specify: "custom/{model_name}". Model name
    * format is "bucket_name/path/to/modeldir" corresponding to
    * "gs://bucket_name/path/to/modeldir" where annotated examples are stored.
    * 
diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/InputConfig.java b/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/InputConfig.java index 67135b02eb7b..a44d034bbc5b 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/InputConfig.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/InputConfig.java @@ -216,11 +216,12 @@ public com.google.protobuf.ByteString getContents() { * * *
-   * Required. Mimetype of the input. Current supported mimetypes are application/pdf,
-   * image/tiff, and image/gif.
-   * In addition, application/json type is supported for requests with
-   * [ProcessDocumentRequest.automl_params][google.cloud.documentai.v1beta2.ProcessDocumentRequest.automl_params] field set. The JSON file needs to
-   * be in [Document][google.cloud.documentai.v1beta2.Document] format.
+   * Required. Mimetype of the input. Current supported mimetypes are
+   * application/pdf, image/tiff, and image/gif. In addition, application/json
+   * type is supported for requests with
+   * [ProcessDocumentRequest.automl_params][google.cloud.documentai.v1beta2.ProcessDocumentRequest.automl_params]
+   * field set. The JSON file needs to be in
+   * [Document][google.cloud.documentai.v1beta2.Document] format.
    * 
* * string mime_type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -243,11 +244,12 @@ public java.lang.String getMimeType() { * * *
-   * Required. Mimetype of the input. Current supported mimetypes are application/pdf,
-   * image/tiff, and image/gif.
-   * In addition, application/json type is supported for requests with
-   * [ProcessDocumentRequest.automl_params][google.cloud.documentai.v1beta2.ProcessDocumentRequest.automl_params] field set. The JSON file needs to
-   * be in [Document][google.cloud.documentai.v1beta2.Document] format.
+   * Required. Mimetype of the input. Current supported mimetypes are
+   * application/pdf, image/tiff, and image/gif. In addition, application/json
+   * type is supported for requests with
+   * [ProcessDocumentRequest.automl_params][google.cloud.documentai.v1beta2.ProcessDocumentRequest.automl_params]
+   * field set. The JSON file needs to be in
+   * [Document][google.cloud.documentai.v1beta2.Document] format.
    * 
* * string mime_type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -1015,11 +1017,12 @@ public Builder clearContents() { * * *
-     * Required. Mimetype of the input. Current supported mimetypes are application/pdf,
-     * image/tiff, and image/gif.
-     * In addition, application/json type is supported for requests with
-     * [ProcessDocumentRequest.automl_params][google.cloud.documentai.v1beta2.ProcessDocumentRequest.automl_params] field set. The JSON file needs to
-     * be in [Document][google.cloud.documentai.v1beta2.Document] format.
+     * Required. Mimetype of the input. Current supported mimetypes are
+     * application/pdf, image/tiff, and image/gif. In addition, application/json
+     * type is supported for requests with
+     * [ProcessDocumentRequest.automl_params][google.cloud.documentai.v1beta2.ProcessDocumentRequest.automl_params]
+     * field set. The JSON file needs to be in
+     * [Document][google.cloud.documentai.v1beta2.Document] format.
      * 
* * string mime_type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -1041,11 +1044,12 @@ public java.lang.String getMimeType() { * * *
-     * Required. Mimetype of the input. Current supported mimetypes are application/pdf,
-     * image/tiff, and image/gif.
-     * In addition, application/json type is supported for requests with
-     * [ProcessDocumentRequest.automl_params][google.cloud.documentai.v1beta2.ProcessDocumentRequest.automl_params] field set. The JSON file needs to
-     * be in [Document][google.cloud.documentai.v1beta2.Document] format.
+     * Required. Mimetype of the input. Current supported mimetypes are
+     * application/pdf, image/tiff, and image/gif. In addition, application/json
+     * type is supported for requests with
+     * [ProcessDocumentRequest.automl_params][google.cloud.documentai.v1beta2.ProcessDocumentRequest.automl_params]
+     * field set. The JSON file needs to be in
+     * [Document][google.cloud.documentai.v1beta2.Document] format.
      * 
* * string mime_type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -1067,11 +1071,12 @@ public com.google.protobuf.ByteString getMimeTypeBytes() { * * *
-     * Required. Mimetype of the input. Current supported mimetypes are application/pdf,
-     * image/tiff, and image/gif.
-     * In addition, application/json type is supported for requests with
-     * [ProcessDocumentRequest.automl_params][google.cloud.documentai.v1beta2.ProcessDocumentRequest.automl_params] field set. The JSON file needs to
-     * be in [Document][google.cloud.documentai.v1beta2.Document] format.
+     * Required. Mimetype of the input. Current supported mimetypes are
+     * application/pdf, image/tiff, and image/gif. In addition, application/json
+     * type is supported for requests with
+     * [ProcessDocumentRequest.automl_params][google.cloud.documentai.v1beta2.ProcessDocumentRequest.automl_params]
+     * field set. The JSON file needs to be in
+     * [Document][google.cloud.documentai.v1beta2.Document] format.
      * 
* * string mime_type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -1092,11 +1097,12 @@ public Builder setMimeType(java.lang.String value) { * * *
-     * Required. Mimetype of the input. Current supported mimetypes are application/pdf,
-     * image/tiff, and image/gif.
-     * In addition, application/json type is supported for requests with
-     * [ProcessDocumentRequest.automl_params][google.cloud.documentai.v1beta2.ProcessDocumentRequest.automl_params] field set. The JSON file needs to
-     * be in [Document][google.cloud.documentai.v1beta2.Document] format.
+     * Required. Mimetype of the input. Current supported mimetypes are
+     * application/pdf, image/tiff, and image/gif. In addition, application/json
+     * type is supported for requests with
+     * [ProcessDocumentRequest.automl_params][google.cloud.documentai.v1beta2.ProcessDocumentRequest.automl_params]
+     * field set. The JSON file needs to be in
+     * [Document][google.cloud.documentai.v1beta2.Document] format.
      * 
* * string mime_type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -1113,11 +1119,12 @@ public Builder clearMimeType() { * * *
-     * Required. Mimetype of the input. Current supported mimetypes are application/pdf,
-     * image/tiff, and image/gif.
-     * In addition, application/json type is supported for requests with
-     * [ProcessDocumentRequest.automl_params][google.cloud.documentai.v1beta2.ProcessDocumentRequest.automl_params] field set. The JSON file needs to
-     * be in [Document][google.cloud.documentai.v1beta2.Document] format.
+     * Required. Mimetype of the input. Current supported mimetypes are
+     * application/pdf, image/tiff, and image/gif. In addition, application/json
+     * type is supported for requests with
+     * [ProcessDocumentRequest.automl_params][google.cloud.documentai.v1beta2.ProcessDocumentRequest.automl_params]
+     * field set. The JSON file needs to be in
+     * [Document][google.cloud.documentai.v1beta2.Document] format.
      * 
* * string mime_type = 2 [(.google.api.field_behavior) = REQUIRED]; diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/InputConfigOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/InputConfigOrBuilder.java index 0c369d20d90b..b9229cc9adc0 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/InputConfigOrBuilder.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/InputConfigOrBuilder.java @@ -98,11 +98,12 @@ public interface InputConfigOrBuilder * * *
-   * Required. Mimetype of the input. Current supported mimetypes are application/pdf,
-   * image/tiff, and image/gif.
-   * In addition, application/json type is supported for requests with
-   * [ProcessDocumentRequest.automl_params][google.cloud.documentai.v1beta2.ProcessDocumentRequest.automl_params] field set. The JSON file needs to
-   * be in [Document][google.cloud.documentai.v1beta2.Document] format.
+   * Required. Mimetype of the input. Current supported mimetypes are
+   * application/pdf, image/tiff, and image/gif. In addition, application/json
+   * type is supported for requests with
+   * [ProcessDocumentRequest.automl_params][google.cloud.documentai.v1beta2.ProcessDocumentRequest.automl_params]
+   * field set. The JSON file needs to be in
+   * [Document][google.cloud.documentai.v1beta2.Document] format.
    * 
* * string mime_type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -114,11 +115,12 @@ public interface InputConfigOrBuilder * * *
-   * Required. Mimetype of the input. Current supported mimetypes are application/pdf,
-   * image/tiff, and image/gif.
-   * In addition, application/json type is supported for requests with
-   * [ProcessDocumentRequest.automl_params][google.cloud.documentai.v1beta2.ProcessDocumentRequest.automl_params] field set. The JSON file needs to
-   * be in [Document][google.cloud.documentai.v1beta2.Document] format.
+   * Required. Mimetype of the input. Current supported mimetypes are
+   * application/pdf, image/tiff, and image/gif. In addition, application/json
+   * type is supported for requests with
+   * [ProcessDocumentRequest.automl_params][google.cloud.documentai.v1beta2.ProcessDocumentRequest.automl_params]
+   * field set. The JSON file needs to be in
+   * [Document][google.cloud.documentai.v1beta2.Document] format.
    * 
* * string mime_type = 2 [(.google.api.field_behavior) = REQUIRED]; diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/KeyValuePairHint.java b/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/KeyValuePairHint.java index 5676c34be7e5..fbb250c32610 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/KeyValuePairHint.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/KeyValuePairHint.java @@ -22,7 +22,7 @@ * * *
- * User-provided hint for key value pair.
+ * Reserved for future use.
  * 
* * Protobuf type {@code google.cloud.documentai.v1beta2.KeyValuePairHint} @@ -369,7 +369,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * User-provided hint for key value pair.
+   * Reserved for future use.
    * 
* * Protobuf type {@code google.cloud.documentai.v1beta2.KeyValuePairHint} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/NormalizedVertex.java b/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/NormalizedVertex.java index 86af9ac45aab..75bb1c3a6b55 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/NormalizedVertex.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/NormalizedVertex.java @@ -86,7 +86,7 @@ public float getX() { * * *
-   * Y coordinate.
+   * Y coordinate (starts from the top of the image).
    * 
* * float y = 2; @@ -522,7 +522,7 @@ public Builder clearX() { * * *
-     * Y coordinate.
+     * Y coordinate (starts from the top of the image).
      * 
* * float y = 2; @@ -537,7 +537,7 @@ public float getY() { * * *
-     * Y coordinate.
+     * Y coordinate (starts from the top of the image).
      * 
* * float y = 2; @@ -556,7 +556,7 @@ public Builder setY(float value) { * * *
-     * Y coordinate.
+     * Y coordinate (starts from the top of the image).
      * 
* * float y = 2; diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/NormalizedVertexOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/NormalizedVertexOrBuilder.java index abbb3e19affd..ef947b547c85 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/NormalizedVertexOrBuilder.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/NormalizedVertexOrBuilder.java @@ -40,7 +40,7 @@ public interface NormalizedVertexOrBuilder * * *
-   * Y coordinate.
+   * Y coordinate (starts from the top of the image).
    * 
* * float y = 2; diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/ProcessDocumentRequest.java b/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/ProcessDocumentRequest.java index b04b52afffe4..2cb56b07adff 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/ProcessDocumentRequest.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/ProcessDocumentRequest.java @@ -186,13 +186,11 @@ public com.google.cloud.documentai.v1beta2.InputConfigOrBuilder getInputConfigOr * * *
-   * Optional. The desired output location. This field is only needed in
+   * The desired output location. This field is only needed in
    * BatchProcessDocumentsRequest.
    * 
* - * - * .google.cloud.documentai.v1beta2.OutputConfig output_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * + * .google.cloud.documentai.v1beta2.OutputConfig output_config = 2; * * @return Whether the outputConfig field is set. */ @@ -204,13 +202,11 @@ public boolean hasOutputConfig() { * * *
-   * Optional. The desired output location. This field is only needed in
+   * The desired output location. This field is only needed in
    * BatchProcessDocumentsRequest.
    * 
* - * - * .google.cloud.documentai.v1beta2.OutputConfig output_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * + * .google.cloud.documentai.v1beta2.OutputConfig output_config = 2; * * @return The outputConfig. */ @@ -224,13 +220,11 @@ public com.google.cloud.documentai.v1beta2.OutputConfig getOutputConfig() { * * *
-   * Optional. The desired output location. This field is only needed in
+   * The desired output location. This field is only needed in
    * BatchProcessDocumentsRequest.
    * 
* - * - * .google.cloud.documentai.v1beta2.OutputConfig output_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * + * .google.cloud.documentai.v1beta2.OutputConfig output_config = 2; */ @java.lang.Override public com.google.cloud.documentai.v1beta2.OutputConfigOrBuilder getOutputConfigOrBuilder() { @@ -1514,13 +1508,11 @@ public com.google.cloud.documentai.v1beta2.InputConfigOrBuilder getInputConfigOr * * *
-     * Optional. The desired output location. This field is only needed in
+     * The desired output location. This field is only needed in
      * BatchProcessDocumentsRequest.
      * 
* - * - * .google.cloud.documentai.v1beta2.OutputConfig output_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * + * .google.cloud.documentai.v1beta2.OutputConfig output_config = 2; * * @return Whether the outputConfig field is set. */ @@ -1531,13 +1523,11 @@ public boolean hasOutputConfig() { * * *
-     * Optional. The desired output location. This field is only needed in
+     * The desired output location. This field is only needed in
      * BatchProcessDocumentsRequest.
      * 
* - * - * .google.cloud.documentai.v1beta2.OutputConfig output_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * + * .google.cloud.documentai.v1beta2.OutputConfig output_config = 2; * * @return The outputConfig. */ @@ -1554,13 +1544,11 @@ public com.google.cloud.documentai.v1beta2.OutputConfig getOutputConfig() { * * *
-     * Optional. The desired output location. This field is only needed in
+     * The desired output location. This field is only needed in
      * BatchProcessDocumentsRequest.
      * 
* - * - * .google.cloud.documentai.v1beta2.OutputConfig output_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * + * .google.cloud.documentai.v1beta2.OutputConfig output_config = 2; */ public Builder setOutputConfig(com.google.cloud.documentai.v1beta2.OutputConfig value) { if (outputConfigBuilder_ == null) { @@ -1579,13 +1567,11 @@ public Builder setOutputConfig(com.google.cloud.documentai.v1beta2.OutputConfig * * *
-     * Optional. The desired output location. This field is only needed in
+     * The desired output location. This field is only needed in
      * BatchProcessDocumentsRequest.
      * 
* - * - * .google.cloud.documentai.v1beta2.OutputConfig output_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * + * .google.cloud.documentai.v1beta2.OutputConfig output_config = 2; */ public Builder setOutputConfig( com.google.cloud.documentai.v1beta2.OutputConfig.Builder builderForValue) { @@ -1602,13 +1588,11 @@ public Builder setOutputConfig( * * *
-     * Optional. The desired output location. This field is only needed in
+     * The desired output location. This field is only needed in
      * BatchProcessDocumentsRequest.
      * 
* - * - * .google.cloud.documentai.v1beta2.OutputConfig output_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * + * .google.cloud.documentai.v1beta2.OutputConfig output_config = 2; */ public Builder mergeOutputConfig(com.google.cloud.documentai.v1beta2.OutputConfig value) { if (outputConfigBuilder_ == null) { @@ -1631,13 +1615,11 @@ public Builder mergeOutputConfig(com.google.cloud.documentai.v1beta2.OutputConfi * * *
-     * Optional. The desired output location. This field is only needed in
+     * The desired output location. This field is only needed in
      * BatchProcessDocumentsRequest.
      * 
* - * - * .google.cloud.documentai.v1beta2.OutputConfig output_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * + * .google.cloud.documentai.v1beta2.OutputConfig output_config = 2; */ public Builder clearOutputConfig() { bitField0_ = (bitField0_ & ~0x00000004); @@ -1653,13 +1635,11 @@ public Builder clearOutputConfig() { * * *
-     * Optional. The desired output location. This field is only needed in
+     * The desired output location. This field is only needed in
      * BatchProcessDocumentsRequest.
      * 
* - * - * .google.cloud.documentai.v1beta2.OutputConfig output_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * + * .google.cloud.documentai.v1beta2.OutputConfig output_config = 2; */ public com.google.cloud.documentai.v1beta2.OutputConfig.Builder getOutputConfigBuilder() { bitField0_ |= 0x00000004; @@ -1670,13 +1650,11 @@ public com.google.cloud.documentai.v1beta2.OutputConfig.Builder getOutputConfigB * * *
-     * Optional. The desired output location. This field is only needed in
+     * The desired output location. This field is only needed in
      * BatchProcessDocumentsRequest.
      * 
* - * - * .google.cloud.documentai.v1beta2.OutputConfig output_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * + * .google.cloud.documentai.v1beta2.OutputConfig output_config = 2; */ public com.google.cloud.documentai.v1beta2.OutputConfigOrBuilder getOutputConfigOrBuilder() { if (outputConfigBuilder_ != null) { @@ -1691,13 +1669,11 @@ public com.google.cloud.documentai.v1beta2.OutputConfigOrBuilder getOutputConfig * * *
-     * Optional. The desired output location. This field is only needed in
+     * The desired output location. This field is only needed in
      * BatchProcessDocumentsRequest.
      * 
* - * - * .google.cloud.documentai.v1beta2.OutputConfig output_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * + * .google.cloud.documentai.v1beta2.OutputConfig output_config = 2; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.documentai.v1beta2.OutputConfig, diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/ProcessDocumentRequestOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/ProcessDocumentRequestOrBuilder.java index 8a1dca9797ed..9245196abd57 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/ProcessDocumentRequestOrBuilder.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/ProcessDocumentRequestOrBuilder.java @@ -103,13 +103,11 @@ public interface ProcessDocumentRequestOrBuilder * * *
-   * Optional. The desired output location. This field is only needed in
+   * The desired output location. This field is only needed in
    * BatchProcessDocumentsRequest.
    * 
* - * - * .google.cloud.documentai.v1beta2.OutputConfig output_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * + * .google.cloud.documentai.v1beta2.OutputConfig output_config = 2; * * @return Whether the outputConfig field is set. */ @@ -118,13 +116,11 @@ public interface ProcessDocumentRequestOrBuilder * * *
-   * Optional. The desired output location. This field is only needed in
+   * The desired output location. This field is only needed in
    * BatchProcessDocumentsRequest.
    * 
* - * - * .google.cloud.documentai.v1beta2.OutputConfig output_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * + * .google.cloud.documentai.v1beta2.OutputConfig output_config = 2; * * @return The outputConfig. */ @@ -133,13 +129,11 @@ public interface ProcessDocumentRequestOrBuilder * * *
-   * Optional. The desired output location. This field is only needed in
+   * The desired output location. This field is only needed in
    * BatchProcessDocumentsRequest.
    * 
* - * - * .google.cloud.documentai.v1beta2.OutputConfig output_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * + * .google.cloud.documentai.v1beta2.OutputConfig output_config = 2; */ com.google.cloud.documentai.v1beta2.OutputConfigOrBuilder getOutputConfigOrBuilder(); diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/TableExtractionParams.java b/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/TableExtractionParams.java index 054e4c81c77b..6f944912a7d2 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/TableExtractionParams.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/TableExtractionParams.java @@ -179,8 +179,7 @@ public com.google.cloud.documentai.v1beta2.TableBoundHintOrBuilder getTableBound * * *
-   * Optional. Table header hints. The extraction will bias towards producing
-   * these terms as table headers, which may improve accuracy.
+   * Optional. Reserved for future use.
    * 
* * repeated string header_hints = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -194,8 +193,7 @@ public com.google.protobuf.ProtocolStringList getHeaderHintsList() { * * *
-   * Optional. Table header hints. The extraction will bias towards producing
-   * these terms as table headers, which may improve accuracy.
+   * Optional. Reserved for future use.
    * 
* * repeated string header_hints = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -209,8 +207,7 @@ public int getHeaderHintsCount() { * * *
-   * Optional. Table header hints. The extraction will bias towards producing
-   * these terms as table headers, which may improve accuracy.
+   * Optional. Reserved for future use.
    * 
* * repeated string header_hints = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -225,8 +222,7 @@ public java.lang.String getHeaderHints(int index) { * * *
-   * Optional. Table header hints. The extraction will bias towards producing
-   * these terms as table headers, which may improve accuracy.
+   * Optional. Reserved for future use.
    * 
* * repeated string header_hints = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -1249,8 +1245,7 @@ private void ensureHeaderHintsIsMutable() { * * *
-     * Optional. Table header hints. The extraction will bias towards producing
-     * these terms as table headers, which may improve accuracy.
+     * Optional. Reserved for future use.
      * 
* * repeated string header_hints = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -1265,8 +1260,7 @@ public com.google.protobuf.ProtocolStringList getHeaderHintsList() { * * *
-     * Optional. Table header hints. The extraction will bias towards producing
-     * these terms as table headers, which may improve accuracy.
+     * Optional. Reserved for future use.
      * 
* * repeated string header_hints = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -1280,8 +1274,7 @@ public int getHeaderHintsCount() { * * *
-     * Optional. Table header hints. The extraction will bias towards producing
-     * these terms as table headers, which may improve accuracy.
+     * Optional. Reserved for future use.
      * 
* * repeated string header_hints = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -1296,8 +1289,7 @@ public java.lang.String getHeaderHints(int index) { * * *
-     * Optional. Table header hints. The extraction will bias towards producing
-     * these terms as table headers, which may improve accuracy.
+     * Optional. Reserved for future use.
      * 
* * repeated string header_hints = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -1312,8 +1304,7 @@ public com.google.protobuf.ByteString getHeaderHintsBytes(int index) { * * *
-     * Optional. Table header hints. The extraction will bias towards producing
-     * these terms as table headers, which may improve accuracy.
+     * Optional. Reserved for future use.
      * 
* * repeated string header_hints = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -1336,8 +1327,7 @@ public Builder setHeaderHints(int index, java.lang.String value) { * * *
-     * Optional. Table header hints. The extraction will bias towards producing
-     * these terms as table headers, which may improve accuracy.
+     * Optional. Reserved for future use.
      * 
* * repeated string header_hints = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -1359,8 +1349,7 @@ public Builder addHeaderHints(java.lang.String value) { * * *
-     * Optional. Table header hints. The extraction will bias towards producing
-     * these terms as table headers, which may improve accuracy.
+     * Optional. Reserved for future use.
      * 
* * repeated string header_hints = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -1379,8 +1368,7 @@ public Builder addAllHeaderHints(java.lang.Iterable values) { * * *
-     * Optional. Table header hints. The extraction will bias towards producing
-     * these terms as table headers, which may improve accuracy.
+     * Optional. Reserved for future use.
      * 
* * repeated string header_hints = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -1398,8 +1386,7 @@ public Builder clearHeaderHints() { * * *
-     * Optional. Table header hints. The extraction will bias towards producing
-     * these terms as table headers, which may improve accuracy.
+     * Optional. Reserved for future use.
      * 
* * repeated string header_hints = 3 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/TableExtractionParamsOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/TableExtractionParamsOrBuilder.java index 6e7ee8c09981..2ecafee1d849 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/TableExtractionParamsOrBuilder.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/TableExtractionParamsOrBuilder.java @@ -108,8 +108,7 @@ com.google.cloud.documentai.v1beta2.TableBoundHintOrBuilder getTableBoundHintsOr * * *
-   * Optional. Table header hints. The extraction will bias towards producing
-   * these terms as table headers, which may improve accuracy.
+   * Optional. Reserved for future use.
    * 
* * repeated string header_hints = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -121,8 +120,7 @@ com.google.cloud.documentai.v1beta2.TableBoundHintOrBuilder getTableBoundHintsOr * * *
-   * Optional. Table header hints. The extraction will bias towards producing
-   * these terms as table headers, which may improve accuracy.
+   * Optional. Reserved for future use.
    * 
* * repeated string header_hints = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -134,8 +132,7 @@ com.google.cloud.documentai.v1beta2.TableBoundHintOrBuilder getTableBoundHintsOr * * *
-   * Optional. Table header hints. The extraction will bias towards producing
-   * these terms as table headers, which may improve accuracy.
+   * Optional. Reserved for future use.
    * 
* * repeated string header_hints = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -148,8 +145,7 @@ com.google.cloud.documentai.v1beta2.TableBoundHintOrBuilder getTableBoundHintsOr * * *
-   * Optional. Table header hints. The extraction will bias towards producing
-   * these terms as table headers, which may improve accuracy.
+   * Optional. Reserved for future use.
    * 
* * repeated string header_hints = 3 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/Vertex.java b/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/Vertex.java index f5d2d50bbdcd..fc0ff9440103 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/Vertex.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/Vertex.java @@ -85,7 +85,7 @@ public int getX() { * * *
-   * Y coordinate.
+   * Y coordinate (starts from the top of the image).
    * 
* * int32 y = 2; @@ -517,7 +517,7 @@ public Builder clearX() { * * *
-     * Y coordinate.
+     * Y coordinate (starts from the top of the image).
      * 
* * int32 y = 2; @@ -532,7 +532,7 @@ public int getY() { * * *
-     * Y coordinate.
+     * Y coordinate (starts from the top of the image).
      * 
* * int32 y = 2; @@ -551,7 +551,7 @@ public Builder setY(int value) { * * *
-     * Y coordinate.
+     * Y coordinate (starts from the top of the image).
      * 
* * int32 y = 2; diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/VertexOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/VertexOrBuilder.java index e131a6454a2e..37ba0077976a 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/VertexOrBuilder.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/VertexOrBuilder.java @@ -40,7 +40,7 @@ public interface VertexOrBuilder * * *
-   * Y coordinate.
+   * Y coordinate (starts from the top of the image).
    * 
* * int32 y = 2; diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/proto/google/cloud/documentai/v1beta2/barcode.proto b/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/proto/google/cloud/documentai/v1beta2/barcode.proto new file mode 100644 index 000000000000..9de123e17029 --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/proto/google/cloud/documentai/v1beta2/barcode.proto @@ -0,0 +1,69 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.documentai.v1beta2; + +option csharp_namespace = "Google.Cloud.DocumentAI.V1Beta2"; +option go_package = "cloud.google.com/go/documentai/apiv1beta2/documentaipb;documentaipb"; +option java_multiple_files = true; +option java_outer_classname = "BarcodeProto"; +option java_package = "com.google.cloud.documentai.v1beta2"; +option php_namespace = "Google\\Cloud\\DocumentAI\\V1beta2"; +option ruby_package = "Google::Cloud::DocumentAI::V1beta2"; + +// Encodes the detailed information of a barcode. +message Barcode { + // Format of a barcode. + // The supported formats are: + // + // - `CODE_128`: Code 128 type. + // - `CODE_39`: Code 39 type. + // - `CODE_93`: Code 93 type. + // - `CODABAR`: Codabar type. + // - `DATA_MATRIX`: 2D Data Matrix type. + // - `ITF`: ITF type. + // - `EAN_13`: EAN-13 type. + // - `EAN_8`: EAN-8 type. + // - `QR_CODE`: 2D QR code type. + // - `UPC_A`: UPC-A type. + // - `UPC_E`: UPC-E type. + // - `PDF417`: PDF417 type. + // - `AZTEC`: 2D Aztec code type. + // - `DATABAR`: GS1 DataBar code type. + string format = 1; + + // Value format describes the format of the value that a barcode + // encodes. + // The supported formats are: + // + // - `CONTACT_INFO`: Contact information. + // - `EMAIL`: Email address. + // - `ISBN`: ISBN identifier. + // - `PHONE`: Phone number. + // - `PRODUCT`: Product. + // - `SMS`: SMS message. + // - `TEXT`: Text string. + // - `URL`: URL address. + // - `WIFI`: Wifi information. + // - `GEO`: Geo-localization. + // - `CALENDAR_EVENT`: Calendar event. + // - `DRIVER_LICENSE`: Driver's license. + string value_format = 2; + + // Raw value encoded in the barcode. + // For example: `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`. + string raw_value = 3; +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/proto/google/cloud/documentai/v1beta2/document.proto b/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/proto/google/cloud/documentai/v1beta2/document.proto index bcf457112a02..7e97a6e59359 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/proto/google/cloud/documentai/v1beta2/document.proto +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/proto/google/cloud/documentai/v1beta2/document.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,9 +17,15 @@ syntax = "proto3"; package google.cloud.documentai.v1beta2; import "google/api/field_behavior.proto"; +import "google/cloud/documentai/v1beta2/barcode.proto"; import "google/cloud/documentai/v1beta2/geometry.proto"; +import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; import "google/type/color.proto"; +import "google/type/date.proto"; +import "google/type/datetime.proto"; +import "google/type/money.proto"; +import "google/type/postal_address.proto"; option csharp_namespace = "Google.Cloud.DocumentAI.V1Beta2"; option go_package = "cloud.google.com/go/documentai/apiv1beta2/documentaipb;documentaipb"; @@ -29,11 +35,10 @@ option java_package = "com.google.cloud.documentai.v1beta2"; option php_namespace = "Google\\Cloud\\DocumentAI\\V1beta2"; option ruby_package = "Google::Cloud::DocumentAI::V1beta2"; -// 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. +// Document represents the canonical document resource in Document AI. It is an +// interchange format that provides insights into documents and allows for +// collaboration between users and Document AI to iterate and optimize for +// quality. message Document { // For a large document, sharding may be performed to produce several // document shards. Each document shard contains this field to detail which @@ -45,15 +50,17 @@ message Document { // Total number of shards. int64 shard_count = 2; - // The index of the first character in [Document.text][google.cloud.documentai.v1beta2.Document.text] in the overall - // document global text. + // The index of the first character in + // [Document.text][google.cloud.documentai.v1beta2.Document.text] in the + // overall document global text. int64 text_offset = 3; } // Label attaches schema information and/or other metadata to segments within - // a [Document][google.cloud.documentai.v1beta2.Document]. Multiple [Label][google.cloud.documentai.v1beta2.Document.Label]s on a single field can denote either - // different labels, different instances of the same label created at - // different times, or some combination of both. + // a [Document][google.cloud.documentai.v1beta2.Document]. Multiple + // [Label][google.cloud.documentai.v1beta2.Document.Label]s on a single field + // can denote either different labels, different instances of the same label + // created at different times, or some combination of both. message Label { // Provenance of the label. oneof source { @@ -83,11 +90,13 @@ message Document { // Font size for the text. float size = 1; - // Unit for the font size. Follows CSS naming (in, px, pt, etc.). + // Unit for the font size. Follows CSS naming (such as `in`, `px`, and + // `pt`). string unit = 2; } - // Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text]. + // Text anchor indexing into the + // [Document.text][google.cloud.documentai.v1beta2.Document.text]. TextAnchor text_anchor = 1; // Text color. @@ -96,21 +105,26 @@ message Document { // Text background color. google.type.Color background_color = 3; - // Font weight. Possible values are normal, bold, bolder, and lighter. - // https://www.w3schools.com/cssref/pr_font_weight.asp + // [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp). + // Possible values are `normal`, `bold`, `bolder`, and `lighter`. string font_weight = 4; - // Text style. Possible values are normal, italic, and oblique. - // https://www.w3schools.com/cssref/pr_font_font-style.asp + // [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp). + // Possible values are `normal`, `italic`, and `oblique`. string text_style = 5; - // Text decoration. Follows CSS standard. - // - // https://www.w3schools.com/cssref/pr_text_text-decoration.asp + // [Text + // decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp). + // Follows CSS standard. + // string text_decoration = 6; // Font size. FontSize font_size = 7; + + // Font family such as `Arial`, `Times New Roman`. + // https://www.w3schools.com/cssref/pr_font_font-family.asp + string font_family = 8; } // A page in a [Document][google.cloud.documentai.v1beta2.Document]. @@ -127,6 +141,42 @@ message Document { string unit = 3; } + // Rendered image contents for this page. + message Image { + // Raw byte content of the image. + bytes content = 1; + + // Encoding [media type (MIME + // type)](https://www.iana.org/assignments/media-types/media-types.xhtml) + // for the image. + string mime_type = 2; + + // Width of the image in pixels. + int32 width = 3; + + // Height of the image in pixels. + int32 height = 4; + } + + // Representation for transformation matrix, intended to be compatible and + // used with OpenCV format for image manipulation. + message Matrix { + // Number of rows in the matrix. + int32 rows = 1; + + // Number of columns in the matrix. + int32 cols = 2; + + // This encodes information about what data type the matrix uses. + // For example, 0 (CV_8U) is an unsigned 8-bit image. For the full list + // of OpenCV primitive data types, please refer to + // https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html + int32 type = 3; + + // The matrix data. + bytes data = 4; + } + // Visual element describing a layout unit on a page. message Layout { // Detected human reading orientation. @@ -150,56 +200,71 @@ message Document { PAGE_LEFT = 4; } - // Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text]. + // Text anchor indexing into the + // [Document.text][google.cloud.documentai.v1beta2.Document.text]. TextAnchor text_anchor = 1; - // Confidence of the current [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] within context of the object this - // layout is for. e.g. confidence can be for a single token, a table, - // a visual element, etc. depending on context. Range [0, 1]. + // Confidence of the current + // [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] within + // context of the object this layout is for. e.g. confidence can be for a + // single token, a table, a visual element, etc. depending on context. + // Range `[0, 1]`. float confidence = 2; - // The bounding polygon for the [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout]. + // The bounding polygon for the + // [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout]. BoundingPoly bounding_poly = 3; - // Detected orientation for the [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout]. + // Detected orientation for the + // [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout]. Orientation orientation = 4; - - // Optional. This is the identifier used by referencing [PageAnchor][google.cloud.documentai.v1beta2.Document.PageAnchor]s. - string id = 5 [(google.api.field_behavior) = OPTIONAL]; } // A block has a set of lines (collected into paragraphs) that have a // common line-spacing and orientation. message Block { - // [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Block][google.cloud.documentai.v1beta2.Document.Page.Block]. + // [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for + // [Block][google.cloud.documentai.v1beta2.Document.Page.Block]. Layout layout = 1; // A list of detected languages together with confidence. repeated DetectedLanguage detected_languages = 2; + + // The history of this annotation. + Provenance provenance = 3 [deprecated = true]; } // A collection of lines that a human would perceive as a paragraph. message Paragraph { - // [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Paragraph][google.cloud.documentai.v1beta2.Document.Page.Paragraph]. + // [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for + // [Paragraph][google.cloud.documentai.v1beta2.Document.Page.Paragraph]. Layout layout = 1; // A list of detected languages together with confidence. repeated DetectedLanguage detected_languages = 2; + + // The history of this annotation. + Provenance provenance = 3 [deprecated = true]; } // A collection of tokens that a human would perceive as a line. // Does not cross column boundaries, can be horizontal, vertical, etc. message Line { - // [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Line][google.cloud.documentai.v1beta2.Document.Page.Line]. + // [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for + // [Line][google.cloud.documentai.v1beta2.Document.Page.Line]. Layout layout = 1; // A list of detected languages together with confidence. repeated DetectedLanguage detected_languages = 2; + + // The history of this annotation. + Provenance provenance = 3 [deprecated = true]; } // A detected token. message Token { - // Detected break at the end of a [Token][google.cloud.documentai.v1beta2.Document.Page.Token]. + // Detected break at the end of a + // [Token][google.cloud.documentai.v1beta2.Document.Page.Token]. message DetectedBreak { // Enum to denote the type of break found. enum Type { @@ -220,23 +285,96 @@ message Document { Type type = 1; } - // [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Token][google.cloud.documentai.v1beta2.Document.Page.Token]. + // Font and other text style attributes. + message StyleInfo { + // Font size in points (`1` point is `¹⁄₇₂` inches). + int32 font_size = 1; + + // Font size in pixels, equal to _unrounded + // [font_size][google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo.font_size]_ + // * _resolution_ ÷ `72.0`. + double pixel_font_size = 2; + + // Letter spacing in points. + double letter_spacing = 3; + + // Name or style of the font. + string font_type = 4; + + // Whether the text is bold (equivalent to + // [font_weight][google.cloud.documentai.v1beta2.Document.Page.Token.StyleInfo.font_weight] + // is at least `700`). + bool bold = 5; + + // Whether the text is italic. + bool italic = 6; + + // Whether the text is underlined. + bool underlined = 7; + + // Whether the text is strikethrough. + bool strikeout = 8; + + // Whether the text is a subscript. + bool subscript = 9; + + // Whether the text is a superscript. + bool superscript = 10; + + // Whether the text is in small caps. + bool smallcaps = 11; + + // TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). + // Normal is `400`, bold is `700`. + int32 font_weight = 12; + + // Whether the text is handwritten. + bool handwritten = 13; + + // Color of the text. + google.type.Color text_color = 14; + + // Color of the background. + google.type.Color background_color = 15; + } + + // [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for + // [Token][google.cloud.documentai.v1beta2.Document.Page.Token]. Layout layout = 1; - // Detected break at the end of a [Token][google.cloud.documentai.v1beta2.Document.Page.Token]. + // Detected break at the end of a + // [Token][google.cloud.documentai.v1beta2.Document.Page.Token]. DetectedBreak detected_break = 2; // A list of detected languages together with confidence. repeated DetectedLanguage detected_languages = 3; + + // The history of this annotation. + Provenance provenance = 4 [deprecated = true]; + + // Text style attributes. + StyleInfo style_info = 5; + } + + // A detected symbol. + message Symbol { + // [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for + // [Symbol][google.cloud.documentai.v1beta2.Document.Page.Symbol]. + Layout layout = 1; + + // A list of detected languages together with confidence. + repeated DetectedLanguage detected_languages = 2; } // Detected non-text visual elements e.g. checkbox, signature etc. on the // page. message VisualElement { - // [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement]. + // [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for + // [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement]. Layout layout = 1; - // Type of the [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement]. + // Type of the + // [VisualElement][google.cloud.documentai.v1beta2.Document.Page.VisualElement]. string type = 2; // A list of detected languages together with confidence. @@ -253,7 +391,8 @@ message Document { // A cell representation inside the table. message TableCell { - // [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [TableCell][google.cloud.documentai.v1beta2.Document.Page.Table.TableCell]. + // [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for + // [TableCell][google.cloud.documentai.v1beta2.Document.Page.Table.TableCell]. Layout layout = 1; // How many rows this cell spans. @@ -266,7 +405,8 @@ message Document { repeated DetectedLanguage detected_languages = 4; } - // [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for [Table][google.cloud.documentai.v1beta2.Document.Page.Table]. + // [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for + // [Table][google.cloud.documentai.v1beta2.Document.Page.Table]. Layout layout = 1; // Header rows of the table. @@ -277,15 +417,21 @@ message Document { // A list of detected languages together with confidence. repeated DetectedLanguage detected_languages = 4; + + // The history of this table. + Provenance provenance = 5 [deprecated = true]; } // A form field detected on the page. message FormField { - // [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField] name. e.g. `Address`, `Email`, - // `Grand total`, `Phone number`, etc. + // [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the + // [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField] + // name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc. Layout field_name = 1; - // [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField] value. + // [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the + // [FormField][google.cloud.documentai.v1beta2.Document.Page.FormField] + // value. Layout field_value = 2; // A list of detected languages for name together with confidence. @@ -296,38 +442,98 @@ message Document { // If the value is non-textual, this field represents the type. Current // valid values are: - // - blank (this indicates the field_value is normal text) - // - "unfilled_checkbox" - // - "filled_checkbox" + // + // - blank (this indicates the `field_value` is normal text) + // - `unfilled_checkbox` + // - `filled_checkbox` string value_type = 5; - // An internal field, created for Labeling UI to export key text. + // Created for Labeling UI to export key text. + // If corrections were made to the text identified by the + // `field_name.text_anchor`, this field will contain the correction. string corrected_key_text = 6; - // An internal field, created for Labeling UI to export value text. + // Created for Labeling UI to export value text. + // If corrections were made to the text identified by the + // `field_value.text_anchor`, this field will contain the correction. string corrected_value_text = 7; + + // The history of this annotation. + Provenance provenance = 8; + } + + // A detected barcode. + message DetectedBarcode { + // [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for + // [DetectedBarcode][google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode]. + Layout layout = 1; + + // Detailed barcode information of the + // [DetectedBarcode][google.cloud.documentai.v1beta2.Document.Page.DetectedBarcode]. + Barcode barcode = 2; } // Detected language for a structural component. message DetectedLanguage { - // The BCP-47 language code, such as "en-US" or "sr-Latn". For more - // information, see - // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + // The [BCP-47 language + // code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), + // such as `en-US` or `sr-Latn`. string language_code = 1; - // Confidence of detected language. Range [0, 1]. + // Confidence of detected language. Range `[0, 1]`. float confidence = 2; } - // 1-based index for current [Page][google.cloud.documentai.v1beta2.Document.Page] in a parent [Document][google.cloud.documentai.v1beta2.Document]. - // Useful when a page is taken out of a [Document][google.cloud.documentai.v1beta2.Document] for individual - // processing. + // Image quality scores for the page image. + message ImageQualityScores { + // Image Quality Defects + message DetectedDefect { + // Name of the defect type. Supported values are: + // + // - `quality/defect_blurry` + // - `quality/defect_noisy` + // - `quality/defect_dark` + // - `quality/defect_faint` + // - `quality/defect_text_too_small` + // - `quality/defect_document_cutoff` + // - `quality/defect_text_cutoff` + // - `quality/defect_glare` + string type = 1; + + // Confidence of detected defect. Range `[0, 1]` where `1` indicates + // strong confidence that the defect exists. + float confidence = 2; + } + + // The overall quality score. Range `[0, 1]` where `1` is perfect quality. + float quality_score = 1; + + // A list of detected defects. + repeated DetectedDefect detected_defects = 2; + } + + // 1-based index for current + // [Page][google.cloud.documentai.v1beta2.Document.Page] in a parent + // [Document][google.cloud.documentai.v1beta2.Document]. Useful when a page + // is taken out of a [Document][google.cloud.documentai.v1beta2.Document] + // for individual processing. int32 page_number = 1; + // Rendered image for this page. This image is preprocessed to remove any + // skew, rotation, and distortions such that the annotation bounding boxes + // can be upright and axis-aligned. + Image image = 13; + + // Transformation matrices that were applied to the original document image + // to produce + // [Page.image][google.cloud.documentai.v1beta2.Document.Page.image]. + repeated Matrix transforms = 14; + // Physical dimension of the page. Dimension dimension = 2; - // [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the page. + // [Layout][google.cloud.documentai.v1beta2.Document.Page.Layout] for the + // page. Layout layout = 3; // A list of detected languages together with confidence. @@ -358,37 +564,118 @@ message Document { // A list of visually detected form fields on the page. repeated FormField form_fields = 11; + + // A list of visually detected symbols on the page. + repeated Symbol symbols = 12; + + // A list of detected barcodes. + repeated DetectedBarcode detected_barcodes = 15; + + // Image quality scores. + ImageQualityScores image_quality_scores = 17; + + // The history of this page. + Provenance provenance = 16 [deprecated = true]; } - // A phrase in the text that is a known entity type, such as a person, an - // organization, or location. + // An entity that could be a phrase in the text or a property that belongs to + // the document. It is a known entity type, such as a person, an organization, + // or location. message Entity { - // Provenance of the entity. - // Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text]. - TextAnchor text_anchor = 1; + // Parsed and normalized entity value. + message NormalizedValue { + // An optional structured entity value. + // Must match entity type defined in schema if + // known. If this field is present, the `text` field could also be + // populated. + oneof structured_value { + // Money value. See also: + // https://github.com/googleapis/googleapis/blob/master/google/type/money.proto + google.type.Money money_value = 2; + + // Date value. Includes year, month, day. See also: + // https://github.com/googleapis/googleapis/blob/master/google/type/date.proto + google.type.Date date_value = 3; + + // DateTime value. Includes date, time, and timezone. See also: + // https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto + google.type.DateTime datetime_value = 4; + + // Postal address. See also: + // https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto + google.type.PostalAddress address_value = 5; + + // Boolean value. Can be used for entities with binary values, or for + // checkboxes. + bool boolean_value = 6; + + // Integer value. + int32 integer_value = 7; + + // Float value. + float float_value = 8; + } + + // Optional. An optional field to store a normalized string. + // For some entity types, one of respective `structured_value` fields may + // also be populated. Also not all the types of `structured_value` will be + // normalized. For example, some processors may not generate `float` + // or `integer` normalized text by default. + // + // Below are sample formats mapped to structured values. + // + // - Money/Currency type (`money_value`) is in the ISO 4217 text format. + // - Date type (`date_value`) is in the ISO 8601 text format. + // - Datetime type (`datetime_value`) is in the ISO 8601 text format. + string text = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. Provenance of the entity. + // Text anchor indexing into the + // [Document.text][google.cloud.documentai.v1beta2.Document.text]. + TextAnchor text_anchor = 1 [(google.api.field_behavior) = OPTIONAL]; // Required. Entity type from a schema e.g. `Address`. string type = 2 [(google.api.field_behavior) = REQUIRED]; - // Text value in the document e.g. `1600 Amphitheatre Pkwy`. - string mention_text = 3; + // Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`. + string mention_text = 3 [(google.api.field_behavior) = OPTIONAL]; - // Deprecated. Use `id` field instead. - string mention_id = 4; + // Optional. Deprecated. Use `id` field instead. + string mention_id = 4 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Confidence of detected Schema entity. Range [0, 1]. + // Optional. Confidence of detected Schema entity. Range `[0, 1]`. float confidence = 5 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Represents the provenance of this entity wrt. the location on the - // page where it was found. + // Optional. Represents the provenance of this entity wrt. the location on + // the page where it was found. PageAnchor page_anchor = 6 [(google.api.field_behavior) = OPTIONAL]; // Optional. Canonical id. This will be a unique value in the entity list // for this document. string id = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Normalized entity value. Absent if the extracted value could + // not be converted or the type (e.g. address) is not supported for certain + // parsers. This field is also only populated for certain supported document + // types. + NormalizedValue normalized_value = 9 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Entities can be nested to form a hierarchical data structure + // representing the content in the document. + repeated Entity properties = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The history of this annotation. + Provenance provenance = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether the entity will be redacted for de-identification + // purposes. + bool redacted = 12 [(google.api.field_behavior) = OPTIONAL]; } - // Relationship between [Entities][google.cloud.documentai.v1beta2.Document.Entity]. + // Relationship between + // [Entities][google.cloud.documentai.v1beta2.Document.Entity]. message EntityRelation { // Subject entity id. string subject_id = 1; @@ -400,29 +687,40 @@ message Document { string relation = 3; } - // Text reference indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text]. + // Text reference indexing into the + // [Document.text][google.cloud.documentai.v1beta2.Document.text]. message TextAnchor { - // A text segment in the [Document.text][google.cloud.documentai.v1beta2.Document.text]. The indices may be out of bounds - // which indicate that the text extends into another document shard for - // large sharded documents. See [ShardInfo.text_offset][google.cloud.documentai.v1beta2.Document.ShardInfo.text_offset] + // A text segment in the + // [Document.text][google.cloud.documentai.v1beta2.Document.text]. The + // indices may be out of bounds which indicate that the text extends into + // another document shard for large sharded documents. See + // [ShardInfo.text_offset][google.cloud.documentai.v1beta2.Document.ShardInfo.text_offset] message TextSegment { - // [TextSegment][google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment] start UTF-8 char index in the [Document.text][google.cloud.documentai.v1beta2.Document.text]. + // [TextSegment][google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment] + // start UTF-8 char index in the + // [Document.text][google.cloud.documentai.v1beta2.Document.text]. int64 start_index = 1; - // [TextSegment][google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment] half open end UTF-8 char index in the + // [TextSegment][google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment] + // half open end UTF-8 char index in the // [Document.text][google.cloud.documentai.v1beta2.Document.text]. int64 end_index = 2; } - // The text segments from the [Document.text][google.cloud.documentai.v1beta2.Document.text]. + // The text segments from the + // [Document.text][google.cloud.documentai.v1beta2.Document.text]. repeated TextSegment text_segments = 1; // Contains the content of the text span so that users do - // not have to look it up in the text_segments. + // not have to look it up in the text_segments. It is always + // populated for formFields. string content = 2; } - // Referencing elements in [Document.pages][google.cloud.documentai.v1beta2.Document.pages]. + // Referencing the visual context of the entity in the + // [Document.pages][google.cloud.documentai.v1beta2.Document.pages]. Page + // anchors can be cross-page, consist of multiple bounding polygons and + // optionally reference specific layout element types. message PageAnchor { // Represents a weak reference to a page element within a document. message PageRef { @@ -431,81 +729,243 @@ message Document { // Layout Unspecified. LAYOUT_TYPE_UNSPECIFIED = 0; - // References a [Page.blocks][google.cloud.documentai.v1beta2.Document.Page.blocks] element. + // References a + // [Page.blocks][google.cloud.documentai.v1beta2.Document.Page.blocks] + // element. BLOCK = 1; - // References a [Page.paragraphs][google.cloud.documentai.v1beta2.Document.Page.paragraphs] element. + // References a + // [Page.paragraphs][google.cloud.documentai.v1beta2.Document.Page.paragraphs] + // element. PARAGRAPH = 2; - // References a [Page.lines][google.cloud.documentai.v1beta2.Document.Page.lines] element. + // References a + // [Page.lines][google.cloud.documentai.v1beta2.Document.Page.lines] + // element. LINE = 3; - // References a [Page.tokens][google.cloud.documentai.v1beta2.Document.Page.tokens] element. + // References a + // [Page.tokens][google.cloud.documentai.v1beta2.Document.Page.tokens] + // element. TOKEN = 4; - // References a [Page.visual_elements][google.cloud.documentai.v1beta2.Document.Page.visual_elements] element. + // References a + // [Page.visual_elements][google.cloud.documentai.v1beta2.Document.Page.visual_elements] + // element. VISUAL_ELEMENT = 5; - // Refrrences a [Page.tables][google.cloud.documentai.v1beta2.Document.Page.tables] element. + // Refrrences a + // [Page.tables][google.cloud.documentai.v1beta2.Document.Page.tables] + // element. TABLE = 6; - // References a [Page.form_fields][google.cloud.documentai.v1beta2.Document.Page.form_fields] element. + // References a + // [Page.form_fields][google.cloud.documentai.v1beta2.Document.Page.form_fields] + // element. FORM_FIELD = 7; } - // Required. Index into the [Document.pages][google.cloud.documentai.v1beta2.Document.pages] element + // Required. Index into the + // [Document.pages][google.cloud.documentai.v1beta2.Document.pages] + // element, for example using + // `[Document.pages][page_refs.page]` to locate the related page element. + // This field is skipped when its value is the default `0`. See + // https://developers.google.com/protocol-buffers/docs/proto3#json. int64 page = 1 [(google.api.field_behavior) = REQUIRED]; - // Optional. The type of the layout element that is being referenced. If not - // specified the whole page is assumed to be referenced. + // Optional. The type of the layout element that is being referenced if + // any. LayoutType layout_type = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The [Page.Layout.id][google.cloud.documentai.v1beta2.Document.Page.Layout.id] on the page that this element - // references. If [LayoutRef.type][] is specified this id must also be - // specified. - string layout_id = 3 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Deprecated. Use + // [PageRef.bounding_poly][google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.bounding_poly] + // instead. + string layout_id = 3 + [deprecated = true, (google.api.field_behavior) = OPTIONAL]; + + // Optional. Identifies the bounding polygon of a layout element on the + // page. + BoundingPoly bounding_poly = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Confidence of detected page element, if applicable. Range + // `[0, 1]`. + float confidence = 5 [(google.api.field_behavior) = OPTIONAL]; } // One or more references to visual page elements repeated PageRef page_refs = 1; } + // Structure to identify provenance relationships between annotations in + // different revisions. + message Provenance { + // The parent element the current element is based on. Used for + // referencing/aligning, removal and replacement operations. + message Parent { + // The index of the index into current revision's parent_ids list. + int32 revision = 1; + + // The index of the parent item in the corresponding item list (eg. list + // of entities, properties within entities, etc.) in the parent revision. + int32 index = 3; + + // The id of the parent provenance. + int32 id = 2 [deprecated = true]; + } + + // If a processor or agent does an explicit operation on existing elements. + enum OperationType { + // Operation type unspecified. If no operation is specified a provenance + // entry is simply used to match against a `parent`. + OPERATION_TYPE_UNSPECIFIED = 0; + + // Add an element. + ADD = 1; + + // Remove an element identified by `parent`. + REMOVE = 2; + + // Updates any fields within the given provenance scope of the message. It + // overwrites the fields rather than replacing them. Use this when you + // want to update a field value of an entity without also updating all the + // child properties. + UPDATE = 7; + + // Currently unused. Replace an element identified by `parent`. + REPLACE = 3; + + // Deprecated. Request human review for the element identified by + // `parent`. + EVAL_REQUESTED = 4 [deprecated = true]; + + // Deprecated. Element is reviewed and approved at human review, + // confidence will be set to 1.0. + EVAL_APPROVED = 5 [deprecated = true]; + + // Deprecated. Element is skipped in the validation process. + EVAL_SKIPPED = 6 [deprecated = true]; + } + + // The index of the revision that produced this element. + int32 revision = 1 [deprecated = true]; + + // The Id of this operation. Needs to be unique within the scope of the + // revision. + int32 id = 2 [deprecated = true]; + + // References to the original elements that are replaced. + repeated Parent parents = 3; + + // The type of provenance operation. + OperationType type = 4; + } + + // Contains past or forward revisions of this document. + message Revision { + // Human Review information of the document. + message HumanReview { + // Human review state. e.g. `requested`, `succeeded`, `rejected`. + string state = 1; + + // A message providing more details about the current state of processing. + // For example, the rejection reason when the state is `rejected`. + string state_message = 2; + } + + // Who/what made the change + oneof source { + // If the change was made by a person specify the name or id of that + // person. + string agent = 4; + + // If the annotation was made by processor identify the processor by its + // resource name. + string processor = 5; + } + + // Id of the revision, internally generated by doc proto storage. + // Unique within the context of the document. + string id = 1; + + // The revisions that this revision is based on. This can include one or + // more parent (when documents are merged.) This field represents the + // index into the `revisions` field. + repeated int32 parent = 2 [deprecated = true]; + + // The revisions that this revision is based on. Must include all the ids + // that have anything to do with this revision - eg. there are + // `provenance.parent.revision` fields that index into this field. + repeated string parent_ids = 7; + + // The time that the revision was created, internally generated by + // doc proto storage at the time of create. + google.protobuf.Timestamp create_time = 3; + + // Human Review information of this revision. + HumanReview human_review = 6; + } + + // This message is used for text changes aka. OCR corrections. + message TextChange { + // Provenance of the correction. + // Text anchor indexing into the + // [Document.text][google.cloud.documentai.v1beta2.Document.text]. There + // can only be a single `TextAnchor.text_segments` element. If the start + // and end index of the text segment are the same, the text change is + // inserted before that index. + TextAnchor text_anchor = 1; + + // The text that replaces the text identified in the `text_anchor`. + string changed_text = 2; + + // The history of this annotation. + repeated Provenance provenance = 3 [deprecated = true]; + } + // Original source document from the user. oneof source { - // Currently supports Google Cloud Storage URI of the form - // `gs://bucket_name/object_name`. Object versioning is not supported. - // See [Google Cloud Storage Request - // URIs](https://cloud.google.com/storage/docs/reference-uris) for more - // info. - string uri = 1; - - // Inline document content, represented as a stream of bytes. + // Optional. Currently supports Google Cloud Storage URI of the form + // `gs://bucket_name/object_name`. Object versioning is not supported. + // For more information, refer to [Google Cloud Storage Request + // URIs](https://cloud.google.com/storage/docs/reference-uris). + string uri = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Inline document content, represented as a stream of bytes. // Note: As with all `bytes` fields, protobuffers use a pure binary // representation, whereas JSON representations use base64. - bytes content = 2; + bytes content = 2 [(google.api.field_behavior) = OPTIONAL]; } - // An IANA published MIME type (also referred to as media type). For more - // information, see - // https://www.iana.org/assignments/media-types/media-types.xhtml. + // An IANA published [media type (MIME + // type)](https://www.iana.org/assignments/media-types/media-types.xhtml). string mime_type = 3; - // UTF-8 encoded text in reading order from the document. - string text = 4; + // Optional. UTF-8 encoded text in reading order from the document. + string text = 4 [(google.api.field_behavior) = OPTIONAL]; - // Styles for the [Document.text][google.cloud.documentai.v1beta2.Document.text]. - repeated Style text_styles = 5; + // Styles for the + // [Document.text][google.cloud.documentai.v1beta2.Document.text]. + repeated Style text_styles = 5 [deprecated = true]; - // Visual page layout for the [Document][google.cloud.documentai.v1beta2.Document]. + // Visual page layout for the + // [Document][google.cloud.documentai.v1beta2.Document]. repeated Page pages = 6; - // A list of entities detected on [Document.text][google.cloud.documentai.v1beta2.Document.text]. For document shards, - // entities in this list may cross shard boundaries. + // A list of entities detected on + // [Document.text][google.cloud.documentai.v1beta2.Document.text]. For + // document shards, entities in this list may cross shard boundaries. repeated Entity entities = 7; - // Relationship among [Document.entities][google.cloud.documentai.v1beta2.Document.entities]. + // Placeholder. Relationship among + // [Document.entities][google.cloud.documentai.v1beta2.Document.entities]. repeated EntityRelation entity_relations = 8; + // Placeholder. A list of text corrections made to + // [Document.text][google.cloud.documentai.v1beta2.Document.text]. This is + // usually used for annotating corrections to OCR mistakes. Text changes for + // a given revision may not overlap with each other. + repeated TextChange text_changes = 14; + // Information about the sharding if this document is sharded part of a larger // document. If the document is not sharded, this message is not specified. ShardInfo shard_info = 9; @@ -515,4 +975,7 @@ message Document { // Any error that occurred while processing this document. google.rpc.Status error = 10; + + // Placeholder. Revision history of this document. + repeated Revision revisions = 13; } diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/proto/google/cloud/documentai/v1beta2/document_understanding.proto b/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/proto/google/cloud/documentai/v1beta2/document_understanding.proto index 19cb22da6a41..cdfff1bd01b9 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/proto/google/cloud/documentai/v1beta2/document_understanding.proto +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/proto/google/cloud/documentai/v1beta2/document_understanding.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -37,11 +37,13 @@ option ruby_package = "Google::Cloud::DocumentAI::V1beta2"; // computer vision, and translation. service DocumentUnderstandingService { option (google.api.default_host) = "documentai.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; // LRO endpoint to batch process many documents. The output is written // to Cloud Storage as JSON in the [Document] format. - rpc BatchProcessDocuments(BatchProcessDocumentsRequest) returns (google.longrunning.Operation) { + rpc BatchProcessDocuments(BatchProcessDocumentsRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1beta2/{parent=projects/*/locations/*}/documents:batchProcess" body: "*" @@ -74,7 +76,8 @@ service DocumentUnderstandingService { // is written to Cloud Storage as JSON in the [Document] format. message BatchProcessDocumentsRequest { // Required. Individual requests for each document. - repeated ProcessDocumentRequest requests = 1 [(google.api.field_behavior) = REQUIRED]; + repeated ProcessDocumentRequest requests = 1 + [(google.api.field_behavior) = REQUIRED]; // Target project and location to make a call. // @@ -97,9 +100,9 @@ message ProcessDocumentRequest { // Required. Information about the input file. InputConfig input_config = 1 [(google.api.field_behavior) = REQUIRED]; - // Optional. The desired output location. This field is only needed in + // The desired output location. This field is only needed in // BatchProcessDocumentsRequest. - OutputConfig output_config = 2 [(google.api.field_behavior) = OPTIONAL]; + OutputConfig output_config = 2; // Specifies a known document type for deeper structure detection. Valid // values are currently "general" and "invoice". If not provided, "general"\ @@ -165,10 +168,10 @@ message TableExtractionParams { // Optional. Table bounding box hints that can be provided to complex cases // which our algorithm cannot locate the table(s) in. - repeated TableBoundHint table_bound_hints = 2 [(google.api.field_behavior) = OPTIONAL]; + repeated TableBoundHint table_bound_hints = 2 + [(google.api.field_behavior) = OPTIONAL]; - // Optional. Table header hints. The extraction will bias towards producing - // these terms as table headers, which may improve accuracy. + // Optional. Reserved for future use. repeated string header_hints = 3 [(google.api.field_behavior) = OPTIONAL]; // Model version of the table extraction system. Default is "builtin/stable". @@ -193,29 +196,18 @@ message FormExtractionParams { // Whether to enable form extraction. bool enabled = 1; - // User can provide pairs of (key text, value type) to improve the parsing - // result. - // - // For example, if a document has a field called "Date" that holds a date - // value and a field called "Amount" that may hold either a currency value - // (e.g., "$500.00") or a simple number value (e.g., "20"), you could use the - // following hints: [ {"key": "Date", value_types: [ "DATE"]}, {"key": - // "Amount", "value_types": [ "PRICE", "NUMBER" ]} ] - // - // If the value type is unknown, but you want to provide hints for the keys, - // you can leave the value_types field blank. e.g. {"key": "Date", - // "value_types": []} + // Reserved for future use. repeated KeyValuePairHint key_value_pair_hints = 2; // Model version of the form extraction system. Default is // "builtin/stable". Specify "builtin/latest" for the latest model. - // For custom form models, specify: “custom/{model_name}". Model name + // For custom form models, specify: "custom/{model_name}". Model name // format is "bucket_name/path/to/modeldir" corresponding to // "gs://bucket_name/path/to/modeldir" where annotated examples are stored. string model_version = 3; } -// User-provided hint for key value pair. +// Reserved for future use. message KeyValuePairHint { // The key text for the hint. string key = 1; @@ -261,11 +253,12 @@ message InputConfig { bytes contents = 3; } - // Required. Mimetype of the input. Current supported mimetypes are application/pdf, - // image/tiff, and image/gif. - // In addition, application/json type is supported for requests with - // [ProcessDocumentRequest.automl_params][google.cloud.documentai.v1beta2.ProcessDocumentRequest.automl_params] field set. The JSON file needs to - // be in [Document][google.cloud.documentai.v1beta2.Document] format. + // Required. Mimetype of the input. Current supported mimetypes are + // application/pdf, image/tiff, and image/gif. In addition, application/json + // type is supported for requests with + // [ProcessDocumentRequest.automl_params][google.cloud.documentai.v1beta2.ProcessDocumentRequest.automl_params] + // field set. The JSON file needs to be in + // [Document][google.cloud.documentai.v1beta2.Document] format. string mime_type = 2 [(google.api.field_behavior) = REQUIRED]; } diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/proto/google/cloud/documentai/v1beta2/geometry.proto b/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/proto/google/cloud/documentai/v1beta2/geometry.proto index 060e5105912f..5f24584604b0 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/proto/google/cloud/documentai/v1beta2/geometry.proto +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta2/src/main/proto/google/cloud/documentai/v1beta2/geometry.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,7 +16,6 @@ syntax = "proto3"; package google.cloud.documentai.v1beta2; - option csharp_namespace = "Google.Cloud.DocumentAI.V1Beta2"; option go_package = "cloud.google.com/go/documentai/apiv1beta2/documentaipb;documentaipb"; option java_multiple_files = true; @@ -31,7 +30,7 @@ message Vertex { // X coordinate. int32 x = 1; - // Y coordinate. + // Y coordinate (starts from the top of the image). int32 y = 2; } @@ -42,7 +41,7 @@ message NormalizedVertex { // X coordinate. float x = 1; - // Y coordinate. + // Y coordinate (starts from the top of the image). float y = 2; } diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchDatasetDocuments.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchDatasetDocuments.java new file mode 100644 index 000000000000..d88b6bafd805 --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchDatasetDocuments.java @@ -0,0 +1,2237 @@ +/* + * Copyright 2023 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/dataset.proto + +package com.google.cloud.documentai.v1beta3; + +/** + * + * + *
+ * Dataset documents that the batch operation will be applied to.
+ * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.BatchDatasetDocuments} + */ +public final class BatchDatasetDocuments extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.BatchDatasetDocuments) + BatchDatasetDocumentsOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchDatasetDocuments.newBuilder() to construct. + private BatchDatasetDocuments(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchDatasetDocuments() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchDatasetDocuments(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DatasetProto + .internal_static_google_cloud_documentai_v1beta3_BatchDatasetDocuments_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DatasetProto + .internal_static_google_cloud_documentai_v1beta3_BatchDatasetDocuments_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.class, + com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.Builder.class); + } + + public interface IndividualDocumentIdsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. List of Document IDs indicating where the actual documents are
+     * stored.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.DocumentId document_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getDocumentIdsList(); + /** + * + * + *
+     * Required. List of Document IDs indicating where the actual documents are
+     * stored.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.DocumentId document_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.documentai.v1beta3.DocumentId getDocumentIds(int index); + /** + * + * + *
+     * Required. List of Document IDs indicating where the actual documents are
+     * stored.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.DocumentId document_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getDocumentIdsCount(); + /** + * + * + *
+     * Required. List of Document IDs indicating where the actual documents are
+     * stored.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.DocumentId document_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getDocumentIdsOrBuilderList(); + /** + * + * + *
+     * Required. List of Document IDs indicating where the actual documents are
+     * stored.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.DocumentId document_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.documentai.v1beta3.DocumentIdOrBuilder getDocumentIdsOrBuilder(int index); + } + /** + * + * + *
+   * List of individual DocumentIds.
+   * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds} + */ + public static final class IndividualDocumentIds extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds) + IndividualDocumentIdsOrBuilder { + private static final long serialVersionUID = 0L; + // Use IndividualDocumentIds.newBuilder() to construct. + private IndividualDocumentIds(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IndividualDocumentIds() { + documentIds_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IndividualDocumentIds(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DatasetProto + .internal_static_google_cloud_documentai_v1beta3_BatchDatasetDocuments_IndividualDocumentIds_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DatasetProto + .internal_static_google_cloud_documentai_v1beta3_BatchDatasetDocuments_IndividualDocumentIds_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds.class, + com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds + .Builder.class); + } + + public static final int DOCUMENT_IDS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List documentIds_; + /** + * + * + *
+     * Required. List of Document IDs indicating where the actual documents are
+     * stored.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.DocumentId document_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getDocumentIdsList() { + return documentIds_; + } + /** + * + * + *
+     * Required. List of Document IDs indicating where the actual documents are
+     * stored.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.DocumentId document_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getDocumentIdsOrBuilderList() { + return documentIds_; + } + /** + * + * + *
+     * Required. List of Document IDs indicating where the actual documents are
+     * stored.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.DocumentId document_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getDocumentIdsCount() { + return documentIds_.size(); + } + /** + * + * + *
+     * Required. List of Document IDs indicating where the actual documents are
+     * stored.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.DocumentId document_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.DocumentId getDocumentIds(int index) { + return documentIds_.get(index); + } + /** + * + * + *
+     * Required. List of Document IDs indicating where the actual documents are
+     * stored.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.DocumentId document_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.DocumentIdOrBuilder getDocumentIdsOrBuilder( + int index) { + return documentIds_.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 < documentIds_.size(); i++) { + output.writeMessage(1, documentIds_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < documentIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, documentIds_.get(i)); + } + size += getUnknownFields().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.BatchDatasetDocuments.IndividualDocumentIds)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds other = + (com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds) obj; + + if (!getDocumentIdsList().equals(other.getDocumentIdsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDocumentIdsCount() > 0) { + hash = (37 * hash) + DOCUMENT_IDS_FIELD_NUMBER; + hash = (53 * hash) + getDocumentIdsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds + 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.BatchDatasetDocuments.IndividualDocumentIds + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds + 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.BatchDatasetDocuments.IndividualDocumentIds + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds + 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.BatchDatasetDocuments.IndividualDocumentIds + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds + 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.BatchDatasetDocuments.IndividualDocumentIds + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds + 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.BatchDatasetDocuments.IndividualDocumentIds + 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.BatchDatasetDocuments.IndividualDocumentIds + 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.BatchDatasetDocuments.IndividualDocumentIds 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; + } + /** + * + * + *
+     * List of individual DocumentIds.
+     * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds) + com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIdsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DatasetProto + .internal_static_google_cloud_documentai_v1beta3_BatchDatasetDocuments_IndividualDocumentIds_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DatasetProto + .internal_static_google_cloud_documentai_v1beta3_BatchDatasetDocuments_IndividualDocumentIds_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds + .class, + com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds + .Builder.class); + } + + // Construct using + // com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (documentIdsBuilder_ == null) { + documentIds_ = java.util.Collections.emptyList(); + } else { + documentIds_ = null; + documentIdsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DatasetProto + .internal_static_google_cloud_documentai_v1beta3_BatchDatasetDocuments_IndividualDocumentIds_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds + build() { + com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds + buildPartial() { + com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds result = + new com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds( + this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds result) { + if (documentIdsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + documentIds_ = java.util.Collections.unmodifiableList(documentIds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.documentIds_ = documentIds_; + } else { + result.documentIds_ = documentIdsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds) { + return mergeFrom( + (com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds other) { + if (other + == com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds + .getDefaultInstance()) return this; + if (documentIdsBuilder_ == null) { + if (!other.documentIds_.isEmpty()) { + if (documentIds_.isEmpty()) { + documentIds_ = other.documentIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDocumentIdsIsMutable(); + documentIds_.addAll(other.documentIds_); + } + onChanged(); + } + } else { + if (!other.documentIds_.isEmpty()) { + if (documentIdsBuilder_.isEmpty()) { + documentIdsBuilder_.dispose(); + documentIdsBuilder_ = null; + documentIds_ = other.documentIds_; + bitField0_ = (bitField0_ & ~0x00000001); + documentIdsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDocumentIdsFieldBuilder() + : null; + } else { + documentIdsBuilder_.addAllMessages(other.documentIds_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.documentai.v1beta3.DocumentId m = + input.readMessage( + com.google.cloud.documentai.v1beta3.DocumentId.parser(), + extensionRegistry); + if (documentIdsBuilder_ == null) { + ensureDocumentIdsIsMutable(); + documentIds_.add(m); + } else { + documentIdsBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List documentIds_ = + java.util.Collections.emptyList(); + + private void ensureDocumentIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + documentIds_ = + new java.util.ArrayList(documentIds_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.DocumentId, + com.google.cloud.documentai.v1beta3.DocumentId.Builder, + com.google.cloud.documentai.v1beta3.DocumentIdOrBuilder> + documentIdsBuilder_; + + /** + * + * + *
+       * Required. List of Document IDs indicating where the actual documents are
+       * stored.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.DocumentId document_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getDocumentIdsList() { + if (documentIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(documentIds_); + } else { + return documentIdsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Required. List of Document IDs indicating where the actual documents are
+       * stored.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.DocumentId document_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getDocumentIdsCount() { + if (documentIdsBuilder_ == null) { + return documentIds_.size(); + } else { + return documentIdsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Required. List of Document IDs indicating where the actual documents are
+       * stored.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.DocumentId document_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.documentai.v1beta3.DocumentId getDocumentIds(int index) { + if (documentIdsBuilder_ == null) { + return documentIds_.get(index); + } else { + return documentIdsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Required. List of Document IDs indicating where the actual documents are
+       * stored.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.DocumentId document_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDocumentIds( + int index, com.google.cloud.documentai.v1beta3.DocumentId value) { + if (documentIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDocumentIdsIsMutable(); + documentIds_.set(index, value); + onChanged(); + } else { + documentIdsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Required. List of Document IDs indicating where the actual documents are
+       * stored.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.DocumentId document_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDocumentIds( + int index, com.google.cloud.documentai.v1beta3.DocumentId.Builder builderForValue) { + if (documentIdsBuilder_ == null) { + ensureDocumentIdsIsMutable(); + documentIds_.set(index, builderForValue.build()); + onChanged(); + } else { + documentIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Required. List of Document IDs indicating where the actual documents are
+       * stored.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.DocumentId document_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addDocumentIds(com.google.cloud.documentai.v1beta3.DocumentId value) { + if (documentIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDocumentIdsIsMutable(); + documentIds_.add(value); + onChanged(); + } else { + documentIdsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Required. List of Document IDs indicating where the actual documents are
+       * stored.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.DocumentId document_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addDocumentIds( + int index, com.google.cloud.documentai.v1beta3.DocumentId value) { + if (documentIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDocumentIdsIsMutable(); + documentIds_.add(index, value); + onChanged(); + } else { + documentIdsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Required. List of Document IDs indicating where the actual documents are
+       * stored.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.DocumentId document_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addDocumentIds( + com.google.cloud.documentai.v1beta3.DocumentId.Builder builderForValue) { + if (documentIdsBuilder_ == null) { + ensureDocumentIdsIsMutable(); + documentIds_.add(builderForValue.build()); + onChanged(); + } else { + documentIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Required. List of Document IDs indicating where the actual documents are
+       * stored.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.DocumentId document_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addDocumentIds( + int index, com.google.cloud.documentai.v1beta3.DocumentId.Builder builderForValue) { + if (documentIdsBuilder_ == null) { + ensureDocumentIdsIsMutable(); + documentIds_.add(index, builderForValue.build()); + onChanged(); + } else { + documentIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Required. List of Document IDs indicating where the actual documents are
+       * stored.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.DocumentId document_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllDocumentIds( + java.lang.Iterable values) { + if (documentIdsBuilder_ == null) { + ensureDocumentIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, documentIds_); + onChanged(); + } else { + documentIdsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Required. List of Document IDs indicating where the actual documents are
+       * stored.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.DocumentId document_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDocumentIds() { + if (documentIdsBuilder_ == null) { + documentIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + documentIdsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Required. List of Document IDs indicating where the actual documents are
+       * stored.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.DocumentId document_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeDocumentIds(int index) { + if (documentIdsBuilder_ == null) { + ensureDocumentIdsIsMutable(); + documentIds_.remove(index); + onChanged(); + } else { + documentIdsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Required. List of Document IDs indicating where the actual documents are
+       * stored.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.DocumentId document_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.documentai.v1beta3.DocumentId.Builder getDocumentIdsBuilder( + int index) { + return getDocumentIdsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Required. List of Document IDs indicating where the actual documents are
+       * stored.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.DocumentId document_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.documentai.v1beta3.DocumentIdOrBuilder getDocumentIdsOrBuilder( + int index) { + if (documentIdsBuilder_ == null) { + return documentIds_.get(index); + } else { + return documentIdsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Required. List of Document IDs indicating where the actual documents are
+       * stored.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.DocumentId document_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getDocumentIdsOrBuilderList() { + if (documentIdsBuilder_ != null) { + return documentIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(documentIds_); + } + } + /** + * + * + *
+       * Required. List of Document IDs indicating where the actual documents are
+       * stored.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.DocumentId document_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.documentai.v1beta3.DocumentId.Builder addDocumentIdsBuilder() { + return getDocumentIdsFieldBuilder() + .addBuilder(com.google.cloud.documentai.v1beta3.DocumentId.getDefaultInstance()); + } + /** + * + * + *
+       * Required. List of Document IDs indicating where the actual documents are
+       * stored.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.DocumentId document_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.documentai.v1beta3.DocumentId.Builder addDocumentIdsBuilder( + int index) { + return getDocumentIdsFieldBuilder() + .addBuilder(index, com.google.cloud.documentai.v1beta3.DocumentId.getDefaultInstance()); + } + /** + * + * + *
+       * Required. List of Document IDs indicating where the actual documents are
+       * stored.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.DocumentId document_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getDocumentIdsBuilderList() { + return getDocumentIdsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.DocumentId, + com.google.cloud.documentai.v1beta3.DocumentId.Builder, + com.google.cloud.documentai.v1beta3.DocumentIdOrBuilder> + getDocumentIdsFieldBuilder() { + if (documentIdsBuilder_ == null) { + documentIdsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.DocumentId, + com.google.cloud.documentai.v1beta3.DocumentId.Builder, + com.google.cloud.documentai.v1beta3.DocumentIdOrBuilder>( + documentIds_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + documentIds_ = null; + } + return documentIdsBuilder_; + } + + @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.BatchDatasetDocuments.IndividualDocumentIds) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds) + private static final com.google.cloud.documentai.v1beta3.BatchDatasetDocuments + .IndividualDocumentIds + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds(); + } + + public static com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IndividualDocumentIds parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int criteriaCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object criteria_; + + public enum CriteriaCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + INDIVIDUAL_DOCUMENT_IDS(1), + FILTER(2), + CRITERIA_NOT_SET(0); + private final int value; + + private CriteriaCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static CriteriaCase valueOf(int value) { + return forNumber(value); + } + + public static CriteriaCase forNumber(int value) { + switch (value) { + case 1: + return INDIVIDUAL_DOCUMENT_IDS; + case 2: + return FILTER; + case 0: + return CRITERIA_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public CriteriaCase getCriteriaCase() { + return CriteriaCase.forNumber(criteriaCase_); + } + + public static final int INDIVIDUAL_DOCUMENT_IDS_FIELD_NUMBER = 1; + /** + * + * + *
+   * Document identifiers.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds individual_document_ids = 1; + * + * + * @return Whether the individualDocumentIds field is set. + */ + @java.lang.Override + public boolean hasIndividualDocumentIds() { + return criteriaCase_ == 1; + } + /** + * + * + *
+   * Document identifiers.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds individual_document_ids = 1; + * + * + * @return The individualDocumentIds. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds + getIndividualDocumentIds() { + if (criteriaCase_ == 1) { + return (com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds) + criteria_; + } + return com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds + .getDefaultInstance(); + } + /** + * + * + *
+   * Document identifiers.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds individual_document_ids = 1; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIdsOrBuilder + getIndividualDocumentIdsOrBuilder() { + if (criteriaCase_ == 1) { + return (com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds) + criteria_; + } + return com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds + .getDefaultInstance(); + } + + public static final int FILTER_FIELD_NUMBER = 2; + /** + * + * + *
+   * A filter matching the documents.
+   * Follows the same format and restriction as
+   * [google.cloud.documentai.master.ListDocumentsRequest.filter].
+   * 
+ * + * string filter = 2; + * + * @return Whether the filter field is set. + */ + public boolean hasFilter() { + return criteriaCase_ == 2; + } + /** + * + * + *
+   * A filter matching the documents.
+   * Follows the same format and restriction as
+   * [google.cloud.documentai.master.ListDocumentsRequest.filter].
+   * 
+ * + * string filter = 2; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = ""; + if (criteriaCase_ == 2) { + ref = criteria_; + } + 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(); + if (criteriaCase_ == 2) { + criteria_ = s; + } + return s; + } + } + /** + * + * + *
+   * A filter matching the documents.
+   * Follows the same format and restriction as
+   * [google.cloud.documentai.master.ListDocumentsRequest.filter].
+   * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = ""; + if (criteriaCase_ == 2) { + ref = criteria_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (criteriaCase_ == 2) { + criteria_ = 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 (criteriaCase_ == 1) { + output.writeMessage( + 1, + (com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds) + criteria_); + } + if (criteriaCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, criteria_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (criteriaCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, + (com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds) + criteria_); + } + if (criteriaCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, criteria_); + } + size += getUnknownFields().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.BatchDatasetDocuments)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.BatchDatasetDocuments other = + (com.google.cloud.documentai.v1beta3.BatchDatasetDocuments) obj; + + if (!getCriteriaCase().equals(other.getCriteriaCase())) return false; + switch (criteriaCase_) { + case 1: + if (!getIndividualDocumentIds().equals(other.getIndividualDocumentIds())) return false; + break; + case 2: + if (!getFilter().equals(other.getFilter())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (criteriaCase_) { + case 1: + hash = (37 * hash) + INDIVIDUAL_DOCUMENT_IDS_FIELD_NUMBER; + hash = (53 * hash) + getIndividualDocumentIds().hashCode(); + break; + case 2: + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.BatchDatasetDocuments parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.BatchDatasetDocuments 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.BatchDatasetDocuments parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.BatchDatasetDocuments 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.BatchDatasetDocuments parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.BatchDatasetDocuments 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.BatchDatasetDocuments parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.BatchDatasetDocuments 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.BatchDatasetDocuments parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.BatchDatasetDocuments 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.BatchDatasetDocuments 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.BatchDatasetDocuments 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.BatchDatasetDocuments 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; + } + /** + * + * + *
+   * Dataset documents that the batch operation will be applied to.
+   * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.BatchDatasetDocuments} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.BatchDatasetDocuments) + com.google.cloud.documentai.v1beta3.BatchDatasetDocumentsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DatasetProto + .internal_static_google_cloud_documentai_v1beta3_BatchDatasetDocuments_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DatasetProto + .internal_static_google_cloud_documentai_v1beta3_BatchDatasetDocuments_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.class, + com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.Builder.class); + } + + // Construct using com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (individualDocumentIdsBuilder_ != null) { + individualDocumentIdsBuilder_.clear(); + } + criteriaCase_ = 0; + criteria_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DatasetProto + .internal_static_google_cloud_documentai_v1beta3_BatchDatasetDocuments_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.BatchDatasetDocuments getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.BatchDatasetDocuments build() { + com.google.cloud.documentai.v1beta3.BatchDatasetDocuments result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.BatchDatasetDocuments buildPartial() { + com.google.cloud.documentai.v1beta3.BatchDatasetDocuments result = + new com.google.cloud.documentai.v1beta3.BatchDatasetDocuments(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.documentai.v1beta3.BatchDatasetDocuments result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.documentai.v1beta3.BatchDatasetDocuments result) { + result.criteriaCase_ = criteriaCase_; + result.criteria_ = this.criteria_; + if (criteriaCase_ == 1 && individualDocumentIdsBuilder_ != null) { + result.criteria_ = individualDocumentIdsBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta3.BatchDatasetDocuments) { + return mergeFrom((com.google.cloud.documentai.v1beta3.BatchDatasetDocuments) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.documentai.v1beta3.BatchDatasetDocuments other) { + if (other == com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.getDefaultInstance()) + return this; + switch (other.getCriteriaCase()) { + case INDIVIDUAL_DOCUMENT_IDS: + { + mergeIndividualDocumentIds(other.getIndividualDocumentIds()); + break; + } + case FILTER: + { + criteriaCase_ = 2; + criteria_ = other.criteria_; + onChanged(); + break; + } + case CRITERIA_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getIndividualDocumentIdsFieldBuilder().getBuilder(), extensionRegistry); + criteriaCase_ = 1; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + criteriaCase_ = 2; + criteria_ = s; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int criteriaCase_ = 0; + private java.lang.Object criteria_; + + public CriteriaCase getCriteriaCase() { + return CriteriaCase.forNumber(criteriaCase_); + } + + public Builder clearCriteria() { + criteriaCase_ = 0; + criteria_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds, + com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds.Builder, + com.google.cloud.documentai.v1beta3.BatchDatasetDocuments + .IndividualDocumentIdsOrBuilder> + individualDocumentIdsBuilder_; + /** + * + * + *
+     * Document identifiers.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds individual_document_ids = 1; + * + * + * @return Whether the individualDocumentIds field is set. + */ + @java.lang.Override + public boolean hasIndividualDocumentIds() { + return criteriaCase_ == 1; + } + /** + * + * + *
+     * Document identifiers.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds individual_document_ids = 1; + * + * + * @return The individualDocumentIds. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds + getIndividualDocumentIds() { + if (individualDocumentIdsBuilder_ == null) { + if (criteriaCase_ == 1) { + return (com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds) + criteria_; + } + return com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds + .getDefaultInstance(); + } else { + if (criteriaCase_ == 1) { + return individualDocumentIdsBuilder_.getMessage(); + } + return com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Document identifiers.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds individual_document_ids = 1; + * + */ + public Builder setIndividualDocumentIds( + com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds value) { + if (individualDocumentIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + criteria_ = value; + onChanged(); + } else { + individualDocumentIdsBuilder_.setMessage(value); + } + criteriaCase_ = 1; + return this; + } + /** + * + * + *
+     * Document identifiers.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds individual_document_ids = 1; + * + */ + public Builder setIndividualDocumentIds( + com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds.Builder + builderForValue) { + if (individualDocumentIdsBuilder_ == null) { + criteria_ = builderForValue.build(); + onChanged(); + } else { + individualDocumentIdsBuilder_.setMessage(builderForValue.build()); + } + criteriaCase_ = 1; + return this; + } + /** + * + * + *
+     * Document identifiers.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds individual_document_ids = 1; + * + */ + public Builder mergeIndividualDocumentIds( + com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds value) { + if (individualDocumentIdsBuilder_ == null) { + if (criteriaCase_ == 1 + && criteria_ + != com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds + .getDefaultInstance()) { + criteria_ = + com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds + .newBuilder( + (com.google.cloud.documentai.v1beta3.BatchDatasetDocuments + .IndividualDocumentIds) + criteria_) + .mergeFrom(value) + .buildPartial(); + } else { + criteria_ = value; + } + onChanged(); + } else { + if (criteriaCase_ == 1) { + individualDocumentIdsBuilder_.mergeFrom(value); + } else { + individualDocumentIdsBuilder_.setMessage(value); + } + } + criteriaCase_ = 1; + return this; + } + /** + * + * + *
+     * Document identifiers.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds individual_document_ids = 1; + * + */ + public Builder clearIndividualDocumentIds() { + if (individualDocumentIdsBuilder_ == null) { + if (criteriaCase_ == 1) { + criteriaCase_ = 0; + criteria_ = null; + onChanged(); + } + } else { + if (criteriaCase_ == 1) { + criteriaCase_ = 0; + criteria_ = null; + } + individualDocumentIdsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Document identifiers.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds individual_document_ids = 1; + * + */ + public com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds.Builder + getIndividualDocumentIdsBuilder() { + return getIndividualDocumentIdsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Document identifiers.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds individual_document_ids = 1; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIdsOrBuilder + getIndividualDocumentIdsOrBuilder() { + if ((criteriaCase_ == 1) && (individualDocumentIdsBuilder_ != null)) { + return individualDocumentIdsBuilder_.getMessageOrBuilder(); + } else { + if (criteriaCase_ == 1) { + return (com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds) + criteria_; + } + return com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Document identifiers.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds individual_document_ids = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds, + com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds.Builder, + com.google.cloud.documentai.v1beta3.BatchDatasetDocuments + .IndividualDocumentIdsOrBuilder> + getIndividualDocumentIdsFieldBuilder() { + if (individualDocumentIdsBuilder_ == null) { + if (!(criteriaCase_ == 1)) { + criteria_ = + com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds + .getDefaultInstance(); + } + individualDocumentIdsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds, + com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds + .Builder, + com.google.cloud.documentai.v1beta3.BatchDatasetDocuments + .IndividualDocumentIdsOrBuilder>( + (com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds) + criteria_, + getParentForChildren(), + isClean()); + criteria_ = null; + } + criteriaCase_ = 1; + onChanged(); + return individualDocumentIdsBuilder_; + } + + /** + * + * + *
+     * A filter matching the documents.
+     * Follows the same format and restriction as
+     * [google.cloud.documentai.master.ListDocumentsRequest.filter].
+     * 
+ * + * string filter = 2; + * + * @return Whether the filter field is set. + */ + @java.lang.Override + public boolean hasFilter() { + return criteriaCase_ == 2; + } + /** + * + * + *
+     * A filter matching the documents.
+     * Follows the same format and restriction as
+     * [google.cloud.documentai.master.ListDocumentsRequest.filter].
+     * 
+ * + * string filter = 2; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = ""; + if (criteriaCase_ == 2) { + ref = criteria_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (criteriaCase_ == 2) { + criteria_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A filter matching the documents.
+     * Follows the same format and restriction as
+     * [google.cloud.documentai.master.ListDocumentsRequest.filter].
+     * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = ""; + if (criteriaCase_ == 2) { + ref = criteria_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (criteriaCase_ == 2) { + criteria_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A filter matching the documents.
+     * Follows the same format and restriction as
+     * [google.cloud.documentai.master.ListDocumentsRequest.filter].
+     * 
+ * + * string filter = 2; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + criteriaCase_ = 2; + criteria_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A filter matching the documents.
+     * Follows the same format and restriction as
+     * [google.cloud.documentai.master.ListDocumentsRequest.filter].
+     * 
+ * + * string filter = 2; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + if (criteriaCase_ == 2) { + criteriaCase_ = 0; + criteria_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * A filter matching the documents.
+     * Follows the same format and restriction as
+     * [google.cloud.documentai.master.ListDocumentsRequest.filter].
+     * 
+ * + * string filter = 2; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + criteriaCase_ = 2; + criteria_ = 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.BatchDatasetDocuments) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.BatchDatasetDocuments) + private static final com.google.cloud.documentai.v1beta3.BatchDatasetDocuments DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta3.BatchDatasetDocuments(); + } + + public static com.google.cloud.documentai.v1beta3.BatchDatasetDocuments getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchDatasetDocuments parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.BatchDatasetDocuments getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchDatasetDocumentsOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchDatasetDocumentsOrBuilder.java new file mode 100644 index 000000000000..97bad679f8e8 --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchDatasetDocumentsOrBuilder.java @@ -0,0 +1,113 @@ +/* + * Copyright 2023 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/dataset.proto + +package com.google.cloud.documentai.v1beta3; + +public interface BatchDatasetDocumentsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.BatchDatasetDocuments) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Document identifiers.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds individual_document_ids = 1; + * + * + * @return Whether the individualDocumentIds field is set. + */ + boolean hasIndividualDocumentIds(); + /** + * + * + *
+   * Document identifiers.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds individual_document_ids = 1; + * + * + * @return The individualDocumentIds. + */ + com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds + getIndividualDocumentIds(); + /** + * + * + *
+   * Document identifiers.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds individual_document_ids = 1; + * + */ + com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIdsOrBuilder + getIndividualDocumentIdsOrBuilder(); + + /** + * + * + *
+   * A filter matching the documents.
+   * Follows the same format and restriction as
+   * [google.cloud.documentai.master.ListDocumentsRequest.filter].
+   * 
+ * + * string filter = 2; + * + * @return Whether the filter field is set. + */ + boolean hasFilter(); + /** + * + * + *
+   * A filter matching the documents.
+   * Follows the same format and restriction as
+   * [google.cloud.documentai.master.ListDocumentsRequest.filter].
+   * 
+ * + * string filter = 2; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * A filter matching the documents.
+   * Follows the same format and restriction as
+   * [google.cloud.documentai.master.ListDocumentsRequest.filter].
+   * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.CriteriaCase getCriteriaCase(); +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchDeleteDocumentsMetadata.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchDeleteDocumentsMetadata.java new file mode 100644 index 000000000000..4c021f659a3b --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchDeleteDocumentsMetadata.java @@ -0,0 +1,2603 @@ +/* + * Copyright 2023 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_service.proto + +package com.google.cloud.documentai.v1beta3; + +/** Protobuf type {@code google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata} */ +public final class BatchDeleteDocumentsMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata) + BatchDeleteDocumentsMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchDeleteDocumentsMetadata.newBuilder() to construct. + private BatchDeleteDocumentsMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchDeleteDocumentsMetadata() { + individualBatchDeleteStatuses_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchDeleteDocumentsMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_BatchDeleteDocumentsMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_BatchDeleteDocumentsMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.class, + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.Builder.class); + } + + public interface IndividualBatchDeleteStatusOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.IndividualBatchDeleteStatus) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The document id of the document.
+     * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId document_id = 1; + * + * @return Whether the documentId field is set. + */ + boolean hasDocumentId(); + /** + * + * + *
+     * The document id of the document.
+     * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId document_id = 1; + * + * @return The documentId. + */ + com.google.cloud.documentai.v1beta3.DocumentId getDocumentId(); + /** + * + * + *
+     * The document id of the document.
+     * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId document_id = 1; + */ + com.google.cloud.documentai.v1beta3.DocumentIdOrBuilder getDocumentIdOrBuilder(); + + /** + * + * + *
+     * The status of deleting the document in storage.
+     * 
+ * + * .google.rpc.Status status = 2; + * + * @return Whether the status field is set. + */ + boolean hasStatus(); + /** + * + * + *
+     * The status of deleting the document in storage.
+     * 
+ * + * .google.rpc.Status status = 2; + * + * @return The status. + */ + com.google.rpc.Status getStatus(); + /** + * + * + *
+     * The status of deleting the document in storage.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + com.google.rpc.StatusOrBuilder getStatusOrBuilder(); + } + /** + * + * + *
+   * The status of each individual document in the batch delete process.
+   * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.IndividualBatchDeleteStatus} + */ + public static final class IndividualBatchDeleteStatus + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.IndividualBatchDeleteStatus) + IndividualBatchDeleteStatusOrBuilder { + private static final long serialVersionUID = 0L; + // Use IndividualBatchDeleteStatus.newBuilder() to construct. + private IndividualBatchDeleteStatus(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IndividualBatchDeleteStatus() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IndividualBatchDeleteStatus(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_BatchDeleteDocumentsMetadata_IndividualBatchDeleteStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_BatchDeleteDocumentsMetadata_IndividualBatchDeleteStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus.class, + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus.Builder.class); + } + + public static final int DOCUMENT_ID_FIELD_NUMBER = 1; + private com.google.cloud.documentai.v1beta3.DocumentId documentId_; + /** + * + * + *
+     * The document id of the document.
+     * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId document_id = 1; + * + * @return Whether the documentId field is set. + */ + @java.lang.Override + public boolean hasDocumentId() { + return documentId_ != null; + } + /** + * + * + *
+     * The document id of the document.
+     * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId document_id = 1; + * + * @return The documentId. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.DocumentId getDocumentId() { + return documentId_ == null + ? com.google.cloud.documentai.v1beta3.DocumentId.getDefaultInstance() + : documentId_; + } + /** + * + * + *
+     * The document id of the document.
+     * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId document_id = 1; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.DocumentIdOrBuilder getDocumentIdOrBuilder() { + return documentId_ == null + ? com.google.cloud.documentai.v1beta3.DocumentId.getDefaultInstance() + : documentId_; + } + + public static final int STATUS_FIELD_NUMBER = 2; + private com.google.rpc.Status status_; + /** + * + * + *
+     * The status of deleting the document in storage.
+     * 
+ * + * .google.rpc.Status status = 2; + * + * @return Whether the status field is set. + */ + @java.lang.Override + public boolean hasStatus() { + return status_ != null; + } + /** + * + * + *
+     * The status of deleting the document in storage.
+     * 
+ * + * .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 deleting the document in storage.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } + + 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 (documentId_ != null) { + output.writeMessage(1, getDocumentId()); + } + if (status_ != null) { + output.writeMessage(2, getStatus()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (documentId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDocumentId()); + } + if (status_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStatus()); + } + size += getUnknownFields().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.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.IndividualBatchDeleteStatus + other = + (com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus) + obj; + + if (hasDocumentId() != other.hasDocumentId()) return false; + if (hasDocumentId()) { + if (!getDocumentId().equals(other.getDocumentId())) return false; + } + if (hasStatus() != other.hasStatus()) return false; + if (hasStatus()) { + if (!getStatus().equals(other.getStatus())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDocumentId()) { + hash = (37 * hash) + DOCUMENT_ID_FIELD_NUMBER; + hash = (53 * hash) + getDocumentId().hashCode(); + } + if (hasStatus()) { + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + getStatus().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus + 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.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus + 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.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus + 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.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus + 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.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus + 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.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus + 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.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus + 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.BatchDeleteDocumentsMetadata.IndividualBatchDeleteStatus + 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 each individual document in the batch delete process.
+     * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.IndividualBatchDeleteStatus} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.IndividualBatchDeleteStatus) + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatusOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_BatchDeleteDocumentsMetadata_IndividualBatchDeleteStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_BatchDeleteDocumentsMetadata_IndividualBatchDeleteStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus.class, + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus.Builder.class); + } + + // Construct using + // com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.IndividualBatchDeleteStatus.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + documentId_ = null; + if (documentIdBuilder_ != null) { + documentIdBuilder_.dispose(); + documentIdBuilder_ = null; + } + status_ = null; + if (statusBuilder_ != null) { + statusBuilder_.dispose(); + statusBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_BatchDeleteDocumentsMetadata_IndividualBatchDeleteStatus_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus + build() { + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.IndividualBatchDeleteStatus + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus + buildPartial() { + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.IndividualBatchDeleteStatus + result = + new com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.documentId_ = + documentIdBuilder_ == null ? documentId_ : documentIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.status_ = statusBuilder_ == null ? status_ : statusBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus) { + return mergeFrom( + (com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus + other) { + if (other + == com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus.getDefaultInstance()) return this; + if (other.hasDocumentId()) { + mergeDocumentId(other.getDocumentId()); + } + if (other.hasStatus()) { + mergeStatus(other.getStatus()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getDocumentIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getStatusFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.documentai.v1beta3.DocumentId documentId_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.DocumentId, + com.google.cloud.documentai.v1beta3.DocumentId.Builder, + com.google.cloud.documentai.v1beta3.DocumentIdOrBuilder> + documentIdBuilder_; + /** + * + * + *
+       * The document id of the document.
+       * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId document_id = 1; + * + * @return Whether the documentId field is set. + */ + public boolean hasDocumentId() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * The document id of the document.
+       * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId document_id = 1; + * + * @return The documentId. + */ + public com.google.cloud.documentai.v1beta3.DocumentId getDocumentId() { + if (documentIdBuilder_ == null) { + return documentId_ == null + ? com.google.cloud.documentai.v1beta3.DocumentId.getDefaultInstance() + : documentId_; + } else { + return documentIdBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The document id of the document.
+       * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId document_id = 1; + */ + public Builder setDocumentId(com.google.cloud.documentai.v1beta3.DocumentId value) { + if (documentIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + documentId_ = value; + } else { + documentIdBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The document id of the document.
+       * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId document_id = 1; + */ + public Builder setDocumentId( + com.google.cloud.documentai.v1beta3.DocumentId.Builder builderForValue) { + if (documentIdBuilder_ == null) { + documentId_ = builderForValue.build(); + } else { + documentIdBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The document id of the document.
+       * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId document_id = 1; + */ + public Builder mergeDocumentId(com.google.cloud.documentai.v1beta3.DocumentId value) { + if (documentIdBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && documentId_ != null + && documentId_ + != com.google.cloud.documentai.v1beta3.DocumentId.getDefaultInstance()) { + getDocumentIdBuilder().mergeFrom(value); + } else { + documentId_ = value; + } + } else { + documentIdBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The document id of the document.
+       * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId document_id = 1; + */ + public Builder clearDocumentId() { + bitField0_ = (bitField0_ & ~0x00000001); + documentId_ = null; + if (documentIdBuilder_ != null) { + documentIdBuilder_.dispose(); + documentIdBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * The document id of the document.
+       * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId document_id = 1; + */ + public com.google.cloud.documentai.v1beta3.DocumentId.Builder getDocumentIdBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getDocumentIdFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The document id of the document.
+       * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId document_id = 1; + */ + public com.google.cloud.documentai.v1beta3.DocumentIdOrBuilder getDocumentIdOrBuilder() { + if (documentIdBuilder_ != null) { + return documentIdBuilder_.getMessageOrBuilder(); + } else { + return documentId_ == null + ? com.google.cloud.documentai.v1beta3.DocumentId.getDefaultInstance() + : documentId_; + } + } + /** + * + * + *
+       * The document id of the document.
+       * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId document_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.DocumentId, + com.google.cloud.documentai.v1beta3.DocumentId.Builder, + com.google.cloud.documentai.v1beta3.DocumentIdOrBuilder> + getDocumentIdFieldBuilder() { + if (documentIdBuilder_ == null) { + documentIdBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.DocumentId, + com.google.cloud.documentai.v1beta3.DocumentId.Builder, + com.google.cloud.documentai.v1beta3.DocumentIdOrBuilder>( + getDocumentId(), getParentForChildren(), isClean()); + documentId_ = null; + } + return documentIdBuilder_; + } + + 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 deleting the document in storage.
+       * 
+ * + * .google.rpc.Status status = 2; + * + * @return Whether the status field is set. + */ + public boolean hasStatus() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * The status of deleting the document in storage.
+       * 
+ * + * .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 deleting the document in storage.
+       * 
+ * + * .google.rpc.Status status = 2; + */ + public Builder setStatus(com.google.rpc.Status value) { + if (statusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + status_ = value; + } else { + statusBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The status of deleting the document in storage.
+       * 
+ * + * .google.rpc.Status status = 2; + */ + public Builder setStatus(com.google.rpc.Status.Builder builderForValue) { + if (statusBuilder_ == null) { + status_ = builderForValue.build(); + } else { + statusBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The status of deleting the document in storage.
+       * 
+ * + * .google.rpc.Status status = 2; + */ + public Builder mergeStatus(com.google.rpc.Status value) { + if (statusBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && status_ != null + && status_ != com.google.rpc.Status.getDefaultInstance()) { + getStatusBuilder().mergeFrom(value); + } else { + status_ = value; + } + } else { + statusBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The status of deleting the document in storage.
+       * 
+ * + * .google.rpc.Status status = 2; + */ + public Builder clearStatus() { + bitField0_ = (bitField0_ & ~0x00000002); + status_ = null; + if (statusBuilder_ != null) { + statusBuilder_.dispose(); + statusBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * The status of deleting the document in storage.
+       * 
+ * + * .google.rpc.Status status = 2; + */ + public com.google.rpc.Status.Builder getStatusBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getStatusFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The status of deleting the document in storage.
+       * 
+ * + * .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 deleting the document in storage.
+       * 
+ * + * .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_; + } + + @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.BatchDeleteDocumentsMetadata.IndividualBatchDeleteStatus) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.IndividualBatchDeleteStatus) + private static final com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus(); + } + + public static com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IndividualBatchDeleteStatus parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int COMMON_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.documentai.v1beta3.CommonOperationMetadata commonMetadata_; + /** + * + * + *
+   * The basic metadata of the long running operation.
+   * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + * + * @return Whether the commonMetadata field is set. + */ + @java.lang.Override + public boolean hasCommonMetadata() { + return commonMetadata_ != null; + } + /** + * + * + *
+   * The basic metadata of the long running operation.
+   * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + * + * @return The commonMetadata. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.CommonOperationMetadata getCommonMetadata() { + return commonMetadata_ == null + ? com.google.cloud.documentai.v1beta3.CommonOperationMetadata.getDefaultInstance() + : commonMetadata_; + } + /** + * + * + *
+   * The basic metadata of the long running operation.
+   * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.CommonOperationMetadataOrBuilder + getCommonMetadataOrBuilder() { + return commonMetadata_ == null + ? com.google.cloud.documentai.v1beta3.CommonOperationMetadata.getDefaultInstance() + : commonMetadata_; + } + + public static final int INDIVIDUAL_BATCH_DELETE_STATUSES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus> + individualBatchDeleteStatuses_; + /** + * + * + *
+   * The list of response details of each document.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.IndividualBatchDeleteStatus individual_batch_delete_statuses = 2; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus> + getIndividualBatchDeleteStatusesList() { + return individualBatchDeleteStatuses_; + } + /** + * + * + *
+   * The list of response details of each document.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.IndividualBatchDeleteStatus individual_batch_delete_statuses = 2; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatusOrBuilder> + getIndividualBatchDeleteStatusesOrBuilderList() { + return individualBatchDeleteStatuses_; + } + /** + * + * + *
+   * The list of response details of each document.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.IndividualBatchDeleteStatus individual_batch_delete_statuses = 2; + * + */ + @java.lang.Override + public int getIndividualBatchDeleteStatusesCount() { + return individualBatchDeleteStatuses_.size(); + } + /** + * + * + *
+   * The list of response details of each document.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.IndividualBatchDeleteStatus individual_batch_delete_statuses = 2; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus + getIndividualBatchDeleteStatuses(int index) { + return individualBatchDeleteStatuses_.get(index); + } + /** + * + * + *
+   * The list of response details of each document.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.IndividualBatchDeleteStatus individual_batch_delete_statuses = 2; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatusOrBuilder + getIndividualBatchDeleteStatusesOrBuilder(int index) { + return individualBatchDeleteStatuses_.get(index); + } + + public static final int TOTAL_DOCUMENT_COUNT_FIELD_NUMBER = 3; + private int totalDocumentCount_ = 0; + /** + * + * + *
+   * Total number of documents deleting from dataset.
+   * 
+ * + * int32 total_document_count = 3; + * + * @return The totalDocumentCount. + */ + @java.lang.Override + public int getTotalDocumentCount() { + return totalDocumentCount_; + } + + public static final int ERROR_DOCUMENT_COUNT_FIELD_NUMBER = 4; + private int errorDocumentCount_ = 0; + /** + * + * + *
+   * Total number of documents that failed to be deleted in storage.
+   * 
+ * + * int32 error_document_count = 4; + * + * @return The errorDocumentCount. + */ + @java.lang.Override + public int getErrorDocumentCount() { + return errorDocumentCount_; + } + + 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 (commonMetadata_ != null) { + output.writeMessage(1, getCommonMetadata()); + } + for (int i = 0; i < individualBatchDeleteStatuses_.size(); i++) { + output.writeMessage(2, individualBatchDeleteStatuses_.get(i)); + } + if (totalDocumentCount_ != 0) { + output.writeInt32(3, totalDocumentCount_); + } + if (errorDocumentCount_ != 0) { + output.writeInt32(4, errorDocumentCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (commonMetadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCommonMetadata()); + } + for (int i = 0; i < individualBatchDeleteStatuses_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, individualBatchDeleteStatuses_.get(i)); + } + if (totalDocumentCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, totalDocumentCount_); + } + if (errorDocumentCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, errorDocumentCount_); + } + size += getUnknownFields().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.BatchDeleteDocumentsMetadata)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata other = + (com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata) obj; + + if (hasCommonMetadata() != other.hasCommonMetadata()) return false; + if (hasCommonMetadata()) { + if (!getCommonMetadata().equals(other.getCommonMetadata())) return false; + } + if (!getIndividualBatchDeleteStatusesList() + .equals(other.getIndividualBatchDeleteStatusesList())) return false; + if (getTotalDocumentCount() != other.getTotalDocumentCount()) return false; + if (getErrorDocumentCount() != other.getErrorDocumentCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCommonMetadata()) { + hash = (37 * hash) + COMMON_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getCommonMetadata().hashCode(); + } + if (getIndividualBatchDeleteStatusesCount() > 0) { + hash = (37 * hash) + INDIVIDUAL_BATCH_DELETE_STATUSES_FIELD_NUMBER; + hash = (53 * hash) + getIndividualBatchDeleteStatusesList().hashCode(); + } + hash = (37 * hash) + TOTAL_DOCUMENT_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getTotalDocumentCount(); + hash = (37 * hash) + ERROR_DOCUMENT_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getErrorDocumentCount(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata 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.BatchDeleteDocumentsMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata 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.BatchDeleteDocumentsMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata 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.BatchDeleteDocumentsMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata 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.BatchDeleteDocumentsMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata 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.BatchDeleteDocumentsMetadata 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.BatchDeleteDocumentsMetadata 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.BatchDeleteDocumentsMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** Protobuf type {@code google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata} */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata) + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_BatchDeleteDocumentsMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_BatchDeleteDocumentsMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.class, + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.Builder.class); + } + + // Construct using com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + commonMetadata_ = null; + if (commonMetadataBuilder_ != null) { + commonMetadataBuilder_.dispose(); + commonMetadataBuilder_ = null; + } + if (individualBatchDeleteStatusesBuilder_ == null) { + individualBatchDeleteStatuses_ = java.util.Collections.emptyList(); + } else { + individualBatchDeleteStatuses_ = null; + individualBatchDeleteStatusesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + totalDocumentCount_ = 0; + errorDocumentCount_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_BatchDeleteDocumentsMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata build() { + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata buildPartial() { + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata result = + new com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata result) { + if (individualBatchDeleteStatusesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + individualBatchDeleteStatuses_ = + java.util.Collections.unmodifiableList(individualBatchDeleteStatuses_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.individualBatchDeleteStatuses_ = individualBatchDeleteStatuses_; + } else { + result.individualBatchDeleteStatuses_ = individualBatchDeleteStatusesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.commonMetadata_ = + commonMetadataBuilder_ == null ? commonMetadata_ : commonMetadataBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.totalDocumentCount_ = totalDocumentCount_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.errorDocumentCount_ = errorDocumentCount_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata) { + return mergeFrom((com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata other) { + if (other + == com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.getDefaultInstance()) + return this; + if (other.hasCommonMetadata()) { + mergeCommonMetadata(other.getCommonMetadata()); + } + if (individualBatchDeleteStatusesBuilder_ == null) { + if (!other.individualBatchDeleteStatuses_.isEmpty()) { + if (individualBatchDeleteStatuses_.isEmpty()) { + individualBatchDeleteStatuses_ = other.individualBatchDeleteStatuses_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureIndividualBatchDeleteStatusesIsMutable(); + individualBatchDeleteStatuses_.addAll(other.individualBatchDeleteStatuses_); + } + onChanged(); + } + } else { + if (!other.individualBatchDeleteStatuses_.isEmpty()) { + if (individualBatchDeleteStatusesBuilder_.isEmpty()) { + individualBatchDeleteStatusesBuilder_.dispose(); + individualBatchDeleteStatusesBuilder_ = null; + individualBatchDeleteStatuses_ = other.individualBatchDeleteStatuses_; + bitField0_ = (bitField0_ & ~0x00000002); + individualBatchDeleteStatusesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getIndividualBatchDeleteStatusesFieldBuilder() + : null; + } else { + individualBatchDeleteStatusesBuilder_.addAllMessages( + other.individualBatchDeleteStatuses_); + } + } + } + if (other.getTotalDocumentCount() != 0) { + setTotalDocumentCount(other.getTotalDocumentCount()); + } + if (other.getErrorDocumentCount() != 0) { + setErrorDocumentCount(other.getErrorDocumentCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getCommonMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus + m = + input.readMessage( + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus.parser(), + extensionRegistry); + if (individualBatchDeleteStatusesBuilder_ == null) { + ensureIndividualBatchDeleteStatusesIsMutable(); + individualBatchDeleteStatuses_.add(m); + } else { + individualBatchDeleteStatusesBuilder_.addMessage(m); + } + break; + } // case 18 + case 24: + { + totalDocumentCount_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + errorDocumentCount_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.documentai.v1beta3.CommonOperationMetadata commonMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.CommonOperationMetadata, + com.google.cloud.documentai.v1beta3.CommonOperationMetadata.Builder, + com.google.cloud.documentai.v1beta3.CommonOperationMetadataOrBuilder> + commonMetadataBuilder_; + /** + * + * + *
+     * The basic metadata of the long running operation.
+     * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + * + * @return Whether the commonMetadata field is set. + */ + public boolean hasCommonMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The basic metadata of the long running operation.
+     * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + * + * @return The commonMetadata. + */ + public com.google.cloud.documentai.v1beta3.CommonOperationMetadata getCommonMetadata() { + if (commonMetadataBuilder_ == null) { + return commonMetadata_ == null + ? com.google.cloud.documentai.v1beta3.CommonOperationMetadata.getDefaultInstance() + : commonMetadata_; + } else { + return commonMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The basic metadata of the long running operation.
+     * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + */ + public Builder setCommonMetadata( + com.google.cloud.documentai.v1beta3.CommonOperationMetadata value) { + if (commonMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + commonMetadata_ = value; + } else { + commonMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The basic metadata of the long running operation.
+     * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + */ + public Builder setCommonMetadata( + com.google.cloud.documentai.v1beta3.CommonOperationMetadata.Builder builderForValue) { + if (commonMetadataBuilder_ == null) { + commonMetadata_ = builderForValue.build(); + } else { + commonMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The basic metadata of the long running operation.
+     * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + */ + public Builder mergeCommonMetadata( + com.google.cloud.documentai.v1beta3.CommonOperationMetadata value) { + if (commonMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && commonMetadata_ != null + && commonMetadata_ + != com.google.cloud.documentai.v1beta3.CommonOperationMetadata + .getDefaultInstance()) { + getCommonMetadataBuilder().mergeFrom(value); + } else { + commonMetadata_ = value; + } + } else { + commonMetadataBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The basic metadata of the long running operation.
+     * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + */ + public Builder clearCommonMetadata() { + bitField0_ = (bitField0_ & ~0x00000001); + commonMetadata_ = null; + if (commonMetadataBuilder_ != null) { + commonMetadataBuilder_.dispose(); + commonMetadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The basic metadata of the long running operation.
+     * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + */ + public com.google.cloud.documentai.v1beta3.CommonOperationMetadata.Builder + getCommonMetadataBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCommonMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The basic metadata of the long running operation.
+     * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + */ + public com.google.cloud.documentai.v1beta3.CommonOperationMetadataOrBuilder + getCommonMetadataOrBuilder() { + if (commonMetadataBuilder_ != null) { + return commonMetadataBuilder_.getMessageOrBuilder(); + } else { + return commonMetadata_ == null + ? com.google.cloud.documentai.v1beta3.CommonOperationMetadata.getDefaultInstance() + : commonMetadata_; + } + } + /** + * + * + *
+     * The basic metadata of the long running operation.
+     * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.CommonOperationMetadata, + com.google.cloud.documentai.v1beta3.CommonOperationMetadata.Builder, + com.google.cloud.documentai.v1beta3.CommonOperationMetadataOrBuilder> + getCommonMetadataFieldBuilder() { + if (commonMetadataBuilder_ == null) { + commonMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.CommonOperationMetadata, + com.google.cloud.documentai.v1beta3.CommonOperationMetadata.Builder, + com.google.cloud.documentai.v1beta3.CommonOperationMetadataOrBuilder>( + getCommonMetadata(), getParentForChildren(), isClean()); + commonMetadata_ = null; + } + return commonMetadataBuilder_; + } + + private java.util.List< + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus> + individualBatchDeleteStatuses_ = java.util.Collections.emptyList(); + + private void ensureIndividualBatchDeleteStatusesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + individualBatchDeleteStatuses_ = + new java.util.ArrayList< + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus>(individualBatchDeleteStatuses_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus, + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus.Builder, + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatusOrBuilder> + individualBatchDeleteStatusesBuilder_; + + /** + * + * + *
+     * The list of response details of each document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.IndividualBatchDeleteStatus individual_batch_delete_statuses = 2; + * + */ + public java.util.List< + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus> + getIndividualBatchDeleteStatusesList() { + if (individualBatchDeleteStatusesBuilder_ == null) { + return java.util.Collections.unmodifiableList(individualBatchDeleteStatuses_); + } else { + return individualBatchDeleteStatusesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of response details of each document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.IndividualBatchDeleteStatus individual_batch_delete_statuses = 2; + * + */ + public int getIndividualBatchDeleteStatusesCount() { + if (individualBatchDeleteStatusesBuilder_ == null) { + return individualBatchDeleteStatuses_.size(); + } else { + return individualBatchDeleteStatusesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of response details of each document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.IndividualBatchDeleteStatus individual_batch_delete_statuses = 2; + * + */ + public com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus + getIndividualBatchDeleteStatuses(int index) { + if (individualBatchDeleteStatusesBuilder_ == null) { + return individualBatchDeleteStatuses_.get(index); + } else { + return individualBatchDeleteStatusesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of response details of each document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.IndividualBatchDeleteStatus individual_batch_delete_statuses = 2; + * + */ + public Builder setIndividualBatchDeleteStatuses( + int index, + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.IndividualBatchDeleteStatus + value) { + if (individualBatchDeleteStatusesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIndividualBatchDeleteStatusesIsMutable(); + individualBatchDeleteStatuses_.set(index, value); + onChanged(); + } else { + individualBatchDeleteStatusesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of response details of each document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.IndividualBatchDeleteStatus individual_batch_delete_statuses = 2; + * + */ + public Builder setIndividualBatchDeleteStatuses( + int index, + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.IndividualBatchDeleteStatus + .Builder + builderForValue) { + if (individualBatchDeleteStatusesBuilder_ == null) { + ensureIndividualBatchDeleteStatusesIsMutable(); + individualBatchDeleteStatuses_.set(index, builderForValue.build()); + onChanged(); + } else { + individualBatchDeleteStatusesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of response details of each document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.IndividualBatchDeleteStatus individual_batch_delete_statuses = 2; + * + */ + public Builder addIndividualBatchDeleteStatuses( + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.IndividualBatchDeleteStatus + value) { + if (individualBatchDeleteStatusesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIndividualBatchDeleteStatusesIsMutable(); + individualBatchDeleteStatuses_.add(value); + onChanged(); + } else { + individualBatchDeleteStatusesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of response details of each document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.IndividualBatchDeleteStatus individual_batch_delete_statuses = 2; + * + */ + public Builder addIndividualBatchDeleteStatuses( + int index, + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.IndividualBatchDeleteStatus + value) { + if (individualBatchDeleteStatusesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIndividualBatchDeleteStatusesIsMutable(); + individualBatchDeleteStatuses_.add(index, value); + onChanged(); + } else { + individualBatchDeleteStatusesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of response details of each document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.IndividualBatchDeleteStatus individual_batch_delete_statuses = 2; + * + */ + public Builder addIndividualBatchDeleteStatuses( + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.IndividualBatchDeleteStatus + .Builder + builderForValue) { + if (individualBatchDeleteStatusesBuilder_ == null) { + ensureIndividualBatchDeleteStatusesIsMutable(); + individualBatchDeleteStatuses_.add(builderForValue.build()); + onChanged(); + } else { + individualBatchDeleteStatusesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of response details of each document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.IndividualBatchDeleteStatus individual_batch_delete_statuses = 2; + * + */ + public Builder addIndividualBatchDeleteStatuses( + int index, + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.IndividualBatchDeleteStatus + .Builder + builderForValue) { + if (individualBatchDeleteStatusesBuilder_ == null) { + ensureIndividualBatchDeleteStatusesIsMutable(); + individualBatchDeleteStatuses_.add(index, builderForValue.build()); + onChanged(); + } else { + individualBatchDeleteStatusesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of response details of each document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.IndividualBatchDeleteStatus individual_batch_delete_statuses = 2; + * + */ + public Builder addAllIndividualBatchDeleteStatuses( + java.lang.Iterable< + ? extends + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus> + values) { + if (individualBatchDeleteStatusesBuilder_ == null) { + ensureIndividualBatchDeleteStatusesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, individualBatchDeleteStatuses_); + onChanged(); + } else { + individualBatchDeleteStatusesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of response details of each document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.IndividualBatchDeleteStatus individual_batch_delete_statuses = 2; + * + */ + public Builder clearIndividualBatchDeleteStatuses() { + if (individualBatchDeleteStatusesBuilder_ == null) { + individualBatchDeleteStatuses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + individualBatchDeleteStatusesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of response details of each document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.IndividualBatchDeleteStatus individual_batch_delete_statuses = 2; + * + */ + public Builder removeIndividualBatchDeleteStatuses(int index) { + if (individualBatchDeleteStatusesBuilder_ == null) { + ensureIndividualBatchDeleteStatusesIsMutable(); + individualBatchDeleteStatuses_.remove(index); + onChanged(); + } else { + individualBatchDeleteStatusesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of response details of each document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.IndividualBatchDeleteStatus individual_batch_delete_statuses = 2; + * + */ + public com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus.Builder + getIndividualBatchDeleteStatusesBuilder(int index) { + return getIndividualBatchDeleteStatusesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of response details of each document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.IndividualBatchDeleteStatus individual_batch_delete_statuses = 2; + * + */ + public com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatusOrBuilder + getIndividualBatchDeleteStatusesOrBuilder(int index) { + if (individualBatchDeleteStatusesBuilder_ == null) { + return individualBatchDeleteStatuses_.get(index); + } else { + return individualBatchDeleteStatusesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of response details of each document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.IndividualBatchDeleteStatus individual_batch_delete_statuses = 2; + * + */ + public java.util.List< + ? extends + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatusOrBuilder> + getIndividualBatchDeleteStatusesOrBuilderList() { + if (individualBatchDeleteStatusesBuilder_ != null) { + return individualBatchDeleteStatusesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(individualBatchDeleteStatuses_); + } + } + /** + * + * + *
+     * The list of response details of each document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.IndividualBatchDeleteStatus individual_batch_delete_statuses = 2; + * + */ + public com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus.Builder + addIndividualBatchDeleteStatusesBuilder() { + return getIndividualBatchDeleteStatusesFieldBuilder() + .addBuilder( + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus.getDefaultInstance()); + } + /** + * + * + *
+     * The list of response details of each document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.IndividualBatchDeleteStatus individual_batch_delete_statuses = 2; + * + */ + public com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus.Builder + addIndividualBatchDeleteStatusesBuilder(int index) { + return getIndividualBatchDeleteStatusesFieldBuilder() + .addBuilder( + index, + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus.getDefaultInstance()); + } + /** + * + * + *
+     * The list of response details of each document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.IndividualBatchDeleteStatus individual_batch_delete_statuses = 2; + * + */ + public java.util.List< + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus.Builder> + getIndividualBatchDeleteStatusesBuilderList() { + return getIndividualBatchDeleteStatusesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus, + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus.Builder, + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatusOrBuilder> + getIndividualBatchDeleteStatusesFieldBuilder() { + if (individualBatchDeleteStatusesBuilder_ == null) { + individualBatchDeleteStatusesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus, + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus.Builder, + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatusOrBuilder>( + individualBatchDeleteStatuses_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + individualBatchDeleteStatuses_ = null; + } + return individualBatchDeleteStatusesBuilder_; + } + + private int totalDocumentCount_; + /** + * + * + *
+     * Total number of documents deleting from dataset.
+     * 
+ * + * int32 total_document_count = 3; + * + * @return The totalDocumentCount. + */ + @java.lang.Override + public int getTotalDocumentCount() { + return totalDocumentCount_; + } + /** + * + * + *
+     * Total number of documents deleting from dataset.
+     * 
+ * + * int32 total_document_count = 3; + * + * @param value The totalDocumentCount to set. + * @return This builder for chaining. + */ + public Builder setTotalDocumentCount(int value) { + + totalDocumentCount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Total number of documents deleting from dataset.
+     * 
+ * + * int32 total_document_count = 3; + * + * @return This builder for chaining. + */ + public Builder clearTotalDocumentCount() { + bitField0_ = (bitField0_ & ~0x00000004); + totalDocumentCount_ = 0; + onChanged(); + return this; + } + + private int errorDocumentCount_; + /** + * + * + *
+     * Total number of documents that failed to be deleted in storage.
+     * 
+ * + * int32 error_document_count = 4; + * + * @return The errorDocumentCount. + */ + @java.lang.Override + public int getErrorDocumentCount() { + return errorDocumentCount_; + } + /** + * + * + *
+     * Total number of documents that failed to be deleted in storage.
+     * 
+ * + * int32 error_document_count = 4; + * + * @param value The errorDocumentCount to set. + * @return This builder for chaining. + */ + public Builder setErrorDocumentCount(int value) { + + errorDocumentCount_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Total number of documents that failed to be deleted in storage.
+     * 
+ * + * int32 error_document_count = 4; + * + * @return This builder for chaining. + */ + public Builder clearErrorDocumentCount() { + bitField0_ = (bitField0_ & ~0x00000008); + errorDocumentCount_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata) + private static final com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata(); + } + + public static com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchDeleteDocumentsMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchDeleteDocumentsMetadataOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchDeleteDocumentsMetadataOrBuilder.java new file mode 100644 index 000000000000..75903e2092d0 --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchDeleteDocumentsMetadataOrBuilder.java @@ -0,0 +1,157 @@ +/* + * Copyright 2023 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_service.proto + +package com.google.cloud.documentai.v1beta3; + +public interface BatchDeleteDocumentsMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The basic metadata of the long running operation.
+   * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + * + * @return Whether the commonMetadata field is set. + */ + boolean hasCommonMetadata(); + /** + * + * + *
+   * The basic metadata of the long running operation.
+   * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + * + * @return The commonMetadata. + */ + com.google.cloud.documentai.v1beta3.CommonOperationMetadata getCommonMetadata(); + /** + * + * + *
+   * The basic metadata of the long running operation.
+   * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + */ + com.google.cloud.documentai.v1beta3.CommonOperationMetadataOrBuilder getCommonMetadataOrBuilder(); + + /** + * + * + *
+   * The list of response details of each document.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.IndividualBatchDeleteStatus individual_batch_delete_statuses = 2; + * + */ + java.util.List< + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatus> + getIndividualBatchDeleteStatusesList(); + /** + * + * + *
+   * The list of response details of each document.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.IndividualBatchDeleteStatus individual_batch_delete_statuses = 2; + * + */ + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.IndividualBatchDeleteStatus + getIndividualBatchDeleteStatuses(int index); + /** + * + * + *
+   * The list of response details of each document.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.IndividualBatchDeleteStatus individual_batch_delete_statuses = 2; + * + */ + int getIndividualBatchDeleteStatusesCount(); + /** + * + * + *
+   * The list of response details of each document.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.IndividualBatchDeleteStatus individual_batch_delete_statuses = 2; + * + */ + java.util.List< + ? extends + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatusOrBuilder> + getIndividualBatchDeleteStatusesOrBuilderList(); + /** + * + * + *
+   * The list of response details of each document.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata.IndividualBatchDeleteStatus individual_batch_delete_statuses = 2; + * + */ + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata + .IndividualBatchDeleteStatusOrBuilder + getIndividualBatchDeleteStatusesOrBuilder(int index); + + /** + * + * + *
+   * Total number of documents deleting from dataset.
+   * 
+ * + * int32 total_document_count = 3; + * + * @return The totalDocumentCount. + */ + int getTotalDocumentCount(); + + /** + * + * + *
+   * Total number of documents that failed to be deleted in storage.
+   * 
+ * + * int32 error_document_count = 4; + * + * @return The errorDocumentCount. + */ + int getErrorDocumentCount(); +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchDeleteDocumentsRequest.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchDeleteDocumentsRequest.java new file mode 100644 index 000000000000..80c1c0485a7c --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchDeleteDocumentsRequest.java @@ -0,0 +1,963 @@ +/* + * Copyright 2023 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_service.proto + +package com.google.cloud.documentai.v1beta3; + +/** Protobuf type {@code google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest} */ +public final class BatchDeleteDocumentsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest) + BatchDeleteDocumentsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchDeleteDocumentsRequest.newBuilder() to construct. + private BatchDeleteDocumentsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchDeleteDocumentsRequest() { + dataset_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchDeleteDocumentsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_BatchDeleteDocumentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_BatchDeleteDocumentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest.class, + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest.Builder.class); + } + + public static final int DATASET_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object dataset_ = ""; + /** + * + * + *
+   * Required. The dataset resource name.
+   * Format:
+   * projects/{project}/locations/{location}/processors/{processor}/dataset
+   * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The dataset. + */ + @java.lang.Override + public java.lang.String getDataset() { + java.lang.Object ref = dataset_; + 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(); + dataset_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The dataset resource name.
+   * Format:
+   * projects/{project}/locations/{location}/processors/{processor}/dataset
+   * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for dataset. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatasetBytes() { + java.lang.Object ref = dataset_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATASET_DOCUMENTS_FIELD_NUMBER = 3; + private com.google.cloud.documentai.v1beta3.BatchDatasetDocuments datasetDocuments_; + /** + * + * + *
+   * Required. Dataset documents input. If given `filter`, all documents
+   * satisfying the filter will be deleted. If given documentIds, a maximum of
+   * 50 documents can be deleted in a batch. The request will be rejected if
+   * more than 50 document_ids are provided.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.BatchDatasetDocuments dataset_documents = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the datasetDocuments field is set. + */ + @java.lang.Override + public boolean hasDatasetDocuments() { + return datasetDocuments_ != null; + } + /** + * + * + *
+   * Required. Dataset documents input. If given `filter`, all documents
+   * satisfying the filter will be deleted. If given documentIds, a maximum of
+   * 50 documents can be deleted in a batch. The request will be rejected if
+   * more than 50 document_ids are provided.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.BatchDatasetDocuments dataset_documents = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The datasetDocuments. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.BatchDatasetDocuments getDatasetDocuments() { + return datasetDocuments_ == null + ? com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.getDefaultInstance() + : datasetDocuments_; + } + /** + * + * + *
+   * Required. Dataset documents input. If given `filter`, all documents
+   * satisfying the filter will be deleted. If given documentIds, a maximum of
+   * 50 documents can be deleted in a batch. The request will be rejected if
+   * more than 50 document_ids are provided.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.BatchDatasetDocuments dataset_documents = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.BatchDatasetDocumentsOrBuilder + getDatasetDocumentsOrBuilder() { + return datasetDocuments_ == null + ? com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.getDefaultInstance() + : datasetDocuments_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataset_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, dataset_); + } + if (datasetDocuments_ != null) { + output.writeMessage(3, getDatasetDocuments()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataset_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, dataset_); + } + if (datasetDocuments_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getDatasetDocuments()); + } + size += getUnknownFields().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.BatchDeleteDocumentsRequest)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest other = + (com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest) obj; + + if (!getDataset().equals(other.getDataset())) return false; + if (hasDatasetDocuments() != other.hasDatasetDocuments()) return false; + if (hasDatasetDocuments()) { + if (!getDatasetDocuments().equals(other.getDatasetDocuments())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + DATASET_FIELD_NUMBER; + hash = (53 * hash) + getDataset().hashCode(); + if (hasDatasetDocuments()) { + hash = (37 * hash) + DATASET_DOCUMENTS_FIELD_NUMBER; + hash = (53 * hash) + getDatasetDocuments().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest 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.BatchDeleteDocumentsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest 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.BatchDeleteDocumentsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest 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.BatchDeleteDocumentsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest 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.BatchDeleteDocumentsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest 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.BatchDeleteDocumentsRequest 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.BatchDeleteDocumentsRequest 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.BatchDeleteDocumentsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** Protobuf type {@code google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest} */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest) + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_BatchDeleteDocumentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_BatchDeleteDocumentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest.class, + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest.Builder.class); + } + + // Construct using com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + dataset_ = ""; + datasetDocuments_ = null; + if (datasetDocumentsBuilder_ != null) { + datasetDocumentsBuilder_.dispose(); + datasetDocumentsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_BatchDeleteDocumentsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest build() { + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest buildPartial() { + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest result = + new com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.dataset_ = dataset_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.datasetDocuments_ = + datasetDocumentsBuilder_ == null ? datasetDocuments_ : datasetDocumentsBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest) { + return mergeFrom((com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest other) { + if (other + == com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest.getDefaultInstance()) + return this; + if (!other.getDataset().isEmpty()) { + dataset_ = other.dataset_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasDatasetDocuments()) { + mergeDatasetDocuments(other.getDatasetDocuments()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + dataset_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 26: + { + input.readMessage( + getDatasetDocumentsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object dataset_ = ""; + /** + * + * + *
+     * Required. The dataset resource name.
+     * Format:
+     * projects/{project}/locations/{location}/processors/{processor}/dataset
+     * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The dataset. + */ + public java.lang.String getDataset() { + java.lang.Object ref = dataset_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataset_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The dataset resource name.
+     * Format:
+     * projects/{project}/locations/{location}/processors/{processor}/dataset
+     * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for dataset. + */ + public com.google.protobuf.ByteString getDatasetBytes() { + java.lang.Object ref = dataset_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The dataset resource name.
+     * Format:
+     * projects/{project}/locations/{location}/processors/{processor}/dataset
+     * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The dataset to set. + * @return This builder for chaining. + */ + public Builder setDataset(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dataset_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The dataset resource name.
+     * Format:
+     * projects/{project}/locations/{location}/processors/{processor}/dataset
+     * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDataset() { + dataset_ = getDefaultInstance().getDataset(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The dataset resource name.
+     * Format:
+     * projects/{project}/locations/{location}/processors/{processor}/dataset
+     * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for dataset to set. + * @return This builder for chaining. + */ + public Builder setDatasetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dataset_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.documentai.v1beta3.BatchDatasetDocuments datasetDocuments_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.BatchDatasetDocuments, + com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.Builder, + com.google.cloud.documentai.v1beta3.BatchDatasetDocumentsOrBuilder> + datasetDocumentsBuilder_; + /** + * + * + *
+     * Required. Dataset documents input. If given `filter`, all documents
+     * satisfying the filter will be deleted. If given documentIds, a maximum of
+     * 50 documents can be deleted in a batch. The request will be rejected if
+     * more than 50 document_ids are provided.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.BatchDatasetDocuments dataset_documents = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the datasetDocuments field is set. + */ + public boolean hasDatasetDocuments() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. Dataset documents input. If given `filter`, all documents
+     * satisfying the filter will be deleted. If given documentIds, a maximum of
+     * 50 documents can be deleted in a batch. The request will be rejected if
+     * more than 50 document_ids are provided.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.BatchDatasetDocuments dataset_documents = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The datasetDocuments. + */ + public com.google.cloud.documentai.v1beta3.BatchDatasetDocuments getDatasetDocuments() { + if (datasetDocumentsBuilder_ == null) { + return datasetDocuments_ == null + ? com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.getDefaultInstance() + : datasetDocuments_; + } else { + return datasetDocumentsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Dataset documents input. If given `filter`, all documents
+     * satisfying the filter will be deleted. If given documentIds, a maximum of
+     * 50 documents can be deleted in a batch. The request will be rejected if
+     * more than 50 document_ids are provided.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.BatchDatasetDocuments dataset_documents = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDatasetDocuments( + com.google.cloud.documentai.v1beta3.BatchDatasetDocuments value) { + if (datasetDocumentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + datasetDocuments_ = value; + } else { + datasetDocumentsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Dataset documents input. If given `filter`, all documents
+     * satisfying the filter will be deleted. If given documentIds, a maximum of
+     * 50 documents can be deleted in a batch. The request will be rejected if
+     * more than 50 document_ids are provided.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.BatchDatasetDocuments dataset_documents = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDatasetDocuments( + com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.Builder builderForValue) { + if (datasetDocumentsBuilder_ == null) { + datasetDocuments_ = builderForValue.build(); + } else { + datasetDocumentsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Dataset documents input. If given `filter`, all documents
+     * satisfying the filter will be deleted. If given documentIds, a maximum of
+     * 50 documents can be deleted in a batch. The request will be rejected if
+     * more than 50 document_ids are provided.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.BatchDatasetDocuments dataset_documents = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeDatasetDocuments( + com.google.cloud.documentai.v1beta3.BatchDatasetDocuments value) { + if (datasetDocumentsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && datasetDocuments_ != null + && datasetDocuments_ + != com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.getDefaultInstance()) { + getDatasetDocumentsBuilder().mergeFrom(value); + } else { + datasetDocuments_ = value; + } + } else { + datasetDocumentsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Dataset documents input. If given `filter`, all documents
+     * satisfying the filter will be deleted. If given documentIds, a maximum of
+     * 50 documents can be deleted in a batch. The request will be rejected if
+     * more than 50 document_ids are provided.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.BatchDatasetDocuments dataset_documents = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDatasetDocuments() { + bitField0_ = (bitField0_ & ~0x00000002); + datasetDocuments_ = null; + if (datasetDocumentsBuilder_ != null) { + datasetDocumentsBuilder_.dispose(); + datasetDocumentsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Dataset documents input. If given `filter`, all documents
+     * satisfying the filter will be deleted. If given documentIds, a maximum of
+     * 50 documents can be deleted in a batch. The request will be rejected if
+     * more than 50 document_ids are provided.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.BatchDatasetDocuments dataset_documents = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.Builder + getDatasetDocumentsBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getDatasetDocumentsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Dataset documents input. If given `filter`, all documents
+     * satisfying the filter will be deleted. If given documentIds, a maximum of
+     * 50 documents can be deleted in a batch. The request will be rejected if
+     * more than 50 document_ids are provided.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.BatchDatasetDocuments dataset_documents = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.documentai.v1beta3.BatchDatasetDocumentsOrBuilder + getDatasetDocumentsOrBuilder() { + if (datasetDocumentsBuilder_ != null) { + return datasetDocumentsBuilder_.getMessageOrBuilder(); + } else { + return datasetDocuments_ == null + ? com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.getDefaultInstance() + : datasetDocuments_; + } + } + /** + * + * + *
+     * Required. Dataset documents input. If given `filter`, all documents
+     * satisfying the filter will be deleted. If given documentIds, a maximum of
+     * 50 documents can be deleted in a batch. The request will be rejected if
+     * more than 50 document_ids are provided.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.BatchDatasetDocuments dataset_documents = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.BatchDatasetDocuments, + com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.Builder, + com.google.cloud.documentai.v1beta3.BatchDatasetDocumentsOrBuilder> + getDatasetDocumentsFieldBuilder() { + if (datasetDocumentsBuilder_ == null) { + datasetDocumentsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.BatchDatasetDocuments, + com.google.cloud.documentai.v1beta3.BatchDatasetDocuments.Builder, + com.google.cloud.documentai.v1beta3.BatchDatasetDocumentsOrBuilder>( + getDatasetDocuments(), getParentForChildren(), isClean()); + datasetDocuments_ = null; + } + return datasetDocumentsBuilder_; + } + + @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.BatchDeleteDocumentsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest) + private static final com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest(); + } + + public static com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchDeleteDocumentsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchDeleteDocumentsRequestOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchDeleteDocumentsRequestOrBuilder.java new file mode 100644 index 000000000000..6cf26bde8a61 --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchDeleteDocumentsRequestOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2023 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_service.proto + +package com.google.cloud.documentai.v1beta3; + +public interface BatchDeleteDocumentsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The dataset resource name.
+   * Format:
+   * projects/{project}/locations/{location}/processors/{processor}/dataset
+   * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The dataset. + */ + java.lang.String getDataset(); + /** + * + * + *
+   * Required. The dataset resource name.
+   * Format:
+   * projects/{project}/locations/{location}/processors/{processor}/dataset
+   * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for dataset. + */ + com.google.protobuf.ByteString getDatasetBytes(); + + /** + * + * + *
+   * Required. Dataset documents input. If given `filter`, all documents
+   * satisfying the filter will be deleted. If given documentIds, a maximum of
+   * 50 documents can be deleted in a batch. The request will be rejected if
+   * more than 50 document_ids are provided.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.BatchDatasetDocuments dataset_documents = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the datasetDocuments field is set. + */ + boolean hasDatasetDocuments(); + /** + * + * + *
+   * Required. Dataset documents input. If given `filter`, all documents
+   * satisfying the filter will be deleted. If given documentIds, a maximum of
+   * 50 documents can be deleted in a batch. The request will be rejected if
+   * more than 50 document_ids are provided.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.BatchDatasetDocuments dataset_documents = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The datasetDocuments. + */ + com.google.cloud.documentai.v1beta3.BatchDatasetDocuments getDatasetDocuments(); + /** + * + * + *
+   * Required. Dataset documents input. If given `filter`, all documents
+   * satisfying the filter will be deleted. If given documentIds, a maximum of
+   * 50 documents can be deleted in a batch. The request will be rejected if
+   * more than 50 document_ids are provided.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.BatchDatasetDocuments dataset_documents = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.documentai.v1beta3.BatchDatasetDocumentsOrBuilder getDatasetDocumentsOrBuilder(); +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchDeleteDocumentsResponse.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchDeleteDocumentsResponse.java new file mode 100644 index 000000000000..ead4973cddfd --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchDeleteDocumentsResponse.java @@ -0,0 +1,438 @@ +/* + * Copyright 2023 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_service.proto + +package com.google.cloud.documentai.v1beta3; + +/** + * + * + *
+ * Response of the delete documents operation.
+ * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.BatchDeleteDocumentsResponse} + */ +public final class BatchDeleteDocumentsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.BatchDeleteDocumentsResponse) + BatchDeleteDocumentsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchDeleteDocumentsResponse.newBuilder() to construct. + private BatchDeleteDocumentsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchDeleteDocumentsResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchDeleteDocumentsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_BatchDeleteDocumentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_BatchDeleteDocumentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsResponse.class, + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsResponse.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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().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.BatchDeleteDocumentsResponse)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsResponse other = + (com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsResponse) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsResponse 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.BatchDeleteDocumentsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsResponse 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.BatchDeleteDocumentsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsResponse 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.BatchDeleteDocumentsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsResponse 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.BatchDeleteDocumentsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsResponse 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.BatchDeleteDocumentsResponse 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.BatchDeleteDocumentsResponse 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.BatchDeleteDocumentsResponse 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 of the delete documents operation.
+   * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.BatchDeleteDocumentsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.BatchDeleteDocumentsResponse) + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_BatchDeleteDocumentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_BatchDeleteDocumentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsResponse.class, + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsResponse.Builder.class); + } + + // Construct using com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_BatchDeleteDocumentsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsResponse + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsResponse build() { + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsResponse buildPartial() { + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsResponse result = + new com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsResponse) { + return mergeFrom((com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsResponse other) { + if (other + == com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsResponse.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + 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.BatchDeleteDocumentsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.BatchDeleteDocumentsResponse) + private static final com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsResponse(); + } + + public static com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchDeleteDocumentsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchDeleteDocumentsResponseOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchDeleteDocumentsResponseOrBuilder.java new file mode 100644 index 000000000000..e2d7bb9a9e18 --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchDeleteDocumentsResponseOrBuilder.java @@ -0,0 +1,24 @@ +/* + * Copyright 2023 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_service.proto + +package com.google.cloud.documentai.v1beta3; + +public interface BatchDeleteDocumentsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.BatchDeleteDocumentsResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessMetadata.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessMetadata.java index 8e42ebfcb9f8..c4a2b51c1e62 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessMetadata.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessMetadata.java @@ -426,7 +426,7 @@ public interface IndividualProcessStatusOrBuilder * * @deprecated * google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus.human_review_operation - * is deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=547 + * is deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=550 * @return The humanReviewOperation. */ @java.lang.Deprecated @@ -447,7 +447,7 @@ public interface IndividualProcessStatusOrBuilder * * @deprecated * google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus.human_review_operation - * is deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=547 + * is deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=550 * @return The bytes for humanReviewOperation. */ @java.lang.Deprecated @@ -713,7 +713,7 @@ public com.google.protobuf.ByteString getOutputGcsDestinationBytes() { * * @deprecated * google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus.human_review_operation - * is deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=547 + * is deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=550 * @return The humanReviewOperation. */ @java.lang.Override @@ -745,7 +745,7 @@ public java.lang.String getHumanReviewOperation() { * * @deprecated * google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus.human_review_operation - * is deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=547 + * is deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=550 * @return The bytes for humanReviewOperation. */ @java.lang.Override @@ -1724,7 +1724,7 @@ public Builder setOutputGcsDestinationBytes(com.google.protobuf.ByteString value * @deprecated * google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus.human_review_operation * is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=547 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=550 * @return The humanReviewOperation. */ @java.lang.Deprecated @@ -1756,7 +1756,7 @@ public java.lang.String getHumanReviewOperation() { * @deprecated * google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus.human_review_operation * is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=547 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=550 * @return The bytes for humanReviewOperation. */ @java.lang.Deprecated @@ -1788,7 +1788,7 @@ public com.google.protobuf.ByteString getHumanReviewOperationBytes() { * @deprecated * google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus.human_review_operation * is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=547 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=550 * @param value The humanReviewOperation to set. * @return This builder for chaining. */ @@ -1819,7 +1819,7 @@ public Builder setHumanReviewOperation(java.lang.String value) { * @deprecated * google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus.human_review_operation * is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=547 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=550 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1846,7 +1846,7 @@ public Builder clearHumanReviewOperation() { * @deprecated * google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus.human_review_operation * is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=547 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=550 * @param value The bytes for humanReviewOperation to set. * @return This builder for chaining. */ diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessRequest.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessRequest.java index a7922a7d73f9..699b8594b963 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessRequest.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessRequest.java @@ -1834,7 +1834,7 @@ public com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig *
* * @deprecated google.cloud.documentai.v1beta3.BatchProcessRequest.output_config is deprecated. - * See google/cloud/documentai/v1beta3/document_processor_service.proto;l=499 + * See google/cloud/documentai/v1beta3/document_processor_service.proto;l=502 * @return Whether the outputConfig field is set. */ @java.lang.Override @@ -1854,7 +1854,7 @@ public boolean hasOutputConfig() { *
* * @deprecated google.cloud.documentai.v1beta3.BatchProcessRequest.output_config is deprecated. - * See google/cloud/documentai/v1beta3/document_processor_service.proto;l=499 + * See google/cloud/documentai/v1beta3/document_processor_service.proto;l=502 * @return The outputConfig. */ @java.lang.Override @@ -3232,7 +3232,7 @@ public Builder removeInputConfigs(int index) { *
* * @deprecated google.cloud.documentai.v1beta3.BatchProcessRequest.output_config is deprecated. - * See google/cloud/documentai/v1beta3/document_processor_service.proto;l=499 + * See google/cloud/documentai/v1beta3/document_processor_service.proto;l=502 * @return Whether the outputConfig field is set. */ @java.lang.Deprecated @@ -3251,7 +3251,7 @@ public boolean hasOutputConfig() { *
* * @deprecated google.cloud.documentai.v1beta3.BatchProcessRequest.output_config is deprecated. - * See google/cloud/documentai/v1beta3/document_processor_service.proto;l=499 + * See google/cloud/documentai/v1beta3/document_processor_service.proto;l=502 * @return The outputConfig. */ @java.lang.Deprecated diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessRequestOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessRequestOrBuilder.java index e1798f7e6a62..075aed567403 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessRequestOrBuilder.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessRequestOrBuilder.java @@ -146,7 +146,7 @@ com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig getInpu *
* * @deprecated google.cloud.documentai.v1beta3.BatchProcessRequest.output_config is deprecated. - * See google/cloud/documentai/v1beta3/document_processor_service.proto;l=499 + * See google/cloud/documentai/v1beta3/document_processor_service.proto;l=502 * @return Whether the outputConfig field is set. */ @java.lang.Deprecated @@ -163,7 +163,7 @@ com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig getInpu *
* * @deprecated google.cloud.documentai.v1beta3.BatchProcessRequest.output_config is deprecated. - * See google/cloud/documentai/v1beta3/document_processor_service.proto;l=499 + * See google/cloud/documentai/v1beta3/document_processor_service.proto;l=502 * @return The outputConfig. */ @java.lang.Deprecated diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DatasetName.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DatasetName.java new file mode 100644 index 000000000000..997b07a5b645 --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DatasetName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2023 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; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class DatasetName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_PROCESSOR = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/processors/{processor}/dataset"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String processor; + + @Deprecated + protected DatasetName() { + project = null; + location = null; + processor = null; + } + + private DatasetName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + processor = Preconditions.checkNotNull(builder.getProcessor()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getProcessor() { + return processor; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static DatasetName of(String project, String location, String processor) { + return newBuilder().setProject(project).setLocation(location).setProcessor(processor).build(); + } + + public static String format(String project, String location, String processor) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setProcessor(processor) + .build() + .toString(); + } + + public static DatasetName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_PROCESSOR.validatedMatch( + formattedString, "DatasetName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("processor")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (DatasetName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_PROCESSOR.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (processor != null) { + fieldMapBuilder.put("processor", processor); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_PROCESSOR.instantiate( + "project", project, "location", location, "processor", processor); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + DatasetName that = ((DatasetName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.processor, that.processor); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(processor); + return h; + } + + /** Builder for projects/{project}/locations/{location}/processors/{processor}/dataset. */ + public static class Builder { + private String project; + private String location; + private String processor; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getProcessor() { + return processor; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setProcessor(String processor) { + this.processor = processor; + return this; + } + + private Builder(DatasetName datasetName) { + this.project = datasetName.project; + this.location = datasetName.location; + this.processor = datasetName.processor; + } + + public DatasetName build() { + return new DatasetName(this); + } + } +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DatasetProto.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DatasetProto.java index bb57cd518418..327ab70cc8ef 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DatasetProto.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DatasetProto.java @@ -47,10 +47,30 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_documentai_v1beta3_Dataset_SpannerIndexingConfig_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_documentai_v1beta3_Dataset_SpannerIndexingConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_DocumentId_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_DocumentId_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_DocumentId_GCSManagedDocumentId_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_DocumentId_GCSManagedDocumentId_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_DocumentId_UnmanagedDocumentId_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_DocumentId_UnmanagedDocumentId_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_documentai_v1beta3_DatasetSchema_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_documentai_v1beta3_DatasetSchema_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_BatchDatasetDocuments_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_BatchDatasetDocuments_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_BatchDatasetDocuments_IndividualDocumentIds_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_BatchDatasetDocuments_IndividualDocumentIds_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -63,49 +83,67 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "\n-google/cloud/documentai/v1beta3/datase" + "t.proto\022\037google.cloud.documentai.v1beta3" + "\032\037google/api/field_behavior.proto\032\031googl" - + "e/api/resource.proto\0321google/cloud/docum" - + "entai/v1beta3/document_io.proto\0325google/" - + "cloud/documentai/v1beta3/document_schema" - + ".proto\"\352\007\n\007Dataset\022]\n\022gcs_managed_config" - + "\030\003 \001(\01329.google.cloud.documentai.v1beta3" - + ".Dataset.GCSManagedConfigB\004\342A\001\001H\000\022k\n\031doc" - + "ument_warehouse_config\030\005 \001(\0132@.google.cl" - + "oud.documentai.v1beta3.Dataset.DocumentW" - + "arehouseConfigB\004\342A\001\001H\000\022i\n\030unmanaged_data" - + "set_config\030\006 \001(\0132?.google.cloud.document" - + "ai.v1beta3.Dataset.UnmanagedDatasetConfi" - + "gB\004\342A\001\001H\000\022g\n\027spanner_indexing_config\030\004 \001" - + "(\0132>.google.cloud.documentai.v1beta3.Dat" - + "aset.SpannerIndexingConfigB\004\342A\001\001H\001\022\014\n\004na" - + "me\030\001 \001(\t\022C\n\005state\030\002 \001(\0162..google.cloud.d" - + "ocumentai.v1beta3.Dataset.StateB\004\342A\001\002\032X\n" - + "\020GCSManagedConfig\022D\n\ngcs_prefix\030\001 \001(\0132*." - + "google.cloud.documentai.v1beta3.GcsPrefi" - + "xB\004\342A\001\002\032t\n\027DocumentWarehouseConfig\022\030\n\nco" - + "llection\030\001 \001(\tB\004\342A\001\003\022?\n\006schema\030\002 \001(\tB/\342A" - + "\001\003\372A(\n&contentwarehouse.googleapis.com/S" - + "chema\032\030\n\026UnmanagedDatasetConfig\032\027\n\025Spann" - + "erIndexingConfig\"T\n\005State\022\025\n\021STATE_UNSPE" - + "CIFIED\020\000\022\021\n\rUNINITIALIZED\020\001\022\020\n\014INITIALIZ" - + "ING\020\002\022\017\n\013INITIALIZED\020\003:n\352Ak\n!documentai." - + "googleapis.com/Dataset\022Fprojects/{projec" - + "t}/locations/{location}/processors/{proc" - + "essor}/datasetB\020\n\016storage_sourceB\021\n\017inde" - + "xing_source\"\362\001\n\rDatasetSchema\022\014\n\004name\030\001 " - + "\001(\t\022N\n\017document_schema\030\003 \001(\0132/.google.cl" - + "oud.documentai.v1beta3.DocumentSchemaB\004\342" - + "A\001\001:\202\001\352A\177\n\'documentai.googleapis.com/Dat" - + "asetSchema\022Tprojects/{project}/locations" - + "/{location}/processors/{processor}/datas" - + "et/datasetSchemaB\310\002\n#com.google.cloud.do" - + "cumentai.v1beta3B\014DatasetProtoP\001ZCcloud." - + "google.com/go/documentai/apiv1beta3/docu" - + "mentaipb;documentaipb\252\002\037Google.Cloud.Doc" - + "umentAI.V1Beta3\312\002\037Google\\Cloud\\DocumentA" - + "I\\V1beta3\352\002\"Google::Cloud::DocumentAI::V" - + "1beta3\352Ab\n&contentwarehouse.googleapis.c" - + "om/Schema\0228projects/{project}/locations/" - + "{location}/schemas/{schema}b\006proto3" + + "e/api/resource.proto\032.google/cloud/docum" + + "entai/v1beta3/document.proto\0321google/clo" + + "ud/documentai/v1beta3/document_io.proto\032" + + "5google/cloud/documentai/v1beta3/documen" + + "t_schema.proto\"\352\007\n\007Dataset\022]\n\022gcs_manage" + + "d_config\030\003 \001(\01329.google.cloud.documentai" + + ".v1beta3.Dataset.GCSManagedConfigB\004\342A\001\001H" + + "\000\022k\n\031document_warehouse_config\030\005 \001(\0132@.g" + + "oogle.cloud.documentai.v1beta3.Dataset.D" + + "ocumentWarehouseConfigB\004\342A\001\001H\000\022i\n\030unmana" + + "ged_dataset_config\030\006 \001(\0132?.google.cloud." + + "documentai.v1beta3.Dataset.UnmanagedData" + + "setConfigB\004\342A\001\001H\000\022g\n\027spanner_indexing_co" + + "nfig\030\004 \001(\0132>.google.cloud.documentai.v1b" + + "eta3.Dataset.SpannerIndexingConfigB\004\342A\001\001" + + "H\001\022\014\n\004name\030\001 \001(\t\022C\n\005state\030\002 \001(\0162..google" + + ".cloud.documentai.v1beta3.Dataset.StateB" + + "\004\342A\001\002\032X\n\020GCSManagedConfig\022D\n\ngcs_prefix\030" + + "\001 \001(\0132*.google.cloud.documentai.v1beta3." + + "GcsPrefixB\004\342A\001\002\032t\n\027DocumentWarehouseConf" + + "ig\022\030\n\ncollection\030\001 \001(\tB\004\342A\001\003\022?\n\006schema\030\002" + + " \001(\tB/\342A\001\003\372A(\n&contentwarehouse.googleap" + + "is.com/Schema\032\030\n\026UnmanagedDatasetConfig\032" + + "\027\n\025SpannerIndexingConfig\"T\n\005State\022\025\n\021STA" + + "TE_UNSPECIFIED\020\000\022\021\n\rUNINITIALIZED\020\001\022\020\n\014I" + + "NITIALIZING\020\002\022\017\n\013INITIALIZED\020\003:n\352Ak\n!doc" + + "umentai.googleapis.com/Dataset\022Fprojects" + + "/{project}/locations/{location}/processo" + + "rs/{processor}/datasetB\020\n\016storage_source" + + "B\021\n\017indexing_source\"\210\003\n\nDocumentId\022^\n\022gc" + + "s_managed_doc_id\030\001 \001(\0132@.google.cloud.do" + + "cumentai.v1beta3.DocumentId.GCSManagedDo" + + "cumentIdH\000\022[\n\020unmanaged_doc_id\030\004 \001(\0132?.g" + + "oogle.cloud.documentai.v1beta3.DocumentI" + + "d.UnmanagedDocumentIdH\000\022B\n\014revision_ref\030" + + "\003 \001(\0132,.google.cloud.documentai.v1beta3." + + "RevisionRef\032D\n\024GCSManagedDocumentId\022\025\n\007g" + + "cs_uri\030\001 \001(\tB\004\342A\001\002\022\025\n\tcw_doc_id\030\002 \001(\tB\002\030" + + "\001\032+\n\023UnmanagedDocumentId\022\024\n\006doc_id\030\001 \001(\t" + + "B\004\342A\001\002B\006\n\004type\"\362\001\n\rDatasetSchema\022\014\n\004name" + + "\030\001 \001(\t\022N\n\017document_schema\030\003 \001(\0132/.google" + + ".cloud.documentai.v1beta3.DocumentSchema" + + "B\004\342A\001\001:\202\001\352A\177\n\'documentai.googleapis.com/" + + "DatasetSchema\022Tprojects/{project}/locati" + + "ons/{location}/processors/{processor}/da" + + "taset/datasetSchema\"\210\002\n\025BatchDatasetDocu" + + "ments\022o\n\027individual_document_ids\030\001 \001(\0132L" + + ".google.cloud.documentai.v1beta3.BatchDa" + + "tasetDocuments.IndividualDocumentIdsH\000\022\020" + + "\n\006filter\030\002 \001(\tH\000\032`\n\025IndividualDocumentId" + + "s\022G\n\014document_ids\030\001 \003(\0132+.google.cloud.d" + + "ocumentai.v1beta3.DocumentIdB\004\342A\001\002B\n\n\010cr" + + "iteriaB\310\002\n#com.google.cloud.documentai.v" + + "1beta3B\014DatasetProtoP\001ZCcloud.google.com" + + "/go/documentai/apiv1beta3/documentaipb;d" + + "ocumentaipb\252\002\037Google.Cloud.DocumentAI.V1" + + "Beta3\312\002\037Google\\Cloud\\DocumentAI\\V1beta3\352" + + "\002\"Google::Cloud::DocumentAI::V1beta3\352Ab\n" + + "&contentwarehouse.googleapis.com/Schema\022" + + "8projects/{project}/locations/{location}" + + "/schemas/{schema}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -113,6 +151,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.documentai.v1beta3.DocumentProto.getDescriptor(), com.google.cloud.documentai.v1beta3.DocumentIoProto.getDescriptor(), com.google.cloud.documentai.v1beta3.DocumentAiDocumentSchema.getDescriptor(), }); @@ -159,14 +198,60 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1beta3_Dataset_SpannerIndexingConfig_descriptor, new java.lang.String[] {}); - internal_static_google_cloud_documentai_v1beta3_DatasetSchema_descriptor = + internal_static_google_cloud_documentai_v1beta3_DocumentId_descriptor = getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_documentai_v1beta3_DocumentId_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_DocumentId_descriptor, + new java.lang.String[] { + "GcsManagedDocId", "UnmanagedDocId", "RevisionRef", "Type", + }); + internal_static_google_cloud_documentai_v1beta3_DocumentId_GCSManagedDocumentId_descriptor = + internal_static_google_cloud_documentai_v1beta3_DocumentId_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_documentai_v1beta3_DocumentId_GCSManagedDocumentId_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_DocumentId_GCSManagedDocumentId_descriptor, + new java.lang.String[] { + "GcsUri", "CwDocId", + }); + internal_static_google_cloud_documentai_v1beta3_DocumentId_UnmanagedDocumentId_descriptor = + internal_static_google_cloud_documentai_v1beta3_DocumentId_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_documentai_v1beta3_DocumentId_UnmanagedDocumentId_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_DocumentId_UnmanagedDocumentId_descriptor, + new java.lang.String[] { + "DocId", + }); + internal_static_google_cloud_documentai_v1beta3_DatasetSchema_descriptor = + getDescriptor().getMessageTypes().get(2); internal_static_google_cloud_documentai_v1beta3_DatasetSchema_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1beta3_DatasetSchema_descriptor, new java.lang.String[] { "Name", "DocumentSchema", }); + internal_static_google_cloud_documentai_v1beta3_BatchDatasetDocuments_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_documentai_v1beta3_BatchDatasetDocuments_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_BatchDatasetDocuments_descriptor, + new java.lang.String[] { + "IndividualDocumentIds", "Filter", "Criteria", + }); + internal_static_google_cloud_documentai_v1beta3_BatchDatasetDocuments_IndividualDocumentIds_descriptor = + internal_static_google_cloud_documentai_v1beta3_BatchDatasetDocuments_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_documentai_v1beta3_BatchDatasetDocuments_IndividualDocumentIds_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_BatchDatasetDocuments_IndividualDocumentIds_descriptor, + new java.lang.String[] { + "DocumentIds", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); @@ -177,6 +262,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { descriptor, registry); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.documentai.v1beta3.DocumentProto.getDescriptor(); com.google.cloud.documentai.v1beta3.DocumentIoProto.getDescriptor(); com.google.cloud.documentai.v1beta3.DocumentAiDocumentSchema.getDescriptor(); } diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DatasetSplitType.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DatasetSplitType.java new file mode 100644 index 000000000000..6d8280a40cb7 --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DatasetSplitType.java @@ -0,0 +1,203 @@ +/* + * Copyright 2023 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_service.proto + +package com.google.cloud.documentai.v1beta3; + +/** + * + * + *
+ * Documents belonging to a dataset will be split into different groups
+ * referred to as splits: train, test.
+ * 
+ * + * Protobuf enum {@code google.cloud.documentai.v1beta3.DatasetSplitType} + */ +public enum DatasetSplitType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Default value if the enum is not set.
+   * go/protodosdonts#do-include-an-unspecified-value-in-an-enum
+   * 
+ * + * DATASET_SPLIT_TYPE_UNSPECIFIED = 0; + */ + DATASET_SPLIT_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * Identifies the train documents.
+   * 
+ * + * DATASET_SPLIT_TRAIN = 1; + */ + DATASET_SPLIT_TRAIN(1), + /** + * + * + *
+   * Identifies the test documents.
+   * 
+ * + * DATASET_SPLIT_TEST = 2; + */ + DATASET_SPLIT_TEST(2), + /** + * + * + *
+   * Identifies the unassigned documents.
+   * 
+ * + * DATASET_SPLIT_UNASSIGNED = 3; + */ + DATASET_SPLIT_UNASSIGNED(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Default value if the enum is not set.
+   * go/protodosdonts#do-include-an-unspecified-value-in-an-enum
+   * 
+ * + * DATASET_SPLIT_TYPE_UNSPECIFIED = 0; + */ + public static final int DATASET_SPLIT_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Identifies the train documents.
+   * 
+ * + * DATASET_SPLIT_TRAIN = 1; + */ + public static final int DATASET_SPLIT_TRAIN_VALUE = 1; + /** + * + * + *
+   * Identifies the test documents.
+   * 
+ * + * DATASET_SPLIT_TEST = 2; + */ + public static final int DATASET_SPLIT_TEST_VALUE = 2; + /** + * + * + *
+   * Identifies the unassigned documents.
+   * 
+ * + * DATASET_SPLIT_UNASSIGNED = 3; + */ + public static final int DATASET_SPLIT_UNASSIGNED_VALUE = 3; + + 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 DatasetSplitType 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 DatasetSplitType forNumber(int value) { + switch (value) { + case 0: + return DATASET_SPLIT_TYPE_UNSPECIFIED; + case 1: + return DATASET_SPLIT_TRAIN; + case 2: + return DATASET_SPLIT_TEST; + case 3: + return DATASET_SPLIT_UNASSIGNED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DatasetSplitType findValueByNumber(int number) { + return DatasetSplitType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final DatasetSplitType[] VALUES = values(); + + public static DatasetSplitType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DatasetSplitType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.documentai.v1beta3.DatasetSplitType) +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentAiDocumentService.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentAiDocumentService.java index 17e4d6cabb1f..f3262f9854f4 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentAiDocumentService.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentAiDocumentService.java @@ -35,6 +35,58 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_documentai_v1beta3_UpdateDatasetOperationMetadata_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_documentai_v1beta3_UpdateDatasetOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_ImportDocumentsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_ImportDocumentsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_ImportDocumentsRequest_BatchDocumentsImportConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_ImportDocumentsRequest_BatchDocumentsImportConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_ImportDocumentsRequest_BatchDocumentsImportConfig_AutoSplitConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_ImportDocumentsRequest_BatchDocumentsImportConfig_AutoSplitConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_ImportDocumentsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_ImportDocumentsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_ImportDocumentsMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_ImportDocumentsMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_ImportDocumentsMetadata_IndividualImportStatus_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_ImportDocumentsMetadata_IndividualImportStatus_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_ImportDocumentsMetadata_ImportConfigValidationResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_ImportDocumentsMetadata_ImportConfigValidationResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_GetDocumentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_GetDocumentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_GetDocumentResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_GetDocumentResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_BatchDeleteDocumentsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_BatchDeleteDocumentsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_BatchDeleteDocumentsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_BatchDeleteDocumentsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_BatchDeleteDocumentsMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_BatchDeleteDocumentsMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_BatchDeleteDocumentsMetadata_IndividualBatchDeleteStatus_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_BatchDeleteDocumentsMetadata_IndividualBatchDeleteStatus_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_documentai_v1beta3_GetDatasetSchemaRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -43,6 +95,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_documentai_v1beta3_UpdateDatasetSchemaRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_documentai_v1beta3_UpdateDatasetSchemaRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_DocumentPageRange_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_DocumentPageRange_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -58,51 +114,134 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\027google/api/client.proto\032\037google/api/fie" + "ld_behavior.proto\032\031google/api/resource.p" + "roto\032-google/cloud/documentai/v1beta3/da" - + "taset.proto\0328google/cloud/documentai/v1b" - + "eta3/operation_metadata.proto\032#google/lo" - + "ngrunning/operations.proto\032 google/proto" - + "buf/field_mask.proto\"\210\001\n\024UpdateDatasetRe" - + "quest\022?\n\007dataset\030\001 \001(\0132(.google.cloud.do" - + "cumentai.v1beta3.DatasetB\004\342A\001\002\022/\n\013update" - + "_mask\030\002 \001(\0132\032.google.protobuf.FieldMask\"" - + "s\n\036UpdateDatasetOperationMetadata\022Q\n\017com" - + "mon_metadata\030\001 \001(\01328.google.cloud.docume" - + "ntai.v1beta3.CommonOperationMetadata\"v\n\027" - + "GetDatasetSchemaRequest\022>\n\004name\030\001 \001(\tB0\342" - + "A\001\002\372A)\n\'documentai.googleapis.com/Datase" - + "tSchema\022\033\n\023visible_fields_only\030\002 \001(\010\"\233\001\n" - + "\032UpdateDatasetSchemaRequest\022L\n\016dataset_s" - + "chema\030\001 \001(\0132..google.cloud.documentai.v1" - + "beta3.DatasetSchemaB\004\342A\001\002\022/\n\013update_mask" - + "\030\002 \001(\0132\032.google.protobuf.FieldMask2\317\006\n\017D" - + "ocumentService\022\376\001\n\rUpdateDataset\0225.googl" - + "e.cloud.documentai.v1beta3.UpdateDataset" - + "Request\032\035.google.longrunning.Operation\"\226" - + "\001\312A)\n\007Dataset\022\036UpdateDatasetOperationMet" - + "adata\332A\023dataset,update_mask\202\323\344\223\002N2C/v1be" - + "ta3/{dataset.name=projects/*/locations/*" - + "/processors/*/dataset}:\007dataset\022\326\001\n\020GetD" - + "atasetSchema\0228.google.cloud.documentai.v" - + "1beta3.GetDatasetSchemaRequest\032..google." - + "cloud.documentai.v1beta3.DatasetSchema\"X" - + "\332A\004name\202\323\344\223\002K\022I/v1beta3/{name=projects/*" + + "taset.proto\032.google/cloud/documentai/v1b" + + "eta3/document.proto\0321google/cloud/docume" + + "ntai/v1beta3/document_io.proto\0328google/c" + + "loud/documentai/v1beta3/operation_metada" + + "ta.proto\032#google/longrunning/operations." + + "proto\032 google/protobuf/field_mask.proto\032" + + "\027google/rpc/status.proto\"\210\001\n\024UpdateDatas" + + "etRequest\022?\n\007dataset\030\001 \001(\0132(.google.clou" + + "d.documentai.v1beta3.DatasetB\004\342A\001\002\022/\n\013up" + + "date_mask\030\002 \001(\0132\032.google.protobuf.FieldM" + + "ask\"s\n\036UpdateDatasetOperationMetadata\022Q\n" + + "\017common_metadata\030\001 \001(\01328.google.cloud.do" + + "cumentai.v1beta3.CommonOperationMetadata" + + "\"\342\004\n\026ImportDocumentsRequest\022;\n\007dataset\030\001" + + " \001(\tB*\342A\001\002\372A#\n!documentai.googleapis.com" + + "/Dataset\022\200\001\n\036batch_documents_import_conf" + + "igs\030\004 \003(\0132R.google.cloud.documentai.v1be" + + "ta3.ImportDocumentsRequest.BatchDocument" + + "sImportConfigB\004\342A\001\002\032\207\003\n\032BatchDocumentsIm" + + "portConfig\022J\n\rdataset_split\030\002 \001(\01621.goog" + + "le.cloud.documentai.v1beta3.DatasetSplit" + + "TypeH\000\022\177\n\021auto_split_config\030\003 \001(\0132b.goog" + + "le.cloud.documentai.v1beta3.ImportDocume" + + "ntsRequest.BatchDocumentsImportConfig.Au" + + "toSplitConfigH\000\022V\n\022batch_input_config\030\001 " + + "\001(\0132:.google.cloud.documentai.v1beta3.Ba" + + "tchDocumentsInputConfig\032/\n\017AutoSplitConf" + + "ig\022\034\n\024training_split_ratio\030\001 \001(\002B\023\n\021spli" + + "t_type_config\"\031\n\027ImportDocumentsResponse" + + "\"\200\005\n\027ImportDocumentsMetadata\022Q\n\017common_m" + + "etadata\030\001 \001(\01328.google.cloud.documentai." + + "v1beta3.CommonOperationMetadata\022s\n\032indiv" + + "idual_import_statuses\030\002 \003(\0132O.google.clo" + + "ud.documentai.v1beta3.ImportDocumentsMet" + + "adata.IndividualImportStatus\022\177\n import_c" + + "onfig_validation_results\030\004 \003(\0132U.google." + + "cloud.documentai.v1beta3.ImportDocuments" + + "Metadata.ImportConfigValidationResult\022\034\n" + + "\024total_document_count\030\003 \001(\005\032\237\001\n\026Individu" + + "alImportStatus\022\030\n\020input_gcs_source\030\001 \001(\t" + + "\022\"\n\006status\030\002 \001(\0132\022.google.rpc.Status\022G\n\022" + + "output_document_id\030\004 \001(\0132+.google.cloud." + + "documentai.v1beta3.DocumentId\032\\\n\034ImportC" + + "onfigValidationResult\022\030\n\020input_gcs_sourc" + + "e\030\001 \001(\t\022\"\n\006status\030\002 \001(\0132\022.google.rpc.Sta" + + "tus\"\220\002\n\022GetDocumentRequest\022;\n\007dataset\030\001 " + + "\001(\tB*\342A\001\002\372A#\n!documentai.googleapis.com/" + + "Dataset\022F\n\013document_id\030\002 \001(\0132+.google.cl" + + "oud.documentai.v1beta3.DocumentIdB\004\342A\001\002\022" + + "-\n\tread_mask\030\003 \001(\0132\032.google.protobuf.Fie" + + "ldMask\022F\n\npage_range\030\004 \001(\01322.google.clou" + + "d.documentai.v1beta3.DocumentPageRange\"R" + + "\n\023GetDocumentResponse\022;\n\010document\030\001 \001(\0132" + + ").google.cloud.documentai.v1beta3.Docume" + + "nt\"\215\001\n\033BatchDeleteDocumentsRequest\022\025\n\007da" + + "taset\030\001 \001(\tB\004\342A\001\002\022W\n\021dataset_documents\030\003" + + " \001(\01326.google.cloud.documentai.v1beta3.B" + + "atchDatasetDocumentsB\004\342A\001\002\"\036\n\034BatchDelet" + + "eDocumentsResponse\"\271\003\n\034BatchDeleteDocume" + + "ntsMetadata\022Q\n\017common_metadata\030\001 \001(\01328.g" + + "oogle.cloud.documentai.v1beta3.CommonOpe" + + "rationMetadata\022\203\001\n individual_batch_dele" + + "te_statuses\030\002 \003(\0132Y.google.cloud.documen" + + "tai.v1beta3.BatchDeleteDocumentsMetadata" + + ".IndividualBatchDeleteStatus\022\034\n\024total_do" + + "cument_count\030\003 \001(\005\022\034\n\024error_document_cou" + + "nt\030\004 \001(\005\032\203\001\n\033IndividualBatchDeleteStatus" + + "\022@\n\013document_id\030\001 \001(\0132+.google.cloud.doc" + + "umentai.v1beta3.DocumentId\022\"\n\006status\030\002 \001" + + "(\0132\022.google.rpc.Status\"v\n\027GetDatasetSche" + + "maRequest\022>\n\004name\030\001 \001(\tB0\342A\001\002\372A)\n\'docume" + + "ntai.googleapis.com/DatasetSchema\022\033\n\023vis" + + "ible_fields_only\030\002 \001(\010\"\233\001\n\032UpdateDataset" + + "SchemaRequest\022L\n\016dataset_schema\030\001 \001(\0132.." + + "google.cloud.documentai.v1beta3.DatasetS" + + "chemaB\004\342A\001\002\022/\n\013update_mask\030\002 \001(\0132\032.googl" + + "e.protobuf.FieldMask\"/\n\021DocumentPageRang" + + "e\022\r\n\005start\030\001 \001(\005\022\013\n\003end\030\002 \001(\005*\205\001\n\020Datase" + + "tSplitType\022\"\n\036DATASET_SPLIT_TYPE_UNSPECI" + + "FIED\020\000\022\027\n\023DATASET_SPLIT_TRAIN\020\001\022\026\n\022DATAS" + + "ET_SPLIT_TEST\020\002\022\034\n\030DATASET_SPLIT_UNASSIG" + + "NED\020\0032\317\014\n\017DocumentService\022\376\001\n\rUpdateData" + + "set\0225.google.cloud.documentai.v1beta3.Up" + + "dateDatasetRequest\032\035.google.longrunning." + + "Operation\"\226\001\312A)\n\007Dataset\022\036UpdateDatasetO" + + "perationMetadata\332A\023dataset,update_mask\202\323" + + "\344\223\002N2C/v1beta3/{dataset.name=projects/*/" + + "locations/*/processors/*/dataset}:\007datas" + + "et\022\204\002\n\017ImportDocuments\0227.google.cloud.do" + + "cumentai.v1beta3.ImportDocumentsRequest\032" + + "\035.google.longrunning.Operation\"\230\001\312A2\n\027Im" + + "portDocumentsResponse\022\027ImportDocumentsMe" + + "tadata\332A\007dataset\202\323\344\223\002S\"N/v1beta3/{datase" + + "t=projects/*/locations/*/processors/*/da" + + "taset}:importDocuments:\001*\022\326\001\n\013GetDocumen" + + "t\0223.google.cloud.documentai.v1beta3.GetD" + + "ocumentRequest\0324.google.cloud.documentai" + + ".v1beta3.GetDocumentResponse\"\\\332A\007dataset" + + "\202\323\344\223\002L\022J/v1beta3/{dataset=projects/*/loc" + + "ations/*/processors/*/dataset}:getDocume" + + "nt\022\235\002\n\024BatchDeleteDocuments\022<.google.clo" + + "ud.documentai.v1beta3.BatchDeleteDocumen" + + "tsRequest\032\035.google.longrunning.Operation" + + "\"\247\001\312A<\n\034BatchDeleteDocumentsResponse\022\034Ba" + + "tchDeleteDocumentsMetadata\332A\007dataset\202\323\344\223" + + "\002X\"S/v1beta3/{dataset=projects/*/locatio" + + "ns/*/processors/*/dataset}:batchDeleteDo" + + "cuments:\001*\022\326\001\n\020GetDatasetSchema\0228.google" + + ".cloud.documentai.v1beta3.GetDatasetSche" + + "maRequest\032..google.cloud.documentai.v1be" + + "ta3.DatasetSchema\"X\332A\004name\202\323\344\223\002K\022I/v1bet" + + "a3/{name=projects/*/locations/*/processo" + + "rs/*/dataset/datasetSchema}\022\222\002\n\023UpdateDa" + + "tasetSchema\022;.google.cloud.documentai.v1" + + "beta3.UpdateDatasetSchemaRequest\032..googl" + + "e.cloud.documentai.v1beta3.DatasetSchema" + + "\"\215\001\332A\032dataset_schema,update_mask\202\323\344\223\002j2X" + + "/v1beta3/{dataset_schema.name=projects/*" + "/locations/*/processors/*/dataset/datase" - + "tSchema}\022\222\002\n\023UpdateDatasetSchema\022;.googl" - + "e.cloud.documentai.v1beta3.UpdateDataset" - + "SchemaRequest\032..google.cloud.documentai." - + "v1beta3.DatasetSchema\"\215\001\332A\032dataset_schem" - + "a,update_mask\202\323\344\223\002j2X/v1beta3/{dataset_s" - + "chema.name=projects/*/locations/*/proces" - + "sors/*/dataset/datasetSchema}:\016dataset_s" - + "chema\032M\312A\031documentai.googleapis.com\322A.ht" - + "tps://www.googleapis.com/auth/cloud-plat" - + "formB\360\001\n#com.google.cloud.documentai.v1b" - + "eta3B\031DocumentAiDocumentServiceP\001ZCcloud" - + ".google.com/go/documentai/apiv1beta3/doc" - + "umentaipb;documentaipb\252\002\037Google.Cloud.Do" - + "cumentAI.V1Beta3\312\002\037Google\\Cloud\\Document" - + "AI\\V1beta3\352\002\"Google::Cloud::DocumentAI::" - + "V1beta3b\006proto3" + + "tSchema}:\016dataset_schema\032M\312A\031documentai." + + "googleapis.com\322A.https://www.googleapis." + + "com/auth/cloud-platformB\360\001\n#com.google.c" + + "loud.documentai.v1beta3B\031DocumentAiDocum" + + "entServiceP\001ZCcloud.google.com/go/docume" + + "ntai/apiv1beta3/documentaipb;documentaip" + + "b\252\002\037Google.Cloud.DocumentAI.V1Beta3\312\002\037Go" + + "ogle\\Cloud\\DocumentAI\\V1beta3\352\002\"Google::" + + "Cloud::DocumentAI::V1beta3b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -113,9 +252,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), com.google.cloud.documentai.v1beta3.DatasetProto.getDescriptor(), + com.google.cloud.documentai.v1beta3.DocumentProto.getDescriptor(), + com.google.cloud.documentai.v1beta3.DocumentIoProto.getDescriptor(), com.google.cloud.documentai.v1beta3.OperationMetadataProto.getDescriptor(), com.google.longrunning.OperationsProto.getDescriptor(), com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), }); internal_static_google_cloud_documentai_v1beta3_UpdateDatasetRequest_descriptor = getDescriptor().getMessageTypes().get(0); @@ -133,8 +275,124 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "CommonMetadata", }); - internal_static_google_cloud_documentai_v1beta3_GetDatasetSchemaRequest_descriptor = + internal_static_google_cloud_documentai_v1beta3_ImportDocumentsRequest_descriptor = getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_documentai_v1beta3_ImportDocumentsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_ImportDocumentsRequest_descriptor, + new java.lang.String[] { + "Dataset", "BatchDocumentsImportConfigs", + }); + internal_static_google_cloud_documentai_v1beta3_ImportDocumentsRequest_BatchDocumentsImportConfig_descriptor = + internal_static_google_cloud_documentai_v1beta3_ImportDocumentsRequest_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_documentai_v1beta3_ImportDocumentsRequest_BatchDocumentsImportConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_ImportDocumentsRequest_BatchDocumentsImportConfig_descriptor, + new java.lang.String[] { + "DatasetSplit", "AutoSplitConfig", "BatchInputConfig", "SplitTypeConfig", + }); + internal_static_google_cloud_documentai_v1beta3_ImportDocumentsRequest_BatchDocumentsImportConfig_AutoSplitConfig_descriptor = + internal_static_google_cloud_documentai_v1beta3_ImportDocumentsRequest_BatchDocumentsImportConfig_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_documentai_v1beta3_ImportDocumentsRequest_BatchDocumentsImportConfig_AutoSplitConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_ImportDocumentsRequest_BatchDocumentsImportConfig_AutoSplitConfig_descriptor, + new java.lang.String[] { + "TrainingSplitRatio", + }); + internal_static_google_cloud_documentai_v1beta3_ImportDocumentsResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_documentai_v1beta3_ImportDocumentsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_ImportDocumentsResponse_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_documentai_v1beta3_ImportDocumentsMetadata_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_documentai_v1beta3_ImportDocumentsMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_ImportDocumentsMetadata_descriptor, + new java.lang.String[] { + "CommonMetadata", + "IndividualImportStatuses", + "ImportConfigValidationResults", + "TotalDocumentCount", + }); + internal_static_google_cloud_documentai_v1beta3_ImportDocumentsMetadata_IndividualImportStatus_descriptor = + internal_static_google_cloud_documentai_v1beta3_ImportDocumentsMetadata_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_documentai_v1beta3_ImportDocumentsMetadata_IndividualImportStatus_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_ImportDocumentsMetadata_IndividualImportStatus_descriptor, + new java.lang.String[] { + "InputGcsSource", "Status", "OutputDocumentId", + }); + internal_static_google_cloud_documentai_v1beta3_ImportDocumentsMetadata_ImportConfigValidationResult_descriptor = + internal_static_google_cloud_documentai_v1beta3_ImportDocumentsMetadata_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_documentai_v1beta3_ImportDocumentsMetadata_ImportConfigValidationResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_ImportDocumentsMetadata_ImportConfigValidationResult_descriptor, + new java.lang.String[] { + "InputGcsSource", "Status", + }); + internal_static_google_cloud_documentai_v1beta3_GetDocumentRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_documentai_v1beta3_GetDocumentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_GetDocumentRequest_descriptor, + new java.lang.String[] { + "Dataset", "DocumentId", "ReadMask", "PageRange", + }); + internal_static_google_cloud_documentai_v1beta3_GetDocumentResponse_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_documentai_v1beta3_GetDocumentResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_GetDocumentResponse_descriptor, + new java.lang.String[] { + "Document", + }); + internal_static_google_cloud_documentai_v1beta3_BatchDeleteDocumentsRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_documentai_v1beta3_BatchDeleteDocumentsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_BatchDeleteDocumentsRequest_descriptor, + new java.lang.String[] { + "Dataset", "DatasetDocuments", + }); + internal_static_google_cloud_documentai_v1beta3_BatchDeleteDocumentsResponse_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_documentai_v1beta3_BatchDeleteDocumentsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_BatchDeleteDocumentsResponse_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_documentai_v1beta3_BatchDeleteDocumentsMetadata_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_documentai_v1beta3_BatchDeleteDocumentsMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_BatchDeleteDocumentsMetadata_descriptor, + new java.lang.String[] { + "CommonMetadata", + "IndividualBatchDeleteStatuses", + "TotalDocumentCount", + "ErrorDocumentCount", + }); + internal_static_google_cloud_documentai_v1beta3_BatchDeleteDocumentsMetadata_IndividualBatchDeleteStatus_descriptor = + internal_static_google_cloud_documentai_v1beta3_BatchDeleteDocumentsMetadata_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_documentai_v1beta3_BatchDeleteDocumentsMetadata_IndividualBatchDeleteStatus_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_BatchDeleteDocumentsMetadata_IndividualBatchDeleteStatus_descriptor, + new java.lang.String[] { + "DocumentId", "Status", + }); + internal_static_google_cloud_documentai_v1beta3_GetDatasetSchemaRequest_descriptor = + getDescriptor().getMessageTypes().get(10); internal_static_google_cloud_documentai_v1beta3_GetDatasetSchemaRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1beta3_GetDatasetSchemaRequest_descriptor, @@ -142,13 +400,21 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "VisibleFieldsOnly", }); internal_static_google_cloud_documentai_v1beta3_UpdateDatasetSchemaRequest_descriptor = - getDescriptor().getMessageTypes().get(3); + getDescriptor().getMessageTypes().get(11); internal_static_google_cloud_documentai_v1beta3_UpdateDatasetSchemaRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1beta3_UpdateDatasetSchemaRequest_descriptor, new java.lang.String[] { "DatasetSchema", "UpdateMask", }); + internal_static_google_cloud_documentai_v1beta3_DocumentPageRange_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_documentai_v1beta3_DocumentPageRange_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_DocumentPageRange_descriptor, + new java.lang.String[] { + "Start", "End", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); @@ -165,9 +431,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); com.google.cloud.documentai.v1beta3.DatasetProto.getDescriptor(); + com.google.cloud.documentai.v1beta3.DocumentProto.getDescriptor(); + com.google.cloud.documentai.v1beta3.DocumentIoProto.getDescriptor(); com.google.cloud.documentai.v1beta3.OperationMetadataProto.getDescriptor(); com.google.longrunning.OperationsProto.getDescriptor(); com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentAiProcessor.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentAiProcessor.java index 9e4cae0afd81..942690943f3c 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentAiProcessor.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentAiProcessor.java @@ -55,7 +55,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "umentai/v1beta3/document_schema.proto\0320g" + "oogle/cloud/documentai/v1beta3/evaluatio" + "n.proto\032\037google/protobuf/timestamp.proto" - + "\"\304\007\n\020ProcessorVersion\022\014\n\004name\030\001 \001(\t\022\024\n\014d" + + "\"\312\007\n\020ProcessorVersion\022\014\n\004name\030\001 \001(\t\022\024\n\014d" + "isplay_name\030\002 \001(\t\022H\n\017document_schema\030\014 \001" + "(\0132/.google.cloud.documentai.v1beta3.Doc" + "umentSchema\022F\n\005state\030\006 \001(\01627.google.clou" @@ -64,42 +64,42 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "uf.Timestamp\022O\n\021latest_evaluation\030\010 \001(\0132" + "4.google.cloud.documentai.v1beta3.Evalua" + "tionReference\022\024\n\014kms_key_name\030\t \001(\t\022\034\n\024k" - + "ms_key_version_name\030\n \001(\t\022\026\n\016google_mana" - + "ged\030\013 \001(\010\022[\n\020deprecation_info\030\r \001(\0132A.go" - + "ogle.cloud.documentai.v1beta3.ProcessorV" - + "ersion.DeprecationInfo\032\237\001\n\017DeprecationIn" - + "fo\0224\n\020deprecation_time\030\001 \001(\0132\032.google.pr" - + "otobuf.Timestamp\022V\n\035replacement_processo" - + "r_version\030\002 \001(\tB/\372A,\n*documentai.googlea" - + "pis.com/ProcessorVersion\"\223\001\n\005State\022\025\n\021ST" - + "ATE_UNSPECIFIED\020\000\022\014\n\010DEPLOYED\020\001\022\r\n\tDEPLO" - + "YING\020\002\022\016\n\nUNDEPLOYED\020\003\022\017\n\013UNDEPLOYING\020\004\022" - + "\014\n\010CREATING\020\005\022\014\n\010DELETING\020\006\022\n\n\006FAILED\020\007\022" - + "\r\n\tIMPORTING\020\010:\226\001\352A\222\001\n*documentai.google" - + "apis.com/ProcessorVersion\022dprojects/{pro" - + "ject}/locations/{location}/processors/{p" - + "rocessor}/processorVersions/{processor_v" - + "ersion}\"\261\004\n\tProcessor\022\023\n\004name\030\001 \001(\tB\005\342A\002" - + "\005\003\022\014\n\004type\030\002 \001(\t\022\024\n\014display_name\030\003 \001(\t\022E" - + "\n\005state\030\004 \001(\01620.google.cloud.documentai." - + "v1beta3.Processor.StateB\004\342A\001\003\022R\n\031default" - + "_processor_version\030\t \001(\tB/\372A,\n*documenta" - + "i.googleapis.com/ProcessorVersion\022\037\n\020pro" - + "cess_endpoint\030\006 \001(\tB\005\342A\002\003\005\022/\n\013create_tim" - + "e\030\007 \001(\0132\032.google.protobuf.Timestamp\022\024\n\014k" - + "ms_key_name\030\010 \001(\t\"~\n\005State\022\025\n\021STATE_UNSP" - + "ECIFIED\020\000\022\013\n\007ENABLED\020\001\022\014\n\010DISABLED\020\002\022\014\n\010" - + "ENABLING\020\003\022\r\n\tDISABLING\020\004\022\014\n\010CREATING\020\005\022" - + "\n\n\006FAILED\020\006\022\014\n\010DELETING\020\007:h\352Ae\n#document" - + "ai.googleapis.com/Processor\022>projects/{p" - + "roject}/locations/{location}/processors/" - + "{processor}B\352\001\n#com.google.cloud.documen" - + "tai.v1beta3B\023DocumentAiProcessorP\001ZCclou" - + "d.google.com/go/documentai/apiv1beta3/do" - + "cumentaipb;documentaipb\252\002\037Google.Cloud.D" - + "ocumentAI.V1Beta3\312\002\037Google\\Cloud\\Documen" - + "tAI\\V1beta3\352\002\"Google::Cloud::DocumentAI:" - + ":V1beta3b\006proto3" + + "ms_key_version_name\030\n \001(\t\022\034\n\016google_mana" + + "ged\030\013 \001(\010B\004\342A\001\003\022[\n\020deprecation_info\030\r \001(" + + "\0132A.google.cloud.documentai.v1beta3.Proc" + + "essorVersion.DeprecationInfo\032\237\001\n\017Depreca" + + "tionInfo\0224\n\020deprecation_time\030\001 \001(\0132\032.goo" + + "gle.protobuf.Timestamp\022V\n\035replacement_pr" + + "ocessor_version\030\002 \001(\tB/\372A,\n*documentai.g" + + "oogleapis.com/ProcessorVersion\"\223\001\n\005State" + + "\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n\010DEPLOYED\020\001\022\r\n" + + "\tDEPLOYING\020\002\022\016\n\nUNDEPLOYED\020\003\022\017\n\013UNDEPLOY" + + "ING\020\004\022\014\n\010CREATING\020\005\022\014\n\010DELETING\020\006\022\n\n\006FAI" + + "LED\020\007\022\r\n\tIMPORTING\020\010:\226\001\352A\222\001\n*documentai." + + "googleapis.com/ProcessorVersion\022dproject" + + "s/{project}/locations/{location}/process" + + "ors/{processor}/processorVersions/{proce" + + "ssor_version}\"\261\004\n\tProcessor\022\023\n\004name\030\001 \001(" + + "\tB\005\342A\002\005\003\022\014\n\004type\030\002 \001(\t\022\024\n\014display_name\030\003" + + " \001(\t\022E\n\005state\030\004 \001(\01620.google.cloud.docum" + + "entai.v1beta3.Processor.StateB\004\342A\001\003\022R\n\031d" + + "efault_processor_version\030\t \001(\tB/\372A,\n*doc" + + "umentai.googleapis.com/ProcessorVersion\022" + + "\037\n\020process_endpoint\030\006 \001(\tB\005\342A\002\003\005\022/\n\013crea" + + "te_time\030\007 \001(\0132\032.google.protobuf.Timestam" + + "p\022\024\n\014kms_key_name\030\010 \001(\t\"~\n\005State\022\025\n\021STAT" + + "E_UNSPECIFIED\020\000\022\013\n\007ENABLED\020\001\022\014\n\010DISABLED" + + "\020\002\022\014\n\010ENABLING\020\003\022\r\n\tDISABLING\020\004\022\014\n\010CREAT" + + "ING\020\005\022\n\n\006FAILED\020\006\022\014\n\010DELETING\020\007:h\352Ae\n#do" + + "cumentai.googleapis.com/Processor\022>proje" + + "cts/{project}/locations/{location}/proce" + + "ssors/{processor}B\352\001\n#com.google.cloud.d" + + "ocumentai.v1beta3B\023DocumentAiProcessorP\001" + + "ZCcloud.google.com/go/documentai/apiv1be" + + "ta3/documentaipb;documentaipb\252\002\037Google.C" + + "loud.DocumentAI.V1Beta3\312\002\037Google\\Cloud\\D" + + "ocumentAI\\V1beta3\352\002\"Google::Cloud::Docum" + + "entAI::V1beta3b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentAiProcessorService.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentAiProcessorService.java index 863ec784bfb2..a38b1321c629 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentAiProcessorService.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentAiProcessorService.java @@ -292,399 +292,401 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\037google/protobuf/timestamp.proto\032\027google" + "/rpc/status.proto\"P\n\016ProcessOptions\022>\n\no" + "cr_config\030\001 \001(\0132*.google.cloud.documenta" - + "i.v1beta3.OcrConfig\"\226\003\n\016ProcessRequest\022D" + + "i.v1beta3.OcrConfig\"\334\003\n\016ProcessRequest\022D" + "\n\017inline_document\030\004 \001(\0132).google.cloud.d" + "ocumentai.v1beta3.DocumentH\000\022D\n\014raw_docu" + "ment\030\005 \001(\0132,.google.cloud.documentai.v1b" - + "eta3.RawDocumentH\000\022\030\n\004name\030\001 \001(\tB\n\342A\001\002\372A" - + "\003\n\001*\022?\n\010document\030\002 \001(\0132).google.cloud.do" - + "cumentai.v1beta3.DocumentB\002\030\001\022\031\n\021skip_hu" - + "man_review\030\003 \001(\010\022.\n\nfield_mask\030\006 \001(\0132\032.g" - + "oogle.protobuf.FieldMask\022H\n\017process_opti" - + "ons\030\007 \001(\0132/.google.cloud.documentai.v1be" - + "ta3.ProcessOptionsB\010\n\006source\"\363\001\n\021HumanRe" - + "viewStatus\022G\n\005state\030\001 \001(\01628.google.cloud" - + ".documentai.v1beta3.HumanReviewStatus.St" - + "ate\022\025\n\rstate_message\030\002 \001(\t\022\036\n\026human_revi" - + "ew_operation\030\003 \001(\t\"^\n\005State\022\025\n\021STATE_UNS" - + "PECIFIED\020\000\022\013\n\007SKIPPED\020\001\022\025\n\021VALIDATION_PA" - + "SSED\020\002\022\017\n\013IN_PROGRESS\020\003\022\t\n\005ERROR\020\004\"\303\001\n\017P" - + "rocessResponse\022;\n\010document\030\001 \001(\0132).googl" - + "e.cloud.documentai.v1beta3.Document\022\"\n\026h" - + "uman_review_operation\030\002 \001(\tB\002\030\001\022O\n\023human" - + "_review_status\030\003 \001(\01322.google.cloud.docu" - + "mentai.v1beta3.HumanReviewStatus\"\366\004\n\023Bat" - + "chProcessRequest\022\030\n\004name\030\001 \001(\tB\n\342A\001\002\372A\003\n" - + "\001*\022`\n\rinput_configs\030\002 \003(\0132E.google.cloud" - + ".documentai.v1beta3.BatchProcessRequest." - + "BatchInputConfigB\002\030\001\022a\n\routput_config\030\003 " - + "\001(\0132F.google.cloud.documentai.v1beta3.Ba" - + "tchProcessRequest.BatchOutputConfigB\002\030\001\022" - + "S\n\017input_documents\030\005 \001(\0132:.google.cloud." - + "documentai.v1beta3.BatchDocumentsInputCo" - + "nfig\022U\n\026document_output_config\030\006 \001(\01325.g" - + "oogle.cloud.documentai.v1beta3.DocumentO" - + "utputConfig\022\031\n\021skip_human_review\030\004 \001(\010\022H" - + "\n\017process_options\030\007 \001(\0132/.google.cloud.d" - + "ocumentai.v1beta3.ProcessOptions\032=\n\020Batc" - + "hInputConfig\022\022\n\ngcs_source\030\001 \001(\t\022\021\n\tmime" - + "_type\030\002 \001(\t:\002\030\001\0320\n\021BatchOutputConfig\022\027\n\017" - + "gcs_destination\030\001 \001(\t:\002\030\001\"\026\n\024BatchProces" - + "sResponse\"\262\005\n\024BatchProcessMetadata\022J\n\005st" - + "ate\030\001 \001(\0162;.google.cloud.documentai.v1be" - + "ta3.BatchProcessMetadata.State\022\025\n\rstate_" - + "message\030\002 \001(\t\022/\n\013create_time\030\003 \001(\0132\032.goo" - + "gle.protobuf.Timestamp\022/\n\013update_time\030\004 " - + "\001(\0132\032.google.protobuf.Timestamp\022r\n\033indiv" - + "idual_process_statuses\030\005 \003(\0132M.google.cl" - + "oud.documentai.v1beta3.BatchProcessMetad" - + "ata.IndividualProcessStatus\032\354\001\n\027Individu" - + "alProcessStatus\022\030\n\020input_gcs_source\030\001 \001(" - + "\t\022\"\n\006status\030\002 \001(\0132\022.google.rpc.Status\022\036\n" - + "\026output_gcs_destination\030\003 \001(\t\022\"\n\026human_r" - + "eview_operation\030\004 \001(\tB\002\030\001\022O\n\023human_revie" - + "w_status\030\005 \001(\01322.google.cloud.documentai" - + ".v1beta3.HumanReviewStatus\"r\n\005State\022\025\n\021S" - + "TATE_UNSPECIFIED\020\000\022\013\n\007WAITING\020\001\022\013\n\007RUNNI" - + "NG\020\002\022\r\n\tSUCCEEDED\020\003\022\016\n\nCANCELLING\020\004\022\r\n\tC" - + "ANCELLED\020\005\022\n\n\006FAILED\020\006\"^\n\032FetchProcessor" - + "TypesRequest\022@\n\006parent\030\001 \001(\tB0\342A\001\002\372A)\022\'d" - + "ocumentai.googleapis.com/ProcessorType\"f" - + "\n\033FetchProcessorTypesResponse\022G\n\017process" - + "or_types\030\001 \003(\0132..google.cloud.documentai" - + ".v1beta3.ProcessorType\"\204\001\n\031ListProcessor" - + "TypesRequest\022@\n\006parent\030\001 \001(\tB0\342A\001\002\372A)\022\'d" - + "ocumentai.googleapis.com/ProcessorType\022\021" - + "\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"~\n" - + "\032ListProcessorTypesResponse\022G\n\017processor" - + "_types\030\001 \003(\0132..google.cloud.documentai.v" - + "1beta3.ProcessorType\022\027\n\017next_page_token\030" - + "\002 \001(\t\"|\n\025ListProcessorsRequest\022<\n\006parent" - + "\030\001 \001(\tB,\342A\001\002\372A%\022#documentai.googleapis.c" - + "om/Processor\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_" - + "token\030\003 \001(\t\"q\n\026ListProcessorsResponse\022>\n" - + "\nprocessors\030\001 \003(\0132*.google.cloud.documen" - + "tai.v1beta3.Processor\022\027\n\017next_page_token" - + "\030\002 \001(\t\"Y\n\027GetProcessorTypeRequest\022>\n\004nam" - + "e\030\001 \001(\tB0\342A\001\002\372A)\n\'documentai.googleapis." - + "com/ProcessorType\"Q\n\023GetProcessorRequest" - + "\022:\n\004name\030\001 \001(\tB,\342A\001\002\372A%\n#documentai.goog" - + "leapis.com/Processor\"_\n\032GetProcessorVers" - + "ionRequest\022A\n\004name\030\001 \001(\tB3\342A\001\002\372A,\n*docum" - + "entai.googleapis.com/ProcessorVersion\"\212\001" - + "\n\034ListProcessorVersionsRequest\022C\n\006parent" - + "\030\001 \001(\tB3\342A\001\002\372A,\022*documentai.googleapis.c" - + "om/ProcessorVersion\022\021\n\tpage_size\030\002 \001(\005\022\022" - + "\n\npage_token\030\003 \001(\t\"\207\001\n\035ListProcessorVers" - + "ionsResponse\022M\n\022processor_versions\030\001 \003(\013" - + "21.google.cloud.documentai.v1beta3.Proce" - + "ssorVersion\022\027\n\017next_page_token\030\002 \001(\t\"b\n\035" - + "DeleteProcessorVersionRequest\022A\n\004name\030\001 " - + "\001(\tB3\342A\001\002\372A,\n*documentai.googleapis.com/" - + "ProcessorVersion\"s\n\036DeleteProcessorVersi" - + "onMetadata\022Q\n\017common_metadata\030\001 \001(\01328.go" - + "ogle.cloud.documentai.v1beta3.CommonOper" - + "ationMetadata\"b\n\035DeployProcessorVersionR" - + "equest\022A\n\004name\030\001 \001(\tB3\342A\001\002\372A,\n*documenta" - + "i.googleapis.com/ProcessorVersion\" \n\036Dep" - + "loyProcessorVersionResponse\"s\n\036DeployPro" - + "cessorVersionMetadata\022Q\n\017common_metadata" - + "\030\001 \001(\01328.google.cloud.documentai.v1beta3" - + ".CommonOperationMetadata\"d\n\037UndeployProc" + + "eta3.RawDocumentH\000\022D\n\014gcs_document\030\010 \001(\013" + + "2,.google.cloud.documentai.v1beta3.GcsDo" + + "cumentH\000\022\030\n\004name\030\001 \001(\tB\n\342A\001\002\372A\003\n\001*\022?\n\010do" + + "cument\030\002 \001(\0132).google.cloud.documentai.v" + + "1beta3.DocumentB\002\030\001\022\031\n\021skip_human_review" + + "\030\003 \001(\010\022.\n\nfield_mask\030\006 \001(\0132\032.google.prot" + + "obuf.FieldMask\022H\n\017process_options\030\007 \001(\0132" + + "/.google.cloud.documentai.v1beta3.Proces" + + "sOptionsB\010\n\006source\"\363\001\n\021HumanReviewStatus" + + "\022G\n\005state\030\001 \001(\01628.google.cloud.documenta" + + "i.v1beta3.HumanReviewStatus.State\022\025\n\rsta" + + "te_message\030\002 \001(\t\022\036\n\026human_review_operati" + + "on\030\003 \001(\t\"^\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000" + + "\022\013\n\007SKIPPED\020\001\022\025\n\021VALIDATION_PASSED\020\002\022\017\n\013" + + "IN_PROGRESS\020\003\022\t\n\005ERROR\020\004\"\303\001\n\017ProcessResp" + + "onse\022;\n\010document\030\001 \001(\0132).google.cloud.do" + + "cumentai.v1beta3.Document\022\"\n\026human_revie" + + "w_operation\030\002 \001(\tB\002\030\001\022O\n\023human_review_st" + + "atus\030\003 \001(\01322.google.cloud.documentai.v1b" + + "eta3.HumanReviewStatus\"\366\004\n\023BatchProcessR" + + "equest\022\030\n\004name\030\001 \001(\tB\n\342A\001\002\372A\003\n\001*\022`\n\rinpu" + + "t_configs\030\002 \003(\0132E.google.cloud.documenta" + + "i.v1beta3.BatchProcessRequest.BatchInput" + + "ConfigB\002\030\001\022a\n\routput_config\030\003 \001(\0132F.goog" + + "le.cloud.documentai.v1beta3.BatchProcess" + + "Request.BatchOutputConfigB\002\030\001\022S\n\017input_d" + + "ocuments\030\005 \001(\0132:.google.cloud.documentai" + + ".v1beta3.BatchDocumentsInputConfig\022U\n\026do" + + "cument_output_config\030\006 \001(\01325.google.clou" + + "d.documentai.v1beta3.DocumentOutputConfi" + + "g\022\031\n\021skip_human_review\030\004 \001(\010\022H\n\017process_" + + "options\030\007 \001(\0132/.google.cloud.documentai." + + "v1beta3.ProcessOptions\032=\n\020BatchInputConf" + + "ig\022\022\n\ngcs_source\030\001 \001(\t\022\021\n\tmime_type\030\002 \001(" + + "\t:\002\030\001\0320\n\021BatchOutputConfig\022\027\n\017gcs_destin" + + "ation\030\001 \001(\t:\002\030\001\"\026\n\024BatchProcessResponse\"" + + "\262\005\n\024BatchProcessMetadata\022J\n\005state\030\001 \001(\0162" + + ";.google.cloud.documentai.v1beta3.BatchP" + + "rocessMetadata.State\022\025\n\rstate_message\030\002 " + + "\001(\t\022/\n\013create_time\030\003 \001(\0132\032.google.protob" + + "uf.Timestamp\022/\n\013update_time\030\004 \001(\0132\032.goog" + + "le.protobuf.Timestamp\022r\n\033individual_proc" + + "ess_statuses\030\005 \003(\0132M.google.cloud.docume" + + "ntai.v1beta3.BatchProcessMetadata.Indivi" + + "dualProcessStatus\032\354\001\n\027IndividualProcessS" + + "tatus\022\030\n\020input_gcs_source\030\001 \001(\t\022\"\n\006statu" + + "s\030\002 \001(\0132\022.google.rpc.Status\022\036\n\026output_gc" + + "s_destination\030\003 \001(\t\022\"\n\026human_review_oper" + + "ation\030\004 \001(\tB\002\030\001\022O\n\023human_review_status\030\005" + + " \001(\01322.google.cloud.documentai.v1beta3.H" + + "umanReviewStatus\"r\n\005State\022\025\n\021STATE_UNSPE" + + "CIFIED\020\000\022\013\n\007WAITING\020\001\022\013\n\007RUNNING\020\002\022\r\n\tSU" + + "CCEEDED\020\003\022\016\n\nCANCELLING\020\004\022\r\n\tCANCELLED\020\005" + + "\022\n\n\006FAILED\020\006\"^\n\032FetchProcessorTypesReque" + + "st\022@\n\006parent\030\001 \001(\tB0\342A\001\002\372A)\022\'documentai." + + "googleapis.com/ProcessorType\"f\n\033FetchPro" + + "cessorTypesResponse\022G\n\017processor_types\030\001" + + " \003(\0132..google.cloud.documentai.v1beta3.P" + + "rocessorType\"\204\001\n\031ListProcessorTypesReque" + + "st\022@\n\006parent\030\001 \001(\tB0\342A\001\002\372A)\022\'documentai." + + "googleapis.com/ProcessorType\022\021\n\tpage_siz" + + "e\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"~\n\032ListProce" + + "ssorTypesResponse\022G\n\017processor_types\030\001 \003" + + "(\0132..google.cloud.documentai.v1beta3.Pro" + + "cessorType\022\027\n\017next_page_token\030\002 \001(\t\"|\n\025L" + + "istProcessorsRequest\022<\n\006parent\030\001 \001(\tB,\342A" + + "\001\002\372A%\022#documentai.googleapis.com/Process" + + "or\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(" + + "\t\"q\n\026ListProcessorsResponse\022>\n\nprocessor" + + "s\030\001 \003(\0132*.google.cloud.documentai.v1beta" + + "3.Processor\022\027\n\017next_page_token\030\002 \001(\t\"Y\n\027" + + "GetProcessorTypeRequest\022>\n\004name\030\001 \001(\tB0\342" + + "A\001\002\372A)\n\'documentai.googleapis.com/Proces" + + "sorType\"Q\n\023GetProcessorRequest\022:\n\004name\030\001" + + " \001(\tB,\342A\001\002\372A%\n#documentai.googleapis.com" + + "/Processor\"_\n\032GetProcessorVersionRequest" + + "\022A\n\004name\030\001 \001(\tB3\342A\001\002\372A,\n*documentai.goog" + + "leapis.com/ProcessorVersion\"\212\001\n\034ListProc" + + "essorVersionsRequest\022C\n\006parent\030\001 \001(\tB3\342A" + + "\001\002\372A,\022*documentai.googleapis.com/Process" + + "orVersion\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_tok" + + "en\030\003 \001(\t\"\207\001\n\035ListProcessorVersionsRespon" + + "se\022M\n\022processor_versions\030\001 \003(\01321.google." + + "cloud.documentai.v1beta3.ProcessorVersio" + + "n\022\027\n\017next_page_token\030\002 \001(\t\"b\n\035DeleteProc" + "essorVersionRequest\022A\n\004name\030\001 \001(\tB3\342A\001\002\372" + "A,\n*documentai.googleapis.com/ProcessorV" - + "ersion\"\"\n UndeployProcessorVersionRespon" - + "se\"u\n UndeployProcessorVersionMetadata\022Q" - + "\n\017common_metadata\030\001 \001(\01328.google.cloud.d" - + "ocumentai.v1beta3.CommonOperationMetadat" - + "a\"\233\001\n\026CreateProcessorRequest\022<\n\006parent\030\001" - + " \001(\tB,\342A\001\002\372A%\022#documentai.googleapis.com" - + "/Processor\022C\n\tprocessor\030\002 \001(\0132*.google.c" - + "loud.documentai.v1beta3.ProcessorB\004\342A\001\002\"" - + "T\n\026DeleteProcessorRequest\022:\n\004name\030\001 \001(\tB" - + ",\342A\001\002\372A%\n#documentai.googleapis.com/Proc" - + "essor\"l\n\027DeleteProcessorMetadata\022Q\n\017comm" - + "on_metadata\030\005 \001(\01328.google.cloud.documen" - + "tai.v1beta3.CommonOperationMetadata\"T\n\026E" - + "nableProcessorRequest\022:\n\004name\030\001 \001(\tB,\342A\001" - + "\002\372A%\n#documentai.googleapis.com/Processo" - + "r\"\031\n\027EnableProcessorResponse\"l\n\027EnablePr" - + "ocessorMetadata\022Q\n\017common_metadata\030\005 \001(\013" - + "28.google.cloud.documentai.v1beta3.Commo" - + "nOperationMetadata\"U\n\027DisableProcessorRe" - + "quest\022:\n\004name\030\001 \001(\tB,\342A\001\002\372A%\n#documentai" - + ".googleapis.com/Processor\"\032\n\030DisableProc" - + "essorResponse\"m\n\030DisableProcessorMetadat" - + "a\022Q\n\017common_metadata\030\005 \001(\01328.google.clou" - + "d.documentai.v1beta3.CommonOperationMeta" - + "data\"\274\001\n!SetDefaultProcessorVersionReque" - + "st\022?\n\tprocessor\030\001 \001(\tB,\342A\001\002\372A%\n#document" - + "ai.googleapis.com/Processor\022V\n\031default_p" - + "rocessor_version\030\002 \001(\tB3\342A\001\002\372A,\n*documen" - + "tai.googleapis.com/ProcessorVersion\"$\n\"S" - + "etDefaultProcessorVersionResponse\"w\n\"Set" - + "DefaultProcessorVersionMetadata\022Q\n\017commo" - + "n_metadata\030\001 \001(\01328.google.cloud.document" - + "ai.v1beta3.CommonOperationMetadata\"\350\007\n\034T" - + "rainProcessorVersionRequest\022\213\001\n\"custom_d" - + "ocument_extraction_options\030\005 \001(\0132].googl" - + "e.cloud.documentai.v1beta3.TrainProcesso" - + "rVersionRequest.CustomDocumentExtraction" - + "OptionsH\000\022<\n\006parent\030\001 \001(\tB,\342A\001\002\372A%\n#docu" - + "mentai.googleapis.com/Processor\022R\n\021proce" - + "ssor_version\030\002 \001(\01321.google.cloud.docume" - + "ntai.v1beta3.ProcessorVersionB\004\342A\001\002\022N\n\017d" - + "ocument_schema\030\n \001(\0132/.google.cloud.docu" - + "mentai.v1beta3.DocumentSchemaB\004\342A\001\001\022a\n\ni" - + "nput_data\030\004 \001(\0132G.google.cloud.documenta" - + "i.v1beta3.TrainProcessorVersionRequest.I" - + "nputDataB\004\342A\001\001\022$\n\026base_processor_version" - + "\030\010 \001(\tB\004\342A\001\001\032\267\001\n\tInputData\022V\n\022training_d" - + "ocuments\030\003 \001(\0132:.google.cloud.documentai" - + ".v1beta3.BatchDocumentsInputConfig\022R\n\016te" - + "st_documents\030\004 \001(\0132:.google.cloud.docume" - + "ntai.v1beta3.BatchDocumentsInputConfig\032\201" - + "\002\n\037CustomDocumentExtractionOptions\022\205\001\n\017t" - + "raining_method\030\003 \001(\0162l.google.cloud.docu" - + "mentai.v1beta3.TrainProcessorVersionRequ" - + "est.CustomDocumentExtractionOptions.Trai" - + "ningMethod\"V\n\016TrainingMethod\022\037\n\033TRAINING" - + "_METHOD_UNSPECIFIED\020\000\022\017\n\013MODEL_BASED\020\001\022\022" - + "\n\016TEMPLATE_BASED\020\002B\021\n\017processor_flags\":\n" - + "\035TrainProcessorVersionResponse\022\031\n\021proces" - + "sor_version\030\001 \001(\t\"\206\004\n\035TrainProcessorVers" + + "ersion\"s\n\036DeleteProcessorVersionMetadata" + + "\022Q\n\017common_metadata\030\001 \001(\01328.google.cloud" + + ".documentai.v1beta3.CommonOperationMetad" + + "ata\"b\n\035DeployProcessorVersionRequest\022A\n\004" + + "name\030\001 \001(\tB3\342A\001\002\372A,\n*documentai.googleap" + + "is.com/ProcessorVersion\" \n\036DeployProcess" + + "orVersionResponse\"s\n\036DeployProcessorVers" + "ionMetadata\022Q\n\017common_metadata\030\001 \001(\01328.g" + "oogle.cloud.documentai.v1beta3.CommonOpe" - + "rationMetadata\022u\n\033training_dataset_valid" - + "ation\030\002 \001(\0132P.google.cloud.documentai.v1" - + "beta3.TrainProcessorVersionMetadata.Data" - + "setValidation\022q\n\027test_dataset_validation" - + "\030\003 \001(\0132P.google.cloud.documentai.v1beta3" - + ".TrainProcessorVersionMetadata.DatasetVa" - + "lidation\032\247\001\n\021DatasetValidation\022\034\n\024docume" - + "nt_error_count\030\003 \001(\005\022\033\n\023dataset_error_co" - + "unt\030\004 \001(\005\022+\n\017document_errors\030\001 \003(\0132\022.goo" - + "gle.rpc.Status\022*\n\016dataset_errors\030\002 \003(\0132\022" - + ".google.rpc.Status\"\337\003\n\025ReviewDocumentReq" - + "uest\022D\n\017inline_document\030\004 \001(\0132).google.c" - + "loud.documentai.v1beta3.DocumentH\000\022Q\n\023hu" - + "man_review_config\030\001 \001(\tB4\342A\001\002\372A-\n+docume" - + "ntai.googleapis.com/HumanReviewConfig\022?\n" - + "\010document\030\002 \001(\0132).google.cloud.documenta" - + "i.v1beta3.DocumentB\002\030\001\022 \n\030enable_schema_" - + "validation\030\003 \001(\010\022Q\n\010priority\030\005 \001(\0162?.goo" - + "gle.cloud.documentai.v1beta3.ReviewDocum" - + "entRequest.Priority\022H\n\017document_schema\030\006" - + " \001(\0132/.google.cloud.documentai.v1beta3.D" - + "ocumentSchema\"#\n\010Priority\022\013\n\007DEFAULT\020\000\022\n" - + "\n\006URGENT\020\001B\010\n\006source\"\326\001\n\026ReviewDocumentR" - + "esponse\022\027\n\017gcs_destination\030\001 \001(\t\022L\n\005stat" - + "e\030\002 \001(\0162=.google.cloud.documentai.v1beta" - + "3.ReviewDocumentResponse.State\022\030\n\020reject" - + "ion_reason\030\003 \001(\t\";\n\005State\022\025\n\021STATE_UNSPE" - + "CIFIED\020\000\022\014\n\010REJECTED\020\001\022\r\n\tSUCCEEDED\020\002\"\300\003" - + "\n\037ReviewDocumentOperationMetadata\022U\n\005sta" - + "te\030\001 \001(\0162F.google.cloud.documentai.v1bet" - + "a3.ReviewDocumentOperationMetadata.State" - + "\022\025\n\rstate_message\030\002 \001(\t\022/\n\013create_time\030\003" - + " \001(\0132\032.google.protobuf.Timestamp\022/\n\013upda" - + "te_time\030\004 \001(\0132\032.google.protobuf.Timestam" - + "p\022Q\n\017common_metadata\030\005 \001(\01328.google.clou" + + "rationMetadata\"d\n\037UndeployProcessorVersi" + + "onRequest\022A\n\004name\030\001 \001(\tB3\342A\001\002\372A,\n*docume" + + "ntai.googleapis.com/ProcessorVersion\"\"\n " + + "UndeployProcessorVersionResponse\"u\n Unde" + + "ployProcessorVersionMetadata\022Q\n\017common_m" + + "etadata\030\001 \001(\01328.google.cloud.documentai." + + "v1beta3.CommonOperationMetadata\"\233\001\n\026Crea" + + "teProcessorRequest\022<\n\006parent\030\001 \001(\tB,\342A\001\002" + + "\372A%\022#documentai.googleapis.com/Processor" + + "\022C\n\tprocessor\030\002 \001(\0132*.google.cloud.docum" + + "entai.v1beta3.ProcessorB\004\342A\001\002\"T\n\026DeleteP" + + "rocessorRequest\022:\n\004name\030\001 \001(\tB,\342A\001\002\372A%\n#" + + "documentai.googleapis.com/Processor\"l\n\027D" + + "eleteProcessorMetadata\022Q\n\017common_metadat" + + "a\030\005 \001(\01328.google.cloud.documentai.v1beta" + + "3.CommonOperationMetadata\"T\n\026EnableProce" + + "ssorRequest\022:\n\004name\030\001 \001(\tB,\342A\001\002\372A%\n#docu" + + "mentai.googleapis.com/Processor\"\031\n\027Enabl" + + "eProcessorResponse\"l\n\027EnableProcessorMet" + + "adata\022Q\n\017common_metadata\030\005 \001(\01328.google." + + "cloud.documentai.v1beta3.CommonOperation" + + "Metadata\"U\n\027DisableProcessorRequest\022:\n\004n" + + "ame\030\001 \001(\tB,\342A\001\002\372A%\n#documentai.googleapi" + + "s.com/Processor\"\032\n\030DisableProcessorRespo" + + "nse\"m\n\030DisableProcessorMetadata\022Q\n\017commo" + + "n_metadata\030\005 \001(\01328.google.cloud.document" + + "ai.v1beta3.CommonOperationMetadata\"\274\001\n!S" + + "etDefaultProcessorVersionRequest\022?\n\tproc" + + "essor\030\001 \001(\tB,\342A\001\002\372A%\n#documentai.googlea" + + "pis.com/Processor\022V\n\031default_processor_v" + + "ersion\030\002 \001(\tB3\342A\001\002\372A,\n*documentai.google" + + "apis.com/ProcessorVersion\"$\n\"SetDefaultP" + + "rocessorVersionResponse\"w\n\"SetDefaultPro" + + "cessorVersionMetadata\022Q\n\017common_metadata" + + "\030\001 \001(\01328.google.cloud.documentai.v1beta3" + + ".CommonOperationMetadata\"\350\007\n\034TrainProces" + + "sorVersionRequest\022\213\001\n\"custom_document_ex" + + "traction_options\030\005 \001(\0132].google.cloud.do" + + "cumentai.v1beta3.TrainProcessorVersionRe" + + "quest.CustomDocumentExtractionOptionsH\000\022" + + "<\n\006parent\030\001 \001(\tB,\342A\001\002\372A%\n#documentai.goo" + + "gleapis.com/Processor\022R\n\021processor_versi" + + "on\030\002 \001(\01321.google.cloud.documentai.v1bet" + + "a3.ProcessorVersionB\004\342A\001\002\022N\n\017document_sc" + + "hema\030\n \001(\0132/.google.cloud.documentai.v1b" + + "eta3.DocumentSchemaB\004\342A\001\001\022a\n\ninput_data\030" + + "\004 \001(\0132G.google.cloud.documentai.v1beta3." + + "TrainProcessorVersionRequest.InputDataB\004" + + "\342A\001\001\022$\n\026base_processor_version\030\010 \001(\tB\004\342A" + + "\001\001\032\267\001\n\tInputData\022V\n\022training_documents\030\003" + + " \001(\0132:.google.cloud.documentai.v1beta3.B" + + "atchDocumentsInputConfig\022R\n\016test_documen" + + "ts\030\004 \001(\0132:.google.cloud.documentai.v1bet" + + "a3.BatchDocumentsInputConfig\032\201\002\n\037CustomD" + + "ocumentExtractionOptions\022\205\001\n\017training_me" + + "thod\030\003 \001(\0162l.google.cloud.documentai.v1b" + + "eta3.TrainProcessorVersionRequest.Custom" + + "DocumentExtractionOptions.TrainingMethod" + + "\"V\n\016TrainingMethod\022\037\n\033TRAINING_METHOD_UN" + + "SPECIFIED\020\000\022\017\n\013MODEL_BASED\020\001\022\022\n\016TEMPLATE" + + "_BASED\020\002B\021\n\017processor_flags\":\n\035TrainProc" + + "essorVersionResponse\022\031\n\021processor_versio" + + "n\030\001 \001(\t\"\206\004\n\035TrainProcessorVersionMetadat" + + "a\022Q\n\017common_metadata\030\001 \001(\01328.google.clou" + "d.documentai.v1beta3.CommonOperationMeta" - + "data\022\023\n\013question_id\030\006 \001(\t\"e\n\005State\022\025\n\021ST" - + "ATE_UNSPECIFIED\020\000\022\013\n\007RUNNING\020\001\022\016\n\nCANCEL" - + "LING\020\002\022\r\n\tSUCCEEDED\020\003\022\n\n\006FAILED\020\004\022\r\n\tCAN" - + "CELLED\020\005\"\321\001\n\037EvaluateProcessorVersionReq" - + "uest\022N\n\021processor_version\030\001 \001(\tB3\342A\001\002\372A," - + "\n*documentai.googleapis.com/ProcessorVer" - + "sion\022^\n\024evaluation_documents\030\003 \001(\0132:.goo" - + "gle.cloud.documentai.v1beta3.BatchDocume" - + "ntsInputConfigB\004\342A\001\001\"u\n EvaluateProcesso" - + "rVersionMetadata\022Q\n\017common_metadata\030\001 \001(" - + "\01328.google.cloud.documentai.v1beta3.Comm" - + "onOperationMetadata\"6\n EvaluateProcessor" - + "VersionResponse\022\022\n\nevaluation\030\002 \001(\t\"S\n\024G" - + "etEvaluationRequest\022;\n\004name\030\001 \001(\tB-\342A\001\002\372" - + "A&\n$documentai.googleapis.com/Evaluation" - + "\"\204\001\n\026ListEvaluationsRequest\022C\n\006parent\030\001 " - + "\001(\tB3\342A\001\002\372A,\n*documentai.googleapis.com/" - + "ProcessorVersion\022\021\n\tpage_size\030\002 \001(\005\022\022\n\np" - + "age_token\030\003 \001(\t\"t\n\027ListEvaluationsRespon" - + "se\022@\n\013evaluations\030\001 \003(\0132+.google.cloud.d" - + "ocumentai.v1beta3.Evaluation\022\027\n\017next_pag" - + "e_token\030\002 \001(\t\"\303\001\n\035ImportProcessorVersion" - + "Request\022S\n\030processor_version_source\030\002 \001(" - + "\tB/\372A,\n*documentai.googleapis.com/Proces" - + "sorVersionH\000\022C\n\006parent\030\001 \001(\tB3\342A\001\002\372A,\022*d" - + "ocumentai.googleapis.com/ProcessorVersio" - + "nB\010\n\006source\"l\n\036ImportProcessorVersionRes" - + "ponse\022J\n\021processor_version\030\001 \001(\tB/\372A,\n*d" - + "ocumentai.googleapis.com/ProcessorVersio" - + "n\"s\n\036ImportProcessorVersionMetadata\022Q\n\017c" - + "ommon_metadata\030\001 \001(\01328.google.cloud.docu" - + "mentai.v1beta3.CommonOperationMetadata2\353" - + ".\n\030DocumentProcessorService\022\233\002\n\017ProcessD" - + "ocument\022/.google.cloud.documentai.v1beta" - + "3.ProcessRequest\0320.google.cloud.document" - + "ai.v1beta3.ProcessResponse\"\244\001\332A\004name\202\323\344\223" - + "\002\226\001\";/v1beta3/{name=projects/*/locations" - + "/*/processors/*}:process:\001*ZT\"O/v1beta3/" + + "data\022u\n\033training_dataset_validation\030\002 \001(" + + "\0132P.google.cloud.documentai.v1beta3.Trai" + + "nProcessorVersionMetadata.DatasetValidat" + + "ion\022q\n\027test_dataset_validation\030\003 \001(\0132P.g" + + "oogle.cloud.documentai.v1beta3.TrainProc" + + "essorVersionMetadata.DatasetValidation\032\247" + + "\001\n\021DatasetValidation\022\034\n\024document_error_c" + + "ount\030\003 \001(\005\022\033\n\023dataset_error_count\030\004 \001(\005\022" + + "+\n\017document_errors\030\001 \003(\0132\022.google.rpc.St" + + "atus\022*\n\016dataset_errors\030\002 \003(\0132\022.google.rp" + + "c.Status\"\337\003\n\025ReviewDocumentRequest\022D\n\017in" + + "line_document\030\004 \001(\0132).google.cloud.docum" + + "entai.v1beta3.DocumentH\000\022Q\n\023human_review" + + "_config\030\001 \001(\tB4\342A\001\002\372A-\n+documentai.googl" + + "eapis.com/HumanReviewConfig\022?\n\010document\030" + + "\002 \001(\0132).google.cloud.documentai.v1beta3." + + "DocumentB\002\030\001\022 \n\030enable_schema_validation" + + "\030\003 \001(\010\022Q\n\010priority\030\005 \001(\0162?.google.cloud." + + "documentai.v1beta3.ReviewDocumentRequest" + + ".Priority\022H\n\017document_schema\030\006 \001(\0132/.goo" + + "gle.cloud.documentai.v1beta3.DocumentSch" + + "ema\"#\n\010Priority\022\013\n\007DEFAULT\020\000\022\n\n\006URGENT\020\001" + + "B\010\n\006source\"\326\001\n\026ReviewDocumentResponse\022\027\n" + + "\017gcs_destination\030\001 \001(\t\022L\n\005state\030\002 \001(\0162=." + + "google.cloud.documentai.v1beta3.ReviewDo" + + "cumentResponse.State\022\030\n\020rejection_reason" + + "\030\003 \001(\t\";\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\014" + + "\n\010REJECTED\020\001\022\r\n\tSUCCEEDED\020\002\"\300\003\n\037ReviewDo" + + "cumentOperationMetadata\022U\n\005state\030\001 \001(\0162F" + + ".google.cloud.documentai.v1beta3.ReviewD" + + "ocumentOperationMetadata.State\022\025\n\rstate_" + + "message\030\002 \001(\t\022/\n\013create_time\030\003 \001(\0132\032.goo" + + "gle.protobuf.Timestamp\022/\n\013update_time\030\004 " + + "\001(\0132\032.google.protobuf.Timestamp\022Q\n\017commo" + + "n_metadata\030\005 \001(\01328.google.cloud.document" + + "ai.v1beta3.CommonOperationMetadata\022\023\n\013qu" + + "estion_id\030\006 \001(\t\"e\n\005State\022\025\n\021STATE_UNSPEC" + + "IFIED\020\000\022\013\n\007RUNNING\020\001\022\016\n\nCANCELLING\020\002\022\r\n\t" + + "SUCCEEDED\020\003\022\n\n\006FAILED\020\004\022\r\n\tCANCELLED\020\005\"\321" + + "\001\n\037EvaluateProcessorVersionRequest\022N\n\021pr" + + "ocessor_version\030\001 \001(\tB3\342A\001\002\372A,\n*document" + + "ai.googleapis.com/ProcessorVersion\022^\n\024ev" + + "aluation_documents\030\003 \001(\0132:.google.cloud." + + "documentai.v1beta3.BatchDocumentsInputCo" + + "nfigB\004\342A\001\001\"u\n EvaluateProcessorVersionMe" + + "tadata\022Q\n\017common_metadata\030\001 \001(\01328.google" + + ".cloud.documentai.v1beta3.CommonOperatio" + + "nMetadata\"6\n EvaluateProcessorVersionRes" + + "ponse\022\022\n\nevaluation\030\002 \001(\t\"S\n\024GetEvaluati" + + "onRequest\022;\n\004name\030\001 \001(\tB-\342A\001\002\372A&\n$docume" + + "ntai.googleapis.com/Evaluation\"\204\001\n\026ListE" + + "valuationsRequest\022C\n\006parent\030\001 \001(\tB3\342A\001\002\372" + + "A,\n*documentai.googleapis.com/ProcessorV" + + "ersion\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030" + + "\003 \001(\t\"t\n\027ListEvaluationsResponse\022@\n\013eval" + + "uations\030\001 \003(\0132+.google.cloud.documentai." + + "v1beta3.Evaluation\022\027\n\017next_page_token\030\002 " + + "\001(\t\"\303\001\n\035ImportProcessorVersionRequest\022S\n" + + "\030processor_version_source\030\002 \001(\tB/\372A,\n*do" + + "cumentai.googleapis.com/ProcessorVersion" + + "H\000\022C\n\006parent\030\001 \001(\tB3\342A\001\002\372A,\022*documentai." + + "googleapis.com/ProcessorVersionB\010\n\006sourc" + + "e\"l\n\036ImportProcessorVersionResponse\022J\n\021p" + + "rocessor_version\030\001 \001(\tB/\372A,\n*documentai." + + "googleapis.com/ProcessorVersion\"s\n\036Impor" + + "tProcessorVersionMetadata\022Q\n\017common_meta" + + "data\030\001 \001(\01328.google.cloud.documentai.v1b" + + "eta3.CommonOperationMetadata2\353.\n\030Documen" + + "tProcessorService\022\233\002\n\017ProcessDocument\022/." + + "google.cloud.documentai.v1beta3.ProcessR" + + "equest\0320.google.cloud.documentai.v1beta3" + + ".ProcessResponse\"\244\001\332A\004name\202\323\344\223\002\226\001\";/v1be" + + "ta3/{name=projects/*/locations/*/process" + + "ors/*}:process:\001*ZT\"O/v1beta3/{name=proj" + + "ects/*/locations/*/processors/*/processo" + + "rVersions/*}:process:\001*\022\314\002\n\025BatchProcess" + + "Documents\0224.google.cloud.documentai.v1be" + + "ta3.BatchProcessRequest\032\035.google.longrun" + + "ning.Operation\"\335\001\312A,\n\024BatchProcessRespon" + + "se\022\024BatchProcessMetadata\332A\004name\202\323\344\223\002\240\001\"@" + + "/v1beta3/{name=projects/*/locations/*/pr" + + "ocessors/*}:batchProcess:\001*ZY\"T/v1beta3/" + "{name=projects/*/locations/*/processors/" - + "*/processorVersions/*}:process:\001*\022\314\002\n\025Ba" - + "tchProcessDocuments\0224.google.cloud.docum" - + "entai.v1beta3.BatchProcessRequest\032\035.goog" - + "le.longrunning.Operation\"\335\001\312A,\n\024BatchPro" - + "cessResponse\022\024BatchProcessMetadata\332A\004nam" - + "e\202\323\344\223\002\240\001\"@/v1beta3/{name=projects/*/loca" - + "tions/*/processors/*}:batchProcess:\001*ZY\"" - + "T/v1beta3/{name=projects/*/locations/*/p" - + "rocessors/*/processorVersions/*}:batchPr" - + "ocess:\001*\022\337\001\n\023FetchProcessorTypes\022;.googl" - + "e.cloud.documentai.v1beta3.FetchProcesso" - + "rTypesRequest\032<.google.cloud.documentai." - + "v1beta3.FetchProcessorTypesResponse\"M\332A\006" - + "parent\202\323\344\223\002>\022\022\n\035TrainP" + + "rocessorVersionResponse\022\035TrainProcessorV" + + "ersionMetadata\332A\030parent,processor_versio" + + "n\202\323\344\223\002R\"M/v1beta3/{parent=projects/*/loc" + + "ations/*/processors/*}/processorVersions" + + ":train:\001*\022\335\001\n\023GetProcessorVersion\022;.goog" + "le.cloud.documentai.v1beta3.GetProcessor" - + "TypeRequest\032..google.cloud.documentai.v1" - + "beta3.ProcessorType\"F\332A\004name\202\323\344\223\0029\0227/v1b" - + "eta3/{name=projects/*/locations/*/proces" - + "sorTypes/*}\022\307\001\n\016ListProcessors\0226.google." - + "cloud.documentai.v1beta3.ListProcessorsR" - + "equest\0327.google.cloud.documentai.v1beta3" - + ".ListProcessorsResponse\"D\332A\006parent\202\323\344\223\0025" - + "\0223/v1beta3/{parent=projects/*/locations/" - + "*}/processors\022\264\001\n\014GetProcessor\0224.google." - + "cloud.documentai.v1beta3.GetProcessorReq" - + "uest\032*.google.cloud.documentai.v1beta3.P" - + "rocessor\"B\332A\004name\202\323\344\223\0025\0223/v1beta3/{name=" - + "projects/*/locations/*/processors/*}\022\254\002\n" - + "\025TrainProcessorVersion\022=.google.cloud.do" - + "cumentai.v1beta3.TrainProcessorVersionRe" - + "quest\032\035.google.longrunning.Operation\"\264\001\312" - + "A>\n\035TrainProcessorVersionResponse\022\035Train" - + "ProcessorVersionMetadata\332A\030parent,proces" - + "sor_version\202\323\344\223\002R\"M/v1beta3/{parent=proj" - + "ects/*/locations/*/processors/*}/process" - + "orVersions:train:\001*\022\335\001\n\023GetProcessorVers" - + "ion\022;.google.cloud.documentai.v1beta3.Ge" - + "tProcessorVersionRequest\0321.google.cloud." - + "documentai.v1beta3.ProcessorVersion\"V\332A\004" - + "name\202\323\344\223\002I\022G/v1beta3/{name=projects/*/lo" - + "cations/*/processors/*/processorVersions" - + "/*}\022\360\001\n\025ListProcessorVersions\022=.google.c" - + "loud.documentai.v1beta3.ListProcessorVer" - + "sionsRequest\032>.google.cloud.documentai.v" - + "1beta3.ListProcessorVersionsResponse\"X\332A" - + "\006parent\202\323\344\223\002I\022G/v1beta3/{parent=projects" - + "/*/locations/*/processors/*}/processorVe" - + "rsions\022\212\002\n\026DeleteProcessorVersion\022>.goog" - + "le.cloud.documentai.v1beta3.DeleteProces" - + "sorVersionRequest\032\035.google.longrunning.O" - + "peration\"\220\001\312A7\n\025google.protobuf.Empty\022\036D" - + "eleteProcessorVersionMetadata\332A\004name\202\323\344\223" - + "\002I*G/v1beta3/{name=projects/*/locations/" - + "*/processors/*/processorVersions/*}\022\235\002\n\026" - + "DeployProcessorVersion\022>.google.cloud.do" - + "cumentai.v1beta3.DeployProcessorVersionR" - + "equest\032\035.google.longrunning.Operation\"\243\001" - + "\312A@\n\036DeployProcessorVersionResponse\022\036Dep" - + "loyProcessorVersionMetadata\332A\004name\202\323\344\223\002S" - + "\"N/v1beta3/{name=projects/*/locations/*/" - + "processors/*/processorVersions/*}:deploy" - + ":\001*\022\247\002\n\030UndeployProcessorVersion\022@.googl" - + "e.cloud.documentai.v1beta3.UndeployProce" + + "VersionRequest\0321.google.cloud.documentai" + + ".v1beta3.ProcessorVersion\"V\332A\004name\202\323\344\223\002I" + + "\022G/v1beta3/{name=projects/*/locations/*/" + + "processors/*/processorVersions/*}\022\360\001\n\025Li" + + "stProcessorVersions\022=.google.cloud.docum" + + "entai.v1beta3.ListProcessorVersionsReque" + + "st\032>.google.cloud.documentai.v1beta3.Lis" + + "tProcessorVersionsResponse\"X\332A\006parent\202\323\344" + + "\223\002I\022G/v1beta3/{parent=projects/*/locatio" + + "ns/*/processors/*}/processorVersions\022\212\002\n" + + "\026DeleteProcessorVersion\022>.google.cloud.d" + + "ocumentai.v1beta3.DeleteProcessorVersion" + + "Request\032\035.google.longrunning.Operation\"\220" + + "\001\312A7\n\025google.protobuf.Empty\022\036DeleteProce" + + "ssorVersionMetadata\332A\004name\202\323\344\223\002I*G/v1bet" + + "a3/{name=projects/*/locations/*/processo" + + "rs/*/processorVersions/*}\022\235\002\n\026DeployProc" + + "essorVersion\022>.google.cloud.documentai.v" + + "1beta3.DeployProcessorVersionRequest\032\035.g" + + "oogle.longrunning.Operation\"\243\001\312A@\n\036Deplo" + + "yProcessorVersionResponse\022\036DeployProcess" + + "orVersionMetadata\332A\004name\202\323\344\223\002S\"N/v1beta3" + + "/{name=projects/*/locations/*/processors" + + "/*/processorVersions/*}:deploy:\001*\022\247\002\n\030Un" + + "deployProcessorVersion\022@.google.cloud.do" + + "cumentai.v1beta3.UndeployProcessorVersio" + + "nRequest\032\035.google.longrunning.Operation\"" + + "\251\001\312AD\n UndeployProcessorVersionResponse\022" + + " UndeployProcessorVersionMetadata\332A\004name" + + "\202\323\344\223\002U\"P/v1beta3/{name=projects/*/locati" + + "ons/*/processors/*/processorVersions/*}:" + + "undeploy:\001*\022\321\001\n\017CreateProcessor\0227.google" + + ".cloud.documentai.v1beta3.CreateProcesso" + + "rRequest\032*.google.cloud.documentai.v1bet" + + "a3.Processor\"Y\332A\020parent,processor\202\323\344\223\002@\"" + + "3/v1beta3/{parent=projects/*/locations/*" + + "}/processors:\tprocessor\022\340\001\n\017DeleteProces" + + "sor\0227.google.cloud.documentai.v1beta3.De" + + "leteProcessorRequest\032\035.google.longrunnin" + + "g.Operation\"u\312A0\n\025google.protobuf.Empty\022" + + "\027DeleteProcessorMetadata\332A\004name\202\323\344\223\0025*3/" + + "v1beta3/{name=projects/*/locations/*/pro" + + "cessors/*}\022\345\001\n\017EnableProcessor\0227.google." + + "cloud.documentai.v1beta3.EnableProcessor" + + "Request\032\035.google.longrunning.Operation\"z" + + "\312A2\n\027EnableProcessorResponse\022\027EnableProc" + + "essorMetadata\202\323\344\223\002?\":/v1beta3/{name=proj" + + "ects/*/locations/*/processors/*}:enable:" + + "\001*\022\352\001\n\020DisableProcessor\0228.google.cloud.d" + + "ocumentai.v1beta3.DisableProcessorReques" + + "t\032\035.google.longrunning.Operation\"}\312A4\n\030D" + + "isableProcessorResponse\022\030DisableProcesso" + + "rMetadata\202\323\344\223\002@\";/v1beta3/{name=projects" + + "/*/locations/*/processors/*}:disable:\001*\022" + + "\253\002\n\032SetDefaultProcessorVersion\022B.google." + + "cloud.documentai.v1beta3.SetDefaultProce" + "ssorVersionRequest\032\035.google.longrunning." - + "Operation\"\251\001\312AD\n UndeployProcessorVersio" - + "nResponse\022 UndeployProcessorVersionMetad" - + "ata\332A\004name\202\323\344\223\002U\"P/v1beta3/{name=project" - + "s/*/locations/*/processors/*/processorVe" - + "rsions/*}:undeploy:\001*\022\321\001\n\017CreateProcesso" - + "r\0227.google.cloud.documentai.v1beta3.Crea" - + "teProcessorRequest\032*.google.cloud.docume" - + "ntai.v1beta3.Processor\"Y\332A\020parent,proces" - + "sor\202\323\344\223\002@\"3/v1beta3/{parent=projects/*/l" - + "ocations/*}/processors:\tprocessor\022\340\001\n\017De" - + "leteProcessor\0227.google.cloud.documentai." - + "v1beta3.DeleteProcessorRequest\032\035.google." - + "longrunning.Operation\"u\312A0\n\025google.proto" - + "buf.Empty\022\027DeleteProcessorMetadata\332A\004nam" - + "e\202\323\344\223\0025*3/v1beta3/{name=projects/*/locat" - + "ions/*/processors/*}\022\345\001\n\017EnableProcessor" - + "\0227.google.cloud.documentai.v1beta3.Enabl" - + "eProcessorRequest\032\035.google.longrunning.O" - + "peration\"z\312A2\n\027EnableProcessorResponse\022\027" - + "EnableProcessorMetadata\202\323\344\223\002?\":/v1beta3/" - + "{name=projects/*/locations/*/processors/" - + "*}:enable:\001*\022\352\001\n\020DisableProcessor\0228.goog" - + "le.cloud.documentai.v1beta3.DisableProce" - + "ssorRequest\032\035.google.longrunning.Operati" - + "on\"}\312A4\n\030DisableProcessorResponse\022\030Disab" - + "leProcessorMetadata\202\323\344\223\002@\";/v1beta3/{nam" - + "e=projects/*/locations/*/processors/*}:d" - + "isable:\001*\022\253\002\n\032SetDefaultProcessorVersion" - + "\022B.google.cloud.documentai.v1beta3.SetDe" - + "faultProcessorVersionRequest\032\035.google.lo" - + "ngrunning.Operation\"\251\001\312AH\n\"SetDefaultPro" - + "cessorVersionResponse\022\"SetDefaultProcess" - + "orVersionMetadata\202\323\344\223\002X\"S/v1beta3/{proce" - + "ssor=projects/*/locations/*/processors/*" - + "}:setDefaultProcessorVersion:\001*\022\252\002\n\016Revi" - + "ewDocument\0226.google.cloud.documentai.v1b" - + "eta3.ReviewDocumentRequest\032\035.google.long" - + "running.Operation\"\300\001\312A9\n\026ReviewDocumentR" - + "esponse\022\037ReviewDocumentOperationMetadata" - + "\332A\023human_review_config\202\323\344\223\002h\"c/v1beta3/{" - + "human_review_config=projects/*/locations" - + "/*/processors/*/humanReviewConfig}:revie" - + "wDocument:\001*\022\321\002\n\030EvaluateProcessorVersio" - + "n\022@.google.cloud.documentai.v1beta3.Eval" - + "uateProcessorVersionRequest\032\035.google.lon" - + "grunning.Operation\"\323\001\312AD\n EvaluateProces" - + "sorVersionResponse\022 EvaluateProcessorVer" - + "sionMetadata\332A\021processor_version\202\323\344\223\002r\"m" - + "/v1beta3/{processor_version=projects/*/l" - + "ocations/*/processors/*/processorVersion" - + "s/*}:evaluateProcessorVersion:\001*\022\331\001\n\rGet" - + "Evaluation\0225.google.cloud.documentai.v1b" - + "eta3.GetEvaluationRequest\032+.google.cloud" - + ".documentai.v1beta3.Evaluation\"d\332A\004name\202" - + "\323\344\223\002W\022U/v1beta3/{name=projects/*/locatio" - + "ns/*/processors/*/processorVersions/*/ev" - + "aluations/*}\022\354\001\n\017ListEvaluations\0227.googl" - + "e.cloud.documentai.v1beta3.ListEvaluatio" - + "nsRequest\0328.google.cloud.documentai.v1be" - + "ta3.ListEvaluationsResponse\"f\332A\006parent\202\323" - + "\344\223\002W\022U/v1beta3/{parent=projects/*/locati" - + "ons/*/processors/*/processorVersions/*}/" - + "evaluations\022\257\002\n\026ImportProcessorVersion\022>" - + ".google.cloud.documentai.v1beta3.ImportP" - + "rocessorVersionRequest\032\035.google.longrunn" - + "ing.Operation\"\265\001\312A@\n\036ImportProcessorVers" - + "ionResponse\022\036ImportProcessorVersionMetad" - + "ata\332A\006parent\202\323\344\223\002c\"^/v1beta3/{parent=pro" - + "jects/*/locations/*/processors/*}/proces" - + "sorVersions:importProcessorVersion:\001*\032M\312" - + "A\031documentai.googleapis.com\322A.https://ww", - "w.googleapis.com/auth/cloud-platformB\303\003\n" - + "#com.google.cloud.documentai.v1beta3B\032Do" - + "cumentAiProcessorServiceP\001ZCcloud.google" - + ".com/go/documentai/apiv1beta3/documentai" - + "pb;documentaipb\252\002\037Google.Cloud.DocumentA" - + "I.V1Beta3\312\002\037Google\\Cloud\\DocumentAI\\V1be" - + "ta3\352\002\"Google::Cloud::DocumentAI::V1beta3" - + "\352A\177\n+documentai.googleapis.com/HumanRevi" - + "ewConfig\022Pprojects/{project}/locations/{" - + "location}/processors/{processor}/humanRe" - + "viewConfig\352AM\n\"documentai.googleapis.com" - + "/Location\022\'projects/{project}/locations/" - + "{location}b\006proto3" + + "Operation\"\251\001\312AH\n\"SetDefaultProcessorVers" + + "ionResponse\022\"SetDefaultProcessorVersionM" + + "etadata\202\323\344\223\002X\"S/v1beta3/{processor=proje" + + "cts/*/locations/*/processors/*}:setDefau" + + "ltProcessorVersion:\001*\022\252\002\n\016ReviewDocument" + + "\0226.google.cloud.documentai.v1beta3.Revie" + + "wDocumentRequest\032\035.google.longrunning.Op" + + "eration\"\300\001\312A9\n\026ReviewDocumentResponse\022\037R" + + "eviewDocumentOperationMetadata\332A\023human_r" + + "eview_config\202\323\344\223\002h\"c/v1beta3/{human_revi" + + "ew_config=projects/*/locations/*/process" + + "ors/*/humanReviewConfig}:reviewDocument:" + + "\001*\022\321\002\n\030EvaluateProcessorVersion\022@.google" + + ".cloud.documentai.v1beta3.EvaluateProces" + + "sorVersionRequest\032\035.google.longrunning.O" + + "peration\"\323\001\312AD\n EvaluateProcessorVersion" + + "Response\022 EvaluateProcessorVersionMetada" + + "ta\332A\021processor_version\202\323\344\223\002r\"m/v1beta3/{" + + "processor_version=projects/*/locations/*" + + "/processors/*/processorVersions/*}:evalu" + + "ateProcessorVersion:\001*\022\331\001\n\rGetEvaluation" + + "\0225.google.cloud.documentai.v1beta3.GetEv" + + "aluationRequest\032+.google.cloud.documenta" + + "i.v1beta3.Evaluation\"d\332A\004name\202\323\344\223\002W\022U/v1" + + "beta3/{name=projects/*/locations/*/proce" + + "ssors/*/processorVersions/*/evaluations/" + + "*}\022\354\001\n\017ListEvaluations\0227.google.cloud.do" + + "cumentai.v1beta3.ListEvaluationsRequest\032" + + "8.google.cloud.documentai.v1beta3.ListEv" + + "aluationsResponse\"f\332A\006parent\202\323\344\223\002W\022U/v1b" + + "eta3/{parent=projects/*/locations/*/proc" + + "essors/*/processorVersions/*}/evaluation" + + "s\022\257\002\n\026ImportProcessorVersion\022>.google.cl" + + "oud.documentai.v1beta3.ImportProcessorVe" + + "rsionRequest\032\035.google.longrunning.Operat" + + "ion\"\265\001\312A@\n\036ImportProcessorVersionRespons" + + "e\022\036ImportProcessorVersionMetadata\332A\006pare" + + "nt\202\323\344\223\002c\"^/v1beta3/{parent=projects/*/lo" + + "cations/*/processors/*}/processorVersion", + "s:importProcessorVersion:\001*\032M\312A\031document" + + "ai.googleapis.com\322A.https://www.googleap" + + "is.com/auth/cloud-platformB\303\003\n#com.googl" + + "e.cloud.documentai.v1beta3B\032DocumentAiPr" + + "ocessorServiceP\001ZCcloud.google.com/go/do" + + "cumentai/apiv1beta3/documentaipb;documen" + + "taipb\252\002\037Google.Cloud.DocumentAI.V1Beta3\312" + + "\002\037Google\\Cloud\\DocumentAI\\V1beta3\352\002\"Goog" + + "le::Cloud::DocumentAI::V1beta3\352A\177\n+docum" + + "entai.googleapis.com/HumanReviewConfig\022P" + + "projects/{project}/locations/{location}/" + + "processors/{processor}/humanReviewConfig" + + "\352AM\n\"documentai.googleapis.com/Location\022" + + "\'projects/{project}/locations/{location}" + + "b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -723,6 +725,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "InlineDocument", "RawDocument", + "GcsDocument", "Name", "Document", "SkipHumanReview", diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentId.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentId.java new file mode 100644 index 000000000000..a3f5d57a1540 --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentId.java @@ -0,0 +1,2983 @@ +/* + * Copyright 2023 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/dataset.proto + +package com.google.cloud.documentai.v1beta3; + +/** + * + * + *
+ * Document Identifier.
+ * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.DocumentId} + */ +public final class DocumentId extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.DocumentId) + DocumentIdOrBuilder { + private static final long serialVersionUID = 0L; + // Use DocumentId.newBuilder() to construct. + private DocumentId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DocumentId() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DocumentId(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DatasetProto + .internal_static_google_cloud_documentai_v1beta3_DocumentId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DatasetProto + .internal_static_google_cloud_documentai_v1beta3_DocumentId_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.DocumentId.class, + com.google.cloud.documentai.v1beta3.DocumentId.Builder.class); + } + + public interface GCSManagedDocumentIdOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The Cloud Storage URI where the actual document is stored.
+     * 
+ * + * string gcs_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The gcsUri. + */ + java.lang.String getGcsUri(); + /** + * + * + *
+     * Required. The Cloud Storage URI where the actual document is stored.
+     * 
+ * + * string gcs_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for gcsUri. + */ + com.google.protobuf.ByteString getGcsUriBytes(); + + /** + * + * + *
+     * Id of the document (indexed) managed by Content Warehouse.
+     * 
+ * + * string cw_doc_id = 2 [deprecated = true]; + * + * @deprecated google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId.cw_doc_id is + * deprecated. See google/cloud/documentai/v1beta3/dataset.proto;l=133 + * @return The cwDocId. + */ + @java.lang.Deprecated + java.lang.String getCwDocId(); + /** + * + * + *
+     * Id of the document (indexed) managed by Content Warehouse.
+     * 
+ * + * string cw_doc_id = 2 [deprecated = true]; + * + * @deprecated google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId.cw_doc_id is + * deprecated. See google/cloud/documentai/v1beta3/dataset.proto;l=133 + * @return The bytes for cwDocId. + */ + @java.lang.Deprecated + com.google.protobuf.ByteString getCwDocIdBytes(); + } + /** + * + * + *
+   * Identifies a document uniquely within the scope of a dataset in the
+   * user-managed Cloud Storage option.
+   * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId} + */ + public static final class GCSManagedDocumentId extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId) + GCSManagedDocumentIdOrBuilder { + private static final long serialVersionUID = 0L; + // Use GCSManagedDocumentId.newBuilder() to construct. + private GCSManagedDocumentId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GCSManagedDocumentId() { + gcsUri_ = ""; + cwDocId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GCSManagedDocumentId(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DatasetProto + .internal_static_google_cloud_documentai_v1beta3_DocumentId_GCSManagedDocumentId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DatasetProto + .internal_static_google_cloud_documentai_v1beta3_DocumentId_GCSManagedDocumentId_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId.class, + com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId.Builder.class); + } + + public static final int GCS_URI_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object gcsUri_ = ""; + /** + * + * + *
+     * Required. The Cloud Storage URI where the actual document is stored.
+     * 
+ * + * string gcs_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The gcsUri. + */ + @java.lang.Override + public java.lang.String getGcsUri() { + java.lang.Object ref = gcsUri_; + 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(); + gcsUri_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The Cloud Storage URI where the actual document is stored.
+     * 
+ * + * string gcs_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for gcsUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGcsUriBytes() { + java.lang.Object ref = gcsUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gcsUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CW_DOC_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object cwDocId_ = ""; + /** + * + * + *
+     * Id of the document (indexed) managed by Content Warehouse.
+     * 
+ * + * string cw_doc_id = 2 [deprecated = true]; + * + * @deprecated google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId.cw_doc_id is + * deprecated. See google/cloud/documentai/v1beta3/dataset.proto;l=133 + * @return The cwDocId. + */ + @java.lang.Override + @java.lang.Deprecated + public java.lang.String getCwDocId() { + java.lang.Object ref = cwDocId_; + 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(); + cwDocId_ = s; + return s; + } + } + /** + * + * + *
+     * Id of the document (indexed) managed by Content Warehouse.
+     * 
+ * + * string cw_doc_id = 2 [deprecated = true]; + * + * @deprecated google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId.cw_doc_id is + * deprecated. See google/cloud/documentai/v1beta3/dataset.proto;l=133 + * @return The bytes for cwDocId. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.protobuf.ByteString getCwDocIdBytes() { + java.lang.Object ref = cwDocId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cwDocId_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, gcsUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cwDocId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, cwDocId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, gcsUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cwDocId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, cwDocId_); + } + size += getUnknownFields().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.DocumentId.GCSManagedDocumentId)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId other = + (com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId) obj; + + if (!getGcsUri().equals(other.getGcsUri())) return false; + if (!getCwDocId().equals(other.getCwDocId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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_URI_FIELD_NUMBER; + hash = (53 * hash) + getGcsUri().hashCode(); + hash = (37 * hash) + CW_DOC_ID_FIELD_NUMBER; + hash = (53 * hash) + getCwDocId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId 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.DocumentId.GCSManagedDocumentId parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId 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.DocumentId.GCSManagedDocumentId parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId 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.DocumentId.GCSManagedDocumentId parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId 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.DocumentId.GCSManagedDocumentId + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId + 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.DocumentId.GCSManagedDocumentId 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.DocumentId.GCSManagedDocumentId 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.DocumentId.GCSManagedDocumentId 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; + } + /** + * + * + *
+     * Identifies a document uniquely within the scope of a dataset in the
+     * user-managed Cloud Storage option.
+     * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId) + com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentIdOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DatasetProto + .internal_static_google_cloud_documentai_v1beta3_DocumentId_GCSManagedDocumentId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DatasetProto + .internal_static_google_cloud_documentai_v1beta3_DocumentId_GCSManagedDocumentId_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId.class, + com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId.Builder.class); + } + + // Construct using + // com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + gcsUri_ = ""; + cwDocId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DatasetProto + .internal_static_google_cloud_documentai_v1beta3_DocumentId_GCSManagedDocumentId_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId build() { + com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId buildPartial() { + com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId result = + new com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.gcsUri_ = gcsUri_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.cwDocId_ = cwDocId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId) { + return mergeFrom( + (com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId other) { + if (other + == com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId + .getDefaultInstance()) return this; + if (!other.getGcsUri().isEmpty()) { + gcsUri_ = other.gcsUri_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getCwDocId().isEmpty()) { + cwDocId_ = other.cwDocId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + gcsUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + cwDocId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object gcsUri_ = ""; + /** + * + * + *
+       * Required. The Cloud Storage URI where the actual document is stored.
+       * 
+ * + * string gcs_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The gcsUri. + */ + public java.lang.String getGcsUri() { + java.lang.Object ref = gcsUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcsUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. The Cloud Storage URI where the actual document is stored.
+       * 
+ * + * string gcs_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for gcsUri. + */ + public com.google.protobuf.ByteString getGcsUriBytes() { + java.lang.Object ref = gcsUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gcsUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. The Cloud Storage URI where the actual document is stored.
+       * 
+ * + * string gcs_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The gcsUri to set. + * @return This builder for chaining. + */ + public Builder setGcsUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + gcsUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The Cloud Storage URI where the actual document is stored.
+       * 
+ * + * string gcs_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearGcsUri() { + gcsUri_ = getDefaultInstance().getGcsUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The Cloud Storage URI where the actual document is stored.
+       * 
+ * + * string gcs_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for gcsUri to set. + * @return This builder for chaining. + */ + public Builder setGcsUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + gcsUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object cwDocId_ = ""; + /** + * + * + *
+       * Id of the document (indexed) managed by Content Warehouse.
+       * 
+ * + * string cw_doc_id = 2 [deprecated = true]; + * + * @deprecated google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId.cw_doc_id is + * deprecated. See google/cloud/documentai/v1beta3/dataset.proto;l=133 + * @return The cwDocId. + */ + @java.lang.Deprecated + public java.lang.String getCwDocId() { + java.lang.Object ref = cwDocId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cwDocId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Id of the document (indexed) managed by Content Warehouse.
+       * 
+ * + * string cw_doc_id = 2 [deprecated = true]; + * + * @deprecated google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId.cw_doc_id is + * deprecated. See google/cloud/documentai/v1beta3/dataset.proto;l=133 + * @return The bytes for cwDocId. + */ + @java.lang.Deprecated + public com.google.protobuf.ByteString getCwDocIdBytes() { + java.lang.Object ref = cwDocId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cwDocId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Id of the document (indexed) managed by Content Warehouse.
+       * 
+ * + * string cw_doc_id = 2 [deprecated = true]; + * + * @deprecated google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId.cw_doc_id is + * deprecated. See google/cloud/documentai/v1beta3/dataset.proto;l=133 + * @param value The cwDocId to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setCwDocId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + cwDocId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Id of the document (indexed) managed by Content Warehouse.
+       * 
+ * + * string cw_doc_id = 2 [deprecated = true]; + * + * @deprecated google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId.cw_doc_id is + * deprecated. See google/cloud/documentai/v1beta3/dataset.proto;l=133 + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearCwDocId() { + cwDocId_ = getDefaultInstance().getCwDocId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Id of the document (indexed) managed by Content Warehouse.
+       * 
+ * + * string cw_doc_id = 2 [deprecated = true]; + * + * @deprecated google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId.cw_doc_id is + * deprecated. See google/cloud/documentai/v1beta3/dataset.proto;l=133 + * @param value The bytes for cwDocId to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setCwDocIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + cwDocId_ = value; + bitField0_ |= 0x00000002; + 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.DocumentId.GCSManagedDocumentId) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId) + private static final com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId(); + } + + public static com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GCSManagedDocumentId parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface UnmanagedDocumentIdOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The id of the document.
+     * 
+ * + * string doc_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The docId. + */ + java.lang.String getDocId(); + /** + * + * + *
+     * Required. The id of the document.
+     * 
+ * + * string doc_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for docId. + */ + com.google.protobuf.ByteString getDocIdBytes(); + } + /** + * + * + *
+   * Identifies a document uniquely within the scope of a dataset in unmanaged
+   * option.
+   * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId} + */ + public static final class UnmanagedDocumentId extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId) + UnmanagedDocumentIdOrBuilder { + private static final long serialVersionUID = 0L; + // Use UnmanagedDocumentId.newBuilder() to construct. + private UnmanagedDocumentId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UnmanagedDocumentId() { + docId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UnmanagedDocumentId(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DatasetProto + .internal_static_google_cloud_documentai_v1beta3_DocumentId_UnmanagedDocumentId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DatasetProto + .internal_static_google_cloud_documentai_v1beta3_DocumentId_UnmanagedDocumentId_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId.class, + com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId.Builder.class); + } + + public static final int DOC_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object docId_ = ""; + /** + * + * + *
+     * Required. The id of the document.
+     * 
+ * + * string doc_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The docId. + */ + @java.lang.Override + public java.lang.String getDocId() { + java.lang.Object ref = docId_; + 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(); + docId_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The id of the document.
+     * 
+ * + * string doc_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for docId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDocIdBytes() { + java.lang.Object ref = docId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + docId_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(docId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, docId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(docId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, docId_); + } + size += getUnknownFields().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.DocumentId.UnmanagedDocumentId)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId other = + (com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId) obj; + + if (!getDocId().equals(other.getDocId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + DOC_ID_FIELD_NUMBER; + hash = (53 * hash) + getDocId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId 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.DocumentId.UnmanagedDocumentId parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId 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.DocumentId.UnmanagedDocumentId parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId 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.DocumentId.UnmanagedDocumentId parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId 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.DocumentId.UnmanagedDocumentId + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId + 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.DocumentId.UnmanagedDocumentId 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.DocumentId.UnmanagedDocumentId 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.DocumentId.UnmanagedDocumentId 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; + } + /** + * + * + *
+     * Identifies a document uniquely within the scope of a dataset in unmanaged
+     * option.
+     * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId) + com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentIdOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DatasetProto + .internal_static_google_cloud_documentai_v1beta3_DocumentId_UnmanagedDocumentId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DatasetProto + .internal_static_google_cloud_documentai_v1beta3_DocumentId_UnmanagedDocumentId_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId.class, + com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId.Builder.class); + } + + // Construct using + // com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + docId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DatasetProto + .internal_static_google_cloud_documentai_v1beta3_DocumentId_UnmanagedDocumentId_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId build() { + com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId buildPartial() { + com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId result = + new com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.docId_ = docId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId) { + return mergeFrom( + (com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId other) { + if (other + == com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId + .getDefaultInstance()) return this; + if (!other.getDocId().isEmpty()) { + docId_ = other.docId_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + docId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object docId_ = ""; + /** + * + * + *
+       * Required. The id of the document.
+       * 
+ * + * string doc_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The docId. + */ + public java.lang.String getDocId() { + java.lang.Object ref = docId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + docId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. The id of the document.
+       * 
+ * + * string doc_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for docId. + */ + public com.google.protobuf.ByteString getDocIdBytes() { + java.lang.Object ref = docId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + docId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. The id of the document.
+       * 
+ * + * string doc_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The docId to set. + * @return This builder for chaining. + */ + public Builder setDocId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + docId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The id of the document.
+       * 
+ * + * string doc_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDocId() { + docId_ = getDefaultInstance().getDocId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The id of the document.
+       * 
+ * + * string doc_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for docId to set. + * @return This builder for chaining. + */ + public Builder setDocIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + docId_ = value; + bitField0_ |= 0x00000001; + 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.DocumentId.UnmanagedDocumentId) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId) + private static final com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId(); + } + + public static com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UnmanagedDocumentId parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int typeCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object type_; + + public enum TypeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GCS_MANAGED_DOC_ID(1), + UNMANAGED_DOC_ID(4), + TYPE_NOT_SET(0); + private final int value; + + private TypeCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TypeCase valueOf(int value) { + return forNumber(value); + } + + public static TypeCase forNumber(int value) { + switch (value) { + case 1: + return GCS_MANAGED_DOC_ID; + case 4: + return UNMANAGED_DOC_ID; + case 0: + return TYPE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TypeCase getTypeCase() { + return TypeCase.forNumber(typeCase_); + } + + public static final int GCS_MANAGED_DOC_ID_FIELD_NUMBER = 1; + /** + * + * + *
+   * A document id within user-managed Cloud Storage.
+   * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId gcs_managed_doc_id = 1; + * + * + * @return Whether the gcsManagedDocId field is set. + */ + @java.lang.Override + public boolean hasGcsManagedDocId() { + return typeCase_ == 1; + } + /** + * + * + *
+   * A document id within user-managed Cloud Storage.
+   * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId gcs_managed_doc_id = 1; + * + * + * @return The gcsManagedDocId. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId getGcsManagedDocId() { + if (typeCase_ == 1) { + return (com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId) type_; + } + return com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId.getDefaultInstance(); + } + /** + * + * + *
+   * A document id within user-managed Cloud Storage.
+   * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId gcs_managed_doc_id = 1; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentIdOrBuilder + getGcsManagedDocIdOrBuilder() { + if (typeCase_ == 1) { + return (com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId) type_; + } + return com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId.getDefaultInstance(); + } + + public static final int UNMANAGED_DOC_ID_FIELD_NUMBER = 4; + /** + * + * + *
+   * A document id within unmanaged dataset.
+   * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId unmanaged_doc_id = 4; + * + * + * @return Whether the unmanagedDocId field is set. + */ + @java.lang.Override + public boolean hasUnmanagedDocId() { + return typeCase_ == 4; + } + /** + * + * + *
+   * A document id within unmanaged dataset.
+   * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId unmanaged_doc_id = 4; + * + * + * @return The unmanagedDocId. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId getUnmanagedDocId() { + if (typeCase_ == 4) { + return (com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId) type_; + } + return com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId.getDefaultInstance(); + } + /** + * + * + *
+   * A document id within unmanaged dataset.
+   * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId unmanaged_doc_id = 4; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentIdOrBuilder + getUnmanagedDocIdOrBuilder() { + if (typeCase_ == 4) { + return (com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId) type_; + } + return com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId.getDefaultInstance(); + } + + public static final int REVISION_REF_FIELD_NUMBER = 3; + private com.google.cloud.documentai.v1beta3.RevisionRef revisionRef_; + /** + * + * + *
+   * Points to a specific revision of the document if set.
+   * 
+ * + * .google.cloud.documentai.v1beta3.RevisionRef revision_ref = 3; + * + * @return Whether the revisionRef field is set. + */ + @java.lang.Override + public boolean hasRevisionRef() { + return revisionRef_ != null; + } + /** + * + * + *
+   * Points to a specific revision of the document if set.
+   * 
+ * + * .google.cloud.documentai.v1beta3.RevisionRef revision_ref = 3; + * + * @return The revisionRef. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.RevisionRef getRevisionRef() { + return revisionRef_ == null + ? com.google.cloud.documentai.v1beta3.RevisionRef.getDefaultInstance() + : revisionRef_; + } + /** + * + * + *
+   * Points to a specific revision of the document if set.
+   * 
+ * + * .google.cloud.documentai.v1beta3.RevisionRef revision_ref = 3; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.RevisionRefOrBuilder getRevisionRefOrBuilder() { + return revisionRef_ == null + ? com.google.cloud.documentai.v1beta3.RevisionRef.getDefaultInstance() + : revisionRef_; + } + + 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 (typeCase_ == 1) { + output.writeMessage( + 1, (com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId) type_); + } + if (revisionRef_ != null) { + output.writeMessage(3, getRevisionRef()); + } + if (typeCase_ == 4) { + output.writeMessage( + 4, (com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId) type_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (typeCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId) type_); + } + if (revisionRef_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getRevisionRef()); + } + if (typeCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId) type_); + } + size += getUnknownFields().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.DocumentId)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.DocumentId other = + (com.google.cloud.documentai.v1beta3.DocumentId) obj; + + if (hasRevisionRef() != other.hasRevisionRef()) return false; + if (hasRevisionRef()) { + if (!getRevisionRef().equals(other.getRevisionRef())) return false; + } + if (!getTypeCase().equals(other.getTypeCase())) return false; + switch (typeCase_) { + case 1: + if (!getGcsManagedDocId().equals(other.getGcsManagedDocId())) return false; + break; + case 4: + if (!getUnmanagedDocId().equals(other.getUnmanagedDocId())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasRevisionRef()) { + hash = (37 * hash) + REVISION_REF_FIELD_NUMBER; + hash = (53 * hash) + getRevisionRef().hashCode(); + } + switch (typeCase_) { + case 1: + hash = (37 * hash) + GCS_MANAGED_DOC_ID_FIELD_NUMBER; + hash = (53 * hash) + getGcsManagedDocId().hashCode(); + break; + case 4: + hash = (37 * hash) + UNMANAGED_DOC_ID_FIELD_NUMBER; + hash = (53 * hash) + getUnmanagedDocId().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.DocumentId parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.DocumentId 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.DocumentId parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.DocumentId 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.DocumentId parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.DocumentId 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.DocumentId parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.DocumentId 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.DocumentId parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.DocumentId 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.DocumentId 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.DocumentId 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.DocumentId 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; + } + /** + * + * + *
+   * Document Identifier.
+   * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.DocumentId} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.DocumentId) + com.google.cloud.documentai.v1beta3.DocumentIdOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DatasetProto + .internal_static_google_cloud_documentai_v1beta3_DocumentId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DatasetProto + .internal_static_google_cloud_documentai_v1beta3_DocumentId_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.DocumentId.class, + com.google.cloud.documentai.v1beta3.DocumentId.Builder.class); + } + + // Construct using com.google.cloud.documentai.v1beta3.DocumentId.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (gcsManagedDocIdBuilder_ != null) { + gcsManagedDocIdBuilder_.clear(); + } + if (unmanagedDocIdBuilder_ != null) { + unmanagedDocIdBuilder_.clear(); + } + revisionRef_ = null; + if (revisionRefBuilder_ != null) { + revisionRefBuilder_.dispose(); + revisionRefBuilder_ = null; + } + typeCase_ = 0; + type_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DatasetProto + .internal_static_google_cloud_documentai_v1beta3_DocumentId_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.DocumentId getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.DocumentId.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.DocumentId build() { + com.google.cloud.documentai.v1beta3.DocumentId result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.DocumentId buildPartial() { + com.google.cloud.documentai.v1beta3.DocumentId result = + new com.google.cloud.documentai.v1beta3.DocumentId(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.documentai.v1beta3.DocumentId result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.revisionRef_ = + revisionRefBuilder_ == null ? revisionRef_ : revisionRefBuilder_.build(); + } + } + + private void buildPartialOneofs(com.google.cloud.documentai.v1beta3.DocumentId result) { + result.typeCase_ = typeCase_; + result.type_ = this.type_; + if (typeCase_ == 1 && gcsManagedDocIdBuilder_ != null) { + result.type_ = gcsManagedDocIdBuilder_.build(); + } + if (typeCase_ == 4 && unmanagedDocIdBuilder_ != null) { + result.type_ = unmanagedDocIdBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta3.DocumentId) { + return mergeFrom((com.google.cloud.documentai.v1beta3.DocumentId) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.documentai.v1beta3.DocumentId other) { + if (other == com.google.cloud.documentai.v1beta3.DocumentId.getDefaultInstance()) return this; + if (other.hasRevisionRef()) { + mergeRevisionRef(other.getRevisionRef()); + } + switch (other.getTypeCase()) { + case GCS_MANAGED_DOC_ID: + { + mergeGcsManagedDocId(other.getGcsManagedDocId()); + break; + } + case UNMANAGED_DOC_ID: + { + mergeUnmanagedDocId(other.getUnmanagedDocId()); + break; + } + case TYPE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getGcsManagedDocIdFieldBuilder().getBuilder(), extensionRegistry); + typeCase_ = 1; + break; + } // case 10 + case 26: + { + input.readMessage(getRevisionRefFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getUnmanagedDocIdFieldBuilder().getBuilder(), extensionRegistry); + typeCase_ = 4; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int typeCase_ = 0; + private java.lang.Object type_; + + public TypeCase getTypeCase() { + return TypeCase.forNumber(typeCase_); + } + + public Builder clearType() { + typeCase_ = 0; + type_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId, + com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId.Builder, + com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentIdOrBuilder> + gcsManagedDocIdBuilder_; + /** + * + * + *
+     * A document id within user-managed Cloud Storage.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId gcs_managed_doc_id = 1; + * + * + * @return Whether the gcsManagedDocId field is set. + */ + @java.lang.Override + public boolean hasGcsManagedDocId() { + return typeCase_ == 1; + } + /** + * + * + *
+     * A document id within user-managed Cloud Storage.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId gcs_managed_doc_id = 1; + * + * + * @return The gcsManagedDocId. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId + getGcsManagedDocId() { + if (gcsManagedDocIdBuilder_ == null) { + if (typeCase_ == 1) { + return (com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId) type_; + } + return com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId + .getDefaultInstance(); + } else { + if (typeCase_ == 1) { + return gcsManagedDocIdBuilder_.getMessage(); + } + return com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId + .getDefaultInstance(); + } + } + /** + * + * + *
+     * A document id within user-managed Cloud Storage.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId gcs_managed_doc_id = 1; + * + */ + public Builder setGcsManagedDocId( + com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId value) { + if (gcsManagedDocIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + gcsManagedDocIdBuilder_.setMessage(value); + } + typeCase_ = 1; + return this; + } + /** + * + * + *
+     * A document id within user-managed Cloud Storage.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId gcs_managed_doc_id = 1; + * + */ + public Builder setGcsManagedDocId( + com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId.Builder + builderForValue) { + if (gcsManagedDocIdBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + gcsManagedDocIdBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 1; + return this; + } + /** + * + * + *
+     * A document id within user-managed Cloud Storage.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId gcs_managed_doc_id = 1; + * + */ + public Builder mergeGcsManagedDocId( + com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId value) { + if (gcsManagedDocIdBuilder_ == null) { + if (typeCase_ == 1 + && type_ + != com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId + .getDefaultInstance()) { + type_ = + com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId.newBuilder( + (com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId) type_) + .mergeFrom(value) + .buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 1) { + gcsManagedDocIdBuilder_.mergeFrom(value); + } else { + gcsManagedDocIdBuilder_.setMessage(value); + } + } + typeCase_ = 1; + return this; + } + /** + * + * + *
+     * A document id within user-managed Cloud Storage.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId gcs_managed_doc_id = 1; + * + */ + public Builder clearGcsManagedDocId() { + if (gcsManagedDocIdBuilder_ == null) { + if (typeCase_ == 1) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 1) { + typeCase_ = 0; + type_ = null; + } + gcsManagedDocIdBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A document id within user-managed Cloud Storage.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId gcs_managed_doc_id = 1; + * + */ + public com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId.Builder + getGcsManagedDocIdBuilder() { + return getGcsManagedDocIdFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A document id within user-managed Cloud Storage.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId gcs_managed_doc_id = 1; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentIdOrBuilder + getGcsManagedDocIdOrBuilder() { + if ((typeCase_ == 1) && (gcsManagedDocIdBuilder_ != null)) { + return gcsManagedDocIdBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 1) { + return (com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId) type_; + } + return com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId + .getDefaultInstance(); + } + } + /** + * + * + *
+     * A document id within user-managed Cloud Storage.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId gcs_managed_doc_id = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId, + com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId.Builder, + com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentIdOrBuilder> + getGcsManagedDocIdFieldBuilder() { + if (gcsManagedDocIdBuilder_ == null) { + if (!(typeCase_ == 1)) { + type_ = + com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId + .getDefaultInstance(); + } + gcsManagedDocIdBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId, + com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId.Builder, + com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentIdOrBuilder>( + (com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 1; + onChanged(); + return gcsManagedDocIdBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId, + com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId.Builder, + com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentIdOrBuilder> + unmanagedDocIdBuilder_; + /** + * + * + *
+     * A document id within unmanaged dataset.
+     * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId unmanaged_doc_id = 4; + * + * + * @return Whether the unmanagedDocId field is set. + */ + @java.lang.Override + public boolean hasUnmanagedDocId() { + return typeCase_ == 4; + } + /** + * + * + *
+     * A document id within unmanaged dataset.
+     * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId unmanaged_doc_id = 4; + * + * + * @return The unmanagedDocId. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId getUnmanagedDocId() { + if (unmanagedDocIdBuilder_ == null) { + if (typeCase_ == 4) { + return (com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId) type_; + } + return com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId + .getDefaultInstance(); + } else { + if (typeCase_ == 4) { + return unmanagedDocIdBuilder_.getMessage(); + } + return com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId + .getDefaultInstance(); + } + } + /** + * + * + *
+     * A document id within unmanaged dataset.
+     * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId unmanaged_doc_id = 4; + * + */ + public Builder setUnmanagedDocId( + com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId value) { + if (unmanagedDocIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + unmanagedDocIdBuilder_.setMessage(value); + } + typeCase_ = 4; + return this; + } + /** + * + * + *
+     * A document id within unmanaged dataset.
+     * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId unmanaged_doc_id = 4; + * + */ + public Builder setUnmanagedDocId( + com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId.Builder + builderForValue) { + if (unmanagedDocIdBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + unmanagedDocIdBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 4; + return this; + } + /** + * + * + *
+     * A document id within unmanaged dataset.
+     * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId unmanaged_doc_id = 4; + * + */ + public Builder mergeUnmanagedDocId( + com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId value) { + if (unmanagedDocIdBuilder_ == null) { + if (typeCase_ == 4 + && type_ + != com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId + .getDefaultInstance()) { + type_ = + com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId.newBuilder( + (com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId) type_) + .mergeFrom(value) + .buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 4) { + unmanagedDocIdBuilder_.mergeFrom(value); + } else { + unmanagedDocIdBuilder_.setMessage(value); + } + } + typeCase_ = 4; + return this; + } + /** + * + * + *
+     * A document id within unmanaged dataset.
+     * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId unmanaged_doc_id = 4; + * + */ + public Builder clearUnmanagedDocId() { + if (unmanagedDocIdBuilder_ == null) { + if (typeCase_ == 4) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 4) { + typeCase_ = 0; + type_ = null; + } + unmanagedDocIdBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A document id within unmanaged dataset.
+     * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId unmanaged_doc_id = 4; + * + */ + public com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId.Builder + getUnmanagedDocIdBuilder() { + return getUnmanagedDocIdFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A document id within unmanaged dataset.
+     * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId unmanaged_doc_id = 4; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentIdOrBuilder + getUnmanagedDocIdOrBuilder() { + if ((typeCase_ == 4) && (unmanagedDocIdBuilder_ != null)) { + return unmanagedDocIdBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 4) { + return (com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId) type_; + } + return com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId + .getDefaultInstance(); + } + } + /** + * + * + *
+     * A document id within unmanaged dataset.
+     * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId unmanaged_doc_id = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId, + com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId.Builder, + com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentIdOrBuilder> + getUnmanagedDocIdFieldBuilder() { + if (unmanagedDocIdBuilder_ == null) { + if (!(typeCase_ == 4)) { + type_ = + com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId + .getDefaultInstance(); + } + unmanagedDocIdBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId, + com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId.Builder, + com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentIdOrBuilder>( + (com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 4; + onChanged(); + return unmanagedDocIdBuilder_; + } + + private com.google.cloud.documentai.v1beta3.RevisionRef revisionRef_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.RevisionRef, + com.google.cloud.documentai.v1beta3.RevisionRef.Builder, + com.google.cloud.documentai.v1beta3.RevisionRefOrBuilder> + revisionRefBuilder_; + /** + * + * + *
+     * Points to a specific revision of the document if set.
+     * 
+ * + * .google.cloud.documentai.v1beta3.RevisionRef revision_ref = 3; + * + * @return Whether the revisionRef field is set. + */ + public boolean hasRevisionRef() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Points to a specific revision of the document if set.
+     * 
+ * + * .google.cloud.documentai.v1beta3.RevisionRef revision_ref = 3; + * + * @return The revisionRef. + */ + public com.google.cloud.documentai.v1beta3.RevisionRef getRevisionRef() { + if (revisionRefBuilder_ == null) { + return revisionRef_ == null + ? com.google.cloud.documentai.v1beta3.RevisionRef.getDefaultInstance() + : revisionRef_; + } else { + return revisionRefBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Points to a specific revision of the document if set.
+     * 
+ * + * .google.cloud.documentai.v1beta3.RevisionRef revision_ref = 3; + */ + public Builder setRevisionRef(com.google.cloud.documentai.v1beta3.RevisionRef value) { + if (revisionRefBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + revisionRef_ = value; + } else { + revisionRefBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Points to a specific revision of the document if set.
+     * 
+ * + * .google.cloud.documentai.v1beta3.RevisionRef revision_ref = 3; + */ + public Builder setRevisionRef( + com.google.cloud.documentai.v1beta3.RevisionRef.Builder builderForValue) { + if (revisionRefBuilder_ == null) { + revisionRef_ = builderForValue.build(); + } else { + revisionRefBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Points to a specific revision of the document if set.
+     * 
+ * + * .google.cloud.documentai.v1beta3.RevisionRef revision_ref = 3; + */ + public Builder mergeRevisionRef(com.google.cloud.documentai.v1beta3.RevisionRef value) { + if (revisionRefBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && revisionRef_ != null + && revisionRef_ + != com.google.cloud.documentai.v1beta3.RevisionRef.getDefaultInstance()) { + getRevisionRefBuilder().mergeFrom(value); + } else { + revisionRef_ = value; + } + } else { + revisionRefBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Points to a specific revision of the document if set.
+     * 
+ * + * .google.cloud.documentai.v1beta3.RevisionRef revision_ref = 3; + */ + public Builder clearRevisionRef() { + bitField0_ = (bitField0_ & ~0x00000004); + revisionRef_ = null; + if (revisionRefBuilder_ != null) { + revisionRefBuilder_.dispose(); + revisionRefBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Points to a specific revision of the document if set.
+     * 
+ * + * .google.cloud.documentai.v1beta3.RevisionRef revision_ref = 3; + */ + public com.google.cloud.documentai.v1beta3.RevisionRef.Builder getRevisionRefBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getRevisionRefFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Points to a specific revision of the document if set.
+     * 
+ * + * .google.cloud.documentai.v1beta3.RevisionRef revision_ref = 3; + */ + public com.google.cloud.documentai.v1beta3.RevisionRefOrBuilder getRevisionRefOrBuilder() { + if (revisionRefBuilder_ != null) { + return revisionRefBuilder_.getMessageOrBuilder(); + } else { + return revisionRef_ == null + ? com.google.cloud.documentai.v1beta3.RevisionRef.getDefaultInstance() + : revisionRef_; + } + } + /** + * + * + *
+     * Points to a specific revision of the document if set.
+     * 
+ * + * .google.cloud.documentai.v1beta3.RevisionRef revision_ref = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.RevisionRef, + com.google.cloud.documentai.v1beta3.RevisionRef.Builder, + com.google.cloud.documentai.v1beta3.RevisionRefOrBuilder> + getRevisionRefFieldBuilder() { + if (revisionRefBuilder_ == null) { + revisionRefBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.RevisionRef, + com.google.cloud.documentai.v1beta3.RevisionRef.Builder, + com.google.cloud.documentai.v1beta3.RevisionRefOrBuilder>( + getRevisionRef(), getParentForChildren(), isClean()); + revisionRef_ = null; + } + return revisionRefBuilder_; + } + + @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.DocumentId) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.DocumentId) + private static final com.google.cloud.documentai.v1beta3.DocumentId DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta3.DocumentId(); + } + + public static com.google.cloud.documentai.v1beta3.DocumentId getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DocumentId parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.DocumentId getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentIdOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentIdOrBuilder.java new file mode 100644 index 000000000000..9a2cb96fbf8b --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentIdOrBuilder.java @@ -0,0 +1,140 @@ +/* + * Copyright 2023 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/dataset.proto + +package com.google.cloud.documentai.v1beta3; + +public interface DocumentIdOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.DocumentId) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A document id within user-managed Cloud Storage.
+   * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId gcs_managed_doc_id = 1; + * + * + * @return Whether the gcsManagedDocId field is set. + */ + boolean hasGcsManagedDocId(); + /** + * + * + *
+   * A document id within user-managed Cloud Storage.
+   * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId gcs_managed_doc_id = 1; + * + * + * @return The gcsManagedDocId. + */ + com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId getGcsManagedDocId(); + /** + * + * + *
+   * A document id within user-managed Cloud Storage.
+   * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId gcs_managed_doc_id = 1; + * + */ + com.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentIdOrBuilder + getGcsManagedDocIdOrBuilder(); + + /** + * + * + *
+   * A document id within unmanaged dataset.
+   * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId unmanaged_doc_id = 4; + * + * + * @return Whether the unmanagedDocId field is set. + */ + boolean hasUnmanagedDocId(); + /** + * + * + *
+   * A document id within unmanaged dataset.
+   * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId unmanaged_doc_id = 4; + * + * + * @return The unmanagedDocId. + */ + com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId getUnmanagedDocId(); + /** + * + * + *
+   * A document id within unmanaged dataset.
+   * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId unmanaged_doc_id = 4; + * + */ + com.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentIdOrBuilder + getUnmanagedDocIdOrBuilder(); + + /** + * + * + *
+   * Points to a specific revision of the document if set.
+   * 
+ * + * .google.cloud.documentai.v1beta3.RevisionRef revision_ref = 3; + * + * @return Whether the revisionRef field is set. + */ + boolean hasRevisionRef(); + /** + * + * + *
+   * Points to a specific revision of the document if set.
+   * 
+ * + * .google.cloud.documentai.v1beta3.RevisionRef revision_ref = 3; + * + * @return The revisionRef. + */ + com.google.cloud.documentai.v1beta3.RevisionRef getRevisionRef(); + /** + * + * + *
+   * Points to a specific revision of the document if set.
+   * 
+ * + * .google.cloud.documentai.v1beta3.RevisionRef revision_ref = 3; + */ + com.google.cloud.documentai.v1beta3.RevisionRefOrBuilder getRevisionRefOrBuilder(); + + com.google.cloud.documentai.v1beta3.DocumentId.TypeCase getTypeCase(); +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentPageRange.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentPageRange.java new file mode 100644 index 000000000000..8bf848d586f7 --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentPageRange.java @@ -0,0 +1,628 @@ +/* + * Copyright 2023 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_service.proto + +package com.google.cloud.documentai.v1beta3; + +/** + * + * + *
+ * Range of pages present in a document.
+ * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.DocumentPageRange} + */ +public final class DocumentPageRange extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.DocumentPageRange) + DocumentPageRangeOrBuilder { + private static final long serialVersionUID = 0L; + // Use DocumentPageRange.newBuilder() to construct. + private DocumentPageRange(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DocumentPageRange() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DocumentPageRange(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_DocumentPageRange_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_DocumentPageRange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.DocumentPageRange.class, + com.google.cloud.documentai.v1beta3.DocumentPageRange.Builder.class); + } + + public static final int START_FIELD_NUMBER = 1; + private int start_ = 0; + /** + * + * + *
+   * First page number (one-based index) to be returned.
+   * 
+ * + * int32 start = 1; + * + * @return The start. + */ + @java.lang.Override + public int getStart() { + return start_; + } + + public static final int END_FIELD_NUMBER = 2; + private int end_ = 0; + /** + * + * + *
+   * Last page number (one-based index) to be returned.
+   * 
+ * + * int32 end = 2; + * + * @return The end. + */ + @java.lang.Override + public int getEnd() { + return end_; + } + + 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 (start_ != 0) { + output.writeInt32(1, start_); + } + if (end_ != 0) { + output.writeInt32(2, end_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (start_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, start_); + } + if (end_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, end_); + } + size += getUnknownFields().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.DocumentPageRange)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.DocumentPageRange other = + (com.google.cloud.documentai.v1beta3.DocumentPageRange) obj; + + if (getStart() != other.getStart()) return false; + if (getEnd() != other.getEnd()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + START_FIELD_NUMBER; + hash = (53 * hash) + getStart(); + hash = (37 * hash) + END_FIELD_NUMBER; + hash = (53 * hash) + getEnd(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.DocumentPageRange parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.DocumentPageRange 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.DocumentPageRange parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.DocumentPageRange 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.DocumentPageRange parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.DocumentPageRange 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.DocumentPageRange parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.DocumentPageRange 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.DocumentPageRange parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.DocumentPageRange 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.DocumentPageRange 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.DocumentPageRange 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.DocumentPageRange 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; + } + /** + * + * + *
+   * Range of pages present in a document.
+   * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.DocumentPageRange} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.DocumentPageRange) + com.google.cloud.documentai.v1beta3.DocumentPageRangeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_DocumentPageRange_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_DocumentPageRange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.DocumentPageRange.class, + com.google.cloud.documentai.v1beta3.DocumentPageRange.Builder.class); + } + + // Construct using com.google.cloud.documentai.v1beta3.DocumentPageRange.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + start_ = 0; + end_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_DocumentPageRange_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.DocumentPageRange getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.DocumentPageRange.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.DocumentPageRange build() { + com.google.cloud.documentai.v1beta3.DocumentPageRange result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.DocumentPageRange buildPartial() { + com.google.cloud.documentai.v1beta3.DocumentPageRange result = + new com.google.cloud.documentai.v1beta3.DocumentPageRange(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.documentai.v1beta3.DocumentPageRange result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.start_ = start_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.end_ = end_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta3.DocumentPageRange) { + return mergeFrom((com.google.cloud.documentai.v1beta3.DocumentPageRange) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.documentai.v1beta3.DocumentPageRange other) { + if (other == com.google.cloud.documentai.v1beta3.DocumentPageRange.getDefaultInstance()) + return this; + if (other.getStart() != 0) { + setStart(other.getStart()); + } + if (other.getEnd() != 0) { + setEnd(other.getEnd()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + start_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + end_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int start_; + /** + * + * + *
+     * First page number (one-based index) to be returned.
+     * 
+ * + * int32 start = 1; + * + * @return The start. + */ + @java.lang.Override + public int getStart() { + return start_; + } + /** + * + * + *
+     * First page number (one-based index) to be returned.
+     * 
+ * + * int32 start = 1; + * + * @param value The start to set. + * @return This builder for chaining. + */ + public Builder setStart(int value) { + + start_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * First page number (one-based index) to be returned.
+     * 
+ * + * int32 start = 1; + * + * @return This builder for chaining. + */ + public Builder clearStart() { + bitField0_ = (bitField0_ & ~0x00000001); + start_ = 0; + onChanged(); + return this; + } + + private int end_; + /** + * + * + *
+     * Last page number (one-based index) to be returned.
+     * 
+ * + * int32 end = 2; + * + * @return The end. + */ + @java.lang.Override + public int getEnd() { + return end_; + } + /** + * + * + *
+     * Last page number (one-based index) to be returned.
+     * 
+ * + * int32 end = 2; + * + * @param value The end to set. + * @return This builder for chaining. + */ + public Builder setEnd(int value) { + + end_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Last page number (one-based index) to be returned.
+     * 
+ * + * int32 end = 2; + * + * @return This builder for chaining. + */ + public Builder clearEnd() { + bitField0_ = (bitField0_ & ~0x00000002); + end_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.DocumentPageRange) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.DocumentPageRange) + private static final com.google.cloud.documentai.v1beta3.DocumentPageRange DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta3.DocumentPageRange(); + } + + public static com.google.cloud.documentai.v1beta3.DocumentPageRange getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DocumentPageRange parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.DocumentPageRange getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentPageRangeOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentPageRangeOrBuilder.java new file mode 100644 index 000000000000..af56344f31ca --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentPageRangeOrBuilder.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 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_service.proto + +package com.google.cloud.documentai.v1beta3; + +public interface DocumentPageRangeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.DocumentPageRange) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * First page number (one-based index) to be returned.
+   * 
+ * + * int32 start = 1; + * + * @return The start. + */ + int getStart(); + + /** + * + * + *
+   * Last page number (one-based index) to be returned.
+   * 
+ * + * int32 end = 2; + * + * @return The end. + */ + int getEnd(); +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProto.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProto.java index 48925cd037c3..3547304e10fa 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProto.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProto.java @@ -175,6 +175,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_documentai_v1beta3_Document_TextChange_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_documentai_v1beta3_Document_TextChange_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_RevisionRef_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_RevisionRef_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -425,13 +429,20 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + ".Document.TextAnchor\022\024\n\014changed_text\030\002 \001" + "(\t\022L\n\nprovenance\030\003 \003(\01324.google.cloud.do" + "cumentai.v1beta3.Document.ProvenanceB\002\030\001" - + "B\010\n\006sourceB\344\001\n#com.google.cloud.document" - + "ai.v1beta3B\rDocumentProtoP\001ZCcloud.googl" - + "e.com/go/documentai/apiv1beta3/documenta" - + "ipb;documentaipb\252\002\037Google.Cloud.Document" - + "AI.V1Beta3\312\002\037Google\\Cloud\\DocumentAI\\V1b" - + "eta3\352\002\"Google::Cloud::DocumentAI::V1beta" - + "3b\006proto3" + + "B\010\n\006source\"\233\002\n\013RevisionRef\022R\n\rrevision_c" + + "ase\030\001 \001(\01629.google.cloud.documentai.v1be" + + "ta3.RevisionRef.RevisionCaseH\000\022\025\n\013revisi" + + "on_id\030\002 \001(\tH\000\022\"\n\030latest_processor_versio" + + "n\030\003 \001(\tH\000\"s\n\014RevisionCase\022\035\n\031REVISION_CA" + + "SE_UNSPECIFIED\020\000\022\027\n\023LATEST_HUMAN_REVIEW\020" + + "\001\022\024\n\020LATEST_TIMESTAMP\020\002\022\025\n\021BASE_OCR_REVI" + + "SION\020\003B\010\n\006sourceB\344\001\n#com.google.cloud.do" + + "cumentai.v1beta3B\rDocumentProtoP\001ZCcloud" + + ".google.com/go/documentai/apiv1beta3/doc" + + "umentaipb;documentaipb\252\002\037Google.Cloud.Do" + + "cumentAI.V1Beta3\312\002\037Google\\Cloud\\Document" + + "AI\\V1beta3\352\002\"Google::Cloud::DocumentAI::" + + "V1beta3b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -877,6 +888,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "TextAnchor", "ChangedText", "Provenance", }); + internal_static_google_cloud_documentai_v1beta3_RevisionRef_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_documentai_v1beta3_RevisionRef_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_RevisionRef_descriptor, + new java.lang.String[] { + "RevisionCase", "RevisionId", "LatestProcessorVersion", "Source", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/GetDocumentRequest.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/GetDocumentRequest.java new file mode 100644 index 000000000000..7240fd6875c6 --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/GetDocumentRequest.java @@ -0,0 +1,1472 @@ +/* + * Copyright 2023 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_service.proto + +package com.google.cloud.documentai.v1beta3; + +/** Protobuf type {@code google.cloud.documentai.v1beta3.GetDocumentRequest} */ +public final class GetDocumentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.GetDocumentRequest) + GetDocumentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetDocumentRequest.newBuilder() to construct. + private GetDocumentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetDocumentRequest() { + dataset_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetDocumentRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_GetDocumentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_GetDocumentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.GetDocumentRequest.class, + com.google.cloud.documentai.v1beta3.GetDocumentRequest.Builder.class); + } + + public static final int DATASET_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object dataset_ = ""; + /** + * + * + *
+   * Required. The resource name of the dataset that the document belongs to .
+   * Format:
+   * projects/{project}/locations/{location}/processors/{processor}/dataset
+   * 
+ * + * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The dataset. + */ + @java.lang.Override + public java.lang.String getDataset() { + java.lang.Object ref = dataset_; + 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(); + dataset_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the dataset that the document belongs to .
+   * Format:
+   * projects/{project}/locations/{location}/processors/{processor}/dataset
+   * 
+ * + * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for dataset. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatasetBytes() { + java.lang.Object ref = dataset_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DOCUMENT_ID_FIELD_NUMBER = 2; + private com.google.cloud.documentai.v1beta3.DocumentId documentId_; + /** + * + * + *
+   * Required. Document identifier.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.DocumentId document_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the documentId field is set. + */ + @java.lang.Override + public boolean hasDocumentId() { + return documentId_ != null; + } + /** + * + * + *
+   * Required. Document identifier.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.DocumentId document_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The documentId. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.DocumentId getDocumentId() { + return documentId_ == null + ? com.google.cloud.documentai.v1beta3.DocumentId.getDefaultInstance() + : documentId_; + } + /** + * + * + *
+   * Required. Document identifier.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.DocumentId document_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.DocumentIdOrBuilder getDocumentIdOrBuilder() { + return documentId_ == null + ? com.google.cloud.documentai.v1beta3.DocumentId.getDefaultInstance() + : documentId_; + } + + public static final int READ_MASK_FIELD_NUMBER = 3; + private com.google.protobuf.FieldMask readMask_; + /** + * + * + *
+   * If set, only fields listed here will be returned. Otherwise, all fields
+   * will be returned by default.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 3; + * + * @return Whether the readMask field is set. + */ + @java.lang.Override + public boolean hasReadMask() { + return readMask_ != null; + } + /** + * + * + *
+   * If set, only fields listed here will be returned. Otherwise, all fields
+   * will be returned by default.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 3; + * + * @return The readMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getReadMask() { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + /** + * + * + *
+   * If set, only fields listed here will be returned. Otherwise, all fields
+   * will be returned by default.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 3; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + + public static final int PAGE_RANGE_FIELD_NUMBER = 4; + private com.google.cloud.documentai.v1beta3.DocumentPageRange pageRange_; + /** + * + * + *
+   * List of pages for which the fields specified in the `read_mask` must
+   * be served.
+   * 
+ * + * .google.cloud.documentai.v1beta3.DocumentPageRange page_range = 4; + * + * @return Whether the pageRange field is set. + */ + @java.lang.Override + public boolean hasPageRange() { + return pageRange_ != null; + } + /** + * + * + *
+   * List of pages for which the fields specified in the `read_mask` must
+   * be served.
+   * 
+ * + * .google.cloud.documentai.v1beta3.DocumentPageRange page_range = 4; + * + * @return The pageRange. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.DocumentPageRange getPageRange() { + return pageRange_ == null + ? com.google.cloud.documentai.v1beta3.DocumentPageRange.getDefaultInstance() + : pageRange_; + } + /** + * + * + *
+   * List of pages for which the fields specified in the `read_mask` must
+   * be served.
+   * 
+ * + * .google.cloud.documentai.v1beta3.DocumentPageRange page_range = 4; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.DocumentPageRangeOrBuilder getPageRangeOrBuilder() { + return pageRange_ == null + ? com.google.cloud.documentai.v1beta3.DocumentPageRange.getDefaultInstance() + : pageRange_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataset_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, dataset_); + } + if (documentId_ != null) { + output.writeMessage(2, getDocumentId()); + } + if (readMask_ != null) { + output.writeMessage(3, getReadMask()); + } + if (pageRange_ != null) { + output.writeMessage(4, getPageRange()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataset_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, dataset_); + } + if (documentId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDocumentId()); + } + if (readMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getReadMask()); + } + if (pageRange_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getPageRange()); + } + size += getUnknownFields().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.GetDocumentRequest)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.GetDocumentRequest other = + (com.google.cloud.documentai.v1beta3.GetDocumentRequest) obj; + + if (!getDataset().equals(other.getDataset())) return false; + if (hasDocumentId() != other.hasDocumentId()) return false; + if (hasDocumentId()) { + if (!getDocumentId().equals(other.getDocumentId())) return false; + } + if (hasReadMask() != other.hasReadMask()) return false; + if (hasReadMask()) { + if (!getReadMask().equals(other.getReadMask())) return false; + } + if (hasPageRange() != other.hasPageRange()) return false; + if (hasPageRange()) { + if (!getPageRange().equals(other.getPageRange())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + DATASET_FIELD_NUMBER; + hash = (53 * hash) + getDataset().hashCode(); + if (hasDocumentId()) { + hash = (37 * hash) + DOCUMENT_ID_FIELD_NUMBER; + hash = (53 * hash) + getDocumentId().hashCode(); + } + if (hasReadMask()) { + hash = (37 * hash) + READ_MASK_FIELD_NUMBER; + hash = (53 * hash) + getReadMask().hashCode(); + } + if (hasPageRange()) { + hash = (37 * hash) + PAGE_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getPageRange().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.GetDocumentRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.GetDocumentRequest 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.GetDocumentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.GetDocumentRequest 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.GetDocumentRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.GetDocumentRequest 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.GetDocumentRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.GetDocumentRequest 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.GetDocumentRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.GetDocumentRequest 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.GetDocumentRequest 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.GetDocumentRequest 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.GetDocumentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** Protobuf type {@code google.cloud.documentai.v1beta3.GetDocumentRequest} */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.GetDocumentRequest) + com.google.cloud.documentai.v1beta3.GetDocumentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_GetDocumentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_GetDocumentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.GetDocumentRequest.class, + com.google.cloud.documentai.v1beta3.GetDocumentRequest.Builder.class); + } + + // Construct using com.google.cloud.documentai.v1beta3.GetDocumentRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + dataset_ = ""; + documentId_ = null; + if (documentIdBuilder_ != null) { + documentIdBuilder_.dispose(); + documentIdBuilder_ = null; + } + readMask_ = null; + if (readMaskBuilder_ != null) { + readMaskBuilder_.dispose(); + readMaskBuilder_ = null; + } + pageRange_ = null; + if (pageRangeBuilder_ != null) { + pageRangeBuilder_.dispose(); + pageRangeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_GetDocumentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.GetDocumentRequest getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.GetDocumentRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.GetDocumentRequest build() { + com.google.cloud.documentai.v1beta3.GetDocumentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.GetDocumentRequest buildPartial() { + com.google.cloud.documentai.v1beta3.GetDocumentRequest result = + new com.google.cloud.documentai.v1beta3.GetDocumentRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.documentai.v1beta3.GetDocumentRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.dataset_ = dataset_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.documentId_ = documentIdBuilder_ == null ? documentId_ : documentIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.readMask_ = readMaskBuilder_ == null ? readMask_ : readMaskBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.pageRange_ = pageRangeBuilder_ == null ? pageRange_ : pageRangeBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta3.GetDocumentRequest) { + return mergeFrom((com.google.cloud.documentai.v1beta3.GetDocumentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.documentai.v1beta3.GetDocumentRequest other) { + if (other == com.google.cloud.documentai.v1beta3.GetDocumentRequest.getDefaultInstance()) + return this; + if (!other.getDataset().isEmpty()) { + dataset_ = other.dataset_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasDocumentId()) { + mergeDocumentId(other.getDocumentId()); + } + if (other.hasReadMask()) { + mergeReadMask(other.getReadMask()); + } + if (other.hasPageRange()) { + mergePageRange(other.getPageRange()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + dataset_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getDocumentIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getReadMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getPageRangeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object dataset_ = ""; + /** + * + * + *
+     * Required. The resource name of the dataset that the document belongs to .
+     * Format:
+     * projects/{project}/locations/{location}/processors/{processor}/dataset
+     * 
+ * + * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The dataset. + */ + public java.lang.String getDataset() { + java.lang.Object ref = dataset_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataset_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the dataset that the document belongs to .
+     * Format:
+     * projects/{project}/locations/{location}/processors/{processor}/dataset
+     * 
+ * + * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for dataset. + */ + public com.google.protobuf.ByteString getDatasetBytes() { + java.lang.Object ref = dataset_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the dataset that the document belongs to .
+     * Format:
+     * projects/{project}/locations/{location}/processors/{processor}/dataset
+     * 
+ * + * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The dataset to set. + * @return This builder for chaining. + */ + public Builder setDataset(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dataset_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the dataset that the document belongs to .
+     * Format:
+     * projects/{project}/locations/{location}/processors/{processor}/dataset
+     * 
+ * + * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearDataset() { + dataset_ = getDefaultInstance().getDataset(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the dataset that the document belongs to .
+     * Format:
+     * projects/{project}/locations/{location}/processors/{processor}/dataset
+     * 
+ * + * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for dataset to set. + * @return This builder for chaining. + */ + public Builder setDatasetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dataset_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.documentai.v1beta3.DocumentId documentId_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.DocumentId, + com.google.cloud.documentai.v1beta3.DocumentId.Builder, + com.google.cloud.documentai.v1beta3.DocumentIdOrBuilder> + documentIdBuilder_; + /** + * + * + *
+     * Required. Document identifier.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.DocumentId document_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the documentId field is set. + */ + public boolean hasDocumentId() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. Document identifier.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.DocumentId document_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The documentId. + */ + public com.google.cloud.documentai.v1beta3.DocumentId getDocumentId() { + if (documentIdBuilder_ == null) { + return documentId_ == null + ? com.google.cloud.documentai.v1beta3.DocumentId.getDefaultInstance() + : documentId_; + } else { + return documentIdBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Document identifier.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.DocumentId document_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDocumentId(com.google.cloud.documentai.v1beta3.DocumentId value) { + if (documentIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + documentId_ = value; + } else { + documentIdBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Document identifier.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.DocumentId document_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDocumentId( + com.google.cloud.documentai.v1beta3.DocumentId.Builder builderForValue) { + if (documentIdBuilder_ == null) { + documentId_ = builderForValue.build(); + } else { + documentIdBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Document identifier.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.DocumentId document_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeDocumentId(com.google.cloud.documentai.v1beta3.DocumentId value) { + if (documentIdBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && documentId_ != null + && documentId_ != com.google.cloud.documentai.v1beta3.DocumentId.getDefaultInstance()) { + getDocumentIdBuilder().mergeFrom(value); + } else { + documentId_ = value; + } + } else { + documentIdBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Document identifier.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.DocumentId document_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDocumentId() { + bitField0_ = (bitField0_ & ~0x00000002); + documentId_ = null; + if (documentIdBuilder_ != null) { + documentIdBuilder_.dispose(); + documentIdBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Document identifier.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.DocumentId document_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.documentai.v1beta3.DocumentId.Builder getDocumentIdBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getDocumentIdFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Document identifier.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.DocumentId document_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.documentai.v1beta3.DocumentIdOrBuilder getDocumentIdOrBuilder() { + if (documentIdBuilder_ != null) { + return documentIdBuilder_.getMessageOrBuilder(); + } else { + return documentId_ == null + ? com.google.cloud.documentai.v1beta3.DocumentId.getDefaultInstance() + : documentId_; + } + } + /** + * + * + *
+     * Required. Document identifier.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.DocumentId document_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.DocumentId, + com.google.cloud.documentai.v1beta3.DocumentId.Builder, + com.google.cloud.documentai.v1beta3.DocumentIdOrBuilder> + getDocumentIdFieldBuilder() { + if (documentIdBuilder_ == null) { + documentIdBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.DocumentId, + com.google.cloud.documentai.v1beta3.DocumentId.Builder, + com.google.cloud.documentai.v1beta3.DocumentIdOrBuilder>( + getDocumentId(), getParentForChildren(), isClean()); + documentId_ = null; + } + return documentIdBuilder_; + } + + private com.google.protobuf.FieldMask readMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + readMaskBuilder_; + /** + * + * + *
+     * If set, only fields listed here will be returned. Otherwise, all fields
+     * will be returned by default.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 3; + * + * @return Whether the readMask field is set. + */ + public boolean hasReadMask() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * If set, only fields listed here will be returned. Otherwise, all fields
+     * will be returned by default.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 3; + * + * @return The readMask. + */ + public com.google.protobuf.FieldMask getReadMask() { + if (readMaskBuilder_ == null) { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } else { + return readMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * If set, only fields listed here will be returned. Otherwise, all fields
+     * will be returned by default.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 3; + */ + public Builder setReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readMask_ = value; + } else { + readMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * If set, only fields listed here will be returned. Otherwise, all fields
+     * will be returned by default.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 3; + */ + public Builder setReadMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (readMaskBuilder_ == null) { + readMask_ = builderForValue.build(); + } else { + readMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * If set, only fields listed here will be returned. Otherwise, all fields
+     * will be returned by default.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 3; + */ + public Builder mergeReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && readMask_ != null + && readMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getReadMaskBuilder().mergeFrom(value); + } else { + readMask_ = value; + } + } else { + readMaskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * If set, only fields listed here will be returned. Otherwise, all fields
+     * will be returned by default.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 3; + */ + public Builder clearReadMask() { + bitField0_ = (bitField0_ & ~0x00000004); + readMask_ = null; + if (readMaskBuilder_ != null) { + readMaskBuilder_.dispose(); + readMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * If set, only fields listed here will be returned. Otherwise, all fields
+     * will be returned by default.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 3; + */ + public com.google.protobuf.FieldMask.Builder getReadMaskBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getReadMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * If set, only fields listed here will be returned. Otherwise, all fields
+     * will be returned by default.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 3; + */ + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + if (readMaskBuilder_ != null) { + return readMaskBuilder_.getMessageOrBuilder(); + } else { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + } + /** + * + * + *
+     * If set, only fields listed here will be returned. Otherwise, all fields
+     * will be returned by default.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getReadMaskFieldBuilder() { + if (readMaskBuilder_ == null) { + readMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getReadMask(), getParentForChildren(), isClean()); + readMask_ = null; + } + return readMaskBuilder_; + } + + private com.google.cloud.documentai.v1beta3.DocumentPageRange pageRange_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.DocumentPageRange, + com.google.cloud.documentai.v1beta3.DocumentPageRange.Builder, + com.google.cloud.documentai.v1beta3.DocumentPageRangeOrBuilder> + pageRangeBuilder_; + /** + * + * + *
+     * List of pages for which the fields specified in the `read_mask` must
+     * be served.
+     * 
+ * + * .google.cloud.documentai.v1beta3.DocumentPageRange page_range = 4; + * + * @return Whether the pageRange field is set. + */ + public boolean hasPageRange() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * List of pages for which the fields specified in the `read_mask` must
+     * be served.
+     * 
+ * + * .google.cloud.documentai.v1beta3.DocumentPageRange page_range = 4; + * + * @return The pageRange. + */ + public com.google.cloud.documentai.v1beta3.DocumentPageRange getPageRange() { + if (pageRangeBuilder_ == null) { + return pageRange_ == null + ? com.google.cloud.documentai.v1beta3.DocumentPageRange.getDefaultInstance() + : pageRange_; + } else { + return pageRangeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * List of pages for which the fields specified in the `read_mask` must
+     * be served.
+     * 
+ * + * .google.cloud.documentai.v1beta3.DocumentPageRange page_range = 4; + */ + public Builder setPageRange(com.google.cloud.documentai.v1beta3.DocumentPageRange value) { + if (pageRangeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + pageRange_ = value; + } else { + pageRangeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * List of pages for which the fields specified in the `read_mask` must
+     * be served.
+     * 
+ * + * .google.cloud.documentai.v1beta3.DocumentPageRange page_range = 4; + */ + public Builder setPageRange( + com.google.cloud.documentai.v1beta3.DocumentPageRange.Builder builderForValue) { + if (pageRangeBuilder_ == null) { + pageRange_ = builderForValue.build(); + } else { + pageRangeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * List of pages for which the fields specified in the `read_mask` must
+     * be served.
+     * 
+ * + * .google.cloud.documentai.v1beta3.DocumentPageRange page_range = 4; + */ + public Builder mergePageRange(com.google.cloud.documentai.v1beta3.DocumentPageRange value) { + if (pageRangeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && pageRange_ != null + && pageRange_ + != com.google.cloud.documentai.v1beta3.DocumentPageRange.getDefaultInstance()) { + getPageRangeBuilder().mergeFrom(value); + } else { + pageRange_ = value; + } + } else { + pageRangeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * List of pages for which the fields specified in the `read_mask` must
+     * be served.
+     * 
+ * + * .google.cloud.documentai.v1beta3.DocumentPageRange page_range = 4; + */ + public Builder clearPageRange() { + bitField0_ = (bitField0_ & ~0x00000008); + pageRange_ = null; + if (pageRangeBuilder_ != null) { + pageRangeBuilder_.dispose(); + pageRangeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * List of pages for which the fields specified in the `read_mask` must
+     * be served.
+     * 
+ * + * .google.cloud.documentai.v1beta3.DocumentPageRange page_range = 4; + */ + public com.google.cloud.documentai.v1beta3.DocumentPageRange.Builder getPageRangeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getPageRangeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * List of pages for which the fields specified in the `read_mask` must
+     * be served.
+     * 
+ * + * .google.cloud.documentai.v1beta3.DocumentPageRange page_range = 4; + */ + public com.google.cloud.documentai.v1beta3.DocumentPageRangeOrBuilder getPageRangeOrBuilder() { + if (pageRangeBuilder_ != null) { + return pageRangeBuilder_.getMessageOrBuilder(); + } else { + return pageRange_ == null + ? com.google.cloud.documentai.v1beta3.DocumentPageRange.getDefaultInstance() + : pageRange_; + } + } + /** + * + * + *
+     * List of pages for which the fields specified in the `read_mask` must
+     * be served.
+     * 
+ * + * .google.cloud.documentai.v1beta3.DocumentPageRange page_range = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.DocumentPageRange, + com.google.cloud.documentai.v1beta3.DocumentPageRange.Builder, + com.google.cloud.documentai.v1beta3.DocumentPageRangeOrBuilder> + getPageRangeFieldBuilder() { + if (pageRangeBuilder_ == null) { + pageRangeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.DocumentPageRange, + com.google.cloud.documentai.v1beta3.DocumentPageRange.Builder, + com.google.cloud.documentai.v1beta3.DocumentPageRangeOrBuilder>( + getPageRange(), getParentForChildren(), isClean()); + pageRange_ = null; + } + return pageRangeBuilder_; + } + + @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.GetDocumentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.GetDocumentRequest) + private static final com.google.cloud.documentai.v1beta3.GetDocumentRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta3.GetDocumentRequest(); + } + + public static com.google.cloud.documentai.v1beta3.GetDocumentRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetDocumentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.GetDocumentRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/GetDocumentRequestOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/GetDocumentRequestOrBuilder.java new file mode 100644 index 000000000000..3b1e7cd5cbff --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/GetDocumentRequestOrBuilder.java @@ -0,0 +1,175 @@ +/* + * Copyright 2023 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_service.proto + +package com.google.cloud.documentai.v1beta3; + +public interface GetDocumentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.GetDocumentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the dataset that the document belongs to .
+   * Format:
+   * projects/{project}/locations/{location}/processors/{processor}/dataset
+   * 
+ * + * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The dataset. + */ + java.lang.String getDataset(); + /** + * + * + *
+   * Required. The resource name of the dataset that the document belongs to .
+   * Format:
+   * projects/{project}/locations/{location}/processors/{processor}/dataset
+   * 
+ * + * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for dataset. + */ + com.google.protobuf.ByteString getDatasetBytes(); + + /** + * + * + *
+   * Required. Document identifier.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.DocumentId document_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the documentId field is set. + */ + boolean hasDocumentId(); + /** + * + * + *
+   * Required. Document identifier.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.DocumentId document_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The documentId. + */ + com.google.cloud.documentai.v1beta3.DocumentId getDocumentId(); + /** + * + * + *
+   * Required. Document identifier.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.DocumentId document_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.documentai.v1beta3.DocumentIdOrBuilder getDocumentIdOrBuilder(); + + /** + * + * + *
+   * If set, only fields listed here will be returned. Otherwise, all fields
+   * will be returned by default.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 3; + * + * @return Whether the readMask field is set. + */ + boolean hasReadMask(); + /** + * + * + *
+   * If set, only fields listed here will be returned. Otherwise, all fields
+   * will be returned by default.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 3; + * + * @return The readMask. + */ + com.google.protobuf.FieldMask getReadMask(); + /** + * + * + *
+   * If set, only fields listed here will be returned. Otherwise, all fields
+   * will be returned by default.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 3; + */ + com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder(); + + /** + * + * + *
+   * List of pages for which the fields specified in the `read_mask` must
+   * be served.
+   * 
+ * + * .google.cloud.documentai.v1beta3.DocumentPageRange page_range = 4; + * + * @return Whether the pageRange field is set. + */ + boolean hasPageRange(); + /** + * + * + *
+   * List of pages for which the fields specified in the `read_mask` must
+   * be served.
+   * 
+ * + * .google.cloud.documentai.v1beta3.DocumentPageRange page_range = 4; + * + * @return The pageRange. + */ + com.google.cloud.documentai.v1beta3.DocumentPageRange getPageRange(); + /** + * + * + *
+   * List of pages for which the fields specified in the `read_mask` must
+   * be served.
+   * 
+ * + * .google.cloud.documentai.v1beta3.DocumentPageRange page_range = 4; + */ + com.google.cloud.documentai.v1beta3.DocumentPageRangeOrBuilder getPageRangeOrBuilder(); +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/GetDocumentResponse.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/GetDocumentResponse.java new file mode 100644 index 000000000000..a54ff9168666 --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/GetDocumentResponse.java @@ -0,0 +1,603 @@ +/* + * Copyright 2023 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_service.proto + +package com.google.cloud.documentai.v1beta3; + +/** Protobuf type {@code google.cloud.documentai.v1beta3.GetDocumentResponse} */ +public final class GetDocumentResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.GetDocumentResponse) + GetDocumentResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetDocumentResponse.newBuilder() to construct. + private GetDocumentResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetDocumentResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetDocumentResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_GetDocumentResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_GetDocumentResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.GetDocumentResponse.class, + com.google.cloud.documentai.v1beta3.GetDocumentResponse.Builder.class); + } + + public static final int DOCUMENT_FIELD_NUMBER = 1; + private com.google.cloud.documentai.v1beta3.Document document_; + /** + * .google.cloud.documentai.v1beta3.Document document = 1; + * + * @return Whether the document field is set. + */ + @java.lang.Override + public boolean hasDocument() { + return document_ != null; + } + /** + * .google.cloud.documentai.v1beta3.Document document = 1; + * + * @return The document. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document getDocument() { + return document_ == null + ? com.google.cloud.documentai.v1beta3.Document.getDefaultInstance() + : document_; + } + /** .google.cloud.documentai.v1beta3.Document document = 1; */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.DocumentOrBuilder getDocumentOrBuilder() { + return document_ == null + ? com.google.cloud.documentai.v1beta3.Document.getDefaultInstance() + : document_; + } + + 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 (document_ != null) { + output.writeMessage(1, getDocument()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (document_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDocument()); + } + size += getUnknownFields().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.GetDocumentResponse)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.GetDocumentResponse other = + (com.google.cloud.documentai.v1beta3.GetDocumentResponse) obj; + + if (hasDocument() != other.hasDocument()) return false; + if (hasDocument()) { + if (!getDocument().equals(other.getDocument())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDocument()) { + hash = (37 * hash) + DOCUMENT_FIELD_NUMBER; + hash = (53 * hash) + getDocument().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.GetDocumentResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.GetDocumentResponse 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.GetDocumentResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.GetDocumentResponse 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.GetDocumentResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.GetDocumentResponse 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.GetDocumentResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.GetDocumentResponse 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.GetDocumentResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.GetDocumentResponse 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.GetDocumentResponse 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.GetDocumentResponse 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.GetDocumentResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** Protobuf type {@code google.cloud.documentai.v1beta3.GetDocumentResponse} */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.GetDocumentResponse) + com.google.cloud.documentai.v1beta3.GetDocumentResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_GetDocumentResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_GetDocumentResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.GetDocumentResponse.class, + com.google.cloud.documentai.v1beta3.GetDocumentResponse.Builder.class); + } + + // Construct using com.google.cloud.documentai.v1beta3.GetDocumentResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + document_ = null; + if (documentBuilder_ != null) { + documentBuilder_.dispose(); + documentBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_GetDocumentResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.GetDocumentResponse getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.GetDocumentResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.GetDocumentResponse build() { + com.google.cloud.documentai.v1beta3.GetDocumentResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.GetDocumentResponse buildPartial() { + com.google.cloud.documentai.v1beta3.GetDocumentResponse result = + new com.google.cloud.documentai.v1beta3.GetDocumentResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.documentai.v1beta3.GetDocumentResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.document_ = documentBuilder_ == null ? document_ : documentBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta3.GetDocumentResponse) { + return mergeFrom((com.google.cloud.documentai.v1beta3.GetDocumentResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.documentai.v1beta3.GetDocumentResponse other) { + if (other == com.google.cloud.documentai.v1beta3.GetDocumentResponse.getDefaultInstance()) + return this; + if (other.hasDocument()) { + mergeDocument(other.getDocument()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getDocumentFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.documentai.v1beta3.Document document_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document, + com.google.cloud.documentai.v1beta3.Document.Builder, + com.google.cloud.documentai.v1beta3.DocumentOrBuilder> + documentBuilder_; + /** + * .google.cloud.documentai.v1beta3.Document document = 1; + * + * @return Whether the document field is set. + */ + public boolean hasDocument() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .google.cloud.documentai.v1beta3.Document document = 1; + * + * @return The document. + */ + public com.google.cloud.documentai.v1beta3.Document getDocument() { + if (documentBuilder_ == null) { + return document_ == null + ? com.google.cloud.documentai.v1beta3.Document.getDefaultInstance() + : document_; + } else { + return documentBuilder_.getMessage(); + } + } + /** .google.cloud.documentai.v1beta3.Document document = 1; */ + public Builder setDocument(com.google.cloud.documentai.v1beta3.Document value) { + if (documentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + document_ = value; + } else { + documentBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** .google.cloud.documentai.v1beta3.Document document = 1; */ + public Builder setDocument( + com.google.cloud.documentai.v1beta3.Document.Builder builderForValue) { + if (documentBuilder_ == null) { + document_ = builderForValue.build(); + } else { + documentBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** .google.cloud.documentai.v1beta3.Document document = 1; */ + public Builder mergeDocument(com.google.cloud.documentai.v1beta3.Document value) { + if (documentBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && document_ != null + && document_ != com.google.cloud.documentai.v1beta3.Document.getDefaultInstance()) { + getDocumentBuilder().mergeFrom(value); + } else { + document_ = value; + } + } else { + documentBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** .google.cloud.documentai.v1beta3.Document document = 1; */ + public Builder clearDocument() { + bitField0_ = (bitField0_ & ~0x00000001); + document_ = null; + if (documentBuilder_ != null) { + documentBuilder_.dispose(); + documentBuilder_ = null; + } + onChanged(); + return this; + } + /** .google.cloud.documentai.v1beta3.Document document = 1; */ + public com.google.cloud.documentai.v1beta3.Document.Builder getDocumentBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getDocumentFieldBuilder().getBuilder(); + } + /** .google.cloud.documentai.v1beta3.Document document = 1; */ + public com.google.cloud.documentai.v1beta3.DocumentOrBuilder getDocumentOrBuilder() { + if (documentBuilder_ != null) { + return documentBuilder_.getMessageOrBuilder(); + } else { + return document_ == null + ? com.google.cloud.documentai.v1beta3.Document.getDefaultInstance() + : document_; + } + } + /** .google.cloud.documentai.v1beta3.Document document = 1; */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document, + com.google.cloud.documentai.v1beta3.Document.Builder, + com.google.cloud.documentai.v1beta3.DocumentOrBuilder> + getDocumentFieldBuilder() { + if (documentBuilder_ == null) { + documentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document, + com.google.cloud.documentai.v1beta3.Document.Builder, + com.google.cloud.documentai.v1beta3.DocumentOrBuilder>( + getDocument(), getParentForChildren(), isClean()); + document_ = null; + } + return documentBuilder_; + } + + @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.GetDocumentResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.GetDocumentResponse) + private static final com.google.cloud.documentai.v1beta3.GetDocumentResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta3.GetDocumentResponse(); + } + + public static com.google.cloud.documentai.v1beta3.GetDocumentResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetDocumentResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.GetDocumentResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/GetDocumentResponseOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/GetDocumentResponseOrBuilder.java new file mode 100644 index 000000000000..f23d8ace0c06 --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/GetDocumentResponseOrBuilder.java @@ -0,0 +1,40 @@ +/* + * Copyright 2023 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_service.proto + +package com.google.cloud.documentai.v1beta3; + +public interface GetDocumentResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.GetDocumentResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .google.cloud.documentai.v1beta3.Document document = 1; + * + * @return Whether the document field is set. + */ + boolean hasDocument(); + /** + * .google.cloud.documentai.v1beta3.Document document = 1; + * + * @return The document. + */ + com.google.cloud.documentai.v1beta3.Document getDocument(); + /** .google.cloud.documentai.v1beta3.Document document = 1; */ + com.google.cloud.documentai.v1beta3.DocumentOrBuilder getDocumentOrBuilder(); +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ImportDocumentsMetadata.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ImportDocumentsMetadata.java new file mode 100644 index 000000000000..5fc1ecbe0e44 --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ImportDocumentsMetadata.java @@ -0,0 +1,4308 @@ +/* + * Copyright 2023 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_service.proto + +package com.google.cloud.documentai.v1beta3; + +/** + * + * + *
+ * Metadata of the import document operation.
+ * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.ImportDocumentsMetadata} + */ +public final class ImportDocumentsMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.ImportDocumentsMetadata) + ImportDocumentsMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportDocumentsMetadata.newBuilder() to construct. + private ImportDocumentsMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportDocumentsMetadata() { + individualImportStatuses_ = java.util.Collections.emptyList(); + importConfigValidationResults_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImportDocumentsMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_ImportDocumentsMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_ImportDocumentsMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.class, + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.Builder.class); + } + + public interface IndividualImportStatusOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The source Cloud Storage URI of the document.
+     * 
+ * + * string input_gcs_source = 1; + * + * @return The inputGcsSource. + */ + java.lang.String getInputGcsSource(); + /** + * + * + *
+     * The source Cloud Storage URI of the document.
+     * 
+ * + * string input_gcs_source = 1; + * + * @return The bytes for inputGcsSource. + */ + com.google.protobuf.ByteString getInputGcsSourceBytes(); + + /** + * + * + *
+     * The status of the importing of the document.
+     * 
+ * + * .google.rpc.Status status = 2; + * + * @return Whether the status field is set. + */ + boolean hasStatus(); + /** + * + * + *
+     * The status of the importing of the document.
+     * 
+ * + * .google.rpc.Status status = 2; + * + * @return The status. + */ + com.google.rpc.Status getStatus(); + /** + * + * + *
+     * The status of the importing of the document.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + com.google.rpc.StatusOrBuilder getStatusOrBuilder(); + + /** + * + * + *
+     * The document id of imported document if it was successful, otherwise
+     * empty.
+     * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId output_document_id = 4; + * + * @return Whether the outputDocumentId field is set. + */ + boolean hasOutputDocumentId(); + /** + * + * + *
+     * The document id of imported document if it was successful, otherwise
+     * empty.
+     * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId output_document_id = 4; + * + * @return The outputDocumentId. + */ + com.google.cloud.documentai.v1beta3.DocumentId getOutputDocumentId(); + /** + * + * + *
+     * The document id of imported document if it was successful, otherwise
+     * empty.
+     * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId output_document_id = 4; + */ + com.google.cloud.documentai.v1beta3.DocumentIdOrBuilder getOutputDocumentIdOrBuilder(); + } + /** + * + * + *
+   * The status of each individual document in the import process.
+   * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus} + */ + public static final class IndividualImportStatus extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus) + IndividualImportStatusOrBuilder { + private static final long serialVersionUID = 0L; + // Use IndividualImportStatus.newBuilder() to construct. + private IndividualImportStatus(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IndividualImportStatus() { + inputGcsSource_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IndividualImportStatus(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_ImportDocumentsMetadata_IndividualImportStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_ImportDocumentsMetadata_IndividualImportStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus + .class, + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus + .Builder.class); + } + + public static final int INPUT_GCS_SOURCE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object inputGcsSource_ = ""; + /** + * + * + *
+     * The source Cloud Storage URI of the document.
+     * 
+ * + * 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 Cloud Storage URI of the document.
+     * 
+ * + * 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 importing 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 importing 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 importing of the document.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } + + public static final int OUTPUT_DOCUMENT_ID_FIELD_NUMBER = 4; + private com.google.cloud.documentai.v1beta3.DocumentId outputDocumentId_; + /** + * + * + *
+     * The document id of imported document if it was successful, otherwise
+     * empty.
+     * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId output_document_id = 4; + * + * @return Whether the outputDocumentId field is set. + */ + @java.lang.Override + public boolean hasOutputDocumentId() { + return outputDocumentId_ != null; + } + /** + * + * + *
+     * The document id of imported document if it was successful, otherwise
+     * empty.
+     * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId output_document_id = 4; + * + * @return The outputDocumentId. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.DocumentId getOutputDocumentId() { + return outputDocumentId_ == null + ? com.google.cloud.documentai.v1beta3.DocumentId.getDefaultInstance() + : outputDocumentId_; + } + /** + * + * + *
+     * The document id of imported document if it was successful, otherwise
+     * empty.
+     * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId output_document_id = 4; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.DocumentIdOrBuilder getOutputDocumentIdOrBuilder() { + return outputDocumentId_ == null + ? com.google.cloud.documentai.v1beta3.DocumentId.getDefaultInstance() + : outputDocumentId_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(inputGcsSource_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, inputGcsSource_); + } + if (status_ != null) { + output.writeMessage(2, getStatus()); + } + if (outputDocumentId_ != null) { + output.writeMessage(4, getOutputDocumentId()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(inputGcsSource_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, inputGcsSource_); + } + if (status_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStatus()); + } + if (outputDocumentId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getOutputDocumentId()); + } + size += getUnknownFields().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.ImportDocumentsMetadata.IndividualImportStatus)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus other = + (com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus) obj; + + if (!getInputGcsSource().equals(other.getInputGcsSource())) return false; + if (hasStatus() != other.hasStatus()) return false; + if (hasStatus()) { + if (!getStatus().equals(other.getStatus())) return false; + } + if (hasOutputDocumentId() != other.hasOutputDocumentId()) return false; + if (hasOutputDocumentId()) { + if (!getOutputDocumentId().equals(other.getOutputDocumentId())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) 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(); + } + if (hasOutputDocumentId()) { + hash = (37 * hash) + OUTPUT_DOCUMENT_ID_FIELD_NUMBER; + hash = (53 * hash) + getOutputDocumentId().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus + 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.ImportDocumentsMetadata.IndividualImportStatus + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus + 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.ImportDocumentsMetadata.IndividualImportStatus + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus + 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.ImportDocumentsMetadata.IndividualImportStatus + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus + 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.ImportDocumentsMetadata.IndividualImportStatus + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus + 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.ImportDocumentsMetadata.IndividualImportStatus + 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.ImportDocumentsMetadata.IndividualImportStatus + 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.ImportDocumentsMetadata.IndividualImportStatus + 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 each individual document in the import process.
+     * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus) + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .IndividualImportStatusOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_ImportDocumentsMetadata_IndividualImportStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_ImportDocumentsMetadata_IndividualImportStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus + .class, + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus + .Builder.class); + } + + // Construct using + // com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + inputGcsSource_ = ""; + status_ = null; + if (statusBuilder_ != null) { + statusBuilder_.dispose(); + statusBuilder_ = null; + } + outputDocumentId_ = null; + if (outputDocumentIdBuilder_ != null) { + outputDocumentIdBuilder_.dispose(); + outputDocumentIdBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_ImportDocumentsMetadata_IndividualImportStatus_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus + build() { + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus + buildPartial() { + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus result = + new com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.inputGcsSource_ = inputGcsSource_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.status_ = statusBuilder_ == null ? status_ : statusBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.outputDocumentId_ = + outputDocumentIdBuilder_ == null + ? outputDocumentId_ + : outputDocumentIdBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus) { + return mergeFrom( + (com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus + other) { + if (other + == com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus + .getDefaultInstance()) return this; + if (!other.getInputGcsSource().isEmpty()) { + inputGcsSource_ = other.inputGcsSource_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasStatus()) { + mergeStatus(other.getStatus()); + } + if (other.hasOutputDocumentId()) { + mergeOutputDocumentId(other.getOutputDocumentId()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + inputGcsSource_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getStatusFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 34: + { + input.readMessage( + getOutputDocumentIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object inputGcsSource_ = ""; + /** + * + * + *
+       * The source Cloud Storage URI of the document.
+       * 
+ * + * 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 Cloud Storage URI of the document.
+       * 
+ * + * 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 Cloud Storage URI of the document.
+       * 
+ * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The source Cloud Storage URI of the document.
+       * 
+ * + * string input_gcs_source = 1; + * + * @return This builder for chaining. + */ + public Builder clearInputGcsSource() { + inputGcsSource_ = getDefaultInstance().getInputGcsSource(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The source Cloud Storage URI of the document.
+       * 
+ * + * 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; + bitField0_ |= 0x00000001; + 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 importing of the document.
+       * 
+ * + * .google.rpc.Status status = 2; + * + * @return Whether the status field is set. + */ + public boolean hasStatus() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * The status of the importing 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 importing 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; + } else { + statusBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The status of the importing of the document.
+       * 
+ * + * .google.rpc.Status status = 2; + */ + public Builder setStatus(com.google.rpc.Status.Builder builderForValue) { + if (statusBuilder_ == null) { + status_ = builderForValue.build(); + } else { + statusBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The status of the importing of the document.
+       * 
+ * + * .google.rpc.Status status = 2; + */ + public Builder mergeStatus(com.google.rpc.Status value) { + if (statusBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && status_ != null + && status_ != com.google.rpc.Status.getDefaultInstance()) { + getStatusBuilder().mergeFrom(value); + } else { + status_ = value; + } + } else { + statusBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The status of the importing of the document.
+       * 
+ * + * .google.rpc.Status status = 2; + */ + public Builder clearStatus() { + bitField0_ = (bitField0_ & ~0x00000002); + status_ = null; + if (statusBuilder_ != null) { + statusBuilder_.dispose(); + statusBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * The status of the importing of the document.
+       * 
+ * + * .google.rpc.Status status = 2; + */ + public com.google.rpc.Status.Builder getStatusBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getStatusFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The status of the importing 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 importing 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 com.google.cloud.documentai.v1beta3.DocumentId outputDocumentId_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.DocumentId, + com.google.cloud.documentai.v1beta3.DocumentId.Builder, + com.google.cloud.documentai.v1beta3.DocumentIdOrBuilder> + outputDocumentIdBuilder_; + /** + * + * + *
+       * The document id of imported document if it was successful, otherwise
+       * empty.
+       * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId output_document_id = 4; + * + * @return Whether the outputDocumentId field is set. + */ + public boolean hasOutputDocumentId() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+       * The document id of imported document if it was successful, otherwise
+       * empty.
+       * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId output_document_id = 4; + * + * @return The outputDocumentId. + */ + public com.google.cloud.documentai.v1beta3.DocumentId getOutputDocumentId() { + if (outputDocumentIdBuilder_ == null) { + return outputDocumentId_ == null + ? com.google.cloud.documentai.v1beta3.DocumentId.getDefaultInstance() + : outputDocumentId_; + } else { + return outputDocumentIdBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The document id of imported document if it was successful, otherwise
+       * empty.
+       * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId output_document_id = 4; + */ + public Builder setOutputDocumentId(com.google.cloud.documentai.v1beta3.DocumentId value) { + if (outputDocumentIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + outputDocumentId_ = value; + } else { + outputDocumentIdBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * The document id of imported document if it was successful, otherwise
+       * empty.
+       * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId output_document_id = 4; + */ + public Builder setOutputDocumentId( + com.google.cloud.documentai.v1beta3.DocumentId.Builder builderForValue) { + if (outputDocumentIdBuilder_ == null) { + outputDocumentId_ = builderForValue.build(); + } else { + outputDocumentIdBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * The document id of imported document if it was successful, otherwise
+       * empty.
+       * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId output_document_id = 4; + */ + public Builder mergeOutputDocumentId(com.google.cloud.documentai.v1beta3.DocumentId value) { + if (outputDocumentIdBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && outputDocumentId_ != null + && outputDocumentId_ + != com.google.cloud.documentai.v1beta3.DocumentId.getDefaultInstance()) { + getOutputDocumentIdBuilder().mergeFrom(value); + } else { + outputDocumentId_ = value; + } + } else { + outputDocumentIdBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * The document id of imported document if it was successful, otherwise
+       * empty.
+       * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId output_document_id = 4; + */ + public Builder clearOutputDocumentId() { + bitField0_ = (bitField0_ & ~0x00000004); + outputDocumentId_ = null; + if (outputDocumentIdBuilder_ != null) { + outputDocumentIdBuilder_.dispose(); + outputDocumentIdBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * The document id of imported document if it was successful, otherwise
+       * empty.
+       * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId output_document_id = 4; + */ + public com.google.cloud.documentai.v1beta3.DocumentId.Builder getOutputDocumentIdBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getOutputDocumentIdFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The document id of imported document if it was successful, otherwise
+       * empty.
+       * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId output_document_id = 4; + */ + public com.google.cloud.documentai.v1beta3.DocumentIdOrBuilder + getOutputDocumentIdOrBuilder() { + if (outputDocumentIdBuilder_ != null) { + return outputDocumentIdBuilder_.getMessageOrBuilder(); + } else { + return outputDocumentId_ == null + ? com.google.cloud.documentai.v1beta3.DocumentId.getDefaultInstance() + : outputDocumentId_; + } + } + /** + * + * + *
+       * The document id of imported document if it was successful, otherwise
+       * empty.
+       * 
+ * + * .google.cloud.documentai.v1beta3.DocumentId output_document_id = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.DocumentId, + com.google.cloud.documentai.v1beta3.DocumentId.Builder, + com.google.cloud.documentai.v1beta3.DocumentIdOrBuilder> + getOutputDocumentIdFieldBuilder() { + if (outputDocumentIdBuilder_ == null) { + outputDocumentIdBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.DocumentId, + com.google.cloud.documentai.v1beta3.DocumentId.Builder, + com.google.cloud.documentai.v1beta3.DocumentIdOrBuilder>( + getOutputDocumentId(), getParentForChildren(), isClean()); + outputDocumentId_ = null; + } + return outputDocumentIdBuilder_; + } + + @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.ImportDocumentsMetadata.IndividualImportStatus) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus) + private static final com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .IndividualImportStatus + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus(); + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IndividualImportStatus parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ImportConfigValidationResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The source Cloud Storage URI specified in the import config.
+     * 
+ * + * string input_gcs_source = 1; + * + * @return The inputGcsSource. + */ + java.lang.String getInputGcsSource(); + /** + * + * + *
+     * The source Cloud Storage URI specified in the import config.
+     * 
+ * + * string input_gcs_source = 1; + * + * @return The bytes for inputGcsSource. + */ + com.google.protobuf.ByteString getInputGcsSourceBytes(); + + /** + * + * + *
+     * The validation status of import config.
+     * 
+ * + * .google.rpc.Status status = 2; + * + * @return Whether the status field is set. + */ + boolean hasStatus(); + /** + * + * + *
+     * The validation status of import config.
+     * 
+ * + * .google.rpc.Status status = 2; + * + * @return The status. + */ + com.google.rpc.Status getStatus(); + /** + * + * + *
+     * The validation status of import config.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + com.google.rpc.StatusOrBuilder getStatusOrBuilder(); + } + /** + * + * + *
+   * The validation status of each import config. Status is set to errors if
+   * there is no documents to import in the import_config, or OK if the
+   * operation will try to proceed at least one document.
+   * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult} + */ + public static final class ImportConfigValidationResult + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult) + ImportConfigValidationResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportConfigValidationResult.newBuilder() to construct. + private ImportConfigValidationResult( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportConfigValidationResult() { + inputGcsSource_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImportConfigValidationResult(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_ImportDocumentsMetadata_ImportConfigValidationResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_ImportDocumentsMetadata_ImportConfigValidationResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .ImportConfigValidationResult.class, + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .ImportConfigValidationResult.Builder.class); + } + + public static final int INPUT_GCS_SOURCE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object inputGcsSource_ = ""; + /** + * + * + *
+     * The source Cloud Storage URI specified in the import config.
+     * 
+ * + * 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 Cloud Storage URI specified in the import config.
+     * 
+ * + * 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 validation status of import config.
+     * 
+ * + * .google.rpc.Status status = 2; + * + * @return Whether the status field is set. + */ + @java.lang.Override + public boolean hasStatus() { + return status_ != null; + } + /** + * + * + *
+     * The validation status of import config.
+     * 
+ * + * .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 validation status of import config.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(inputGcsSource_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, inputGcsSource_); + } + if (status_ != null) { + output.writeMessage(2, getStatus()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(inputGcsSource_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, inputGcsSource_); + } + if (status_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStatus()); + } + size += getUnknownFields().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.ImportDocumentsMetadata + .ImportConfigValidationResult)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult + other = + (com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .ImportConfigValidationResult) + obj; + + if (!getInputGcsSource().equals(other.getInputGcsSource())) return false; + if (hasStatus() != other.hasStatus()) return false; + if (hasStatus()) { + if (!getStatus().equals(other.getStatus())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) 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 = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .ImportConfigValidationResult + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .ImportConfigValidationResult + 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.ImportDocumentsMetadata + .ImportConfigValidationResult + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .ImportConfigValidationResult + 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.ImportDocumentsMetadata + .ImportConfigValidationResult + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .ImportConfigValidationResult + 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.ImportDocumentsMetadata + .ImportConfigValidationResult + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .ImportConfigValidationResult + 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.ImportDocumentsMetadata + .ImportConfigValidationResult + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .ImportConfigValidationResult + 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.ImportDocumentsMetadata + .ImportConfigValidationResult + 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.ImportDocumentsMetadata + .ImportConfigValidationResult + 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.ImportDocumentsMetadata.ImportConfigValidationResult + 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 validation status of each import config. Status is set to errors if
+     * there is no documents to import in the import_config, or OK if the
+     * operation will try to proceed at least one document.
+     * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult) + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .ImportConfigValidationResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_ImportDocumentsMetadata_ImportConfigValidationResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_ImportDocumentsMetadata_ImportConfigValidationResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .ImportConfigValidationResult.class, + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .ImportConfigValidationResult.Builder.class); + } + + // Construct using + // com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + inputGcsSource_ = ""; + status_ = null; + if (statusBuilder_ != null) { + statusBuilder_.dispose(); + statusBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_ImportDocumentsMetadata_ImportConfigValidationResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .ImportConfigValidationResult + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .ImportConfigValidationResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .ImportConfigValidationResult + build() { + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .ImportConfigValidationResult + buildPartial() { + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult + result = + new com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .ImportConfigValidationResult(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.inputGcsSource_ = inputGcsSource_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.status_ = statusBuilder_ == null ? status_ : statusBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .ImportConfigValidationResult) { + return mergeFrom( + (com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .ImportConfigValidationResult) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult + other) { + if (other + == com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .ImportConfigValidationResult.getDefaultInstance()) return this; + if (!other.getInputGcsSource().isEmpty()) { + inputGcsSource_ = other.inputGcsSource_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasStatus()) { + mergeStatus(other.getStatus()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + inputGcsSource_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getStatusFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object inputGcsSource_ = ""; + /** + * + * + *
+       * The source Cloud Storage URI specified in the import config.
+       * 
+ * + * 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 Cloud Storage URI specified in the import config.
+       * 
+ * + * 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 Cloud Storage URI specified in the import config.
+       * 
+ * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The source Cloud Storage URI specified in the import config.
+       * 
+ * + * string input_gcs_source = 1; + * + * @return This builder for chaining. + */ + public Builder clearInputGcsSource() { + inputGcsSource_ = getDefaultInstance().getInputGcsSource(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The source Cloud Storage URI specified in the import config.
+       * 
+ * + * 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; + bitField0_ |= 0x00000001; + 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 validation status of import config.
+       * 
+ * + * .google.rpc.Status status = 2; + * + * @return Whether the status field is set. + */ + public boolean hasStatus() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * The validation status of import config.
+       * 
+ * + * .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 validation status of import config.
+       * 
+ * + * .google.rpc.Status status = 2; + */ + public Builder setStatus(com.google.rpc.Status value) { + if (statusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + status_ = value; + } else { + statusBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The validation status of import config.
+       * 
+ * + * .google.rpc.Status status = 2; + */ + public Builder setStatus(com.google.rpc.Status.Builder builderForValue) { + if (statusBuilder_ == null) { + status_ = builderForValue.build(); + } else { + statusBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The validation status of import config.
+       * 
+ * + * .google.rpc.Status status = 2; + */ + public Builder mergeStatus(com.google.rpc.Status value) { + if (statusBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && status_ != null + && status_ != com.google.rpc.Status.getDefaultInstance()) { + getStatusBuilder().mergeFrom(value); + } else { + status_ = value; + } + } else { + statusBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The validation status of import config.
+       * 
+ * + * .google.rpc.Status status = 2; + */ + public Builder clearStatus() { + bitField0_ = (bitField0_ & ~0x00000002); + status_ = null; + if (statusBuilder_ != null) { + statusBuilder_.dispose(); + statusBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * The validation status of import config.
+       * 
+ * + * .google.rpc.Status status = 2; + */ + public com.google.rpc.Status.Builder getStatusBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getStatusFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The validation status of import config.
+       * 
+ * + * .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 validation status of import config.
+       * 
+ * + * .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_; + } + + @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.ImportDocumentsMetadata.ImportConfigValidationResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult) + private static final com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .ImportConfigValidationResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .ImportConfigValidationResult(); + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .ImportConfigValidationResult + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportConfigValidationResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int COMMON_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.documentai.v1beta3.CommonOperationMetadata commonMetadata_; + /** + * + * + *
+   * The basic metadata of the long running operation.
+   * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + * + * @return Whether the commonMetadata field is set. + */ + @java.lang.Override + public boolean hasCommonMetadata() { + return commonMetadata_ != null; + } + /** + * + * + *
+   * The basic metadata of the long running operation.
+   * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + * + * @return The commonMetadata. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.CommonOperationMetadata getCommonMetadata() { + return commonMetadata_ == null + ? com.google.cloud.documentai.v1beta3.CommonOperationMetadata.getDefaultInstance() + : commonMetadata_; + } + /** + * + * + *
+   * The basic metadata of the long running operation.
+   * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.CommonOperationMetadataOrBuilder + getCommonMetadataOrBuilder() { + return commonMetadata_ == null + ? com.google.cloud.documentai.v1beta3.CommonOperationMetadata.getDefaultInstance() + : commonMetadata_; + } + + public static final int INDIVIDUAL_IMPORT_STATUSES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus> + individualImportStatuses_; + /** + * + * + *
+   * The list of response details of each document.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus individual_import_statuses = 2; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus> + getIndividualImportStatusesList() { + return individualImportStatuses_; + } + /** + * + * + *
+   * The list of response details of each document.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus individual_import_statuses = 2; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .IndividualImportStatusOrBuilder> + getIndividualImportStatusesOrBuilderList() { + return individualImportStatuses_; + } + /** + * + * + *
+   * The list of response details of each document.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus individual_import_statuses = 2; + * + */ + @java.lang.Override + public int getIndividualImportStatusesCount() { + return individualImportStatuses_.size(); + } + /** + * + * + *
+   * The list of response details of each document.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus individual_import_statuses = 2; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus + getIndividualImportStatuses(int index) { + return individualImportStatuses_.get(index); + } + /** + * + * + *
+   * The list of response details of each document.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus individual_import_statuses = 2; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatusOrBuilder + getIndividualImportStatusesOrBuilder(int index) { + return individualImportStatuses_.get(index); + } + + public static final int IMPORT_CONFIG_VALIDATION_RESULTS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult> + importConfigValidationResults_; + /** + * + * + *
+   * Validation statuses of the batch documents import config.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult import_config_validation_results = 4; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult> + getImportConfigValidationResultsList() { + return importConfigValidationResults_; + } + /** + * + * + *
+   * Validation statuses of the batch documents import config.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult import_config_validation_results = 4; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .ImportConfigValidationResultOrBuilder> + getImportConfigValidationResultsOrBuilderList() { + return importConfigValidationResults_; + } + /** + * + * + *
+   * Validation statuses of the batch documents import config.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult import_config_validation_results = 4; + * + */ + @java.lang.Override + public int getImportConfigValidationResultsCount() { + return importConfigValidationResults_.size(); + } + /** + * + * + *
+   * Validation statuses of the batch documents import config.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult import_config_validation_results = 4; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult + getImportConfigValidationResults(int index) { + return importConfigValidationResults_.get(index); + } + /** + * + * + *
+   * Validation statuses of the batch documents import config.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult import_config_validation_results = 4; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .ImportConfigValidationResultOrBuilder + getImportConfigValidationResultsOrBuilder(int index) { + return importConfigValidationResults_.get(index); + } + + public static final int TOTAL_DOCUMENT_COUNT_FIELD_NUMBER = 3; + private int totalDocumentCount_ = 0; + /** + * + * + *
+   * Total number of the documents that are qualified for importing.
+   * 
+ * + * int32 total_document_count = 3; + * + * @return The totalDocumentCount. + */ + @java.lang.Override + public int getTotalDocumentCount() { + return totalDocumentCount_; + } + + 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 (commonMetadata_ != null) { + output.writeMessage(1, getCommonMetadata()); + } + for (int i = 0; i < individualImportStatuses_.size(); i++) { + output.writeMessage(2, individualImportStatuses_.get(i)); + } + if (totalDocumentCount_ != 0) { + output.writeInt32(3, totalDocumentCount_); + } + for (int i = 0; i < importConfigValidationResults_.size(); i++) { + output.writeMessage(4, importConfigValidationResults_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (commonMetadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCommonMetadata()); + } + for (int i = 0; i < individualImportStatuses_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, individualImportStatuses_.get(i)); + } + if (totalDocumentCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, totalDocumentCount_); + } + for (int i = 0; i < importConfigValidationResults_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, importConfigValidationResults_.get(i)); + } + size += getUnknownFields().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.ImportDocumentsMetadata)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata other = + (com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata) obj; + + if (hasCommonMetadata() != other.hasCommonMetadata()) return false; + if (hasCommonMetadata()) { + if (!getCommonMetadata().equals(other.getCommonMetadata())) return false; + } + if (!getIndividualImportStatusesList().equals(other.getIndividualImportStatusesList())) + return false; + if (!getImportConfigValidationResultsList() + .equals(other.getImportConfigValidationResultsList())) return false; + if (getTotalDocumentCount() != other.getTotalDocumentCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCommonMetadata()) { + hash = (37 * hash) + COMMON_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getCommonMetadata().hashCode(); + } + if (getIndividualImportStatusesCount() > 0) { + hash = (37 * hash) + INDIVIDUAL_IMPORT_STATUSES_FIELD_NUMBER; + hash = (53 * hash) + getIndividualImportStatusesList().hashCode(); + } + if (getImportConfigValidationResultsCount() > 0) { + hash = (37 * hash) + IMPORT_CONFIG_VALIDATION_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getImportConfigValidationResultsList().hashCode(); + } + hash = (37 * hash) + TOTAL_DOCUMENT_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getTotalDocumentCount(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata 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.ImportDocumentsMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata 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.ImportDocumentsMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata 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.ImportDocumentsMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata 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.ImportDocumentsMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata 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.ImportDocumentsMetadata 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.ImportDocumentsMetadata 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.ImportDocumentsMetadata 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; + } + /** + * + * + *
+   * Metadata of the import document operation.
+   * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.ImportDocumentsMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.ImportDocumentsMetadata) + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_ImportDocumentsMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_ImportDocumentsMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.class, + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.Builder.class); + } + + // Construct using com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + commonMetadata_ = null; + if (commonMetadataBuilder_ != null) { + commonMetadataBuilder_.dispose(); + commonMetadataBuilder_ = null; + } + if (individualImportStatusesBuilder_ == null) { + individualImportStatuses_ = java.util.Collections.emptyList(); + } else { + individualImportStatuses_ = null; + individualImportStatusesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + if (importConfigValidationResultsBuilder_ == null) { + importConfigValidationResults_ = java.util.Collections.emptyList(); + } else { + importConfigValidationResults_ = null; + importConfigValidationResultsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + totalDocumentCount_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_ImportDocumentsMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata build() { + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata buildPartial() { + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata result = + new com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata result) { + if (individualImportStatusesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + individualImportStatuses_ = + java.util.Collections.unmodifiableList(individualImportStatuses_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.individualImportStatuses_ = individualImportStatuses_; + } else { + result.individualImportStatuses_ = individualImportStatusesBuilder_.build(); + } + if (importConfigValidationResultsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + importConfigValidationResults_ = + java.util.Collections.unmodifiableList(importConfigValidationResults_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.importConfigValidationResults_ = importConfigValidationResults_; + } else { + result.importConfigValidationResults_ = importConfigValidationResultsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.commonMetadata_ = + commonMetadataBuilder_ == null ? commonMetadata_ : commonMetadataBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.totalDocumentCount_ = totalDocumentCount_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata) { + return mergeFrom((com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata other) { + if (other == com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.getDefaultInstance()) + return this; + if (other.hasCommonMetadata()) { + mergeCommonMetadata(other.getCommonMetadata()); + } + if (individualImportStatusesBuilder_ == null) { + if (!other.individualImportStatuses_.isEmpty()) { + if (individualImportStatuses_.isEmpty()) { + individualImportStatuses_ = other.individualImportStatuses_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureIndividualImportStatusesIsMutable(); + individualImportStatuses_.addAll(other.individualImportStatuses_); + } + onChanged(); + } + } else { + if (!other.individualImportStatuses_.isEmpty()) { + if (individualImportStatusesBuilder_.isEmpty()) { + individualImportStatusesBuilder_.dispose(); + individualImportStatusesBuilder_ = null; + individualImportStatuses_ = other.individualImportStatuses_; + bitField0_ = (bitField0_ & ~0x00000002); + individualImportStatusesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getIndividualImportStatusesFieldBuilder() + : null; + } else { + individualImportStatusesBuilder_.addAllMessages(other.individualImportStatuses_); + } + } + } + if (importConfigValidationResultsBuilder_ == null) { + if (!other.importConfigValidationResults_.isEmpty()) { + if (importConfigValidationResults_.isEmpty()) { + importConfigValidationResults_ = other.importConfigValidationResults_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureImportConfigValidationResultsIsMutable(); + importConfigValidationResults_.addAll(other.importConfigValidationResults_); + } + onChanged(); + } + } else { + if (!other.importConfigValidationResults_.isEmpty()) { + if (importConfigValidationResultsBuilder_.isEmpty()) { + importConfigValidationResultsBuilder_.dispose(); + importConfigValidationResultsBuilder_ = null; + importConfigValidationResults_ = other.importConfigValidationResults_; + bitField0_ = (bitField0_ & ~0x00000004); + importConfigValidationResultsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getImportConfigValidationResultsFieldBuilder() + : null; + } else { + importConfigValidationResultsBuilder_.addAllMessages( + other.importConfigValidationResults_); + } + } + } + if (other.getTotalDocumentCount() != 0) { + setTotalDocumentCount(other.getTotalDocumentCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getCommonMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus + m = + input.readMessage( + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .IndividualImportStatus.parser(), + extensionRegistry); + if (individualImportStatusesBuilder_ == null) { + ensureIndividualImportStatusesIsMutable(); + individualImportStatuses_.add(m); + } else { + individualImportStatusesBuilder_.addMessage(m); + } + break; + } // case 18 + case 24: + { + totalDocumentCount_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 24 + case 34: + { + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .ImportConfigValidationResult + m = + input.readMessage( + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .ImportConfigValidationResult.parser(), + extensionRegistry); + if (importConfigValidationResultsBuilder_ == null) { + ensureImportConfigValidationResultsIsMutable(); + importConfigValidationResults_.add(m); + } else { + importConfigValidationResultsBuilder_.addMessage(m); + } + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.documentai.v1beta3.CommonOperationMetadata commonMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.CommonOperationMetadata, + com.google.cloud.documentai.v1beta3.CommonOperationMetadata.Builder, + com.google.cloud.documentai.v1beta3.CommonOperationMetadataOrBuilder> + commonMetadataBuilder_; + /** + * + * + *
+     * The basic metadata of the long running operation.
+     * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + * + * @return Whether the commonMetadata field is set. + */ + public boolean hasCommonMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The basic metadata of the long running operation.
+     * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + * + * @return The commonMetadata. + */ + public com.google.cloud.documentai.v1beta3.CommonOperationMetadata getCommonMetadata() { + if (commonMetadataBuilder_ == null) { + return commonMetadata_ == null + ? com.google.cloud.documentai.v1beta3.CommonOperationMetadata.getDefaultInstance() + : commonMetadata_; + } else { + return commonMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The basic metadata of the long running operation.
+     * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + */ + public Builder setCommonMetadata( + com.google.cloud.documentai.v1beta3.CommonOperationMetadata value) { + if (commonMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + commonMetadata_ = value; + } else { + commonMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The basic metadata of the long running operation.
+     * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + */ + public Builder setCommonMetadata( + com.google.cloud.documentai.v1beta3.CommonOperationMetadata.Builder builderForValue) { + if (commonMetadataBuilder_ == null) { + commonMetadata_ = builderForValue.build(); + } else { + commonMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The basic metadata of the long running operation.
+     * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + */ + public Builder mergeCommonMetadata( + com.google.cloud.documentai.v1beta3.CommonOperationMetadata value) { + if (commonMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && commonMetadata_ != null + && commonMetadata_ + != com.google.cloud.documentai.v1beta3.CommonOperationMetadata + .getDefaultInstance()) { + getCommonMetadataBuilder().mergeFrom(value); + } else { + commonMetadata_ = value; + } + } else { + commonMetadataBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The basic metadata of the long running operation.
+     * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + */ + public Builder clearCommonMetadata() { + bitField0_ = (bitField0_ & ~0x00000001); + commonMetadata_ = null; + if (commonMetadataBuilder_ != null) { + commonMetadataBuilder_.dispose(); + commonMetadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The basic metadata of the long running operation.
+     * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + */ + public com.google.cloud.documentai.v1beta3.CommonOperationMetadata.Builder + getCommonMetadataBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCommonMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The basic metadata of the long running operation.
+     * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + */ + public com.google.cloud.documentai.v1beta3.CommonOperationMetadataOrBuilder + getCommonMetadataOrBuilder() { + if (commonMetadataBuilder_ != null) { + return commonMetadataBuilder_.getMessageOrBuilder(); + } else { + return commonMetadata_ == null + ? com.google.cloud.documentai.v1beta3.CommonOperationMetadata.getDefaultInstance() + : commonMetadata_; + } + } + /** + * + * + *
+     * The basic metadata of the long running operation.
+     * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.CommonOperationMetadata, + com.google.cloud.documentai.v1beta3.CommonOperationMetadata.Builder, + com.google.cloud.documentai.v1beta3.CommonOperationMetadataOrBuilder> + getCommonMetadataFieldBuilder() { + if (commonMetadataBuilder_ == null) { + commonMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.CommonOperationMetadata, + com.google.cloud.documentai.v1beta3.CommonOperationMetadata.Builder, + com.google.cloud.documentai.v1beta3.CommonOperationMetadataOrBuilder>( + getCommonMetadata(), getParentForChildren(), isClean()); + commonMetadata_ = null; + } + return commonMetadataBuilder_; + } + + private java.util.List< + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus> + individualImportStatuses_ = java.util.Collections.emptyList(); + + private void ensureIndividualImportStatusesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + individualImportStatuses_ = + new java.util.ArrayList< + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus>( + individualImportStatuses_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus, + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus + .Builder, + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .IndividualImportStatusOrBuilder> + individualImportStatusesBuilder_; + + /** + * + * + *
+     * The list of response details of each document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus individual_import_statuses = 2; + * + */ + public java.util.List< + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus> + getIndividualImportStatusesList() { + if (individualImportStatusesBuilder_ == null) { + return java.util.Collections.unmodifiableList(individualImportStatuses_); + } else { + return individualImportStatusesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of response details of each document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus individual_import_statuses = 2; + * + */ + public int getIndividualImportStatusesCount() { + if (individualImportStatusesBuilder_ == null) { + return individualImportStatuses_.size(); + } else { + return individualImportStatusesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of response details of each document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus individual_import_statuses = 2; + * + */ + public com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus + getIndividualImportStatuses(int index) { + if (individualImportStatusesBuilder_ == null) { + return individualImportStatuses_.get(index); + } else { + return individualImportStatusesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of response details of each document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus individual_import_statuses = 2; + * + */ + public Builder setIndividualImportStatuses( + int index, + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus value) { + if (individualImportStatusesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIndividualImportStatusesIsMutable(); + individualImportStatuses_.set(index, value); + onChanged(); + } else { + individualImportStatusesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of response details of each document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus individual_import_statuses = 2; + * + */ + public Builder setIndividualImportStatuses( + int index, + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus.Builder + builderForValue) { + if (individualImportStatusesBuilder_ == null) { + ensureIndividualImportStatusesIsMutable(); + individualImportStatuses_.set(index, builderForValue.build()); + onChanged(); + } else { + individualImportStatusesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of response details of each document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus individual_import_statuses = 2; + * + */ + public Builder addIndividualImportStatuses( + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus value) { + if (individualImportStatusesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIndividualImportStatusesIsMutable(); + individualImportStatuses_.add(value); + onChanged(); + } else { + individualImportStatusesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of response details of each document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus individual_import_statuses = 2; + * + */ + public Builder addIndividualImportStatuses( + int index, + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus value) { + if (individualImportStatusesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIndividualImportStatusesIsMutable(); + individualImportStatuses_.add(index, value); + onChanged(); + } else { + individualImportStatusesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of response details of each document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus individual_import_statuses = 2; + * + */ + public Builder addIndividualImportStatuses( + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus.Builder + builderForValue) { + if (individualImportStatusesBuilder_ == null) { + ensureIndividualImportStatusesIsMutable(); + individualImportStatuses_.add(builderForValue.build()); + onChanged(); + } else { + individualImportStatusesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of response details of each document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus individual_import_statuses = 2; + * + */ + public Builder addIndividualImportStatuses( + int index, + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus.Builder + builderForValue) { + if (individualImportStatusesBuilder_ == null) { + ensureIndividualImportStatusesIsMutable(); + individualImportStatuses_.add(index, builderForValue.build()); + onChanged(); + } else { + individualImportStatusesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of response details of each document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus individual_import_statuses = 2; + * + */ + public Builder addAllIndividualImportStatuses( + java.lang.Iterable< + ? extends + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .IndividualImportStatus> + values) { + if (individualImportStatusesBuilder_ == null) { + ensureIndividualImportStatusesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, individualImportStatuses_); + onChanged(); + } else { + individualImportStatusesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of response details of each document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus individual_import_statuses = 2; + * + */ + public Builder clearIndividualImportStatuses() { + if (individualImportStatusesBuilder_ == null) { + individualImportStatuses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + individualImportStatusesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of response details of each document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus individual_import_statuses = 2; + * + */ + public Builder removeIndividualImportStatuses(int index) { + if (individualImportStatusesBuilder_ == null) { + ensureIndividualImportStatusesIsMutable(); + individualImportStatuses_.remove(index); + onChanged(); + } else { + individualImportStatusesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of response details of each document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus individual_import_statuses = 2; + * + */ + public com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus + .Builder + getIndividualImportStatusesBuilder(int index) { + return getIndividualImportStatusesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of response details of each document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus individual_import_statuses = 2; + * + */ + public com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .IndividualImportStatusOrBuilder + getIndividualImportStatusesOrBuilder(int index) { + if (individualImportStatusesBuilder_ == null) { + return individualImportStatuses_.get(index); + } else { + return individualImportStatusesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of response details of each document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus individual_import_statuses = 2; + * + */ + public java.util.List< + ? extends + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .IndividualImportStatusOrBuilder> + getIndividualImportStatusesOrBuilderList() { + if (individualImportStatusesBuilder_ != null) { + return individualImportStatusesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(individualImportStatuses_); + } + } + /** + * + * + *
+     * The list of response details of each document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus individual_import_statuses = 2; + * + */ + public com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus + .Builder + addIndividualImportStatusesBuilder() { + return getIndividualImportStatusesFieldBuilder() + .addBuilder( + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus + .getDefaultInstance()); + } + /** + * + * + *
+     * The list of response details of each document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus individual_import_statuses = 2; + * + */ + public com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus + .Builder + addIndividualImportStatusesBuilder(int index) { + return getIndividualImportStatusesFieldBuilder() + .addBuilder( + index, + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus + .getDefaultInstance()); + } + /** + * + * + *
+     * The list of response details of each document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus individual_import_statuses = 2; + * + */ + public java.util.List< + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus + .Builder> + getIndividualImportStatusesBuilderList() { + return getIndividualImportStatusesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus, + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus + .Builder, + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .IndividualImportStatusOrBuilder> + getIndividualImportStatusesFieldBuilder() { + if (individualImportStatusesBuilder_ == null) { + individualImportStatusesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus, + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus + .Builder, + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .IndividualImportStatusOrBuilder>( + individualImportStatuses_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + individualImportStatuses_ = null; + } + return individualImportStatusesBuilder_; + } + + private java.util.List< + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .ImportConfigValidationResult> + importConfigValidationResults_ = java.util.Collections.emptyList(); + + private void ensureImportConfigValidationResultsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + importConfigValidationResults_ = + new java.util.ArrayList< + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .ImportConfigValidationResult>(importConfigValidationResults_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .ImportConfigValidationResult, + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult + .Builder, + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .ImportConfigValidationResultOrBuilder> + importConfigValidationResultsBuilder_; + + /** + * + * + *
+     * Validation statuses of the batch documents import config.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult import_config_validation_results = 4; + * + */ + public java.util.List< + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .ImportConfigValidationResult> + getImportConfigValidationResultsList() { + if (importConfigValidationResultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(importConfigValidationResults_); + } else { + return importConfigValidationResultsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Validation statuses of the batch documents import config.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult import_config_validation_results = 4; + * + */ + public int getImportConfigValidationResultsCount() { + if (importConfigValidationResultsBuilder_ == null) { + return importConfigValidationResults_.size(); + } else { + return importConfigValidationResultsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Validation statuses of the batch documents import config.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult import_config_validation_results = 4; + * + */ + public com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult + getImportConfigValidationResults(int index) { + if (importConfigValidationResultsBuilder_ == null) { + return importConfigValidationResults_.get(index); + } else { + return importConfigValidationResultsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Validation statuses of the batch documents import config.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult import_config_validation_results = 4; + * + */ + public Builder setImportConfigValidationResults( + int index, + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult + value) { + if (importConfigValidationResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureImportConfigValidationResultsIsMutable(); + importConfigValidationResults_.set(index, value); + onChanged(); + } else { + importConfigValidationResultsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Validation statuses of the batch documents import config.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult import_config_validation_results = 4; + * + */ + public Builder setImportConfigValidationResults( + int index, + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult + .Builder + builderForValue) { + if (importConfigValidationResultsBuilder_ == null) { + ensureImportConfigValidationResultsIsMutable(); + importConfigValidationResults_.set(index, builderForValue.build()); + onChanged(); + } else { + importConfigValidationResultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Validation statuses of the batch documents import config.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult import_config_validation_results = 4; + * + */ + public Builder addImportConfigValidationResults( + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult + value) { + if (importConfigValidationResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureImportConfigValidationResultsIsMutable(); + importConfigValidationResults_.add(value); + onChanged(); + } else { + importConfigValidationResultsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Validation statuses of the batch documents import config.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult import_config_validation_results = 4; + * + */ + public Builder addImportConfigValidationResults( + int index, + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult + value) { + if (importConfigValidationResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureImportConfigValidationResultsIsMutable(); + importConfigValidationResults_.add(index, value); + onChanged(); + } else { + importConfigValidationResultsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Validation statuses of the batch documents import config.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult import_config_validation_results = 4; + * + */ + public Builder addImportConfigValidationResults( + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult + .Builder + builderForValue) { + if (importConfigValidationResultsBuilder_ == null) { + ensureImportConfigValidationResultsIsMutable(); + importConfigValidationResults_.add(builderForValue.build()); + onChanged(); + } else { + importConfigValidationResultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Validation statuses of the batch documents import config.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult import_config_validation_results = 4; + * + */ + public Builder addImportConfigValidationResults( + int index, + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult + .Builder + builderForValue) { + if (importConfigValidationResultsBuilder_ == null) { + ensureImportConfigValidationResultsIsMutable(); + importConfigValidationResults_.add(index, builderForValue.build()); + onChanged(); + } else { + importConfigValidationResultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Validation statuses of the batch documents import config.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult import_config_validation_results = 4; + * + */ + public Builder addAllImportConfigValidationResults( + java.lang.Iterable< + ? extends + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .ImportConfigValidationResult> + values) { + if (importConfigValidationResultsBuilder_ == null) { + ensureImportConfigValidationResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, importConfigValidationResults_); + onChanged(); + } else { + importConfigValidationResultsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Validation statuses of the batch documents import config.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult import_config_validation_results = 4; + * + */ + public Builder clearImportConfigValidationResults() { + if (importConfigValidationResultsBuilder_ == null) { + importConfigValidationResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + importConfigValidationResultsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Validation statuses of the batch documents import config.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult import_config_validation_results = 4; + * + */ + public Builder removeImportConfigValidationResults(int index) { + if (importConfigValidationResultsBuilder_ == null) { + ensureImportConfigValidationResultsIsMutable(); + importConfigValidationResults_.remove(index); + onChanged(); + } else { + importConfigValidationResultsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Validation statuses of the batch documents import config.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult import_config_validation_results = 4; + * + */ + public com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult + .Builder + getImportConfigValidationResultsBuilder(int index) { + return getImportConfigValidationResultsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Validation statuses of the batch documents import config.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult import_config_validation_results = 4; + * + */ + public com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .ImportConfigValidationResultOrBuilder + getImportConfigValidationResultsOrBuilder(int index) { + if (importConfigValidationResultsBuilder_ == null) { + return importConfigValidationResults_.get(index); + } else { + return importConfigValidationResultsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Validation statuses of the batch documents import config.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult import_config_validation_results = 4; + * + */ + public java.util.List< + ? extends + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .ImportConfigValidationResultOrBuilder> + getImportConfigValidationResultsOrBuilderList() { + if (importConfigValidationResultsBuilder_ != null) { + return importConfigValidationResultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(importConfigValidationResults_); + } + } + /** + * + * + *
+     * Validation statuses of the batch documents import config.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult import_config_validation_results = 4; + * + */ + public com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult + .Builder + addImportConfigValidationResultsBuilder() { + return getImportConfigValidationResultsFieldBuilder() + .addBuilder( + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .ImportConfigValidationResult.getDefaultInstance()); + } + /** + * + * + *
+     * Validation statuses of the batch documents import config.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult import_config_validation_results = 4; + * + */ + public com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult + .Builder + addImportConfigValidationResultsBuilder(int index) { + return getImportConfigValidationResultsFieldBuilder() + .addBuilder( + index, + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .ImportConfigValidationResult.getDefaultInstance()); + } + /** + * + * + *
+     * Validation statuses of the batch documents import config.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult import_config_validation_results = 4; + * + */ + public java.util.List< + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult + .Builder> + getImportConfigValidationResultsBuilderList() { + return getImportConfigValidationResultsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .ImportConfigValidationResult, + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult + .Builder, + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .ImportConfigValidationResultOrBuilder> + getImportConfigValidationResultsFieldBuilder() { + if (importConfigValidationResultsBuilder_ == null) { + importConfigValidationResultsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .ImportConfigValidationResult, + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .ImportConfigValidationResult.Builder, + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .ImportConfigValidationResultOrBuilder>( + importConfigValidationResults_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + importConfigValidationResults_ = null; + } + return importConfigValidationResultsBuilder_; + } + + private int totalDocumentCount_; + /** + * + * + *
+     * Total number of the documents that are qualified for importing.
+     * 
+ * + * int32 total_document_count = 3; + * + * @return The totalDocumentCount. + */ + @java.lang.Override + public int getTotalDocumentCount() { + return totalDocumentCount_; + } + /** + * + * + *
+     * Total number of the documents that are qualified for importing.
+     * 
+ * + * int32 total_document_count = 3; + * + * @param value The totalDocumentCount to set. + * @return This builder for chaining. + */ + public Builder setTotalDocumentCount(int value) { + + totalDocumentCount_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Total number of the documents that are qualified for importing.
+     * 
+ * + * int32 total_document_count = 3; + * + * @return This builder for chaining. + */ + public Builder clearTotalDocumentCount() { + bitField0_ = (bitField0_ & ~0x00000008); + totalDocumentCount_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.ImportDocumentsMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.ImportDocumentsMetadata) + private static final com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata(); + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportDocumentsMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ImportDocumentsMetadataOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ImportDocumentsMetadataOrBuilder.java new file mode 100644 index 000000000000..681ec58729fc --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ImportDocumentsMetadataOrBuilder.java @@ -0,0 +1,210 @@ +/* + * Copyright 2023 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_service.proto + +package com.google.cloud.documentai.v1beta3; + +public interface ImportDocumentsMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.ImportDocumentsMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The basic metadata of the long running operation.
+   * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + * + * @return Whether the commonMetadata field is set. + */ + boolean hasCommonMetadata(); + /** + * + * + *
+   * The basic metadata of the long running operation.
+   * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + * + * @return The commonMetadata. + */ + com.google.cloud.documentai.v1beta3.CommonOperationMetadata getCommonMetadata(); + /** + * + * + *
+   * The basic metadata of the long running operation.
+   * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + */ + com.google.cloud.documentai.v1beta3.CommonOperationMetadataOrBuilder getCommonMetadataOrBuilder(); + + /** + * + * + *
+   * The list of response details of each document.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus individual_import_statuses = 2; + * + */ + java.util.List + getIndividualImportStatusesList(); + /** + * + * + *
+   * The list of response details of each document.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus individual_import_statuses = 2; + * + */ + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus + getIndividualImportStatuses(int index); + /** + * + * + *
+   * The list of response details of each document.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus individual_import_statuses = 2; + * + */ + int getIndividualImportStatusesCount(); + /** + * + * + *
+   * The list of response details of each document.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus individual_import_statuses = 2; + * + */ + java.util.List< + ? extends + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .IndividualImportStatusOrBuilder> + getIndividualImportStatusesOrBuilderList(); + /** + * + * + *
+   * The list of response details of each document.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatus individual_import_statuses = 2; + * + */ + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.IndividualImportStatusOrBuilder + getIndividualImportStatusesOrBuilder(int index); + + /** + * + * + *
+   * Validation statuses of the batch documents import config.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult import_config_validation_results = 4; + * + */ + java.util.List< + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult> + getImportConfigValidationResultsList(); + /** + * + * + *
+   * Validation statuses of the batch documents import config.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult import_config_validation_results = 4; + * + */ + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult + getImportConfigValidationResults(int index); + /** + * + * + *
+   * Validation statuses of the batch documents import config.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult import_config_validation_results = 4; + * + */ + int getImportConfigValidationResultsCount(); + /** + * + * + *
+   * Validation statuses of the batch documents import config.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult import_config_validation_results = 4; + * + */ + java.util.List< + ? extends + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata + .ImportConfigValidationResultOrBuilder> + getImportConfigValidationResultsOrBuilderList(); + /** + * + * + *
+   * Validation statuses of the batch documents import config.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResult import_config_validation_results = 4; + * + */ + com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata.ImportConfigValidationResultOrBuilder + getImportConfigValidationResultsOrBuilder(int index); + + /** + * + * + *
+   * Total number of the documents that are qualified for importing.
+   * 
+ * + * int32 total_document_count = 3; + * + * @return The totalDocumentCount. + */ + int getTotalDocumentCount(); +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ImportDocumentsRequest.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ImportDocumentsRequest.java new file mode 100644 index 000000000000..bb68a7151a94 --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ImportDocumentsRequest.java @@ -0,0 +1,3462 @@ +/* + * Copyright 2023 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_service.proto + +package com.google.cloud.documentai.v1beta3; + +/** Protobuf type {@code google.cloud.documentai.v1beta3.ImportDocumentsRequest} */ +public final class ImportDocumentsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.ImportDocumentsRequest) + ImportDocumentsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportDocumentsRequest.newBuilder() to construct. + private ImportDocumentsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportDocumentsRequest() { + dataset_ = ""; + batchDocumentsImportConfigs_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImportDocumentsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_ImportDocumentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_ImportDocumentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.class, + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.Builder.class); + } + + public interface BatchDocumentsImportConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Target dataset split where the documents must be stored.
+     * 
+ * + * .google.cloud.documentai.v1beta3.DatasetSplitType dataset_split = 2; + * + * @return Whether the datasetSplit field is set. + */ + boolean hasDatasetSplit(); + /** + * + * + *
+     * Target dataset split where the documents must be stored.
+     * 
+ * + * .google.cloud.documentai.v1beta3.DatasetSplitType dataset_split = 2; + * + * @return The enum numeric value on the wire for datasetSplit. + */ + int getDatasetSplitValue(); + /** + * + * + *
+     * Target dataset split where the documents must be stored.
+     * 
+ * + * .google.cloud.documentai.v1beta3.DatasetSplitType dataset_split = 2; + * + * @return The datasetSplit. + */ + com.google.cloud.documentai.v1beta3.DatasetSplitType getDatasetSplit(); + + /** + * + * + *
+     * If set, documents will be automatically split into training and test
+     * split category with the specified ratio.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig.AutoSplitConfig auto_split_config = 3; + * + * + * @return Whether the autoSplitConfig field is set. + */ + boolean hasAutoSplitConfig(); + /** + * + * + *
+     * If set, documents will be automatically split into training and test
+     * split category with the specified ratio.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig.AutoSplitConfig auto_split_config = 3; + * + * + * @return The autoSplitConfig. + */ + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + .AutoSplitConfig + getAutoSplitConfig(); + /** + * + * + *
+     * If set, documents will be automatically split into training and test
+     * split category with the specified ratio.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig.AutoSplitConfig auto_split_config = 3; + * + */ + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + .AutoSplitConfigOrBuilder + getAutoSplitConfigOrBuilder(); + + /** + * + * + *
+     * The common config to specify a set of documents used as input.
+     * 
+ * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig batch_input_config = 1; + * + * + * @return Whether the batchInputConfig field is set. + */ + boolean hasBatchInputConfig(); + /** + * + * + *
+     * The common config to specify a set of documents used as input.
+     * 
+ * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig batch_input_config = 1; + * + * + * @return The batchInputConfig. + */ + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig getBatchInputConfig(); + /** + * + * + *
+     * The common config to specify a set of documents used as input.
+     * 
+ * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig batch_input_config = 1; + * + */ + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfigOrBuilder + getBatchInputConfigOrBuilder(); + + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + .SplitTypeConfigCase + getSplitTypeConfigCase(); + } + /** + * + * + *
+   * Config for importing documents.
+   * Each batch can have its own dataset split type.
+   * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig} + */ + public static final class BatchDocumentsImportConfig + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig) + BatchDocumentsImportConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchDocumentsImportConfig.newBuilder() to construct. + private BatchDocumentsImportConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchDocumentsImportConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchDocumentsImportConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_ImportDocumentsRequest_BatchDocumentsImportConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_ImportDocumentsRequest_BatchDocumentsImportConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + .class, + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + .Builder.class); + } + + public interface AutoSplitConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig.AutoSplitConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Ratio of training dataset split.
+       * 
+ * + * float training_split_ratio = 1; + * + * @return The trainingSplitRatio. + */ + float getTrainingSplitRatio(); + } + /** + * + * + *
+     * The config for auto-split.
+     * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig.AutoSplitConfig} + */ + public static final class AutoSplitConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig.AutoSplitConfig) + AutoSplitConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use AutoSplitConfig.newBuilder() to construct. + private AutoSplitConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AutoSplitConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AutoSplitConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_ImportDocumentsRequest_BatchDocumentsImportConfig_AutoSplitConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_ImportDocumentsRequest_BatchDocumentsImportConfig_AutoSplitConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig.AutoSplitConfig.class, + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig.AutoSplitConfig.Builder.class); + } + + public static final int TRAINING_SPLIT_RATIO_FIELD_NUMBER = 1; + private float trainingSplitRatio_ = 0F; + /** + * + * + *
+       * Ratio of training dataset split.
+       * 
+ * + * float training_split_ratio = 1; + * + * @return The trainingSplitRatio. + */ + @java.lang.Override + public float getTrainingSplitRatio() { + return trainingSplitRatio_; + } + + 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 (java.lang.Float.floatToRawIntBits(trainingSplitRatio_) != 0) { + output.writeFloat(1, trainingSplitRatio_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Float.floatToRawIntBits(trainingSplitRatio_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, trainingSplitRatio_); + } + size += getUnknownFields().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.ImportDocumentsRequest.BatchDocumentsImportConfig + .AutoSplitConfig)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + .AutoSplitConfig + other = + (com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig.AutoSplitConfig) + obj; + + if (java.lang.Float.floatToIntBits(getTrainingSplitRatio()) + != java.lang.Float.floatToIntBits(other.getTrainingSplitRatio())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + TRAINING_SPLIT_RATIO_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getTrainingSplitRatio()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig.AutoSplitConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig.AutoSplitConfig + 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.ImportDocumentsRequest + .BatchDocumentsImportConfig.AutoSplitConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig.AutoSplitConfig + 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.ImportDocumentsRequest + .BatchDocumentsImportConfig.AutoSplitConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig.AutoSplitConfig + 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.ImportDocumentsRequest + .BatchDocumentsImportConfig.AutoSplitConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig.AutoSplitConfig + 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.ImportDocumentsRequest + .BatchDocumentsImportConfig.AutoSplitConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig.AutoSplitConfig + 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.ImportDocumentsRequest + .BatchDocumentsImportConfig.AutoSplitConfig + 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.ImportDocumentsRequest + .BatchDocumentsImportConfig.AutoSplitConfig + 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.ImportDocumentsRequest.BatchDocumentsImportConfig + .AutoSplitConfig + 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 config for auto-split.
+       * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig.AutoSplitConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig.AutoSplitConfig) + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + .AutoSplitConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_ImportDocumentsRequest_BatchDocumentsImportConfig_AutoSplitConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_ImportDocumentsRequest_BatchDocumentsImportConfig_AutoSplitConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig.AutoSplitConfig.class, + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig.AutoSplitConfig.Builder.class); + } + + // Construct using + // com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig.AutoSplitConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + trainingSplitRatio_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_ImportDocumentsRequest_BatchDocumentsImportConfig_AutoSplitConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + .AutoSplitConfig + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig.AutoSplitConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + .AutoSplitConfig + build() { + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + .AutoSplitConfig + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + .AutoSplitConfig + buildPartial() { + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + .AutoSplitConfig + result = + new com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig.AutoSplitConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + .AutoSplitConfig + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.trainingSplitRatio_ = trainingSplitRatio_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + .AutoSplitConfig) { + return mergeFrom( + (com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig.AutoSplitConfig) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + .AutoSplitConfig + other) { + if (other + == com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig.AutoSplitConfig.getDefaultInstance()) return this; + if (other.getTrainingSplitRatio() != 0F) { + setTrainingSplitRatio(other.getTrainingSplitRatio()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: + { + trainingSplitRatio_ = input.readFloat(); + bitField0_ |= 0x00000001; + break; + } // case 13 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private float trainingSplitRatio_; + /** + * + * + *
+         * Ratio of training dataset split.
+         * 
+ * + * float training_split_ratio = 1; + * + * @return The trainingSplitRatio. + */ + @java.lang.Override + public float getTrainingSplitRatio() { + return trainingSplitRatio_; + } + /** + * + * + *
+         * Ratio of training dataset split.
+         * 
+ * + * float training_split_ratio = 1; + * + * @param value The trainingSplitRatio to set. + * @return This builder for chaining. + */ + public Builder setTrainingSplitRatio(float value) { + + trainingSplitRatio_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Ratio of training dataset split.
+         * 
+ * + * float training_split_ratio = 1; + * + * @return This builder for chaining. + */ + public Builder clearTrainingSplitRatio() { + bitField0_ = (bitField0_ & ~0x00000001); + trainingSplitRatio_ = 0F; + 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.ImportDocumentsRequest.BatchDocumentsImportConfig.AutoSplitConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig.AutoSplitConfig) + private static final com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig.AutoSplitConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig.AutoSplitConfig(); + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig.AutoSplitConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutoSplitConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + .AutoSplitConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int splitTypeConfigCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object splitTypeConfig_; + + public enum SplitTypeConfigCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + DATASET_SPLIT(2), + AUTO_SPLIT_CONFIG(3), + SPLITTYPECONFIG_NOT_SET(0); + private final int value; + + private SplitTypeConfigCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SplitTypeConfigCase valueOf(int value) { + return forNumber(value); + } + + public static SplitTypeConfigCase forNumber(int value) { + switch (value) { + case 2: + return DATASET_SPLIT; + case 3: + return AUTO_SPLIT_CONFIG; + case 0: + return SPLITTYPECONFIG_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SplitTypeConfigCase getSplitTypeConfigCase() { + return SplitTypeConfigCase.forNumber(splitTypeConfigCase_); + } + + public static final int DATASET_SPLIT_FIELD_NUMBER = 2; + /** + * + * + *
+     * Target dataset split where the documents must be stored.
+     * 
+ * + * .google.cloud.documentai.v1beta3.DatasetSplitType dataset_split = 2; + * + * @return Whether the datasetSplit field is set. + */ + public boolean hasDatasetSplit() { + return splitTypeConfigCase_ == 2; + } + /** + * + * + *
+     * Target dataset split where the documents must be stored.
+     * 
+ * + * .google.cloud.documentai.v1beta3.DatasetSplitType dataset_split = 2; + * + * @return The enum numeric value on the wire for datasetSplit. + */ + public int getDatasetSplitValue() { + if (splitTypeConfigCase_ == 2) { + return (java.lang.Integer) splitTypeConfig_; + } + return 0; + } + /** + * + * + *
+     * Target dataset split where the documents must be stored.
+     * 
+ * + * .google.cloud.documentai.v1beta3.DatasetSplitType dataset_split = 2; + * + * @return The datasetSplit. + */ + public com.google.cloud.documentai.v1beta3.DatasetSplitType getDatasetSplit() { + if (splitTypeConfigCase_ == 2) { + com.google.cloud.documentai.v1beta3.DatasetSplitType result = + com.google.cloud.documentai.v1beta3.DatasetSplitType.forNumber( + (java.lang.Integer) splitTypeConfig_); + return result == null + ? com.google.cloud.documentai.v1beta3.DatasetSplitType.UNRECOGNIZED + : result; + } + return com.google.cloud.documentai.v1beta3.DatasetSplitType.DATASET_SPLIT_TYPE_UNSPECIFIED; + } + + public static final int AUTO_SPLIT_CONFIG_FIELD_NUMBER = 3; + /** + * + * + *
+     * If set, documents will be automatically split into training and test
+     * split category with the specified ratio.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig.AutoSplitConfig auto_split_config = 3; + * + * + * @return Whether the autoSplitConfig field is set. + */ + @java.lang.Override + public boolean hasAutoSplitConfig() { + return splitTypeConfigCase_ == 3; + } + /** + * + * + *
+     * If set, documents will be automatically split into training and test
+     * split category with the specified ratio.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig.AutoSplitConfig auto_split_config = 3; + * + * + * @return The autoSplitConfig. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + .AutoSplitConfig + getAutoSplitConfig() { + if (splitTypeConfigCase_ == 3) { + return (com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig.AutoSplitConfig) + splitTypeConfig_; + } + return com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + .AutoSplitConfig.getDefaultInstance(); + } + /** + * + * + *
+     * If set, documents will be automatically split into training and test
+     * split category with the specified ratio.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig.AutoSplitConfig auto_split_config = 3; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + .AutoSplitConfigOrBuilder + getAutoSplitConfigOrBuilder() { + if (splitTypeConfigCase_ == 3) { + return (com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig.AutoSplitConfig) + splitTypeConfig_; + } + return com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + .AutoSplitConfig.getDefaultInstance(); + } + + public static final int BATCH_INPUT_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig batchInputConfig_; + /** + * + * + *
+     * The common config to specify a set of documents used as input.
+     * 
+ * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig batch_input_config = 1; + * + * + * @return Whether the batchInputConfig field is set. + */ + @java.lang.Override + public boolean hasBatchInputConfig() { + return batchInputConfig_ != null; + } + /** + * + * + *
+     * The common config to specify a set of documents used as input.
+     * 
+ * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig batch_input_config = 1; + * + * + * @return The batchInputConfig. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig getBatchInputConfig() { + return batchInputConfig_ == null + ? com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.getDefaultInstance() + : batchInputConfig_; + } + /** + * + * + *
+     * The common config to specify a set of documents used as input.
+     * 
+ * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig batch_input_config = 1; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfigOrBuilder + getBatchInputConfigOrBuilder() { + return batchInputConfig_ == null + ? com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.getDefaultInstance() + : batchInputConfig_; + } + + 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 (batchInputConfig_ != null) { + output.writeMessage(1, getBatchInputConfig()); + } + if (splitTypeConfigCase_ == 2) { + output.writeEnum(2, ((java.lang.Integer) splitTypeConfig_)); + } + if (splitTypeConfigCase_ == 3) { + output.writeMessage( + 3, + (com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + .AutoSplitConfig) + splitTypeConfig_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (batchInputConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getBatchInputConfig()); + } + if (splitTypeConfigCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeEnumSize( + 2, ((java.lang.Integer) splitTypeConfig_)); + } + if (splitTypeConfigCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, + (com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig.AutoSplitConfig) + splitTypeConfig_); + } + size += getUnknownFields().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.ImportDocumentsRequest.BatchDocumentsImportConfig)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig other = + (com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig) + obj; + + if (hasBatchInputConfig() != other.hasBatchInputConfig()) return false; + if (hasBatchInputConfig()) { + if (!getBatchInputConfig().equals(other.getBatchInputConfig())) return false; + } + if (!getSplitTypeConfigCase().equals(other.getSplitTypeConfigCase())) return false; + switch (splitTypeConfigCase_) { + case 2: + if (getDatasetSplitValue() != other.getDatasetSplitValue()) return false; + break; + case 3: + if (!getAutoSplitConfig().equals(other.getAutoSplitConfig())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBatchInputConfig()) { + hash = (37 * hash) + BATCH_INPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getBatchInputConfig().hashCode(); + } + switch (splitTypeConfigCase_) { + case 2: + hash = (37 * hash) + DATASET_SPLIT_FIELD_NUMBER; + hash = (53 * hash) + getDatasetSplitValue(); + break; + case 3: + hash = (37 * hash) + AUTO_SPLIT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getAutoSplitConfig().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig + 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.ImportDocumentsRequest + .BatchDocumentsImportConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig + 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.ImportDocumentsRequest + .BatchDocumentsImportConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig + 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.ImportDocumentsRequest + .BatchDocumentsImportConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig + 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.ImportDocumentsRequest + .BatchDocumentsImportConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig + 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.ImportDocumentsRequest + .BatchDocumentsImportConfig + 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.ImportDocumentsRequest + .BatchDocumentsImportConfig + 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.ImportDocumentsRequest.BatchDocumentsImportConfig + 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; + } + /** + * + * + *
+     * Config for importing documents.
+     * Each batch can have its own dataset split type.
+     * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig) + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_ImportDocumentsRequest_BatchDocumentsImportConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_ImportDocumentsRequest_BatchDocumentsImportConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig.class, + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig.Builder.class); + } + + // Construct using + // com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (autoSplitConfigBuilder_ != null) { + autoSplitConfigBuilder_.clear(); + } + batchInputConfig_ = null; + if (batchInputConfigBuilder_ != null) { + batchInputConfigBuilder_.dispose(); + batchInputConfigBuilder_ = null; + } + splitTypeConfigCase_ = 0; + splitTypeConfig_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_ImportDocumentsRequest_BatchDocumentsImportConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + build() { + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + buildPartial() { + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + result = + new com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.batchInputConfig_ = + batchInputConfigBuilder_ == null + ? batchInputConfig_ + : batchInputConfigBuilder_.build(); + } + } + + private void buildPartialOneofs( + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + result) { + result.splitTypeConfigCase_ = splitTypeConfigCase_; + result.splitTypeConfig_ = this.splitTypeConfig_; + if (splitTypeConfigCase_ == 3 && autoSplitConfigBuilder_ != null) { + result.splitTypeConfig_ = autoSplitConfigBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig) { + return mergeFrom( + (com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + other) { + if (other + == com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + .getDefaultInstance()) return this; + if (other.hasBatchInputConfig()) { + mergeBatchInputConfig(other.getBatchInputConfig()); + } + switch (other.getSplitTypeConfigCase()) { + case DATASET_SPLIT: + { + setDatasetSplitValue(other.getDatasetSplitValue()); + break; + } + case AUTO_SPLIT_CONFIG: + { + mergeAutoSplitConfig(other.getAutoSplitConfig()); + break; + } + case SPLITTYPECONFIG_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getBatchInputConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 10 + case 16: + { + int rawValue = input.readEnum(); + splitTypeConfigCase_ = 2; + splitTypeConfig_ = rawValue; + break; + } // case 16 + case 26: + { + input.readMessage( + getAutoSplitConfigFieldBuilder().getBuilder(), extensionRegistry); + splitTypeConfigCase_ = 3; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int splitTypeConfigCase_ = 0; + private java.lang.Object splitTypeConfig_; + + public SplitTypeConfigCase getSplitTypeConfigCase() { + return SplitTypeConfigCase.forNumber(splitTypeConfigCase_); + } + + public Builder clearSplitTypeConfig() { + splitTypeConfigCase_ = 0; + splitTypeConfig_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+       * Target dataset split where the documents must be stored.
+       * 
+ * + * .google.cloud.documentai.v1beta3.DatasetSplitType dataset_split = 2; + * + * @return Whether the datasetSplit field is set. + */ + @java.lang.Override + public boolean hasDatasetSplit() { + return splitTypeConfigCase_ == 2; + } + /** + * + * + *
+       * Target dataset split where the documents must be stored.
+       * 
+ * + * .google.cloud.documentai.v1beta3.DatasetSplitType dataset_split = 2; + * + * @return The enum numeric value on the wire for datasetSplit. + */ + @java.lang.Override + public int getDatasetSplitValue() { + if (splitTypeConfigCase_ == 2) { + return ((java.lang.Integer) splitTypeConfig_).intValue(); + } + return 0; + } + /** + * + * + *
+       * Target dataset split where the documents must be stored.
+       * 
+ * + * .google.cloud.documentai.v1beta3.DatasetSplitType dataset_split = 2; + * + * @param value The enum numeric value on the wire for datasetSplit to set. + * @return This builder for chaining. + */ + public Builder setDatasetSplitValue(int value) { + splitTypeConfigCase_ = 2; + splitTypeConfig_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Target dataset split where the documents must be stored.
+       * 
+ * + * .google.cloud.documentai.v1beta3.DatasetSplitType dataset_split = 2; + * + * @return The datasetSplit. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.DatasetSplitType getDatasetSplit() { + if (splitTypeConfigCase_ == 2) { + com.google.cloud.documentai.v1beta3.DatasetSplitType result = + com.google.cloud.documentai.v1beta3.DatasetSplitType.forNumber( + (java.lang.Integer) splitTypeConfig_); + return result == null + ? com.google.cloud.documentai.v1beta3.DatasetSplitType.UNRECOGNIZED + : result; + } + return com.google.cloud.documentai.v1beta3.DatasetSplitType.DATASET_SPLIT_TYPE_UNSPECIFIED; + } + /** + * + * + *
+       * Target dataset split where the documents must be stored.
+       * 
+ * + * .google.cloud.documentai.v1beta3.DatasetSplitType dataset_split = 2; + * + * @param value The datasetSplit to set. + * @return This builder for chaining. + */ + public Builder setDatasetSplit(com.google.cloud.documentai.v1beta3.DatasetSplitType value) { + if (value == null) { + throw new NullPointerException(); + } + splitTypeConfigCase_ = 2; + splitTypeConfig_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Target dataset split where the documents must be stored.
+       * 
+ * + * .google.cloud.documentai.v1beta3.DatasetSplitType dataset_split = 2; + * + * @return This builder for chaining. + */ + public Builder clearDatasetSplit() { + if (splitTypeConfigCase_ == 2) { + splitTypeConfigCase_ = 0; + splitTypeConfig_ = null; + onChanged(); + } + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + .AutoSplitConfig, + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + .AutoSplitConfig.Builder, + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + .AutoSplitConfigOrBuilder> + autoSplitConfigBuilder_; + /** + * + * + *
+       * If set, documents will be automatically split into training and test
+       * split category with the specified ratio.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig.AutoSplitConfig auto_split_config = 3; + * + * + * @return Whether the autoSplitConfig field is set. + */ + @java.lang.Override + public boolean hasAutoSplitConfig() { + return splitTypeConfigCase_ == 3; + } + /** + * + * + *
+       * If set, documents will be automatically split into training and test
+       * split category with the specified ratio.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig.AutoSplitConfig auto_split_config = 3; + * + * + * @return The autoSplitConfig. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + .AutoSplitConfig + getAutoSplitConfig() { + if (autoSplitConfigBuilder_ == null) { + if (splitTypeConfigCase_ == 3) { + return (com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig.AutoSplitConfig) + splitTypeConfig_; + } + return com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig.AutoSplitConfig.getDefaultInstance(); + } else { + if (splitTypeConfigCase_ == 3) { + return autoSplitConfigBuilder_.getMessage(); + } + return com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig.AutoSplitConfig.getDefaultInstance(); + } + } + /** + * + * + *
+       * If set, documents will be automatically split into training and test
+       * split category with the specified ratio.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig.AutoSplitConfig auto_split_config = 3; + * + */ + public Builder setAutoSplitConfig( + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + .AutoSplitConfig + value) { + if (autoSplitConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + splitTypeConfig_ = value; + onChanged(); + } else { + autoSplitConfigBuilder_.setMessage(value); + } + splitTypeConfigCase_ = 3; + return this; + } + /** + * + * + *
+       * If set, documents will be automatically split into training and test
+       * split category with the specified ratio.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig.AutoSplitConfig auto_split_config = 3; + * + */ + public Builder setAutoSplitConfig( + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + .AutoSplitConfig.Builder + builderForValue) { + if (autoSplitConfigBuilder_ == null) { + splitTypeConfig_ = builderForValue.build(); + onChanged(); + } else { + autoSplitConfigBuilder_.setMessage(builderForValue.build()); + } + splitTypeConfigCase_ = 3; + return this; + } + /** + * + * + *
+       * If set, documents will be automatically split into training and test
+       * split category with the specified ratio.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig.AutoSplitConfig auto_split_config = 3; + * + */ + public Builder mergeAutoSplitConfig( + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + .AutoSplitConfig + value) { + if (autoSplitConfigBuilder_ == null) { + if (splitTypeConfigCase_ == 3 + && splitTypeConfig_ + != com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig.AutoSplitConfig.getDefaultInstance()) { + splitTypeConfig_ = + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig.AutoSplitConfig.newBuilder( + (com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig.AutoSplitConfig) + splitTypeConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + splitTypeConfig_ = value; + } + onChanged(); + } else { + if (splitTypeConfigCase_ == 3) { + autoSplitConfigBuilder_.mergeFrom(value); + } else { + autoSplitConfigBuilder_.setMessage(value); + } + } + splitTypeConfigCase_ = 3; + return this; + } + /** + * + * + *
+       * If set, documents will be automatically split into training and test
+       * split category with the specified ratio.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig.AutoSplitConfig auto_split_config = 3; + * + */ + public Builder clearAutoSplitConfig() { + if (autoSplitConfigBuilder_ == null) { + if (splitTypeConfigCase_ == 3) { + splitTypeConfigCase_ = 0; + splitTypeConfig_ = null; + onChanged(); + } + } else { + if (splitTypeConfigCase_ == 3) { + splitTypeConfigCase_ = 0; + splitTypeConfig_ = null; + } + autoSplitConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * If set, documents will be automatically split into training and test
+       * split category with the specified ratio.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig.AutoSplitConfig auto_split_config = 3; + * + */ + public com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + .AutoSplitConfig.Builder + getAutoSplitConfigBuilder() { + return getAutoSplitConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * If set, documents will be automatically split into training and test
+       * split category with the specified ratio.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig.AutoSplitConfig auto_split_config = 3; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + .AutoSplitConfigOrBuilder + getAutoSplitConfigOrBuilder() { + if ((splitTypeConfigCase_ == 3) && (autoSplitConfigBuilder_ != null)) { + return autoSplitConfigBuilder_.getMessageOrBuilder(); + } else { + if (splitTypeConfigCase_ == 3) { + return (com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig.AutoSplitConfig) + splitTypeConfig_; + } + return com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig.AutoSplitConfig.getDefaultInstance(); + } + } + /** + * + * + *
+       * If set, documents will be automatically split into training and test
+       * split category with the specified ratio.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig.AutoSplitConfig auto_split_config = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + .AutoSplitConfig, + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + .AutoSplitConfig.Builder, + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + .AutoSplitConfigOrBuilder> + getAutoSplitConfigFieldBuilder() { + if (autoSplitConfigBuilder_ == null) { + if (!(splitTypeConfigCase_ == 3)) { + splitTypeConfig_ = + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig.AutoSplitConfig.getDefaultInstance(); + } + autoSplitConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig.AutoSplitConfig, + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig.AutoSplitConfig.Builder, + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig.AutoSplitConfigOrBuilder>( + (com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig.AutoSplitConfig) + splitTypeConfig_, + getParentForChildren(), + isClean()); + splitTypeConfig_ = null; + } + splitTypeConfigCase_ = 3; + onChanged(); + return autoSplitConfigBuilder_; + } + + private com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig batchInputConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig, + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.Builder, + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfigOrBuilder> + batchInputConfigBuilder_; + /** + * + * + *
+       * The common config to specify a set of documents used as input.
+       * 
+ * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig batch_input_config = 1; + * + * + * @return Whether the batchInputConfig field is set. + */ + public boolean hasBatchInputConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+       * The common config to specify a set of documents used as input.
+       * 
+ * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig batch_input_config = 1; + * + * + * @return The batchInputConfig. + */ + public com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig getBatchInputConfig() { + if (batchInputConfigBuilder_ == null) { + return batchInputConfig_ == null + ? com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.getDefaultInstance() + : batchInputConfig_; + } else { + return batchInputConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The common config to specify a set of documents used as input.
+       * 
+ * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig batch_input_config = 1; + * + */ + public Builder setBatchInputConfig( + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig value) { + if (batchInputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + batchInputConfig_ = value; + } else { + batchInputConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * The common config to specify a set of documents used as input.
+       * 
+ * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig batch_input_config = 1; + * + */ + public Builder setBatchInputConfig( + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.Builder builderForValue) { + if (batchInputConfigBuilder_ == null) { + batchInputConfig_ = builderForValue.build(); + } else { + batchInputConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * The common config to specify a set of documents used as input.
+       * 
+ * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig batch_input_config = 1; + * + */ + public Builder mergeBatchInputConfig( + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig value) { + if (batchInputConfigBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && batchInputConfig_ != null + && batchInputConfig_ + != com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig + .getDefaultInstance()) { + getBatchInputConfigBuilder().mergeFrom(value); + } else { + batchInputConfig_ = value; + } + } else { + batchInputConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * The common config to specify a set of documents used as input.
+       * 
+ * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig batch_input_config = 1; + * + */ + public Builder clearBatchInputConfig() { + bitField0_ = (bitField0_ & ~0x00000004); + batchInputConfig_ = null; + if (batchInputConfigBuilder_ != null) { + batchInputConfigBuilder_.dispose(); + batchInputConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * The common config to specify a set of documents used as input.
+       * 
+ * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig batch_input_config = 1; + * + */ + public com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.Builder + getBatchInputConfigBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getBatchInputConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The common config to specify a set of documents used as input.
+       * 
+ * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig batch_input_config = 1; + * + */ + public com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfigOrBuilder + getBatchInputConfigOrBuilder() { + if (batchInputConfigBuilder_ != null) { + return batchInputConfigBuilder_.getMessageOrBuilder(); + } else { + return batchInputConfig_ == null + ? com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.getDefaultInstance() + : batchInputConfig_; + } + } + /** + * + * + *
+       * The common config to specify a set of documents used as input.
+       * 
+ * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig batch_input_config = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig, + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.Builder, + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfigOrBuilder> + getBatchInputConfigFieldBuilder() { + if (batchInputConfigBuilder_ == null) { + batchInputConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig, + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.Builder, + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfigOrBuilder>( + getBatchInputConfig(), getParentForChildren(), isClean()); + batchInputConfig_ = null; + } + return batchInputConfigBuilder_; + } + + @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.ImportDocumentsRequest.BatchDocumentsImportConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig) + private static final com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig(); + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchDocumentsImportConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int DATASET_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object dataset_ = ""; + /** + * + * + *
+   * Required. The dataset resource name.
+   * Format:
+   * projects/{project}/locations/{location}/processors/{processor}/dataset
+   * 
+ * + * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The dataset. + */ + @java.lang.Override + public java.lang.String getDataset() { + java.lang.Object ref = dataset_; + 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(); + dataset_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The dataset resource name.
+   * Format:
+   * projects/{project}/locations/{location}/processors/{processor}/dataset
+   * 
+ * + * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for dataset. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatasetBytes() { + java.lang.Object ref = dataset_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BATCH_DOCUMENTS_IMPORT_CONFIGS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig> + batchDocumentsImportConfigs_; + /** + * + * + *
+   * Required. The Cloud Storage uri containing raw documents that must be
+   * imported.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig batch_documents_import_configs = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig> + getBatchDocumentsImportConfigsList() { + return batchDocumentsImportConfigs_; + } + /** + * + * + *
+   * Required. The Cloud Storage uri containing raw documents that must be
+   * imported.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig batch_documents_import_configs = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfigOrBuilder> + getBatchDocumentsImportConfigsOrBuilderList() { + return batchDocumentsImportConfigs_; + } + /** + * + * + *
+   * Required. The Cloud Storage uri containing raw documents that must be
+   * imported.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig batch_documents_import_configs = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getBatchDocumentsImportConfigsCount() { + return batchDocumentsImportConfigs_.size(); + } + /** + * + * + *
+   * Required. The Cloud Storage uri containing raw documents that must be
+   * imported.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig batch_documents_import_configs = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + getBatchDocumentsImportConfigs(int index) { + return batchDocumentsImportConfigs_.get(index); + } + /** + * + * + *
+   * Required. The Cloud Storage uri containing raw documents that must be
+   * imported.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig batch_documents_import_configs = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfigOrBuilder + getBatchDocumentsImportConfigsOrBuilder(int index) { + return batchDocumentsImportConfigs_.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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataset_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, dataset_); + } + for (int i = 0; i < batchDocumentsImportConfigs_.size(); i++) { + output.writeMessage(4, batchDocumentsImportConfigs_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataset_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, dataset_); + } + for (int i = 0; i < batchDocumentsImportConfigs_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, batchDocumentsImportConfigs_.get(i)); + } + size += getUnknownFields().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.ImportDocumentsRequest)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest other = + (com.google.cloud.documentai.v1beta3.ImportDocumentsRequest) obj; + + if (!getDataset().equals(other.getDataset())) return false; + if (!getBatchDocumentsImportConfigsList().equals(other.getBatchDocumentsImportConfigsList())) + return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + DATASET_FIELD_NUMBER; + hash = (53 * hash) + getDataset().hashCode(); + if (getBatchDocumentsImportConfigsCount() > 0) { + hash = (37 * hash) + BATCH_DOCUMENTS_IMPORT_CONFIGS_FIELD_NUMBER; + hash = (53 * hash) + getBatchDocumentsImportConfigsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsRequest 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.ImportDocumentsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsRequest 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.ImportDocumentsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsRequest 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.ImportDocumentsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsRequest 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.ImportDocumentsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsRequest 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.ImportDocumentsRequest 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.ImportDocumentsRequest 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.ImportDocumentsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** Protobuf type {@code google.cloud.documentai.v1beta3.ImportDocumentsRequest} */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.ImportDocumentsRequest) + com.google.cloud.documentai.v1beta3.ImportDocumentsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_ImportDocumentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_ImportDocumentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.class, + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.Builder.class); + } + + // Construct using com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + dataset_ = ""; + if (batchDocumentsImportConfigsBuilder_ == null) { + batchDocumentsImportConfigs_ = java.util.Collections.emptyList(); + } else { + batchDocumentsImportConfigs_ = null; + batchDocumentsImportConfigsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_ImportDocumentsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ImportDocumentsRequest getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ImportDocumentsRequest build() { + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ImportDocumentsRequest buildPartial() { + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest result = + new com.google.cloud.documentai.v1beta3.ImportDocumentsRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest result) { + if (batchDocumentsImportConfigsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + batchDocumentsImportConfigs_ = + java.util.Collections.unmodifiableList(batchDocumentsImportConfigs_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.batchDocumentsImportConfigs_ = batchDocumentsImportConfigs_; + } else { + result.batchDocumentsImportConfigs_ = batchDocumentsImportConfigsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.documentai.v1beta3.ImportDocumentsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.dataset_ = dataset_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta3.ImportDocumentsRequest) { + return mergeFrom((com.google.cloud.documentai.v1beta3.ImportDocumentsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.documentai.v1beta3.ImportDocumentsRequest other) { + if (other == com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.getDefaultInstance()) + return this; + if (!other.getDataset().isEmpty()) { + dataset_ = other.dataset_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (batchDocumentsImportConfigsBuilder_ == null) { + if (!other.batchDocumentsImportConfigs_.isEmpty()) { + if (batchDocumentsImportConfigs_.isEmpty()) { + batchDocumentsImportConfigs_ = other.batchDocumentsImportConfigs_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureBatchDocumentsImportConfigsIsMutable(); + batchDocumentsImportConfigs_.addAll(other.batchDocumentsImportConfigs_); + } + onChanged(); + } + } else { + if (!other.batchDocumentsImportConfigs_.isEmpty()) { + if (batchDocumentsImportConfigsBuilder_.isEmpty()) { + batchDocumentsImportConfigsBuilder_.dispose(); + batchDocumentsImportConfigsBuilder_ = null; + batchDocumentsImportConfigs_ = other.batchDocumentsImportConfigs_; + bitField0_ = (bitField0_ & ~0x00000002); + batchDocumentsImportConfigsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getBatchDocumentsImportConfigsFieldBuilder() + : null; + } else { + batchDocumentsImportConfigsBuilder_.addAllMessages(other.batchDocumentsImportConfigs_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + dataset_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 34: + { + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig + m = + input.readMessage( + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig.parser(), + extensionRegistry); + if (batchDocumentsImportConfigsBuilder_ == null) { + ensureBatchDocumentsImportConfigsIsMutable(); + batchDocumentsImportConfigs_.add(m); + } else { + batchDocumentsImportConfigsBuilder_.addMessage(m); + } + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object dataset_ = ""; + /** + * + * + *
+     * Required. The dataset resource name.
+     * Format:
+     * projects/{project}/locations/{location}/processors/{processor}/dataset
+     * 
+ * + * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The dataset. + */ + public java.lang.String getDataset() { + java.lang.Object ref = dataset_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataset_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The dataset resource name.
+     * Format:
+     * projects/{project}/locations/{location}/processors/{processor}/dataset
+     * 
+ * + * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for dataset. + */ + public com.google.protobuf.ByteString getDatasetBytes() { + java.lang.Object ref = dataset_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The dataset resource name.
+     * Format:
+     * projects/{project}/locations/{location}/processors/{processor}/dataset
+     * 
+ * + * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The dataset to set. + * @return This builder for chaining. + */ + public Builder setDataset(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dataset_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The dataset resource name.
+     * Format:
+     * projects/{project}/locations/{location}/processors/{processor}/dataset
+     * 
+ * + * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearDataset() { + dataset_ = getDefaultInstance().getDataset(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The dataset resource name.
+     * Format:
+     * projects/{project}/locations/{location}/processors/{processor}/dataset
+     * 
+ * + * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for dataset to set. + * @return This builder for chaining. + */ + public Builder setDatasetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dataset_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List< + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig> + batchDocumentsImportConfigs_ = java.util.Collections.emptyList(); + + private void ensureBatchDocumentsImportConfigsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + batchDocumentsImportConfigs_ = + new java.util.ArrayList< + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig>(batchDocumentsImportConfigs_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig, + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + .Builder, + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfigOrBuilder> + batchDocumentsImportConfigsBuilder_; + + /** + * + * + *
+     * Required. The Cloud Storage uri containing raw documents that must be
+     * imported.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig batch_documents_import_configs = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List< + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig> + getBatchDocumentsImportConfigsList() { + if (batchDocumentsImportConfigsBuilder_ == null) { + return java.util.Collections.unmodifiableList(batchDocumentsImportConfigs_); + } else { + return batchDocumentsImportConfigsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. The Cloud Storage uri containing raw documents that must be
+     * imported.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig batch_documents_import_configs = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getBatchDocumentsImportConfigsCount() { + if (batchDocumentsImportConfigsBuilder_ == null) { + return batchDocumentsImportConfigs_.size(); + } else { + return batchDocumentsImportConfigsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. The Cloud Storage uri containing raw documents that must be
+     * imported.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig batch_documents_import_configs = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + getBatchDocumentsImportConfigs(int index) { + if (batchDocumentsImportConfigsBuilder_ == null) { + return batchDocumentsImportConfigs_.get(index); + } else { + return batchDocumentsImportConfigsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. The Cloud Storage uri containing raw documents that must be
+     * imported.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig batch_documents_import_configs = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBatchDocumentsImportConfigs( + int index, + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + value) { + if (batchDocumentsImportConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBatchDocumentsImportConfigsIsMutable(); + batchDocumentsImportConfigs_.set(index, value); + onChanged(); + } else { + batchDocumentsImportConfigsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The Cloud Storage uri containing raw documents that must be
+     * imported.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig batch_documents_import_configs = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBatchDocumentsImportConfigs( + int index, + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + .Builder + builderForValue) { + if (batchDocumentsImportConfigsBuilder_ == null) { + ensureBatchDocumentsImportConfigsIsMutable(); + batchDocumentsImportConfigs_.set(index, builderForValue.build()); + onChanged(); + } else { + batchDocumentsImportConfigsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The Cloud Storage uri containing raw documents that must be
+     * imported.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig batch_documents_import_configs = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addBatchDocumentsImportConfigs( + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + value) { + if (batchDocumentsImportConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBatchDocumentsImportConfigsIsMutable(); + batchDocumentsImportConfigs_.add(value); + onChanged(); + } else { + batchDocumentsImportConfigsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. The Cloud Storage uri containing raw documents that must be
+     * imported.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig batch_documents_import_configs = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addBatchDocumentsImportConfigs( + int index, + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + value) { + if (batchDocumentsImportConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBatchDocumentsImportConfigsIsMutable(); + batchDocumentsImportConfigs_.add(index, value); + onChanged(); + } else { + batchDocumentsImportConfigsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The Cloud Storage uri containing raw documents that must be
+     * imported.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig batch_documents_import_configs = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addBatchDocumentsImportConfigs( + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + .Builder + builderForValue) { + if (batchDocumentsImportConfigsBuilder_ == null) { + ensureBatchDocumentsImportConfigsIsMutable(); + batchDocumentsImportConfigs_.add(builderForValue.build()); + onChanged(); + } else { + batchDocumentsImportConfigsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The Cloud Storage uri containing raw documents that must be
+     * imported.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig batch_documents_import_configs = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addBatchDocumentsImportConfigs( + int index, + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + .Builder + builderForValue) { + if (batchDocumentsImportConfigsBuilder_ == null) { + ensureBatchDocumentsImportConfigsIsMutable(); + batchDocumentsImportConfigs_.add(index, builderForValue.build()); + onChanged(); + } else { + batchDocumentsImportConfigsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The Cloud Storage uri containing raw documents that must be
+     * imported.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig batch_documents_import_configs = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllBatchDocumentsImportConfigs( + java.lang.Iterable< + ? extends + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig> + values) { + if (batchDocumentsImportConfigsBuilder_ == null) { + ensureBatchDocumentsImportConfigsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, batchDocumentsImportConfigs_); + onChanged(); + } else { + batchDocumentsImportConfigsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Required. The Cloud Storage uri containing raw documents that must be
+     * imported.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig batch_documents_import_configs = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearBatchDocumentsImportConfigs() { + if (batchDocumentsImportConfigsBuilder_ == null) { + batchDocumentsImportConfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + batchDocumentsImportConfigsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. The Cloud Storage uri containing raw documents that must be
+     * imported.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig batch_documents_import_configs = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeBatchDocumentsImportConfigs(int index) { + if (batchDocumentsImportConfigsBuilder_ == null) { + ensureBatchDocumentsImportConfigsIsMutable(); + batchDocumentsImportConfigs_.remove(index); + onChanged(); + } else { + batchDocumentsImportConfigsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. The Cloud Storage uri containing raw documents that must be
+     * imported.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig batch_documents_import_configs = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + .Builder + getBatchDocumentsImportConfigsBuilder(int index) { + return getBatchDocumentsImportConfigsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. The Cloud Storage uri containing raw documents that must be
+     * imported.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig batch_documents_import_configs = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfigOrBuilder + getBatchDocumentsImportConfigsOrBuilder(int index) { + if (batchDocumentsImportConfigsBuilder_ == null) { + return batchDocumentsImportConfigs_.get(index); + } else { + return batchDocumentsImportConfigsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. The Cloud Storage uri containing raw documents that must be
+     * imported.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig batch_documents_import_configs = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List< + ? extends + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfigOrBuilder> + getBatchDocumentsImportConfigsOrBuilderList() { + if (batchDocumentsImportConfigsBuilder_ != null) { + return batchDocumentsImportConfigsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(batchDocumentsImportConfigs_); + } + } + /** + * + * + *
+     * Required. The Cloud Storage uri containing raw documents that must be
+     * imported.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig batch_documents_import_configs = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + .Builder + addBatchDocumentsImportConfigsBuilder() { + return getBatchDocumentsImportConfigsFieldBuilder() + .addBuilder( + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + .getDefaultInstance()); + } + /** + * + * + *
+     * Required. The Cloud Storage uri containing raw documents that must be
+     * imported.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig batch_documents_import_configs = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + .Builder + addBatchDocumentsImportConfigsBuilder(int index) { + return getBatchDocumentsImportConfigsFieldBuilder() + .addBuilder( + index, + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + .getDefaultInstance()); + } + /** + * + * + *
+     * Required. The Cloud Storage uri containing raw documents that must be
+     * imported.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig batch_documents_import_configs = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List< + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + .Builder> + getBatchDocumentsImportConfigsBuilderList() { + return getBatchDocumentsImportConfigsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig, + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + .Builder, + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfigOrBuilder> + getBatchDocumentsImportConfigsFieldBuilder() { + if (batchDocumentsImportConfigsBuilder_ == null) { + batchDocumentsImportConfigsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig, + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfig.Builder, + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfigOrBuilder>( + batchDocumentsImportConfigs_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + batchDocumentsImportConfigs_ = null; + } + return batchDocumentsImportConfigsBuilder_; + } + + @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.ImportDocumentsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.ImportDocumentsRequest) + private static final com.google.cloud.documentai.v1beta3.ImportDocumentsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta3.ImportDocumentsRequest(); + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportDocumentsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ImportDocumentsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ImportDocumentsRequestOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ImportDocumentsRequestOrBuilder.java new file mode 100644 index 000000000000..70bfb36df756 --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ImportDocumentsRequestOrBuilder.java @@ -0,0 +1,132 @@ +/* + * Copyright 2023 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_service.proto + +package com.google.cloud.documentai.v1beta3; + +public interface ImportDocumentsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.ImportDocumentsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The dataset resource name.
+   * Format:
+   * projects/{project}/locations/{location}/processors/{processor}/dataset
+   * 
+ * + * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The dataset. + */ + java.lang.String getDataset(); + /** + * + * + *
+   * Required. The dataset resource name.
+   * Format:
+   * projects/{project}/locations/{location}/processors/{processor}/dataset
+   * 
+ * + * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for dataset. + */ + com.google.protobuf.ByteString getDatasetBytes(); + + /** + * + * + *
+   * Required. The Cloud Storage uri containing raw documents that must be
+   * imported.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig batch_documents_import_configs = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List< + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig> + getBatchDocumentsImportConfigsList(); + /** + * + * + *
+   * Required. The Cloud Storage uri containing raw documents that must be
+   * imported.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig batch_documents_import_configs = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + getBatchDocumentsImportConfigs(int index); + /** + * + * + *
+   * Required. The Cloud Storage uri containing raw documents that must be
+   * imported.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig batch_documents_import_configs = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getBatchDocumentsImportConfigsCount(); + /** + * + * + *
+   * Required. The Cloud Storage uri containing raw documents that must be
+   * imported.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig batch_documents_import_configs = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List< + ? extends + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest + .BatchDocumentsImportConfigOrBuilder> + getBatchDocumentsImportConfigsOrBuilderList(); + /** + * + * + *
+   * Required. The Cloud Storage uri containing raw documents that must be
+   * imported.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig batch_documents_import_configs = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfigOrBuilder + getBatchDocumentsImportConfigsOrBuilder(int index); +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ImportDocumentsResponse.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ImportDocumentsResponse.java new file mode 100644 index 000000000000..16516c9bfa25 --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ImportDocumentsResponse.java @@ -0,0 +1,432 @@ +/* + * Copyright 2023 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_service.proto + +package com.google.cloud.documentai.v1beta3; + +/** + * + * + *
+ * Response of the import document operation.
+ * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.ImportDocumentsResponse} + */ +public final class ImportDocumentsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.ImportDocumentsResponse) + ImportDocumentsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportDocumentsResponse.newBuilder() to construct. + private ImportDocumentsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportDocumentsResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImportDocumentsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_ImportDocumentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_ImportDocumentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.ImportDocumentsResponse.class, + com.google.cloud.documentai.v1beta3.ImportDocumentsResponse.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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().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.ImportDocumentsResponse)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.ImportDocumentsResponse other = + (com.google.cloud.documentai.v1beta3.ImportDocumentsResponse) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsResponse 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.ImportDocumentsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsResponse 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.ImportDocumentsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsResponse 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.ImportDocumentsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsResponse 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.ImportDocumentsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsResponse 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.ImportDocumentsResponse 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.ImportDocumentsResponse 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.ImportDocumentsResponse 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 of the import document operation.
+   * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.ImportDocumentsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.ImportDocumentsResponse) + com.google.cloud.documentai.v1beta3.ImportDocumentsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_ImportDocumentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_ImportDocumentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.ImportDocumentsResponse.class, + com.google.cloud.documentai.v1beta3.ImportDocumentsResponse.Builder.class); + } + + // Construct using com.google.cloud.documentai.v1beta3.ImportDocumentsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DocumentAiDocumentService + .internal_static_google_cloud_documentai_v1beta3_ImportDocumentsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ImportDocumentsResponse getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.ImportDocumentsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ImportDocumentsResponse build() { + com.google.cloud.documentai.v1beta3.ImportDocumentsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ImportDocumentsResponse buildPartial() { + com.google.cloud.documentai.v1beta3.ImportDocumentsResponse result = + new com.google.cloud.documentai.v1beta3.ImportDocumentsResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta3.ImportDocumentsResponse) { + return mergeFrom((com.google.cloud.documentai.v1beta3.ImportDocumentsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.documentai.v1beta3.ImportDocumentsResponse other) { + if (other == com.google.cloud.documentai.v1beta3.ImportDocumentsResponse.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + 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.ImportDocumentsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.ImportDocumentsResponse) + private static final com.google.cloud.documentai.v1beta3.ImportDocumentsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta3.ImportDocumentsResponse(); + } + + public static com.google.cloud.documentai.v1beta3.ImportDocumentsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportDocumentsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ImportDocumentsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ImportDocumentsResponseOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ImportDocumentsResponseOrBuilder.java new file mode 100644 index 000000000000..7b3f4bd391b5 --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ImportDocumentsResponseOrBuilder.java @@ -0,0 +1,24 @@ +/* + * Copyright 2023 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_service.proto + +package com.google.cloud.documentai.v1beta3; + +public interface ImportDocumentsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.ImportDocumentsResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessRequest.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessRequest.java index 14ba0c943530..f943e5ac0034 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessRequest.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessRequest.java @@ -75,6 +75,7 @@ public enum SourceCase com.google.protobuf.AbstractMessage.InternalOneOfEnum { INLINE_DOCUMENT(4), RAW_DOCUMENT(5), + GCS_DOCUMENT(8), SOURCE_NOT_SET(0); private final int value; @@ -97,6 +98,8 @@ public static SourceCase forNumber(int value) { return INLINE_DOCUMENT; case 5: return RAW_DOCUMENT; + case 8: + return GCS_DOCUMENT; case 0: return SOURCE_NOT_SET; default: @@ -215,6 +218,57 @@ public com.google.cloud.documentai.v1beta3.RawDocumentOrBuilder getRawDocumentOr return com.google.cloud.documentai.v1beta3.RawDocument.getDefaultInstance(); } + public static final int GCS_DOCUMENT_FIELD_NUMBER = 8; + /** + * + * + *
+   * A raw document on Google Cloud Storage.
+   * 
+ * + * .google.cloud.documentai.v1beta3.GcsDocument gcs_document = 8; + * + * @return Whether the gcsDocument field is set. + */ + @java.lang.Override + public boolean hasGcsDocument() { + return sourceCase_ == 8; + } + /** + * + * + *
+   * A raw document on Google Cloud Storage.
+   * 
+ * + * .google.cloud.documentai.v1beta3.GcsDocument gcs_document = 8; + * + * @return The gcsDocument. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.GcsDocument getGcsDocument() { + if (sourceCase_ == 8) { + return (com.google.cloud.documentai.v1beta3.GcsDocument) source_; + } + return com.google.cloud.documentai.v1beta3.GcsDocument.getDefaultInstance(); + } + /** + * + * + *
+   * A raw document on Google Cloud Storage.
+   * 
+ * + * .google.cloud.documentai.v1beta3.GcsDocument gcs_document = 8; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.GcsDocumentOrBuilder getGcsDocumentOrBuilder() { + if (sourceCase_ == 8) { + return (com.google.cloud.documentai.v1beta3.GcsDocument) source_; + } + return com.google.cloud.documentai.v1beta3.GcsDocument.getDefaultInstance(); + } + public static final int NAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -303,7 +357,7 @@ public com.google.protobuf.ByteString getNameBytes() { * .google.cloud.documentai.v1beta3.Document document = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ProcessRequest.document is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=381 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=384 * @return Whether the document field is set. */ @java.lang.Override @@ -324,7 +378,7 @@ public boolean hasDocument() { * .google.cloud.documentai.v1beta3.Document document = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ProcessRequest.document is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=381 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=384 * @return The document. */ @java.lang.Override @@ -513,6 +567,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (processOptions_ != null) { output.writeMessage(7, getProcessOptions()); } + if (sourceCase_ == 8) { + output.writeMessage(8, (com.google.cloud.documentai.v1beta3.GcsDocument) source_); + } getUnknownFields().writeTo(output); } @@ -547,6 +604,11 @@ public int getSerializedSize() { if (processOptions_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getProcessOptions()); } + if (sourceCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, (com.google.cloud.documentai.v1beta3.GcsDocument) source_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -585,6 +647,9 @@ public boolean equals(final java.lang.Object obj) { case 5: if (!getRawDocument().equals(other.getRawDocument())) return false; break; + case 8: + if (!getGcsDocument().equals(other.getGcsDocument())) return false; + break; case 0: default: } @@ -624,6 +689,10 @@ public int hashCode() { hash = (37 * hash) + RAW_DOCUMENT_FIELD_NUMBER; hash = (53 * hash) + getRawDocument().hashCode(); break; + case 8: + hash = (37 * hash) + GCS_DOCUMENT_FIELD_NUMBER; + hash = (53 * hash) + getGcsDocument().hashCode(); + break; case 0: default: } @@ -774,6 +843,9 @@ public Builder clear() { if (rawDocumentBuilder_ != null) { rawDocumentBuilder_.clear(); } + if (gcsDocumentBuilder_ != null) { + gcsDocumentBuilder_.clear(); + } name_ = ""; document_ = null; if (documentBuilder_ != null) { @@ -830,19 +902,19 @@ public com.google.cloud.documentai.v1beta3.ProcessRequest buildPartial() { private void buildPartial0(com.google.cloud.documentai.v1beta3.ProcessRequest result) { int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000004) != 0)) { + if (((from_bitField0_ & 0x00000008) != 0)) { result.name_ = name_; } - if (((from_bitField0_ & 0x00000008) != 0)) { + if (((from_bitField0_ & 0x00000010) != 0)) { result.document_ = documentBuilder_ == null ? document_ : documentBuilder_.build(); } - if (((from_bitField0_ & 0x00000010) != 0)) { + if (((from_bitField0_ & 0x00000020) != 0)) { result.skipHumanReview_ = skipHumanReview_; } - if (((from_bitField0_ & 0x00000020) != 0)) { + if (((from_bitField0_ & 0x00000040) != 0)) { result.fieldMask_ = fieldMaskBuilder_ == null ? fieldMask_ : fieldMaskBuilder_.build(); } - if (((from_bitField0_ & 0x00000040) != 0)) { + if (((from_bitField0_ & 0x00000080) != 0)) { result.processOptions_ = processOptionsBuilder_ == null ? processOptions_ : processOptionsBuilder_.build(); } @@ -857,6 +929,9 @@ private void buildPartialOneofs(com.google.cloud.documentai.v1beta3.ProcessReque if (sourceCase_ == 5 && rawDocumentBuilder_ != null) { result.source_ = rawDocumentBuilder_.build(); } + if (sourceCase_ == 8 && gcsDocumentBuilder_ != null) { + result.source_ = gcsDocumentBuilder_.build(); + } } @java.lang.Override @@ -907,7 +982,7 @@ public Builder mergeFrom(com.google.cloud.documentai.v1beta3.ProcessRequest othe return this; if (!other.getName().isEmpty()) { name_ = other.name_; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); } if (other.hasDocument()) { @@ -933,6 +1008,11 @@ public Builder mergeFrom(com.google.cloud.documentai.v1beta3.ProcessRequest othe mergeRawDocument(other.getRawDocument()); break; } + case GCS_DOCUMENT: + { + mergeGcsDocument(other.getGcsDocument()); + break; + } case SOURCE_NOT_SET: { break; @@ -967,19 +1047,19 @@ public Builder mergeFrom( case 10: { name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; break; } // case 10 case 18: { input.readMessage(getDocumentFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; break; } // case 18 case 24: { skipHumanReview_ = input.readBool(); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; break; } // case 24 case 34: @@ -997,15 +1077,21 @@ public Builder mergeFrom( case 50: { input.readMessage(getFieldMaskFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; break; } // case 50 case 58: { input.readMessage(getProcessOptionsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; break; } // case 58 + case 66: + { + input.readMessage(getGcsDocumentFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 8; + break; + } // case 66 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1457,6 +1543,215 @@ public com.google.cloud.documentai.v1beta3.RawDocumentOrBuilder getRawDocumentOr return rawDocumentBuilder_; } + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.GcsDocument, + com.google.cloud.documentai.v1beta3.GcsDocument.Builder, + com.google.cloud.documentai.v1beta3.GcsDocumentOrBuilder> + gcsDocumentBuilder_; + /** + * + * + *
+     * A raw document on Google Cloud Storage.
+     * 
+ * + * .google.cloud.documentai.v1beta3.GcsDocument gcs_document = 8; + * + * @return Whether the gcsDocument field is set. + */ + @java.lang.Override + public boolean hasGcsDocument() { + return sourceCase_ == 8; + } + /** + * + * + *
+     * A raw document on Google Cloud Storage.
+     * 
+ * + * .google.cloud.documentai.v1beta3.GcsDocument gcs_document = 8; + * + * @return The gcsDocument. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.GcsDocument getGcsDocument() { + if (gcsDocumentBuilder_ == null) { + if (sourceCase_ == 8) { + return (com.google.cloud.documentai.v1beta3.GcsDocument) source_; + } + return com.google.cloud.documentai.v1beta3.GcsDocument.getDefaultInstance(); + } else { + if (sourceCase_ == 8) { + return gcsDocumentBuilder_.getMessage(); + } + return com.google.cloud.documentai.v1beta3.GcsDocument.getDefaultInstance(); + } + } + /** + * + * + *
+     * A raw document on Google Cloud Storage.
+     * 
+ * + * .google.cloud.documentai.v1beta3.GcsDocument gcs_document = 8; + */ + public Builder setGcsDocument(com.google.cloud.documentai.v1beta3.GcsDocument value) { + if (gcsDocumentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + gcsDocumentBuilder_.setMessage(value); + } + sourceCase_ = 8; + return this; + } + /** + * + * + *
+     * A raw document on Google Cloud Storage.
+     * 
+ * + * .google.cloud.documentai.v1beta3.GcsDocument gcs_document = 8; + */ + public Builder setGcsDocument( + com.google.cloud.documentai.v1beta3.GcsDocument.Builder builderForValue) { + if (gcsDocumentBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + gcsDocumentBuilder_.setMessage(builderForValue.build()); + } + sourceCase_ = 8; + return this; + } + /** + * + * + *
+     * A raw document on Google Cloud Storage.
+     * 
+ * + * .google.cloud.documentai.v1beta3.GcsDocument gcs_document = 8; + */ + public Builder mergeGcsDocument(com.google.cloud.documentai.v1beta3.GcsDocument value) { + if (gcsDocumentBuilder_ == null) { + if (sourceCase_ == 8 + && source_ != com.google.cloud.documentai.v1beta3.GcsDocument.getDefaultInstance()) { + source_ = + com.google.cloud.documentai.v1beta3.GcsDocument.newBuilder( + (com.google.cloud.documentai.v1beta3.GcsDocument) source_) + .mergeFrom(value) + .buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + if (sourceCase_ == 8) { + gcsDocumentBuilder_.mergeFrom(value); + } else { + gcsDocumentBuilder_.setMessage(value); + } + } + sourceCase_ = 8; + return this; + } + /** + * + * + *
+     * A raw document on Google Cloud Storage.
+     * 
+ * + * .google.cloud.documentai.v1beta3.GcsDocument gcs_document = 8; + */ + public Builder clearGcsDocument() { + if (gcsDocumentBuilder_ == null) { + if (sourceCase_ == 8) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 8) { + sourceCase_ = 0; + source_ = null; + } + gcsDocumentBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A raw document on Google Cloud Storage.
+     * 
+ * + * .google.cloud.documentai.v1beta3.GcsDocument gcs_document = 8; + */ + public com.google.cloud.documentai.v1beta3.GcsDocument.Builder getGcsDocumentBuilder() { + return getGcsDocumentFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A raw document on Google Cloud Storage.
+     * 
+ * + * .google.cloud.documentai.v1beta3.GcsDocument gcs_document = 8; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.GcsDocumentOrBuilder getGcsDocumentOrBuilder() { + if ((sourceCase_ == 8) && (gcsDocumentBuilder_ != null)) { + return gcsDocumentBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 8) { + return (com.google.cloud.documentai.v1beta3.GcsDocument) source_; + } + return com.google.cloud.documentai.v1beta3.GcsDocument.getDefaultInstance(); + } + } + /** + * + * + *
+     * A raw document on Google Cloud Storage.
+     * 
+ * + * .google.cloud.documentai.v1beta3.GcsDocument gcs_document = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.GcsDocument, + com.google.cloud.documentai.v1beta3.GcsDocument.Builder, + com.google.cloud.documentai.v1beta3.GcsDocumentOrBuilder> + getGcsDocumentFieldBuilder() { + if (gcsDocumentBuilder_ == null) { + if (!(sourceCase_ == 8)) { + source_ = com.google.cloud.documentai.v1beta3.GcsDocument.getDefaultInstance(); + } + gcsDocumentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.GcsDocument, + com.google.cloud.documentai.v1beta3.GcsDocument.Builder, + com.google.cloud.documentai.v1beta3.GcsDocumentOrBuilder>( + (com.google.cloud.documentai.v1beta3.GcsDocument) source_, + getParentForChildren(), + isClean()); + source_ = null; + } + sourceCase_ = 8; + onChanged(); + return gcsDocumentBuilder_; + } + private java.lang.Object name_ = ""; /** * @@ -1552,7 +1847,7 @@ public Builder setName(java.lang.String value) { throw new NullPointerException(); } name_ = value; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -1580,7 +1875,7 @@ public Builder setName(java.lang.String value) { */ public Builder clearName() { name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } @@ -1613,7 +1908,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); name_ = value; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -1637,12 +1932,12 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * .google.cloud.documentai.v1beta3.Document document = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ProcessRequest.document is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=381 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=384 * @return Whether the document field is set. */ @java.lang.Deprecated public boolean hasDocument() { - return ((bitField0_ & 0x00000008) != 0); + return ((bitField0_ & 0x00000010) != 0); } /** * @@ -1657,7 +1952,7 @@ public boolean hasDocument() { * .google.cloud.documentai.v1beta3.Document document = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ProcessRequest.document is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=381 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=384 * @return The document. */ @java.lang.Deprecated @@ -1692,7 +1987,7 @@ public Builder setDocument(com.google.cloud.documentai.v1beta3.Document value) { } else { documentBuilder_.setMessage(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -1716,7 +2011,7 @@ public Builder setDocument( } else { documentBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -1735,7 +2030,7 @@ public Builder setDocument( @java.lang.Deprecated public Builder mergeDocument(com.google.cloud.documentai.v1beta3.Document value) { if (documentBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) + if (((bitField0_ & 0x00000010) != 0) && document_ != null && document_ != com.google.cloud.documentai.v1beta3.Document.getDefaultInstance()) { getDocumentBuilder().mergeFrom(value); @@ -1745,7 +2040,7 @@ public Builder mergeDocument(com.google.cloud.documentai.v1beta3.Document value) } else { documentBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -1763,7 +2058,7 @@ public Builder mergeDocument(com.google.cloud.documentai.v1beta3.Document value) */ @java.lang.Deprecated public Builder clearDocument() { - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); document_ = null; if (documentBuilder_ != null) { documentBuilder_.dispose(); @@ -1786,7 +2081,7 @@ public Builder clearDocument() { */ @java.lang.Deprecated public com.google.cloud.documentai.v1beta3.Document.Builder getDocumentBuilder() { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return getDocumentFieldBuilder().getBuilder(); } @@ -1874,7 +2169,7 @@ public boolean getSkipHumanReview() { public Builder setSkipHumanReview(boolean value) { skipHumanReview_ = value; - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -1891,7 +2186,7 @@ public Builder setSkipHumanReview(boolean value) { * @return This builder for chaining. */ public Builder clearSkipHumanReview() { - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000020); skipHumanReview_ = false; onChanged(); return this; @@ -1918,7 +2213,7 @@ public Builder clearSkipHumanReview() { * @return Whether the fieldMask field is set. */ public boolean hasFieldMask() { - return ((bitField0_ & 0x00000020) != 0); + return ((bitField0_ & 0x00000040) != 0); } /** * @@ -1962,7 +2257,7 @@ public Builder setFieldMask(com.google.protobuf.FieldMask value) { } else { fieldMaskBuilder_.setMessage(value); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -1984,7 +2279,7 @@ public Builder setFieldMask(com.google.protobuf.FieldMask.Builder builderForValu } else { fieldMaskBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -2002,7 +2297,7 @@ public Builder setFieldMask(com.google.protobuf.FieldMask.Builder builderForValu */ public Builder mergeFieldMask(com.google.protobuf.FieldMask value) { if (fieldMaskBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) + if (((bitField0_ & 0x00000040) != 0) && fieldMask_ != null && fieldMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { getFieldMaskBuilder().mergeFrom(value); @@ -2012,7 +2307,7 @@ public Builder mergeFieldMask(com.google.protobuf.FieldMask value) { } else { fieldMaskBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -2029,7 +2324,7 @@ public Builder mergeFieldMask(com.google.protobuf.FieldMask value) { * .google.protobuf.FieldMask field_mask = 6; */ public Builder clearFieldMask() { - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); fieldMask_ = null; if (fieldMaskBuilder_ != null) { fieldMaskBuilder_.dispose(); @@ -2051,7 +2346,7 @@ public Builder clearFieldMask() { * .google.protobuf.FieldMask field_mask = 6; */ public com.google.protobuf.FieldMask.Builder getFieldMaskBuilder() { - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return getFieldMaskFieldBuilder().getBuilder(); } @@ -2121,7 +2416,7 @@ public com.google.protobuf.FieldMaskOrBuilder getFieldMaskOrBuilder() { * @return Whether the processOptions field is set. */ public boolean hasProcessOptions() { - return ((bitField0_ & 0x00000040) != 0); + return ((bitField0_ & 0x00000080) != 0); } /** * @@ -2161,7 +2456,7 @@ public Builder setProcessOptions(com.google.cloud.documentai.v1beta3.ProcessOpti } else { processOptionsBuilder_.setMessage(value); } - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -2181,7 +2476,7 @@ public Builder setProcessOptions( } else { processOptionsBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -2196,7 +2491,7 @@ public Builder setProcessOptions( */ public Builder mergeProcessOptions(com.google.cloud.documentai.v1beta3.ProcessOptions value) { if (processOptionsBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0) + if (((bitField0_ & 0x00000080) != 0) && processOptions_ != null && processOptions_ != com.google.cloud.documentai.v1beta3.ProcessOptions.getDefaultInstance()) { @@ -2207,7 +2502,7 @@ public Builder mergeProcessOptions(com.google.cloud.documentai.v1beta3.ProcessOp } else { processOptionsBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -2221,7 +2516,7 @@ public Builder mergeProcessOptions(com.google.cloud.documentai.v1beta3.ProcessOp * .google.cloud.documentai.v1beta3.ProcessOptions process_options = 7; */ public Builder clearProcessOptions() { - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000080); processOptions_ = null; if (processOptionsBuilder_ != null) { processOptionsBuilder_.dispose(); @@ -2240,7 +2535,7 @@ public Builder clearProcessOptions() { * .google.cloud.documentai.v1beta3.ProcessOptions process_options = 7; */ public com.google.cloud.documentai.v1beta3.ProcessOptions.Builder getProcessOptionsBuilder() { - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return getProcessOptionsFieldBuilder().getBuilder(); } diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessRequestOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessRequestOrBuilder.java index 0ac071aae075..df596b70a792 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessRequestOrBuilder.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessRequestOrBuilder.java @@ -93,6 +93,41 @@ public interface ProcessRequestOrBuilder */ com.google.cloud.documentai.v1beta3.RawDocumentOrBuilder getRawDocumentOrBuilder(); + /** + * + * + *
+   * A raw document on Google Cloud Storage.
+   * 
+ * + * .google.cloud.documentai.v1beta3.GcsDocument gcs_document = 8; + * + * @return Whether the gcsDocument field is set. + */ + boolean hasGcsDocument(); + /** + * + * + *
+   * A raw document on Google Cloud Storage.
+   * 
+ * + * .google.cloud.documentai.v1beta3.GcsDocument gcs_document = 8; + * + * @return The gcsDocument. + */ + com.google.cloud.documentai.v1beta3.GcsDocument getGcsDocument(); + /** + * + * + *
+   * A raw document on Google Cloud Storage.
+   * 
+ * + * .google.cloud.documentai.v1beta3.GcsDocument gcs_document = 8; + */ + com.google.cloud.documentai.v1beta3.GcsDocumentOrBuilder getGcsDocumentOrBuilder(); + /** * * @@ -153,7 +188,7 @@ public interface ProcessRequestOrBuilder * .google.cloud.documentai.v1beta3.Document document = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ProcessRequest.document is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=381 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=384 * @return Whether the document field is set. */ @java.lang.Deprecated @@ -171,7 +206,7 @@ public interface ProcessRequestOrBuilder * .google.cloud.documentai.v1beta3.Document document = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ProcessRequest.document is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=381 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=384 * @return The document. */ @java.lang.Deprecated diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessResponse.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessResponse.java index 5928b9a2c57b..71e5afdf43e4 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessResponse.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessResponse.java @@ -134,7 +134,7 @@ public com.google.cloud.documentai.v1beta3.DocumentOrBuilder getDocumentOrBuilde * string human_review_operation = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ProcessResponse.human_review_operation is - * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=448 + * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=451 * @return The humanReviewOperation. */ @java.lang.Override @@ -163,7 +163,7 @@ public java.lang.String getHumanReviewOperation() { * string human_review_operation = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ProcessResponse.human_review_operation is - * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=448 + * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=451 * @return The bytes for humanReviewOperation. */ @java.lang.Override @@ -848,7 +848,7 @@ public com.google.cloud.documentai.v1beta3.DocumentOrBuilder getDocumentOrBuilde * string human_review_operation = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ProcessResponse.human_review_operation is - * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=448 + * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=451 * @return The humanReviewOperation. */ @java.lang.Deprecated @@ -876,7 +876,7 @@ public java.lang.String getHumanReviewOperation() { * string human_review_operation = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ProcessResponse.human_review_operation is - * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=448 + * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=451 * @return The bytes for humanReviewOperation. */ @java.lang.Deprecated @@ -904,7 +904,7 @@ public com.google.protobuf.ByteString getHumanReviewOperationBytes() { * string human_review_operation = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ProcessResponse.human_review_operation is - * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=448 + * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=451 * @param value The humanReviewOperation to set. * @return This builder for chaining. */ @@ -931,7 +931,7 @@ public Builder setHumanReviewOperation(java.lang.String value) { * string human_review_operation = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ProcessResponse.human_review_operation is - * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=448 + * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=451 * @return This builder for chaining. */ @java.lang.Deprecated @@ -954,7 +954,7 @@ public Builder clearHumanReviewOperation() { * string human_review_operation = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ProcessResponse.human_review_operation is - * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=448 + * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=451 * @param value The bytes for humanReviewOperation to set. * @return This builder for chaining. */ diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessResponseOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessResponseOrBuilder.java index 5f8dd79c96dd..77d1d1d314c1 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessResponseOrBuilder.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessResponseOrBuilder.java @@ -74,7 +74,7 @@ public interface ProcessResponseOrBuilder * string human_review_operation = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ProcessResponse.human_review_operation is - * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=448 + * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=451 * @return The humanReviewOperation. */ @java.lang.Deprecated @@ -92,7 +92,7 @@ public interface ProcessResponseOrBuilder * string human_review_operation = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ProcessResponse.human_review_operation is - * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=448 + * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=451 * @return The bytes for humanReviewOperation. */ @java.lang.Deprecated diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorVersion.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorVersion.java index d965e3994b20..6da0fdb001e8 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorVersion.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorVersion.java @@ -1725,10 +1725,10 @@ public com.google.protobuf.ByteString getKmsKeyVersionNameBytes() { * * *
-   * Denotes that this `ProcessorVersion` is managed by Google.
+   * Output only. Denotes that this `ProcessorVersion` is managed by Google.
    * 
* - * bool google_managed = 11; + * bool google_managed = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The googleManaged. */ @@ -3473,10 +3473,10 @@ public Builder setKmsKeyVersionNameBytes(com.google.protobuf.ByteString value) { * * *
-     * Denotes that this `ProcessorVersion` is managed by Google.
+     * Output only. Denotes that this `ProcessorVersion` is managed by Google.
      * 
* - * bool google_managed = 11; + * bool google_managed = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The googleManaged. */ @@ -3488,10 +3488,10 @@ public boolean getGoogleManaged() { * * *
-     * Denotes that this `ProcessorVersion` is managed by Google.
+     * Output only. Denotes that this `ProcessorVersion` is managed by Google.
      * 
* - * bool google_managed = 11; + * bool google_managed = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @param value The googleManaged to set. * @return This builder for chaining. @@ -3507,10 +3507,10 @@ public Builder setGoogleManaged(boolean value) { * * *
-     * Denotes that this `ProcessorVersion` is managed by Google.
+     * Output only. Denotes that this `ProcessorVersion` is managed by Google.
      * 
* - * bool google_managed = 11; + * bool google_managed = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return This builder for chaining. */ diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorVersionOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorVersionOrBuilder.java index 8cc909e73f00..be998d62c1bc 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorVersionOrBuilder.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorVersionOrBuilder.java @@ -261,10 +261,10 @@ public interface ProcessorVersionOrBuilder * * *
-   * Denotes that this `ProcessorVersion` is managed by Google.
+   * Output only. Denotes that this `ProcessorVersion` is managed by Google.
    * 
* - * bool google_managed = 11; + * bool google_managed = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The googleManaged. */ diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ReviewDocumentRequest.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ReviewDocumentRequest.java index 8916c6d84d30..d2c4ec18c0d8 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ReviewDocumentRequest.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ReviewDocumentRequest.java @@ -372,7 +372,7 @@ public com.google.protobuf.ByteString getHumanReviewConfigBytes() { * .google.cloud.documentai.v1beta3.Document document = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ReviewDocumentRequest.document is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=1096 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=1099 * @return Whether the document field is set. */ @java.lang.Override @@ -390,7 +390,7 @@ public boolean hasDocument() { * .google.cloud.documentai.v1beta3.Document document = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ReviewDocumentRequest.document is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=1096 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=1099 * @return The document. */ @java.lang.Override @@ -1397,7 +1397,7 @@ public Builder setHumanReviewConfigBytes(com.google.protobuf.ByteString value) { * .google.cloud.documentai.v1beta3.Document document = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ReviewDocumentRequest.document is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=1096 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=1099 * @return Whether the document field is set. */ @java.lang.Deprecated @@ -1414,7 +1414,7 @@ public boolean hasDocument() { * .google.cloud.documentai.v1beta3.Document document = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ReviewDocumentRequest.document is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=1096 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=1099 * @return The document. */ @java.lang.Deprecated diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ReviewDocumentRequestOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ReviewDocumentRequestOrBuilder.java index b095ec4c0a53..25b8c5e5e604 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ReviewDocumentRequestOrBuilder.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ReviewDocumentRequestOrBuilder.java @@ -101,7 +101,7 @@ public interface ReviewDocumentRequestOrBuilder * .google.cloud.documentai.v1beta3.Document document = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ReviewDocumentRequest.document is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=1096 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=1099 * @return Whether the document field is set. */ @java.lang.Deprecated @@ -116,7 +116,7 @@ public interface ReviewDocumentRequestOrBuilder * .google.cloud.documentai.v1beta3.Document document = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ReviewDocumentRequest.document is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=1096 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=1099 * @return The document. */ @java.lang.Deprecated diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/RevisionRef.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/RevisionRef.java new file mode 100644 index 000000000000..e698a305fe63 --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/RevisionRef.java @@ -0,0 +1,1386 @@ +/* + * Copyright 2023 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; + +/** + * + * + *
+ * The revision reference specifies which revision on the document to read.
+ * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.RevisionRef} + */ +public final class RevisionRef extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.RevisionRef) + RevisionRefOrBuilder { + private static final long serialVersionUID = 0L; + // Use RevisionRef.newBuilder() to construct. + private RevisionRef(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RevisionRef() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RevisionRef(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_RevisionRef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_RevisionRef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.RevisionRef.class, + com.google.cloud.documentai.v1beta3.RevisionRef.Builder.class); + } + + /** + * + * + *
+   * Some predefined revision cases.
+   * 
+ * + * Protobuf enum {@code google.cloud.documentai.v1beta3.RevisionRef.RevisionCase} + */ + public enum RevisionCase implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified case, fallback to read the LATEST_HUMAN_REVIEW.
+     * 
+ * + * REVISION_CASE_UNSPECIFIED = 0; + */ + REVISION_CASE_UNSPECIFIED(0), + /** + * + * + *
+     * The latest revision made by a human.
+     * 
+ * + * LATEST_HUMAN_REVIEW = 1; + */ + LATEST_HUMAN_REVIEW(1), + /** + * + * + *
+     * The latest revision based on timestamp.
+     * 
+ * + * LATEST_TIMESTAMP = 2; + */ + LATEST_TIMESTAMP(2), + /** + * + * + *
+     * The first (OCR) revision.
+     * 
+ * + * BASE_OCR_REVISION = 3; + */ + BASE_OCR_REVISION(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified case, fallback to read the LATEST_HUMAN_REVIEW.
+     * 
+ * + * REVISION_CASE_UNSPECIFIED = 0; + */ + public static final int REVISION_CASE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The latest revision made by a human.
+     * 
+ * + * LATEST_HUMAN_REVIEW = 1; + */ + public static final int LATEST_HUMAN_REVIEW_VALUE = 1; + /** + * + * + *
+     * The latest revision based on timestamp.
+     * 
+ * + * LATEST_TIMESTAMP = 2; + */ + public static final int LATEST_TIMESTAMP_VALUE = 2; + /** + * + * + *
+     * The first (OCR) revision.
+     * 
+ * + * BASE_OCR_REVISION = 3; + */ + public static final int BASE_OCR_REVISION_VALUE = 3; + + 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 RevisionCase 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 RevisionCase forNumber(int value) { + switch (value) { + case 0: + return REVISION_CASE_UNSPECIFIED; + case 1: + return LATEST_HUMAN_REVIEW; + case 2: + return LATEST_TIMESTAMP; + case 3: + return BASE_OCR_REVISION; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public RevisionCase findValueByNumber(int number) { + return RevisionCase.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.RevisionRef.getDescriptor().getEnumTypes().get(0); + } + + private static final RevisionCase[] VALUES = values(); + + public static RevisionCase valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private RevisionCase(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.documentai.v1beta3.RevisionRef.RevisionCase) + } + + private int sourceCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object source_; + + public enum SourceCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + REVISION_CASE(1), + REVISION_ID(2), + LATEST_PROCESSOR_VERSION(3), + SOURCE_NOT_SET(0); + private final int value; + + private SourceCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SourceCase valueOf(int value) { + return forNumber(value); + } + + public static SourceCase forNumber(int value) { + switch (value) { + case 1: + return REVISION_CASE; + case 2: + return REVISION_ID; + case 3: + return LATEST_PROCESSOR_VERSION; + case 0: + return SOURCE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } + + public static final int REVISION_CASE_FIELD_NUMBER = 1; + /** + * + * + *
+   * Reads the revision by the predefined case.
+   * 
+ * + * .google.cloud.documentai.v1beta3.RevisionRef.RevisionCase revision_case = 1; + * + * @return Whether the revisionCase field is set. + */ + public boolean hasRevisionCase() { + return sourceCase_ == 1; + } + /** + * + * + *
+   * Reads the revision by the predefined case.
+   * 
+ * + * .google.cloud.documentai.v1beta3.RevisionRef.RevisionCase revision_case = 1; + * + * @return The enum numeric value on the wire for revisionCase. + */ + public int getRevisionCaseValue() { + if (sourceCase_ == 1) { + return (java.lang.Integer) source_; + } + return 0; + } + /** + * + * + *
+   * Reads the revision by the predefined case.
+   * 
+ * + * .google.cloud.documentai.v1beta3.RevisionRef.RevisionCase revision_case = 1; + * + * @return The revisionCase. + */ + public com.google.cloud.documentai.v1beta3.RevisionRef.RevisionCase getRevisionCase() { + if (sourceCase_ == 1) { + com.google.cloud.documentai.v1beta3.RevisionRef.RevisionCase result = + com.google.cloud.documentai.v1beta3.RevisionRef.RevisionCase.forNumber( + (java.lang.Integer) source_); + return result == null + ? com.google.cloud.documentai.v1beta3.RevisionRef.RevisionCase.UNRECOGNIZED + : result; + } + return com.google.cloud.documentai.v1beta3.RevisionRef.RevisionCase.REVISION_CASE_UNSPECIFIED; + } + + public static final int REVISION_ID_FIELD_NUMBER = 2; + /** + * + * + *
+   * Reads the revision given by the id.
+   * 
+ * + * string revision_id = 2; + * + * @return Whether the revisionId field is set. + */ + public boolean hasRevisionId() { + return sourceCase_ == 2; + } + /** + * + * + *
+   * Reads the revision given by the id.
+   * 
+ * + * string revision_id = 2; + * + * @return The revisionId. + */ + public java.lang.String getRevisionId() { + java.lang.Object ref = ""; + if (sourceCase_ == 2) { + ref = source_; + } + 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(); + if (sourceCase_ == 2) { + source_ = s; + } + return s; + } + } + /** + * + * + *
+   * Reads the revision given by the id.
+   * 
+ * + * string revision_id = 2; + * + * @return The bytes for revisionId. + */ + public com.google.protobuf.ByteString getRevisionIdBytes() { + java.lang.Object ref = ""; + if (sourceCase_ == 2) { + ref = source_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (sourceCase_ == 2) { + source_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LATEST_PROCESSOR_VERSION_FIELD_NUMBER = 3; + /** + * + * + *
+   * Reads the revision generated by the processor version.
+   * The format takes the full resource name of processor version.
+   * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
+   * 
+ * + * string latest_processor_version = 3; + * + * @return Whether the latestProcessorVersion field is set. + */ + public boolean hasLatestProcessorVersion() { + return sourceCase_ == 3; + } + /** + * + * + *
+   * Reads the revision generated by the processor version.
+   * The format takes the full resource name of processor version.
+   * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
+   * 
+ * + * string latest_processor_version = 3; + * + * @return The latestProcessorVersion. + */ + public java.lang.String getLatestProcessorVersion() { + java.lang.Object ref = ""; + if (sourceCase_ == 3) { + ref = source_; + } + 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(); + if (sourceCase_ == 3) { + source_ = s; + } + return s; + } + } + /** + * + * + *
+   * Reads the revision generated by the processor version.
+   * The format takes the full resource name of processor version.
+   * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
+   * 
+ * + * string latest_processor_version = 3; + * + * @return The bytes for latestProcessorVersion. + */ + public com.google.protobuf.ByteString getLatestProcessorVersionBytes() { + java.lang.Object ref = ""; + if (sourceCase_ == 3) { + ref = source_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (sourceCase_ == 3) { + source_ = 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 (sourceCase_ == 1) { + output.writeEnum(1, ((java.lang.Integer) source_)); + } + if (sourceCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, source_); + } + if (sourceCase_ == 3) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, source_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (sourceCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeEnumSize(1, ((java.lang.Integer) source_)); + } + if (sourceCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, source_); + } + if (sourceCase_ == 3) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, source_); + } + size += getUnknownFields().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.RevisionRef)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.RevisionRef other = + (com.google.cloud.documentai.v1beta3.RevisionRef) obj; + + if (!getSourceCase().equals(other.getSourceCase())) return false; + switch (sourceCase_) { + case 1: + if (getRevisionCaseValue() != other.getRevisionCaseValue()) return false; + break; + case 2: + if (!getRevisionId().equals(other.getRevisionId())) return false; + break; + case 3: + if (!getLatestProcessorVersion().equals(other.getLatestProcessorVersion())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (sourceCase_) { + case 1: + hash = (37 * hash) + REVISION_CASE_FIELD_NUMBER; + hash = (53 * hash) + getRevisionCaseValue(); + break; + case 2: + hash = (37 * hash) + REVISION_ID_FIELD_NUMBER; + hash = (53 * hash) + getRevisionId().hashCode(); + break; + case 3: + hash = (37 * hash) + LATEST_PROCESSOR_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getLatestProcessorVersion().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.RevisionRef parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.RevisionRef 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.RevisionRef parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.RevisionRef 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.RevisionRef parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.RevisionRef 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.RevisionRef parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.RevisionRef 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.RevisionRef parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.RevisionRef 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.RevisionRef 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.RevisionRef 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.RevisionRef 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 revision reference specifies which revision on the document to read.
+   * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.RevisionRef} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.RevisionRef) + com.google.cloud.documentai.v1beta3.RevisionRefOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_RevisionRef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_RevisionRef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.RevisionRef.class, + com.google.cloud.documentai.v1beta3.RevisionRef.Builder.class); + } + + // Construct using com.google.cloud.documentai.v1beta3.RevisionRef.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + sourceCase_ = 0; + source_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_RevisionRef_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.RevisionRef getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.RevisionRef.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.RevisionRef build() { + com.google.cloud.documentai.v1beta3.RevisionRef result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.RevisionRef buildPartial() { + com.google.cloud.documentai.v1beta3.RevisionRef result = + new com.google.cloud.documentai.v1beta3.RevisionRef(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.documentai.v1beta3.RevisionRef result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.documentai.v1beta3.RevisionRef result) { + result.sourceCase_ = sourceCase_; + result.source_ = this.source_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta3.RevisionRef) { + return mergeFrom((com.google.cloud.documentai.v1beta3.RevisionRef) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.documentai.v1beta3.RevisionRef other) { + if (other == com.google.cloud.documentai.v1beta3.RevisionRef.getDefaultInstance()) + return this; + switch (other.getSourceCase()) { + case REVISION_CASE: + { + setRevisionCaseValue(other.getRevisionCaseValue()); + break; + } + case REVISION_ID: + { + sourceCase_ = 2; + source_ = other.source_; + onChanged(); + break; + } + case LATEST_PROCESSOR_VERSION: + { + sourceCase_ = 3; + source_ = other.source_; + onChanged(); + break; + } + case SOURCE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + sourceCase_ = 1; + source_ = rawValue; + break; + } // case 8 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + sourceCase_ = 2; + source_ = s; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + sourceCase_ = 3; + source_ = s; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int sourceCase_ = 0; + private java.lang.Object source_; + + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } + + public Builder clearSource() { + sourceCase_ = 0; + source_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * Reads the revision by the predefined case.
+     * 
+ * + * .google.cloud.documentai.v1beta3.RevisionRef.RevisionCase revision_case = 1; + * + * @return Whether the revisionCase field is set. + */ + @java.lang.Override + public boolean hasRevisionCase() { + return sourceCase_ == 1; + } + /** + * + * + *
+     * Reads the revision by the predefined case.
+     * 
+ * + * .google.cloud.documentai.v1beta3.RevisionRef.RevisionCase revision_case = 1; + * + * @return The enum numeric value on the wire for revisionCase. + */ + @java.lang.Override + public int getRevisionCaseValue() { + if (sourceCase_ == 1) { + return ((java.lang.Integer) source_).intValue(); + } + return 0; + } + /** + * + * + *
+     * Reads the revision by the predefined case.
+     * 
+ * + * .google.cloud.documentai.v1beta3.RevisionRef.RevisionCase revision_case = 1; + * + * @param value The enum numeric value on the wire for revisionCase to set. + * @return This builder for chaining. + */ + public Builder setRevisionCaseValue(int value) { + sourceCase_ = 1; + source_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Reads the revision by the predefined case.
+     * 
+ * + * .google.cloud.documentai.v1beta3.RevisionRef.RevisionCase revision_case = 1; + * + * @return The revisionCase. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.RevisionRef.RevisionCase getRevisionCase() { + if (sourceCase_ == 1) { + com.google.cloud.documentai.v1beta3.RevisionRef.RevisionCase result = + com.google.cloud.documentai.v1beta3.RevisionRef.RevisionCase.forNumber( + (java.lang.Integer) source_); + return result == null + ? com.google.cloud.documentai.v1beta3.RevisionRef.RevisionCase.UNRECOGNIZED + : result; + } + return com.google.cloud.documentai.v1beta3.RevisionRef.RevisionCase.REVISION_CASE_UNSPECIFIED; + } + /** + * + * + *
+     * Reads the revision by the predefined case.
+     * 
+ * + * .google.cloud.documentai.v1beta3.RevisionRef.RevisionCase revision_case = 1; + * + * @param value The revisionCase to set. + * @return This builder for chaining. + */ + public Builder setRevisionCase( + com.google.cloud.documentai.v1beta3.RevisionRef.RevisionCase value) { + if (value == null) { + throw new NullPointerException(); + } + sourceCase_ = 1; + source_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Reads the revision by the predefined case.
+     * 
+ * + * .google.cloud.documentai.v1beta3.RevisionRef.RevisionCase revision_case = 1; + * + * @return This builder for chaining. + */ + public Builder clearRevisionCase() { + if (sourceCase_ == 1) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Reads the revision given by the id.
+     * 
+ * + * string revision_id = 2; + * + * @return Whether the revisionId field is set. + */ + @java.lang.Override + public boolean hasRevisionId() { + return sourceCase_ == 2; + } + /** + * + * + *
+     * Reads the revision given by the id.
+     * 
+ * + * string revision_id = 2; + * + * @return The revisionId. + */ + @java.lang.Override + public java.lang.String getRevisionId() { + java.lang.Object ref = ""; + if (sourceCase_ == 2) { + ref = source_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (sourceCase_ == 2) { + source_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Reads the revision given by the id.
+     * 
+ * + * string revision_id = 2; + * + * @return The bytes for revisionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRevisionIdBytes() { + java.lang.Object ref = ""; + if (sourceCase_ == 2) { + ref = source_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (sourceCase_ == 2) { + source_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Reads the revision given by the id.
+     * 
+ * + * string revision_id = 2; + * + * @param value The revisionId to set. + * @return This builder for chaining. + */ + public Builder setRevisionId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sourceCase_ = 2; + source_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Reads the revision given by the id.
+     * 
+ * + * string revision_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearRevisionId() { + if (sourceCase_ == 2) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Reads the revision given by the id.
+     * 
+ * + * string revision_id = 2; + * + * @param value The bytes for revisionId to set. + * @return This builder for chaining. + */ + public Builder setRevisionIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sourceCase_ = 2; + source_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Reads the revision generated by the processor version.
+     * The format takes the full resource name of processor version.
+     * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
+     * 
+ * + * string latest_processor_version = 3; + * + * @return Whether the latestProcessorVersion field is set. + */ + @java.lang.Override + public boolean hasLatestProcessorVersion() { + return sourceCase_ == 3; + } + /** + * + * + *
+     * Reads the revision generated by the processor version.
+     * The format takes the full resource name of processor version.
+     * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
+     * 
+ * + * string latest_processor_version = 3; + * + * @return The latestProcessorVersion. + */ + @java.lang.Override + public java.lang.String getLatestProcessorVersion() { + java.lang.Object ref = ""; + if (sourceCase_ == 3) { + ref = source_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (sourceCase_ == 3) { + source_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Reads the revision generated by the processor version.
+     * The format takes the full resource name of processor version.
+     * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
+     * 
+ * + * string latest_processor_version = 3; + * + * @return The bytes for latestProcessorVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLatestProcessorVersionBytes() { + java.lang.Object ref = ""; + if (sourceCase_ == 3) { + ref = source_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (sourceCase_ == 3) { + source_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Reads the revision generated by the processor version.
+     * The format takes the full resource name of processor version.
+     * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
+     * 
+ * + * string latest_processor_version = 3; + * + * @param value The latestProcessorVersion to set. + * @return This builder for chaining. + */ + public Builder setLatestProcessorVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sourceCase_ = 3; + source_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Reads the revision generated by the processor version.
+     * The format takes the full resource name of processor version.
+     * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
+     * 
+ * + * string latest_processor_version = 3; + * + * @return This builder for chaining. + */ + public Builder clearLatestProcessorVersion() { + if (sourceCase_ == 3) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Reads the revision generated by the processor version.
+     * The format takes the full resource name of processor version.
+     * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
+     * 
+ * + * string latest_processor_version = 3; + * + * @param value The bytes for latestProcessorVersion to set. + * @return This builder for chaining. + */ + public Builder setLatestProcessorVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sourceCase_ = 3; + source_ = 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.RevisionRef) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.RevisionRef) + private static final com.google.cloud.documentai.v1beta3.RevisionRef DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta3.RevisionRef(); + } + + public static com.google.cloud.documentai.v1beta3.RevisionRef getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RevisionRef parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.RevisionRef getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/RevisionRefOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/RevisionRefOrBuilder.java new file mode 100644 index 000000000000..d9cf159c6ecc --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/RevisionRefOrBuilder.java @@ -0,0 +1,144 @@ +/* + * Copyright 2023 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; + +public interface RevisionRefOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.RevisionRef) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Reads the revision by the predefined case.
+   * 
+ * + * .google.cloud.documentai.v1beta3.RevisionRef.RevisionCase revision_case = 1; + * + * @return Whether the revisionCase field is set. + */ + boolean hasRevisionCase(); + /** + * + * + *
+   * Reads the revision by the predefined case.
+   * 
+ * + * .google.cloud.documentai.v1beta3.RevisionRef.RevisionCase revision_case = 1; + * + * @return The enum numeric value on the wire for revisionCase. + */ + int getRevisionCaseValue(); + /** + * + * + *
+   * Reads the revision by the predefined case.
+   * 
+ * + * .google.cloud.documentai.v1beta3.RevisionRef.RevisionCase revision_case = 1; + * + * @return The revisionCase. + */ + com.google.cloud.documentai.v1beta3.RevisionRef.RevisionCase getRevisionCase(); + + /** + * + * + *
+   * Reads the revision given by the id.
+   * 
+ * + * string revision_id = 2; + * + * @return Whether the revisionId field is set. + */ + boolean hasRevisionId(); + /** + * + * + *
+   * Reads the revision given by the id.
+   * 
+ * + * string revision_id = 2; + * + * @return The revisionId. + */ + java.lang.String getRevisionId(); + /** + * + * + *
+   * Reads the revision given by the id.
+   * 
+ * + * string revision_id = 2; + * + * @return The bytes for revisionId. + */ + com.google.protobuf.ByteString getRevisionIdBytes(); + + /** + * + * + *
+   * Reads the revision generated by the processor version.
+   * The format takes the full resource name of processor version.
+   * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
+   * 
+ * + * string latest_processor_version = 3; + * + * @return Whether the latestProcessorVersion field is set. + */ + boolean hasLatestProcessorVersion(); + /** + * + * + *
+   * Reads the revision generated by the processor version.
+   * The format takes the full resource name of processor version.
+   * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
+   * 
+ * + * string latest_processor_version = 3; + * + * @return The latestProcessorVersion. + */ + java.lang.String getLatestProcessorVersion(); + /** + * + * + *
+   * Reads the revision generated by the processor version.
+   * The format takes the full resource name of processor version.
+   * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
+   * 
+ * + * string latest_processor_version = 3; + * + * @return The bytes for latestProcessorVersion. + */ + com.google.protobuf.ByteString getLatestProcessorVersionBytes(); + + com.google.cloud.documentai.v1beta3.RevisionRef.SourceCase getSourceCase(); +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/dataset.proto b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/dataset.proto index fa50183bbb50..5f366e3372ab 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/dataset.proto +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/dataset.proto @@ -18,6 +18,7 @@ package google.cloud.documentai.v1beta3; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/documentai/v1beta3/document.proto"; import "google/cloud/documentai/v1beta3/document_io.proto"; import "google/cloud/documentai/v1beta3/document_schema.proto"; @@ -121,6 +122,37 @@ message Dataset { State state = 2 [(google.api.field_behavior) = REQUIRED]; } +// Document Identifier. +message DocumentId { + // Identifies a document uniquely within the scope of a dataset in the + // user-managed Cloud Storage option. + message GCSManagedDocumentId { + // Required. The Cloud Storage URI where the actual document is stored. + string gcs_uri = 1 [(google.api.field_behavior) = REQUIRED]; + + // Id of the document (indexed) managed by Content Warehouse. + string cw_doc_id = 2 [deprecated = true]; + } + + // Identifies a document uniquely within the scope of a dataset in unmanaged + // option. + message UnmanagedDocumentId { + // Required. The id of the document. + string doc_id = 1 [(google.api.field_behavior) = REQUIRED]; + } + + oneof type { + // A document id within user-managed Cloud Storage. + GCSManagedDocumentId gcs_managed_doc_id = 1; + + // A document id within unmanaged dataset. + UnmanagedDocumentId unmanaged_doc_id = 4; + } + + // Points to a specific revision of the document if set. + RevisionRef revision_ref = 3; +} + // Dataset Schema. message DatasetSchema { option (google.api.resource) = { @@ -136,3 +168,24 @@ message DatasetSchema { // Optional. Schema of the dataset. DocumentSchema document_schema = 3 [(google.api.field_behavior) = OPTIONAL]; } + +// Dataset documents that the batch operation will be applied to. +message BatchDatasetDocuments { + // List of individual DocumentIds. + message IndividualDocumentIds { + // Required. List of Document IDs indicating where the actual documents are + // stored. + repeated DocumentId document_ids = 1 + [(google.api.field_behavior) = REQUIRED]; + } + + oneof criteria { + // Document identifiers. + IndividualDocumentIds individual_document_ids = 1; + + // A filter matching the documents. + // Follows the same format and restriction as + // [google.cloud.documentai.master.ListDocumentsRequest.filter]. + string filter = 2; + } +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document.proto b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document.proto index 8250d4d66608..977989bfa143 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document.proto +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document.proto @@ -950,3 +950,35 @@ message Document { // Placeholder. Revision history of this document. repeated Revision revisions = 13; } + +// The revision reference specifies which revision on the document to read. +message RevisionRef { + // Some predefined revision cases. + enum RevisionCase { + // Unspecified case, fallback to read the LATEST_HUMAN_REVIEW. + REVISION_CASE_UNSPECIFIED = 0; + + // The latest revision made by a human. + LATEST_HUMAN_REVIEW = 1; + + // The latest revision based on timestamp. + LATEST_TIMESTAMP = 2; + + // The first (OCR) revision. + BASE_OCR_REVISION = 3; + } + + // Specifies which revision to read. + oneof source { + // Reads the revision by the predefined case. + RevisionCase revision_case = 1; + + // Reads the revision given by the id. + string revision_id = 2; + + // Reads the revision generated by the processor version. + // The format takes the full resource name of processor version. + // `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` + string latest_processor_version = 3; + } +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document_processor_service.proto b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document_processor_service.proto index b2a873625941..54f6794d407a 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document_processor_service.proto +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document_processor_service.proto @@ -358,6 +358,9 @@ message ProcessRequest { // A raw document content (bytes). RawDocument raw_document = 5; + + // A raw document on Google Cloud Storage. + GcsDocument gcs_document = 8; } // Required. The resource name of the diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document_service.proto b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document_service.proto index 8dcf239e36fd..9acc531986c7 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document_service.proto +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document_service.proto @@ -21,9 +21,12 @@ import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/documentai/v1beta3/dataset.proto"; +import "google/cloud/documentai/v1beta3/document.proto"; +import "google/cloud/documentai/v1beta3/document_io.proto"; import "google/cloud/documentai/v1beta3/operation_metadata.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/field_mask.proto"; +import "google/rpc/status.proto"; option csharp_namespace = "Google.Cloud.DocumentAI.V1Beta3"; option go_package = "cloud.google.com/go/documentai/apiv1beta3/documentaipb;documentaipb"; @@ -53,6 +56,42 @@ service DocumentService { }; } + // Import documents into a dataset. + rpc ImportDocuments(ImportDocumentsRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta3/{dataset=projects/*/locations/*/processors/*/dataset}:importDocuments" + body: "*" + }; + option (google.api.method_signature) = "dataset"; + option (google.longrunning.operation_info) = { + response_type: "ImportDocumentsResponse" + metadata_type: "ImportDocumentsMetadata" + }; + } + + // Returns relevant fields present in the requested document. + rpc GetDocument(GetDocumentRequest) returns (GetDocumentResponse) { + option (google.api.http) = { + get: "/v1beta3/{dataset=projects/*/locations/*/processors/*/dataset}:getDocument" + }; + option (google.api.method_signature) = "dataset"; + } + + // Deletes a set of documents. + rpc BatchDeleteDocuments(BatchDeleteDocumentsRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta3/{dataset=projects/*/locations/*/processors/*/dataset}:batchDeleteDocuments" + body: "*" + }; + option (google.api.method_signature) = "dataset"; + option (google.longrunning.operation_info) = { + response_type: "BatchDeleteDocumentsResponse" + metadata_type: "BatchDeleteDocumentsMetadata" + }; + } + // Gets the `DatasetSchema` of a `Dataset`. rpc GetDatasetSchema(GetDatasetSchemaRequest) returns (DatasetSchema) { option (google.api.http) = { @@ -71,6 +110,23 @@ service DocumentService { } } +// Documents belonging to a dataset will be split into different groups +// referred to as splits: train, test. +enum DatasetSplitType { + // Default value if the enum is not set. + // go/protodosdonts#do-include-an-unspecified-value-in-an-enum + DATASET_SPLIT_TYPE_UNSPECIFIED = 0; + + // Identifies the train documents. + DATASET_SPLIT_TRAIN = 1; + + // Identifies the test documents. + DATASET_SPLIT_TEST = 2; + + // Identifies the unassigned documents. + DATASET_SPLIT_UNASSIGNED = 3; +} + message UpdateDatasetRequest { // Required. The `name` field of the `Dataset` is used to identify the // resource to be updated. @@ -85,6 +141,154 @@ message UpdateDatasetOperationMetadata { CommonOperationMetadata common_metadata = 1; } +message ImportDocumentsRequest { + // Config for importing documents. + // Each batch can have its own dataset split type. + message BatchDocumentsImportConfig { + // The config for auto-split. + message AutoSplitConfig { + // Ratio of training dataset split. + float training_split_ratio = 1; + } + + oneof split_type_config { + // Target dataset split where the documents must be stored. + DatasetSplitType dataset_split = 2; + + // If set, documents will be automatically split into training and test + // split category with the specified ratio. + AutoSplitConfig auto_split_config = 3; + } + + // The common config to specify a set of documents used as input. + BatchDocumentsInputConfig batch_input_config = 1; + } + + // Required. The dataset resource name. + // Format: + // projects/{project}/locations/{location}/processors/{processor}/dataset + string dataset = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "documentai.googleapis.com/Dataset" + } + ]; + + // Required. The Cloud Storage uri containing raw documents that must be + // imported. + repeated BatchDocumentsImportConfig batch_documents_import_configs = 4 + [(google.api.field_behavior) = REQUIRED]; +} + +// Response of the import document operation. +message ImportDocumentsResponse {} + +// Metadata of the import document operation. +message ImportDocumentsMetadata { + // The status of each individual document in the import process. + message IndividualImportStatus { + // The source Cloud Storage URI of the document. + string input_gcs_source = 1; + + // The status of the importing of the document. + google.rpc.Status status = 2; + + // The document id of imported document if it was successful, otherwise + // empty. + DocumentId output_document_id = 4; + } + + // The validation status of each import config. Status is set to errors if + // there is no documents to import in the import_config, or OK if the + // operation will try to proceed at least one document. + message ImportConfigValidationResult { + // The source Cloud Storage URI specified in the import config. + string input_gcs_source = 1; + + // The validation status of import config. + google.rpc.Status status = 2; + } + + // The basic metadata of the long running operation. + CommonOperationMetadata common_metadata = 1; + + // The list of response details of each document. + repeated IndividualImportStatus individual_import_statuses = 2; + + // Validation statuses of the batch documents import config. + repeated ImportConfigValidationResult import_config_validation_results = 4; + + // Total number of the documents that are qualified for importing. + int32 total_document_count = 3; +} + +message GetDocumentRequest { + // Required. The resource name of the dataset that the document belongs to . + // Format: + // projects/{project}/locations/{location}/processors/{processor}/dataset + string dataset = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "documentai.googleapis.com/Dataset" + } + ]; + + // Required. Document identifier. + DocumentId document_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // If set, only fields listed here will be returned. Otherwise, all fields + // will be returned by default. + google.protobuf.FieldMask read_mask = 3; + + // List of pages for which the fields specified in the `read_mask` must + // be served. + DocumentPageRange page_range = 4; +} + +message GetDocumentResponse { + Document document = 1; +} + +message BatchDeleteDocumentsRequest { + // Required. The dataset resource name. + // Format: + // projects/{project}/locations/{location}/processors/{processor}/dataset + string dataset = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Dataset documents input. If given `filter`, all documents + // satisfying the filter will be deleted. If given documentIds, a maximum of + // 50 documents can be deleted in a batch. The request will be rejected if + // more than 50 document_ids are provided. + BatchDatasetDocuments dataset_documents = 3 + [(google.api.field_behavior) = REQUIRED]; +} + +// Response of the delete documents operation. +message BatchDeleteDocumentsResponse {} + +message BatchDeleteDocumentsMetadata { + // The status of each individual document in the batch delete process. + message IndividualBatchDeleteStatus { + // The document id of the document. + DocumentId document_id = 1; + + // The status of deleting the document in storage. + google.rpc.Status status = 2; + } + + // The basic metadata of the long running operation. + CommonOperationMetadata common_metadata = 1; + + // The list of response details of each document. + repeated IndividualBatchDeleteStatus individual_batch_delete_statuses = 2; + + // Total number of documents deleting from dataset. + int32 total_document_count = 3; + + // Total number of documents that failed to be deleted in storage. + int32 error_document_count = 4; +} + // Request for `GetDatasetSchema`. message GetDatasetSchemaRequest { // Required. The dataset schema resource name. @@ -110,3 +314,12 @@ message UpdateDatasetSchemaRequest { // The update mask applies to the resource. google.protobuf.FieldMask update_mask = 2; } + +// Range of pages present in a document. +message DocumentPageRange { + // First page number (one-based index) to be returned. + int32 start = 1; + + // Last page number (one-based index) to be returned. + int32 end = 2; +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/processor.proto b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/processor.proto index bafcdc0f430c..beb1ccddb08a 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/processor.proto +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/processor.proto @@ -108,8 +108,8 @@ message ProcessorVersion { // The KMS key version with which data is encrypted. string kms_key_version_name = 10; - // Denotes that this `ProcessorVersion` is managed by Google. - bool google_managed = 11; + // Output only. Denotes that this `ProcessorVersion` is managed by Google. + bool google_managed = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; // If set, information about the eventual deprecation of this version. DeprecationInfo deprecation_info = 13; diff --git a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1/documentprocessorservice/batchprocessdocuments/AsyncBatchProcessDocuments.java b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1/documentprocessorservice/batchprocessdocuments/AsyncBatchProcessDocuments.java index f1169a5185a7..15303ae64efd 100644 --- a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1/documentprocessorservice/batchprocessdocuments/AsyncBatchProcessDocuments.java +++ b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1/documentprocessorservice/batchprocessdocuments/AsyncBatchProcessDocuments.java @@ -22,6 +22,7 @@ import com.google.cloud.documentai.v1.BatchProcessRequest; import com.google.cloud.documentai.v1.DocumentOutputConfig; import com.google.cloud.documentai.v1.DocumentProcessorServiceClient; +import com.google.cloud.documentai.v1.ProcessOptions; import com.google.cloud.documentai.v1.ProcessorName; import com.google.longrunning.Operation; @@ -45,6 +46,7 @@ public static void asyncBatchProcessDocuments() throws Exception { .setInputDocuments(BatchDocumentsInputConfig.newBuilder().build()) .setDocumentOutputConfig(DocumentOutputConfig.newBuilder().build()) .setSkipHumanReview(true) + .setProcessOptions(ProcessOptions.newBuilder().build()) .build(); ApiFuture future = documentProcessorServiceClient.batchProcessDocumentsCallable().futureCall(request); diff --git a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1/documentprocessorservice/batchprocessdocuments/AsyncBatchProcessDocumentsLRO.java b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1/documentprocessorservice/batchprocessdocuments/AsyncBatchProcessDocumentsLRO.java index db86f402b940..93a17e43adc6 100644 --- a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1/documentprocessorservice/batchprocessdocuments/AsyncBatchProcessDocumentsLRO.java +++ b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1/documentprocessorservice/batchprocessdocuments/AsyncBatchProcessDocumentsLRO.java @@ -24,6 +24,7 @@ import com.google.cloud.documentai.v1.BatchProcessResponse; import com.google.cloud.documentai.v1.DocumentOutputConfig; import com.google.cloud.documentai.v1.DocumentProcessorServiceClient; +import com.google.cloud.documentai.v1.ProcessOptions; import com.google.cloud.documentai.v1.ProcessorName; public class AsyncBatchProcessDocumentsLRO { @@ -46,6 +47,7 @@ public static void asyncBatchProcessDocumentsLRO() throws Exception { .setInputDocuments(BatchDocumentsInputConfig.newBuilder().build()) .setDocumentOutputConfig(DocumentOutputConfig.newBuilder().build()) .setSkipHumanReview(true) + .setProcessOptions(ProcessOptions.newBuilder().build()) .build(); OperationFuture future = documentProcessorServiceClient diff --git a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1/documentprocessorservice/batchprocessdocuments/SyncBatchProcessDocuments.java b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1/documentprocessorservice/batchprocessdocuments/SyncBatchProcessDocuments.java index e218fd57b760..7b0da236b13a 100644 --- a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1/documentprocessorservice/batchprocessdocuments/SyncBatchProcessDocuments.java +++ b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1/documentprocessorservice/batchprocessdocuments/SyncBatchProcessDocuments.java @@ -22,6 +22,7 @@ import com.google.cloud.documentai.v1.BatchProcessResponse; import com.google.cloud.documentai.v1.DocumentOutputConfig; import com.google.cloud.documentai.v1.DocumentProcessorServiceClient; +import com.google.cloud.documentai.v1.ProcessOptions; import com.google.cloud.documentai.v1.ProcessorName; public class SyncBatchProcessDocuments { @@ -44,6 +45,7 @@ public static void syncBatchProcessDocuments() throws Exception { .setInputDocuments(BatchDocumentsInputConfig.newBuilder().build()) .setDocumentOutputConfig(DocumentOutputConfig.newBuilder().build()) .setSkipHumanReview(true) + .setProcessOptions(ProcessOptions.newBuilder().build()) .build(); BatchProcessResponse response = documentProcessorServiceClient.batchProcessDocumentsAsync(request).get(); diff --git a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1/documentprocessorservice/processdocument/AsyncProcessDocument.java b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1/documentprocessorservice/processdocument/AsyncProcessDocument.java index ec2b1fb72955..70dc53570ebd 100644 --- a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1/documentprocessorservice/processdocument/AsyncProcessDocument.java +++ b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1/documentprocessorservice/processdocument/AsyncProcessDocument.java @@ -19,6 +19,7 @@ // [START documentai_v1_generated_DocumentProcessorService_ProcessDocument_async] import com.google.api.core.ApiFuture; import com.google.cloud.documentai.v1.DocumentProcessorServiceClient; +import com.google.cloud.documentai.v1.ProcessOptions; import com.google.cloud.documentai.v1.ProcessRequest; import com.google.cloud.documentai.v1.ProcessResponse; import com.google.cloud.documentai.v1.ProcessorName; @@ -43,6 +44,7 @@ public static void asyncProcessDocument() throws Exception { .setName(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString()) .setSkipHumanReview(true) .setFieldMask(FieldMask.newBuilder().build()) + .setProcessOptions(ProcessOptions.newBuilder().build()) .build(); ApiFuture future = documentProcessorServiceClient.processDocumentCallable().futureCall(request); diff --git a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1/documentprocessorservice/processdocument/SyncProcessDocument.java b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1/documentprocessorservice/processdocument/SyncProcessDocument.java index 1606d462e74e..1d72253fbbaa 100644 --- a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1/documentprocessorservice/processdocument/SyncProcessDocument.java +++ b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1/documentprocessorservice/processdocument/SyncProcessDocument.java @@ -18,6 +18,7 @@ // [START documentai_v1_generated_DocumentProcessorService_ProcessDocument_sync] import com.google.cloud.documentai.v1.DocumentProcessorServiceClient; +import com.google.cloud.documentai.v1.ProcessOptions; import com.google.cloud.documentai.v1.ProcessRequest; import com.google.cloud.documentai.v1.ProcessResponse; import com.google.cloud.documentai.v1.ProcessorName; @@ -42,6 +43,7 @@ public static void syncProcessDocument() throws Exception { .setName(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString()) .setSkipHumanReview(true) .setFieldMask(FieldMask.newBuilder().build()) + .setProcessOptions(ProcessOptions.newBuilder().build()) .build(); ProcessResponse response = documentProcessorServiceClient.processDocument(request); } diff --git a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta2/documentunderstandingservice/getlocation/AsyncGetLocation.java b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta2/documentunderstandingservice/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..56f817ca777e --- /dev/null +++ b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta2/documentunderstandingservice/getlocation/AsyncGetLocation.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 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.v1beta2.samples; + +// [START documentai_v1beta2_generated_DocumentUnderstandingService_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.documentai.v1beta2.DocumentUnderstandingServiceClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class AsyncGetLocation { + + public static void main(String[] args) throws Exception { + asyncGetLocation(); + } + + public static void asyncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentUnderstandingServiceClient documentUnderstandingServiceClient = + DocumentUnderstandingServiceClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = + documentUnderstandingServiceClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END documentai_v1beta2_generated_DocumentUnderstandingService_GetLocation_async] diff --git a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta2/documentunderstandingservice/getlocation/SyncGetLocation.java b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta2/documentunderstandingservice/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..ae2a22e72237 --- /dev/null +++ b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta2/documentunderstandingservice/getlocation/SyncGetLocation.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 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.v1beta2.samples; + +// [START documentai_v1beta2_generated_DocumentUnderstandingService_GetLocation_sync] +import com.google.cloud.documentai.v1beta2.DocumentUnderstandingServiceClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class SyncGetLocation { + + public static void main(String[] args) throws Exception { + syncGetLocation(); + } + + public static void syncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentUnderstandingServiceClient documentUnderstandingServiceClient = + DocumentUnderstandingServiceClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = documentUnderstandingServiceClient.getLocation(request); + } + } +} +// [END documentai_v1beta2_generated_DocumentUnderstandingService_GetLocation_sync] diff --git a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta2/documentunderstandingservice/listlocations/AsyncListLocations.java b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta2/documentunderstandingservice/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..f204e99ce029 --- /dev/null +++ b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta2/documentunderstandingservice/listlocations/AsyncListLocations.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 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.v1beta2.samples; + +// [START documentai_v1beta2_generated_DocumentUnderstandingService_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.documentai.v1beta2.DocumentUnderstandingServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class AsyncListLocations { + + public static void main(String[] args) throws Exception { + asyncListLocations(); + } + + public static void asyncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentUnderstandingServiceClient documentUnderstandingServiceClient = + DocumentUnderstandingServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + documentUnderstandingServiceClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END documentai_v1beta2_generated_DocumentUnderstandingService_ListLocations_async] diff --git a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta2/documentunderstandingservice/listlocations/AsyncListLocationsPaged.java b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta2/documentunderstandingservice/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..cd0aabf66f33 --- /dev/null +++ b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta2/documentunderstandingservice/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2023 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.v1beta2.samples; + +// [START documentai_v1beta2_generated_DocumentUnderstandingService_ListLocations_Paged_async] +import com.google.cloud.documentai.v1beta2.DocumentUnderstandingServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.base.Strings; + +public class AsyncListLocationsPaged { + + public static void main(String[] args) throws Exception { + asyncListLocationsPaged(); + } + + public static void asyncListLocationsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentUnderstandingServiceClient documentUnderstandingServiceClient = + DocumentUnderstandingServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = + documentUnderstandingServiceClient.listLocationsCallable().call(request); + for (Location element : response.getLocationsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END documentai_v1beta2_generated_DocumentUnderstandingService_ListLocations_Paged_async] diff --git a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta2/documentunderstandingservice/listlocations/SyncListLocations.java b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta2/documentunderstandingservice/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..eedffa77c1e5 --- /dev/null +++ b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta2/documentunderstandingservice/listlocations/SyncListLocations.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 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.v1beta2.samples; + +// [START documentai_v1beta2_generated_DocumentUnderstandingService_ListLocations_sync] +import com.google.cloud.documentai.v1beta2.DocumentUnderstandingServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class SyncListLocations { + + public static void main(String[] args) throws Exception { + syncListLocations(); + } + + public static void syncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentUnderstandingServiceClient documentUnderstandingServiceClient = + DocumentUnderstandingServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : + documentUnderstandingServiceClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END documentai_v1beta2_generated_DocumentUnderstandingService_ListLocations_sync] diff --git a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/batchprocessdocuments/SyncBatchProcessDocumentsString.java b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/batchprocessdocuments/SyncBatchProcessDocumentsString.java index 2129f36e9a56..3c0acf1264c9 100644 --- a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/batchprocessdocuments/SyncBatchProcessDocumentsString.java +++ b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/batchprocessdocuments/SyncBatchProcessDocumentsString.java @@ -18,7 +18,7 @@ // [START documentai_v1beta3_generated_DocumentProcessorService_BatchProcessDocuments_String_sync] import com.google.cloud.documentai.v1beta3.BatchProcessResponse; -import com.google.cloud.documentai.v1beta3.DatasetSchemaName; +import com.google.cloud.documentai.v1beta3.DatasetName; import com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient; public class SyncBatchProcessDocumentsString { @@ -35,7 +35,7 @@ public static void syncBatchProcessDocumentsString() throws Exception { // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (DocumentProcessorServiceClient documentProcessorServiceClient = DocumentProcessorServiceClient.create()) { - String name = DatasetSchemaName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString(); + String name = DatasetName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString(); BatchProcessResponse response = documentProcessorServiceClient.batchProcessDocumentsAsync(name).get(); } diff --git a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/processdocument/SyncProcessDocumentString.java b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/processdocument/SyncProcessDocumentString.java index ef9bc1cd3aac..b1be36a60a5a 100644 --- a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/processdocument/SyncProcessDocumentString.java +++ b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/processdocument/SyncProcessDocumentString.java @@ -17,7 +17,7 @@ package com.google.cloud.documentai.v1beta3.samples; // [START documentai_v1beta3_generated_DocumentProcessorService_ProcessDocument_String_sync] -import com.google.cloud.documentai.v1beta3.DatasetSchemaName; +import com.google.cloud.documentai.v1beta3.DatasetName; import com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient; import com.google.cloud.documentai.v1beta3.ProcessResponse; @@ -35,7 +35,7 @@ public static void syncProcessDocumentString() throws Exception { // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (DocumentProcessorServiceClient documentProcessorServiceClient = DocumentProcessorServiceClient.create()) { - String name = DatasetSchemaName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString(); + String name = DatasetName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString(); ProcessResponse response = documentProcessorServiceClient.processDocument(name); } } diff --git a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/batchdeletedocuments/AsyncBatchDeleteDocuments.java b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/batchdeletedocuments/AsyncBatchDeleteDocuments.java new file mode 100644 index 000000000000..f506d91f1f65 --- /dev/null +++ b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/batchdeletedocuments/AsyncBatchDeleteDocuments.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 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.samples; + +// [START documentai_v1beta3_generated_DocumentService_BatchDeleteDocuments_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.documentai.v1beta3.BatchDatasetDocuments; +import com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest; +import com.google.cloud.documentai.v1beta3.DocumentServiceClient; +import com.google.longrunning.Operation; + +public class AsyncBatchDeleteDocuments { + + public static void main(String[] args) throws Exception { + asyncBatchDeleteDocuments(); + } + + public static void asyncBatchDeleteDocuments() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) { + BatchDeleteDocumentsRequest request = + BatchDeleteDocumentsRequest.newBuilder() + .setDataset("dataset1443214456") + .setDatasetDocuments(BatchDatasetDocuments.newBuilder().build()) + .build(); + ApiFuture future = + documentServiceClient.batchDeleteDocumentsCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END documentai_v1beta3_generated_DocumentService_BatchDeleteDocuments_async] diff --git a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/batchdeletedocuments/AsyncBatchDeleteDocumentsLRO.java b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/batchdeletedocuments/AsyncBatchDeleteDocumentsLRO.java new file mode 100644 index 000000000000..23980ee5988b --- /dev/null +++ b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/batchdeletedocuments/AsyncBatchDeleteDocumentsLRO.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 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.samples; + +// [START documentai_v1beta3_generated_DocumentService_BatchDeleteDocuments_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.documentai.v1beta3.BatchDatasetDocuments; +import com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsMetadata; +import com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest; +import com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsResponse; +import com.google.cloud.documentai.v1beta3.DocumentServiceClient; + +public class AsyncBatchDeleteDocumentsLRO { + + public static void main(String[] args) throws Exception { + asyncBatchDeleteDocumentsLRO(); + } + + public static void asyncBatchDeleteDocumentsLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) { + BatchDeleteDocumentsRequest request = + BatchDeleteDocumentsRequest.newBuilder() + .setDataset("dataset1443214456") + .setDatasetDocuments(BatchDatasetDocuments.newBuilder().build()) + .build(); + OperationFuture future = + documentServiceClient.batchDeleteDocumentsOperationCallable().futureCall(request); + // Do something. + BatchDeleteDocumentsResponse response = future.get(); + } + } +} +// [END documentai_v1beta3_generated_DocumentService_BatchDeleteDocuments_LRO_async] diff --git a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/batchdeletedocuments/SyncBatchDeleteDocuments.java b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/batchdeletedocuments/SyncBatchDeleteDocuments.java new file mode 100644 index 000000000000..e34f14e0b3e4 --- /dev/null +++ b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/batchdeletedocuments/SyncBatchDeleteDocuments.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 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.samples; + +// [START documentai_v1beta3_generated_DocumentService_BatchDeleteDocuments_sync] +import com.google.cloud.documentai.v1beta3.BatchDatasetDocuments; +import com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest; +import com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsResponse; +import com.google.cloud.documentai.v1beta3.DocumentServiceClient; + +public class SyncBatchDeleteDocuments { + + public static void main(String[] args) throws Exception { + syncBatchDeleteDocuments(); + } + + public static void syncBatchDeleteDocuments() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) { + BatchDeleteDocumentsRequest request = + BatchDeleteDocumentsRequest.newBuilder() + .setDataset("dataset1443214456") + .setDatasetDocuments(BatchDatasetDocuments.newBuilder().build()) + .build(); + BatchDeleteDocumentsResponse response = + documentServiceClient.batchDeleteDocumentsAsync(request).get(); + } + } +} +// [END documentai_v1beta3_generated_DocumentService_BatchDeleteDocuments_sync] diff --git a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/batchdeletedocuments/SyncBatchDeleteDocumentsString.java b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/batchdeletedocuments/SyncBatchDeleteDocumentsString.java new file mode 100644 index 000000000000..d251c216d486 --- /dev/null +++ b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/batchdeletedocuments/SyncBatchDeleteDocumentsString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 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.samples; + +// [START documentai_v1beta3_generated_DocumentService_BatchDeleteDocuments_String_sync] +import com.google.cloud.documentai.v1beta3.BatchDeleteDocumentsResponse; +import com.google.cloud.documentai.v1beta3.DocumentServiceClient; + +public class SyncBatchDeleteDocumentsString { + + public static void main(String[] args) throws Exception { + syncBatchDeleteDocumentsString(); + } + + public static void syncBatchDeleteDocumentsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) { + String dataset = "dataset1443214456"; + BatchDeleteDocumentsResponse response = + documentServiceClient.batchDeleteDocumentsAsync(dataset).get(); + } + } +} +// [END documentai_v1beta3_generated_DocumentService_BatchDeleteDocuments_String_sync] diff --git a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/getdocument/AsyncGetDocument.java b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/getdocument/AsyncGetDocument.java new file mode 100644 index 000000000000..bd86cc6e6b74 --- /dev/null +++ b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/getdocument/AsyncGetDocument.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 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.samples; + +// [START documentai_v1beta3_generated_DocumentService_GetDocument_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.documentai.v1beta3.DatasetName; +import com.google.cloud.documentai.v1beta3.DocumentId; +import com.google.cloud.documentai.v1beta3.DocumentPageRange; +import com.google.cloud.documentai.v1beta3.DocumentServiceClient; +import com.google.cloud.documentai.v1beta3.GetDocumentRequest; +import com.google.cloud.documentai.v1beta3.GetDocumentResponse; +import com.google.protobuf.FieldMask; + +public class AsyncGetDocument { + + public static void main(String[] args) throws Exception { + asyncGetDocument(); + } + + public static void asyncGetDocument() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) { + GetDocumentRequest request = + GetDocumentRequest.newBuilder() + .setDataset(DatasetName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString()) + .setDocumentId(DocumentId.newBuilder().build()) + .setReadMask(FieldMask.newBuilder().build()) + .setPageRange(DocumentPageRange.newBuilder().build()) + .build(); + ApiFuture future = + documentServiceClient.getDocumentCallable().futureCall(request); + // Do something. + GetDocumentResponse response = future.get(); + } + } +} +// [END documentai_v1beta3_generated_DocumentService_GetDocument_async] diff --git a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/getdocument/SyncGetDocument.java b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/getdocument/SyncGetDocument.java new file mode 100644 index 000000000000..c2565567f13d --- /dev/null +++ b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/getdocument/SyncGetDocument.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 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.samples; + +// [START documentai_v1beta3_generated_DocumentService_GetDocument_sync] +import com.google.cloud.documentai.v1beta3.DatasetName; +import com.google.cloud.documentai.v1beta3.DocumentId; +import com.google.cloud.documentai.v1beta3.DocumentPageRange; +import com.google.cloud.documentai.v1beta3.DocumentServiceClient; +import com.google.cloud.documentai.v1beta3.GetDocumentRequest; +import com.google.cloud.documentai.v1beta3.GetDocumentResponse; +import com.google.protobuf.FieldMask; + +public class SyncGetDocument { + + public static void main(String[] args) throws Exception { + syncGetDocument(); + } + + public static void syncGetDocument() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) { + GetDocumentRequest request = + GetDocumentRequest.newBuilder() + .setDataset(DatasetName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString()) + .setDocumentId(DocumentId.newBuilder().build()) + .setReadMask(FieldMask.newBuilder().build()) + .setPageRange(DocumentPageRange.newBuilder().build()) + .build(); + GetDocumentResponse response = documentServiceClient.getDocument(request); + } + } +} +// [END documentai_v1beta3_generated_DocumentService_GetDocument_sync] diff --git a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/getdocument/SyncGetDocumentDatasetname.java b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/getdocument/SyncGetDocumentDatasetname.java new file mode 100644 index 000000000000..70b47391a162 --- /dev/null +++ b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/getdocument/SyncGetDocumentDatasetname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 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.samples; + +// [START documentai_v1beta3_generated_DocumentService_GetDocument_Datasetname_sync] +import com.google.cloud.documentai.v1beta3.DatasetName; +import com.google.cloud.documentai.v1beta3.DocumentServiceClient; +import com.google.cloud.documentai.v1beta3.GetDocumentResponse; + +public class SyncGetDocumentDatasetname { + + public static void main(String[] args) throws Exception { + syncGetDocumentDatasetname(); + } + + public static void syncGetDocumentDatasetname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) { + DatasetName dataset = DatasetName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]"); + GetDocumentResponse response = documentServiceClient.getDocument(dataset); + } + } +} +// [END documentai_v1beta3_generated_DocumentService_GetDocument_Datasetname_sync] diff --git a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/getdocument/SyncGetDocumentString.java b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/getdocument/SyncGetDocumentString.java new file mode 100644 index 000000000000..ff883391056c --- /dev/null +++ b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/getdocument/SyncGetDocumentString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 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.samples; + +// [START documentai_v1beta3_generated_DocumentService_GetDocument_String_sync] +import com.google.cloud.documentai.v1beta3.DatasetName; +import com.google.cloud.documentai.v1beta3.DocumentServiceClient; +import com.google.cloud.documentai.v1beta3.GetDocumentResponse; + +public class SyncGetDocumentString { + + public static void main(String[] args) throws Exception { + syncGetDocumentString(); + } + + public static void syncGetDocumentString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) { + String dataset = DatasetName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString(); + GetDocumentResponse response = documentServiceClient.getDocument(dataset); + } + } +} +// [END documentai_v1beta3_generated_DocumentService_GetDocument_String_sync] diff --git a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/importdocuments/AsyncImportDocuments.java b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/importdocuments/AsyncImportDocuments.java new file mode 100644 index 000000000000..a56966ce626b --- /dev/null +++ b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/importdocuments/AsyncImportDocuments.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 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.samples; + +// [START documentai_v1beta3_generated_DocumentService_ImportDocuments_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.documentai.v1beta3.DatasetName; +import com.google.cloud.documentai.v1beta3.DocumentServiceClient; +import com.google.cloud.documentai.v1beta3.ImportDocumentsRequest; +import com.google.longrunning.Operation; +import java.util.ArrayList; + +public class AsyncImportDocuments { + + public static void main(String[] args) throws Exception { + asyncImportDocuments(); + } + + public static void asyncImportDocuments() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) { + ImportDocumentsRequest request = + ImportDocumentsRequest.newBuilder() + .setDataset(DatasetName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString()) + .addAllBatchDocumentsImportConfigs( + new ArrayList()) + .build(); + ApiFuture future = + documentServiceClient.importDocumentsCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END documentai_v1beta3_generated_DocumentService_ImportDocuments_async] diff --git a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/importdocuments/AsyncImportDocumentsLRO.java b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/importdocuments/AsyncImportDocumentsLRO.java new file mode 100644 index 000000000000..56ca60ccec71 --- /dev/null +++ b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/importdocuments/AsyncImportDocumentsLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 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.samples; + +// [START documentai_v1beta3_generated_DocumentService_ImportDocuments_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.documentai.v1beta3.DatasetName; +import com.google.cloud.documentai.v1beta3.DocumentServiceClient; +import com.google.cloud.documentai.v1beta3.ImportDocumentsMetadata; +import com.google.cloud.documentai.v1beta3.ImportDocumentsRequest; +import com.google.cloud.documentai.v1beta3.ImportDocumentsResponse; +import java.util.ArrayList; + +public class AsyncImportDocumentsLRO { + + public static void main(String[] args) throws Exception { + asyncImportDocumentsLRO(); + } + + public static void asyncImportDocumentsLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) { + ImportDocumentsRequest request = + ImportDocumentsRequest.newBuilder() + .setDataset(DatasetName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString()) + .addAllBatchDocumentsImportConfigs( + new ArrayList()) + .build(); + OperationFuture future = + documentServiceClient.importDocumentsOperationCallable().futureCall(request); + // Do something. + ImportDocumentsResponse response = future.get(); + } + } +} +// [END documentai_v1beta3_generated_DocumentService_ImportDocuments_LRO_async] diff --git a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/importdocuments/SyncImportDocuments.java b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/importdocuments/SyncImportDocuments.java new file mode 100644 index 000000000000..15e72aad770d --- /dev/null +++ b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/importdocuments/SyncImportDocuments.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 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.samples; + +// [START documentai_v1beta3_generated_DocumentService_ImportDocuments_sync] +import com.google.cloud.documentai.v1beta3.DatasetName; +import com.google.cloud.documentai.v1beta3.DocumentServiceClient; +import com.google.cloud.documentai.v1beta3.ImportDocumentsRequest; +import com.google.cloud.documentai.v1beta3.ImportDocumentsResponse; +import java.util.ArrayList; + +public class SyncImportDocuments { + + public static void main(String[] args) throws Exception { + syncImportDocuments(); + } + + public static void syncImportDocuments() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) { + ImportDocumentsRequest request = + ImportDocumentsRequest.newBuilder() + .setDataset(DatasetName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString()) + .addAllBatchDocumentsImportConfigs( + new ArrayList()) + .build(); + ImportDocumentsResponse response = documentServiceClient.importDocumentsAsync(request).get(); + } + } +} +// [END documentai_v1beta3_generated_DocumentService_ImportDocuments_sync] diff --git a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/importdocuments/SyncImportDocumentsDatasetname.java b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/importdocuments/SyncImportDocumentsDatasetname.java new file mode 100644 index 000000000000..3f7e6c46b93b --- /dev/null +++ b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/importdocuments/SyncImportDocumentsDatasetname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 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.samples; + +// [START documentai_v1beta3_generated_DocumentService_ImportDocuments_Datasetname_sync] +import com.google.cloud.documentai.v1beta3.DatasetName; +import com.google.cloud.documentai.v1beta3.DocumentServiceClient; +import com.google.cloud.documentai.v1beta3.ImportDocumentsResponse; + +public class SyncImportDocumentsDatasetname { + + public static void main(String[] args) throws Exception { + syncImportDocumentsDatasetname(); + } + + public static void syncImportDocumentsDatasetname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) { + DatasetName dataset = DatasetName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]"); + ImportDocumentsResponse response = documentServiceClient.importDocumentsAsync(dataset).get(); + } + } +} +// [END documentai_v1beta3_generated_DocumentService_ImportDocuments_Datasetname_sync] diff --git a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/importdocuments/SyncImportDocumentsString.java b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/importdocuments/SyncImportDocumentsString.java new file mode 100644 index 000000000000..454fc291c5b3 --- /dev/null +++ b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservice/importdocuments/SyncImportDocumentsString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 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.samples; + +// [START documentai_v1beta3_generated_DocumentService_ImportDocuments_String_sync] +import com.google.cloud.documentai.v1beta3.DatasetName; +import com.google.cloud.documentai.v1beta3.DocumentServiceClient; +import com.google.cloud.documentai.v1beta3.ImportDocumentsResponse; + +public class SyncImportDocumentsString { + + public static void main(String[] args) throws Exception { + syncImportDocumentsString(); + } + + public static void syncImportDocumentsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) { + String dataset = DatasetName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString(); + ImportDocumentsResponse response = documentServiceClient.importDocumentsAsync(dataset).get(); + } + } +} +// [END documentai_v1beta3_generated_DocumentService_ImportDocuments_String_sync] diff --git a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservicesettings/getdatasetschema/SyncGetDatasetSchema.java b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservicesettings/getdocument/SyncGetDocument.java similarity index 87% rename from java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservicesettings/getdatasetschema/SyncGetDatasetSchema.java rename to java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservicesettings/getdocument/SyncGetDocument.java index 753dc01b7b54..780ff329cd75 100644 --- a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservicesettings/getdatasetschema/SyncGetDatasetSchema.java +++ b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentservicesettings/getdocument/SyncGetDocument.java @@ -16,17 +16,17 @@ package com.google.cloud.documentai.v1beta3.samples; -// [START documentai_v1beta3_generated_DocumentServiceSettings_GetDatasetSchema_sync] +// [START documentai_v1beta3_generated_DocumentServiceSettings_GetDocument_sync] import com.google.cloud.documentai.v1beta3.DocumentServiceSettings; import java.time.Duration; -public class SyncGetDatasetSchema { +public class SyncGetDocument { public static void main(String[] args) throws Exception { - syncGetDatasetSchema(); + syncGetDocument(); } - public static void syncGetDatasetSchema() throws Exception { + public static void syncGetDocument() throws Exception { // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. @@ -35,10 +35,10 @@ public static void syncGetDatasetSchema() throws Exception { DocumentServiceSettings.Builder documentServiceSettingsBuilder = DocumentServiceSettings.newBuilder(); documentServiceSettingsBuilder - .getDatasetSchemaSettings() + .getDocumentSettings() .setRetrySettings( documentServiceSettingsBuilder - .getDatasetSchemaSettings() + .getDocumentSettings() .getRetrySettings() .toBuilder() .setTotalTimeout(Duration.ofSeconds(30)) @@ -46,4 +46,4 @@ public static void syncGetDatasetSchema() throws Exception { DocumentServiceSettings documentServiceSettings = documentServiceSettingsBuilder.build(); } } -// [END documentai_v1beta3_generated_DocumentServiceSettings_GetDatasetSchema_sync] +// [END documentai_v1beta3_generated_DocumentServiceSettings_GetDocument_sync] diff --git a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/stub/documentservicestubsettings/getdatasetschema/SyncGetDatasetSchema.java b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/stub/documentservicestubsettings/getdocument/SyncGetDocument.java similarity index 87% rename from java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/stub/documentservicestubsettings/getdatasetschema/SyncGetDatasetSchema.java rename to java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/stub/documentservicestubsettings/getdocument/SyncGetDocument.java index 51bddd9cf383..400e4be2b38a 100644 --- a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/stub/documentservicestubsettings/getdatasetschema/SyncGetDatasetSchema.java +++ b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/stub/documentservicestubsettings/getdocument/SyncGetDocument.java @@ -16,17 +16,17 @@ package com.google.cloud.documentai.v1beta3.stub.samples; -// [START documentai_v1beta3_generated_DocumentServiceStubSettings_GetDatasetSchema_sync] +// [START documentai_v1beta3_generated_DocumentServiceStubSettings_GetDocument_sync] import com.google.cloud.documentai.v1beta3.stub.DocumentServiceStubSettings; import java.time.Duration; -public class SyncGetDatasetSchema { +public class SyncGetDocument { public static void main(String[] args) throws Exception { - syncGetDatasetSchema(); + syncGetDocument(); } - public static void syncGetDatasetSchema() throws Exception { + public static void syncGetDocument() throws Exception { // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. @@ -35,10 +35,10 @@ public static void syncGetDatasetSchema() throws Exception { DocumentServiceStubSettings.Builder documentServiceSettingsBuilder = DocumentServiceStubSettings.newBuilder(); documentServiceSettingsBuilder - .getDatasetSchemaSettings() + .getDocumentSettings() .setRetrySettings( documentServiceSettingsBuilder - .getDatasetSchemaSettings() + .getDocumentSettings() .getRetrySettings() .toBuilder() .setTotalTimeout(Duration.ofSeconds(30)) @@ -46,4 +46,4 @@ public static void syncGetDatasetSchema() throws Exception { DocumentServiceStubSettings documentServiceSettings = documentServiceSettingsBuilder.build(); } } -// [END documentai_v1beta3_generated_DocumentServiceStubSettings_GetDatasetSchema_sync] +// [END documentai_v1beta3_generated_DocumentServiceStubSettings_GetDocument_sync]