diff --git a/.github/readme/synth.metadata/synth.metadata b/.github/readme/synth.metadata/synth.metadata index 76cc6aae..760f401e 100644 --- a/.github/readme/synth.metadata/synth.metadata +++ b/.github/readme/synth.metadata/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-document-ai.git", - "sha": "e9425d1af5fb7891d2c1e0716a1b45ad9d2b7b5a" + "sha": "037b92af61c60ea39fd7eff36479dc771b8d7d14" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "0199c79b8324fba66476300824aa931788c47e2d" + "sha": "2e7bd5cc66a3f0b90ce1c150eb35c89eeb9872d6" } } ] diff --git a/.github/workflows/auto-release.yaml b/.github/workflows/auto-release.yaml index 7c8816a7..9b4fd4d8 100644 --- a/.github/workflows/auto-release.yaml +++ b/.github/workflows/auto-release.yaml @@ -16,8 +16,8 @@ jobs: return; } - // only approve PRs like "chore(master): release " - if ( !context.payload.pull_request.title.startsWith("chore(master): release") ) { + // only approve PRs like "chore: release " + if ( !context.payload.pull_request.title.startsWith("chore: release") ) { return; } diff --git a/.kokoro/release/publish_javadoc.cfg b/.kokoro/release/publish_javadoc.cfg index 086d6596..fe293816 100644 --- a/.kokoro/release/publish_javadoc.cfg +++ b/.kokoro/release/publish_javadoc.cfg @@ -7,12 +7,6 @@ env_vars: { value: "docs-staging" } -# cloud-rad staging -env_vars: { - key: "STAGING_BUCKET_V2" - value: "docs-staging-v2-staging" -} - env_vars: { key: "TRAMPOLINE_BUILD_FILE" value: "github/java-document-ai/.kokoro/release/publish_javadoc.sh" @@ -26,4 +20,4 @@ before_action { keyname: "docuploader_service_account" } } -} \ No newline at end of file +} diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh index 6a620a8a..d4af6753 100755 --- a/.kokoro/release/publish_javadoc.sh +++ b/.kokoro/release/publish_javadoc.sh @@ -56,22 +56,3 @@ python3 -m docuploader create-metadata \ python3 -m docuploader upload . \ --credentials ${CREDENTIALS} \ --staging-bucket ${STAGING_BUCKET} - -popd - -# V2 due to problems w/ the released javadoc plugin doclava, Java 8 is required. Beware of accidental updates. - -mvn clean site -B -q -Ddevsite.template="${KOKORO_GFILE_DIR}/java/" - -pushd target/devsite/reference - -# create metadata -python3 -m docuploader create-metadata \ - --name ${NAME} \ - --version ${VERSION} \ - --language java - -# upload docs to staging bucket -python3 -m docuploader upload . \ - --credentials ${CREDENTIALS} \ - --staging-bucket ${STAGING_BUCKET_V2} diff --git a/.kokoro/release/publish_javadoc11.sh b/.kokoro/release/publish_javadoc11.sh index e7ffba28..71469bb2 100755 --- a/.kokoro/release/publish_javadoc11.sh +++ b/.kokoro/release/publish_javadoc11.sh @@ -40,6 +40,9 @@ export VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) # generate yml mvn clean site -B -q -P docFX +# copy README to docfx-yml dir and rename index.md +cp README.md target/docfx-yml/index.md + pushd target/docfx-yml # create metadata @@ -52,4 +55,4 @@ python3 -m docuploader create-metadata \ python3 -m docuploader upload . \ --credentials ${CREDENTIALS} \ --staging-bucket ${STAGING_BUCKET_V2} \ - --destination-prefix docfx- + --destination-prefix docfx diff --git a/CHANGELOG.md b/CHANGELOG.md index 17f2fda4..957d0374 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,24 @@ # Changelog +## [0.5.0](https://www.github.com/googleapis/java-document-ai/compare/v0.4.1...v0.5.0) (2021-03-15) + + +### ⚠ BREAKING CHANGES + +* remove the translation fields in document.proto + +### Features + +* **generator:** update protoc to v3.15.3 ([#372](https://www.github.com/googleapis/java-document-ai/issues/372)) ([e98fa5a](https://www.github.com/googleapis/java-document-ai/commit/e98fa5a945dfbe41fc9ba52723986dcb2fe66b3e)) +* remove the translation fields in document.proto ([#382](https://www.github.com/googleapis/java-document-ai/issues/382)) ([06270f7](https://www.github.com/googleapis/java-document-ai/commit/06270f7b6a8e5e25f776236ee680a096bb842451)) +* Update documentai/v1beta3 protos: add support for boolean normalized value ([#358](https://www.github.com/googleapis/java-document-ai/issues/358)) ([2f341a1](https://www.github.com/googleapis/java-document-ai/commit/2f341a10d41f10a35f19eed20c7c6aa891f0569f)) + + +### Dependencies + +* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.20.1 ([#383](https://www.github.com/googleapis/java-document-ai/issues/383)) ([b074e0b](https://www.github.com/googleapis/java-document-ai/commit/b074e0b4bf48b6b140cfe30158fde6a5a2ab1dfc)) +* update dependency com.google.cloud:google-cloud-storage to v1.113.14 ([#369](https://www.github.com/googleapis/java-document-ai/issues/369)) ([136d117](https://www.github.com/googleapis/java-document-ai/commit/136d1178d13f3a2bd3f93be6106a97f04aa7bcae)) + ### [0.4.1](https://www.github.com/googleapis/java-document-ai/compare/v0.4.0...v0.4.1) (2021-02-26) diff --git a/README.md b/README.md index f989e813..d3096511 100644 --- a/README.md +++ b/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 - 18.0.0 + 19.0.0 pom import @@ -31,7 +31,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file com.google.cloud google-cloud-document-ai - 0.4.0 + 0.4.1 ``` @@ -42,25 +42,25 @@ If you are using Maven without BOM, add this to your dependencies: com.google.cloud google-cloud-document-ai - 0.4.0 + 0.4.1 ``` If you are using Gradle 5.x or later, add this to your dependencies ```Groovy -implementation platform('com.google.cloud:libraries-bom:18.0.0') +implementation platform('com.google.cloud:libraries-bom:19.0.0') compile 'com.google.cloud:google-cloud-document-ai' ``` If you are using Gradle without BOM, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-document-ai:0.4.0' +compile 'com.google.cloud:google-cloud-document-ai:0.4.1' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-document-ai" % "0.4.0" +libraryDependencies += "com.google.cloud" % "google-cloud-document-ai" % "0.4.1" ``` ## Authentication diff --git a/google-cloud-document-ai-bom/pom.xml b/google-cloud-document-ai-bom/pom.xml index 4e1f5939..c24a47ec 100644 --- a/google-cloud-document-ai-bom/pom.xml +++ b/google-cloud-document-ai-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-document-ai-bom - 0.4.1 + 0.5.0 pom com.google.cloud @@ -61,37 +61,37 @@ com.google.api.grpc proto-google-cloud-document-ai-v1beta1 - 0.4.1 + 0.5.0 com.google.api.grpc proto-google-cloud-document-ai-v1beta2 - 0.4.1 + 0.5.0 com.google.api.grpc proto-google-cloud-document-ai-v1beta3 - 0.4.1 + 0.5.0 com.google.api.grpc grpc-google-cloud-document-ai-v1beta1 - 0.4.1 + 0.5.0 com.google.api.grpc grpc-google-cloud-document-ai-v1beta2 - 0.4.1 + 0.5.0 com.google.api.grpc grpc-google-cloud-document-ai-v1beta3 - 0.4.1 + 0.5.0 com.google.cloud google-cloud-document-ai - 0.4.1 + 0.5.0 diff --git a/google-cloud-document-ai/pom.xml b/google-cloud-document-ai/pom.xml index 342e13fd..7a7862fc 100644 --- a/google-cloud-document-ai/pom.xml +++ b/google-cloud-document-ai/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-document-ai - 0.4.1 + 0.5.0 jar Google Cloud Document AI https://github.com/googleapis/java-document-ai @@ -11,7 +11,7 @@ com.google.cloud google-cloud-document-ai-parent - 0.4.1 + 0.5.0 google-cloud-document-ai diff --git a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta1/DocumentUnderstandingServiceClient.java b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta1/DocumentUnderstandingServiceClient.java index b88d772e..d19de621 100644 --- a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta1/DocumentUnderstandingServiceClient.java +++ b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta1/DocumentUnderstandingServiceClient.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta1/DocumentUnderstandingServiceSettings.java b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta1/DocumentUnderstandingServiceSettings.java index 58577816..dac93c82 100644 --- a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta1/DocumentUnderstandingServiceSettings.java +++ b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta1/DocumentUnderstandingServiceSettings.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta1/package-info.java b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta1/package-info.java index 2e345e3d..da036b90 100644 --- a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta1/package-info.java +++ b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta1/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta1/stub/DocumentUnderstandingServiceStub.java b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta1/stub/DocumentUnderstandingServiceStub.java index 89957a15..b5c90ec0 100644 --- a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta1/stub/DocumentUnderstandingServiceStub.java +++ b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta1/stub/DocumentUnderstandingServiceStub.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta1/stub/DocumentUnderstandingServiceStubSettings.java b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta1/stub/DocumentUnderstandingServiceStubSettings.java index f0544ae9..54d5f932 100644 --- a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta1/stub/DocumentUnderstandingServiceStubSettings.java +++ b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta1/stub/DocumentUnderstandingServiceStubSettings.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta1/stub/GrpcDocumentUnderstandingServiceCallableFactory.java b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta1/stub/GrpcDocumentUnderstandingServiceCallableFactory.java index bf83f97f..49945fc6 100644 --- a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta1/stub/GrpcDocumentUnderstandingServiceCallableFactory.java +++ b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta1/stub/GrpcDocumentUnderstandingServiceCallableFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta1/stub/GrpcDocumentUnderstandingServiceStub.java b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta1/stub/GrpcDocumentUnderstandingServiceStub.java index f1f89a50..83e4879c 100644 --- a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta1/stub/GrpcDocumentUnderstandingServiceStub.java +++ b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta1/stub/GrpcDocumentUnderstandingServiceStub.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/DocumentUnderstandingServiceClient.java b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/DocumentUnderstandingServiceClient.java index ce355449..bb83c05c 100644 --- a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/DocumentUnderstandingServiceClient.java +++ b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/DocumentUnderstandingServiceClient.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/DocumentUnderstandingServiceSettings.java b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/DocumentUnderstandingServiceSettings.java index ba1aa1c7..8e270c99 100644 --- a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/DocumentUnderstandingServiceSettings.java +++ b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/DocumentUnderstandingServiceSettings.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/package-info.java b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/package-info.java index 316376ea..8390ac66 100644 --- a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/package-info.java +++ b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/stub/DocumentUnderstandingServiceStub.java b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/stub/DocumentUnderstandingServiceStub.java index 83c8ae4a..faed6d2c 100644 --- a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/stub/DocumentUnderstandingServiceStub.java +++ b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/stub/DocumentUnderstandingServiceStub.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/stub/DocumentUnderstandingServiceStubSettings.java b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/stub/DocumentUnderstandingServiceStubSettings.java index ffa878c3..7afb71bb 100644 --- a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/stub/DocumentUnderstandingServiceStubSettings.java +++ b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/stub/DocumentUnderstandingServiceStubSettings.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/stub/GrpcDocumentUnderstandingServiceCallableFactory.java b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/stub/GrpcDocumentUnderstandingServiceCallableFactory.java index 60e401fa..6e5e6ddd 100644 --- a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/stub/GrpcDocumentUnderstandingServiceCallableFactory.java +++ b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/stub/GrpcDocumentUnderstandingServiceCallableFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/stub/GrpcDocumentUnderstandingServiceStub.java b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/stub/GrpcDocumentUnderstandingServiceStub.java index 5a7ea06f..461d183e 100644 --- a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/stub/GrpcDocumentUnderstandingServiceStub.java +++ b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/stub/GrpcDocumentUnderstandingServiceStub.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceClient.java b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceClient.java index fb9a7849..c3e1fd8b 100644 --- a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceClient.java +++ b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceClient.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceSettings.java b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceSettings.java index 9b245dea..9d28863c 100644 --- a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceSettings.java +++ b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceSettings.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/package-info.java b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/package-info.java index 452fe7aa..493d1823 100644 --- a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/package-info.java +++ b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/DocumentProcessorServiceStub.java b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/DocumentProcessorServiceStub.java index 4334838c..c8588ad4 100644 --- a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/DocumentProcessorServiceStub.java +++ b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/DocumentProcessorServiceStub.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/DocumentProcessorServiceStubSettings.java b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/DocumentProcessorServiceStubSettings.java index b7b2814d..80da61bf 100644 --- a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/DocumentProcessorServiceStubSettings.java +++ b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/DocumentProcessorServiceStubSettings.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/GrpcDocumentProcessorServiceCallableFactory.java b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/GrpcDocumentProcessorServiceCallableFactory.java index 4679ccee..9ca7d30c 100644 --- a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/GrpcDocumentProcessorServiceCallableFactory.java +++ b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/GrpcDocumentProcessorServiceCallableFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/GrpcDocumentProcessorServiceStub.java b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/GrpcDocumentProcessorServiceStub.java index 3a11af9a..15ff5e41 100644 --- a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/GrpcDocumentProcessorServiceStub.java +++ b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/GrpcDocumentProcessorServiceStub.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta1/DocumentUnderstandingServiceClientTest.java b/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta1/DocumentUnderstandingServiceClientTest.java index dfbcf46f..7764bfc0 100644 --- a/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta1/DocumentUnderstandingServiceClientTest.java +++ b/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta1/DocumentUnderstandingServiceClientTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta1/MockDocumentUnderstandingService.java b/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta1/MockDocumentUnderstandingService.java index 7fc82f09..5d8415cd 100644 --- a/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta1/MockDocumentUnderstandingService.java +++ b/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta1/MockDocumentUnderstandingService.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta1/MockDocumentUnderstandingServiceImpl.java b/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta1/MockDocumentUnderstandingServiceImpl.java index f78ca4cb..49dac25a 100644 --- a/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta1/MockDocumentUnderstandingServiceImpl.java +++ b/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta1/MockDocumentUnderstandingServiceImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -62,7 +62,7 @@ public void reset() { @Override public void batchProcessDocuments( BatchProcessDocumentsRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); + Object response = responses.poll(); if (response instanceof Operation) { requests.add(request); responseObserver.onNext(((Operation) response)); @@ -74,7 +74,7 @@ public void batchProcessDocuments( new IllegalArgumentException( String.format( "Unrecognized response type %s for method BatchProcessDocuments, expected %s or %s", - response.getClass().getName(), + response == null ? "null" : response.getClass().getName(), Operation.class.getName(), Exception.class.getName()))); } diff --git a/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta2/DocumentUnderstandingServiceClientTest.java b/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta2/DocumentUnderstandingServiceClientTest.java index 46d2907f..f32b79af 100644 --- a/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta2/DocumentUnderstandingServiceClientTest.java +++ b/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta2/DocumentUnderstandingServiceClientTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta2/MockDocumentUnderstandingService.java b/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta2/MockDocumentUnderstandingService.java index 0f610d36..4b4918d1 100644 --- a/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta2/MockDocumentUnderstandingService.java +++ b/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta2/MockDocumentUnderstandingService.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta2/MockDocumentUnderstandingServiceImpl.java b/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta2/MockDocumentUnderstandingServiceImpl.java index ac9ba498..38d500b7 100644 --- a/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta2/MockDocumentUnderstandingServiceImpl.java +++ b/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta2/MockDocumentUnderstandingServiceImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -62,7 +62,7 @@ public void reset() { @Override public void batchProcessDocuments( BatchProcessDocumentsRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); + Object response = responses.poll(); if (response instanceof Operation) { requests.add(request); responseObserver.onNext(((Operation) response)); @@ -74,7 +74,7 @@ public void batchProcessDocuments( new IllegalArgumentException( String.format( "Unrecognized response type %s for method BatchProcessDocuments, expected %s or %s", - response.getClass().getName(), + response == null ? "null" : response.getClass().getName(), Operation.class.getName(), Exception.class.getName()))); } @@ -83,7 +83,7 @@ public void batchProcessDocuments( @Override public void processDocument( ProcessDocumentRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); + Object response = responses.poll(); if (response instanceof Document) { requests.add(request); responseObserver.onNext(((Document) response)); @@ -95,7 +95,7 @@ public void processDocument( new IllegalArgumentException( String.format( "Unrecognized response type %s for method ProcessDocument, expected %s or %s", - response.getClass().getName(), + response == null ? "null" : response.getClass().getName(), Document.class.getName(), Exception.class.getName()))); } diff --git a/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceClientTest.java b/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceClientTest.java index 7e7b116c..29a74a45 100644 --- a/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceClientTest.java +++ b/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceClientTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta3/MockDocumentProcessorService.java b/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta3/MockDocumentProcessorService.java index b11365ca..70700599 100644 --- a/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta3/MockDocumentProcessorService.java +++ b/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta3/MockDocumentProcessorService.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta3/MockDocumentProcessorServiceImpl.java b/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta3/MockDocumentProcessorServiceImpl.java index 80b26614..a4d05ec0 100644 --- a/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta3/MockDocumentProcessorServiceImpl.java +++ b/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta3/MockDocumentProcessorServiceImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -62,7 +62,7 @@ public void reset() { @Override public void processDocument( ProcessRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); + Object response = responses.poll(); if (response instanceof ProcessResponse) { requests.add(request); responseObserver.onNext(((ProcessResponse) response)); @@ -74,7 +74,7 @@ public void processDocument( new IllegalArgumentException( String.format( "Unrecognized response type %s for method ProcessDocument, expected %s or %s", - response.getClass().getName(), + response == null ? "null" : response.getClass().getName(), ProcessResponse.class.getName(), Exception.class.getName()))); } @@ -83,7 +83,7 @@ public void processDocument( @Override public void batchProcessDocuments( BatchProcessRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); + Object response = responses.poll(); if (response instanceof Operation) { requests.add(request); responseObserver.onNext(((Operation) response)); @@ -95,7 +95,7 @@ public void batchProcessDocuments( new IllegalArgumentException( String.format( "Unrecognized response type %s for method BatchProcessDocuments, expected %s or %s", - response.getClass().getName(), + response == null ? "null" : response.getClass().getName(), Operation.class.getName(), Exception.class.getName()))); } @@ -104,7 +104,7 @@ public void batchProcessDocuments( @Override public void reviewDocument( ReviewDocumentRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); + Object response = responses.poll(); if (response instanceof Operation) { requests.add(request); responseObserver.onNext(((Operation) response)); @@ -116,7 +116,7 @@ public void reviewDocument( new IllegalArgumentException( String.format( "Unrecognized response type %s for method ReviewDocument, expected %s or %s", - response.getClass().getName(), + response == null ? "null" : response.getClass().getName(), Operation.class.getName(), Exception.class.getName()))); } diff --git a/grpc-google-cloud-document-ai-v1beta1/pom.xml b/grpc-google-cloud-document-ai-v1beta1/pom.xml index 61e01ae2..6d627508 100644 --- a/grpc-google-cloud-document-ai-v1beta1/pom.xml +++ b/grpc-google-cloud-document-ai-v1beta1/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-document-ai-v1beta1 - 0.4.1 + 0.5.0 grpc-google-cloud-document-ai-v1beta1 GRPC library for grpc-google-cloud-document-ai-v1beta1 com.google.cloud google-cloud-document-ai-parent - 0.4.1 + 0.5.0 diff --git a/grpc-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/DocumentUnderstandingServiceGrpc.java b/grpc-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/DocumentUnderstandingServiceGrpc.java index 437a1671..7ee7040d 100644 --- a/grpc-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/DocumentUnderstandingServiceGrpc.java +++ b/grpc-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/DocumentUnderstandingServiceGrpc.java @@ -16,11 +16,6 @@ package com.google.cloud.documentai.v1beta1; import static io.grpc.MethodDescriptor.generateFullMethodName; -import static io.grpc.stub.ClientCalls.asyncUnaryCall; -import static io.grpc.stub.ClientCalls.blockingUnaryCall; -import static io.grpc.stub.ClientCalls.futureUnaryCall; -import static io.grpc.stub.ServerCalls.asyncUnaryCall; -import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; /** * @@ -157,7 +152,8 @@ public abstract static class DocumentUnderstandingServiceImplBase public void batchProcessDocuments( com.google.cloud.documentai.v1beta1.BatchProcessDocumentsRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getBatchProcessDocumentsMethod(), responseObserver); + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getBatchProcessDocumentsMethod(), responseObserver); } @java.lang.Override @@ -165,7 +161,7 @@ public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( getBatchProcessDocumentsMethod(), - asyncUnaryCall( + io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< com.google.cloud.documentai.v1beta1.BatchProcessDocumentsRequest, com.google.longrunning.Operation>(this, METHODID_BATCH_PROCESS_DOCUMENTS))) @@ -205,7 +201,7 @@ protected DocumentUnderstandingServiceStub build( public void batchProcessDocuments( com.google.cloud.documentai.v1beta1.BatchProcessDocumentsRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( + io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getBatchProcessDocumentsMethod(), getCallOptions()), request, responseObserver); @@ -243,7 +239,7 @@ protected DocumentUnderstandingServiceBlockingStub build( */ public com.google.longrunning.Operation batchProcessDocuments( com.google.cloud.documentai.v1beta1.BatchProcessDocumentsRequest request) { - return blockingUnaryCall( + return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getBatchProcessDocumentsMethod(), getCallOptions(), request); } } @@ -280,7 +276,7 @@ protected DocumentUnderstandingServiceFutureStub build( public com.google.common.util.concurrent.ListenableFuture batchProcessDocuments( com.google.cloud.documentai.v1beta1.BatchProcessDocumentsRequest request) { - return futureUnaryCall( + return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getBatchProcessDocumentsMethod(), getCallOptions()), request); } } diff --git a/grpc-google-cloud-document-ai-v1beta2/pom.xml b/grpc-google-cloud-document-ai-v1beta2/pom.xml index 7753fb92..79af27d4 100644 --- a/grpc-google-cloud-document-ai-v1beta2/pom.xml +++ b/grpc-google-cloud-document-ai-v1beta2/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-document-ai-v1beta2 - 0.4.1 + 0.5.0 grpc-google-cloud-document-ai-v1beta2 GRPC library for grpc-google-cloud-document-ai-v1beta2 com.google.cloud google-cloud-document-ai-parent - 0.4.1 + 0.5.0 diff --git a/grpc-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/DocumentUnderstandingServiceGrpc.java b/grpc-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/DocumentUnderstandingServiceGrpc.java index 0de58fb5..cf05b0b5 100644 --- a/grpc-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/DocumentUnderstandingServiceGrpc.java +++ b/grpc-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/DocumentUnderstandingServiceGrpc.java @@ -16,11 +16,6 @@ package com.google.cloud.documentai.v1beta2; import static io.grpc.MethodDescriptor.generateFullMethodName; -import static io.grpc.stub.ClientCalls.asyncUnaryCall; -import static io.grpc.stub.ClientCalls.blockingUnaryCall; -import static io.grpc.stub.ClientCalls.futureUnaryCall; -import static io.grpc.stub.ServerCalls.asyncUnaryCall; -import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; /** * @@ -207,7 +202,8 @@ public abstract static class DocumentUnderstandingServiceImplBase public void batchProcessDocuments( com.google.cloud.documentai.v1beta2.BatchProcessDocumentsRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getBatchProcessDocumentsMethod(), responseObserver); + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getBatchProcessDocumentsMethod(), responseObserver); } /** @@ -221,7 +217,8 @@ public void processDocument( com.google.cloud.documentai.v1beta2.ProcessDocumentRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getProcessDocumentMethod(), responseObserver); + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getProcessDocumentMethod(), responseObserver); } @java.lang.Override @@ -229,13 +226,13 @@ public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( getBatchProcessDocumentsMethod(), - asyncUnaryCall( + io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< com.google.cloud.documentai.v1beta2.BatchProcessDocumentsRequest, com.google.longrunning.Operation>(this, METHODID_BATCH_PROCESS_DOCUMENTS))) .addMethod( getProcessDocumentMethod(), - asyncUnaryCall( + io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< com.google.cloud.documentai.v1beta2.ProcessDocumentRequest, com.google.cloud.documentai.v1beta2.Document>( @@ -277,7 +274,7 @@ protected DocumentUnderstandingServiceStub build( public void batchProcessDocuments( com.google.cloud.documentai.v1beta2.BatchProcessDocumentsRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( + io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getBatchProcessDocumentsMethod(), getCallOptions()), request, responseObserver); @@ -294,7 +291,7 @@ public void processDocument( com.google.cloud.documentai.v1beta2.ProcessDocumentRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( + io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getProcessDocumentMethod(), getCallOptions()), request, responseObserver); @@ -333,7 +330,7 @@ protected DocumentUnderstandingServiceBlockingStub build( */ public com.google.longrunning.Operation batchProcessDocuments( com.google.cloud.documentai.v1beta2.BatchProcessDocumentsRequest request) { - return blockingUnaryCall( + return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getBatchProcessDocumentsMethod(), getCallOptions(), request); } @@ -346,7 +343,8 @@ public com.google.longrunning.Operation batchProcessDocuments( */ public com.google.cloud.documentai.v1beta2.Document processDocument( com.google.cloud.documentai.v1beta2.ProcessDocumentRequest request) { - return blockingUnaryCall(getChannel(), getProcessDocumentMethod(), getCallOptions(), request); + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getProcessDocumentMethod(), getCallOptions(), request); } } @@ -383,7 +381,7 @@ protected DocumentUnderstandingServiceFutureStub build( public com.google.common.util.concurrent.ListenableFuture batchProcessDocuments( com.google.cloud.documentai.v1beta2.BatchProcessDocumentsRequest request) { - return futureUnaryCall( + return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getBatchProcessDocumentsMethod(), getCallOptions()), request); } @@ -397,7 +395,7 @@ protected DocumentUnderstandingServiceFutureStub build( public com.google.common.util.concurrent.ListenableFuture< com.google.cloud.documentai.v1beta2.Document> processDocument(com.google.cloud.documentai.v1beta2.ProcessDocumentRequest request) { - return futureUnaryCall( + return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getProcessDocumentMethod(), getCallOptions()), request); } } diff --git a/grpc-google-cloud-document-ai-v1beta3/pom.xml b/grpc-google-cloud-document-ai-v1beta3/pom.xml index aead6cd2..d8412a3a 100644 --- a/grpc-google-cloud-document-ai-v1beta3/pom.xml +++ b/grpc-google-cloud-document-ai-v1beta3/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-document-ai-v1beta3 - 0.4.1 + 0.5.0 grpc-google-cloud-document-ai-v1beta3 GRPC library for grpc-google-cloud-document-ai-v1beta3 com.google.cloud google-cloud-document-ai-parent - 0.4.1 + 0.5.0 diff --git a/grpc-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceGrpc.java b/grpc-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceGrpc.java index 275f4d2d..581a61a4 100644 --- a/grpc-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceGrpc.java +++ b/grpc-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceGrpc.java @@ -16,11 +16,6 @@ package com.google.cloud.documentai.v1beta3; import static io.grpc.MethodDescriptor.generateFullMethodName; -import static io.grpc.stub.ClientCalls.asyncUnaryCall; -import static io.grpc.stub.ClientCalls.blockingUnaryCall; -import static io.grpc.stub.ClientCalls.futureUnaryCall; -import static io.grpc.stub.ServerCalls.asyncUnaryCall; -import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; /** * @@ -253,7 +248,8 @@ public void processDocument( com.google.cloud.documentai.v1beta3.ProcessRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getProcessDocumentMethod(), responseObserver); + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getProcessDocumentMethod(), responseObserver); } /** @@ -267,7 +263,8 @@ public void processDocument( public void batchProcessDocuments( com.google.cloud.documentai.v1beta3.BatchProcessRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getBatchProcessDocumentsMethod(), responseObserver); + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getBatchProcessDocumentsMethod(), responseObserver); } /** @@ -281,7 +278,8 @@ public void batchProcessDocuments( public void reviewDocument( com.google.cloud.documentai.v1beta3.ReviewDocumentRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getReviewDocumentMethod(), responseObserver); + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getReviewDocumentMethod(), responseObserver); } @java.lang.Override @@ -289,20 +287,20 @@ public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( getProcessDocumentMethod(), - asyncUnaryCall( + io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< com.google.cloud.documentai.v1beta3.ProcessRequest, com.google.cloud.documentai.v1beta3.ProcessResponse>( this, METHODID_PROCESS_DOCUMENT))) .addMethod( getBatchProcessDocumentsMethod(), - asyncUnaryCall( + io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< com.google.cloud.documentai.v1beta3.BatchProcessRequest, com.google.longrunning.Operation>(this, METHODID_BATCH_PROCESS_DOCUMENTS))) .addMethod( getReviewDocumentMethod(), - asyncUnaryCall( + io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< com.google.cloud.documentai.v1beta3.ReviewDocumentRequest, com.google.longrunning.Operation>(this, METHODID_REVIEW_DOCUMENT))) @@ -343,7 +341,7 @@ public void processDocument( com.google.cloud.documentai.v1beta3.ProcessRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( + io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getProcessDocumentMethod(), getCallOptions()), request, responseObserver); @@ -360,7 +358,7 @@ public void processDocument( public void batchProcessDocuments( com.google.cloud.documentai.v1beta3.BatchProcessRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( + io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getBatchProcessDocumentsMethod(), getCallOptions()), request, responseObserver); @@ -377,7 +375,7 @@ public void batchProcessDocuments( public void reviewDocument( com.google.cloud.documentai.v1beta3.ReviewDocumentRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( + io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getReviewDocumentMethod(), getCallOptions()), request, responseObserver); @@ -416,7 +414,8 @@ protected DocumentProcessorServiceBlockingStub build( */ public com.google.cloud.documentai.v1beta3.ProcessResponse processDocument( com.google.cloud.documentai.v1beta3.ProcessRequest request) { - return blockingUnaryCall(getChannel(), getProcessDocumentMethod(), getCallOptions(), request); + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getProcessDocumentMethod(), getCallOptions(), request); } /** @@ -429,7 +428,7 @@ public com.google.cloud.documentai.v1beta3.ProcessResponse processDocument( */ public com.google.longrunning.Operation batchProcessDocuments( com.google.cloud.documentai.v1beta3.BatchProcessRequest request) { - return blockingUnaryCall( + return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getBatchProcessDocumentsMethod(), getCallOptions(), request); } @@ -443,7 +442,8 @@ public com.google.longrunning.Operation batchProcessDocuments( */ public com.google.longrunning.Operation reviewDocument( com.google.cloud.documentai.v1beta3.ReviewDocumentRequest request) { - return blockingUnaryCall(getChannel(), getReviewDocumentMethod(), getCallOptions(), request); + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getReviewDocumentMethod(), getCallOptions(), request); } } @@ -480,7 +480,7 @@ protected DocumentProcessorServiceFutureStub build( public com.google.common.util.concurrent.ListenableFuture< com.google.cloud.documentai.v1beta3.ProcessResponse> processDocument(com.google.cloud.documentai.v1beta3.ProcessRequest request) { - return futureUnaryCall( + return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getProcessDocumentMethod(), getCallOptions()), request); } @@ -494,7 +494,7 @@ protected DocumentProcessorServiceFutureStub build( */ public com.google.common.util.concurrent.ListenableFuture batchProcessDocuments(com.google.cloud.documentai.v1beta3.BatchProcessRequest request) { - return futureUnaryCall( + return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getBatchProcessDocumentsMethod(), getCallOptions()), request); } @@ -508,7 +508,7 @@ protected DocumentProcessorServiceFutureStub build( */ public com.google.common.util.concurrent.ListenableFuture reviewDocument(com.google.cloud.documentai.v1beta3.ReviewDocumentRequest request) { - return futureUnaryCall( + return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getReviewDocumentMethod(), getCallOptions()), request); } } diff --git a/pom.xml b/pom.xml index 7993de4e..70feb26d 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-document-ai-parent pom - 0.4.1 + 0.5.0 Google Cloud Document AI Parent https://github.com/googleapis/java-document-ai @@ -70,38 +70,38 @@ com.google.api.grpc grpc-google-cloud-document-ai-v1beta1 - 0.4.1 + 0.5.0 com.google.api.grpc grpc-google-cloud-document-ai-v1beta2 - 0.4.1 + 0.5.0 com.google.api.grpc grpc-google-cloud-document-ai-v1beta3 - 0.4.1 + 0.5.0 com.google.api.grpc proto-google-cloud-document-ai-v1beta1 - 0.4.1 + 0.5.0 com.google.api.grpc proto-google-cloud-document-ai-v1beta2 - 0.4.1 + 0.5.0 com.google.api.grpc proto-google-cloud-document-ai-v1beta3 - 0.4.1 + 0.5.0 com.google.cloud google-cloud-shared-dependencies - 0.20.0 + 0.20.1 pom import diff --git a/proto-google-cloud-document-ai-v1beta1/pom.xml b/proto-google-cloud-document-ai-v1beta1/pom.xml index b9f10315..eac29680 100644 --- a/proto-google-cloud-document-ai-v1beta1/pom.xml +++ b/proto-google-cloud-document-ai-v1beta1/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-document-ai-v1beta1 - 0.4.1 + 0.5.0 proto-google-cloud-document-ai-v1beta1 PROTO library for proto-google-cloud-document-ai-v1beta1 com.google.cloud google-cloud-document-ai-parent - 0.4.1 + 0.5.0 diff --git a/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/Document.java b/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/Document.java index 2e835ec3..e1ccdf35 100644 --- a/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/Document.java +++ b/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/Document.java @@ -34360,6 +34360,24 @@ public SourceCase getSourceCase() { } public static final int URI_FIELD_NUMBER = 1; + /** + * + * + *
+   * 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; + * + * @return Whether the uri field is set. + */ + public boolean hasUri() { + return sourceCase_ == 1; + } /** * * @@ -34424,6 +34442,23 @@ public com.google.protobuf.ByteString getUriBytes() { } public static final int CONTENT_FIELD_NUMBER = 2; + /** + * + * + *
+   * 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; + * + * @return Whether the content field is set. + */ + @java.lang.Override + public boolean hasContent() { + return sourceCase_ == 2; + } /** * * @@ -35646,6 +35681,25 @@ public Builder clearSource() { private int bitField0_; + /** + * + * + *
+     * 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; + * + * @return Whether the uri field is set. + */ + @java.lang.Override + public boolean hasUri() { + return sourceCase_ == 1; + } /** * * @@ -35785,6 +35839,22 @@ public Builder setUriBytes(com.google.protobuf.ByteString value) { return this; } + /** + * + * + *
+     * 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; + * + * @return Whether the content field is set. + */ + public boolean hasContent() { + return sourceCase_ == 2; + } /** * * diff --git a/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/DocumentOrBuilder.java b/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/DocumentOrBuilder.java index 1bbf6913..9a4a6f99 100644 --- a/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/DocumentOrBuilder.java +++ b/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/DocumentOrBuilder.java @@ -23,6 +23,22 @@ public interface DocumentOrBuilder // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta1.Document) com.google.protobuf.MessageOrBuilder { + /** + * + * + *
+   * 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; + * + * @return Whether the uri field is set. + */ + boolean hasUri(); /** * * @@ -56,6 +72,20 @@ public interface DocumentOrBuilder */ com.google.protobuf.ByteString getUriBytes(); + /** + * + * + *
+   * 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; + * + * @return Whether the content field is set. + */ + boolean hasContent(); /** * * diff --git a/proto-google-cloud-document-ai-v1beta2/pom.xml b/proto-google-cloud-document-ai-v1beta2/pom.xml index c699b982..51d6ce6e 100644 --- a/proto-google-cloud-document-ai-v1beta2/pom.xml +++ b/proto-google-cloud-document-ai-v1beta2/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-document-ai-v1beta2 - 0.4.1 + 0.5.0 proto-google-cloud-document-ai-v1beta2 PROTO library for proto-google-cloud-document-ai-v1beta2 com.google.cloud google-cloud-document-ai-parent - 0.4.1 + 0.5.0 diff --git a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/Document.java b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/Document.java index 7812032e..a4792d25 100644 --- a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/Document.java +++ b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/Document.java @@ -1025,6 +1025,21 @@ public interface LabelOrBuilder // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document.Label) com.google.protobuf.MessageOrBuilder { + /** + * + * + *
+     * Label is generated AutoML model. This field stores the full resource
+     * name of the AutoML model.
+     * Format:
+     * `projects/{project-id}/locations/{location-id}/models/{model-id}`
+     * 
+ * + * string automl_model = 2; + * + * @return Whether the automlModel field is set. + */ + boolean hasAutomlModel(); /** * * @@ -1253,6 +1268,23 @@ public SourceCase getSourceCase() { } public static final int AUTOML_MODEL_FIELD_NUMBER = 2; + /** + * + * + *
+     * Label is generated AutoML model. This field stores the full resource
+     * name of the AutoML model.
+     * Format:
+     * `projects/{project-id}/locations/{location-id}/models/{model-id}`
+     * 
+ * + * string automl_model = 2; + * + * @return Whether the automlModel field is set. + */ + public boolean hasAutomlModel() { + return sourceCase_ == 2; + } /** * * @@ -1781,6 +1813,24 @@ public Builder clearSource() { return this; } + /** + * + * + *
+       * Label is generated AutoML model. This field stores the full resource
+       * name of the AutoML model.
+       * Format:
+       * `projects/{project-id}/locations/{location-id}/models/{model-id}`
+       * 
+ * + * string automl_model = 2; + * + * @return Whether the automlModel field is set. + */ + @java.lang.Override + public boolean hasAutomlModel() { + return sourceCase_ == 2; + } /** * * @@ -39378,6 +39428,24 @@ public SourceCase getSourceCase() { } public static final int URI_FIELD_NUMBER = 1; + /** + * + * + *
+   * 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; + * + * @return Whether the uri field is set. + */ + public boolean hasUri() { + return sourceCase_ == 1; + } /** * * @@ -39442,6 +39510,23 @@ public com.google.protobuf.ByteString getUriBytes() { } public static final int CONTENT_FIELD_NUMBER = 2; + /** + * + * + *
+   * 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; + * + * @return Whether the content field is set. + */ + @java.lang.Override + public boolean hasContent() { + return sourceCase_ == 2; + } /** * * @@ -40767,6 +40852,25 @@ public Builder clearSource() { private int bitField0_; + /** + * + * + *
+     * 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; + * + * @return Whether the uri field is set. + */ + @java.lang.Override + public boolean hasUri() { + return sourceCase_ == 1; + } /** * * @@ -40906,6 +41010,22 @@ public Builder setUriBytes(com.google.protobuf.ByteString value) { return this; } + /** + * + * + *
+     * 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; + * + * @return Whether the content field is set. + */ + public boolean hasContent() { + return sourceCase_ == 2; + } /** * * diff --git a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/DocumentOrBuilder.java b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/DocumentOrBuilder.java index 308b55f6..d8304496 100644 --- a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/DocumentOrBuilder.java +++ b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/DocumentOrBuilder.java @@ -23,6 +23,22 @@ public interface DocumentOrBuilder // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta2.Document) com.google.protobuf.MessageOrBuilder { + /** + * + * + *
+   * 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; + * + * @return Whether the uri field is set. + */ + boolean hasUri(); /** * * @@ -56,6 +72,20 @@ public interface DocumentOrBuilder */ com.google.protobuf.ByteString getUriBytes(); + /** + * + * + *
+   * 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; + * + * @return Whether the content field is set. + */ + boolean hasContent(); /** * * diff --git a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/InputConfig.java b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/InputConfig.java index 15b661b9..bc316e1a 100644 --- a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/InputConfig.java +++ b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/InputConfig.java @@ -235,6 +235,24 @@ public com.google.cloud.documentai.v1beta2.GcsSourceOrBuilder getGcsSourceOrBuil } public static final int CONTENTS_FIELD_NUMBER = 3; + /** + * + * + *
+   * Content in bytes, represented as a stream of bytes.
+   * Note: As with all `bytes` fields, proto buffer messages use a pure binary
+   * representation, whereas JSON representations use base64.
+   * This field only works for synchronous ProcessDocument method.
+   * 
+ * + * bytes contents = 3; + * + * @return Whether the contents field is set. + */ + @java.lang.Override + public boolean hasContents() { + return sourceCase_ == 3; + } /** * * @@ -931,6 +949,23 @@ public com.google.cloud.documentai.v1beta2.GcsSourceOrBuilder getGcsSourceOrBuil return gcsSourceBuilder_; } + /** + * + * + *
+     * Content in bytes, represented as a stream of bytes.
+     * Note: As with all `bytes` fields, proto buffer messages use a pure binary
+     * representation, whereas JSON representations use base64.
+     * This field only works for synchronous ProcessDocument method.
+     * 
+ * + * bytes contents = 3; + * + * @return Whether the contents field is set. + */ + public boolean hasContents() { + return sourceCase_ == 3; + } /** * * diff --git a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/InputConfigOrBuilder.java b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/InputConfigOrBuilder.java index 134e487c..f58772ce 100644 --- a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/InputConfigOrBuilder.java +++ b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/InputConfigOrBuilder.java @@ -61,6 +61,21 @@ public interface InputConfigOrBuilder */ com.google.cloud.documentai.v1beta2.GcsSourceOrBuilder getGcsSourceOrBuilder(); + /** + * + * + *
+   * Content in bytes, represented as a stream of bytes.
+   * Note: As with all `bytes` fields, proto buffer messages use a pure binary
+   * representation, whereas JSON representations use base64.
+   * This field only works for synchronous ProcessDocument method.
+   * 
+ * + * bytes contents = 3; + * + * @return Whether the contents field is set. + */ + boolean hasContents(); /** * * diff --git a/proto-google-cloud-document-ai-v1beta3/clirr-ignored-differences.xml b/proto-google-cloud-document-ai-v1beta3/clirr-ignored-differences.xml index b06ced3f..22b5a107 100644 --- a/proto-google-cloud-document-ai-v1beta3/clirr-ignored-differences.xml +++ b/proto-google-cloud-document-ai-v1beta3/clirr-ignored-differences.xml @@ -16,4 +16,19 @@ com/google/cloud/documentai/v1beta3/*OrBuilder boolean has*(*) + + + 7002 + com/google/cloud/documentai/v1beta3/Document* + * + + + 8001 + com/google/cloud/documentai/v1beta3/Document* + + + 6011 + com/google/cloud/documentai/v1beta3/Document* + *FIELD_NUMBER + \ No newline at end of file diff --git a/proto-google-cloud-document-ai-v1beta3/pom.xml b/proto-google-cloud-document-ai-v1beta3/pom.xml index cd34b9a8..de68e8d6 100644 --- a/proto-google-cloud-document-ai-v1beta3/pom.xml +++ b/proto-google-cloud-document-ai-v1beta3/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-document-ai-v1beta3 - 0.4.1 + 0.5.0 proto-google-cloud-document-ai-v1beta3 PROTO library for proto-google-cloud-document-ai-v1beta3 com.google.cloud google-cloud-document-ai-parent - 0.4.1 + 0.5.0 diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/Document.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/Document.java index bc73806c..28361fdc 100644 --- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/Document.java +++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/Document.java @@ -48,7 +48,6 @@ private Document() { pages_ = java.util.Collections.emptyList(); entities_ = java.util.Collections.emptyList(); entityRelations_ = java.util.Collections.emptyList(); - translations_ = java.util.Collections.emptyList(); textChanges_ = java.util.Collections.emptyList(); revisions_ = java.util.Collections.emptyList(); } @@ -194,27 +193,13 @@ private Document( break; } - case 98: - { - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - translations_ = - new java.util.ArrayList< - com.google.cloud.documentai.v1beta3.Document.Translation>(); - mutable_bitField0_ |= 0x00000010; - } - translations_.add( - input.readMessage( - com.google.cloud.documentai.v1beta3.Document.Translation.parser(), - extensionRegistry)); - break; - } case 106: { - if (!((mutable_bitField0_ & 0x00000040) != 0)) { + if (!((mutable_bitField0_ & 0x00000020) != 0)) { revisions_ = new java.util.ArrayList< com.google.cloud.documentai.v1beta3.Document.Revision>(); - mutable_bitField0_ |= 0x00000040; + mutable_bitField0_ |= 0x00000020; } revisions_.add( input.readMessage( @@ -224,11 +209,11 @@ private Document( } case 114: { - if (!((mutable_bitField0_ & 0x00000020) != 0)) { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { textChanges_ = new java.util.ArrayList< com.google.cloud.documentai.v1beta3.Document.TextChange>(); - mutable_bitField0_ |= 0x00000020; + mutable_bitField0_ |= 0x00000010; } textChanges_.add( input.readMessage( @@ -262,13 +247,10 @@ private Document( if (((mutable_bitField0_ & 0x00000008) != 0)) { entityRelations_ = java.util.Collections.unmodifiableList(entityRelations_); } - if (((mutable_bitField0_ & 0x00000010) != 0)) { - translations_ = java.util.Collections.unmodifiableList(translations_); - } - if (((mutable_bitField0_ & 0x00000040) != 0)) { + if (((mutable_bitField0_ & 0x00000020) != 0)) { revisions_ = java.util.Collections.unmodifiableList(revisions_); } - if (((mutable_bitField0_ & 0x00000020) != 0)) { + if (((mutable_bitField0_ & 0x00000010) != 0)) { textChanges_ = java.util.Collections.unmodifiableList(textChanges_); } this.unknownFields = unknownFields.build(); @@ -34289,11 +34271,11 @@ public interface EntityOrBuilder * * *
-     * Canonical id. This will be a unique value in the entity list
+     * Optional. Canonical id. This will be a unique value in the entity list
      * for this document.
      * 
* - * string id = 7; + * string id = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return The id. */ @@ -34302,11 +34284,11 @@ public interface EntityOrBuilder * * *
-     * Canonical id. This will be a unique value in the entity list
+     * Optional. Canonical id. This will be a unique value in the entity list
      * for this document.
      * 
* - * string id = 7; + * string id = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for id. */ @@ -34870,6 +34852,33 @@ public interface NormalizedValueOrBuilder */ 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(); + /** * * @@ -35027,6 +35036,12 @@ private NormalizedValue( structuredValueCase_ = 5; break; } + case 48: + { + structuredValueCase_ = 6; + structuredValue_ = input.readBool(); + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -35073,6 +35088,7 @@ public enum StructuredValueCase DATE_VALUE(3), DATETIME_VALUE(4), ADDRESS_VALUE(5), + BOOLEAN_VALUE(6), STRUCTUREDVALUE_NOT_SET(0); private final int value; @@ -35099,6 +35115,8 @@ public static StructuredValueCase forNumber(int value) { return DATETIME_VALUE; case 5: return ADDRESS_VALUE; + case 6: + return BOOLEAN_VALUE; case 0: return STRUCTUREDVALUE_NOT_SET; default: @@ -35343,6 +35361,43 @@ public com.google.type.PostalAddressOrBuilder getAddressValueOrBuilder() { 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 TEXT_FIELD_NUMBER = 1; private volatile java.lang.Object text_; /** @@ -35431,6 +35486,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (structuredValueCase_ == 5) { output.writeMessage(5, (com.google.type.PostalAddress) structuredValue_); } + if (structuredValueCase_ == 6) { + output.writeBool(6, (boolean) ((java.lang.Boolean) structuredValue_)); + } unknownFields.writeTo(output); } @@ -35463,6 +35521,11 @@ public int getSerializedSize() { 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_)); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -35494,6 +35557,9 @@ public boolean equals(final java.lang.Object obj) { case 5: if (!getAddressValue().equals(other.getAddressValue())) return false; break; + case 6: + if (getBooleanValue() != other.getBooleanValue()) return false; + break; case 0: default: } @@ -35527,6 +35593,10 @@ public int hashCode() { 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 0: default: } @@ -35744,6 +35814,9 @@ public com.google.cloud.documentai.v1beta3.Document.Entity.NormalizedValue build result.structuredValue_ = addressValueBuilder_.build(); } } + if (structuredValueCase_ == 6) { + result.structuredValue_ = structuredValue_; + } result.text_ = text_; result.structuredValueCase_ = structuredValueCase_; onBuilt(); @@ -35827,6 +35900,11 @@ public Builder mergeFrom( mergeAddressValue(other.getAddressValue()); break; } + case BOOLEAN_VALUE: + { + setBooleanValue(other.getBooleanValue()); + break; + } case STRUCTUREDVALUE_NOT_SET: { break; @@ -36768,6 +36846,79 @@ public com.google.type.PostalAddressOrBuilder getAddressValueOrBuilder() { 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; + } + private java.lang.Object text_ = ""; /** * @@ -37236,11 +37387,11 @@ public com.google.cloud.documentai.v1beta3.Document.PageAnchor getPageAnchor() { * * *
-     * Canonical id. This will be a unique value in the entity list
+     * Optional. Canonical id. This will be a unique value in the entity list
      * for this document.
      * 
* - * string id = 7; + * string id = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return The id. */ @@ -37260,11 +37411,11 @@ public java.lang.String getId() { * * *
-     * Canonical id. This will be a unique value in the entity list
+     * Optional. Canonical id. This will be a unique value in the entity list
      * for this document.
      * 
* - * string id = 7; + * string id = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for id. */ @@ -38866,11 +39017,11 @@ public Builder clearPageAnchor() { * * *
-       * Canonical id. This will be a unique value in the entity list
+       * Optional. Canonical id. This will be a unique value in the entity list
        * for this document.
        * 
* - * string id = 7; + * string id = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return The id. */ @@ -38889,11 +39040,11 @@ public java.lang.String getId() { * * *
-       * Canonical id. This will be a unique value in the entity list
+       * Optional. Canonical id. This will be a unique value in the entity list
        * for this document.
        * 
* - * string id = 7; + * string id = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for id. */ @@ -38912,11 +39063,11 @@ public com.google.protobuf.ByteString getIdBytes() { * * *
-       * Canonical id. This will be a unique value in the entity list
+       * Optional. Canonical id. This will be a unique value in the entity list
        * for this document.
        * 
* - * string id = 7; + * string id = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The id to set. * @return This builder for chaining. @@ -38934,11 +39085,11 @@ public Builder setId(java.lang.String value) { * * *
-       * Canonical id. This will be a unique value in the entity list
+       * Optional. Canonical id. This will be a unique value in the entity list
        * for this document.
        * 
* - * string id = 7; + * string id = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -38952,11 +39103,11 @@ public Builder clearId() { * * *
-       * Canonical id. This will be a unique value in the entity list
+       * Optional. Canonical id. This will be a unique value in the entity list
        * for this document.
        * 
* - * string id = 7; + * string id = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for id to set. * @return This builder for chaining. @@ -41002,194 +41153,131 @@ public com.google.cloud.documentai.v1beta3.Document.EntityRelation getDefaultIns } } - public interface TranslationOrBuilder + public interface TextAnchorOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.Document.Translation) + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.Document.TextAnchor) com.google.protobuf.MessageOrBuilder { /** * * *
-     * Provenance of the translation.
-     * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta3.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.v1beta3.Document.TextAnchor text_anchor = 1; - * - * @return Whether the textAnchor field is set. - */ - boolean hasTextAnchor(); - /** - * - * - *
-     * Provenance of the translation.
-     * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta3.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.v1beta3.Document.TextAnchor text_anchor = 1; - * - * @return The textAnchor. - */ - com.google.cloud.documentai.v1beta3.Document.TextAnchor getTextAnchor(); - /** - * - * - *
-     * Provenance of the translation.
-     * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta3.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.
+     * The text segments from the [Document.text][google.cloud.documentai.v1beta3.Document.text].
      * 
* - * .google.cloud.documentai.v1beta3.Document.TextAnchor text_anchor = 1; + * + * repeated .google.cloud.documentai.v1beta3.Document.TextAnchor.TextSegment text_segments = 1; + * */ - com.google.cloud.documentai.v1beta3.Document.TextAnchorOrBuilder getTextAnchorOrBuilder(); - + java.util.List + getTextSegmentsList(); /** * * *
-     * 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 text segments from the [Document.text][google.cloud.documentai.v1beta3.Document.text].
      * 
* - * string language_code = 2; - * - * @return The languageCode. + * + * repeated .google.cloud.documentai.v1beta3.Document.TextAnchor.TextSegment text_segments = 1; + * */ - java.lang.String getLanguageCode(); + com.google.cloud.documentai.v1beta3.Document.TextAnchor.TextSegment getTextSegments(int index); /** * * *
-     * 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 text segments from the [Document.text][google.cloud.documentai.v1beta3.Document.text].
      * 
* - * string language_code = 2; - * - * @return The bytes for languageCode. + * + * repeated .google.cloud.documentai.v1beta3.Document.TextAnchor.TextSegment text_segments = 1; + * */ - com.google.protobuf.ByteString getLanguageCodeBytes(); - + int getTextSegmentsCount(); /** * * *
-     * Text translated into the target language.
+     * The text segments from the [Document.text][google.cloud.documentai.v1beta3.Document.text].
      * 
* - * string translated_text = 3; - * - * @return The translatedText. + * + * repeated .google.cloud.documentai.v1beta3.Document.TextAnchor.TextSegment text_segments = 1; + * */ - java.lang.String getTranslatedText(); + java.util.List< + ? extends com.google.cloud.documentai.v1beta3.Document.TextAnchor.TextSegmentOrBuilder> + getTextSegmentsOrBuilderList(); /** * * *
-     * Text translated into the target language.
+     * The text segments from the [Document.text][google.cloud.documentai.v1beta3.Document.text].
      * 
* - * string translated_text = 3; - * - * @return The bytes for translatedText. + * + * repeated .google.cloud.documentai.v1beta3.Document.TextAnchor.TextSegment text_segments = 1; + * */ - com.google.protobuf.ByteString getTranslatedTextBytes(); + com.google.cloud.documentai.v1beta3.Document.TextAnchor.TextSegmentOrBuilder + getTextSegmentsOrBuilder(int index); /** * * *
-     * The history of this annotation.
-     * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4; - */ - java.util.List getProvenanceList(); - /** - * - * - *
-     * The history of this annotation.
+     * Contains the content of the text span so that users do
+     * not have to look it up in the text_segments.
      * 
* - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4; - */ - com.google.cloud.documentai.v1beta3.Document.Provenance getProvenance(int index); - /** - * - * - *
-     * The history of this annotation.
-     * 
+ * string content = 2; * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4; + * @return The content. */ - int getProvenanceCount(); + java.lang.String getContent(); /** * * *
-     * The history of this annotation.
+     * Contains the content of the text span so that users do
+     * not have to look it up in the text_segments.
      * 
* - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4; - */ - java.util.List - getProvenanceOrBuilderList(); - /** - * - * - *
-     * The history of this annotation.
-     * 
+ * string content = 2; * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4; + * @return The bytes for content. */ - com.google.cloud.documentai.v1beta3.Document.ProvenanceOrBuilder getProvenanceOrBuilder( - int index); + com.google.protobuf.ByteString getContentBytes(); } /** * * *
-   * A translation of the text segment.
+   * Text reference indexing into the [Document.text][google.cloud.documentai.v1beta3.Document.text].
    * 
* - * Protobuf type {@code google.cloud.documentai.v1beta3.Document.Translation} + * Protobuf type {@code google.cloud.documentai.v1beta3.Document.TextAnchor} */ - public static final class Translation extends com.google.protobuf.GeneratedMessageV3 + public static final class TextAnchor extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.Document.Translation) - TranslationOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.Document.TextAnchor) + TextAnchorOrBuilder { private static final long serialVersionUID = 0L; - // Use Translation.newBuilder() to construct. - private Translation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use TextAnchor.newBuilder() to construct. + private TextAnchor(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private Translation() { - languageCode_ = ""; - translatedText_ = ""; - provenance_ = java.util.Collections.emptyList(); + private TextAnchor() { + textSegments_ = java.util.Collections.emptyList(); + content_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Translation(); + return new TextAnchor(); } @java.lang.Override @@ -41197,7 +41285,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Translation( + private TextAnchor( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -41218,47 +41306,24 @@ private Translation( break; case 10: { - com.google.cloud.documentai.v1beta3.Document.TextAnchor.Builder subBuilder = null; - if (textAnchor_ != null) { - subBuilder = textAnchor_.toBuilder(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + textSegments_ = + new java.util.ArrayList< + com.google.cloud.documentai.v1beta3.Document.TextAnchor.TextSegment>(); + mutable_bitField0_ |= 0x00000001; } - textAnchor_ = + textSegments_.add( input.readMessage( - com.google.cloud.documentai.v1beta3.Document.TextAnchor.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(textAnchor_); - textAnchor_ = subBuilder.buildPartial(); - } - + com.google.cloud.documentai.v1beta3.Document.TextAnchor.TextSegment + .parser(), + extensionRegistry)); break; } case 18: { java.lang.String s = input.readStringRequireUtf8(); - languageCode_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - translatedText_ = s; - break; - } - case 34: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - provenance_ = - new java.util.ArrayList< - com.google.cloud.documentai.v1beta3.Document.Provenance>(); - mutable_bitField0_ |= 0x00000001; - } - provenance_.add( - input.readMessage( - com.google.cloud.documentai.v1beta3.Document.Provenance.parser(), - extensionRegistry)); + content_ = s; break; } default: @@ -41276,7 +41341,7 @@ private Translation( throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) != 0)) { - provenance_ = java.util.Collections.unmodifiableList(provenance_); + textSegments_ = java.util.Collections.unmodifiableList(textSegments_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -41285,1818 +41350,83 @@ private Translation( public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.documentai.v1beta3.DocumentProto - .internal_static_google_cloud_documentai_v1beta3_Document_Translation_descriptor; + .internal_static_google_cloud_documentai_v1beta3_Document_TextAnchor_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.documentai.v1beta3.DocumentProto - .internal_static_google_cloud_documentai_v1beta3_Document_Translation_fieldAccessorTable + .internal_static_google_cloud_documentai_v1beta3_Document_TextAnchor_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1beta3.Document.Translation.class, - com.google.cloud.documentai.v1beta3.Document.Translation.Builder.class); + com.google.cloud.documentai.v1beta3.Document.TextAnchor.class, + com.google.cloud.documentai.v1beta3.Document.TextAnchor.Builder.class); } - public static final int TEXT_ANCHOR_FIELD_NUMBER = 1; - private com.google.cloud.documentai.v1beta3.Document.TextAnchor textAnchor_; - /** - * - * - *
-     * Provenance of the translation.
-     * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta3.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.v1beta3.Document.TextAnchor text_anchor = 1; - * - * @return Whether the textAnchor field is set. - */ - @java.lang.Override - public boolean hasTextAnchor() { - return textAnchor_ != null; - } - /** - * - * - *
-     * Provenance of the translation.
-     * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta3.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.v1beta3.Document.TextAnchor text_anchor = 1; - * - * @return The textAnchor. - */ - @java.lang.Override - public com.google.cloud.documentai.v1beta3.Document.TextAnchor getTextAnchor() { - return textAnchor_ == null - ? com.google.cloud.documentai.v1beta3.Document.TextAnchor.getDefaultInstance() - : textAnchor_; - } - /** - * - * - *
-     * Provenance of the translation.
-     * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta3.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.v1beta3.Document.TextAnchor text_anchor = 1; - */ - @java.lang.Override - public com.google.cloud.documentai.v1beta3.Document.TextAnchorOrBuilder - getTextAnchorOrBuilder() { - return getTextAnchor(); - } + public interface TextSegmentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.Document.TextAnchor.TextSegment) + com.google.protobuf.MessageOrBuilder { - public static final int LANGUAGE_CODE_FIELD_NUMBER = 2; - 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.
-     * 
- * - * string language_code = 2; - * - * @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; - } + /** + * + * + *
+       * [TextSegment][google.cloud.documentai.v1beta3.Document.TextAnchor.TextSegment] start UTF-8 char index in the [Document.text][google.cloud.documentai.v1beta3.Document.text].
+       * 
+ * + * int64 start_index = 1; + * + * @return The startIndex. + */ + long getStartIndex(); + + /** + * + * + *
+       * [TextSegment][google.cloud.documentai.v1beta3.Document.TextAnchor.TextSegment] half open end UTF-8 char index in the
+       * [Document.text][google.cloud.documentai.v1beta3.Document.text].
+       * 
+ * + * int64 end_index = 2; + * + * @return The endIndex. + */ + long getEndIndex(); } /** * * *
-     * 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.
+     * A text segment in the [Document.text][google.cloud.documentai.v1beta3.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.v1beta3.Document.ShardInfo.text_offset]
      * 
* - * string language_code = 2; - * - * @return The bytes for languageCode. + * Protobuf type {@code google.cloud.documentai.v1beta3.Document.TextAnchor.TextSegment} */ - @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 class TextSegment extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.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); } - } - public static final int TRANSLATED_TEXT_FIELD_NUMBER = 3; - private volatile java.lang.Object translatedText_; - /** - * - * - *
-     * Text translated into the target language.
-     * 
- * - * string translated_text = 3; - * - * @return The translatedText. - */ - @java.lang.Override - public java.lang.String getTranslatedText() { - java.lang.Object ref = translatedText_; - 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(); - translatedText_ = s; - return s; + private TextSegment() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TextSegment(); } - } - /** - * - * - *
-     * Text translated into the target language.
-     * 
- * - * string translated_text = 3; - * - * @return The bytes for translatedText. - */ - @java.lang.Override - public com.google.protobuf.ByteString getTranslatedTextBytes() { - java.lang.Object ref = translatedText_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - translatedText_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PROVENANCE_FIELD_NUMBER = 4; - private java.util.List provenance_; - /** - * - * - *
-     * The history of this annotation.
-     * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4; - */ - @java.lang.Override - public java.util.List - getProvenanceList() { - return provenance_; - } - /** - * - * - *
-     * The history of this annotation.
-     * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4; - */ - @java.lang.Override - public java.util.List< - ? extends com.google.cloud.documentai.v1beta3.Document.ProvenanceOrBuilder> - getProvenanceOrBuilderList() { - return provenance_; - } - /** - * - * - *
-     * The history of this annotation.
-     * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4; - */ - @java.lang.Override - public int getProvenanceCount() { - return provenance_.size(); - } - /** - * - * - *
-     * The history of this annotation.
-     * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4; - */ - @java.lang.Override - public com.google.cloud.documentai.v1beta3.Document.Provenance getProvenance(int index) { - return provenance_.get(index); - } - /** - * - * - *
-     * The history of this annotation.
-     * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4; - */ - @java.lang.Override - public com.google.cloud.documentai.v1beta3.Document.ProvenanceOrBuilder getProvenanceOrBuilder( - int index) { - return provenance_.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 (textAnchor_ != null) { - output.writeMessage(1, getTextAnchor()); - } - if (!getLanguageCodeBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageCode_); - } - if (!getTranslatedTextBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, translatedText_); - } - for (int i = 0; i < provenance_.size(); i++) { - output.writeMessage(4, provenance_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (textAnchor_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTextAnchor()); - } - if (!getLanguageCodeBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, languageCode_); - } - if (!getTranslatedTextBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, translatedText_); - } - for (int i = 0; i < provenance_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, provenance_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.documentai.v1beta3.Document.Translation)) { - return super.equals(obj); - } - com.google.cloud.documentai.v1beta3.Document.Translation other = - (com.google.cloud.documentai.v1beta3.Document.Translation) obj; - - if (hasTextAnchor() != other.hasTextAnchor()) return false; - if (hasTextAnchor()) { - if (!getTextAnchor().equals(other.getTextAnchor())) return false; - } - if (!getLanguageCode().equals(other.getLanguageCode())) return false; - if (!getTranslatedText().equals(other.getTranslatedText())) return false; - if (!getProvenanceList().equals(other.getProvenanceList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasTextAnchor()) { - hash = (37 * hash) + TEXT_ANCHOR_FIELD_NUMBER; - hash = (53 * hash) + getTextAnchor().hashCode(); - } - hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; - hash = (53 * hash) + getLanguageCode().hashCode(); - hash = (37 * hash) + TRANSLATED_TEXT_FIELD_NUMBER; - hash = (53 * hash) + getTranslatedText().hashCode(); - if (getProvenanceCount() > 0) { - hash = (37 * hash) + PROVENANCE_FIELD_NUMBER; - hash = (53 * hash) + getProvenanceList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.documentai.v1beta3.Document.Translation parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.documentai.v1beta3.Document.Translation parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.documentai.v1beta3.Document.Translation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.documentai.v1beta3.Document.Translation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.documentai.v1beta3.Document.Translation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.documentai.v1beta3.Document.Translation parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.documentai.v1beta3.Document.Translation parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.documentai.v1beta3.Document.Translation parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.documentai.v1beta3.Document.Translation parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.documentai.v1beta3.Document.Translation parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.documentai.v1beta3.Document.Translation parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.documentai.v1beta3.Document.Translation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.documentai.v1beta3.Document.Translation 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 translation of the text segment.
-     * 
- * - * Protobuf type {@code google.cloud.documentai.v1beta3.Document.Translation} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.Document.Translation) - com.google.cloud.documentai.v1beta3.Document.TranslationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.documentai.v1beta3.DocumentProto - .internal_static_google_cloud_documentai_v1beta3_Document_Translation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.documentai.v1beta3.DocumentProto - .internal_static_google_cloud_documentai_v1beta3_Document_Translation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1beta3.Document.Translation.class, - com.google.cloud.documentai.v1beta3.Document.Translation.Builder.class); - } - - // Construct using com.google.cloud.documentai.v1beta3.Document.Translation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getProvenanceFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (textAnchorBuilder_ == null) { - textAnchor_ = null; - } else { - textAnchor_ = null; - textAnchorBuilder_ = null; - } - languageCode_ = ""; - - translatedText_ = ""; - - if (provenanceBuilder_ == null) { - provenance_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - provenanceBuilder_.clear(); - } - 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_Document_Translation_descriptor; - } - - @java.lang.Override - public com.google.cloud.documentai.v1beta3.Document.Translation getDefaultInstanceForType() { - return com.google.cloud.documentai.v1beta3.Document.Translation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.documentai.v1beta3.Document.Translation build() { - com.google.cloud.documentai.v1beta3.Document.Translation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.documentai.v1beta3.Document.Translation buildPartial() { - com.google.cloud.documentai.v1beta3.Document.Translation result = - new com.google.cloud.documentai.v1beta3.Document.Translation(this); - int from_bitField0_ = bitField0_; - if (textAnchorBuilder_ == null) { - result.textAnchor_ = textAnchor_; - } else { - result.textAnchor_ = textAnchorBuilder_.build(); - } - result.languageCode_ = languageCode_; - result.translatedText_ = translatedText_; - if (provenanceBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - provenance_ = java.util.Collections.unmodifiableList(provenance_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.provenance_ = provenance_; - } else { - result.provenance_ = provenanceBuilder_.build(); - } - 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.Document.Translation) { - return mergeFrom((com.google.cloud.documentai.v1beta3.Document.Translation) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.documentai.v1beta3.Document.Translation other) { - if (other == com.google.cloud.documentai.v1beta3.Document.Translation.getDefaultInstance()) - return this; - if (other.hasTextAnchor()) { - mergeTextAnchor(other.getTextAnchor()); - } - if (!other.getLanguageCode().isEmpty()) { - languageCode_ = other.languageCode_; - onChanged(); - } - if (!other.getTranslatedText().isEmpty()) { - translatedText_ = other.translatedText_; - onChanged(); - } - if (provenanceBuilder_ == null) { - if (!other.provenance_.isEmpty()) { - if (provenance_.isEmpty()) { - provenance_ = other.provenance_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureProvenanceIsMutable(); - provenance_.addAll(other.provenance_); - } - onChanged(); - } - } else { - if (!other.provenance_.isEmpty()) { - if (provenanceBuilder_.isEmpty()) { - provenanceBuilder_.dispose(); - provenanceBuilder_ = null; - provenance_ = other.provenance_; - bitField0_ = (bitField0_ & ~0x00000001); - provenanceBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getProvenanceFieldBuilder() - : null; - } else { - provenanceBuilder_.addAllMessages(other.provenance_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.documentai.v1beta3.Document.Translation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.documentai.v1beta3.Document.Translation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private com.google.cloud.documentai.v1beta3.Document.TextAnchor textAnchor_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.documentai.v1beta3.Document.TextAnchor, - com.google.cloud.documentai.v1beta3.Document.TextAnchor.Builder, - com.google.cloud.documentai.v1beta3.Document.TextAnchorOrBuilder> - textAnchorBuilder_; - /** - * - * - *
-       * Provenance of the translation.
-       * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta3.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.v1beta3.Document.TextAnchor text_anchor = 1; - * - * @return Whether the textAnchor field is set. - */ - public boolean hasTextAnchor() { - return textAnchorBuilder_ != null || textAnchor_ != null; - } - /** - * - * - *
-       * Provenance of the translation.
-       * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta3.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.v1beta3.Document.TextAnchor text_anchor = 1; - * - * @return The textAnchor. - */ - public com.google.cloud.documentai.v1beta3.Document.TextAnchor getTextAnchor() { - if (textAnchorBuilder_ == null) { - return textAnchor_ == null - ? com.google.cloud.documentai.v1beta3.Document.TextAnchor.getDefaultInstance() - : textAnchor_; - } else { - return textAnchorBuilder_.getMessage(); - } - } - /** - * - * - *
-       * Provenance of the translation.
-       * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta3.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.v1beta3.Document.TextAnchor text_anchor = 1; - */ - public Builder setTextAnchor(com.google.cloud.documentai.v1beta3.Document.TextAnchor value) { - if (textAnchorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - textAnchor_ = value; - onChanged(); - } else { - textAnchorBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-       * Provenance of the translation.
-       * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta3.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.v1beta3.Document.TextAnchor text_anchor = 1; - */ - public Builder setTextAnchor( - com.google.cloud.documentai.v1beta3.Document.TextAnchor.Builder builderForValue) { - if (textAnchorBuilder_ == null) { - textAnchor_ = builderForValue.build(); - onChanged(); - } else { - textAnchorBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-       * Provenance of the translation.
-       * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta3.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.v1beta3.Document.TextAnchor text_anchor = 1; - */ - public Builder mergeTextAnchor( - com.google.cloud.documentai.v1beta3.Document.TextAnchor value) { - if (textAnchorBuilder_ == null) { - if (textAnchor_ != null) { - textAnchor_ = - com.google.cloud.documentai.v1beta3.Document.TextAnchor.newBuilder(textAnchor_) - .mergeFrom(value) - .buildPartial(); - } else { - textAnchor_ = value; - } - onChanged(); - } else { - textAnchorBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-       * Provenance of the translation.
-       * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta3.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.v1beta3.Document.TextAnchor text_anchor = 1; - */ - public Builder clearTextAnchor() { - if (textAnchorBuilder_ == null) { - textAnchor_ = null; - onChanged(); - } else { - textAnchor_ = null; - textAnchorBuilder_ = null; - } - - return this; - } - /** - * - * - *
-       * Provenance of the translation.
-       * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta3.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.v1beta3.Document.TextAnchor text_anchor = 1; - */ - public com.google.cloud.documentai.v1beta3.Document.TextAnchor.Builder - getTextAnchorBuilder() { - - onChanged(); - return getTextAnchorFieldBuilder().getBuilder(); - } - /** - * - * - *
-       * Provenance of the translation.
-       * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta3.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.v1beta3.Document.TextAnchor text_anchor = 1; - */ - public com.google.cloud.documentai.v1beta3.Document.TextAnchorOrBuilder - getTextAnchorOrBuilder() { - if (textAnchorBuilder_ != null) { - return textAnchorBuilder_.getMessageOrBuilder(); - } else { - return textAnchor_ == null - ? com.google.cloud.documentai.v1beta3.Document.TextAnchor.getDefaultInstance() - : textAnchor_; - } - } - /** - * - * - *
-       * Provenance of the translation.
-       * Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta3.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.v1beta3.Document.TextAnchor text_anchor = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.documentai.v1beta3.Document.TextAnchor, - com.google.cloud.documentai.v1beta3.Document.TextAnchor.Builder, - com.google.cloud.documentai.v1beta3.Document.TextAnchorOrBuilder> - getTextAnchorFieldBuilder() { - if (textAnchorBuilder_ == null) { - textAnchorBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.documentai.v1beta3.Document.TextAnchor, - com.google.cloud.documentai.v1beta3.Document.TextAnchor.Builder, - com.google.cloud.documentai.v1beta3.Document.TextAnchorOrBuilder>( - getTextAnchor(), getParentForChildren(), isClean()); - textAnchor_ = null; - } - return textAnchorBuilder_; - } - - private 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 = 2; - * - * @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 = 2; - * - * @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 = 2; - * - * @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; - onChanged(); - 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.
-       * 
- * - * string language_code = 2; - * - * @return This builder for chaining. - */ - public Builder clearLanguageCode() { - - languageCode_ = getDefaultInstance().getLanguageCode(); - onChanged(); - 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.
-       * 
- * - * string language_code = 2; - * - * @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; - onChanged(); - return this; - } - - private java.lang.Object translatedText_ = ""; - /** - * - * - *
-       * Text translated into the target language.
-       * 
- * - * string translated_text = 3; - * - * @return The translatedText. - */ - public java.lang.String getTranslatedText() { - java.lang.Object ref = translatedText_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - translatedText_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * Text translated into the target language.
-       * 
- * - * string translated_text = 3; - * - * @return The bytes for translatedText. - */ - public com.google.protobuf.ByteString getTranslatedTextBytes() { - java.lang.Object ref = translatedText_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - translatedText_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * Text translated into the target language.
-       * 
- * - * string translated_text = 3; - * - * @param value The translatedText to set. - * @return This builder for chaining. - */ - public Builder setTranslatedText(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - translatedText_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Text translated into the target language.
-       * 
- * - * string translated_text = 3; - * - * @return This builder for chaining. - */ - public Builder clearTranslatedText() { - - translatedText_ = getDefaultInstance().getTranslatedText(); - onChanged(); - return this; - } - /** - * - * - *
-       * Text translated into the target language.
-       * 
- * - * string translated_text = 3; - * - * @param value The bytes for translatedText to set. - * @return This builder for chaining. - */ - public Builder setTranslatedTextBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - translatedText_ = value; - onChanged(); - return this; - } - - private java.util.List provenance_ = - java.util.Collections.emptyList(); - - private void ensureProvenanceIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - provenance_ = - new java.util.ArrayList( - provenance_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta3.Document.Provenance, - com.google.cloud.documentai.v1beta3.Document.Provenance.Builder, - com.google.cloud.documentai.v1beta3.Document.ProvenanceOrBuilder> - provenanceBuilder_; - - /** - * - * - *
-       * The history of this annotation.
-       * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4; - */ - public java.util.List - getProvenanceList() { - if (provenanceBuilder_ == null) { - return java.util.Collections.unmodifiableList(provenance_); - } else { - return provenanceBuilder_.getMessageList(); - } - } - /** - * - * - *
-       * The history of this annotation.
-       * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4; - */ - public int getProvenanceCount() { - if (provenanceBuilder_ == null) { - return provenance_.size(); - } else { - return provenanceBuilder_.getCount(); - } - } - /** - * - * - *
-       * The history of this annotation.
-       * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4; - */ - public com.google.cloud.documentai.v1beta3.Document.Provenance getProvenance(int index) { - if (provenanceBuilder_ == null) { - return provenance_.get(index); - } else { - return provenanceBuilder_.getMessage(index); - } - } - /** - * - * - *
-       * The history of this annotation.
-       * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4; - */ - public Builder setProvenance( - int index, com.google.cloud.documentai.v1beta3.Document.Provenance value) { - if (provenanceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProvenanceIsMutable(); - provenance_.set(index, value); - onChanged(); - } else { - provenanceBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-       * The history of this annotation.
-       * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4; - */ - public Builder setProvenance( - int index, - com.google.cloud.documentai.v1beta3.Document.Provenance.Builder builderForValue) { - if (provenanceBuilder_ == null) { - ensureProvenanceIsMutable(); - provenance_.set(index, builderForValue.build()); - onChanged(); - } else { - provenanceBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-       * The history of this annotation.
-       * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4; - */ - public Builder addProvenance(com.google.cloud.documentai.v1beta3.Document.Provenance value) { - if (provenanceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProvenanceIsMutable(); - provenance_.add(value); - onChanged(); - } else { - provenanceBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-       * The history of this annotation.
-       * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4; - */ - public Builder addProvenance( - int index, com.google.cloud.documentai.v1beta3.Document.Provenance value) { - if (provenanceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProvenanceIsMutable(); - provenance_.add(index, value); - onChanged(); - } else { - provenanceBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-       * The history of this annotation.
-       * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4; - */ - public Builder addProvenance( - com.google.cloud.documentai.v1beta3.Document.Provenance.Builder builderForValue) { - if (provenanceBuilder_ == null) { - ensureProvenanceIsMutable(); - provenance_.add(builderForValue.build()); - onChanged(); - } else { - provenanceBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-       * The history of this annotation.
-       * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4; - */ - public Builder addProvenance( - int index, - com.google.cloud.documentai.v1beta3.Document.Provenance.Builder builderForValue) { - if (provenanceBuilder_ == null) { - ensureProvenanceIsMutable(); - provenance_.add(index, builderForValue.build()); - onChanged(); - } else { - provenanceBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-       * The history of this annotation.
-       * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4; - */ - public Builder addAllProvenance( - java.lang.Iterable - values) { - if (provenanceBuilder_ == null) { - ensureProvenanceIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, provenance_); - onChanged(); - } else { - provenanceBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-       * The history of this annotation.
-       * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4; - */ - public Builder clearProvenance() { - if (provenanceBuilder_ == null) { - provenance_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - provenanceBuilder_.clear(); - } - return this; - } - /** - * - * - *
-       * The history of this annotation.
-       * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4; - */ - public Builder removeProvenance(int index) { - if (provenanceBuilder_ == null) { - ensureProvenanceIsMutable(); - provenance_.remove(index); - onChanged(); - } else { - provenanceBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-       * The history of this annotation.
-       * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4; - */ - public com.google.cloud.documentai.v1beta3.Document.Provenance.Builder getProvenanceBuilder( - int index) { - return getProvenanceFieldBuilder().getBuilder(index); - } - /** - * - * - *
-       * The history of this annotation.
-       * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4; - */ - public com.google.cloud.documentai.v1beta3.Document.ProvenanceOrBuilder - getProvenanceOrBuilder(int index) { - if (provenanceBuilder_ == null) { - return provenance_.get(index); - } else { - return provenanceBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-       * The history of this annotation.
-       * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4; - */ - public java.util.List< - ? extends com.google.cloud.documentai.v1beta3.Document.ProvenanceOrBuilder> - getProvenanceOrBuilderList() { - if (provenanceBuilder_ != null) { - return provenanceBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(provenance_); - } - } - /** - * - * - *
-       * The history of this annotation.
-       * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4; - */ - public com.google.cloud.documentai.v1beta3.Document.Provenance.Builder - addProvenanceBuilder() { - return getProvenanceFieldBuilder() - .addBuilder( - com.google.cloud.documentai.v1beta3.Document.Provenance.getDefaultInstance()); - } - /** - * - * - *
-       * The history of this annotation.
-       * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4; - */ - public com.google.cloud.documentai.v1beta3.Document.Provenance.Builder addProvenanceBuilder( - int index) { - return getProvenanceFieldBuilder() - .addBuilder( - index, - com.google.cloud.documentai.v1beta3.Document.Provenance.getDefaultInstance()); - } - /** - * - * - *
-       * The history of this annotation.
-       * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4; - */ - public java.util.List - getProvenanceBuilderList() { - return getProvenanceFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta3.Document.Provenance, - com.google.cloud.documentai.v1beta3.Document.Provenance.Builder, - com.google.cloud.documentai.v1beta3.Document.ProvenanceOrBuilder> - getProvenanceFieldBuilder() { - if (provenanceBuilder_ == null) { - provenanceBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta3.Document.Provenance, - com.google.cloud.documentai.v1beta3.Document.Provenance.Builder, - com.google.cloud.documentai.v1beta3.Document.ProvenanceOrBuilder>( - provenance_, ((bitField0_ & 0x00000001) != 0), 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.v1beta3.Document.Translation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.Document.Translation) - private static final com.google.cloud.documentai.v1beta3.Document.Translation DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta3.Document.Translation(); - } - - public static com.google.cloud.documentai.v1beta3.Document.Translation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Translation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Translation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.documentai.v1beta3.Document.Translation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface TextAnchorOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.Document.TextAnchor) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * The text segments from the [Document.text][google.cloud.documentai.v1beta3.Document.text].
-     * 
- * - * - * repeated .google.cloud.documentai.v1beta3.Document.TextAnchor.TextSegment text_segments = 1; - * - */ - java.util.List - getTextSegmentsList(); - /** - * - * - *
-     * The text segments from the [Document.text][google.cloud.documentai.v1beta3.Document.text].
-     * 
- * - * - * repeated .google.cloud.documentai.v1beta3.Document.TextAnchor.TextSegment text_segments = 1; - * - */ - com.google.cloud.documentai.v1beta3.Document.TextAnchor.TextSegment getTextSegments(int index); - /** - * - * - *
-     * The text segments from the [Document.text][google.cloud.documentai.v1beta3.Document.text].
-     * 
- * - * - * repeated .google.cloud.documentai.v1beta3.Document.TextAnchor.TextSegment text_segments = 1; - * - */ - int getTextSegmentsCount(); - /** - * - * - *
-     * The text segments from the [Document.text][google.cloud.documentai.v1beta3.Document.text].
-     * 
- * - * - * repeated .google.cloud.documentai.v1beta3.Document.TextAnchor.TextSegment text_segments = 1; - * - */ - java.util.List< - ? extends com.google.cloud.documentai.v1beta3.Document.TextAnchor.TextSegmentOrBuilder> - getTextSegmentsOrBuilderList(); - /** - * - * - *
-     * The text segments from the [Document.text][google.cloud.documentai.v1beta3.Document.text].
-     * 
- * - * - * repeated .google.cloud.documentai.v1beta3.Document.TextAnchor.TextSegment text_segments = 1; - * - */ - com.google.cloud.documentai.v1beta3.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.
-     * 
- * - * 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.
-     * 
- * - * string content = 2; - * - * @return The bytes for content. - */ - com.google.protobuf.ByteString getContentBytes(); - } - /** - * - * - *
-   * Text reference indexing into the [Document.text][google.cloud.documentai.v1beta3.Document.text].
-   * 
- * - * Protobuf type {@code google.cloud.documentai.v1beta3.Document.TextAnchor} - */ - public static final class TextAnchor extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.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(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private TextAnchor( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - textSegments_ = - new java.util.ArrayList< - com.google.cloud.documentai.v1beta3.Document.TextAnchor.TextSegment>(); - mutable_bitField0_ |= 0x00000001; - } - textSegments_.add( - input.readMessage( - com.google.cloud.documentai.v1beta3.Document.TextAnchor.TextSegment - .parser(), - extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - content_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - textSegments_ = java.util.Collections.unmodifiableList(textSegments_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.documentai.v1beta3.DocumentProto - .internal_static_google_cloud_documentai_v1beta3_Document_TextAnchor_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.documentai.v1beta3.DocumentProto - .internal_static_google_cloud_documentai_v1beta3_Document_TextAnchor_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1beta3.Document.TextAnchor.class, - com.google.cloud.documentai.v1beta3.Document.TextAnchor.Builder.class); - } - - public interface TextSegmentOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.Document.TextAnchor.TextSegment) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-       * [TextSegment][google.cloud.documentai.v1beta3.Document.TextAnchor.TextSegment] start UTF-8 char index in the [Document.text][google.cloud.documentai.v1beta3.Document.text].
-       * 
- * - * int64 start_index = 1; - * - * @return The startIndex. - */ - long getStartIndex(); - - /** - * - * - *
-       * [TextSegment][google.cloud.documentai.v1beta3.Document.TextAnchor.TextSegment] half open end UTF-8 char index in the
-       * [Document.text][google.cloud.documentai.v1beta3.Document.text].
-       * 
- * - * int64 end_index = 2; - * - * @return The endIndex. - */ - long getEndIndex(); - } - /** - * - * - *
-     * A text segment in the [Document.text][google.cloud.documentai.v1beta3.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.v1beta3.Document.ShardInfo.text_offset]
-     * 
- * - * Protobuf type {@code google.cloud.documentai.v1beta3.Document.TextAnchor.TextSegment} - */ - public static final class TextSegment extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.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(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; } private TextSegment( @@ -44988,7 +43318,8 @@ public interface PageRefOrBuilder * * *
-       * Required. Index into the [Document.pages][google.cloud.documentai.v1beta3.Document.pages] element
+       * Required. Index into the [Document.pages][google.cloud.documentai.v1beta3.Document.pages] element, for example using
+       * [Document.pages][page_refs.page] to locate the related page element.
        * 
* * int64 page = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -45497,7 +43828,8 @@ private LayoutType(int value) { * * *
-       * Required. Index into the [Document.pages][google.cloud.documentai.v1beta3.Document.pages] element
+       * Required. Index into the [Document.pages][google.cloud.documentai.v1beta3.Document.pages] element, for example using
+       * [Document.pages][page_refs.page] to locate the related page element.
        * 
* * int64 page = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -46062,7 +44394,8 @@ public Builder mergeFrom( * * *
-         * Required. Index into the [Document.pages][google.cloud.documentai.v1beta3.Document.pages] element
+         * Required. Index into the [Document.pages][google.cloud.documentai.v1beta3.Document.pages] element, for example using
+         * [Document.pages][page_refs.page] to locate the related page element.
          * 
* * int64 page = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -46077,7 +44410,8 @@ public long getPage() { * * *
-         * Required. Index into the [Document.pages][google.cloud.documentai.v1beta3.Document.pages] element
+         * Required. Index into the [Document.pages][google.cloud.documentai.v1beta3.Document.pages] element, for example using
+         * [Document.pages][page_refs.page] to locate the related page element.
          * 
* * int64 page = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -46095,7 +44429,8 @@ public Builder setPage(long value) { * * *
-         * Required. Index into the [Document.pages][google.cloud.documentai.v1beta3.Document.pages] element
+         * Required. Index into the [Document.pages][google.cloud.documentai.v1beta3.Document.pages] element, for example using
+         * [Document.pages][page_refs.page] to locate the related page element.
          * 
* * int64 page = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -49832,6 +48167,19 @@ public interface RevisionOrBuilder // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.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(); /** * * @@ -49859,6 +48207,19 @@ public interface RevisionOrBuilder */ 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(); /** * * @@ -51123,6 +49484,21 @@ public SourceCase getSourceCase() { } 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; + } /** * * @@ -51181,6 +49557,21 @@ public com.google.protobuf.ByteString getAgentBytes() { } 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; + } /** * * @@ -51940,6 +50331,22 @@ public Builder clearSource() { private int bitField0_; + /** + * + * + *
+       * 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; + } /** * * @@ -52064,6 +50471,22 @@ public Builder setAgentBytes(com.google.protobuf.ByteString value) { return this; } + /** + * + * + *
+       * If the annotation was made by processor identify the processor by its
+       * resource name.
+       * 
+ * + * string processor = 5; + * + * @return Whether the processor field is set. + */ + @java.lang.Override + public boolean hasProcessor() { + return sourceCase_ == 5; + } /** * * @@ -54521,6 +52944,24 @@ public SourceCase getSourceCase() { } public static final int URI_FIELD_NUMBER = 1; + /** + * + * + *
+   * 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; + * + * @return Whether the uri field is set. + */ + public boolean hasUri() { + return sourceCase_ == 1; + } /** * * @@ -54585,6 +53026,23 @@ public com.google.protobuf.ByteString getUriBytes() { } public static final int CONTENT_FIELD_NUMBER = 2; + /** + * + * + *
+   * 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; + * + * @return Whether the content field is set. + */ + @java.lang.Override + public boolean hasContent() { + return sourceCase_ == 2; + } /** * * @@ -55000,82 +53458,6 @@ public com.google.cloud.documentai.v1beta3.Document.EntityRelation getEntityRela return entityRelations_.get(index); } - public static final int TRANSLATIONS_FIELD_NUMBER = 12; - private java.util.List translations_; - /** - * - * - *
-   * A list of translations on [Document.text][google.cloud.documentai.v1beta3.Document.text]. For document shards,
-   * translations in this list may cross shard boundaries.
-   * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Translation translations = 12; - */ - @java.lang.Override - public java.util.List - getTranslationsList() { - return translations_; - } - /** - * - * - *
-   * A list of translations on [Document.text][google.cloud.documentai.v1beta3.Document.text]. For document shards,
-   * translations in this list may cross shard boundaries.
-   * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Translation translations = 12; - */ - @java.lang.Override - public java.util.List - getTranslationsOrBuilderList() { - return translations_; - } - /** - * - * - *
-   * A list of translations on [Document.text][google.cloud.documentai.v1beta3.Document.text]. For document shards,
-   * translations in this list may cross shard boundaries.
-   * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Translation translations = 12; - */ - @java.lang.Override - public int getTranslationsCount() { - return translations_.size(); - } - /** - * - * - *
-   * A list of translations on [Document.text][google.cloud.documentai.v1beta3.Document.text]. For document shards,
-   * translations in this list may cross shard boundaries.
-   * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Translation translations = 12; - */ - @java.lang.Override - public com.google.cloud.documentai.v1beta3.Document.Translation getTranslations(int index) { - return translations_.get(index); - } - /** - * - * - *
-   * A list of translations on [Document.text][google.cloud.documentai.v1beta3.Document.text]. For document shards,
-   * translations in this list may cross shard boundaries.
-   * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Translation translations = 12; - */ - @java.lang.Override - public com.google.cloud.documentai.v1beta3.Document.TranslationOrBuilder getTranslationsOrBuilder( - int index) { - return translations_.get(index); - } - public static final int TEXT_CHANGES_FIELD_NUMBER = 14; private java.util.List textChanges_; /** @@ -55368,9 +53750,6 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (error_ != null) { output.writeMessage(10, getError()); } - for (int i = 0; i < translations_.size(); i++) { - output.writeMessage(12, translations_.get(i)); - } for (int i = 0; i < revisions_.size(); i++) { output.writeMessage(13, revisions_.get(i)); } @@ -55418,9 +53797,6 @@ public int getSerializedSize() { if (error_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getError()); } - for (int i = 0; i < translations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, translations_.get(i)); - } for (int i = 0; i < revisions_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, revisions_.get(i)); } @@ -55449,7 +53825,6 @@ 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 (!getTranslationsList().equals(other.getTranslationsList())) return false; if (!getTextChangesList().equals(other.getTextChangesList())) return false; if (hasShardInfo() != other.hasShardInfo()) return false; if (hasShardInfo()) { @@ -55502,10 +53877,6 @@ public int hashCode() { hash = (37 * hash) + ENTITY_RELATIONS_FIELD_NUMBER; hash = (53 * hash) + getEntityRelationsList().hashCode(); } - if (getTranslationsCount() > 0) { - hash = (37 * hash) + TRANSLATIONS_FIELD_NUMBER; - hash = (53 * hash) + getTranslationsList().hashCode(); - } if (getTextChangesCount() > 0) { hash = (37 * hash) + TEXT_CHANGES_FIELD_NUMBER; hash = (53 * hash) + getTextChangesList().hashCode(); @@ -55682,7 +54053,6 @@ private void maybeForceBuilderInitialization() { getPagesFieldBuilder(); getEntitiesFieldBuilder(); getEntityRelationsFieldBuilder(); - getTranslationsFieldBuilder(); getTextChangesFieldBuilder(); getRevisionsFieldBuilder(); } @@ -55719,15 +54089,9 @@ public Builder clear() { } else { entityRelationsBuilder_.clear(); } - if (translationsBuilder_ == null) { - translations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - } else { - translationsBuilder_.clear(); - } if (textChangesBuilder_ == null) { textChanges_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000010); } else { textChangesBuilder_.clear(); } @@ -55745,7 +54109,7 @@ public Builder clear() { } if (revisionsBuilder_ == null) { revisions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000020); } else { revisionsBuilder_.clear(); } @@ -55823,19 +54187,10 @@ public com.google.cloud.documentai.v1beta3.Document buildPartial() { } else { result.entityRelations_ = entityRelationsBuilder_.build(); } - if (translationsBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0)) { - translations_ = java.util.Collections.unmodifiableList(translations_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.translations_ = translations_; - } else { - result.translations_ = translationsBuilder_.build(); - } if (textChangesBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0)) { + if (((bitField0_ & 0x00000010) != 0)) { textChanges_ = java.util.Collections.unmodifiableList(textChanges_); - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000010); } result.textChanges_ = textChanges_; } else { @@ -55852,9 +54207,9 @@ public com.google.cloud.documentai.v1beta3.Document buildPartial() { result.error_ = errorBuilder_.build(); } if (revisionsBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0)) { + if (((bitField0_ & 0x00000020) != 0)) { revisions_ = java.util.Collections.unmodifiableList(revisions_); - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000020); } result.revisions_ = revisions_; } else { @@ -56026,38 +54381,11 @@ public Builder mergeFrom(com.google.cloud.documentai.v1beta3.Document other) { } } } - if (translationsBuilder_ == null) { - if (!other.translations_.isEmpty()) { - if (translations_.isEmpty()) { - translations_ = other.translations_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureTranslationsIsMutable(); - translations_.addAll(other.translations_); - } - onChanged(); - } - } else { - if (!other.translations_.isEmpty()) { - if (translationsBuilder_.isEmpty()) { - translationsBuilder_.dispose(); - translationsBuilder_ = null; - translations_ = other.translations_; - bitField0_ = (bitField0_ & ~0x00000010); - translationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getTranslationsFieldBuilder() - : null; - } else { - translationsBuilder_.addAllMessages(other.translations_); - } - } - } if (textChangesBuilder_ == null) { if (!other.textChanges_.isEmpty()) { if (textChanges_.isEmpty()) { textChanges_ = other.textChanges_; - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000010); } else { ensureTextChangesIsMutable(); textChanges_.addAll(other.textChanges_); @@ -56070,7 +54398,7 @@ public Builder mergeFrom(com.google.cloud.documentai.v1beta3.Document other) { textChangesBuilder_.dispose(); textChangesBuilder_ = null; textChanges_ = other.textChanges_; - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000010); textChangesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getTextChangesFieldBuilder() @@ -56090,7 +54418,7 @@ public Builder mergeFrom(com.google.cloud.documentai.v1beta3.Document other) { if (!other.revisions_.isEmpty()) { if (revisions_.isEmpty()) { revisions_ = other.revisions_; - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000020); } else { ensureRevisionsIsMutable(); revisions_.addAll(other.revisions_); @@ -56103,7 +54431,7 @@ public Builder mergeFrom(com.google.cloud.documentai.v1beta3.Document other) { revisionsBuilder_.dispose(); revisionsBuilder_ = null; revisions_ = other.revisions_; - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000020); revisionsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getRevisionsFieldBuilder() @@ -56176,6 +54504,25 @@ public Builder clearSource() { private int bitField0_; + /** + * + * + *
+     * 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; + * + * @return Whether the uri field is set. + */ + @java.lang.Override + public boolean hasUri() { + return sourceCase_ == 1; + } /** * * @@ -56315,6 +54662,22 @@ public Builder setUriBytes(com.google.protobuf.ByteString value) { return this; } + /** + * + * + *
+     * 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; + * + * @return Whether the content field is set. + */ + public boolean hasContent() { + return sourceCase_ == 2; + } /** * * @@ -58074,416 +56437,15 @@ public Builder removeEntityRelations(int index) { return entityRelationsBuilder_; } - private java.util.List translations_ = - java.util.Collections.emptyList(); - - private void ensureTranslationsIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - translations_ = - new java.util.ArrayList( - translations_); - bitField0_ |= 0x00000010; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta3.Document.Translation, - com.google.cloud.documentai.v1beta3.Document.Translation.Builder, - com.google.cloud.documentai.v1beta3.Document.TranslationOrBuilder> - translationsBuilder_; - - /** - * - * - *
-     * A list of translations on [Document.text][google.cloud.documentai.v1beta3.Document.text]. For document shards,
-     * translations in this list may cross shard boundaries.
-     * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Translation translations = 12; - * - */ - public java.util.List - getTranslationsList() { - if (translationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(translations_); - } else { - return translationsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * A list of translations on [Document.text][google.cloud.documentai.v1beta3.Document.text]. For document shards,
-     * translations in this list may cross shard boundaries.
-     * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Translation translations = 12; - * - */ - public int getTranslationsCount() { - if (translationsBuilder_ == null) { - return translations_.size(); - } else { - return translationsBuilder_.getCount(); - } - } - /** - * - * - *
-     * A list of translations on [Document.text][google.cloud.documentai.v1beta3.Document.text]. For document shards,
-     * translations in this list may cross shard boundaries.
-     * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Translation translations = 12; - * - */ - public com.google.cloud.documentai.v1beta3.Document.Translation getTranslations(int index) { - if (translationsBuilder_ == null) { - return translations_.get(index); - } else { - return translationsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * A list of translations on [Document.text][google.cloud.documentai.v1beta3.Document.text]. For document shards,
-     * translations in this list may cross shard boundaries.
-     * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Translation translations = 12; - * - */ - public Builder setTranslations( - int index, com.google.cloud.documentai.v1beta3.Document.Translation value) { - if (translationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTranslationsIsMutable(); - translations_.set(index, value); - onChanged(); - } else { - translationsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * A list of translations on [Document.text][google.cloud.documentai.v1beta3.Document.text]. For document shards,
-     * translations in this list may cross shard boundaries.
-     * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Translation translations = 12; - * - */ - public Builder setTranslations( - int index, - com.google.cloud.documentai.v1beta3.Document.Translation.Builder builderForValue) { - if (translationsBuilder_ == null) { - ensureTranslationsIsMutable(); - translations_.set(index, builderForValue.build()); - onChanged(); - } else { - translationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * A list of translations on [Document.text][google.cloud.documentai.v1beta3.Document.text]. For document shards,
-     * translations in this list may cross shard boundaries.
-     * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Translation translations = 12; - * - */ - public Builder addTranslations(com.google.cloud.documentai.v1beta3.Document.Translation value) { - if (translationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTranslationsIsMutable(); - translations_.add(value); - onChanged(); - } else { - translationsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * A list of translations on [Document.text][google.cloud.documentai.v1beta3.Document.text]. For document shards,
-     * translations in this list may cross shard boundaries.
-     * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Translation translations = 12; - * - */ - public Builder addTranslations( - int index, com.google.cloud.documentai.v1beta3.Document.Translation value) { - if (translationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTranslationsIsMutable(); - translations_.add(index, value); - onChanged(); - } else { - translationsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * A list of translations on [Document.text][google.cloud.documentai.v1beta3.Document.text]. For document shards,
-     * translations in this list may cross shard boundaries.
-     * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Translation translations = 12; - * - */ - public Builder addTranslations( - com.google.cloud.documentai.v1beta3.Document.Translation.Builder builderForValue) { - if (translationsBuilder_ == null) { - ensureTranslationsIsMutable(); - translations_.add(builderForValue.build()); - onChanged(); - } else { - translationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * A list of translations on [Document.text][google.cloud.documentai.v1beta3.Document.text]. For document shards,
-     * translations in this list may cross shard boundaries.
-     * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Translation translations = 12; - * - */ - public Builder addTranslations( - int index, - com.google.cloud.documentai.v1beta3.Document.Translation.Builder builderForValue) { - if (translationsBuilder_ == null) { - ensureTranslationsIsMutable(); - translations_.add(index, builderForValue.build()); - onChanged(); - } else { - translationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * A list of translations on [Document.text][google.cloud.documentai.v1beta3.Document.text]. For document shards,
-     * translations in this list may cross shard boundaries.
-     * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Translation translations = 12; - * - */ - public Builder addAllTranslations( - java.lang.Iterable - values) { - if (translationsBuilder_ == null) { - ensureTranslationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, translations_); - onChanged(); - } else { - translationsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * A list of translations on [Document.text][google.cloud.documentai.v1beta3.Document.text]. For document shards,
-     * translations in this list may cross shard boundaries.
-     * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Translation translations = 12; - * - */ - public Builder clearTranslations() { - if (translationsBuilder_ == null) { - translations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - } else { - translationsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * A list of translations on [Document.text][google.cloud.documentai.v1beta3.Document.text]. For document shards,
-     * translations in this list may cross shard boundaries.
-     * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Translation translations = 12; - * - */ - public Builder removeTranslations(int index) { - if (translationsBuilder_ == null) { - ensureTranslationsIsMutable(); - translations_.remove(index); - onChanged(); - } else { - translationsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * A list of translations on [Document.text][google.cloud.documentai.v1beta3.Document.text]. For document shards,
-     * translations in this list may cross shard boundaries.
-     * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Translation translations = 12; - * - */ - public com.google.cloud.documentai.v1beta3.Document.Translation.Builder getTranslationsBuilder( - int index) { - return getTranslationsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * A list of translations on [Document.text][google.cloud.documentai.v1beta3.Document.text]. For document shards,
-     * translations in this list may cross shard boundaries.
-     * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Translation translations = 12; - * - */ - public com.google.cloud.documentai.v1beta3.Document.TranslationOrBuilder - getTranslationsOrBuilder(int index) { - if (translationsBuilder_ == null) { - return translations_.get(index); - } else { - return translationsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * A list of translations on [Document.text][google.cloud.documentai.v1beta3.Document.text]. For document shards,
-     * translations in this list may cross shard boundaries.
-     * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Translation translations = 12; - * - */ - public java.util.List< - ? extends com.google.cloud.documentai.v1beta3.Document.TranslationOrBuilder> - getTranslationsOrBuilderList() { - if (translationsBuilder_ != null) { - return translationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(translations_); - } - } - /** - * - * - *
-     * A list of translations on [Document.text][google.cloud.documentai.v1beta3.Document.text]. For document shards,
-     * translations in this list may cross shard boundaries.
-     * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Translation translations = 12; - * - */ - public com.google.cloud.documentai.v1beta3.Document.Translation.Builder - addTranslationsBuilder() { - return getTranslationsFieldBuilder() - .addBuilder( - com.google.cloud.documentai.v1beta3.Document.Translation.getDefaultInstance()); - } - /** - * - * - *
-     * A list of translations on [Document.text][google.cloud.documentai.v1beta3.Document.text]. For document shards,
-     * translations in this list may cross shard boundaries.
-     * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Translation translations = 12; - * - */ - public com.google.cloud.documentai.v1beta3.Document.Translation.Builder addTranslationsBuilder( - int index) { - return getTranslationsFieldBuilder() - .addBuilder( - index, com.google.cloud.documentai.v1beta3.Document.Translation.getDefaultInstance()); - } - /** - * - * - *
-     * A list of translations on [Document.text][google.cloud.documentai.v1beta3.Document.text]. For document shards,
-     * translations in this list may cross shard boundaries.
-     * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Translation translations = 12; - * - */ - public java.util.List - getTranslationsBuilderList() { - return getTranslationsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta3.Document.Translation, - com.google.cloud.documentai.v1beta3.Document.Translation.Builder, - com.google.cloud.documentai.v1beta3.Document.TranslationOrBuilder> - getTranslationsFieldBuilder() { - if (translationsBuilder_ == null) { - translationsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.documentai.v1beta3.Document.Translation, - com.google.cloud.documentai.v1beta3.Document.Translation.Builder, - com.google.cloud.documentai.v1beta3.Document.TranslationOrBuilder>( - translations_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); - translations_ = null; - } - return translationsBuilder_; - } - private java.util.List textChanges_ = java.util.Collections.emptyList(); private void ensureTextChangesIsMutable() { - if (!((bitField0_ & 0x00000020) != 0)) { + if (!((bitField0_ & 0x00000010) != 0)) { textChanges_ = new java.util.ArrayList( textChanges_); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000010; } } @@ -58727,7 +56689,7 @@ public Builder addAllTextChanges( public Builder clearTextChanges() { if (textChangesBuilder_ == null) { textChanges_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000010); onChanged(); } else { textChangesBuilder_.clear(); @@ -58868,7 +56830,7 @@ public com.google.cloud.documentai.v1beta3.Document.TextChange.Builder addTextCh com.google.cloud.documentai.v1beta3.Document.TextChange, com.google.cloud.documentai.v1beta3.Document.TextChange.Builder, com.google.cloud.documentai.v1beta3.Document.TextChangeOrBuilder>( - textChanges_, ((bitField0_ & 0x00000020) != 0), getParentForChildren(), isClean()); + textChanges_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); textChanges_ = null; } return textChangesBuilder_; @@ -59246,11 +57208,11 @@ public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { java.util.Collections.emptyList(); private void ensureRevisionsIsMutable() { - if (!((bitField0_ & 0x00000040) != 0)) { + if (!((bitField0_ & 0x00000020) != 0)) { revisions_ = new java.util.ArrayList( revisions_); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000020; } } @@ -59470,7 +57432,7 @@ public Builder addAllRevisions( public Builder clearRevisions() { if (revisionsBuilder_ == null) { revisions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000020); onChanged(); } else { revisionsBuilder_.clear(); @@ -59596,7 +57558,7 @@ public com.google.cloud.documentai.v1beta3.Document.Revision.Builder addRevision com.google.cloud.documentai.v1beta3.Document.Revision, com.google.cloud.documentai.v1beta3.Document.Revision.Builder, com.google.cloud.documentai.v1beta3.Document.RevisionOrBuilder>( - revisions_, ((bitField0_ & 0x00000040) != 0), getParentForChildren(), isClean()); + revisions_, ((bitField0_ & 0x00000020) != 0), getParentForChildren(), isClean()); revisions_ = null; } return revisionsBuilder_; diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentOrBuilder.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentOrBuilder.java index 87959e1a..e7c54a5f 100644 --- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentOrBuilder.java +++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentOrBuilder.java @@ -23,6 +23,22 @@ public interface DocumentOrBuilder // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.Document) com.google.protobuf.MessageOrBuilder { + /** + * + * + *
+   * 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; + * + * @return Whether the uri field is set. + */ + boolean hasUri(); /** * * @@ -56,6 +72,20 @@ public interface DocumentOrBuilder */ com.google.protobuf.ByteString getUriBytes(); + /** + * + * + *
+   * 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; + * + * @return Whether the content field is set. + */ + boolean hasContent(); /** * * @@ -345,64 +375,6 @@ public interface DocumentOrBuilder com.google.cloud.documentai.v1beta3.Document.EntityRelationOrBuilder getEntityRelationsOrBuilder( int index); - /** - * - * - *
-   * A list of translations on [Document.text][google.cloud.documentai.v1beta3.Document.text]. For document shards,
-   * translations in this list may cross shard boundaries.
-   * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Translation translations = 12; - */ - java.util.List getTranslationsList(); - /** - * - * - *
-   * A list of translations on [Document.text][google.cloud.documentai.v1beta3.Document.text]. For document shards,
-   * translations in this list may cross shard boundaries.
-   * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Translation translations = 12; - */ - com.google.cloud.documentai.v1beta3.Document.Translation getTranslations(int index); - /** - * - * - *
-   * A list of translations on [Document.text][google.cloud.documentai.v1beta3.Document.text]. For document shards,
-   * translations in this list may cross shard boundaries.
-   * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Translation translations = 12; - */ - int getTranslationsCount(); - /** - * - * - *
-   * A list of translations on [Document.text][google.cloud.documentai.v1beta3.Document.text]. For document shards,
-   * translations in this list may cross shard boundaries.
-   * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Translation translations = 12; - */ - java.util.List - getTranslationsOrBuilderList(); - /** - * - * - *
-   * A list of translations on [Document.text][google.cloud.documentai.v1beta3.Document.text]. For document shards,
-   * translations in this list may cross shard boundaries.
-   * 
- * - * repeated .google.cloud.documentai.v1beta3.Document.Translation translations = 12; - */ - com.google.cloud.documentai.v1beta3.Document.TranslationOrBuilder getTranslationsOrBuilder( - int index); - /** * * diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProto.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProto.java index af6a0c38..eda9a85d 100644 --- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProto.java +++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProto.java @@ -119,10 +119,6 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_documentai_v1beta3_Document_EntityRelation_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_documentai_v1beta3_Document_EntityRelation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_documentai_v1beta3_Document_Translation_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_documentai_v1beta3_Document_Translation_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_documentai_v1beta3_Document_TextAnchor_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -177,7 +173,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "proto\032\026google/type/date.proto\032\032google/ty" + "pe/datetime.proto\032\027google/type/money.pro" + "to\032 google/type/postal_address.proto\032\034go" - + "ogle/api/annotations.proto\"\245<\n\010Document\022" + + "ogle/api/annotations.proto\"\241:\n\010Document\022" + "\r\n\003uri\030\001 \001(\tH\000\022\021\n\007content\030\002 \001(\014H\000\022\021\n\tmim" + "e_type\030\003 \001(\t\022\014\n\004text\030\004 \001(\t\022D\n\013text_style" + "s\030\005 \003(\0132/.google.cloud.documentai.v1beta" @@ -186,197 +182,191 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "B\n\010entities\030\007 \003(\01320.google.cloud.documen" + "tai.v1beta3.Document.Entity\022R\n\020entity_re" + "lations\030\010 \003(\01328.google.cloud.documentai." - + "v1beta3.Document.EntityRelation\022K\n\014trans" - + "lations\030\014 \003(\01325.google.cloud.documentai." - + "v1beta3.Document.Translation\022J\n\014text_cha" - + "nges\030\016 \003(\01324.google.cloud.documentai.v1b" - + "eta3.Document.TextChange\022G\n\nshard_info\030\t" - + " \001(\01323.google.cloud.documentai.v1beta3.D" - + "ocument.ShardInfo\022!\n\005error\030\n \001(\0132\022.googl" - + "e.rpc.Status\022E\n\trevisions\030\r \003(\01322.google" - + ".cloud.documentai.v1beta3.Document.Revis" - + "ion\032J\n\tShardInfo\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\032" - + "\332\002\n\005Style\022I\n\013text_anchor\030\001 \001(\01324.google." - + "cloud.documentai.v1beta3.Document.TextAn" - + "chor\022!\n\005color\030\002 \001(\0132\022.google.type.Color\022" - + ",\n\020background_color\030\003 \001(\0132\022.google.type." - + "Color\022\023\n\013font_weight\030\004 \001(\t\022\022\n\ntext_style" - + "\030\005 \001(\t\022\027\n\017text_decoration\030\006 \001(\t\022K\n\tfont_" - + "size\030\007 \001(\01328.google.cloud.documentai.v1b" - + "eta3.Document.Style.FontSize\032&\n\010FontSize" - + "\022\014\n\004size\030\001 \001(\002\022\014\n\004unit\030\002 \001(\t\032\320\037\n\004Page\022\023\n" - + "\013page_number\030\001 \001(\005\022C\n\005image\030\r \001(\01324.goog" - + "le.cloud.documentai.v1beta3.Document.Pag" - + "e.Image\022I\n\ntransforms\030\016 \003(\01325.google.clo" - + "ud.documentai.v1beta3.Document.Page.Matr" - + "ix\022K\n\tdimension\030\002 \001(\01328.google.cloud.doc" - + "umentai.v1beta3.Document.Page.Dimension\022" - + "E\n\006layout\030\003 \001(\01325.google.cloud.documenta" - + "i.v1beta3.Document.Page.Layout\022[\n\022detect" - + "ed_languages\030\004 \003(\0132?.google.cloud.docume" - + "ntai.v1beta3.Document.Page.DetectedLangu" - + "age\022D\n\006blocks\030\005 \003(\01324.google.cloud.docum" - + "entai.v1beta3.Document.Page.Block\022L\n\npar" - + "agraphs\030\006 \003(\01328.google.cloud.documentai." - + "v1beta3.Document.Page.Paragraph\022B\n\005lines" - + "\030\007 \003(\01323.google.cloud.documentai.v1beta3" - + ".Document.Page.Line\022D\n\006tokens\030\010 \003(\01324.go" - + "ogle.cloud.documentai.v1beta3.Document.P" - + "age.Token\022U\n\017visual_elements\030\t \003(\0132<.goo" - + "gle.cloud.documentai.v1beta3.Document.Pa" - + "ge.VisualElement\022D\n\006tables\030\n \003(\01324.googl" - + "e.cloud.documentai.v1beta3.Document.Page" - + ".Table\022M\n\013form_fields\030\013 \003(\01328.google.clo" - + "ud.documentai.v1beta3.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\032J\n\005Image\022\017\n\007cont" - + "ent\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\022I\n\013text_anchor\030\001 \001(\01324." - + "google.cloud.documentai.v1beta3.Document" - + ".TextAnchor\022\022\n\nconfidence\030\002 \001(\002\022D\n\rbound" - + "ing_poly\030\003 \001(\0132-.google.cloud.documentai" - + ".v1beta3.BoundingPoly\022V\n\013orientation\030\004 \001" - + "(\0162A.google.cloud.documentai.v1beta3.Doc" - + "ument.Page.Layout.Orientation\"e\n\013Orienta" - + "tion\022\033\n\027ORIENTATION_UNSPECIFIED\020\000\022\013\n\007PAG" - + "E_UP\020\001\022\016\n\nPAGE_RIGHT\020\002\022\r\n\tPAGE_DOWN\020\003\022\r\n" - + "\tPAGE_LEFT\020\004\032\365\001\n\005Block\022E\n\006layout\030\001 \001(\01325" + + "v1beta3.Document.EntityRelation\022J\n\014text_" + + "changes\030\016 \003(\01324.google.cloud.documentai." + + "v1beta3.Document.TextChange\022G\n\nshard_inf" + + "o\030\t \001(\01323.google.cloud.documentai.v1beta" + + "3.Document.ShardInfo\022!\n\005error\030\n \001(\0132\022.go" + + "ogle.rpc.Status\022E\n\trevisions\030\r \003(\01322.goo" + + "gle.cloud.documentai.v1beta3.Document.Re" + + "vision\032J\n\tShardInfo\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\032\332\002\n\005Style\022I\n\013text_anchor\030\001 \001(\01324.goog" + + "le.cloud.documentai.v1beta3.Document.Tex" + + "tAnchor\022!\n\005color\030\002 \001(\0132\022.google.type.Col" + + "or\022,\n\020background_color\030\003 \001(\0132\022.google.ty" + + "pe.Color\022\023\n\013font_weight\030\004 \001(\t\022\022\n\ntext_st" + + "yle\030\005 \001(\t\022\027\n\017text_decoration\030\006 \001(\t\022K\n\tfo" + + "nt_size\030\007 \001(\01328.google.cloud.documentai." + + "v1beta3.Document.Style.FontSize\032&\n\010FontS" + + "ize\022\014\n\004size\030\001 \001(\002\022\014\n\004unit\030\002 \001(\t\032\320\037\n\004Page" + + "\022\023\n\013page_number\030\001 \001(\005\022C\n\005image\030\r \001(\01324.g" + + "oogle.cloud.documentai.v1beta3.Document." + + "Page.Image\022I\n\ntransforms\030\016 \003(\01325.google." + + "cloud.documentai.v1beta3.Document.Page.M" + + "atrix\022K\n\tdimension\030\002 \001(\01328.google.cloud." + + "documentai.v1beta3.Document.Page.Dimensi" + + "on\022E\n\006layout\030\003 \001(\01325.google.cloud.docume" + + "ntai.v1beta3.Document.Page.Layout\022[\n\022det" + + "ected_languages\030\004 \003(\0132?.google.cloud.doc" + + "umentai.v1beta3.Document.Page.DetectedLa" + + "nguage\022D\n\006blocks\030\005 \003(\01324.google.cloud.do" + + "cumentai.v1beta3.Document.Page.Block\022L\n\n" + + "paragraphs\030\006 \003(\01328.google.cloud.document" + + "ai.v1beta3.Document.Page.Paragraph\022B\n\005li" + + "nes\030\007 \003(\01323.google.cloud.documentai.v1be" + + "ta3.Document.Page.Line\022D\n\006tokens\030\010 \003(\01324" + ".google.cloud.documentai.v1beta3.Documen" - + "t.Page.Layout\022[\n\022detected_languages\030\002 \003(" - + "\0132?.google.cloud.documentai.v1beta3.Docu" - + "ment.Page.DetectedLanguage\022H\n\nprovenance" - + "\030\003 \001(\01324.google.cloud.documentai.v1beta3" - + ".Document.Provenance\032\371\001\n\tParagraph\022E\n\006la" - + "yout\030\001 \001(\01325.google.cloud.documentai.v1b" - + "eta3.Document.Page.Layout\022[\n\022detected_la" - + "nguages\030\002 \003(\0132?.google.cloud.documentai." - + "v1beta3.Document.Page.DetectedLanguage\022H" - + "\n\nprovenance\030\003 \001(\01324.google.cloud.docume" - + "ntai.v1beta3.Document.Provenance\032\364\001\n\004Lin" - + "e\022E\n\006layout\030\001 \001(\01325.google.cloud.documen" - + "tai.v1beta3.Document.Page.Layout\022[\n\022dete" - + "cted_languages\030\002 \003(\0132?.google.cloud.docu" - + "mentai.v1beta3.Document.Page.DetectedLan" - + "guage\022H\n\nprovenance\030\003 \001(\01324.google.cloud" - + ".documentai.v1beta3.Document.Provenance\032" - + "\377\003\n\005Token\022E\n\006layout\030\001 \001(\01325.google.cloud" - + ".documentai.v1beta3.Document.Page.Layout" - + "\022Z\n\016detected_break\030\002 \001(\0132B.google.cloud." - + "documentai.v1beta3.Document.Page.Token.D" - + "etectedBreak\022[\n\022detected_languages\030\003 \003(\013" - + "2?.google.cloud.documentai.v1beta3.Docum" - + "ent.Page.DetectedLanguage\022H\n\nprovenance\030" - + "\004 \001(\01324.google.cloud.documentai.v1beta3." - + "Document.Provenance\032\253\001\n\rDetectedBreak\022U\n" - + "\004type\030\001 \001(\0162G.google.cloud.documentai.v1" - + "beta3.Document.Page.Token.DetectedBreak." - + "Type\"C\n\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022\t\n\005SP" - + "ACE\020\001\022\016\n\nWIDE_SPACE\020\002\022\n\n\006HYPHEN\020\003\032\301\001\n\rVi" - + "sualElement\022E\n\006layout\030\001 \001(\01325.google.clo" - + "ud.documentai.v1beta3.Document.Page.Layo" - + "ut\022\014\n\004type\030\002 \001(\t\022[\n\022detected_languages\030\003" + + "t.Page.Token\022U\n\017visual_elements\030\t \003(\0132<." + + "google.cloud.documentai.v1beta3.Document" + + ".Page.VisualElement\022D\n\006tables\030\n \003(\01324.go" + + "ogle.cloud.documentai.v1beta3.Document.P" + + "age.Table\022M\n\013form_fields\030\013 \003(\01328.google." + + "cloud.documentai.v1beta3.Document.Page.F" + + "ormField\0328\n\tDimension\022\r\n\005width\030\001 \001(\002\022\016\n\006" + + "height\030\002 \001(\002\022\014\n\004unit\030\003 \001(\t\032J\n\005Image\022\017\n\007c" + + "ontent\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\004da" + + "ta\030\004 \001(\014\032\354\002\n\006Layout\022I\n\013text_anchor\030\001 \001(\013" + + "24.google.cloud.documentai.v1beta3.Docum" + + "ent.TextAnchor\022\022\n\nconfidence\030\002 \001(\002\022D\n\rbo" + + "unding_poly\030\003 \001(\0132-.google.cloud.documen" + + "tai.v1beta3.BoundingPoly\022V\n\013orientation\030" + + "\004 \001(\0162A.google.cloud.documentai.v1beta3." + + "Document.Page.Layout.Orientation\"e\n\013Orie" + + "ntation\022\033\n\027ORIENTATION_UNSPECIFIED\020\000\022\013\n\007" + + "PAGE_UP\020\001\022\016\n\nPAGE_RIGHT\020\002\022\r\n\tPAGE_DOWN\020\003" + + "\022\r\n\tPAGE_LEFT\020\004\032\365\001\n\005Block\022E\n\006layout\030\001 \001(" + + "\01325.google.cloud.documentai.v1beta3.Docu" + + "ment.Page.Layout\022[\n\022detected_languages\030\002" + " \003(\0132?.google.cloud.documentai.v1beta3.D" - + "ocument.Page.DetectedLanguage\032\202\005\n\005Table\022" - + "E\n\006layout\030\001 \001(\01325.google.cloud.documenta" - + "i.v1beta3.Document.Page.Layout\022R\n\013header" - + "_rows\030\002 \003(\0132=.google.cloud.documentai.v1" - + "beta3.Document.Page.Table.TableRow\022P\n\tbo" - + "dy_rows\030\003 \003(\0132=.google.cloud.documentai." - + "v1beta3.Document.Page.Table.TableRow\022[\n\022" - + "detected_languages\030\004 \003(\0132?.google.cloud." - + "documentai.v1beta3.Document.Page.Detecte" - + "dLanguage\032Y\n\010TableRow\022M\n\005cells\030\001 \003(\0132>.g" - + "oogle.cloud.documentai.v1beta3.Document." - + "Page.Table.TableCell\032\323\001\n\tTableCell\022E\n\006la" - + "yout\030\001 \001(\01325.google.cloud.documentai.v1b" - + "eta3.Document.Page.Layout\022\020\n\010row_span\030\002 " - + "\001(\005\022\020\n\010col_span\030\003 \001(\005\022[\n\022detected_langua" - + "ges\030\004 \003(\0132?.google.cloud.documentai.v1be" - + "ta3.Document.Page.DetectedLanguage\032\373\002\n\tF" - + "ormField\022I\n\nfield_name\030\001 \001(\01325.google.cl" + + "ocument.Page.DetectedLanguage\022H\n\nprovena" + + "nce\030\003 \001(\01324.google.cloud.documentai.v1be" + + "ta3.Document.Provenance\032\371\001\n\tParagraph\022E\n" + + "\006layout\030\001 \001(\01325.google.cloud.documentai." + + "v1beta3.Document.Page.Layout\022[\n\022detected" + + "_languages\030\002 \003(\0132?.google.cloud.document" + + "ai.v1beta3.Document.Page.DetectedLanguag" + + "e\022H\n\nprovenance\030\003 \001(\01324.google.cloud.doc" + + "umentai.v1beta3.Document.Provenance\032\364\001\n\004" + + "Line\022E\n\006layout\030\001 \001(\01325.google.cloud.docu" + + "mentai.v1beta3.Document.Page.Layout\022[\n\022d" + + "etected_languages\030\002 \003(\0132?.google.cloud.d" + + "ocumentai.v1beta3.Document.Page.Detected" + + "Language\022H\n\nprovenance\030\003 \001(\01324.google.cl" + + "oud.documentai.v1beta3.Document.Provenan" + + "ce\032\377\003\n\005Token\022E\n\006layout\030\001 \001(\01325.google.cl" + "oud.documentai.v1beta3.Document.Page.Lay" - + "out\022J\n\013field_value\030\002 \001(\01325.google.cloud." - + "documentai.v1beta3.Document.Page.Layout\022" - + "`\n\027name_detected_languages\030\003 \003(\0132?.googl" - + "e.cloud.documentai.v1beta3.Document.Page" - + ".DetectedLanguage\022a\n\030value_detected_lang" - + "uages\030\004 \003(\0132?.google.cloud.documentai.v1" - + "beta3.Document.Page.DetectedLanguage\022\022\n\n" - + "value_type\030\005 \001(\t\032=\n\020DetectedLanguage\022\025\n\r" - + "language_code\030\001 \001(\t\022\022\n\nconfidence\030\002 \001(\002\032" - + "\207\006\n\006Entity\022I\n\013text_anchor\030\001 \001(\01324.google" - + ".cloud.documentai.v1beta3.Document.TextA" - + "nchor\022\014\n\004type\030\002 \001(\t\022\024\n\014mention_text\030\003 \001(" - + "\t\022\022\n\nmention_id\030\004 \001(\t\022\027\n\nconfidence\030\005 \001(" - + "\002B\003\340A\001\022N\n\013page_anchor\030\006 \001(\01324.google.clo" - + "ud.documentai.v1beta3.Document.PageAncho" - + "rB\003\340A\001\022\n\n\002id\030\007 \001(\t\022_\n\020normalized_value\030\t" - + " \001(\0132@.google.cloud.documentai.v1beta3.D" - + "ocument.Entity.NormalizedValueB\003\340A\001\022I\n\np" - + "roperties\030\n \003(\01320.google.cloud.documenta" - + "i.v1beta3.Document.EntityB\003\340A\001\022M\n\nproven" - + "ance\030\013 \001(\01324.google.cloud.documentai.v1b" - + "eta3.Document.ProvenanceB\003\340A\001\022\025\n\010redacte" - + "d\030\014 \001(\010B\003\340A\001\032\362\001\n\017NormalizedValue\022)\n\013mone" - + "y_value\030\002 \001(\0132\022.google.type.MoneyH\000\022\'\n\nd" - + "ate_value\030\003 \001(\0132\021.google.type.DateH\000\022/\n\016" - + "datetime_value\030\004 \001(\0132\025.google.type.DateT" - + "imeH\000\0223\n\raddress_value\030\005 \001(\0132\032.google.ty" - + "pe.PostalAddressH\000\022\021\n\004text\030\001 \001(\tB\003\340A\002B\022\n" - + "\020structured_value\032I\n\016EntityRelation\022\022\n\ns" - + "ubject_id\030\001 \001(\t\022\021\n\tobject_id\030\002 \001(\t\022\020\n\010re" - + "lation\030\003 \001(\t\032\322\001\n\013Translation\022I\n\013text_anc" - + "hor\030\001 \001(\01324.google.cloud.documentai.v1be" - + "ta3.Document.TextAnchor\022\025\n\rlanguage_code" - + "\030\002 \001(\t\022\027\n\017translated_text\030\003 \001(\t\022H\n\nprove" - + "nance\030\004 \003(\01324.google.cloud.documentai.v1" - + "beta3.Document.Provenance\032\255\001\n\nTextAnchor" - + "\022W\n\rtext_segments\030\001 \003(\0132@.google.cloud.d" - + "ocumentai.v1beta3.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\316\003\n\nPageAnchor\022O\n\tpage_refs\030\001 \003(\0132<.go" + + "out\022Z\n\016detected_break\030\002 \001(\0132B.google.clo" + + "ud.documentai.v1beta3.Document.Page.Toke" + + "n.DetectedBreak\022[\n\022detected_languages\030\003 " + + "\003(\0132?.google.cloud.documentai.v1beta3.Do" + + "cument.Page.DetectedLanguage\022H\n\nprovenan" + + "ce\030\004 \001(\01324.google.cloud.documentai.v1bet" + + "a3.Document.Provenance\032\253\001\n\rDetectedBreak" + + "\022U\n\004type\030\001 \001(\0162G.google.cloud.documentai" + + ".v1beta3.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\301\001\n" + + "\rVisualElement\022E\n\006layout\030\001 \001(\01325.google." + + "cloud.documentai.v1beta3.Document.Page.L" + + "ayout\022\014\n\004type\030\002 \001(\t\022[\n\022detected_language" + + "s\030\003 \003(\0132?.google.cloud.documentai.v1beta" + + "3.Document.Page.DetectedLanguage\032\202\005\n\005Tab" + + "le\022E\n\006layout\030\001 \001(\01325.google.cloud.docume" + + "ntai.v1beta3.Document.Page.Layout\022R\n\013hea" + + "der_rows\030\002 \003(\0132=.google.cloud.documentai" + + ".v1beta3.Document.Page.Table.TableRow\022P\n" + + "\tbody_rows\030\003 \003(\0132=.google.cloud.document" + + "ai.v1beta3.Document.Page.Table.TableRow\022" + + "[\n\022detected_languages\030\004 \003(\0132?.google.clo" + + "ud.documentai.v1beta3.Document.Page.Dete" + + "ctedLanguage\032Y\n\010TableRow\022M\n\005cells\030\001 \003(\0132" + + ">.google.cloud.documentai.v1beta3.Docume" + + "nt.Page.Table.TableCell\032\323\001\n\tTableCell\022E\n" + + "\006layout\030\001 \001(\01325.google.cloud.documentai." + + "v1beta3.Document.Page.Layout\022\020\n\010row_span" + + "\030\002 \001(\005\022\020\n\010col_span\030\003 \001(\005\022[\n\022detected_lan" + + "guages\030\004 \003(\0132?.google.cloud.documentai.v" + + "1beta3.Document.Page.DetectedLanguage\032\373\002" + + "\n\tFormField\022I\n\nfield_name\030\001 \001(\01325.google" + + ".cloud.documentai.v1beta3.Document.Page." + + "Layout\022J\n\013field_value\030\002 \001(\01325.google.clo" + + "ud.documentai.v1beta3.Document.Page.Layo" + + "ut\022`\n\027name_detected_languages\030\003 \003(\0132?.go" + "ogle.cloud.documentai.v1beta3.Document.P" - + "ageAnchor.PageRef\032\356\002\n\007PageRef\022\021\n\004page\030\001 " - + "\001(\003B\003\340A\002\022a\n\013layout_type\030\002 \001(\0162G.google.c" - + "loud.documentai.v1beta3.Document.PageAnc" - + "hor.PageRef.LayoutTypeB\003\340A\001\022\030\n\tlayout_id" - + "\030\003 \001(\tB\005\030\001\340A\001\022I\n\rbounding_poly\030\004 \001(\0132-.g" - + "oogle.cloud.documentai.v1beta3.BoundingP" - + "olyB\003\340A\001\"\207\001\n\nLayoutType\022\033\n\027LAYOUT_TYPE_U" - + "NSPECIFIED\020\000\022\t\n\005BLOCK\020\001\022\r\n\tPARAGRAPH\020\002\022\010" - + "\n\004LINE\020\003\022\t\n\005TOKEN\020\004\022\022\n\016VISUAL_ELEMENT\020\005\022" - + "\t\n\005TABLE\020\006\022\016\n\nFORM_FIELD\020\007\032\354\002\n\nProvenanc" - + "e\022\020\n\010revision\030\001 \001(\005\022\n\n\002id\030\002 \001(\005\022L\n\007paren" - + "ts\030\003 \003(\0132;.google.cloud.documentai.v1bet" - + "a3.Document.Provenance.Parent\022P\n\004type\030\004 " - + "\001(\0162B.google.cloud.documentai.v1beta3.Do" - + "cument.Provenance.OperationType\032&\n\006Paren" - + "t\022\020\n\010revision\030\001 \001(\005\022\n\n\002id\030\002 \001(\005\"x\n\rOpera" - + "tionType\022\036\n\032OPERATION_TYPE_UNSPECIFIED\020\000" - + "\022\007\n\003ADD\020\001\022\n\n\006REMOVE\020\002\022\013\n\007REPLACE\020\003\022\022\n\016EV" - + "AL_REQUESTED\020\004\022\021\n\rEVAL_APPROVED\020\005\032\222\002\n\010Re" - + "vision\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\016\n\006parent\030\002 \003(\005\022/\n\013crea" - + "te_time\030\003 \001(\0132\032.google.protobuf.Timestam" - + "p\022T\n\014human_review\030\006 \001(\0132>.google.cloud.d" - + "ocumentai.v1beta3.Document.Revision.Huma" - + "nReview\0323\n\013HumanReview\022\r\n\005state\030\001 \001(\t\022\025\n" - + "\rstate_message\030\002 \001(\tB\010\n\006source\032\267\001\n\nTextC" - + "hange\022I\n\013text_anchor\030\001 \001(\01324.google.clou" - + "d.documentai.v1beta3.Document.TextAnchor" - + "\022\024\n\014changed_text\030\002 \001(\t\022H\n\nprovenance\030\003 \003" - + "(\01324.google.cloud.documentai.v1beta3.Doc" - + "ument.ProvenanceB\010\n\006sourceB\352\001\n#com.googl" - + "e.cloud.documentai.v1beta3B\rDocumentProt" - + "oP\001ZIgoogle.golang.org/genproto/googleap" - + "is/cloud/documentai/v1beta3;documentai\252\002" - + "\037Google.Cloud.DocumentAI.V1Beta3\312\002\037Googl" - + "e\\Cloud\\DocumentAI\\V1beta3\352\002\"Google::Clo" - + "ud::DocumentAI::V1beta3b\006proto3" + + "age.DetectedLanguage\022a\n\030value_detected_l" + + "anguages\030\004 \003(\0132?.google.cloud.documentai" + + ".v1beta3.Document.Page.DetectedLanguage\022" + + "\022\n\nvalue_type\030\005 \001(\t\032=\n\020DetectedLanguage\022" + + "\025\n\rlanguage_code\030\001 \001(\t\022\022\n\nconfidence\030\002 \001" + + "(\002\032\245\006\n\006Entity\022I\n\013text_anchor\030\001 \001(\01324.goo" + + "gle.cloud.documentai.v1beta3.Document.Te" + + "xtAnchor\022\014\n\004type\030\002 \001(\t\022\024\n\014mention_text\030\003" + + " \001(\t\022\022\n\nmention_id\030\004 \001(\t\022\027\n\nconfidence\030\005" + + " \001(\002B\003\340A\001\022N\n\013page_anchor\030\006 \001(\01324.google." + + "cloud.documentai.v1beta3.Document.PageAn" + + "chorB\003\340A\001\022\017\n\002id\030\007 \001(\tB\003\340A\001\022_\n\020normalized" + + "_value\030\t \001(\0132@.google.cloud.documentai.v" + + "1beta3.Document.Entity.NormalizedValueB\003" + + "\340A\001\022I\n\nproperties\030\n \003(\01320.google.cloud.d" + + "ocumentai.v1beta3.Document.EntityB\003\340A\001\022M" + + "\n\nprovenance\030\013 \001(\01324.google.cloud.docume" + + "ntai.v1beta3.Document.ProvenanceB\003\340A\001\022\025\n" + + "\010redacted\030\014 \001(\010B\003\340A\001\032\213\002\n\017NormalizedValue" + + "\022)\n\013money_value\030\002 \001(\0132\022.google.type.Mone" + + "yH\000\022\'\n\ndate_value\030\003 \001(\0132\021.google.type.Da" + + "teH\000\022/\n\016datetime_value\030\004 \001(\0132\025.google.ty" + + "pe.DateTimeH\000\0223\n\raddress_value\030\005 \001(\0132\032.g" + + "oogle.type.PostalAddressH\000\022\027\n\rboolean_va" + + "lue\030\006 \001(\010H\000\022\021\n\004text\030\001 \001(\tB\003\340A\002B\022\n\020struct" + + "ured_value\032I\n\016EntityRelation\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.documentai.v1beta3.Do" + + "cument.TextAnchor.TextSegment\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\316\003\n\nPageAnchor\022O\n\t" + + "page_refs\030\001 \003(\0132<.google.cloud.documenta" + + "i.v1beta3.Document.PageAnchor.PageRef\032\356\002" + + "\n\007PageRef\022\021\n\004page\030\001 \001(\003B\003\340A\002\022a\n\013layout_t" + + "ype\030\002 \001(\0162G.google.cloud.documentai.v1be" + + "ta3.Document.PageAnchor.PageRef.LayoutTy" + + "peB\003\340A\001\022\030\n\tlayout_id\030\003 \001(\tB\005\030\001\340A\001\022I\n\rbou" + + "nding_poly\030\004 \001(\0132-.google.cloud.document" + + "ai.v1beta3.BoundingPolyB\003\340A\001\"\207\001\n\nLayoutT" + + "ype\022\033\n\027LAYOUT_TYPE_UNSPECIFIED\020\000\022\t\n\005BLOC" + + "K\020\001\022\r\n\tPARAGRAPH\020\002\022\010\n\004LINE\020\003\022\t\n\005TOKEN\020\004\022" + + "\022\n\016VISUAL_ELEMENT\020\005\022\t\n\005TABLE\020\006\022\016\n\nFORM_F" + + "IELD\020\007\032\354\002\n\nProvenance\022\020\n\010revision\030\001 \001(\005\022" + + "\n\n\002id\030\002 \001(\005\022L\n\007parents\030\003 \003(\0132;.google.cl" + + "oud.documentai.v1beta3.Document.Provenan" + + "ce.Parent\022P\n\004type\030\004 \001(\0162B.google.cloud.d" + + "ocumentai.v1beta3.Document.Provenance.Op" + + "erationType\032&\n\006Parent\022\020\n\010revision\030\001 \001(\005\022" + + "\n\n\002id\030\002 \001(\005\"x\n\rOperationType\022\036\n\032OPERATIO" + + "N_TYPE_UNSPECIFIED\020\000\022\007\n\003ADD\020\001\022\n\n\006REMOVE\020" + + "\002\022\013\n\007REPLACE\020\003\022\022\n\016EVAL_REQUESTED\020\004\022\021\n\rEV" + + "AL_APPROVED\020\005\032\222\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\016\n\006" + + "parent\030\002 \003(\005\022/\n\013create_time\030\003 \001(\0132\032.goog" + + "le.protobuf.Timestamp\022T\n\014human_review\030\006 " + + "\001(\0132>.google.cloud.documentai.v1beta3.Do" + + "cument.Revision.HumanReview\0323\n\013HumanRevi" + + "ew\022\r\n\005state\030\001 \001(\t\022\025\n\rstate_message\030\002 \001(\t" + + "B\010\n\006source\032\267\001\n\nTextChange\022I\n\013text_anchor" + + "\030\001 \001(\01324.google.cloud.documentai.v1beta3" + + ".Document.TextAnchor\022\024\n\014changed_text\030\002 \001" + + "(\t\022H\n\nprovenance\030\003 \003(\01324.google.cloud.do" + + "cumentai.v1beta3.Document.ProvenanceB\010\n\006" + + "sourceB\352\001\n#com.google.cloud.documentai.v" + + "1beta3B\rDocumentProtoP\001ZIgoogle.golang.o" + + "rg/genproto/googleapis/cloud/documentai/" + + "v1beta3;documentai\252\002\037Google.Cloud.Docume" + + "ntAI.V1Beta3\312\002\037Google\\Cloud\\DocumentAI\\V" + + "1beta3\352\002\"Google::Cloud::DocumentAI::V1be" + + "ta3b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -407,7 +397,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Pages", "Entities", "EntityRelations", - "Translations", "TextChanges", "ShardInfo", "Error", @@ -646,7 +635,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1beta3_Document_Entity_NormalizedValue_descriptor, new java.lang.String[] { - "MoneyValue", "DateValue", "DatetimeValue", "AddressValue", "Text", "StructuredValue", + "MoneyValue", + "DateValue", + "DatetimeValue", + "AddressValue", + "BooleanValue", + "Text", + "StructuredValue", }); internal_static_google_cloud_documentai_v1beta3_Document_EntityRelation_descriptor = internal_static_google_cloud_documentai_v1beta3_Document_descriptor.getNestedTypes().get(4); @@ -656,16 +651,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "SubjectId", "ObjectId", "Relation", }); - internal_static_google_cloud_documentai_v1beta3_Document_Translation_descriptor = - internal_static_google_cloud_documentai_v1beta3_Document_descriptor.getNestedTypes().get(5); - internal_static_google_cloud_documentai_v1beta3_Document_Translation_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_documentai_v1beta3_Document_Translation_descriptor, - new java.lang.String[] { - "TextAnchor", "LanguageCode", "TranslatedText", "Provenance", - }); internal_static_google_cloud_documentai_v1beta3_Document_TextAnchor_descriptor = - internal_static_google_cloud_documentai_v1beta3_Document_descriptor.getNestedTypes().get(6); + internal_static_google_cloud_documentai_v1beta3_Document_descriptor.getNestedTypes().get(5); internal_static_google_cloud_documentai_v1beta3_Document_TextAnchor_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1beta3_Document_TextAnchor_descriptor, @@ -683,7 +670,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "StartIndex", "EndIndex", }); internal_static_google_cloud_documentai_v1beta3_Document_PageAnchor_descriptor = - internal_static_google_cloud_documentai_v1beta3_Document_descriptor.getNestedTypes().get(7); + internal_static_google_cloud_documentai_v1beta3_Document_descriptor.getNestedTypes().get(6); internal_static_google_cloud_documentai_v1beta3_Document_PageAnchor_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1beta3_Document_PageAnchor_descriptor, @@ -701,7 +688,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Page", "LayoutType", "LayoutId", "BoundingPoly", }); internal_static_google_cloud_documentai_v1beta3_Document_Provenance_descriptor = - internal_static_google_cloud_documentai_v1beta3_Document_descriptor.getNestedTypes().get(8); + internal_static_google_cloud_documentai_v1beta3_Document_descriptor.getNestedTypes().get(7); internal_static_google_cloud_documentai_v1beta3_Document_Provenance_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1beta3_Document_Provenance_descriptor, @@ -719,7 +706,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Revision", "Id", }); internal_static_google_cloud_documentai_v1beta3_Document_Revision_descriptor = - internal_static_google_cloud_documentai_v1beta3_Document_descriptor.getNestedTypes().get(9); + internal_static_google_cloud_documentai_v1beta3_Document_descriptor.getNestedTypes().get(8); internal_static_google_cloud_documentai_v1beta3_Document_Revision_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1beta3_Document_Revision_descriptor, @@ -737,9 +724,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "State", "StateMessage", }); internal_static_google_cloud_documentai_v1beta3_Document_TextChange_descriptor = - internal_static_google_cloud_documentai_v1beta3_Document_descriptor - .getNestedTypes() - .get(10); + internal_static_google_cloud_documentai_v1beta3_Document_descriptor.getNestedTypes().get(9); internal_static_google_cloud_documentai_v1beta3_Document_TextChange_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1beta3_Document_TextChange_descriptor, diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/HumanReviewConfigName.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/HumanReviewConfigName.java index 3aec9a33..99b43ebf 100644 --- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/HumanReviewConfigName.java +++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/HumanReviewConfigName.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorName.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorName.java index 80e15109..7ca10634 100644 --- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorName.java +++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorName.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document.proto b/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document.proto index 31642871..0e14be61 100644 --- a/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document.proto +++ b/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -418,6 +418,10 @@ message Document { // 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; } // Required. Normalized entity value stored as a string. This field is populated for @@ -450,9 +454,9 @@ message Document { // page where it was found. PageAnchor page_anchor = 6 [(google.api.field_behavior) = OPTIONAL]; - // Canonical id. This will be a unique value in the entity list + // Optional. Canonical id. This will be a unique value in the entity list // for this document. - string id = 7; + 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 @@ -483,27 +487,6 @@ message Document { string relation = 3; } - // A translation of the text segment. - message Translation { - // Provenance of the translation. - // Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta3.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 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 = 2; - - // Text translated into the target language. - string translated_text = 3; - - // The history of this annotation. - repeated Provenance provenance = 4; - } - // Text reference indexing into the [Document.text][google.cloud.documentai.v1beta3.Document.text]. message TextAnchor { // A text segment in the [Document.text][google.cloud.documentai.v1beta3.Document.text]. The indices may be out of bounds @@ -559,7 +542,8 @@ message Document { FORM_FIELD = 7; } - // Required. Index into the [Document.pages][google.cloud.documentai.v1beta3.Document.pages] element + // Required. Index into the [Document.pages][google.cloud.documentai.v1beta3.Document.pages] element, for example using + // [Document.pages][page_refs.page] to locate the related page element. int64 page = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. The type of the layout element that is being referenced if any. @@ -719,10 +703,6 @@ message Document { // Relationship among [Document.entities][google.cloud.documentai.v1beta3.Document.entities]. repeated EntityRelation entity_relations = 8; - // A list of translations on [Document.text][google.cloud.documentai.v1beta3.Document.text]. For document shards, - // translations in this list may cross shard boundaries. - repeated Translation translations = 12; - // A list of text corrections made to [Document.text]. This is usually // used for annotating corrections to OCR mistakes. Text changes for a given // revision may not overlap with each other. diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document_io.proto b/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document_io.proto index 4b543961..d364d4ab 100644 --- a/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document_io.proto +++ b/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document_io.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/geometry.proto b/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/geometry.proto index 8ac46643..240faf1f 100644 --- a/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/geometry.proto +++ b/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/geometry.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 3691fd59..37867a52 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -29,13 +29,13 @@ com.google.cloud google-cloud-document-ai - 0.4.0 + 0.4.1 com.google.cloud google-cloud-storage - 1.113.11 + 1.113.14 junit diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index cd1a5b3d..34072937 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,13 +28,13 @@ com.google.cloud google-cloud-document-ai - 0.4.0 + 0.4.1 com.google.cloud google-cloud-storage - 1.113.11 + 1.113.14 junit diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index f40fe0f1..410e0bba 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 18.0.0 + 19.0.0 pom import @@ -41,7 +41,7 @@ com.google.cloud google-cloud-document-ai - 0.4.0 + 0.4.1 diff --git a/synth.metadata b/synth.metadata index a7bd9e70..8a486dde 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,38 +4,38 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-document-ai.git", - "sha": "83c52c9dbd63690e3e98d261a4660aa1040b51f0" + "sha": "136d1178d13f3a2bd3f93be6106a97f04aa7bcae" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "af8f71dae961ee036a0ac52a1965270149a6b2c9", - "internalRef": "358516065" + "sha": "1305ca41d554eb0725237561e34129373bb8cbc1", + "internalRef": "362856902" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "af8f71dae961ee036a0ac52a1965270149a6b2c9", - "internalRef": "358516065" + "sha": "1305ca41d554eb0725237561e34129373bb8cbc1", + "internalRef": "362856902" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "af8f71dae961ee036a0ac52a1965270149a6b2c9", - "internalRef": "358516065" + "sha": "1305ca41d554eb0725237561e34129373bb8cbc1", + "internalRef": "362856902" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "6946fd71ae9215b0e7ae188f5057df765ee6d7d2" + "sha": "0b064d767537e0675fc053e53fca473c5c701fb8" } } ], diff --git a/versions.txt b/versions.txt index aa89aa1c..755b4b3b 100644 --- a/versions.txt +++ b/versions.txt @@ -1,7 +1,7 @@ -proto-google-cloud-document-ai-v1beta1:0.4.1:0.4.1 -proto-google-cloud-document-ai-v1beta2:0.4.1:0.4.1 -proto-google-cloud-document-ai-v1beta3:0.4.1:0.4.1 -grpc-google-cloud-document-ai-v1beta1:0.4.1:0.4.1 -grpc-google-cloud-document-ai-v1beta2:0.4.1:0.4.1 -grpc-google-cloud-document-ai-v1beta3:0.4.1:0.4.1 -google-cloud-document-ai:0.4.1:0.4.1 +proto-google-cloud-document-ai-v1beta1:0.5.0:0.5.0 +proto-google-cloud-document-ai-v1beta2:0.5.0:0.5.0 +proto-google-cloud-document-ai-v1beta3:0.5.0:0.5.0 +grpc-google-cloud-document-ai-v1beta1:0.5.0:0.5.0 +grpc-google-cloud-document-ai-v1beta2:0.5.0:0.5.0 +grpc-google-cloud-document-ai-v1beta3:0.5.0:0.5.0 +google-cloud-document-ai:0.5.0:0.5.0