{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* ProcessorName name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
@@ -77,6 +79,8 @@
* To customize credentials:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* DocumentProcessorServiceSettings documentProcessorServiceSettings =
* DocumentProcessorServiceSettings.newBuilder()
* .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
@@ -88,6 +92,8 @@
* To customize the endpoint:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* DocumentProcessorServiceSettings documentProcessorServiceSettings =
* DocumentProcessorServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
* DocumentProcessorServiceClient documentProcessorServiceClient =
@@ -169,6 +175,8 @@ public final OperationsClient getOperationsClient() {
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* ProcessorName name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
@@ -192,6 +200,8 @@ public final ProcessResponse processDocument(ProcessorName name) {
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* String name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString();
@@ -214,6 +224,8 @@ public final ProcessResponse processDocument(String name) {
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* ProcessRequest request =
@@ -239,6 +251,8 @@ public final ProcessResponse processDocument(ProcessRequest request) {
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* ProcessRequest request =
@@ -265,6 +279,8 @@ public final UnaryCallable processDocumentCalla
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* ProcessorName name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
@@ -291,6 +307,8 @@ public final UnaryCallable processDocumentCalla
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* String name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString();
@@ -316,6 +334,8 @@ public final UnaryCallable processDocumentCalla
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* BatchProcessRequest request =
@@ -346,6 +366,8 @@ public final UnaryCallable processDocumentCalla
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* BatchProcessRequest request =
@@ -377,6 +399,8 @@ public final UnaryCallable processDocumentCalla
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* BatchProcessRequest request =
@@ -405,6 +429,8 @@ public final UnaryCallable batchProcessDocuments
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* HumanReviewConfigName humanReviewConfig =
@@ -435,6 +461,8 @@ public final UnaryCallable batchProcessDocuments
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* String humanReviewConfig =
@@ -463,6 +491,8 @@ public final UnaryCallable batchProcessDocuments
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* ReviewDocumentRequest request =
@@ -492,6 +522,8 @@ public final UnaryCallable batchProcessDocuments
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* ReviewDocumentRequest request =
@@ -521,6 +553,8 @@ public final UnaryCallable batchProcessDocuments
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* ReviewDocumentRequest request =
diff --git a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/DocumentProcessorServiceSettings.java b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/DocumentProcessorServiceSettings.java
index 86198bfd..d483d039 100644
--- a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/DocumentProcessorServiceSettings.java
+++ b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/DocumentProcessorServiceSettings.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -51,6 +51,8 @@
* For example, to set the total timeout of processDocument to 30 seconds:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* DocumentProcessorServiceSettings.Builder documentProcessorServiceSettingsBuilder =
* DocumentProcessorServiceSettings.newBuilder();
* documentProcessorServiceSettingsBuilder
diff --git a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/package-info.java b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/package-info.java
index 166482af..9b3d0ae3 100644
--- a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/package-info.java
+++ b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/package-info.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,6 +27,8 @@
* Sample for DocumentProcessorServiceClient:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* ProcessorName name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
diff --git a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/stub/DocumentProcessorServiceStub.java b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/stub/DocumentProcessorServiceStub.java
index f60654b8..aea812f9 100644
--- a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/stub/DocumentProcessorServiceStub.java
+++ b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/stub/DocumentProcessorServiceStub.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021 Google LLC
+ * Copyright 2022 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/v1/stub/DocumentProcessorServiceStubSettings.java b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/stub/DocumentProcessorServiceStubSettings.java
index 56062561..0f5f85e8 100644
--- a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/stub/DocumentProcessorServiceStubSettings.java
+++ b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/stub/DocumentProcessorServiceStubSettings.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -71,6 +71,8 @@
* For example, to set the total timeout of processDocument to 30 seconds:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* DocumentProcessorServiceStubSettings.Builder documentProcessorServiceSettingsBuilder =
* DocumentProcessorServiceStubSettings.newBuilder();
* documentProcessorServiceSettingsBuilder
diff --git a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/stub/GrpcDocumentProcessorServiceCallableFactory.java b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/stub/GrpcDocumentProcessorServiceCallableFactory.java
index 55bb90a4..2268b6b6 100644
--- a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/stub/GrpcDocumentProcessorServiceCallableFactory.java
+++ b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/stub/GrpcDocumentProcessorServiceCallableFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021 Google LLC
+ * Copyright 2022 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/v1/stub/GrpcDocumentProcessorServiceStub.java b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/stub/GrpcDocumentProcessorServiceStub.java
index 70819895..7c8c7f96 100644
--- a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/stub/GrpcDocumentProcessorServiceStub.java
+++ b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/stub/GrpcDocumentProcessorServiceStub.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021 Google LLC
+ * Copyright 2022 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/DocumentUnderstandingServiceClient.java b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta1/DocumentUnderstandingServiceClient.java
index d19de621..fcf12836 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 2021 Google LLC
+ * Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -40,6 +40,8 @@
* calls that map to API methods. Sample code to get started:
*
* {@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentUnderstandingServiceClient documentUnderstandingServiceClient =
* DocumentUnderstandingServiceClient.create()) {
* List requests = new ArrayList<>();
@@ -78,6 +80,8 @@
* To customize credentials:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* DocumentUnderstandingServiceSettings documentUnderstandingServiceSettings =
* DocumentUnderstandingServiceSettings.newBuilder()
* .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
@@ -89,6 +93,8 @@
* To customize the endpoint:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* DocumentUnderstandingServiceSettings documentUnderstandingServiceSettings =
* DocumentUnderstandingServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
* DocumentUnderstandingServiceClient documentUnderstandingServiceClient =
@@ -173,6 +179,8 @@ public final OperationsClient getOperationsClient() {
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentUnderstandingServiceClient documentUnderstandingServiceClient =
* DocumentUnderstandingServiceClient.create()) {
* List requests = new ArrayList<>();
@@ -198,6 +206,8 @@ public final OperationsClient getOperationsClient() {
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentUnderstandingServiceClient documentUnderstandingServiceClient =
* DocumentUnderstandingServiceClient.create()) {
* BatchProcessDocumentsRequest request =
@@ -225,6 +235,8 @@ public final OperationsClient getOperationsClient() {
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentUnderstandingServiceClient documentUnderstandingServiceClient =
* DocumentUnderstandingServiceClient.create()) {
* BatchProcessDocumentsRequest request =
@@ -254,6 +266,8 @@ public final OperationsClient getOperationsClient() {
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentUnderstandingServiceClient documentUnderstandingServiceClient =
* DocumentUnderstandingServiceClient.create()) {
* BatchProcessDocumentsRequest request =
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 76f4afe4..1bb96e4f 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 2021 Google LLC
+ * Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -51,6 +51,8 @@
* For example, to set the total timeout of batchProcessDocuments to 30 seconds:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* DocumentUnderstandingServiceSettings.Builder documentUnderstandingServiceSettingsBuilder =
* DocumentUnderstandingServiceSettings.newBuilder();
* documentUnderstandingServiceSettingsBuilder
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 da036b90..ed5c8589 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 2021 Google LLC
+ * Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,6 +26,8 @@
* Sample for DocumentUnderstandingServiceClient:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentUnderstandingServiceClient documentUnderstandingServiceClient =
* DocumentUnderstandingServiceClient.create()) {
* List requests = new ArrayList<>();
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 b5c90ec0..6dc77f35 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 2021 Google LLC
+ * Copyright 2022 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 de20a2ea..b9a3edc7 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 2021 Google LLC
+ * Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -66,6 +66,8 @@
* For example, to set the total timeout of batchProcessDocuments to 30 seconds:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* DocumentUnderstandingServiceStubSettings.Builder documentUnderstandingServiceSettingsBuilder =
* DocumentUnderstandingServiceStubSettings.newBuilder();
* documentUnderstandingServiceSettingsBuilder
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 49945fc6..0176cac0 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 2021 Google LLC
+ * Copyright 2022 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 58a06e43..41241867 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 2021 Google LLC
+ * Copyright 2022 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 bb83c05c..b9572b31 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 2021 Google LLC
+ * Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -40,6 +40,8 @@
* calls that map to API methods. Sample code to get started:
*
* {@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentUnderstandingServiceClient documentUnderstandingServiceClient =
* DocumentUnderstandingServiceClient.create()) {
* ProcessDocumentRequest request =
@@ -88,6 +90,8 @@
* To customize credentials:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* DocumentUnderstandingServiceSettings documentUnderstandingServiceSettings =
* DocumentUnderstandingServiceSettings.newBuilder()
* .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
@@ -99,6 +103,8 @@
* To customize the endpoint:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* DocumentUnderstandingServiceSettings documentUnderstandingServiceSettings =
* DocumentUnderstandingServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
* DocumentUnderstandingServiceClient documentUnderstandingServiceClient =
@@ -184,6 +190,8 @@ public final OperationsClient getOperationsClient() {
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentUnderstandingServiceClient documentUnderstandingServiceClient =
* DocumentUnderstandingServiceClient.create()) {
* List requests = new ArrayList<>();
@@ -210,6 +218,8 @@ public final OperationsClient getOperationsClient() {
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentUnderstandingServiceClient documentUnderstandingServiceClient =
* DocumentUnderstandingServiceClient.create()) {
* BatchProcessDocumentsRequest request =
@@ -238,6 +248,8 @@ public final OperationsClient getOperationsClient() {
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentUnderstandingServiceClient documentUnderstandingServiceClient =
* DocumentUnderstandingServiceClient.create()) {
* BatchProcessDocumentsRequest request =
@@ -268,6 +280,8 @@ public final OperationsClient getOperationsClient() {
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentUnderstandingServiceClient documentUnderstandingServiceClient =
* DocumentUnderstandingServiceClient.create()) {
* BatchProcessDocumentsRequest request =
@@ -294,6 +308,8 @@ public final OperationsClient getOperationsClient() {
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentUnderstandingServiceClient documentUnderstandingServiceClient =
* DocumentUnderstandingServiceClient.create()) {
* ProcessDocumentRequest request =
@@ -326,6 +342,8 @@ public final Document processDocument(ProcessDocumentRequest request) {
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentUnderstandingServiceClient documentUnderstandingServiceClient =
* DocumentUnderstandingServiceClient.create()) {
* ProcessDocumentRequest request =
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 72f1315d..8f9cc461 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 2021 Google LLC
+ * Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -51,6 +51,8 @@
* For example, to set the total timeout of processDocument to 30 seconds:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* DocumentUnderstandingServiceSettings.Builder documentUnderstandingServiceSettingsBuilder =
* DocumentUnderstandingServiceSettings.newBuilder();
* documentUnderstandingServiceSettingsBuilder
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 8390ac66..f1e6ff31 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 2021 Google LLC
+ * Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,6 +26,8 @@
* Sample for DocumentUnderstandingServiceClient:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentUnderstandingServiceClient documentUnderstandingServiceClient =
* DocumentUnderstandingServiceClient.create()) {
* ProcessDocumentRequest request =
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 faed6d2c..80f70095 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 2021 Google LLC
+ * Copyright 2022 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 eeb813c2..fd64b7cd 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 2021 Google LLC
+ * Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -68,6 +68,8 @@
* For example, to set the total timeout of processDocument to 30 seconds:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* DocumentUnderstandingServiceStubSettings.Builder documentUnderstandingServiceSettingsBuilder =
* DocumentUnderstandingServiceStubSettings.newBuilder();
* documentUnderstandingServiceSettingsBuilder
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 6e5e6ddd..2205edfe 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 2021 Google LLC
+ * Copyright 2022 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 23690e5c..fbb68c5b 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 2021 Google LLC
+ * Copyright 2022 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 afa4101a..bc6181ee 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 2021 Google LLC
+ * Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -49,6 +49,8 @@
* calls that map to API methods. Sample code to get started:
*
* {@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* ProcessorName name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
@@ -86,6 +88,8 @@
* To customize credentials:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* DocumentProcessorServiceSettings documentProcessorServiceSettings =
* DocumentProcessorServiceSettings.newBuilder()
* .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
@@ -97,6 +101,8 @@
* To customize the endpoint:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* DocumentProcessorServiceSettings documentProcessorServiceSettings =
* DocumentProcessorServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
* DocumentProcessorServiceClient documentProcessorServiceClient =
@@ -179,6 +185,8 @@ public final OperationsClient getOperationsClient() {
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* ProcessorName name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
@@ -202,6 +210,8 @@ public final ProcessResponse processDocument(ProcessorName name) {
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* String name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString();
@@ -224,6 +234,8 @@ public final ProcessResponse processDocument(String name) {
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* ProcessRequest request =
@@ -250,6 +262,8 @@ public final ProcessResponse processDocument(ProcessRequest request) {
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* ProcessRequest request =
@@ -277,6 +291,8 @@ public final UnaryCallable processDocumentCalla
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* ProcessorName name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
@@ -303,6 +319,8 @@ public final UnaryCallable processDocumentCalla
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* String name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString();
@@ -328,6 +346,8 @@ public final UnaryCallable processDocumentCalla
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* BatchProcessRequest request =
@@ -360,6 +380,8 @@ public final UnaryCallable processDocumentCalla
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* BatchProcessRequest request =
@@ -393,6 +415,8 @@ public final UnaryCallable processDocumentCalla
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* BatchProcessRequest request =
@@ -422,6 +446,8 @@ public final UnaryCallable batchProcessDocuments
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
@@ -449,6 +475,8 @@ public final FetchProcessorTypesResponse fetchProcessorTypes(LocationName parent
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
@@ -474,6 +502,8 @@ public final FetchProcessorTypesResponse fetchProcessorTypes(String parent) {
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* FetchProcessorTypesRequest request =
@@ -499,6 +529,8 @@ public final FetchProcessorTypesResponse fetchProcessorTypes(FetchProcessorTypes
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* FetchProcessorTypesRequest request =
@@ -524,6 +556,8 @@ public final FetchProcessorTypesResponse fetchProcessorTypes(FetchProcessorTypes
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
@@ -552,6 +586,8 @@ public final ListProcessorsPagedResponse listProcessors(LocationName parent) {
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
@@ -577,6 +613,8 @@ public final ListProcessorsPagedResponse listProcessors(String parent) {
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* ListProcessorsRequest request =
@@ -606,6 +644,8 @@ public final ListProcessorsPagedResponse listProcessors(ListProcessorsRequest re
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* ListProcessorsRequest request =
@@ -635,6 +675,8 @@ public final ListProcessorsPagedResponse listProcessors(ListProcessorsRequest re
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* ListProcessorsRequest request =
@@ -672,6 +714,8 @@ public final ListProcessorsPagedResponse listProcessors(ListProcessorsRequest re
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
@@ -703,6 +747,8 @@ public final Processor createProcessor(LocationName parent, Processor processor)
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
@@ -731,6 +777,8 @@ public final Processor createProcessor(String parent, Processor processor) {
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* CreateProcessorRequest request =
@@ -757,6 +805,8 @@ public final Processor createProcessor(CreateProcessorRequest request) {
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* CreateProcessorRequest request =
@@ -783,6 +833,8 @@ public final UnaryCallable createProcessorCal
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* ProcessorName name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
@@ -808,6 +860,8 @@ public final OperationFuture deleteProcessorAsyn
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* String name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString();
@@ -831,6 +885,8 @@ public final OperationFuture deleteProcessorAsyn
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* DeleteProcessorRequest request =
@@ -857,6 +913,8 @@ public final OperationFuture deleteProcessorAsyn
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* DeleteProcessorRequest request =
@@ -883,6 +941,8 @@ public final OperationFuture deleteProcessorAsyn
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* DeleteProcessorRequest request =
@@ -907,6 +967,8 @@ public final UnaryCallable deleteProcessorCal
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* EnableProcessorRequest request =
@@ -933,6 +995,8 @@ public final UnaryCallable deleteProcessorCal
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* EnableProcessorRequest request =
@@ -959,6 +1023,8 @@ public final UnaryCallable deleteProcessorCal
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* EnableProcessorRequest request =
@@ -983,6 +1049,8 @@ public final UnaryCallable enableProcessorCal
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* DisableProcessorRequest request =
@@ -1009,6 +1077,8 @@ public final UnaryCallable enableProcessorCal
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* DisableProcessorRequest request =
@@ -1035,6 +1105,8 @@ public final UnaryCallable enableProcessorCal
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* DisableProcessorRequest request =
@@ -1060,6 +1132,8 @@ public final UnaryCallable disableProcessorC
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* HumanReviewConfigName humanReviewConfig =
@@ -1090,6 +1164,8 @@ public final UnaryCallable disableProcessorC
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* String humanReviewConfig =
@@ -1118,6 +1194,8 @@ public final UnaryCallable disableProcessorC
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* ReviewDocumentRequest request =
@@ -1148,6 +1226,8 @@ public final UnaryCallable disableProcessorC
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* ReviewDocumentRequest request =
@@ -1178,6 +1258,8 @@ public final UnaryCallable disableProcessorC
* Sample code:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* ReviewDocumentRequest request =
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 031e3e18..8bac2b6b 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 2021 Google LLC
+ * Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -55,6 +55,8 @@
* For example, to set the total timeout of processDocument to 30 seconds:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* DocumentProcessorServiceSettings.Builder documentProcessorServiceSettingsBuilder =
* DocumentProcessorServiceSettings.newBuilder();
* documentProcessorServiceSettingsBuilder
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 493d1823..f221dacc 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 2021 Google LLC
+ * Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,6 +27,8 @@
* Sample for DocumentProcessorServiceClient:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
* ProcessorName name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
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 7c4a04af..c301b665 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 2021 Google LLC
+ * Copyright 2022 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 66226d2d..6e849a0a 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 2021 Google LLC
+ * Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -95,6 +95,8 @@
* For example, to set the total timeout of processDocument to 30 seconds:
*
*
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
* DocumentProcessorServiceStubSettings.Builder documentProcessorServiceSettingsBuilder =
* DocumentProcessorServiceStubSettings.newBuilder();
* documentProcessorServiceSettingsBuilder
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 9ca7d30c..f09a1e72 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 2021 Google LLC
+ * Copyright 2022 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 e2b1cb69..de767205 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 2021 Google LLC
+ * Copyright 2022 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/v1/DocumentProcessorServiceClientTest.java b/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1/DocumentProcessorServiceClientTest.java
index e90061d0..38c49f2d 100644
--- a/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1/DocumentProcessorServiceClientTest.java
+++ b/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1/DocumentProcessorServiceClientTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021 Google LLC
+ * Copyright 2022 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/v1/MockDocumentProcessorService.java b/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1/MockDocumentProcessorService.java
index 85f677e1..45a8ba1d 100644
--- a/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1/MockDocumentProcessorService.java
+++ b/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1/MockDocumentProcessorService.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021 Google LLC
+ * Copyright 2022 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/v1/MockDocumentProcessorServiceImpl.java b/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1/MockDocumentProcessorServiceImpl.java
index 3d0295a2..68f1c034 100644
--- a/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1/MockDocumentProcessorServiceImpl.java
+++ b/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1/MockDocumentProcessorServiceImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021 Google LLC
+ * Copyright 2022 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 48e5fcd1..8a12dc78 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 2021 Google LLC
+ * Copyright 2022 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 5d8415cd..cd93dcc9 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 2021 Google LLC
+ * Copyright 2022 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 49dac25a..8ca0a70d 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 2021 Google LLC
+ * Copyright 2022 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/DocumentUnderstandingServiceClientTest.java b/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta2/DocumentUnderstandingServiceClientTest.java
index bd85ba4b..d22b32ae 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 2021 Google LLC
+ * Copyright 2022 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 4b4918d1..be37d194 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 2021 Google LLC
+ * Copyright 2022 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 38d500b7..f929e60e 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 2021 Google LLC
+ * Copyright 2022 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/DocumentProcessorServiceClientTest.java b/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceClientTest.java
index be4910f6..84cc7c5a 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 2021 Google LLC
+ * Copyright 2022 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 70700599..eb2790c8 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 2021 Google LLC
+ * Copyright 2022 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 09113e55..ec085f2c 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 2021 Google LLC
+ * Copyright 2022 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/grpc-google-cloud-document-ai-v1/pom.xml b/grpc-google-cloud-document-ai-v1/pom.xml
index b4b19fcc..0cefccdc 100644
--- a/grpc-google-cloud-document-ai-v1/pom.xml
+++ b/grpc-google-cloud-document-ai-v1/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
grpc-google-cloud-document-ai-v1
- 2.4.3
+ 2.5.0
grpc-google-cloud-document-ai-v1
GRPC library for google-cloud-document-ai
com.google.cloud
google-cloud-document-ai-parent
- 2.4.3
+ 2.5.0
diff --git a/grpc-google-cloud-document-ai-v1beta1/pom.xml b/grpc-google-cloud-document-ai-v1beta1/pom.xml
index 4ea2e0a9..6af98f9e 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.16.3
+ 0.17.0
grpc-google-cloud-document-ai-v1beta1
GRPC library for grpc-google-cloud-document-ai-v1beta1
com.google.cloud
google-cloud-document-ai-parent
- 2.4.3
+ 2.5.0
diff --git a/grpc-google-cloud-document-ai-v1beta2/pom.xml b/grpc-google-cloud-document-ai-v1beta2/pom.xml
index b3a130dc..a0c82262 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.16.3
+ 0.17.0
grpc-google-cloud-document-ai-v1beta2
GRPC library for grpc-google-cloud-document-ai-v1beta2
com.google.cloud
google-cloud-document-ai-parent
- 2.4.3
+ 2.5.0
diff --git a/grpc-google-cloud-document-ai-v1beta3/pom.xml b/grpc-google-cloud-document-ai-v1beta3/pom.xml
index 338d1203..6e8e0810 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.16.3
+ 0.17.0
grpc-google-cloud-document-ai-v1beta3
GRPC library for grpc-google-cloud-document-ai-v1beta3
com.google.cloud
google-cloud-document-ai-parent
- 2.4.3
+ 2.5.0
diff --git a/pom.xml b/pom.xml
index de43de54..436788ab 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
com.google.cloud
google-cloud-document-ai-parent
pom
- 2.4.3
+ 2.5.0
Google Cloud Document AI Parent
https://github.com/googleapis/java-document-ai
@@ -14,7 +14,7 @@
com.google.cloud
google-cloud-shared-config
- 1.3.2
+ 1.4.0
@@ -61,53 +61,53 @@
com.google.api.grpc
grpc-google-cloud-document-ai-v1beta1
- 0.16.3
+ 0.17.0
com.google.api.grpc
proto-google-cloud-document-ai-v1
- 2.4.3
+ 2.5.0
com.google.api.grpc
grpc-google-cloud-document-ai-v1
- 2.4.3
+ 2.5.0
com.google.cloud
google-cloud-document-ai
- 2.4.3
+ 2.5.0
com.google.api.grpc
grpc-google-cloud-document-ai-v1beta2
- 0.16.3
+ 0.17.0
com.google.api.grpc
grpc-google-cloud-document-ai-v1beta3
- 0.16.3
+ 0.17.0
com.google.api.grpc
proto-google-cloud-document-ai-v1beta1
- 0.16.3
+ 0.17.0
com.google.api.grpc
proto-google-cloud-document-ai-v1beta2
- 0.16.3
+ 0.17.0
com.google.api.grpc
proto-google-cloud-document-ai-v1beta3
- 0.16.3
+ 0.17.0
com.google.cloud
google-cloud-shared-dependencies
- 2.10.0
+ 2.12.0
pom
import
@@ -156,7 +156,7 @@
org.apache.maven.plugins
maven-project-info-reports-plugin
- 3.2.2
+ 3.3.0
@@ -183,7 +183,7 @@
org.apache.maven.plugins
maven-javadoc-plugin
- 3.3.2
+ 3.4.0
html
diff --git a/proto-google-cloud-document-ai-v1/pom.xml b/proto-google-cloud-document-ai-v1/pom.xml
index 59bb8d1d..173a6b87 100644
--- a/proto-google-cloud-document-ai-v1/pom.xml
+++ b/proto-google-cloud-document-ai-v1/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
proto-google-cloud-document-ai-v1
- 2.4.3
+ 2.5.0
proto-google-cloud-document-ai-v1
Proto library for google-cloud-document-ai
com.google.cloud
google-cloud-document-ai-parent
- 2.4.3
+ 2.5.0
diff --git a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/BatchDocumentsInputConfig.java b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/BatchDocumentsInputConfig.java
index b54cd376..a7bd674a 100644
--- a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/BatchDocumentsInputConfig.java
+++ b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/BatchDocumentsInputConfig.java
@@ -111,6 +111,8 @@ private BatchDocumentsInputConfig(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -783,8 +785,9 @@ public Builder mergeGcsPrefix(com.google.cloud.documentai.v1.GcsPrefix value) {
} else {
if (sourceCase_ == 1) {
gcsPrefixBuilder_.mergeFrom(value);
+ } else {
+ gcsPrefixBuilder_.setMessage(value);
}
- gcsPrefixBuilder_.setMessage(value);
}
sourceCase_ = 1;
return this;
@@ -992,8 +995,9 @@ public Builder mergeGcsDocuments(com.google.cloud.documentai.v1.GcsDocuments val
} else {
if (sourceCase_ == 2) {
gcsDocumentsBuilder_.mergeFrom(value);
+ } else {
+ gcsDocumentsBuilder_.setMessage(value);
}
- gcsDocumentsBuilder_.setMessage(value);
}
sourceCase_ = 2;
return this;
diff --git a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/BatchProcessMetadata.java b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/BatchProcessMetadata.java
index 62a0e944..d1060ac9 100644
--- a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/BatchProcessMetadata.java
+++ b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/BatchProcessMetadata.java
@@ -144,6 +144,8 @@ private BatchProcessMetadata(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -660,6 +662,8 @@ private IndividualProcessStatus(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/BatchProcessRequest.java b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/BatchProcessRequest.java
index 94a9bf16..775eb6cf 100644
--- a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/BatchProcessRequest.java
+++ b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/BatchProcessRequest.java
@@ -127,6 +127,8 @@ private BatchProcessRequest(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/BatchProcessResponse.java b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/BatchProcessResponse.java
index f6177071..5a667357 100644
--- a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/BatchProcessResponse.java
+++ b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/BatchProcessResponse.java
@@ -79,6 +79,8 @@ private BatchProcessResponse(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/BoundingPoly.java b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/BoundingPoly.java
index 7c591d90..5527278c 100644
--- a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/BoundingPoly.java
+++ b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/BoundingPoly.java
@@ -106,6 +106,8 @@ private BoundingPoly(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/CommonOperationMetadata.java b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/CommonOperationMetadata.java
index 70cc4ed3..b28a63f6 100644
--- a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/CommonOperationMetadata.java
+++ b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/CommonOperationMetadata.java
@@ -126,6 +126,8 @@ private CommonOperationMetadata(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/Document.java b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/Document.java
index 3d3042cd..31f5ed59 100644
--- a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/Document.java
+++ b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/Document.java
@@ -91,8 +91,8 @@ private Document(
}
case 18:
{
- sourceCase_ = 2;
source_ = input.readBytes();
+ sourceCase_ = 2;
break;
}
case 26:
@@ -226,6 +226,8 @@ private Document(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -391,6 +393,8 @@ private ShardInfo(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -1418,6 +1422,8 @@ private Style(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -1559,6 +1565,8 @@ private FontSize(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -1664,7 +1672,7 @@ public final boolean isInitialized() {
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
- if (size_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(size_) != 0) {
output.writeFloat(1, size_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(unit_)) {
@@ -1679,7 +1687,7 @@ public int getSerializedSize() {
if (size != -1) return size;
size = 0;
- if (size_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(size_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, size_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(unit_)) {
@@ -5158,6 +5166,8 @@ private Page(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -5347,6 +5357,8 @@ private Dimension(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -5470,10 +5482,10 @@ public final boolean isInitialized() {
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
- if (width_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(width_) != 0) {
output.writeFloat(1, width_);
}
- if (height_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(height_) != 0) {
output.writeFloat(2, height_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(unit_)) {
@@ -5488,10 +5500,10 @@ public int getSerializedSize() {
if (size != -1) return size;
size = 0;
- if (width_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(width_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, width_);
}
- if (height_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(height_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, height_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(unit_)) {
@@ -6228,6 +6240,8 @@ private Image(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -7184,6 +7198,8 @@ private Matrix(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -8156,6 +8172,8 @@ private Layout(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -8573,7 +8591,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (textAnchor_ != null) {
output.writeMessage(1, getTextAnchor());
}
- if (confidence_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(confidence_) != 0) {
output.writeFloat(2, confidence_);
}
if (boundingPoly_ != null) {
@@ -8597,7 +8615,7 @@ public int getSerializedSize() {
if (textAnchor_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTextAnchor());
}
- if (confidence_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(confidence_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, confidence_);
}
if (boundingPoly_ != null) {
@@ -9823,6 +9841,8 @@ private Block(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -11557,6 +11577,8 @@ private Paragraph(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -13291,6 +13313,8 @@ private Line(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -15085,6 +15109,8 @@ private Token(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -15213,6 +15239,8 @@ private DetectedBreak(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -17902,6 +17930,8 @@ private Symbol(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -19356,6 +19386,8 @@ private VisualElement(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -21106,6 +21138,8 @@ private Table(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -21281,6 +21315,8 @@ private TableRow(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -22446,6 +22482,8 @@ private TableCell(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -26512,6 +26550,8 @@ private FormField(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -29158,6 +29198,8 @@ private DetectedLanguage(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -29270,7 +29312,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, languageCode_);
}
- if (confidence_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(confidence_) != 0) {
output.writeFloat(2, confidence_);
}
unknownFields.writeTo(output);
@@ -29285,7 +29327,7 @@ public int getSerializedSize() {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, languageCode_);
}
- if (confidence_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(confidence_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, confidence_);
}
size += unknownFields.getSerializedSize();
@@ -36483,10 +36525,10 @@ public interface EntityOrBuilder
*
*
*
- * Entity type from a schema e.g. `Address`.
+ * Required. Entity type from a schema e.g. `Address`.
*
*
- * string type = 2;
+ * string type = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The type.
*/
@@ -36495,10 +36537,10 @@ public interface EntityOrBuilder
*
*
*
- * Entity type from a schema e.g. `Address`.
+ * Required. Entity type from a schema e.g. `Address`.
*
*
- * string type = 2;
+ * string type = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for type.
*/
@@ -37003,6 +37045,8 @@ private Entity(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -37378,8 +37422,8 @@ private NormalizedValue(
}
case 48:
{
- structuredValueCase_ = 6;
structuredValue_ = input.readBool();
+ structuredValueCase_ = 6;
break;
}
default:
@@ -37393,6 +37437,8 @@ private NormalizedValue(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -38401,8 +38447,9 @@ public Builder mergeMoneyValue(com.google.type.Money value) {
} else {
if (structuredValueCase_ == 2) {
moneyValueBuilder_.mergeFrom(value);
+ } else {
+ moneyValueBuilder_.setMessage(value);
}
- moneyValueBuilder_.setMessage(value);
}
structuredValueCase_ = 2;
return this;
@@ -38613,8 +38660,9 @@ public Builder mergeDateValue(com.google.type.Date value) {
} else {
if (structuredValueCase_ == 3) {
dateValueBuilder_.mergeFrom(value);
+ } else {
+ dateValueBuilder_.setMessage(value);
}
- dateValueBuilder_.setMessage(value);
}
structuredValueCase_ = 3;
return this;
@@ -38825,8 +38873,9 @@ public Builder mergeDatetimeValue(com.google.type.DateTime value) {
} else {
if (structuredValueCase_ == 4) {
datetimeValueBuilder_.mergeFrom(value);
+ } else {
+ datetimeValueBuilder_.setMessage(value);
}
- datetimeValueBuilder_.setMessage(value);
}
structuredValueCase_ = 4;
return this;
@@ -39040,8 +39089,9 @@ public Builder mergeAddressValue(com.google.type.PostalAddress value) {
} else {
if (structuredValueCase_ == 5) {
addressValueBuilder_.mergeFrom(value);
+ } else {
+ addressValueBuilder_.setMessage(value);
}
- addressValueBuilder_.setMessage(value);
}
structuredValueCase_ = 5;
return this;
@@ -39481,10 +39531,10 @@ public com.google.cloud.documentai.v1.Document.TextAnchorOrBuilder getTextAnchor
*
*
*
- * Entity type from a schema e.g. `Address`.
+ * Required. Entity type from a schema e.g. `Address`.
*
*
- * string type = 2;
+ * string type = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The type.
*/
@@ -39504,10 +39554,10 @@ public java.lang.String getType() {
*
*
*
- * Entity type from a schema e.g. `Address`.
+ * Required. Entity type from a schema e.g. `Address`.
*
*
- * string type = 2;
+ * string type = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for type.
*/
@@ -39998,7 +40048,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mentionId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, mentionId_);
}
- if (confidence_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(confidence_) != 0) {
output.writeFloat(5, confidence_);
}
if (pageAnchor_ != null) {
@@ -40040,7 +40090,7 @@ public int getSerializedSize() {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mentionId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, mentionId_);
}
- if (confidence_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(confidence_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(5, confidence_);
}
if (pageAnchor_ != null) {
@@ -40771,10 +40821,10 @@ public com.google.cloud.documentai.v1.Document.TextAnchorOrBuilder getTextAnchor
*
*
*
- * Entity type from a schema e.g. `Address`.
+ * Required. Entity type from a schema e.g. `Address`.
*
*
- * string type = 2;
+ * string type = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The type.
*/
@@ -40793,10 +40843,10 @@ public java.lang.String getType() {
*
*
*
- * Entity type from a schema e.g. `Address`.
+ * Required. Entity type from a schema e.g. `Address`.
*
*
- * string type = 2;
+ * string type = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for type.
*/
@@ -40815,10 +40865,10 @@ public com.google.protobuf.ByteString getTypeBytes() {
*
*
*
- * Entity type from a schema e.g. `Address`.
+ * Required. Entity type from a schema e.g. `Address`.
*
*
- * string type = 2;
+ * string type = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The type to set.
* @return This builder for chaining.
@@ -40836,10 +40886,10 @@ public Builder setType(java.lang.String value) {
*
*
*
- * Entity type from a schema e.g. `Address`.
+ * Required. Entity type from a schema e.g. `Address`.
*
*
- * string type = 2;
+ * string type = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
@@ -40853,10 +40903,10 @@ public Builder clearType() {
*
*
*
- * Entity type from a schema e.g. `Address`.
+ * Required. Entity type from a schema e.g. `Address`.
*
*
- * string type = 2;
+ * string type = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The bytes for type to set.
* @return This builder for chaining.
@@ -42589,6 +42639,8 @@ private EntityRelation(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -43671,6 +43723,8 @@ private TextAnchor(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -43807,6 +43861,8 @@ private TextSegment(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -45645,6 +45701,8 @@ private PageAnchor(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -45737,6 +45795,8 @@ public interface PageRefOrBuilder
* string layout_id = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];
*
*
+ * @deprecated google.cloud.documentai.v1.Document.PageAnchor.PageRef.layout_id is deprecated.
+ * See google/cloud/documentai/v1/document.proto;l=623
* @return The layoutId.
*/
@java.lang.Deprecated
@@ -45753,6 +45813,8 @@ public interface PageRefOrBuilder
* string layout_id = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];
*
*
+ * @deprecated google.cloud.documentai.v1.Document.PageAnchor.PageRef.layout_id is deprecated.
+ * See google/cloud/documentai/v1/document.proto;l=623
* @return The bytes for layoutId.
*/
@java.lang.Deprecated
@@ -45920,6 +45982,8 @@ private PageRef(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -46322,6 +46386,8 @@ public com.google.cloud.documentai.v1.Document.PageAnchor.PageRef.LayoutType get
* string layout_id = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];
*
*
+ * @deprecated google.cloud.documentai.v1.Document.PageAnchor.PageRef.layout_id is deprecated.
+ * See google/cloud/documentai/v1/document.proto;l=623
* @return The layoutId.
*/
@java.lang.Override
@@ -46349,6 +46415,8 @@ public java.lang.String getLayoutId() {
* string layout_id = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];
*
*
+ * @deprecated google.cloud.documentai.v1.Document.PageAnchor.PageRef.layout_id is deprecated.
+ * See google/cloud/documentai/v1/document.proto;l=623
* @return The bytes for layoutId.
*/
@java.lang.Override
@@ -46470,7 +46538,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (boundingPoly_ != null) {
output.writeMessage(4, getBoundingPoly());
}
- if (confidence_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(confidence_) != 0) {
output.writeFloat(5, confidence_);
}
unknownFields.writeTo(output);
@@ -46497,7 +46565,7 @@ public int getSerializedSize() {
if (boundingPoly_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getBoundingPoly());
}
- if (confidence_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(confidence_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(5, confidence_);
}
size += unknownFields.getSerializedSize();
@@ -47038,6 +47106,8 @@ public Builder clearLayoutType() {
* string layout_id = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];
*
*
+ * @deprecated google.cloud.documentai.v1.Document.PageAnchor.PageRef.layout_id is
+ * deprecated. See google/cloud/documentai/v1/document.proto;l=623
* @return The layoutId.
*/
@java.lang.Deprecated
@@ -47064,6 +47134,8 @@ public java.lang.String getLayoutId() {
* string layout_id = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];
*
*
+ * @deprecated google.cloud.documentai.v1.Document.PageAnchor.PageRef.layout_id is
+ * deprecated. See google/cloud/documentai/v1/document.proto;l=623
* @return The bytes for layoutId.
*/
@java.lang.Deprecated
@@ -47090,6 +47162,8 @@ public com.google.protobuf.ByteString getLayoutIdBytes() {
* string layout_id = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];
*
*
+ * @deprecated google.cloud.documentai.v1.Document.PageAnchor.PageRef.layout_id is
+ * deprecated. See google/cloud/documentai/v1/document.proto;l=623
* @param value The layoutId to set.
* @return This builder for chaining.
*/
@@ -47115,6 +47189,8 @@ public Builder setLayoutId(java.lang.String value) {
* string layout_id = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];
*
*
+ * @deprecated google.cloud.documentai.v1.Document.PageAnchor.PageRef.layout_id is
+ * deprecated. See google/cloud/documentai/v1/document.proto;l=623
* @return This builder for chaining.
*/
@java.lang.Deprecated
@@ -47136,6 +47212,8 @@ public Builder clearLayoutId() {
* string layout_id = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];
*
*
+ * @deprecated google.cloud.documentai.v1.Document.PageAnchor.PageRef.layout_id is
+ * deprecated. See google/cloud/documentai/v1/document.proto;l=623
* @param value The bytes for layoutId to set.
* @return This builder for chaining.
*/
@@ -48377,6 +48455,8 @@ public interface ProvenanceOrBuilder
*
* int32 id = 2 [deprecated = true];
*
+ * @deprecated google.cloud.documentai.v1.Document.Provenance.id is deprecated. See
+ * google/cloud/documentai/v1/document.proto;l=687
* @return The id.
*/
@java.lang.Deprecated
@@ -48557,6 +48637,8 @@ private Provenance(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -48877,6 +48959,8 @@ public interface ParentOrBuilder
*
* int32 id = 2 [deprecated = true];
*
+ * @deprecated google.cloud.documentai.v1.Document.Provenance.Parent.id is deprecated. See
+ * google/cloud/documentai/v1/document.proto;l=653
* @return The id.
*/
@java.lang.Deprecated
@@ -48959,6 +49043,8 @@ private Parent(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -49031,6 +49117,8 @@ public int getIndex() {
*
* int32 id = 2 [deprecated = true];
*
+ * @deprecated google.cloud.documentai.v1.Document.Provenance.Parent.id is deprecated. See
+ * google/cloud/documentai/v1/document.proto;l=653
* @return The id.
*/
@java.lang.Override
@@ -49512,6 +49600,8 @@ public Builder clearIndex() {
*
* int32 id = 2 [deprecated = true];
*
+ * @deprecated google.cloud.documentai.v1.Document.Provenance.Parent.id is deprecated. See
+ * google/cloud/documentai/v1/document.proto;l=653
* @return The id.
*/
@java.lang.Override
@@ -49528,6 +49618,8 @@ public int getId() {
*
* int32 id = 2 [deprecated = true];
*
+ * @deprecated google.cloud.documentai.v1.Document.Provenance.Parent.id is deprecated. See
+ * google/cloud/documentai/v1/document.proto;l=653
* @param value The id to set.
* @return This builder for chaining.
*/
@@ -49547,6 +49639,8 @@ public Builder setId(int value) {
*
* int32 id = 2 [deprecated = true];
*
+ * @deprecated google.cloud.documentai.v1.Document.Provenance.Parent.id is deprecated. See
+ * google/cloud/documentai/v1/document.proto;l=653
* @return This builder for chaining.
*/
@java.lang.Deprecated
@@ -49640,6 +49734,8 @@ public int getRevision() {
*
* int32 id = 2 [deprecated = true];
*
+ * @deprecated google.cloud.documentai.v1.Document.Provenance.id is deprecated. See
+ * google/cloud/documentai/v1/document.proto;l=687
* @return The id.
*/
@java.lang.Override
@@ -50237,6 +50333,8 @@ public Builder clearRevision() {
*
* int32 id = 2 [deprecated = true];
*
+ * @deprecated google.cloud.documentai.v1.Document.Provenance.id is deprecated. See
+ * google/cloud/documentai/v1/document.proto;l=687
* @return The id.
*/
@java.lang.Override
@@ -50254,6 +50352,8 @@ public int getId() {
*
* int32 id = 2 [deprecated = true];
*
+ * @deprecated google.cloud.documentai.v1.Document.Provenance.id is deprecated. See
+ * google/cloud/documentai/v1/document.proto;l=687
* @param value The id to set.
* @return This builder for chaining.
*/
@@ -50274,6 +50374,8 @@ public Builder setId(int value) {
*
* int32 id = 2 [deprecated = true];
*
+ * @deprecated google.cloud.documentai.v1.Document.Provenance.id is deprecated. See
+ * google/cloud/documentai/v1/document.proto;l=687
* @return This builder for chaining.
*/
@java.lang.Deprecated
@@ -51163,6 +51265,8 @@ private Revision(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -51324,6 +51428,8 @@ private HumanReview(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -54145,6 +54251,8 @@ private TextChange(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/DocumentOutputConfig.java b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/DocumentOutputConfig.java
index c8dc03a9..e80341a7 100644
--- a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/DocumentOutputConfig.java
+++ b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/DocumentOutputConfig.java
@@ -103,6 +103,8 @@ private DocumentOutputConfig(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -226,6 +228,8 @@ private GcsOutputConfig(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -1379,8 +1383,9 @@ public Builder mergeGcsOutputConfig(
} else {
if (destinationCase_ == 1) {
gcsOutputConfigBuilder_.mergeFrom(value);
+ } else {
+ gcsOutputConfigBuilder_.setMessage(value);
}
- gcsOutputConfigBuilder_.setMessage(value);
}
destinationCase_ = 1;
return this;
diff --git a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/DocumentProto.java b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/DocumentProto.java
index 01d2c74e..a56b7280 100644
--- a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/DocumentProto.java
+++ b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/DocumentProto.java
@@ -176,7 +176,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "proto\032\027google/type/color.proto\032\026google/t"
+ "ype/date.proto\032\032google/type/datetime.pro"
+ "to\032\027google/type/money.proto\032 google/type"
- + "/postal_address.proto\"\257;\n\010Document\022\022\n\003ur"
+ + "/postal_address.proto\"\264;\n\010Document\022\022\n\003ur"
+ "i\030\001 \001(\tB\003\340A\001H\000\022\026\n\007content\030\002 \001(\014B\003\340A\001H\000\022\021"
+ "\n\tmime_type\030\003 \001(\t\022\021\n\004text\030\004 \001(\tB\003\340A\001\022?\n\013"
+ "text_styles\030\005 \003(\0132*.google.cloud.documen"
@@ -307,72 +307,72 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "rovenance\030\010 \001(\0132/.google.cloud.documenta"
+ "i.v1.Document.Provenance\032=\n\020DetectedLang"
+ "uage\022\025\n\rlanguage_code\030\001 \001(\t\022\022\n\nconfidenc"
- + "e\030\002 \001(\002\032\233\006\n\006Entity\022I\n\013text_anchor\030\001 \001(\0132"
+ + "e\030\002 \001(\002\032\240\006\n\006Entity\022I\n\013text_anchor\030\001 \001(\0132"
+ "/.google.cloud.documentai.v1.Document.Te"
- + "xtAnchorB\003\340A\001\022\014\n\004type\030\002 \001(\t\022\031\n\014mention_t"
- + "ext\030\003 \001(\tB\003\340A\001\022\027\n\nmention_id\030\004 \001(\tB\003\340A\001\022"
- + "\027\n\nconfidence\030\005 \001(\002B\003\340A\001\022I\n\013page_anchor\030"
- + "\006 \001(\0132/.google.cloud.documentai.v1.Docum"
- + "ent.PageAnchorB\003\340A\001\022\017\n\002id\030\007 \001(\tB\003\340A\001\022Z\n\020"
- + "normalized_value\030\t \001(\0132;.google.cloud.do"
- + "cumentai.v1.Document.Entity.NormalizedVa"
- + "lueB\003\340A\001\022D\n\nproperties\030\n \003(\0132+.google.cl"
- + "oud.documentai.v1.Document.EntityB\003\340A\001\022H"
- + "\n\nprovenance\030\013 \001(\0132/.google.cloud.docume"
- + "ntai.v1.Document.ProvenanceB\003\340A\001\022\025\n\010reda"
- + "cted\030\014 \001(\010B\003\340A\001\032\213\002\n\017NormalizedValue\022)\n\013m"
- + "oney_value\030\002 \001(\0132\022.google.type.MoneyH\000\022\'"
- + "\n\ndate_value\030\003 \001(\0132\021.google.type.DateH\000\022"
- + "/\n\016datetime_value\030\004 \001(\0132\025.google.type.Da"
- + "teTimeH\000\0223\n\raddress_value\030\005 \001(\0132\032.google"
- + ".type.PostalAddressH\000\022\027\n\rboolean_value\030\006"
- + " \001(\010H\000\022\021\n\004text\030\001 \001(\tB\003\340A\001B\022\n\020structured_"
- + "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\250\001\n\nTextAnchor\022R\n\rtext_segments\030\001 \003(\0132;"
+ + "xtAnchorB\003\340A\001\022\021\n\004type\030\002 \001(\tB\003\340A\002\022\031\n\014ment"
+ + "ion_text\030\003 \001(\tB\003\340A\001\022\027\n\nmention_id\030\004 \001(\tB"
+ + "\003\340A\001\022\027\n\nconfidence\030\005 \001(\002B\003\340A\001\022I\n\013page_an"
+ + "chor\030\006 \001(\0132/.google.cloud.documentai.v1."
+ + "Document.PageAnchorB\003\340A\001\022\017\n\002id\030\007 \001(\tB\003\340A"
+ + "\001\022Z\n\020normalized_value\030\t \001(\0132;.google.clo"
+ + "ud.documentai.v1.Document.Entity.Normali"
+ + "zedValueB\003\340A\001\022D\n\nproperties\030\n \003(\0132+.goog"
+ + "le.cloud.documentai.v1.Document.EntityB\003"
+ + "\340A\001\022H\n\nprovenance\030\013 \001(\0132/.google.cloud.d"
+ + "ocumentai.v1.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\001B\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\250\001\n\nTextAnchor\022R\n\rtext_segments\030\001 "
+ + "\003(\0132;.google.cloud.documentai.v1.Documen"
+ + "t.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\330\003\n\nPageAnchor\022J\n\tpage_"
+ + "refs\030\001 \003(\01327.google.cloud.documentai.v1."
+ + "Document.PageAnchor.PageRef\032\375\002\n\007PageRef\022"
+ + "\021\n\004page\030\001 \001(\003B\003\340A\002\022\\\n\013layout_type\030\002 \001(\0162"
+ + "B.google.cloud.documentai.v1.Document.Pa"
+ + "geAnchor.PageRef.LayoutTypeB\003\340A\001\022\030\n\tlayo"
+ + "ut_id\030\003 \001(\tB\005\030\001\340A\001\022D\n\rbounding_poly\030\004 \001("
+ + "\0132(.google.cloud.documentai.v1.BoundingP"
+ + "olyB\003\340A\001\022\027\n\nconfidence\030\005 \001(\002B\003\340A\001\"\207\001\n\nLa"
+ + "youtType\022\033\n\027LAYOUT_TYPE_UNSPECIFIED\020\000\022\t\n"
+ + "\005BLOCK\020\001\022\r\n\tPARAGRAPH\020\002\022\010\n\004LINE\020\003\022\t\n\005TOK"
+ + "EN\020\004\022\022\n\016VISUAL_ELEMENT\020\005\022\t\n\005TABLE\020\006\022\016\n\nF"
+ + "ORM_FIELD\020\007\032\214\003\n\nProvenance\022\020\n\010revision\030\001"
+ + " \001(\005\022\016\n\002id\030\002 \001(\005B\002\030\001\022G\n\007parents\030\003 \003(\01326."
+ + "google.cloud.documentai.v1.Document.Prov"
+ + "enance.Parent\022K\n\004type\030\004 \001(\0162=.google.clo"
+ + "ud.documentai.v1.Document.Provenance.Ope"
+ + "rationType\0329\n\006Parent\022\020\n\010revision\030\001 \001(\005\022\r"
+ + "\n\005index\030\003 \001(\005\022\016\n\002id\030\002 \001(\005B\002\030\001\"\212\001\n\rOperat"
+ + "ionType\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\016EVA"
+ + "L_REQUESTED\020\004\022\021\n\rEVAL_APPROVED\020\005\022\020\n\014EVAL"
+ + "_SKIPPED\020\006\032\215\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\006par"
+ + "ent\030\002 \003(\005\022/\n\013create_time\030\003 \001(\0132\032.google."
+ + "protobuf.Timestamp\022O\n\014human_review\030\006 \001(\013"
+ + "29.google.cloud.documentai.v1.Document.R"
+ + "evision.HumanReview\0323\n\013HumanReview\022\r\n\005st"
+ + "ate\030\001 \001(\t\022\025\n\rstate_message\030\002 \001(\tB\010\n\006sour"
+ + "ce\032\255\001\n\nTextChange\022D\n\013text_anchor\030\001 \001(\0132/"
+ ".google.cloud.documentai.v1.Document.Tex"
- + "tAnchor.TextSegment\022\017\n\007content\030\002 \001(\t\0325\n\013"
- + "TextSegment\022\023\n\013start_index\030\001 \001(\003\022\021\n\tend_"
- + "index\030\002 \001(\003\032\330\003\n\nPageAnchor\022J\n\tpage_refs\030"
- + "\001 \003(\01327.google.cloud.documentai.v1.Docum"
- + "ent.PageAnchor.PageRef\032\375\002\n\007PageRef\022\021\n\004pa"
- + "ge\030\001 \001(\003B\003\340A\002\022\\\n\013layout_type\030\002 \001(\0162B.goo"
- + "gle.cloud.documentai.v1.Document.PageAnc"
- + "hor.PageRef.LayoutTypeB\003\340A\001\022\030\n\tlayout_id"
- + "\030\003 \001(\tB\005\030\001\340A\001\022D\n\rbounding_poly\030\004 \001(\0132(.g"
- + "oogle.cloud.documentai.v1.BoundingPolyB\003"
- + "\340A\001\022\027\n\nconfidence\030\005 \001(\002B\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\214\003\n\nProvenance\022\020\n\010revision\030\001 \001(\005\022"
- + "\016\n\002id\030\002 \001(\005B\002\030\001\022G\n\007parents\030\003 \003(\01326.googl"
- + "e.cloud.documentai.v1.Document.Provenanc"
- + "e.Parent\022K\n\004type\030\004 \001(\0162=.google.cloud.do"
- + "cumentai.v1.Document.Provenance.Operatio"
- + "nType\0329\n\006Parent\022\020\n\010revision\030\001 \001(\005\022\r\n\005ind"
- + "ex\030\003 \001(\005\022\016\n\002id\030\002 \001(\005B\002\030\001\"\212\001\n\rOperationTy"
- + "pe\022\036\n\032OPERATION_TYPE_UNSPECIFIED\020\000\022\007\n\003AD"
- + "D\020\001\022\n\n\006REMOVE\020\002\022\013\n\007REPLACE\020\003\022\022\n\016EVAL_REQ"
- + "UESTED\020\004\022\021\n\rEVAL_APPROVED\020\005\022\020\n\014EVAL_SKIP"
- + "PED\020\006\032\215\002\n\010Revision\022\017\n\005agent\030\004 \001(\tH\000\022\023\n\tp"
- + "rocessor\030\005 \001(\tH\000\022\n\n\002id\030\001 \001(\t\022\016\n\006parent\030\002"
- + " \003(\005\022/\n\013create_time\030\003 \001(\0132\032.google.proto"
- + "buf.Timestamp\022O\n\014human_review\030\006 \001(\01329.go"
- + "ogle.cloud.documentai.v1.Document.Revisi"
- + "on.HumanReview\0323\n\013HumanReview\022\r\n\005state\030\001"
- + " \001(\t\022\025\n\rstate_message\030\002 \001(\tB\010\n\006source\032\255\001"
- + "\n\nTextChange\022D\n\013text_anchor\030\001 \001(\0132/.goog"
- + "le.cloud.documentai.v1.Document.TextAnch"
- + "or\022\024\n\014changed_text\030\002 \001(\t\022C\n\nprovenance\030\003"
- + " \003(\0132/.google.cloud.documentai.v1.Docume"
- + "nt.ProvenanceB\010\n\006sourceB\321\001\n\036com.google.c"
- + "loud.documentai.v1B\rDocumentProtoP\001ZDgoo"
- + "gle.golang.org/genproto/googleapis/cloud"
- + "/documentai/v1;documentai\252\002\032Google.Cloud"
- + ".DocumentAI.V1\312\002\032Google\\Cloud\\DocumentAI"
- + "\\V1\352\002\035Google::Cloud::DocumentAI::V1b\006pro"
- + "to3"
+ + "tAnchor\022\024\n\014changed_text\030\002 \001(\t\022C\n\nprovena"
+ + "nce\030\003 \003(\0132/.google.cloud.documentai.v1.D"
+ + "ocument.ProvenanceB\010\n\006sourceB\321\001\n\036com.goo"
+ + "gle.cloud.documentai.v1B\rDocumentProtoP\001"
+ + "ZDgoogle.golang.org/genproto/googleapis/"
+ + "cloud/documentai/v1;documentai\252\002\032Google."
+ + "Cloud.DocumentAI.V1\312\002\032Google\\Cloud\\Docum"
+ + "entAI\\V1\352\002\035Google::Cloud::DocumentAI::V1"
+ + "b\006proto3"
};
descriptor =
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
diff --git a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/GcsDocument.java b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/GcsDocument.java
index c08e0b7d..e1a8c65a 100644
--- a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/GcsDocument.java
+++ b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/GcsDocument.java
@@ -96,6 +96,8 @@ private GcsDocument(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/GcsDocuments.java b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/GcsDocuments.java
index 760d0776..57d33d5c 100644
--- a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/GcsDocuments.java
+++ b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/GcsDocuments.java
@@ -93,6 +93,8 @@ private GcsDocuments(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/GcsPrefix.java b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/GcsPrefix.java
index beb4b0bd..e02aa682 100644
--- a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/GcsPrefix.java
+++ b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/GcsPrefix.java
@@ -88,6 +88,8 @@ private GcsPrefix(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/HumanReviewConfigName.java b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/HumanReviewConfigName.java
index d333169d..61f8cd15 100644
--- a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/HumanReviewConfigName.java
+++ b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/HumanReviewConfigName.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021 Google LLC
+ * Copyright 2022 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-v1/src/main/java/com/google/cloud/documentai/v1/HumanReviewStatus.java b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/HumanReviewStatus.java
index 7acd7d92..c6d46425 100644
--- a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/HumanReviewStatus.java
+++ b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/HumanReviewStatus.java
@@ -104,6 +104,8 @@ private HumanReviewStatus(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/NormalizedVertex.java b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/NormalizedVertex.java
index d861d18d..ee01cf57 100644
--- a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/NormalizedVertex.java
+++ b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/NormalizedVertex.java
@@ -91,6 +91,8 @@ private NormalizedVertex(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -164,10 +166,10 @@ public final boolean isInitialized() {
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
- if (x_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(x_) != 0) {
output.writeFloat(1, x_);
}
- if (y_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(y_) != 0) {
output.writeFloat(2, y_);
}
unknownFields.writeTo(output);
@@ -179,10 +181,10 @@ public int getSerializedSize() {
if (size != -1) return size;
size = 0;
- if (x_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(x_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, x_);
}
- if (y_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(y_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, y_);
}
size += unknownFields.getSerializedSize();
diff --git a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessRequest.java b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessRequest.java
index f859508f..f91552cc 100644
--- a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessRequest.java
+++ b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessRequest.java
@@ -125,6 +125,8 @@ private ProcessRequest(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -898,8 +900,9 @@ public Builder mergeInlineDocument(com.google.cloud.documentai.v1.Document value
} else {
if (sourceCase_ == 4) {
inlineDocumentBuilder_.mergeFrom(value);
+ } else {
+ inlineDocumentBuilder_.setMessage(value);
}
- inlineDocumentBuilder_.setMessage(value);
}
sourceCase_ = 4;
return this;
@@ -1107,8 +1110,9 @@ public Builder mergeRawDocument(com.google.cloud.documentai.v1.RawDocument value
} else {
if (sourceCase_ == 5) {
rawDocumentBuilder_.mergeFrom(value);
+ } else {
+ rawDocumentBuilder_.setMessage(value);
}
- rawDocumentBuilder_.setMessage(value);
}
sourceCase_ = 5;
return this;
diff --git a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessResponse.java b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessResponse.java
index f48a66dd..3d76f4a5 100644
--- a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessResponse.java
+++ b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessResponse.java
@@ -111,6 +111,8 @@ private ProcessResponse(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessorName.java b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessorName.java
index ded0c8bc..74f4ad41 100644
--- a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessorName.java
+++ b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessorName.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021 Google LLC
+ * Copyright 2022 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-v1/src/main/java/com/google/cloud/documentai/v1/RawDocument.java b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/RawDocument.java
index c5d412e7..2ce1098b 100644
--- a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/RawDocument.java
+++ b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/RawDocument.java
@@ -94,6 +94,8 @@ private RawDocument(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ReviewDocumentOperationMetadata.java b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ReviewDocumentOperationMetadata.java
index 700cfe3b..7f971b53 100644
--- a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ReviewDocumentOperationMetadata.java
+++ b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ReviewDocumentOperationMetadata.java
@@ -106,6 +106,8 @@ private ReviewDocumentOperationMetadata(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ReviewDocumentRequest.java b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ReviewDocumentRequest.java
index 93f8cff6..3018a6ca 100644
--- a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ReviewDocumentRequest.java
+++ b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ReviewDocumentRequest.java
@@ -117,6 +117,8 @@ private ReviewDocumentRequest(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -1006,8 +1008,9 @@ public Builder mergeInlineDocument(com.google.cloud.documentai.v1.Document value
} else {
if (sourceCase_ == 4) {
inlineDocumentBuilder_.mergeFrom(value);
+ } else {
+ inlineDocumentBuilder_.setMessage(value);
}
- inlineDocumentBuilder_.setMessage(value);
}
sourceCase_ = 4;
return this;
diff --git a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ReviewDocumentResponse.java b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ReviewDocumentResponse.java
index 7be44a10..0b3e0582 100644
--- a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ReviewDocumentResponse.java
+++ b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ReviewDocumentResponse.java
@@ -88,6 +88,8 @@ private ReviewDocumentResponse(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/Vertex.java b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/Vertex.java
index ba7c7be5..8186804f 100644
--- a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/Vertex.java
+++ b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/Vertex.java
@@ -90,6 +90,8 @@ private Vertex(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1/src/main/proto/google/cloud/documentai/v1/document.proto b/proto-google-cloud-document-ai-v1/src/main/proto/google/cloud/documentai/v1/document.proto
index aed16a99..4512affa 100644
--- a/proto-google-cloud-document-ai-v1/src/main/proto/google/cloud/documentai/v1/document.proto
+++ b/proto-google-cloud-document-ai-v1/src/main/proto/google/cloud/documentai/v1/document.proto
@@ -476,8 +476,8 @@ message Document {
// [Document.text][google.cloud.documentai.v1.Document.text].
TextAnchor text_anchor = 1 [(google.api.field_behavior) = OPTIONAL];
- // Entity type from a schema e.g. `Address`.
- string type = 2;
+ // Required. Entity type from a schema e.g. `Address`.
+ string type = 2 [(google.api.field_behavior) = REQUIRED];
// Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`. If
// the entity is not present in the document, this field will be empty.
diff --git a/proto-google-cloud-document-ai-v1beta1/pom.xml b/proto-google-cloud-document-ai-v1beta1/pom.xml
index da60b4ce..b04c7dc8 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.16.3
+ 0.17.0
proto-google-cloud-document-ai-v1beta1
PROTO library for proto-google-cloud-document-ai-v1beta1
com.google.cloud
google-cloud-document-ai-parent
- 2.4.3
+ 2.5.0
diff --git a/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/BatchProcessDocumentsRequest.java b/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/BatchProcessDocumentsRequest.java
index b0ddfe8e..134cef61 100644
--- a/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/BatchProcessDocumentsRequest.java
+++ b/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/BatchProcessDocumentsRequest.java
@@ -104,6 +104,8 @@ private BatchProcessDocumentsRequest(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/BatchProcessDocumentsResponse.java b/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/BatchProcessDocumentsResponse.java
index afe5b1f2..3c7779ae 100644
--- a/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/BatchProcessDocumentsResponse.java
+++ b/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/BatchProcessDocumentsResponse.java
@@ -97,6 +97,8 @@ private BatchProcessDocumentsResponse(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/BoundingPoly.java b/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/BoundingPoly.java
index 2f378bf8..b62ac936 100644
--- a/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/BoundingPoly.java
+++ b/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/BoundingPoly.java
@@ -107,6 +107,8 @@ private BoundingPoly(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
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 5647483d..008dd867 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
@@ -89,8 +89,8 @@ private Document(
}
case 18:
{
- sourceCase_ = 2;
source_ = input.readBytes();
+ sourceCase_ = 2;
break;
}
case 26:
@@ -202,6 +202,8 @@ private Document(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -361,6 +363,8 @@ private ShardInfo(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -1390,6 +1394,8 @@ private Style(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -1531,6 +1537,8 @@ private FontSize(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -1636,7 +1644,7 @@ public final boolean isInitialized() {
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
- if (size_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(size_) != 0) {
output.writeFloat(1, size_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(unit_)) {
@@ -1651,7 +1659,7 @@ public int getSerializedSize() {
if (size != -1) return size;
size = 0;
- if (size_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(size_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, size_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(unit_)) {
@@ -4923,6 +4931,8 @@ private Page(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -5106,6 +5116,8 @@ private Dimension(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -5229,10 +5241,10 @@ public final boolean isInitialized() {
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
- if (width_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(width_) != 0) {
output.writeFloat(1, width_);
}
- if (height_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(height_) != 0) {
output.writeFloat(2, height_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(unit_)) {
@@ -5247,10 +5259,10 @@ public int getSerializedSize() {
if (size != -1) return size;
size = 0;
- if (width_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(width_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, width_);
}
- if (height_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(height_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, height_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(unit_)) {
@@ -6075,6 +6087,8 @@ private Layout(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -6496,7 +6510,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (textAnchor_ != null) {
output.writeMessage(1, getTextAnchor());
}
- if (confidence_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(confidence_) != 0) {
output.writeFloat(2, confidence_);
}
if (boundingPoly_ != null) {
@@ -6520,7 +6534,7 @@ public int getSerializedSize() {
if (textAnchor_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTextAnchor());
}
- if (confidence_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(confidence_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, confidence_);
}
if (boundingPoly_ != null) {
@@ -7706,6 +7720,8 @@ private Block(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -9135,6 +9151,8 @@ private Paragraph(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -10571,6 +10589,8 @@ private Line(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -12064,6 +12084,8 @@ private Token(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -12194,6 +12216,8 @@ private DetectedBreak(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -14705,6 +14729,8 @@ private VisualElement(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -16479,6 +16505,8 @@ private Table(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -16657,6 +16685,8 @@ private TableRow(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -17851,6 +17881,8 @@ private TableCell(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -21905,6 +21937,8 @@ private FormField(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -24126,6 +24160,8 @@ private DetectedLanguage(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -24238,7 +24274,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, languageCode_);
}
- if (confidence_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(confidence_) != 0) {
output.writeFloat(2, confidence_);
}
unknownFields.writeTo(output);
@@ -24253,7 +24289,7 @@ public int getSerializedSize() {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, languageCode_);
}
- if (confidence_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(confidence_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, confidence_);
}
size += unknownFields.getSerializedSize();
@@ -30054,10 +30090,10 @@ public interface EntityOrBuilder
*
*
*
- * Entity type from a schema e.g. `Address`.
+ * Required. Entity type from a schema e.g. `Address`.
*
*
- * string type = 2;
+ * string type = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The type.
*/
@@ -30066,10 +30102,10 @@ public interface EntityOrBuilder
*
*
*
- * Entity type from a schema e.g. `Address`.
+ * Required. Entity type from a schema e.g. `Address`.
*
*
- * string type = 2;
+ * string type = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for type.
*/
@@ -30231,6 +30267,8 @@ private Entity(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -30315,10 +30353,10 @@ public com.google.cloud.documentai.v1beta1.Document.TextAnchor getTextAnchor() {
*
*
*
- * Entity type from a schema e.g. `Address`.
+ * Required. Entity type from a schema e.g. `Address`.
*
*
- * string type = 2;
+ * string type = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The type.
*/
@@ -30338,10 +30376,10 @@ public java.lang.String getType() {
*
*
*
- * Entity type from a schema e.g. `Address`.
+ * Required. Entity type from a schema e.g. `Address`.
*
*
- * string type = 2;
+ * string type = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for type.
*/
@@ -31054,10 +31092,10 @@ public Builder clearTextAnchor() {
*
*
*
- * Entity type from a schema e.g. `Address`.
+ * Required. Entity type from a schema e.g. `Address`.
*
*
- * string type = 2;
+ * string type = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The type.
*/
@@ -31076,10 +31114,10 @@ public java.lang.String getType() {
*
*
*
- * Entity type from a schema e.g. `Address`.
+ * Required. Entity type from a schema e.g. `Address`.
*
*
- * string type = 2;
+ * string type = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for type.
*/
@@ -31098,10 +31136,10 @@ public com.google.protobuf.ByteString getTypeBytes() {
*
*
*
- * Entity type from a schema e.g. `Address`.
+ * Required. Entity type from a schema e.g. `Address`.
*
*
- * string type = 2;
+ * string type = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The type to set.
* @return This builder for chaining.
@@ -31119,10 +31157,10 @@ public Builder setType(java.lang.String value) {
*
*
*
- * Entity type from a schema e.g. `Address`.
+ * Required. Entity type from a schema e.g. `Address`.
*
*
- * string type = 2;
+ * string type = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
@@ -31136,10 +31174,10 @@ public Builder clearType() {
*
*
*
- * Entity type from a schema e.g. `Address`.
+ * Required. Entity type from a schema e.g. `Address`.
*
*
- * string type = 2;
+ * string type = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The bytes for type to set.
* @return This builder for chaining.
@@ -31591,6 +31629,8 @@ private EntityRelation(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -32646,6 +32686,8 @@ private TextAnchor(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -32782,6 +32824,8 @@ private TextSegment(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
diff --git a/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/DocumentProto.java b/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/DocumentProto.java
index bb839130..9e0cd881 100644
--- a/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/DocumentProto.java
+++ b/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/DocumentProto.java
@@ -126,140 +126,142 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
java.lang.String[] descriptorData = {
"\n.google/cloud/documentai/v1beta1/docume"
+ "nt.proto\022\037google.cloud.documentai.v1beta"
- + "1\032\034google/api/annotations.proto\032.google/"
- + "cloud/documentai/v1beta1/geometry.proto\032"
- + "\027google/rpc/status.proto\032\027google/type/co"
- + "lor.proto\"\372$\n\010Document\022\r\n\003uri\030\001 \001(\tH\000\022\021\n"
- + "\007content\030\002 \001(\014H\000\022\021\n\tmime_type\030\003 \001(\t\022\014\n\004t"
- + "ext\030\004 \001(\t\022D\n\013text_styles\030\005 \003(\0132/.google."
- + "cloud.documentai.v1beta1.Document.Style\022"
- + "=\n\005pages\030\006 \003(\0132..google.cloud.documentai"
- + ".v1beta1.Document.Page\022B\n\010entities\030\007 \003(\013"
- + "20.google.cloud.documentai.v1beta1.Docum"
- + "ent.Entity\022R\n\020entity_relations\030\010 \003(\01328.g"
- + "oogle.cloud.documentai.v1beta1.Document."
- + "EntityRelation\022G\n\nshard_info\030\t \001(\01323.goo"
- + "gle.cloud.documentai.v1beta1.Document.Sh"
- + "ardInfo\022!\n\005error\030\n \001(\0132\022.google.rpc.Stat"
- + "us\032J\n\tShardInfo\022\023\n\013shard_index\030\001 \001(\003\022\023\n\013"
- + "shard_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.c"
- + "loud.documentai.v1beta1.Document.TextAnc"
- + "hor\022!\n\005color\030\002 \001(\0132\022.google.type.Color\022,"
- + "\n\020background_color\030\003 \001(\0132\022.google.type.C"
- + "olor\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_s"
- + "ize\030\007 \001(\01328.google.cloud.documentai.v1be"
- + "ta1.Document.Style.FontSize\032&\n\010FontSize\022"
- + "\014\n\004size\030\001 \001(\002\022\014\n\004unit\030\002 \001(\t\032\366\032\n\004Page\022\023\n\013"
- + "page_number\030\001 \001(\005\022K\n\tdimension\030\002 \001(\01328.g"
- + "oogle.cloud.documentai.v1beta1.Document."
- + "Page.Dimension\022E\n\006layout\030\003 \001(\01325.google."
- + "cloud.documentai.v1beta1.Document.Page.L"
- + "ayout\022[\n\022detected_languages\030\004 \003(\0132?.goog"
- + "le.cloud.documentai.v1beta1.Document.Pag"
- + "e.DetectedLanguage\022D\n\006blocks\030\005 \003(\01324.goo"
- + "gle.cloud.documentai.v1beta1.Document.Pa"
- + "ge.Block\022L\n\nparagraphs\030\006 \003(\01328.google.cl"
- + "oud.documentai.v1beta1.Document.Page.Par"
- + "agraph\022B\n\005lines\030\007 \003(\01323.google.cloud.doc"
- + "umentai.v1beta1.Document.Page.Line\022D\n\006to"
- + "kens\030\010 \003(\01324.google.cloud.documentai.v1b"
- + "eta1.Document.Page.Token\022U\n\017visual_eleme"
- + "nts\030\t \003(\0132<.google.cloud.documentai.v1be"
- + "ta1.Document.Page.VisualElement\022D\n\006table"
- + "s\030\n \003(\01324.google.cloud.documentai.v1beta"
- + "1.Document.Page.Table\022M\n\013form_fields\030\013 \003"
+ + "1\032\034google/api/annotations.proto\032\037google/"
+ + "api/field_behavior.proto\032.google/cloud/d"
+ + "ocumentai/v1beta1/geometry.proto\032\027google"
+ + "/rpc/status.proto\032\027google/type/color.pro"
+ + "to\"\377$\n\010Document\022\r\n\003uri\030\001 \001(\tH\000\022\021\n\007conten"
+ + "t\030\002 \001(\014H\000\022\021\n\tmime_type\030\003 \001(\t\022\014\n\004text\030\004 \001"
+ + "(\t\022D\n\013text_styles\030\005 \003(\0132/.google.cloud.d"
+ + "ocumentai.v1beta1.Document.Style\022=\n\005page"
+ + "s\030\006 \003(\0132..google.cloud.documentai.v1beta"
+ + "1.Document.Page\022B\n\010entities\030\007 \003(\01320.goog"
+ + "le.cloud.documentai.v1beta1.Document.Ent"
+ + "ity\022R\n\020entity_relations\030\010 \003(\01328.google.c"
+ + "loud.documentai.v1beta1.Document.EntityR"
+ + "elation\022G\n\nshard_info\030\t \001(\01323.google.clo"
+ + "ud.documentai.v1beta1.Document.ShardInfo"
+ + "\022!\n\005error\030\n \001(\0132\022.google.rpc.Status\032J\n\tS"
+ + "hardInfo\022\023\n\013shard_index\030\001 \001(\003\022\023\n\013shard_c"
+ + "ount\030\002 \001(\003\022\023\n\013text_offset\030\003 \001(\003\032\332\002\n\005Styl"
+ + "e\022I\n\013text_anchor\030\001 \001(\01324.google.cloud.do"
+ + "cumentai.v1beta1.Document.TextAnchor\022!\n\005"
+ + "color\030\002 \001(\0132\022.google.type.Color\022,\n\020backg"
+ + "round_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.v1beta1.Doc"
- + "ument.Page.FormField\0328\n\tDimension\022\r\n\005wid"
- + "th\030\001 \001(\002\022\016\n\006height\030\002 \001(\002\022\014\n\004unit\030\003 \001(\t\032\354"
- + "\002\n\006Layout\022I\n\013text_anchor\030\001 \001(\01324.google."
- + "cloud.documentai.v1beta1.Document.TextAn"
- + "chor\022\022\n\nconfidence\030\002 \001(\002\022D\n\rbounding_pol"
- + "y\030\003 \001(\0132-.google.cloud.documentai.v1beta"
- + "1.BoundingPoly\022V\n\013orientation\030\004 \001(\0162A.go"
- + "ogle.cloud.documentai.v1beta1.Document.P"
- + "age.Layout.Orientation\"e\n\013Orientation\022\033\n"
- + "\027ORIENTATION_UNSPECIFIED\020\000\022\013\n\007PAGE_UP\020\001\022"
- + "\016\n\nPAGE_RIGHT\020\002\022\r\n\tPAGE_DOWN\020\003\022\r\n\tPAGE_L"
- + "EFT\020\004\032\253\001\n\005Block\022E\n\006layout\030\001 \001(\01325.google"
- + ".cloud.documentai.v1beta1.Document.Page."
- + "Layout\022[\n\022detected_languages\030\002 \003(\0132?.goo"
- + "gle.cloud.documentai.v1beta1.Document.Pa"
- + "ge.DetectedLanguage\032\257\001\n\tParagraph\022E\n\006lay"
- + "out\030\001 \001(\01325.google.cloud.documentai.v1be"
- + "ta1.Document.Page.Layout\022[\n\022detected_lan"
- + "guages\030\002 \003(\0132?.google.cloud.documentai.v"
- + "1beta1.Document.Page.DetectedLanguage\032\252\001"
- + "\n\004Line\022E\n\006layout\030\001 \001(\01325.google.cloud.do"
- + "cumentai.v1beta1.Document.Page.Layout\022[\n"
- + "\022detected_languages\030\002 \003(\0132?.google.cloud"
- + ".documentai.v1beta1.Document.Page.Detect"
- + "edLanguage\032\265\003\n\005Token\022E\n\006layout\030\001 \001(\01325.g"
- + "oogle.cloud.documentai.v1beta1.Document."
- + "Page.Layout\022Z\n\016detected_break\030\002 \001(\0132B.go"
+ + "ument.Style.FontSize\032&\n\010FontSize\022\014\n\004size"
+ + "\030\001 \001(\002\022\014\n\004unit\030\002 \001(\t\032\366\032\n\004Page\022\023\n\013page_nu"
+ + "mber\030\001 \001(\005\022K\n\tdimension\030\002 \001(\01328.google.c"
+ + "loud.documentai.v1beta1.Document.Page.Di"
+ + "mension\022E\n\006layout\030\003 \001(\01325.google.cloud.d"
+ + "ocumentai.v1beta1.Document.Page.Layout\022["
+ + "\n\022detected_languages\030\004 \003(\0132?.google.clou"
+ + "d.documentai.v1beta1.Document.Page.Detec"
+ + "tedLanguage\022D\n\006blocks\030\005 \003(\01324.google.clo"
+ + "ud.documentai.v1beta1.Document.Page.Bloc"
+ + "k\022L\n\nparagraphs\030\006 \003(\01328.google.cloud.doc"
+ + "umentai.v1beta1.Document.Page.Paragraph\022"
+ + "B\n\005lines\030\007 \003(\01323.google.cloud.documentai"
+ + ".v1beta1.Document.Page.Line\022D\n\006tokens\030\010 "
+ + "\003(\01324.google.cloud.documentai.v1beta1.Do"
+ + "cument.Page.Token\022U\n\017visual_elements\030\t \003"
+ + "(\0132<.google.cloud.documentai.v1beta1.Doc"
+ + "ument.Page.VisualElement\022D\n\006tables\030\n \003(\013"
+ + "24.google.cloud.documentai.v1beta1.Docum"
+ + "ent.Page.Table\022M\n\013form_fields\030\013 \003(\01328.go"
+ "ogle.cloud.documentai.v1beta1.Document.P"
- + "age.Token.DetectedBreak\022[\n\022detected_lang"
- + "uages\030\003 \003(\0132?.google.cloud.documentai.v1"
- + "beta1.Document.Page.DetectedLanguage\032\253\001\n"
- + "\rDetectedBreak\022U\n\004type\030\001 \001(\0162G.google.cl"
+ + "age.FormField\0328\n\tDimension\022\r\n\005width\030\001 \001("
+ + "\002\022\016\n\006height\030\002 \001(\002\022\014\n\004unit\030\003 \001(\t\032\354\002\n\006Layo"
+ + "ut\022I\n\013text_anchor\030\001 \001(\01324.google.cloud.d"
+ + "ocumentai.v1beta1.Document.TextAnchor\022\022\n"
+ + "\nconfidence\030\002 \001(\002\022D\n\rbounding_poly\030\003 \001(\013"
+ + "2-.google.cloud.documentai.v1beta1.Bound"
+ + "ingPoly\022V\n\013orientation\030\004 \001(\0162A.google.cl"
+ + "oud.documentai.v1beta1.Document.Page.Lay"
+ + "out.Orientation\"e\n\013Orientation\022\033\n\027ORIENT"
+ + "ATION_UNSPECIFIED\020\000\022\013\n\007PAGE_UP\020\001\022\016\n\nPAGE"
+ + "_RIGHT\020\002\022\r\n\tPAGE_DOWN\020\003\022\r\n\tPAGE_LEFT\020\004\032\253"
+ + "\001\n\005Block\022E\n\006layout\030\001 \001(\01325.google.cloud."
+ + "documentai.v1beta1.Document.Page.Layout\022"
+ + "[\n\022detected_languages\030\002 \003(\0132?.google.clo"
+ + "ud.documentai.v1beta1.Document.Page.Dete"
+ + "ctedLanguage\032\257\001\n\tParagraph\022E\n\006layout\030\001 \001"
+ + "(\01325.google.cloud.documentai.v1beta1.Doc"
+ + "ument.Page.Layout\022[\n\022detected_languages\030"
+ + "\002 \003(\0132?.google.cloud.documentai.v1beta1."
+ + "Document.Page.DetectedLanguage\032\252\001\n\004Line\022"
+ + "E\n\006layout\030\001 \001(\01325.google.cloud.documenta"
+ + "i.v1beta1.Document.Page.Layout\022[\n\022detect"
+ + "ed_languages\030\002 \003(\0132?.google.cloud.docume"
+ + "ntai.v1beta1.Document.Page.DetectedLangu"
+ + "age\032\265\003\n\005Token\022E\n\006layout\030\001 \001(\01325.google.c"
+ + "loud.documentai.v1beta1.Document.Page.La"
+ + "yout\022Z\n\016detected_break\030\002 \001(\0132B.google.cl"
+ "oud.documentai.v1beta1.Document.Page.Tok"
- + "en.DetectedBreak.Type\"C\n\004Type\022\024\n\020TYPE_UN"
- + "SPECIFIED\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.v1beta1.D"
- + "ocument.Page.Layout\022\014\n\004type\030\002 \001(\t\022[\n\022det"
- + "ected_languages\030\003 \003(\0132?.google.cloud.doc"
+ + "en.DetectedBreak\022[\n\022detected_languages\030\003"
+ + " \003(\0132?.google.cloud.documentai.v1beta1.D"
+ + "ocument.Page.DetectedLanguage\032\253\001\n\rDetect"
+ + "edBreak\022U\n\004type\030\001 \001(\0162G.google.cloud.doc"
+ + "umentai.v1beta1.Document.Page.Token.Dete"
+ + "ctedBreak.Type\"C\n\004Type\022\024\n\020TYPE_UNSPECIFI"
+ + "ED\020\000\022\t\n\005SPACE\020\001\022\016\n\nWIDE_SPACE\020\002\022\n\n\006HYPHE"
+ + "N\020\003\032\301\001\n\rVisualElement\022E\n\006layout\030\001 \001(\01325."
+ + "google.cloud.documentai.v1beta1.Document"
+ + ".Page.Layout\022\014\n\004type\030\002 \001(\t\022[\n\022detected_l"
+ + "anguages\030\003 \003(\0132?.google.cloud.documentai"
+ + ".v1beta1.Document.Page.DetectedLanguage\032"
+ + "\202\005\n\005Table\022E\n\006layout\030\001 \001(\01325.google.cloud"
+ + ".documentai.v1beta1.Document.Page.Layout"
+ + "\022R\n\013header_rows\030\002 \003(\0132=.google.cloud.doc"
+ + "umentai.v1beta1.Document.Page.Table.Tabl"
+ + "eRow\022P\n\tbody_rows\030\003 \003(\0132=.google.cloud.d"
+ + "ocumentai.v1beta1.Document.Page.Table.Ta"
+ + "bleRow\022[\n\022detected_languages\030\004 \003(\0132?.goo"
+ + "gle.cloud.documentai.v1beta1.Document.Pa"
+ + "ge.DetectedLanguage\032Y\n\010TableRow\022M\n\005cells"
+ + "\030\001 \003(\0132>.google.cloud.documentai.v1beta1"
+ + ".Document.Page.Table.TableCell\032\323\001\n\tTable"
+ + "Cell\022E\n\006layout\030\001 \001(\01325.google.cloud.docu"
+ + "mentai.v1beta1.Document.Page.Layout\022\020\n\010r"
+ + "ow_span\030\002 \001(\005\022\020\n\010col_span\030\003 \001(\005\022[\n\022detec"
+ + "ted_languages\030\004 \003(\0132?.google.cloud.docum"
+ + "entai.v1beta1.Document.Page.DetectedLang"
+ + "uage\032\347\002\n\tFormField\022I\n\nfield_name\030\001 \001(\01325"
+ + ".google.cloud.documentai.v1beta1.Documen"
+ + "t.Page.Layout\022J\n\013field_value\030\002 \001(\01325.goo"
+ + "gle.cloud.documentai.v1beta1.Document.Pa"
+ + "ge.Layout\022`\n\027name_detected_languages\030\003 \003"
+ + "(\0132?.google.cloud.documentai.v1beta1.Doc"
+ + "ument.Page.DetectedLanguage\022a\n\030value_det"
+ + "ected_languages\030\004 \003(\0132?.google.cloud.doc"
+ "umentai.v1beta1.Document.Page.DetectedLa"
- + "nguage\032\202\005\n\005Table\022E\n\006layout\030\001 \001(\01325.googl"
- + "e.cloud.documentai.v1beta1.Document.Page"
- + ".Layout\022R\n\013header_rows\030\002 \003(\0132=.google.cl"
- + "oud.documentai.v1beta1.Document.Page.Tab"
- + "le.TableRow\022P\n\tbody_rows\030\003 \003(\0132=.google."
- + "cloud.documentai.v1beta1.Document.Page.T"
- + "able.TableRow\022[\n\022detected_languages\030\004 \003("
- + "\0132?.google.cloud.documentai.v1beta1.Docu"
- + "ment.Page.DetectedLanguage\032Y\n\010TableRow\022M"
- + "\n\005cells\030\001 \003(\0132>.google.cloud.documentai."
- + "v1beta1.Document.Page.Table.TableCell\032\323\001"
- + "\n\tTableCell\022E\n\006layout\030\001 \001(\01325.google.clo"
- + "ud.documentai.v1beta1.Document.Page.Layo"
- + "ut\022\020\n\010row_span\030\002 \001(\005\022\020\n\010col_span\030\003 \001(\005\022["
- + "\n\022detected_languages\030\004 \003(\0132?.google.clou"
- + "d.documentai.v1beta1.Document.Page.Detec"
- + "tedLanguage\032\347\002\n\tFormField\022I\n\nfield_name\030"
- + "\001 \001(\01325.google.cloud.documentai.v1beta1."
- + "Document.Page.Layout\022J\n\013field_value\030\002 \001("
- + "\01325.google.cloud.documentai.v1beta1.Docu"
- + "ment.Page.Layout\022`\n\027name_detected_langua"
- + "ges\030\003 \003(\0132?.google.cloud.documentai.v1be"
- + "ta1.Document.Page.DetectedLanguage\022a\n\030va"
- + "lue_detected_languages\030\004 \003(\0132?.google.cl"
- + "oud.documentai.v1beta1.Document.Page.Det"
- + "ectedLanguage\032=\n\020DetectedLanguage\022\025\n\rlan"
- + "guage_code\030\001 \001(\t\022\022\n\nconfidence\030\002 \001(\002\032\213\001\n"
- + "\006Entity\022I\n\013text_anchor\030\001 \001(\01324.google.cl"
- + "oud.documentai.v1beta1.Document.TextAnch"
- + "or\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\032I\n\016EntityRelation\022\022\n\n"
- + "subject_id\030\001 \001(\t\022\021\n\tobject_id\030\002 \001(\t\022\020\n\010r"
- + "elation\030\003 \001(\t\032\234\001\n\nTextAnchor\022W\n\rtext_seg"
- + "ments\030\001 \003(\0132@.google.cloud.documentai.v1"
- + "beta1.Document.TextAnchor.TextSegment\0325\n"
- + "\013TextSegment\022\023\n\013start_index\030\001 \001(\003\022\021\n\tend"
- + "_index\030\002 \001(\003B\010\n\006sourceB\352\001\n#com.google.cl"
- + "oud.documentai.v1beta1B\rDocumentProtoP\001Z"
- + "Igoogle.golang.org/genproto/googleapis/c"
- + "loud/documentai/v1beta1;documentai\252\002\037Goo"
- + "gle.Cloud.DocumentAI.V1Beta1\312\002\037Google\\Cl"
- + "oud\\DocumentAI\\V1beta1\352\002\"Google::Cloud::"
- + "DocumentAI::V1beta1b\006proto3"
+ + "nguage\032=\n\020DetectedLanguage\022\025\n\rlanguage_c"
+ + "ode\030\001 \001(\t\022\022\n\nconfidence\030\002 \001(\002\032\220\001\n\006Entity"
+ + "\022I\n\013text_anchor\030\001 \001(\01324.google.cloud.doc"
+ + "umentai.v1beta1.Document.TextAnchor\022\021\n\004t"
+ + "ype\030\002 \001(\tB\003\340A\002\022\024\n\014mention_text\030\003 \001(\t\022\022\n\n"
+ + "mention_id\030\004 \001(\t\032I\n\016EntityRelation\022\022\n\nsu"
+ + "bject_id\030\001 \001(\t\022\021\n\tobject_id\030\002 \001(\t\022\020\n\010rel"
+ + "ation\030\003 \001(\t\032\234\001\n\nTextAnchor\022W\n\rtext_segme"
+ + "nts\030\001 \003(\0132@.google.cloud.documentai.v1be"
+ + "ta1.Document.TextAnchor.TextSegment\0325\n\013T"
+ + "extSegment\022\023\n\013start_index\030\001 \001(\003\022\021\n\tend_i"
+ + "ndex\030\002 \001(\003B\010\n\006sourceB\352\001\n#com.google.clou"
+ + "d.documentai.v1beta1B\rDocumentProtoP\001ZIg"
+ + "oogle.golang.org/genproto/googleapis/clo"
+ + "ud/documentai/v1beta1;documentai\252\002\037Googl"
+ + "e.Cloud.DocumentAI.V1Beta1\312\002\037Google\\Clou"
+ + "d\\DocumentAI\\V1beta1\352\002\"Google::Cloud::Do"
+ + "cumentAI::V1beta1b\006proto3"
};
descriptor =
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
com.google.api.AnnotationsProto.getDescriptor(),
+ com.google.api.FieldBehaviorProto.getDescriptor(),
com.google.cloud.documentai.v1beta1.GeometryProto.getDescriptor(),
com.google.rpc.StatusProto.getDescriptor(),
com.google.type.ColorProto.getDescriptor(),
@@ -496,7 +498,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
new java.lang.String[] {
"StartIndex", "EndIndex",
});
+ com.google.protobuf.ExtensionRegistry registry =
+ com.google.protobuf.ExtensionRegistry.newInstance();
+ registry.add(com.google.api.FieldBehaviorProto.fieldBehavior);
+ com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor(
+ descriptor, registry);
com.google.api.AnnotationsProto.getDescriptor();
+ com.google.api.FieldBehaviorProto.getDescriptor();
com.google.cloud.documentai.v1beta1.GeometryProto.getDescriptor();
com.google.rpc.StatusProto.getDescriptor();
com.google.type.ColorProto.getDescriptor();
diff --git a/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/EntityExtractionParams.java b/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/EntityExtractionParams.java
index bdb0301d..3e22aa10 100644
--- a/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/EntityExtractionParams.java
+++ b/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/EntityExtractionParams.java
@@ -93,6 +93,8 @@ private EntityExtractionParams(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/FormExtractionParams.java b/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/FormExtractionParams.java
index 1fc0a646..cab6970d 100644
--- a/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/FormExtractionParams.java
+++ b/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/FormExtractionParams.java
@@ -108,6 +108,8 @@ private FormExtractionParams(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/GcsDestination.java b/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/GcsDestination.java
index 7ac4a967..dfe2dfd7 100644
--- a/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/GcsDestination.java
+++ b/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/GcsDestination.java
@@ -88,6 +88,8 @@ private GcsDestination(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/GcsSource.java b/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/GcsSource.java
index ca0f9d1b..afde24d1 100644
--- a/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/GcsSource.java
+++ b/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/GcsSource.java
@@ -88,6 +88,8 @@ private GcsSource(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/InputConfig.java b/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/InputConfig.java
index 368e4ab6..6ded33a6 100644
--- a/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/InputConfig.java
+++ b/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/InputConfig.java
@@ -104,6 +104,8 @@ private InputConfig(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -769,8 +771,9 @@ public Builder mergeGcsSource(com.google.cloud.documentai.v1beta1.GcsSource valu
} else {
if (sourceCase_ == 1) {
gcsSourceBuilder_.mergeFrom(value);
+ } else {
+ gcsSourceBuilder_.setMessage(value);
}
- gcsSourceBuilder_.setMessage(value);
}
sourceCase_ = 1;
return this;
diff --git a/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/KeyValuePairHint.java b/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/KeyValuePairHint.java
index ec0a639f..2445e416 100644
--- a/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/KeyValuePairHint.java
+++ b/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/KeyValuePairHint.java
@@ -100,6 +100,8 @@ private KeyValuePairHint(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/NormalizedVertex.java b/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/NormalizedVertex.java
index 8009187f..2f388397 100644
--- a/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/NormalizedVertex.java
+++ b/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/NormalizedVertex.java
@@ -91,6 +91,8 @@ private NormalizedVertex(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -164,10 +166,10 @@ public final boolean isInitialized() {
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
- if (x_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(x_) != 0) {
output.writeFloat(1, x_);
}
- if (y_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(y_) != 0) {
output.writeFloat(2, y_);
}
unknownFields.writeTo(output);
@@ -179,10 +181,10 @@ public int getSerializedSize() {
if (size != -1) return size;
size = 0;
- if (x_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(x_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, x_);
}
- if (y_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(y_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, y_);
}
size += unknownFields.getSerializedSize();
diff --git a/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/OcrParams.java b/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/OcrParams.java
index 4f7d6f45..4109ade2 100644
--- a/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/OcrParams.java
+++ b/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/OcrParams.java
@@ -92,6 +92,8 @@ private OcrParams(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/OperationMetadata.java b/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/OperationMetadata.java
index 54c5d5f2..2fb018e3 100644
--- a/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/OperationMetadata.java
+++ b/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/OperationMetadata.java
@@ -126,6 +126,8 @@ private OperationMetadata(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/OutputConfig.java b/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/OutputConfig.java
index 59c93b59..bbfde9de 100644
--- a/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/OutputConfig.java
+++ b/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/OutputConfig.java
@@ -103,6 +103,8 @@ private OutputConfig(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -739,8 +741,9 @@ public Builder mergeGcsDestination(com.google.cloud.documentai.v1beta1.GcsDestin
} else {
if (destinationCase_ == 1) {
gcsDestinationBuilder_.mergeFrom(value);
+ } else {
+ gcsDestinationBuilder_.setMessage(value);
}
- gcsDestinationBuilder_.setMessage(value);
}
destinationCase_ = 1;
return this;
diff --git a/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/ProcessDocumentRequest.java b/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/ProcessDocumentRequest.java
index d5503944..1cb4df68 100644
--- a/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/ProcessDocumentRequest.java
+++ b/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/ProcessDocumentRequest.java
@@ -187,6 +187,8 @@ private ProcessDocumentRequest(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/ProcessDocumentResponse.java b/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/ProcessDocumentResponse.java
index b024ca3f..faf8ac6d 100644
--- a/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/ProcessDocumentResponse.java
+++ b/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/ProcessDocumentResponse.java
@@ -111,6 +111,8 @@ private ProcessDocumentResponse(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/TableBoundHint.java b/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/TableBoundHint.java
index ff59ea55..3f2a73ca 100644
--- a/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/TableBoundHint.java
+++ b/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/TableBoundHint.java
@@ -100,6 +100,8 @@ private TableBoundHint(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/TableExtractionParams.java b/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/TableExtractionParams.java
index 7a5d77ec..cc65d3f4 100644
--- a/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/TableExtractionParams.java
+++ b/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/TableExtractionParams.java
@@ -119,6 +119,8 @@ private TableExtractionParams(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/Vertex.java b/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/Vertex.java
index ede823d7..1e7976ea 100644
--- a/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/Vertex.java
+++ b/proto-google-cloud-document-ai-v1beta1/src/main/java/com/google/cloud/documentai/v1beta1/Vertex.java
@@ -90,6 +90,8 @@ private Vertex(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta1/src/main/proto/google/cloud/documentai/v1beta1/document.proto b/proto-google-cloud-document-ai-v1beta1/src/main/proto/google/cloud/documentai/v1beta1/document.proto
index 2c47f6f2..0ac64a57 100644
--- a/proto-google-cloud-document-ai-v1beta1/src/main/proto/google/cloud/documentai/v1beta1/document.proto
+++ b/proto-google-cloud-document-ai-v1beta1/src/main/proto/google/cloud/documentai/v1beta1/document.proto
@@ -18,6 +18,7 @@ syntax = "proto3";
package google.cloud.documentai.v1beta1;
import "google/api/annotations.proto";
+import "google/api/field_behavior.proto";
import "google/cloud/documentai/v1beta1/geometry.proto";
import "google/rpc/status.proto";
import "google/type/color.proto";
@@ -351,8 +352,8 @@ message Document {
// [Document.text][google.cloud.documentai.v1beta1.Document.text].
TextAnchor text_anchor = 1;
- // Entity type from a schema e.g. `Address`.
- string type = 2;
+ // Required. Entity type from a schema e.g. `Address`.
+ string type = 2 [(google.api.field_behavior) = REQUIRED];
// Text value in the document e.g. `1600 Amphitheatre Pkwy`.
string mention_text = 3;
diff --git a/proto-google-cloud-document-ai-v1beta2/clirr-ignored-differences.xml b/proto-google-cloud-document-ai-v1beta2/clirr-ignored-differences.xml
index fd8a93c8..660ac269 100644
--- a/proto-google-cloud-document-ai-v1beta2/clirr-ignored-differences.xml
+++ b/proto-google-cloud-document-ai-v1beta2/clirr-ignored-differences.xml
@@ -16,4 +16,19 @@
com/google/cloud/documentai/v1beta2/*OrBuilder
boolean has*(*)
+
+ 7002
+ com/google/cloud/documentai/v1beta2/*Builder
+ * *BoundingPolyForDemoFrontend*(*)
+
+
+ 7002
+ com/google/cloud/documentai/v1beta2/*Entity
+ * *BoundingPolyForDemoFrontend*(*)
+
+
+ 6011
+ com/google/cloud/documentai/v1beta2/*Entity
+ BOUNDING_POLY_FOR_DEMO_FRONTEND_FIELD_NUMBER
+
diff --git a/proto-google-cloud-document-ai-v1beta2/pom.xml b/proto-google-cloud-document-ai-v1beta2/pom.xml
index 4c9a42d2..9931895a 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.16.3
+ 0.17.0
proto-google-cloud-document-ai-v1beta2
PROTO library for proto-google-cloud-document-ai-v1beta2
com.google.cloud
google-cloud-document-ai-parent
- 2.4.3
+ 2.5.0
diff --git a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/AutoMlParams.java b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/AutoMlParams.java
index ffe22d70..0d5886cf 100644
--- a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/AutoMlParams.java
+++ b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/AutoMlParams.java
@@ -88,6 +88,8 @@ private AutoMlParams(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/BatchProcessDocumentsRequest.java b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/BatchProcessDocumentsRequest.java
index 0c66af0e..651f6b02 100644
--- a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/BatchProcessDocumentsRequest.java
+++ b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/BatchProcessDocumentsRequest.java
@@ -105,6 +105,8 @@ private BatchProcessDocumentsRequest(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/BatchProcessDocumentsResponse.java b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/BatchProcessDocumentsResponse.java
index 3b5ef9b1..3aa4e2de 100644
--- a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/BatchProcessDocumentsResponse.java
+++ b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/BatchProcessDocumentsResponse.java
@@ -97,6 +97,8 @@ private BatchProcessDocumentsResponse(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/BoundingPoly.java b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/BoundingPoly.java
index 8cf2c67a..00bd9c8d 100644
--- a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/BoundingPoly.java
+++ b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/BoundingPoly.java
@@ -107,6 +107,8 @@ private BoundingPoly(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
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 03f3edc3..e830b136 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
@@ -90,8 +90,8 @@ private Document(
}
case 18:
{
- sourceCase_ = 2;
source_ = input.readBytes();
+ sourceCase_ = 2;
break;
}
case 26:
@@ -216,6 +216,8 @@ private Document(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -377,6 +379,8 @@ private ShardInfo(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -1200,6 +1204,8 @@ private Label(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -1437,7 +1443,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (sourceCase_ == 2) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, source_);
}
- if (confidence_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(confidence_) != 0) {
output.writeFloat(3, confidence_);
}
unknownFields.writeTo(output);
@@ -1455,7 +1461,7 @@ public int getSerializedSize() {
if (sourceCase_ == 2) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, source_);
}
- if (confidence_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(confidence_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, confidence_);
}
size += unknownFields.getSerializedSize();
@@ -2564,6 +2570,8 @@ private Style(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -2705,6 +2713,8 @@ private FontSize(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -2810,7 +2820,7 @@ public final boolean isInitialized() {
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
- if (size_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(size_) != 0) {
output.writeFloat(1, size_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(unit_)) {
@@ -2825,7 +2835,7 @@ public int getSerializedSize() {
if (size != -1) return size;
size = 0;
- if (size_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(size_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, size_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(unit_)) {
@@ -6080,6 +6090,8 @@ private Page(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -6263,6 +6275,8 @@ private Dimension(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -6386,10 +6400,10 @@ public final boolean isInitialized() {
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
- if (width_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(width_) != 0) {
output.writeFloat(1, width_);
}
- if (height_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(height_) != 0) {
output.writeFloat(2, height_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(unit_)) {
@@ -6404,10 +6418,10 @@ public int getSerializedSize() {
if (size != -1) return size;
size = 0;
- if (width_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(width_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, width_);
}
- if (height_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(height_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, height_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(unit_)) {
@@ -7255,6 +7269,8 @@ private Layout(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -7715,7 +7731,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (textAnchor_ != null) {
output.writeMessage(1, getTextAnchor());
}
- if (confidence_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(confidence_) != 0) {
output.writeFloat(2, confidence_);
}
if (boundingPoly_ != null) {
@@ -7742,7 +7758,7 @@ public int getSerializedSize() {
if (textAnchor_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTextAnchor());
}
- if (confidence_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(confidence_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, confidence_);
}
if (boundingPoly_ != null) {
@@ -9015,6 +9031,8 @@ private Block(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -10429,6 +10447,8 @@ private Paragraph(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -11850,6 +11870,8 @@ private Line(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -13325,6 +13347,8 @@ private Token(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -13454,6 +13478,8 @@ private DetectedBreak(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -15935,6 +15961,8 @@ private VisualElement(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -17687,6 +17715,8 @@ private Table(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -17865,6 +17895,8 @@ private TableRow(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -19056,6 +19088,8 @@ private TableCell(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -23184,6 +23218,8 @@ private FormField(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -25910,6 +25946,8 @@ private DetectedLanguage(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -26022,7 +26060,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, languageCode_);
}
- if (confidence_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(confidence_) != 0) {
output.writeFloat(2, confidence_);
}
unknownFields.writeTo(output);
@@ -26037,7 +26075,7 @@ public int getSerializedSize() {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, languageCode_);
}
- if (confidence_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(confidence_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, confidence_);
}
size += unknownFields.getSerializedSize();
@@ -31815,10 +31853,10 @@ public interface EntityOrBuilder
*
*
*
- * Entity type from a schema e.g. `Address`.
+ * Required. Entity type from a schema e.g. `Address`.
*
*
- * string type = 2;
+ * string type = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The type.
*/
@@ -31827,10 +31865,10 @@ public interface EntityOrBuilder
*
*
*
- * Entity type from a schema e.g. `Address`.
+ * Required. Entity type from a schema e.g. `Address`.
*
*
- * string type = 2;
+ * string type = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for type.
*/
@@ -31969,51 +32007,6 @@ public interface EntityOrBuilder
* @return The bytes for id.
*/
com.google.protobuf.ByteString getIdBytes();
-
- /**
- *
- *
- *
- * Optional. Temporary field to store the bounding poly for short-term POCs. Used by
- * the frontend only. Do not use before you talk to ybo@ and lukasr@.
- *
- *
- *
- * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly_for_demo_frontend = 8 [(.google.api.field_behavior) = OPTIONAL];
- *
- *
- * @return Whether the boundingPolyForDemoFrontend field is set.
- */
- boolean hasBoundingPolyForDemoFrontend();
- /**
- *
- *
- *
- * Optional. Temporary field to store the bounding poly for short-term POCs. Used by
- * the frontend only. Do not use before you talk to ybo@ and lukasr@.
- *
- *
- *
- * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly_for_demo_frontend = 8 [(.google.api.field_behavior) = OPTIONAL];
- *
- *
- * @return The boundingPolyForDemoFrontend.
- */
- com.google.cloud.documentai.v1beta2.BoundingPoly getBoundingPolyForDemoFrontend();
- /**
- *
- *
- *
- * Optional. Temporary field to store the bounding poly for short-term POCs. Used by
- * the frontend only. Do not use before you talk to ybo@ and lukasr@.
- *
- *
- *
- * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly_for_demo_frontend = 8 [(.google.api.field_behavior) = OPTIONAL];
- *
- */
- com.google.cloud.documentai.v1beta2.BoundingPolyOrBuilder
- getBoundingPolyForDemoFrontendOrBuilder();
}
/**
*
@@ -32136,23 +32129,6 @@ private Entity(
java.lang.String s = input.readStringRequireUtf8();
id_ = s;
- break;
- }
- case 66:
- {
- com.google.cloud.documentai.v1beta2.BoundingPoly.Builder subBuilder = null;
- if (boundingPolyForDemoFrontend_ != null) {
- subBuilder = boundingPolyForDemoFrontend_.toBuilder();
- }
- boundingPolyForDemoFrontend_ =
- input.readMessage(
- com.google.cloud.documentai.v1beta2.BoundingPoly.parser(),
- extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(boundingPolyForDemoFrontend_);
- boundingPolyForDemoFrontend_ = subBuilder.buildPartial();
- }
-
break;
}
default:
@@ -32166,6 +32142,8 @@ private Entity(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -32247,10 +32225,10 @@ public com.google.cloud.documentai.v1beta2.Document.TextAnchor getTextAnchor() {
*
*
*
- * Entity type from a schema e.g. `Address`.
+ * Required. Entity type from a schema e.g. `Address`.
*
*
- * string type = 2;
+ * string type = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The type.
*/
@@ -32270,10 +32248,10 @@ public java.lang.String getType() {
*
*
*
- * Entity type from a schema e.g. `Address`.
+ * Required. Entity type from a schema e.g. `Address`.
*
*
- * string type = 2;
+ * string type = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for type.
*/
@@ -32515,64 +32493,6 @@ public com.google.protobuf.ByteString getIdBytes() {
}
}
- public static final int BOUNDING_POLY_FOR_DEMO_FRONTEND_FIELD_NUMBER = 8;
- private com.google.cloud.documentai.v1beta2.BoundingPoly boundingPolyForDemoFrontend_;
- /**
- *
- *
- *
- * Optional. Temporary field to store the bounding poly for short-term POCs. Used by
- * the frontend only. Do not use before you talk to ybo@ and lukasr@.
- *
- *
- *
- * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly_for_demo_frontend = 8 [(.google.api.field_behavior) = OPTIONAL];
- *
- *
- * @return Whether the boundingPolyForDemoFrontend field is set.
- */
- @java.lang.Override
- public boolean hasBoundingPolyForDemoFrontend() {
- return boundingPolyForDemoFrontend_ != null;
- }
- /**
- *
- *
- *
- * Optional. Temporary field to store the bounding poly for short-term POCs. Used by
- * the frontend only. Do not use before you talk to ybo@ and lukasr@.
- *
- *
- *
- * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly_for_demo_frontend = 8 [(.google.api.field_behavior) = OPTIONAL];
- *
- *
- * @return The boundingPolyForDemoFrontend.
- */
- @java.lang.Override
- public com.google.cloud.documentai.v1beta2.BoundingPoly getBoundingPolyForDemoFrontend() {
- return boundingPolyForDemoFrontend_ == null
- ? com.google.cloud.documentai.v1beta2.BoundingPoly.getDefaultInstance()
- : boundingPolyForDemoFrontend_;
- }
- /**
- *
- *
- *
- * Optional. Temporary field to store the bounding poly for short-term POCs. Used by
- * the frontend only. Do not use before you talk to ybo@ and lukasr@.
- *
- *
- *
- * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly_for_demo_frontend = 8 [(.google.api.field_behavior) = OPTIONAL];
- *
- */
- @java.lang.Override
- public com.google.cloud.documentai.v1beta2.BoundingPolyOrBuilder
- getBoundingPolyForDemoFrontendOrBuilder() {
- return getBoundingPolyForDemoFrontend();
- }
-
private byte memoizedIsInitialized = -1;
@java.lang.Override
@@ -32599,7 +32519,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mentionId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, mentionId_);
}
- if (confidence_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(confidence_) != 0) {
output.writeFloat(5, confidence_);
}
if (pageAnchor_ != null) {
@@ -32608,9 +32528,6 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, id_);
}
- if (boundingPolyForDemoFrontend_ != null) {
- output.writeMessage(8, getBoundingPolyForDemoFrontend());
- }
unknownFields.writeTo(output);
}
@@ -32632,7 +32549,7 @@ public int getSerializedSize() {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mentionId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, mentionId_);
}
- if (confidence_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(confidence_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(5, confidence_);
}
if (pageAnchor_ != null) {
@@ -32641,11 +32558,6 @@ public int getSerializedSize() {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, id_);
}
- if (boundingPolyForDemoFrontend_ != null) {
- size +=
- com.google.protobuf.CodedOutputStream.computeMessageSize(
- 8, getBoundingPolyForDemoFrontend());
- }
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
@@ -32676,11 +32588,6 @@ public boolean equals(final java.lang.Object obj) {
if (!getPageAnchor().equals(other.getPageAnchor())) return false;
}
if (!getId().equals(other.getId())) return false;
- if (hasBoundingPolyForDemoFrontend() != other.hasBoundingPolyForDemoFrontend()) return false;
- if (hasBoundingPolyForDemoFrontend()) {
- if (!getBoundingPolyForDemoFrontend().equals(other.getBoundingPolyForDemoFrontend()))
- return false;
- }
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@@ -32710,10 +32617,6 @@ public int hashCode() {
}
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId().hashCode();
- if (hasBoundingPolyForDemoFrontend()) {
- hash = (37 * hash) + BOUNDING_POLY_FOR_DEMO_FRONTEND_FIELD_NUMBER;
- hash = (53 * hash) + getBoundingPolyForDemoFrontend().hashCode();
- }
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
@@ -32885,12 +32788,6 @@ public Builder clear() {
}
id_ = "";
- if (boundingPolyForDemoFrontendBuilder_ == null) {
- boundingPolyForDemoFrontend_ = null;
- } else {
- boundingPolyForDemoFrontend_ = null;
- boundingPolyForDemoFrontendBuilder_ = null;
- }
return this;
}
@@ -32933,11 +32830,6 @@ public com.google.cloud.documentai.v1beta2.Document.Entity buildPartial() {
result.pageAnchor_ = pageAnchorBuilder_.build();
}
result.id_ = id_;
- if (boundingPolyForDemoFrontendBuilder_ == null) {
- result.boundingPolyForDemoFrontend_ = boundingPolyForDemoFrontend_;
- } else {
- result.boundingPolyForDemoFrontend_ = boundingPolyForDemoFrontendBuilder_.build();
- }
onBuilt();
return result;
}
@@ -33015,9 +32907,6 @@ public Builder mergeFrom(com.google.cloud.documentai.v1beta2.Document.Entity oth
id_ = other.id_;
onChanged();
}
- if (other.hasBoundingPolyForDemoFrontend()) {
- mergeBoundingPolyForDemoFrontend(other.getBoundingPolyForDemoFrontend());
- }
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
@@ -33251,10 +33140,10 @@ public Builder clearTextAnchor() {
*
*
*
- * Entity type from a schema e.g. `Address`.
+ * Required. Entity type from a schema e.g. `Address`.
*
*
- * string type = 2;
+ * string type = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The type.
*/
@@ -33273,10 +33162,10 @@ public java.lang.String getType() {
*
*
*
- * Entity type from a schema e.g. `Address`.
+ * Required. Entity type from a schema e.g. `Address`.
*
*
- * string type = 2;
+ * string type = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for type.
*/
@@ -33295,10 +33184,10 @@ public com.google.protobuf.ByteString getTypeBytes() {
*
*
*
- * Entity type from a schema e.g. `Address`.
+ * Required. Entity type from a schema e.g. `Address`.
*
*
- * string type = 2;
+ * string type = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The type to set.
* @return This builder for chaining.
@@ -33316,10 +33205,10 @@ public Builder setType(java.lang.String value) {
*
*
*
- * Entity type from a schema e.g. `Address`.
+ * Required. Entity type from a schema e.g. `Address`.
*
*
- * string type = 2;
+ * string type = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
@@ -33333,10 +33222,10 @@ public Builder clearType() {
*
*
*
- * Entity type from a schema e.g. `Address`.
+ * Required. Entity type from a schema e.g. `Address`.
*
*
- * string type = 2;
+ * string type = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The bytes for type to set.
* @return This builder for chaining.
@@ -33943,224 +33832,6 @@ public Builder setIdBytes(com.google.protobuf.ByteString value) {
return this;
}
- private com.google.cloud.documentai.v1beta2.BoundingPoly boundingPolyForDemoFrontend_;
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.cloud.documentai.v1beta2.BoundingPoly,
- com.google.cloud.documentai.v1beta2.BoundingPoly.Builder,
- com.google.cloud.documentai.v1beta2.BoundingPolyOrBuilder>
- boundingPolyForDemoFrontendBuilder_;
- /**
- *
- *
- *
- * Optional. Temporary field to store the bounding poly for short-term POCs. Used by
- * the frontend only. Do not use before you talk to ybo@ and lukasr@.
- *
- *
- *
- * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly_for_demo_frontend = 8 [(.google.api.field_behavior) = OPTIONAL];
- *
- *
- * @return Whether the boundingPolyForDemoFrontend field is set.
- */
- public boolean hasBoundingPolyForDemoFrontend() {
- return boundingPolyForDemoFrontendBuilder_ != null || boundingPolyForDemoFrontend_ != null;
- }
- /**
- *
- *
- *
- * Optional. Temporary field to store the bounding poly for short-term POCs. Used by
- * the frontend only. Do not use before you talk to ybo@ and lukasr@.
- *
- *
- *
- * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly_for_demo_frontend = 8 [(.google.api.field_behavior) = OPTIONAL];
- *
- *
- * @return The boundingPolyForDemoFrontend.
- */
- public com.google.cloud.documentai.v1beta2.BoundingPoly getBoundingPolyForDemoFrontend() {
- if (boundingPolyForDemoFrontendBuilder_ == null) {
- return boundingPolyForDemoFrontend_ == null
- ? com.google.cloud.documentai.v1beta2.BoundingPoly.getDefaultInstance()
- : boundingPolyForDemoFrontend_;
- } else {
- return boundingPolyForDemoFrontendBuilder_.getMessage();
- }
- }
- /**
- *
- *
- *
- * Optional. Temporary field to store the bounding poly for short-term POCs. Used by
- * the frontend only. Do not use before you talk to ybo@ and lukasr@.
- *
- *
- *
- * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly_for_demo_frontend = 8 [(.google.api.field_behavior) = OPTIONAL];
- *
- */
- public Builder setBoundingPolyForDemoFrontend(
- com.google.cloud.documentai.v1beta2.BoundingPoly value) {
- if (boundingPolyForDemoFrontendBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- boundingPolyForDemoFrontend_ = value;
- onChanged();
- } else {
- boundingPolyForDemoFrontendBuilder_.setMessage(value);
- }
-
- return this;
- }
- /**
- *
- *
- *
- * Optional. Temporary field to store the bounding poly for short-term POCs. Used by
- * the frontend only. Do not use before you talk to ybo@ and lukasr@.
- *
- *
- *
- * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly_for_demo_frontend = 8 [(.google.api.field_behavior) = OPTIONAL];
- *
- */
- public Builder setBoundingPolyForDemoFrontend(
- com.google.cloud.documentai.v1beta2.BoundingPoly.Builder builderForValue) {
- if (boundingPolyForDemoFrontendBuilder_ == null) {
- boundingPolyForDemoFrontend_ = builderForValue.build();
- onChanged();
- } else {
- boundingPolyForDemoFrontendBuilder_.setMessage(builderForValue.build());
- }
-
- return this;
- }
- /**
- *
- *
- *
- * Optional. Temporary field to store the bounding poly for short-term POCs. Used by
- * the frontend only. Do not use before you talk to ybo@ and lukasr@.
- *
- *
- *
- * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly_for_demo_frontend = 8 [(.google.api.field_behavior) = OPTIONAL];
- *
- */
- public Builder mergeBoundingPolyForDemoFrontend(
- com.google.cloud.documentai.v1beta2.BoundingPoly value) {
- if (boundingPolyForDemoFrontendBuilder_ == null) {
- if (boundingPolyForDemoFrontend_ != null) {
- boundingPolyForDemoFrontend_ =
- com.google.cloud.documentai.v1beta2.BoundingPoly.newBuilder(
- boundingPolyForDemoFrontend_)
- .mergeFrom(value)
- .buildPartial();
- } else {
- boundingPolyForDemoFrontend_ = value;
- }
- onChanged();
- } else {
- boundingPolyForDemoFrontendBuilder_.mergeFrom(value);
- }
-
- return this;
- }
- /**
- *
- *
- *
- * Optional. Temporary field to store the bounding poly for short-term POCs. Used by
- * the frontend only. Do not use before you talk to ybo@ and lukasr@.
- *
- *
- *
- * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly_for_demo_frontend = 8 [(.google.api.field_behavior) = OPTIONAL];
- *
- */
- public Builder clearBoundingPolyForDemoFrontend() {
- if (boundingPolyForDemoFrontendBuilder_ == null) {
- boundingPolyForDemoFrontend_ = null;
- onChanged();
- } else {
- boundingPolyForDemoFrontend_ = null;
- boundingPolyForDemoFrontendBuilder_ = null;
- }
-
- return this;
- }
- /**
- *
- *
- *
- * Optional. Temporary field to store the bounding poly for short-term POCs. Used by
- * the frontend only. Do not use before you talk to ybo@ and lukasr@.
- *
- *
- *
- * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly_for_demo_frontend = 8 [(.google.api.field_behavior) = OPTIONAL];
- *
- */
- public com.google.cloud.documentai.v1beta2.BoundingPoly.Builder
- getBoundingPolyForDemoFrontendBuilder() {
-
- onChanged();
- return getBoundingPolyForDemoFrontendFieldBuilder().getBuilder();
- }
- /**
- *
- *
- *
- * Optional. Temporary field to store the bounding poly for short-term POCs. Used by
- * the frontend only. Do not use before you talk to ybo@ and lukasr@.
- *
- *
- *
- * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly_for_demo_frontend = 8 [(.google.api.field_behavior) = OPTIONAL];
- *
- */
- public com.google.cloud.documentai.v1beta2.BoundingPolyOrBuilder
- getBoundingPolyForDemoFrontendOrBuilder() {
- if (boundingPolyForDemoFrontendBuilder_ != null) {
- return boundingPolyForDemoFrontendBuilder_.getMessageOrBuilder();
- } else {
- return boundingPolyForDemoFrontend_ == null
- ? com.google.cloud.documentai.v1beta2.BoundingPoly.getDefaultInstance()
- : boundingPolyForDemoFrontend_;
- }
- }
- /**
- *
- *
- *
- * Optional. Temporary field to store the bounding poly for short-term POCs. Used by
- * the frontend only. Do not use before you talk to ybo@ and lukasr@.
- *
- *
- *
- * .google.cloud.documentai.v1beta2.BoundingPoly bounding_poly_for_demo_frontend = 8 [(.google.api.field_behavior) = OPTIONAL];
- *
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.cloud.documentai.v1beta2.BoundingPoly,
- com.google.cloud.documentai.v1beta2.BoundingPoly.Builder,
- com.google.cloud.documentai.v1beta2.BoundingPolyOrBuilder>
- getBoundingPolyForDemoFrontendFieldBuilder() {
- if (boundingPolyForDemoFrontendBuilder_ == null) {
- boundingPolyForDemoFrontendBuilder_ =
- new com.google.protobuf.SingleFieldBuilderV3<
- com.google.cloud.documentai.v1beta2.BoundingPoly,
- com.google.cloud.documentai.v1beta2.BoundingPoly.Builder,
- com.google.cloud.documentai.v1beta2.BoundingPolyOrBuilder>(
- getBoundingPolyForDemoFrontend(), getParentForChildren(), isClean());
- boundingPolyForDemoFrontend_ = null;
- }
- return boundingPolyForDemoFrontendBuilder_;
- }
-
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
@@ -34379,6 +34050,8 @@ private EntityRelation(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -35462,6 +35135,8 @@ private TextAnchor(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -35593,6 +35268,8 @@ private TextSegment(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -37406,6 +37083,8 @@ private PageAnchor(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -37593,6 +37272,8 @@ private PageRef(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
diff --git a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/DocumentProto.java b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/DocumentProto.java
index 572e94a5..540cfbf0 100644
--- a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/DocumentProto.java
+++ b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/DocumentProto.java
@@ -142,7 +142,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "le/cloud/documentai/v1beta2/geometry.pro"
+ "to\032\027google/rpc/status.proto\032\027google/type"
+ "/color.proto\032\034google/api/annotations.pro"
- + "to\"\323+\n\010Document\022\r\n\003uri\030\001 \001(\tH\000\022\021\n\007conten"
+ + "to\"\373*\n\010Document\022\r\n\003uri\030\001 \001(\tH\000\022\021\n\007conten"
+ "t\030\002 \001(\014H\000\022\021\n\tmime_type\030\003 \001(\t\022\014\n\004text\030\004 \001"
+ "(\t\022D\n\013text_styles\030\005 \003(\0132/.google.cloud.d"
+ "ocumentai.v1beta2.Document.Style\022=\n\005page"
@@ -256,38 +256,36 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "guage\022\022\n\nvalue_type\030\005 \001(\t\022\032\n\022corrected_k"
+ "ey_text\030\006 \001(\t\022\034\n\024corrected_value_text\030\007 "
+ "\001(\t\032=\n\020DetectedLanguage\022\025\n\rlanguage_code"
- + "\030\001 \001(\t\022\022\n\nconfidence\030\002 \001(\002\032\342\002\n\006Entity\022I\n"
+ + "\030\001 \001(\t\022\022\n\nconfidence\030\002 \001(\002\032\212\002\n\006Entity\022I\n"
+ "\013text_anchor\030\001 \001(\01324.google.cloud.docume"
- + "ntai.v1beta2.Document.TextAnchor\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\013pag"
- + "e_anchor\030\006 \001(\01324.google.cloud.documentai"
- + ".v1beta2.Document.PageAnchorB\003\340A\001\022\017\n\002id\030"
- + "\007 \001(\tB\003\340A\001\022[\n\037bounding_poly_for_demo_fro"
- + "ntend\030\010 \001(\0132-.google.cloud.documentai.v1"
- + "beta2.BoundingPolyB\003\340A\001\032I\n\016EntityRelatio"
- + "n\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\rtex"
- + "t_segments\030\001 \003(\0132@.google.cloud.document"
- + "ai.v1beta2.Document.TextAnchor.TextSegme"
- + "nt\022\017\n\007content\030\002 \001(\t\0325\n\013TextSegment\022\023\n\013st"
- + "art_index\030\001 \001(\003\022\021\n\tend_index\030\002 \001(\003\032\201\003\n\nP"
- + "ageAnchor\022O\n\tpage_refs\030\001 \003(\0132<.google.cl"
- + "oud.documentai.v1beta2.Document.PageAnch"
- + "or.PageRef\032\241\002\n\007PageRef\022\021\n\004page\030\001 \001(\003B\003\340A"
- + "\002\022a\n\013layout_type\030\002 \001(\0162G.google.cloud.do"
- + "cumentai.v1beta2.Document.PageAnchor.Pag"
- + "eRef.LayoutTypeB\003\340A\001\022\026\n\tlayout_id\030\003 \001(\tB"
- + "\003\340A\001\"\207\001\n\nLayoutType\022\033\n\027LAYOUT_TYPE_UNSPE"
- + "CIFIED\020\000\022\t\n\005BLOCK\020\001\022\r\n\tPARAGRAPH\020\002\022\010\n\004LI"
- + "NE\020\003\022\t\n\005TOKEN\020\004\022\022\n\016VISUAL_ELEMENT\020\005\022\t\n\005T"
- + "ABLE\020\006\022\016\n\nFORM_FIELD\020\007B\010\n\006sourceB\352\001\n#com"
- + ".google.cloud.documentai.v1beta2B\rDocume"
- + "ntProtoP\001ZIgoogle.golang.org/genproto/go"
- + "ogleapis/cloud/documentai/v1beta2;docume"
- + "ntai\252\002\037Google.Cloud.DocumentAI.V1Beta2\312\002"
- + "\037Google\\Cloud\\DocumentAI\\V1beta2\352\002\"Googl"
- + "e::Cloud::DocumentAI::V1beta2b\006proto3"
+ + "ntai.v1beta2.Document.TextAnchor\022\021\n\004type"
+ + "\030\002 \001(\tB\003\340A\002\022\024\n\014mention_text\030\003 \001(\t\022\022\n\nmen"
+ + "tion_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.docum"
+ + "entai.v1beta2.Document.PageAnchorB\003\340A\001\022\017"
+ + "\n\002id\030\007 \001(\tB\003\340A\001\032I\n\016EntityRelation\022\022\n\nsub"
+ + "ject_id\030\001 \001(\t\022\021\n\tobject_id\030\002 \001(\t\022\020\n\010rela"
+ + "tion\030\003 \001(\t\032\255\001\n\nTextAnchor\022W\n\rtext_segmen"
+ + "ts\030\001 \003(\0132@.google.cloud.documentai.v1bet"
+ + "a2.Document.TextAnchor.TextSegment\022\017\n\007co"
+ + "ntent\030\002 \001(\t\0325\n\013TextSegment\022\023\n\013start_inde"
+ + "x\030\001 \001(\003\022\021\n\tend_index\030\002 \001(\003\032\201\003\n\nPageAncho"
+ + "r\022O\n\tpage_refs\030\001 \003(\0132<.google.cloud.docu"
+ + "mentai.v1beta2.Document.PageAnchor.PageR"
+ + "ef\032\241\002\n\007PageRef\022\021\n\004page\030\001 \001(\003B\003\340A\002\022a\n\013lay"
+ + "out_type\030\002 \001(\0162G.google.cloud.documentai"
+ + ".v1beta2.Document.PageAnchor.PageRef.Lay"
+ + "outTypeB\003\340A\001\022\026\n\tlayout_id\030\003 \001(\tB\003\340A\001\"\207\001\n"
+ + "\nLayoutType\022\033\n\027LAYOUT_TYPE_UNSPECIFIED\020\000"
+ + "\022\t\n\005BLOCK\020\001\022\r\n\tPARAGRAPH\020\002\022\010\n\004LINE\020\003\022\t\n\005"
+ + "TOKEN\020\004\022\022\n\016VISUAL_ELEMENT\020\005\022\t\n\005TABLE\020\006\022\016"
+ + "\n\nFORM_FIELD\020\007B\010\n\006sourceB\352\001\n#com.google."
+ + "cloud.documentai.v1beta2B\rDocumentProtoP"
+ + "\001ZIgoogle.golang.org/genproto/googleapis"
+ + "/cloud/documentai/v1beta2;documentai\252\002\037G"
+ + "oogle.Cloud.DocumentAI.V1Beta2\312\002\037Google\\"
+ + "Cloud\\DocumentAI\\V1beta2\352\002\"Google::Cloud"
+ + "::DocumentAI::V1beta2b\006proto3"
};
descriptor =
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
@@ -518,14 +516,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_documentai_v1beta2_Document_Entity_descriptor,
new java.lang.String[] {
- "TextAnchor",
- "Type",
- "MentionText",
- "MentionId",
- "Confidence",
- "PageAnchor",
- "Id",
- "BoundingPolyForDemoFrontend",
+ "TextAnchor", "Type", "MentionText", "MentionId", "Confidence", "PageAnchor", "Id",
});
internal_static_google_cloud_documentai_v1beta2_Document_EntityRelation_descriptor =
internal_static_google_cloud_documentai_v1beta2_Document_descriptor.getNestedTypes().get(5);
diff --git a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/EntityExtractionParams.java b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/EntityExtractionParams.java
index f8878cf8..407419be 100644
--- a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/EntityExtractionParams.java
+++ b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/EntityExtractionParams.java
@@ -93,6 +93,8 @@ private EntityExtractionParams(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/FormExtractionParams.java b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/FormExtractionParams.java
index 205a0ccf..7d5cbe84 100644
--- a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/FormExtractionParams.java
+++ b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/FormExtractionParams.java
@@ -108,6 +108,8 @@ private FormExtractionParams(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/GcsDestination.java b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/GcsDestination.java
index 5ff2a1bb..aaeecad1 100644
--- a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/GcsDestination.java
+++ b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/GcsDestination.java
@@ -88,6 +88,8 @@ private GcsDestination(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/GcsSource.java b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/GcsSource.java
index 76aaf12d..7ce2d7ea 100644
--- a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/GcsSource.java
+++ b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/GcsSource.java
@@ -88,6 +88,8 @@ private GcsSource(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
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 08e12ca5..49b6594d 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
@@ -95,8 +95,8 @@ private InputConfig(
}
case 26:
{
- sourceCase_ = 3;
source_ = input.readBytes();
+ sourceCase_ = 3;
break;
}
default:
@@ -110,6 +110,8 @@ private InputConfig(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -848,8 +850,9 @@ public Builder mergeGcsSource(com.google.cloud.documentai.v1beta2.GcsSource valu
} else {
if (sourceCase_ == 1) {
gcsSourceBuilder_.mergeFrom(value);
+ } else {
+ gcsSourceBuilder_.setMessage(value);
}
- gcsSourceBuilder_.setMessage(value);
}
sourceCase_ = 1;
return this;
diff --git a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/KeyValuePairHint.java b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/KeyValuePairHint.java
index 05cdda48..c50ca637 100644
--- a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/KeyValuePairHint.java
+++ b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/KeyValuePairHint.java
@@ -100,6 +100,8 @@ private KeyValuePairHint(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/NormalizedVertex.java b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/NormalizedVertex.java
index 80c18e66..f5811785 100644
--- a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/NormalizedVertex.java
+++ b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/NormalizedVertex.java
@@ -91,6 +91,8 @@ private NormalizedVertex(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -164,10 +166,10 @@ public final boolean isInitialized() {
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
- if (x_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(x_) != 0) {
output.writeFloat(1, x_);
}
- if (y_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(y_) != 0) {
output.writeFloat(2, y_);
}
unknownFields.writeTo(output);
@@ -179,10 +181,10 @@ public int getSerializedSize() {
if (size != -1) return size;
size = 0;
- if (x_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(x_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, x_);
}
- if (y_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(y_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, y_);
}
size += unknownFields.getSerializedSize();
diff --git a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/OcrParams.java b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/OcrParams.java
index ace9d501..9cfc762b 100644
--- a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/OcrParams.java
+++ b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/OcrParams.java
@@ -92,6 +92,8 @@ private OcrParams(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/OperationMetadata.java b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/OperationMetadata.java
index 514688a3..7088cb6f 100644
--- a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/OperationMetadata.java
+++ b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/OperationMetadata.java
@@ -126,6 +126,8 @@ private OperationMetadata(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/OutputConfig.java b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/OutputConfig.java
index be685ca5..4e4c3e8e 100644
--- a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/OutputConfig.java
+++ b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/OutputConfig.java
@@ -103,6 +103,8 @@ private OutputConfig(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -739,8 +741,9 @@ public Builder mergeGcsDestination(com.google.cloud.documentai.v1beta2.GcsDestin
} else {
if (destinationCase_ == 1) {
gcsDestinationBuilder_.mergeFrom(value);
+ } else {
+ gcsDestinationBuilder_.setMessage(value);
}
- gcsDestinationBuilder_.setMessage(value);
}
destinationCase_ = 1;
return this;
diff --git a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/ProcessDocumentRequest.java b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/ProcessDocumentRequest.java
index 13096ada..17850db0 100644
--- a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/ProcessDocumentRequest.java
+++ b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/ProcessDocumentRequest.java
@@ -211,6 +211,8 @@ private ProcessDocumentRequest(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/ProcessDocumentResponse.java b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/ProcessDocumentResponse.java
index 7f605f71..753b41d0 100644
--- a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/ProcessDocumentResponse.java
+++ b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/ProcessDocumentResponse.java
@@ -111,6 +111,8 @@ private ProcessDocumentResponse(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/TableBoundHint.java b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/TableBoundHint.java
index c459b0ae..2bf2e4fa 100644
--- a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/TableBoundHint.java
+++ b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/TableBoundHint.java
@@ -100,6 +100,8 @@ private TableBoundHint(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/TableExtractionParams.java b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/TableExtractionParams.java
index 19041823..9cd06d58 100644
--- a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/TableExtractionParams.java
+++ b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/TableExtractionParams.java
@@ -119,6 +119,8 @@ private TableExtractionParams(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/Vertex.java b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/Vertex.java
index 98cb993c..712840e2 100644
--- a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/Vertex.java
+++ b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/Vertex.java
@@ -90,6 +90,8 @@ private Vertex(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta2/src/main/proto/google/cloud/documentai/v1beta2/document.proto b/proto-google-cloud-document-ai-v1beta2/src/main/proto/google/cloud/documentai/v1beta2/document.proto
index b8af15b5..846fcd26 100644
--- a/proto-google-cloud-document-ai-v1beta2/src/main/proto/google/cloud/documentai/v1beta2/document.proto
+++ b/proto-google-cloud-document-ai-v1beta2/src/main/proto/google/cloud/documentai/v1beta2/document.proto
@@ -368,8 +368,8 @@ message Document {
// Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
TextAnchor text_anchor = 1;
- // Entity type from a schema e.g. `Address`.
- string type = 2;
+ // Required. Entity type from a schema e.g. `Address`.
+ string type = 2 [(google.api.field_behavior) = REQUIRED];
// Text value in the document e.g. `1600 Amphitheatre Pkwy`.
string mention_text = 3;
@@ -387,10 +387,6 @@ message Document {
// Optional. Canonical id. This will be a unique value in the entity list
// for this document.
string id = 7 [(google.api.field_behavior) = OPTIONAL];
-
- // Optional. Temporary field to store the bounding poly for short-term POCs. Used by
- // the frontend only. Do not use before you talk to ybo@ and lukasr@.
- BoundingPoly bounding_poly_for_demo_frontend = 8 [(google.api.field_behavior) = OPTIONAL];
}
// Relationship between [Entities][google.cloud.documentai.v1beta2.Document.Entity].
diff --git a/proto-google-cloud-document-ai-v1beta3/pom.xml b/proto-google-cloud-document-ai-v1beta3/pom.xml
index 28a40d5e..b5c11c0a 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.16.3
+ 0.17.0
proto-google-cloud-document-ai-v1beta3
PROTO library for proto-google-cloud-document-ai-v1beta3
com.google.cloud
google-cloud-document-ai-parent
- 2.4.3
+ 2.5.0
diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchDocumentsInputConfig.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchDocumentsInputConfig.java
index 05e6c187..4cca4ce9 100644
--- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchDocumentsInputConfig.java
+++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchDocumentsInputConfig.java
@@ -112,6 +112,8 @@ private BatchDocumentsInputConfig(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -788,8 +790,9 @@ public Builder mergeGcsPrefix(com.google.cloud.documentai.v1beta3.GcsPrefix valu
} else {
if (sourceCase_ == 1) {
gcsPrefixBuilder_.mergeFrom(value);
+ } else {
+ gcsPrefixBuilder_.setMessage(value);
}
- gcsPrefixBuilder_.setMessage(value);
}
sourceCase_ = 1;
return this;
@@ -997,8 +1000,9 @@ public Builder mergeGcsDocuments(com.google.cloud.documentai.v1beta3.GcsDocument
} else {
if (sourceCase_ == 2) {
gcsDocumentsBuilder_.mergeFrom(value);
+ } else {
+ gcsDocumentsBuilder_.setMessage(value);
}
- gcsDocumentsBuilder_.setMessage(value);
}
sourceCase_ = 2;
return this;
diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessMetadata.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessMetadata.java
index 1d454f7e..42013b2b 100644
--- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessMetadata.java
+++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessMetadata.java
@@ -144,6 +144,8 @@ private BatchProcessMetadata(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -528,6 +530,9 @@ public interface IndividualProcessStatusOrBuilder
*
* string human_review_operation = 4 [deprecated = true];
*
+ * @deprecated
+ * google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus.human_review_operation
+ * is deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=315
* @return The humanReviewOperation.
*/
@java.lang.Deprecated
@@ -544,6 +549,9 @@ public interface IndividualProcessStatusOrBuilder
*
* string human_review_operation = 4 [deprecated = true];
*
+ * @deprecated
+ * google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus.human_review_operation
+ * is deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=315
* @return The bytes for humanReviewOperation.
*/
@java.lang.Deprecated
@@ -702,6 +710,8 @@ private IndividualProcessStatus(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -893,6 +903,9 @@ public com.google.protobuf.ByteString getOutputGcsDestinationBytes() {
*
* string human_review_operation = 4 [deprecated = true];
*
+ * @deprecated
+ * google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus.human_review_operation
+ * is deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=315
* @return The humanReviewOperation.
*/
@java.lang.Override
@@ -920,6 +933,9 @@ public java.lang.String getHumanReviewOperation() {
*
* string human_review_operation = 4 [deprecated = true];
*
+ * @deprecated
+ * google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus.human_review_operation
+ * is deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=315
* @return The bytes for humanReviewOperation.
*/
@java.lang.Override
@@ -1841,6 +1857,10 @@ public Builder setOutputGcsDestinationBytes(com.google.protobuf.ByteString value
*
* string human_review_operation = 4 [deprecated = true];
*
+ * @deprecated
+ * google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus.human_review_operation
+ * is deprecated. See
+ * google/cloud/documentai/v1beta3/document_processor_service.proto;l=315
* @return The humanReviewOperation.
*/
@java.lang.Deprecated
@@ -1867,6 +1887,10 @@ public java.lang.String getHumanReviewOperation() {
*
* string human_review_operation = 4 [deprecated = true];
*
+ * @deprecated
+ * google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus.human_review_operation
+ * is deprecated. See
+ * google/cloud/documentai/v1beta3/document_processor_service.proto;l=315
* @return The bytes for humanReviewOperation.
*/
@java.lang.Deprecated
@@ -1893,6 +1917,10 @@ public com.google.protobuf.ByteString getHumanReviewOperationBytes() {
*
* string human_review_operation = 4 [deprecated = true];
*
+ * @deprecated
+ * google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus.human_review_operation
+ * is deprecated. See
+ * google/cloud/documentai/v1beta3/document_processor_service.proto;l=315
* @param value The humanReviewOperation to set.
* @return This builder for chaining.
*/
@@ -1918,6 +1946,10 @@ public Builder setHumanReviewOperation(java.lang.String value) {
*
* string human_review_operation = 4 [deprecated = true];
*
+ * @deprecated
+ * google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus.human_review_operation
+ * is deprecated. See
+ * google/cloud/documentai/v1beta3/document_processor_service.proto;l=315
* @return This builder for chaining.
*/
@java.lang.Deprecated
@@ -1939,6 +1971,10 @@ public Builder clearHumanReviewOperation() {
*
* string human_review_operation = 4 [deprecated = true];
*
+ * @deprecated
+ * google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus.human_review_operation
+ * is deprecated. See
+ * google/cloud/documentai/v1beta3/document_processor_service.proto;l=315
* @param value The bytes for humanReviewOperation to set.
* @return This builder for chaining.
*/
diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessRequest.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessRequest.java
index a1fd3fa8..9183f829 100644
--- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessRequest.java
+++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessRequest.java
@@ -164,6 +164,8 @@ private BatchProcessRequest(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -329,6 +331,8 @@ private BatchInputConfig(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -1193,6 +1197,8 @@ private BatchOutputConfig(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -1926,6 +1932,8 @@ public com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig
* .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig output_config = 3 [deprecated = true];
*
*
+ * @deprecated google.cloud.documentai.v1beta3.BatchProcessRequest.output_config is deprecated.
+ * See google/cloud/documentai/v1beta3/document_processor_service.proto;l=276
* @return Whether the outputConfig field is set.
*/
@java.lang.Override
@@ -1944,6 +1952,8 @@ public boolean hasOutputConfig() {
* .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig output_config = 3 [deprecated = true];
*
*
+ * @deprecated google.cloud.documentai.v1beta3.BatchProcessRequest.output_config is deprecated.
+ * See google/cloud/documentai/v1beta3/document_processor_service.proto;l=276
* @return The outputConfig.
*/
@java.lang.Override
@@ -3131,6 +3141,8 @@ public Builder removeInputConfigs(int index) {
* .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig output_config = 3 [deprecated = true];
*
*
+ * @deprecated google.cloud.documentai.v1beta3.BatchProcessRequest.output_config is deprecated.
+ * See google/cloud/documentai/v1beta3/document_processor_service.proto;l=276
* @return Whether the outputConfig field is set.
*/
@java.lang.Deprecated
@@ -3148,6 +3160,8 @@ public boolean hasOutputConfig() {
* .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig output_config = 3 [deprecated = true];
*
*
+ * @deprecated google.cloud.documentai.v1beta3.BatchProcessRequest.output_config is deprecated.
+ * See google/cloud/documentai/v1beta3/document_processor_service.proto;l=276
* @return The outputConfig.
*/
@java.lang.Deprecated
diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessRequestOrBuilder.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessRequestOrBuilder.java
index 2a1f2597..0db0dbde 100644
--- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessRequestOrBuilder.java
+++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessRequestOrBuilder.java
@@ -135,6 +135,8 @@ com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig getInpu
* .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig output_config = 3 [deprecated = true];
*
*
+ * @deprecated google.cloud.documentai.v1beta3.BatchProcessRequest.output_config is deprecated.
+ * See google/cloud/documentai/v1beta3/document_processor_service.proto;l=276
* @return Whether the outputConfig field is set.
*/
@java.lang.Deprecated
@@ -150,6 +152,8 @@ com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig getInpu
* .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig output_config = 3 [deprecated = true];
*
*
+ * @deprecated google.cloud.documentai.v1beta3.BatchProcessRequest.output_config is deprecated.
+ * See google/cloud/documentai/v1beta3/document_processor_service.proto;l=276
* @return The outputConfig.
*/
@java.lang.Deprecated
diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessResponse.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessResponse.java
index c3b019cf..d25532ce 100644
--- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessResponse.java
+++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessResponse.java
@@ -79,6 +79,8 @@ private BatchProcessResponse(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BoundingPoly.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BoundingPoly.java
index d17c5cfb..504f7fd5 100644
--- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BoundingPoly.java
+++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BoundingPoly.java
@@ -107,6 +107,8 @@ private BoundingPoly(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/CommonOperationMetadata.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/CommonOperationMetadata.java
index fa877299..058ba1c4 100644
--- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/CommonOperationMetadata.java
+++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/CommonOperationMetadata.java
@@ -126,6 +126,8 @@ private CommonOperationMetadata(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/CreateProcessorRequest.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/CreateProcessorRequest.java
index 4c9807b4..377856b9 100644
--- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/CreateProcessorRequest.java
+++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/CreateProcessorRequest.java
@@ -106,6 +106,8 @@ private CreateProcessorRequest(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DeleteProcessorMetadata.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DeleteProcessorMetadata.java
index ba296301..68615db2 100644
--- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DeleteProcessorMetadata.java
+++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DeleteProcessorMetadata.java
@@ -96,6 +96,8 @@ private DeleteProcessorMetadata(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DeleteProcessorRequest.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DeleteProcessorRequest.java
index dd37576b..9c73a1f8 100644
--- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DeleteProcessorRequest.java
+++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DeleteProcessorRequest.java
@@ -88,6 +88,8 @@ private DeleteProcessorRequest(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DisableProcessorMetadata.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DisableProcessorMetadata.java
index 3f8ece41..fb4c8ad1 100644
--- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DisableProcessorMetadata.java
+++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DisableProcessorMetadata.java
@@ -96,6 +96,8 @@ private DisableProcessorMetadata(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DisableProcessorRequest.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DisableProcessorRequest.java
index ef84aaa1..fdb1f7ab 100644
--- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DisableProcessorRequest.java
+++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DisableProcessorRequest.java
@@ -88,6 +88,8 @@ private DisableProcessorRequest(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DisableProcessorResponse.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DisableProcessorResponse.java
index 4cd30c61..dec028e9 100644
--- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DisableProcessorResponse.java
+++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DisableProcessorResponse.java
@@ -79,6 +79,8 @@ private DisableProcessorResponse(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
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 a6017d24..b66fd9ab 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
@@ -91,8 +91,8 @@ private Document(
}
case 18:
{
- sourceCase_ = 2;
source_ = input.readBytes();
+ sourceCase_ = 2;
break;
}
case 26:
@@ -232,6 +232,8 @@ private Document(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -397,6 +399,8 @@ private ShardInfo(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -1426,6 +1430,8 @@ private Style(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -1567,6 +1573,8 @@ private FontSize(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -1672,7 +1680,7 @@ public final boolean isInitialized() {
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
- if (size_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(size_) != 0) {
output.writeFloat(1, size_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(unit_)) {
@@ -1687,7 +1695,7 @@ public int getSerializedSize() {
if (size != -1) return size;
size = 0;
- if (size_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(size_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, size_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(unit_)) {
@@ -5215,6 +5223,8 @@ private Page(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -5404,6 +5414,8 @@ private Dimension(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -5527,10 +5539,10 @@ public final boolean isInitialized() {
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
- if (width_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(width_) != 0) {
output.writeFloat(1, width_);
}
- if (height_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(height_) != 0) {
output.writeFloat(2, height_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(unit_)) {
@@ -5545,10 +5557,10 @@ public int getSerializedSize() {
if (size != -1) return size;
size = 0;
- if (width_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(width_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, width_);
}
- if (height_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(height_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, height_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(unit_)) {
@@ -6292,6 +6304,8 @@ private Image(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -7248,6 +7262,8 @@ private Matrix(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -8226,6 +8242,8 @@ private Layout(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -8647,7 +8665,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (textAnchor_ != null) {
output.writeMessage(1, getTextAnchor());
}
- if (confidence_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(confidence_) != 0) {
output.writeFloat(2, confidence_);
}
if (boundingPoly_ != null) {
@@ -8671,7 +8689,7 @@ public int getSerializedSize() {
if (textAnchor_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTextAnchor());
}
- if (confidence_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(confidence_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, confidence_);
}
if (boundingPoly_ != null) {
@@ -9909,6 +9927,8 @@ private Block(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -11657,6 +11677,8 @@ private Paragraph(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -13412,6 +13434,8 @@ private Line(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -15224,6 +15248,8 @@ private Token(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -15354,6 +15380,8 @@ private DetectedBreak(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -18096,6 +18124,8 @@ private Symbol(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -19563,6 +19593,8 @@ private VisualElement(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -21337,6 +21369,8 @@ private Table(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -21515,6 +21549,8 @@ private TableRow(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -22709,6 +22745,8 @@ private TableCell(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -26856,6 +26894,8 @@ private FormField(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -29543,6 +29583,8 @@ private DetectedLanguage(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -29655,7 +29697,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, languageCode_);
}
- if (confidence_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(confidence_) != 0) {
output.writeFloat(2, confidence_);
}
unknownFields.writeTo(output);
@@ -29670,7 +29712,7 @@ public int getSerializedSize() {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, languageCode_);
}
- if (confidence_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(confidence_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, confidence_);
}
size += unknownFields.getSerializedSize();
@@ -37076,10 +37118,10 @@ public interface EntityOrBuilder
*
*
*
- * Entity type from a schema e.g. `Address`.
+ * Required. Entity type from a schema e.g. `Address`.
*
*
- * string type = 2;
+ * string type = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The type.
*/
@@ -37088,10 +37130,10 @@ public interface EntityOrBuilder
*
*
*
- * Entity type from a schema e.g. `Address`.
+ * Required. Entity type from a schema e.g. `Address`.
*
*
- * string type = 2;
+ * string type = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for type.
*/
@@ -37598,6 +37640,8 @@ private Entity(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -37973,8 +38017,8 @@ private NormalizedValue(
}
case 48:
{
- structuredValueCase_ = 6;
structuredValue_ = input.readBool();
+ structuredValueCase_ = 6;
break;
}
default:
@@ -37988,6 +38032,8 @@ private NormalizedValue(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -38999,8 +39045,9 @@ public Builder mergeMoneyValue(com.google.type.Money value) {
} else {
if (structuredValueCase_ == 2) {
moneyValueBuilder_.mergeFrom(value);
+ } else {
+ moneyValueBuilder_.setMessage(value);
}
- moneyValueBuilder_.setMessage(value);
}
structuredValueCase_ = 2;
return this;
@@ -39211,8 +39258,9 @@ public Builder mergeDateValue(com.google.type.Date value) {
} else {
if (structuredValueCase_ == 3) {
dateValueBuilder_.mergeFrom(value);
+ } else {
+ dateValueBuilder_.setMessage(value);
}
- dateValueBuilder_.setMessage(value);
}
structuredValueCase_ = 3;
return this;
@@ -39423,8 +39471,9 @@ public Builder mergeDatetimeValue(com.google.type.DateTime value) {
} else {
if (structuredValueCase_ == 4) {
datetimeValueBuilder_.mergeFrom(value);
+ } else {
+ datetimeValueBuilder_.setMessage(value);
}
- datetimeValueBuilder_.setMessage(value);
}
structuredValueCase_ = 4;
return this;
@@ -39638,8 +39687,9 @@ public Builder mergeAddressValue(com.google.type.PostalAddress value) {
} else {
if (structuredValueCase_ == 5) {
addressValueBuilder_.mergeFrom(value);
+ } else {
+ addressValueBuilder_.setMessage(value);
}
- addressValueBuilder_.setMessage(value);
}
structuredValueCase_ = 5;
return this;
@@ -40081,10 +40131,10 @@ public com.google.cloud.documentai.v1beta3.Document.TextAnchor getTextAnchor() {
*
*
*
- * Entity type from a schema e.g. `Address`.
+ * Required. Entity type from a schema e.g. `Address`.
*
*
- * string type = 2;
+ * string type = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The type.
*/
@@ -40104,10 +40154,10 @@ public java.lang.String getType() {
*
*
*
- * Entity type from a schema e.g. `Address`.
+ * Required. Entity type from a schema e.g. `Address`.
*
*
- * string type = 2;
+ * string type = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for type.
*/
@@ -40601,7 +40651,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mentionId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, mentionId_);
}
- if (confidence_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(confidence_) != 0) {
output.writeFloat(5, confidence_);
}
if (pageAnchor_ != null) {
@@ -40643,7 +40693,7 @@ public int getSerializedSize() {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mentionId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, mentionId_);
}
- if (confidence_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(confidence_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(5, confidence_);
}
if (pageAnchor_ != null) {
@@ -41379,10 +41429,10 @@ public Builder clearTextAnchor() {
*
*
*
- * Entity type from a schema e.g. `Address`.
+ * Required. Entity type from a schema e.g. `Address`.
*
*
- * string type = 2;
+ * string type = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The type.
*/
@@ -41401,10 +41451,10 @@ public java.lang.String getType() {
*
*
*
- * Entity type from a schema e.g. `Address`.
+ * Required. Entity type from a schema e.g. `Address`.
*
*
- * string type = 2;
+ * string type = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for type.
*/
@@ -41423,10 +41473,10 @@ public com.google.protobuf.ByteString getTypeBytes() {
*
*
*
- * Entity type from a schema e.g. `Address`.
+ * Required. Entity type from a schema e.g. `Address`.
*
*
- * string type = 2;
+ * string type = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The type to set.
* @return This builder for chaining.
@@ -41444,10 +41494,10 @@ public Builder setType(java.lang.String value) {
*
*
*
- * Entity type from a schema e.g. `Address`.
+ * Required. Entity type from a schema e.g. `Address`.
*
*
- * string type = 2;
+ * string type = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
@@ -41461,10 +41511,10 @@ public Builder clearType() {
*
*
*
- * Entity type from a schema e.g. `Address`.
+ * Required. Entity type from a schema e.g. `Address`.
*
*
- * string type = 2;
+ * string type = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The bytes for type to set.
* @return This builder for chaining.
@@ -43211,6 +43261,8 @@ private EntityRelation(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -44303,6 +44355,8 @@ private TextAnchor(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -44439,6 +44493,8 @@ private TextSegment(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -46300,6 +46356,8 @@ private PageAnchor(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -46392,6 +46450,8 @@ public interface PageRefOrBuilder
* string layout_id = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];
*
*
+ * @deprecated google.cloud.documentai.v1beta3.Document.PageAnchor.PageRef.layout_id is
+ * deprecated. See google/cloud/documentai/v1beta3/document.proto;l=628
* @return The layoutId.
*/
@java.lang.Deprecated
@@ -46408,6 +46468,8 @@ public interface PageRefOrBuilder
* string layout_id = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];
*
*
+ * @deprecated google.cloud.documentai.v1beta3.Document.PageAnchor.PageRef.layout_id is
+ * deprecated. See google/cloud/documentai/v1beta3/document.proto;l=628
* @return The bytes for layoutId.
*/
@java.lang.Deprecated
@@ -46576,6 +46638,8 @@ private PageRef(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -46983,6 +47047,8 @@ public int getLayoutTypeValue() {
* string layout_id = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];
*
*
+ * @deprecated google.cloud.documentai.v1beta3.Document.PageAnchor.PageRef.layout_id is
+ * deprecated. See google/cloud/documentai/v1beta3/document.proto;l=628
* @return The layoutId.
*/
@java.lang.Override
@@ -47010,6 +47076,8 @@ public java.lang.String getLayoutId() {
* string layout_id = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];
*
*
+ * @deprecated google.cloud.documentai.v1beta3.Document.PageAnchor.PageRef.layout_id is
+ * deprecated. See google/cloud/documentai/v1beta3/document.proto;l=628
* @return The bytes for layoutId.
*/
@java.lang.Override
@@ -47131,7 +47199,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (boundingPoly_ != null) {
output.writeMessage(4, getBoundingPoly());
}
- if (confidence_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(confidence_) != 0) {
output.writeFloat(5, confidence_);
}
unknownFields.writeTo(output);
@@ -47158,7 +47226,7 @@ public int getSerializedSize() {
if (boundingPoly_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getBoundingPoly());
}
- if (confidence_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(confidence_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(5, confidence_);
}
size += unknownFields.getSerializedSize();
@@ -47706,6 +47774,8 @@ public Builder clearLayoutType() {
* string layout_id = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];
*
*
+ * @deprecated google.cloud.documentai.v1beta3.Document.PageAnchor.PageRef.layout_id is
+ * deprecated. See google/cloud/documentai/v1beta3/document.proto;l=628
* @return The layoutId.
*/
@java.lang.Deprecated
@@ -47732,6 +47802,8 @@ public java.lang.String getLayoutId() {
* string layout_id = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];
*
*
+ * @deprecated google.cloud.documentai.v1beta3.Document.PageAnchor.PageRef.layout_id is
+ * deprecated. See google/cloud/documentai/v1beta3/document.proto;l=628
* @return The bytes for layoutId.
*/
@java.lang.Deprecated
@@ -47758,6 +47830,8 @@ public com.google.protobuf.ByteString getLayoutIdBytes() {
* string layout_id = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];
*
*
+ * @deprecated google.cloud.documentai.v1beta3.Document.PageAnchor.PageRef.layout_id is
+ * deprecated. See google/cloud/documentai/v1beta3/document.proto;l=628
* @param value The layoutId to set.
* @return This builder for chaining.
*/
@@ -47783,6 +47857,8 @@ public Builder setLayoutId(java.lang.String value) {
* string layout_id = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];
*
*
+ * @deprecated google.cloud.documentai.v1beta3.Document.PageAnchor.PageRef.layout_id is
+ * deprecated. See google/cloud/documentai/v1beta3/document.proto;l=628
* @return This builder for chaining.
*/
@java.lang.Deprecated
@@ -47804,6 +47880,8 @@ public Builder clearLayoutId() {
* string layout_id = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];
*
*
+ * @deprecated google.cloud.documentai.v1beta3.Document.PageAnchor.PageRef.layout_id is
+ * deprecated. See google/cloud/documentai/v1beta3/document.proto;l=628
* @param value The bytes for layoutId to set.
* @return This builder for chaining.
*/
@@ -49058,6 +49136,8 @@ public interface ProvenanceOrBuilder
*
* int32 id = 2 [deprecated = true];
*
+ * @deprecated google.cloud.documentai.v1beta3.Document.Provenance.id is deprecated. See
+ * google/cloud/documentai/v1beta3/document.proto;l=692
* @return The id.
*/
@java.lang.Deprecated
@@ -49244,6 +49324,8 @@ private Provenance(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -49564,6 +49646,8 @@ public interface ParentOrBuilder
*
* int32 id = 2 [deprecated = true];
*
+ * @deprecated google.cloud.documentai.v1beta3.Document.Provenance.Parent.id is deprecated.
+ * See google/cloud/documentai/v1beta3/document.proto;l=658
* @return The id.
*/
@java.lang.Deprecated
@@ -49646,6 +49730,8 @@ private Parent(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -49718,6 +49804,8 @@ public int getIndex() {
*
* int32 id = 2 [deprecated = true];
*
+ * @deprecated google.cloud.documentai.v1beta3.Document.Provenance.Parent.id is deprecated.
+ * See google/cloud/documentai/v1beta3/document.proto;l=658
* @return The id.
*/
@java.lang.Override
@@ -50205,6 +50293,8 @@ public Builder clearIndex() {
*
* int32 id = 2 [deprecated = true];
*
+ * @deprecated google.cloud.documentai.v1beta3.Document.Provenance.Parent.id is deprecated.
+ * See google/cloud/documentai/v1beta3/document.proto;l=658
* @return The id.
*/
@java.lang.Override
@@ -50221,6 +50311,8 @@ public int getId() {
*
* int32 id = 2 [deprecated = true];
*
+ * @deprecated google.cloud.documentai.v1beta3.Document.Provenance.Parent.id is deprecated.
+ * See google/cloud/documentai/v1beta3/document.proto;l=658
* @param value The id to set.
* @return This builder for chaining.
*/
@@ -50240,6 +50332,8 @@ public Builder setId(int value) {
*
* int32 id = 2 [deprecated = true];
*
+ * @deprecated google.cloud.documentai.v1beta3.Document.Provenance.Parent.id is deprecated.
+ * See google/cloud/documentai/v1beta3/document.proto;l=658
* @return This builder for chaining.
*/
@java.lang.Deprecated
@@ -50335,6 +50429,8 @@ public int getRevision() {
*
* int32 id = 2 [deprecated = true];
*
+ * @deprecated google.cloud.documentai.v1beta3.Document.Provenance.id is deprecated. See
+ * google/cloud/documentai/v1beta3/document.proto;l=692
* @return The id.
*/
@java.lang.Override
@@ -50938,6 +51034,8 @@ public Builder clearRevision() {
*
* int32 id = 2 [deprecated = true];
*
+ * @deprecated google.cloud.documentai.v1beta3.Document.Provenance.id is deprecated. See
+ * google/cloud/documentai/v1beta3/document.proto;l=692
* @return The id.
*/
@java.lang.Override
@@ -50955,6 +51053,8 @@ public int getId() {
*
* int32 id = 2 [deprecated = true];
*
+ * @deprecated google.cloud.documentai.v1beta3.Document.Provenance.id is deprecated. See
+ * google/cloud/documentai/v1beta3/document.proto;l=692
* @param value The id to set.
* @return This builder for chaining.
*/
@@ -50975,6 +51075,8 @@ public Builder setId(int value) {
*
* int32 id = 2 [deprecated = true];
*
+ * @deprecated google.cloud.documentai.v1beta3.Document.Provenance.id is deprecated. See
+ * google/cloud/documentai/v1beta3/document.proto;l=692
* @return This builder for chaining.
*/
@java.lang.Deprecated
@@ -51888,6 +51990,8 @@ private Revision(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -52049,6 +52153,8 @@ private HumanReview(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
@@ -54890,6 +54996,8 @@ private TextChange(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentOutputConfig.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentOutputConfig.java
index 0681190d..be655ad6 100644
--- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentOutputConfig.java
+++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentOutputConfig.java
@@ -104,6 +104,8 @@ private DocumentOutputConfig(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -227,6 +229,8 @@ private GcsOutputConfig(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -1410,8 +1414,9 @@ public Builder mergeGcsOutputConfig(
} else {
if (destinationCase_ == 1) {
gcsOutputConfigBuilder_.mergeFrom(value);
+ } else {
+ gcsOutputConfigBuilder_.setMessage(value);
}
- gcsOutputConfigBuilder_.setMessage(value);
}
destinationCase_ = 1;
return this;
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 a3968dee..0ccba4c4 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
@@ -177,7 +177,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "atus.proto\032\027google/type/color.proto\032\026goo"
+ "gle/type/date.proto\032\032google/type/datetim"
+ "e.proto\032\027google/type/money.proto\032 google"
- + "/type/postal_address.proto\"\215>\n\010Document\022"
+ + "/type/postal_address.proto\"\222>\n\010Document\022"
+ "\022\n\003uri\030\001 \001(\tB\003\340A\001H\000\022\026\n\007content\030\002 \001(\014B\003\340A"
+ "\001H\000\022\021\n\tmime_type\030\003 \001(\t\022\021\n\004text\030\004 \001(\tB\003\340A"
+ "\001\022D\n\013text_styles\030\005 \003(\0132/.google.cloud.do"
@@ -315,74 +315,74 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "rovenance\030\010 \001(\01324.google.cloud.documenta"
+ "i.v1beta3.Document.Provenance\032=\n\020Detecte"
+ "dLanguage\022\025\n\rlanguage_code\030\001 \001(\t\022\022\n\nconf"
- + "idence\030\002 \001(\002\032\264\006\n\006Entity\022N\n\013text_anchor\030\001"
+ + "idence\030\002 \001(\002\032\271\006\n\006Entity\022N\n\013text_anchor\030\001"
+ " \001(\01324.google.cloud.documentai.v1beta3.D"
- + "ocument.TextAnchorB\003\340A\001\022\014\n\004type\030\002 \001(\t\022\031\n"
- + "\014mention_text\030\003 \001(\tB\003\340A\001\022\027\n\nmention_id\030\004"
- + " \001(\tB\003\340A\001\022\027\n\nconfidence\030\005 \001(\002B\003\340A\001\022N\n\013pa"
- + "ge_anchor\030\006 \001(\01324.google.cloud.documenta"
- + "i.v1beta3.Document.PageAnchorB\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.v1beta3.Document"
- + ".Entity.NormalizedValueB\003\340A\001\022I\n\nproperti"
- + "es\030\n \003(\01320.google.cloud.documentai.v1bet"
- + "a3.Document.EntityB\003\340A\001\022M\n\nprovenance\030\013 "
- + "\001(\01324.google.cloud.documentai.v1beta3.Do"
- + "cument.ProvenanceB\003\340A\001\022\025\n\010redacted\030\014 \001(\010"
- + "B\003\340A\001\032\213\002\n\017NormalizedValue\022)\n\013money_value"
- + "\030\002 \001(\0132\022.google.type.MoneyH\000\022\'\n\ndate_val"
- + "ue\030\003 \001(\0132\021.google.type.DateH\000\022/\n\016datetim"
- + "e_value\030\004 \001(\0132\025.google.type.DateTimeH\000\0223"
- + "\n\raddress_value\030\005 \001(\0132\032.google.type.Post"
- + "alAddressH\000\022\027\n\rboolean_value\030\006 \001(\010H\000\022\021\n\004"
- + "text\030\001 \001(\tB\003\340A\001B\022\n\020structured_value\032I\n\016E"
- + "ntityRelation\022\022\n\nsubject_id\030\001 \001(\t\022\021\n\tobj"
- + "ect_id\030\002 \001(\t\022\020\n\010relation\030\003 \001(\t\032\255\001\n\nTextA"
- + "nchor\022W\n\rtext_segments\030\001 \003(\0132@.google.cl"
- + "oud.documentai.v1beta3.Document.TextAnch"
- + "or.TextSegment\022\017\n\007content\030\002 \001(\t\0325\n\013TextS"
- + "egment\022\023\n\013start_index\030\001 \001(\003\022\021\n\tend_index"
- + "\030\002 \001(\003\032\347\003\n\nPageAnchor\022O\n\tpage_refs\030\001 \003(\013"
- + "2<.google.cloud.documentai.v1beta3.Docum"
- + "ent.PageAnchor.PageRef\032\207\003\n\007PageRef\022\021\n\004pa"
- + "ge\030\001 \001(\003B\003\340A\002\022a\n\013layout_type\030\002 \001(\0162G.goo"
- + "gle.cloud.documentai.v1beta3.Document.Pa"
- + "geAnchor.PageRef.LayoutTypeB\003\340A\001\022\030\n\tlayo"
- + "ut_id\030\003 \001(\tB\005\030\001\340A\001\022I\n\rbounding_poly\030\004 \001("
- + "\0132-.google.cloud.documentai.v1beta3.Boun"
- + "dingPolyB\003\340A\001\022\027\n\nconfidence\030\005 \001(\002B\003\340A\001\"\207"
- + "\001\n\nLayoutType\022\033\n\027LAYOUT_TYPE_UNSPECIFIED"
- + "\020\000\022\t\n\005BLOCK\020\001\022\r\n\tPARAGRAPH\020\002\022\010\n\004LINE\020\003\022\t"
- + "\n\005TOKEN\020\004\022\022\n\016VISUAL_ELEMENT\020\005\022\t\n\005TABLE\020\006"
- + "\022\016\n\nFORM_FIELD\020\007\032\226\003\n\nProvenance\022\020\n\010revis"
- + "ion\030\001 \001(\005\022\016\n\002id\030\002 \001(\005B\002\030\001\022L\n\007parents\030\003 \003"
- + "(\0132;.google.cloud.documentai.v1beta3.Doc"
- + "ument.Provenance.Parent\022P\n\004type\030\004 \001(\0162B."
- + "google.cloud.documentai.v1beta3.Document"
- + ".Provenance.OperationType\0329\n\006Parent\022\020\n\010r"
- + "evision\030\001 \001(\005\022\r\n\005index\030\003 \001(\005\022\016\n\002id\030\002 \001(\005"
- + "B\002\030\001\"\212\001\n\rOperationType\022\036\n\032OPERATION_TYPE"
- + "_UNSPECIFIED\020\000\022\007\n\003ADD\020\001\022\n\n\006REMOVE\020\002\022\013\n\007R"
- + "EPLACE\020\003\022\022\n\016EVAL_REQUESTED\020\004\022\021\n\rEVAL_APP"
- + "ROVED\020\005\022\020\n\014EVAL_SKIPPED\020\006\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\002"
- + "id\030\001 \001(\t\022\016\n\006parent\030\002 \003(\005\022/\n\013create_time\030"
- + "\003 \001(\0132\032.google.protobuf.Timestamp\022T\n\014hum"
- + "an_review\030\006 \001(\0132>.google.cloud.documenta"
- + "i.v1beta3.Document.Revision.HumanReview\032"
- + "3\n\013HumanReview\022\r\n\005state\030\001 \001(\t\022\025\n\rstate_m"
- + "essage\030\002 \001(\tB\010\n\006source\032\267\001\n\nTextChange\022I\n"
- + "\013text_anchor\030\001 \001(\01324.google.cloud.docume"
- + "ntai.v1beta3.Document.TextAnchor\022\024\n\014chan"
- + "ged_text\030\002 \001(\t\022H\n\nprovenance\030\003 \003(\01324.goo"
- + "gle.cloud.documentai.v1beta3.Document.Pr"
- + "ovenanceB\010\n\006sourceB\352\001\n#com.google.cloud."
- + "documentai.v1beta3B\rDocumentProtoP\001ZIgoo"
- + "gle.golang.org/genproto/googleapis/cloud"
- + "/documentai/v1beta3;documentai\252\002\037Google."
- + "Cloud.DocumentAI.V1Beta3\312\002\037Google\\Cloud\\"
- + "DocumentAI\\V1beta3\352\002\"Google::Cloud::Docu"
- + "mentAI::V1beta3b\006proto3"
+ + "ocument.TextAnchorB\003\340A\001\022\021\n\004type\030\002 \001(\tB\003\340"
+ + "A\002\022\031\n\014mention_text\030\003 \001(\tB\003\340A\001\022\027\n\nmention"
+ + "_id\030\004 \001(\tB\003\340A\001\022\027\n\nconfidence\030\005 \001(\002B\003\340A\001\022"
+ + "N\n\013page_anchor\030\006 \001(\01324.google.cloud.docu"
+ + "mentai.v1beta3.Document.PageAnchorB\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.v1beta3.Doc"
+ + "ument.Entity.NormalizedValueB\003\340A\001\022I\n\npro"
+ + "perties\030\n \003(\01320.google.cloud.documentai."
+ + "v1beta3.Document.EntityB\003\340A\001\022M\n\nprovenan"
+ + "ce\030\013 \001(\01324.google.cloud.documentai.v1bet"
+ + "a3.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.MoneyH\000\022\'\n\ndat"
+ + "e_value\030\003 \001(\0132\021.google.type.DateH\000\022/\n\016da"
+ + "tetime_value\030\004 \001(\0132\025.google.type.DateTim"
+ + "eH\000\0223\n\raddress_value\030\005 \001(\0132\032.google.type"
+ + ".PostalAddressH\000\022\027\n\rboolean_value\030\006 \001(\010H"
+ + "\000\022\021\n\004text\030\001 \001(\tB\003\340A\001B\022\n\020structured_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\n"
+ + "TextAnchor\022W\n\rtext_segments\030\001 \003(\0132@.goog"
+ + "le.cloud.documentai.v1beta3.Document.Tex"
+ + "tAnchor.TextSegment\022\017\n\007content\030\002 \001(\t\0325\n\013"
+ + "TextSegment\022\023\n\013start_index\030\001 \001(\003\022\021\n\tend_"
+ + "index\030\002 \001(\003\032\347\003\n\nPageAnchor\022O\n\tpage_refs\030"
+ + "\001 \003(\0132<.google.cloud.documentai.v1beta3."
+ + "Document.PageAnchor.PageRef\032\207\003\n\007PageRef\022"
+ + "\021\n\004page\030\001 \001(\003B\003\340A\002\022a\n\013layout_type\030\002 \001(\0162"
+ + "G.google.cloud.documentai.v1beta3.Docume"
+ + "nt.PageAnchor.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-.google.cloud.documentai.v1beta3"
+ + ".BoundingPolyB\003\340A\001\022\027\n\nconfidence\030\005 \001(\002B\003"
+ + "\340A\001\"\207\001\n\nLayoutType\022\033\n\027LAYOUT_TYPE_UNSPEC"
+ + "IFIED\020\000\022\t\n\005BLOCK\020\001\022\r\n\tPARAGRAPH\020\002\022\010\n\004LIN"
+ + "E\020\003\022\t\n\005TOKEN\020\004\022\022\n\016VISUAL_ELEMENT\020\005\022\t\n\005TA"
+ + "BLE\020\006\022\016\n\nFORM_FIELD\020\007\032\226\003\n\nProvenance\022\020\n\010"
+ + "revision\030\001 \001(\005\022\016\n\002id\030\002 \001(\005B\002\030\001\022L\n\007parent"
+ + "s\030\003 \003(\0132;.google.cloud.documentai.v1beta"
+ + "3.Document.Provenance.Parent\022P\n\004type\030\004 \001"
+ + "(\0162B.google.cloud.documentai.v1beta3.Doc"
+ + "ument.Provenance.OperationType\0329\n\006Parent"
+ + "\022\020\n\010revision\030\001 \001(\005\022\r\n\005index\030\003 \001(\005\022\016\n\002id\030"
+ + "\002 \001(\005B\002\030\001\"\212\001\n\rOperationType\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\016EVAL_REQUESTED\020\004\022\021\n\rEVA"
+ + "L_APPROVED\020\005\022\020\n\014EVAL_SKIPPED\020\006\032\222\002\n\010Revis"
+ + "ion\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\013create_"
+ + "time\030\003 \001(\0132\032.google.protobuf.Timestamp\022T"
+ + "\n\014human_review\030\006 \001(\0132>.google.cloud.docu"
+ + "mentai.v1beta3.Document.Revision.HumanRe"
+ + "view\0323\n\013HumanReview\022\r\n\005state\030\001 \001(\t\022\025\n\rst"
+ + "ate_message\030\002 \001(\tB\010\n\006source\032\267\001\n\nTextChan"
+ + "ge\022I\n\013text_anchor\030\001 \001(\01324.google.cloud.d"
+ + "ocumentai.v1beta3.Document.TextAnchor\022\024\n"
+ + "\014changed_text\030\002 \001(\t\022H\n\nprovenance\030\003 \003(\0132"
+ + "4.google.cloud.documentai.v1beta3.Docume"
+ + "nt.ProvenanceB\010\n\006sourceB\352\001\n#com.google.c"
+ + "loud.documentai.v1beta3B\rDocumentProtoP\001"
+ + "ZIgoogle.golang.org/genproto/googleapis/"
+ + "cloud/documentai/v1beta3;documentai\252\002\037Go"
+ + "ogle.Cloud.DocumentAI.V1Beta3\312\002\037Google\\C"
+ + "loud\\DocumentAI\\V1beta3\352\002\"Google::Cloud:"
+ + ":DocumentAI::V1beta3b\006proto3"
};
descriptor =
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/EnableProcessorMetadata.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/EnableProcessorMetadata.java
index 4667d030..0c0c9bf4 100644
--- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/EnableProcessorMetadata.java
+++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/EnableProcessorMetadata.java
@@ -96,6 +96,8 @@ private EnableProcessorMetadata(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/EnableProcessorRequest.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/EnableProcessorRequest.java
index dc2e36bc..5ee5e0de 100644
--- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/EnableProcessorRequest.java
+++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/EnableProcessorRequest.java
@@ -88,6 +88,8 @@ private EnableProcessorRequest(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/EnableProcessorResponse.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/EnableProcessorResponse.java
index 14c87c9d..7590cbcb 100644
--- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/EnableProcessorResponse.java
+++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/EnableProcessorResponse.java
@@ -79,6 +79,8 @@ private EnableProcessorResponse(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/FetchProcessorTypesRequest.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/FetchProcessorTypesRequest.java
index b177911e..08f86780 100644
--- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/FetchProcessorTypesRequest.java
+++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/FetchProcessorTypesRequest.java
@@ -88,6 +88,8 @@ private FetchProcessorTypesRequest(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/FetchProcessorTypesResponse.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/FetchProcessorTypesResponse.java
index dcf5d97e..ec88b27a 100644
--- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/FetchProcessorTypesResponse.java
+++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/FetchProcessorTypesResponse.java
@@ -95,6 +95,8 @@ private FetchProcessorTypesResponse(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/GcsDocument.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/GcsDocument.java
index 020602ba..30d00c34 100644
--- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/GcsDocument.java
+++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/GcsDocument.java
@@ -96,6 +96,8 @@ private GcsDocument(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/GcsDocuments.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/GcsDocuments.java
index 99bbef9a..f3284281 100644
--- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/GcsDocuments.java
+++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/GcsDocuments.java
@@ -94,6 +94,8 @@ private GcsDocuments(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/GcsPrefix.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/GcsPrefix.java
index 5044f146..ec0b653e 100644
--- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/GcsPrefix.java
+++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/GcsPrefix.java
@@ -88,6 +88,8 @@ private GcsPrefix(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
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 4a48c700..a9448ff1 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 2021 Google LLC
+ * Copyright 2022 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/HumanReviewStatus.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/HumanReviewStatus.java
index b34b4c43..569a237e 100644
--- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/HumanReviewStatus.java
+++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/HumanReviewStatus.java
@@ -104,6 +104,8 @@ private HumanReviewStatus(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ListProcessorsRequest.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ListProcessorsRequest.java
index 9871dda0..22c065c1 100644
--- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ListProcessorsRequest.java
+++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ListProcessorsRequest.java
@@ -101,6 +101,8 @@ private ListProcessorsRequest(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ListProcessorsResponse.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ListProcessorsResponse.java
index 29e62a48..d16f2280 100644
--- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ListProcessorsResponse.java
+++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ListProcessorsResponse.java
@@ -102,6 +102,8 @@ private ListProcessorsResponse(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/LocationName.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/LocationName.java
index 0a1352d2..8d2df8eb 100644
--- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/LocationName.java
+++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/LocationName.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021 Google LLC
+ * Copyright 2022 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/NormalizedVertex.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/NormalizedVertex.java
index b5ce336f..e815dea2 100644
--- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/NormalizedVertex.java
+++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/NormalizedVertex.java
@@ -91,6 +91,8 @@ private NormalizedVertex(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -164,10 +166,10 @@ public final boolean isInitialized() {
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
- if (x_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(x_) != 0) {
output.writeFloat(1, x_);
}
- if (y_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(y_) != 0) {
output.writeFloat(2, y_);
}
unknownFields.writeTo(output);
@@ -179,10 +181,10 @@ public int getSerializedSize() {
if (size != -1) return size;
size = 0;
- if (x_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(x_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, x_);
}
- if (y_ != 0F) {
+ if (java.lang.Float.floatToRawIntBits(y_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, y_);
}
size += unknownFields.getSerializedSize();
diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessRequest.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessRequest.java
index 248c0b69..ebda56a9 100644
--- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessRequest.java
+++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessRequest.java
@@ -142,6 +142,8 @@ private ProcessRequest(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -378,6 +380,8 @@ public com.google.protobuf.ByteString getNameBytes() {
*
* .google.cloud.documentai.v1beta3.Document document = 2 [deprecated = true];
*
+ * @deprecated google.cloud.documentai.v1beta3.ProcessRequest.document is deprecated. See
+ * google/cloud/documentai/v1beta3/document_processor_service.proto;l=182
* @return Whether the document field is set.
*/
@java.lang.Override
@@ -394,6 +398,8 @@ public boolean hasDocument() {
*
* .google.cloud.documentai.v1beta3.Document document = 2 [deprecated = true];
*
+ * @deprecated google.cloud.documentai.v1beta3.ProcessRequest.document is deprecated. See
+ * google/cloud/documentai/v1beta3/document_processor_service.proto;l=182
* @return The document.
*/
@java.lang.Override
@@ -996,8 +1002,9 @@ public Builder mergeInlineDocument(com.google.cloud.documentai.v1beta3.Document
} else {
if (sourceCase_ == 4) {
inlineDocumentBuilder_.mergeFrom(value);
+ } else {
+ inlineDocumentBuilder_.setMessage(value);
}
- inlineDocumentBuilder_.setMessage(value);
}
sourceCase_ = 4;
return this;
@@ -1205,8 +1212,9 @@ public Builder mergeRawDocument(com.google.cloud.documentai.v1beta3.RawDocument
} else {
if (sourceCase_ == 5) {
rawDocumentBuilder_.mergeFrom(value);
+ } else {
+ rawDocumentBuilder_.setMessage(value);
}
- rawDocumentBuilder_.setMessage(value);
}
sourceCase_ = 5;
return this;
@@ -1433,6 +1441,8 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) {
*
* .google.cloud.documentai.v1beta3.Document document = 2 [deprecated = true];
*
+ * @deprecated google.cloud.documentai.v1beta3.ProcessRequest.document is deprecated. See
+ * google/cloud/documentai/v1beta3/document_processor_service.proto;l=182
* @return Whether the document field is set.
*/
@java.lang.Deprecated
@@ -1448,6 +1458,8 @@ public boolean hasDocument() {
*
* .google.cloud.documentai.v1beta3.Document document = 2 [deprecated = true];
*
+ * @deprecated google.cloud.documentai.v1beta3.ProcessRequest.document is deprecated. See
+ * google/cloud/documentai/v1beta3/document_processor_service.proto;l=182
* @return The document.
*/
@java.lang.Deprecated
diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessRequestOrBuilder.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessRequestOrBuilder.java
index 774fda76..9aca4f27 100644
--- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessRequestOrBuilder.java
+++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessRequestOrBuilder.java
@@ -131,6 +131,8 @@ public interface ProcessRequestOrBuilder
*
* .google.cloud.documentai.v1beta3.Document document = 2 [deprecated = true];
*
+ * @deprecated google.cloud.documentai.v1beta3.ProcessRequest.document is deprecated. See
+ * google/cloud/documentai/v1beta3/document_processor_service.proto;l=182
* @return Whether the document field is set.
*/
@java.lang.Deprecated
@@ -144,6 +146,8 @@ public interface ProcessRequestOrBuilder
*
* .google.cloud.documentai.v1beta3.Document document = 2 [deprecated = true];
*
+ * @deprecated google.cloud.documentai.v1beta3.ProcessRequest.document is deprecated. See
+ * google/cloud/documentai/v1beta3/document_processor_service.proto;l=182
* @return The document.
*/
@java.lang.Deprecated
diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessResponse.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessResponse.java
index 96b5fb9c..1241b278 100644
--- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessResponse.java
+++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessResponse.java
@@ -121,6 +121,8 @@ private ProcessResponse(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -209,6 +211,8 @@ public com.google.cloud.documentai.v1beta3.DocumentOrBuilder getDocumentOrBuilde
*
* string human_review_operation = 2 [deprecated = true];
*
+ * @deprecated google.cloud.documentai.v1beta3.ProcessResponse.human_review_operation is
+ * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=235
* @return The humanReviewOperation.
*/
@java.lang.Override
@@ -236,6 +240,8 @@ public java.lang.String getHumanReviewOperation() {
*
* string human_review_operation = 2 [deprecated = true];
*
+ * @deprecated google.cloud.documentai.v1beta3.ProcessResponse.human_review_operation is
+ * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=235
* @return The bytes for humanReviewOperation.
*/
@java.lang.Override
@@ -883,6 +889,8 @@ public com.google.cloud.documentai.v1beta3.DocumentOrBuilder getDocumentOrBuilde
*
* string human_review_operation = 2 [deprecated = true];
*
+ * @deprecated google.cloud.documentai.v1beta3.ProcessResponse.human_review_operation is
+ * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=235
* @return The humanReviewOperation.
*/
@java.lang.Deprecated
@@ -909,6 +917,8 @@ public java.lang.String getHumanReviewOperation() {
*
* string human_review_operation = 2 [deprecated = true];
*
+ * @deprecated google.cloud.documentai.v1beta3.ProcessResponse.human_review_operation is
+ * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=235
* @return The bytes for humanReviewOperation.
*/
@java.lang.Deprecated
@@ -935,6 +945,8 @@ public com.google.protobuf.ByteString getHumanReviewOperationBytes() {
*
* string human_review_operation = 2 [deprecated = true];
*
+ * @deprecated google.cloud.documentai.v1beta3.ProcessResponse.human_review_operation is
+ * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=235
* @param value The humanReviewOperation to set.
* @return This builder for chaining.
*/
@@ -960,6 +972,8 @@ public Builder setHumanReviewOperation(java.lang.String value) {
*
* string human_review_operation = 2 [deprecated = true];
*
+ * @deprecated google.cloud.documentai.v1beta3.ProcessResponse.human_review_operation is
+ * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=235
* @return This builder for chaining.
*/
@java.lang.Deprecated
@@ -981,6 +995,8 @@ public Builder clearHumanReviewOperation() {
*
* string human_review_operation = 2 [deprecated = true];
*
+ * @deprecated google.cloud.documentai.v1beta3.ProcessResponse.human_review_operation is
+ * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=235
* @param value The bytes for humanReviewOperation to set.
* @return This builder for chaining.
*/
diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessResponseOrBuilder.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessResponseOrBuilder.java
index aa0e3481..bfc8b57a 100644
--- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessResponseOrBuilder.java
+++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessResponseOrBuilder.java
@@ -73,6 +73,8 @@ public interface ProcessResponseOrBuilder
*
* string human_review_operation = 2 [deprecated = true];
*
+ * @deprecated google.cloud.documentai.v1beta3.ProcessResponse.human_review_operation is
+ * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=235
* @return The humanReviewOperation.
*/
@java.lang.Deprecated
@@ -89,6 +91,8 @@ public interface ProcessResponseOrBuilder
*
* string human_review_operation = 2 [deprecated = true];
*
+ * @deprecated google.cloud.documentai.v1beta3.ProcessResponse.human_review_operation is
+ * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=235
* @return The bytes for humanReviewOperation.
*/
@java.lang.Deprecated
diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/Processor.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/Processor.java
index 07f23b06..3a5ff02d 100644
--- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/Processor.java
+++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/Processor.java
@@ -152,6 +152,8 @@ private Processor(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
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 33ee7318..347d562b 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 2021 Google LLC
+ * Copyright 2022 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/ProcessorType.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorType.java
index cb77c371..f314d43e 100644
--- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorType.java
+++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorType.java
@@ -126,6 +126,8 @@ private ProcessorType(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -252,6 +254,8 @@ private LocationInfo(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorTypeName.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorTypeName.java
index dcfa71fa..a43d112c 100644
--- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorTypeName.java
+++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorTypeName.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021 Google LLC
+ * Copyright 2022 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/RawDocument.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/RawDocument.java
index 2ac0bd16..a78dbf9c 100644
--- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/RawDocument.java
+++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/RawDocument.java
@@ -94,6 +94,8 @@ private RawDocument(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ReviewDocumentOperationMetadata.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ReviewDocumentOperationMetadata.java
index 23de0000..82abf7cc 100644
--- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ReviewDocumentOperationMetadata.java
+++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ReviewDocumentOperationMetadata.java
@@ -152,6 +152,8 @@ private ReviewDocumentOperationMetadata(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ReviewDocumentRequest.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ReviewDocumentRequest.java
index 87fb406a..9b84741b 100644
--- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ReviewDocumentRequest.java
+++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ReviewDocumentRequest.java
@@ -134,6 +134,8 @@ private ReviewDocumentRequest(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
@@ -457,6 +459,8 @@ public com.google.protobuf.ByteString getHumanReviewConfigBytes() {
*
* .google.cloud.documentai.v1beta3.Document document = 2 [deprecated = true];
*
+ * @deprecated google.cloud.documentai.v1beta3.ReviewDocumentRequest.document is deprecated. See
+ * google/cloud/documentai/v1beta3/document_processor_service.proto;l=518
* @return Whether the document field is set.
*/
@java.lang.Override
@@ -473,6 +477,8 @@ public boolean hasDocument() {
*
* .google.cloud.documentai.v1beta3.Document document = 2 [deprecated = true];
*
+ * @deprecated google.cloud.documentai.v1beta3.ReviewDocumentRequest.document is deprecated. See
+ * google/cloud/documentai/v1beta3/document_processor_service.proto;l=518
* @return The document.
*/
@java.lang.Override
@@ -1104,8 +1110,9 @@ public Builder mergeInlineDocument(com.google.cloud.documentai.v1beta3.Document
} else {
if (sourceCase_ == 4) {
inlineDocumentBuilder_.mergeFrom(value);
+ } else {
+ inlineDocumentBuilder_.setMessage(value);
}
- inlineDocumentBuilder_.setMessage(value);
}
sourceCase_ = 4;
return this;
@@ -1337,6 +1344,8 @@ public Builder setHumanReviewConfigBytes(com.google.protobuf.ByteString value) {
*
* .google.cloud.documentai.v1beta3.Document document = 2 [deprecated = true];
*
+ * @deprecated google.cloud.documentai.v1beta3.ReviewDocumentRequest.document is deprecated. See
+ * google/cloud/documentai/v1beta3/document_processor_service.proto;l=518
* @return Whether the document field is set.
*/
@java.lang.Deprecated
@@ -1352,6 +1361,8 @@ public boolean hasDocument() {
*
* .google.cloud.documentai.v1beta3.Document document = 2 [deprecated = true];
*
+ * @deprecated google.cloud.documentai.v1beta3.ReviewDocumentRequest.document is deprecated. See
+ * google/cloud/documentai/v1beta3/document_processor_service.proto;l=518
* @return The document.
*/
@java.lang.Deprecated
diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ReviewDocumentRequestOrBuilder.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ReviewDocumentRequestOrBuilder.java
index 533595e7..47a291c8 100644
--- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ReviewDocumentRequestOrBuilder.java
+++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ReviewDocumentRequestOrBuilder.java
@@ -98,6 +98,8 @@ public interface ReviewDocumentRequestOrBuilder
*
* .google.cloud.documentai.v1beta3.Document document = 2 [deprecated = true];
*
+ * @deprecated google.cloud.documentai.v1beta3.ReviewDocumentRequest.document is deprecated. See
+ * google/cloud/documentai/v1beta3/document_processor_service.proto;l=518
* @return Whether the document field is set.
*/
@java.lang.Deprecated
@@ -111,6 +113,8 @@ public interface ReviewDocumentRequestOrBuilder
*
* .google.cloud.documentai.v1beta3.Document document = 2 [deprecated = true];
*
+ * @deprecated google.cloud.documentai.v1beta3.ReviewDocumentRequest.document is deprecated. See
+ * google/cloud/documentai/v1beta3/document_processor_service.proto;l=518
* @return The document.
*/
@java.lang.Deprecated
diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ReviewDocumentResponse.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ReviewDocumentResponse.java
index d5853183..ee8c2f75 100644
--- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ReviewDocumentResponse.java
+++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ReviewDocumentResponse.java
@@ -88,6 +88,8 @@ private ReviewDocumentResponse(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/Vertex.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/Vertex.java
index 6d1749e5..a20b0c32 100644
--- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/Vertex.java
+++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/Vertex.java
@@ -90,6 +90,8 @@ private Vertex(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
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 760cd511..f9bec08b 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
@@ -480,8 +480,8 @@ message Document {
// [Document.text][google.cloud.documentai.v1beta3.Document.text].
TextAnchor text_anchor = 1 [(google.api.field_behavior) = OPTIONAL];
- // Entity type from a schema e.g. `Address`.
- string type = 2;
+ // Required. Entity type from a schema e.g. `Address`.
+ string type = 2 [(google.api.field_behavior) = REQUIRED];
// Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`. If
// the entity is not present in the document, this field will be empty.
diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml
index 165976b5..283c2e33 100644
--- a/samples/install-without-bom/pom.xml
+++ b/samples/install-without-bom/pom.xml
@@ -29,7 +29,7 @@
com.google.cloud
google-cloud-document-ai
- 2.4.2
+ 2.4.3
diff --git a/samples/pom.xml b/samples/pom.xml
index dd6d9b43..e3772eee 100644
--- a/samples/pom.xml
+++ b/samples/pom.xml
@@ -46,7 +46,7 @@
org.sonatype.plugins
nexus-staging-maven-plugin
- 1.6.11
+ 1.6.13
true
diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml
index 70f5ef89..98bdc218 100644
--- a/samples/snapshot/pom.xml
+++ b/samples/snapshot/pom.xml
@@ -28,7 +28,7 @@
com.google.cloud
google-cloud-document-ai
- 2.4.2
+ 2.4.3
diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml
index 40bb8110..59d2280c 100644
--- a/samples/snippets/pom.xml
+++ b/samples/snippets/pom.xml
@@ -30,7 +30,7 @@
com.google.cloud
libraries-bom
- 25.1.0
+ 25.3.0
pom
import
@@ -41,7 +41,7 @@
com.google.cloud
google-cloud-document-ai
- 2.4.2
+ 2.4.3
diff --git a/samples/snippets/src/main/java/documentai/v1beta2/BatchParseFormBeta.java b/samples/snippets/src/main/java/documentai/v1beta2/BatchParseFormBeta.java
deleted file mode 100644
index fe1efb75..00000000
--- a/samples/snippets/src/main/java/documentai/v1beta2/BatchParseFormBeta.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/*
- * Copyright 2020 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package documentai.v1beta2;
-
-// [START documentai_batch_parse_form_beta]
-
-import com.google.api.gax.longrunning.OperationFuture;
-import com.google.api.gax.paging.Page;
-import com.google.cloud.documentai.v1beta2.BatchProcessDocumentsRequest;
-import com.google.cloud.documentai.v1beta2.BatchProcessDocumentsResponse;
-import com.google.cloud.documentai.v1beta2.Document;
-import com.google.cloud.documentai.v1beta2.DocumentUnderstandingServiceClient;
-import com.google.cloud.documentai.v1beta2.FormExtractionParams;
-import com.google.cloud.documentai.v1beta2.GcsDestination;
-import com.google.cloud.documentai.v1beta2.GcsSource;
-import com.google.cloud.documentai.v1beta2.InputConfig;
-import com.google.cloud.documentai.v1beta2.KeyValuePairHint;
-import com.google.cloud.documentai.v1beta2.OperationMetadata;
-import com.google.cloud.documentai.v1beta2.OutputConfig;
-import com.google.cloud.documentai.v1beta2.ProcessDocumentRequest;
-import com.google.cloud.storage.Blob;
-import com.google.cloud.storage.BlobId;
-import com.google.cloud.storage.Bucket;
-import com.google.cloud.storage.Storage;
-import com.google.cloud.storage.StorageOptions;
-import com.google.protobuf.util.JsonFormat;
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
-
-public class BatchParseFormBeta {
-
- public static void batchParseFormGcs()
- throws IOException, InterruptedException, ExecutionException, TimeoutException {
- // TODO(developer): Replace these variables before running the sample.
- String projectId = "your-project-id";
- String location = "your-project-location"; // Format is "us" or "eu".
- String outputGcsBucketName = "your-gcs-bucket-name";
- String outputGcsPrefix = "PREFIX";
- String inputGcsUri = "gs://your-gcs-bucket/path/to/input/file.json";
- batchParseFormGcs(projectId, location, outputGcsBucketName, outputGcsPrefix, inputGcsUri);
- }
-
- public static void batchParseFormGcs(
- String projectId,
- String location,
- String outputGcsBucketName,
- String outputGcsPrefix,
- String inputGcsUri)
- throws IOException, InterruptedException, ExecutionException, TimeoutException {
- // Initialize client that will be used to send requests. This client only needs to be created
- // once, and can be reused for multiple requests. After completing all of your requests, call
- // the "close" method on the client to safely clean up any remaining background resources.
- try (DocumentUnderstandingServiceClient client = DocumentUnderstandingServiceClient.create()) {
-
- // Configure the request for processing the PDF
- String parent = String.format("projects/%s/locations/%s", projectId, location);
-
- // Improve form parsing results by providing key-value pair hints.
- // For each key hint, key is text that is likely to appear in the
- // document as a form field name (i.e. "DOB").
- // Value types are optional, but can be one or more of:
- // ADDRESS, LOCATION, ORGANIZATION, PERSON, PHONE_NUMBER, ID,
- // NUMBER, EMAIL, PRICE, TERMS, DATE, NAME
- KeyValuePairHint keyValuePairHint =
- KeyValuePairHint.newBuilder().setKey("Phone").addValueTypes("PHONE_NUMBER").build();
-
- KeyValuePairHint keyValuePairHint2 =
- KeyValuePairHint.newBuilder()
- .setKey("Contact")
- .addValueTypes("EMAIL")
- .addValueTypes("NAME")
- .build();
-
- // Setting enabled=True enables form extraction
- FormExtractionParams params =
- FormExtractionParams.newBuilder()
- .setEnabled(true)
- .addKeyValuePairHints(keyValuePairHint)
- .addKeyValuePairHints(keyValuePairHint2)
- .build();
-
- GcsSource inputUri = GcsSource.newBuilder().setUri(inputGcsUri).build();
-
- // mime_type can be application/pdf, image/tiff,
- // and image/gif, or application/json
- InputConfig config =
- InputConfig.newBuilder().setGcsSource(inputUri).setMimeType("application/pdf").build();
-
- GcsDestination gcsDestination =
- GcsDestination.newBuilder()
- .setUri(String.format("gs://%s/%s", outputGcsBucketName, outputGcsPrefix))
- .build();
-
- OutputConfig outputConfig =
- OutputConfig.newBuilder().setGcsDestination(gcsDestination).setPagesPerShard(1).build();
-
- ProcessDocumentRequest request =
- ProcessDocumentRequest.newBuilder()
- .setFormExtractionParams(params)
- .setInputConfig(config)
- .setOutputConfig(outputConfig)
- .build();
-
- BatchProcessDocumentsRequest requests =
- BatchProcessDocumentsRequest.newBuilder().addRequests(request).setParent(parent).build();
-
- // Batch process document using a long-running operation.
- OperationFuture future =
- client.batchProcessDocumentsAsync(requests);
-
- // Wait for operation to complete.
- System.out.println("Waiting for operation to complete...");
- future.get(360, TimeUnit.SECONDS);
-
- System.out.println("Document processing complete.");
-
- Storage storage = StorageOptions.newBuilder().setProjectId(projectId).build().getService();
- Bucket bucket = storage.get(outputGcsBucketName);
-
- // List all of the files in the Storage bucket.
- Page blobs =
- bucket.list(
- Storage.BlobListOption.currentDirectory(),
- Storage.BlobListOption.prefix(outputGcsPrefix));
-
- int idx = 0;
- for (Blob blob : blobs.iterateAll()) {
- if (!blob.isDirectory()) {
- System.out.printf("Fetched file #%d\n", ++idx);
- // Read the results
-
- // Download and store json data in a temp file.
- File tempFile = File.createTempFile("file", ".json");
- Blob fileInfo = storage.get(BlobId.of(outputGcsBucketName, blob.getName()));
- fileInfo.downloadTo(tempFile.toPath());
-
- // Parse json file into Document.
- FileReader reader = new FileReader(tempFile);
- Document.Builder builder = Document.newBuilder();
- JsonFormat.parser().merge(reader, builder);
-
- Document document = builder.build();
-
- // Get all of the document text as one big string.
- String text = document.getText();
-
- // Process the output.
- if (document.getPagesCount() > 0) {
- Document.Page page1 = document.getPages(0);
- for (Document.Page.FormField field : page1.getFormFieldsList()) {
- String fieldName = getText(field.getFieldName(), text);
- String fieldValue = getText(field.getFieldValue(), text);
-
- System.out.println("Extracted form fields pair:");
- System.out.printf("\t(%s, %s))", fieldName, fieldValue);
- }
- }
-
- // Clean up temp file.
- tempFile.deleteOnExit();
- }
- }
- }
- }
-
- private static String getText(Document.Page.Layout layout, String text) {
- Document.TextAnchor textAnchor = layout.getTextAnchor();
- if (textAnchor.getTextSegmentsList().size() > 0) {
- int startIdx = (int) textAnchor.getTextSegments(0).getStartIndex();
- int endIdx = (int) textAnchor.getTextSegments(0).getEndIndex();
- return text.substring(startIdx, endIdx);
- }
- return "[NO TEXT]";
- }
-}
-// [END documentai_batch_parse_form_beta]
diff --git a/samples/snippets/src/main/java/documentai/v1beta2/BatchParseTableBeta.java b/samples/snippets/src/main/java/documentai/v1beta2/BatchParseTableBeta.java
deleted file mode 100644
index bef60315..00000000
--- a/samples/snippets/src/main/java/documentai/v1beta2/BatchParseTableBeta.java
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
- * Copyright 2020 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package documentai.v1beta2;
-
-// [START documentai_batch_parse_table_beta]
-
-import com.google.api.gax.longrunning.OperationFuture;
-import com.google.api.gax.paging.Page;
-import com.google.cloud.documentai.v1beta2.BatchProcessDocumentsRequest;
-import com.google.cloud.documentai.v1beta2.BatchProcessDocumentsResponse;
-import com.google.cloud.documentai.v1beta2.BoundingPoly;
-import com.google.cloud.documentai.v1beta2.Document;
-import com.google.cloud.documentai.v1beta2.DocumentUnderstandingServiceClient;
-import com.google.cloud.documentai.v1beta2.GcsDestination;
-import com.google.cloud.documentai.v1beta2.GcsSource;
-import com.google.cloud.documentai.v1beta2.InputConfig;
-import com.google.cloud.documentai.v1beta2.NormalizedVertex;
-import com.google.cloud.documentai.v1beta2.OperationMetadata;
-import com.google.cloud.documentai.v1beta2.OutputConfig;
-import com.google.cloud.documentai.v1beta2.ProcessDocumentRequest;
-import com.google.cloud.documentai.v1beta2.TableBoundHint;
-import com.google.cloud.documentai.v1beta2.TableExtractionParams;
-import com.google.cloud.storage.Blob;
-import com.google.cloud.storage.BlobId;
-import com.google.cloud.storage.Bucket;
-import com.google.cloud.storage.Storage;
-import com.google.cloud.storage.StorageOptions;
-import com.google.protobuf.util.JsonFormat;
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import java.util.List;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
-
-public class BatchParseTableBeta {
-
- public static void batchParseTableGcs()
- throws IOException, InterruptedException, ExecutionException, TimeoutException {
- // TODO(developer): Replace these variables before running the sample.
- String projectId = "your-project-id";
- String location = "your-project-location"; // Format is "us" or "eu".
- String outputGcsBucketName = "your-gcs-bucket-name";
- String outputGcsPrefix = "PREFIX";
- String inputGcsUri = "gs://your-gcs-bucket/path/to/input/file.json";
- batchParseTableGcs(projectId, location, outputGcsBucketName, outputGcsPrefix, inputGcsUri);
- }
-
- public static void batchParseTableGcs(
- String projectId,
- String location,
- String outputGcsBucketName,
- String outputGcsPrefix,
- String inputGcsUri)
- throws IOException, InterruptedException, ExecutionException, TimeoutException {
- // Initialize client that will be used to send requests. This client only needs to be created
- // once, and can be reused for multiple requests. After completing all of your requests, call
- // the "close" method on the client to safely clean up any remaining background resources.
- try (DocumentUnderstandingServiceClient client = DocumentUnderstandingServiceClient.create()) {
-
- // Configure the request for processing the PDF
- String parent = String.format("projects/%s/locations/%s", projectId, location);
-
- TableBoundHint tableBoundHints =
- TableBoundHint.newBuilder()
- .setBoundingBox(
- // Define a polygon around tables to detect
- // Each vertice coordinate must be a number between 0 and 1
- BoundingPoly.newBuilder()
- // top left
- .addNormalizedVertices(NormalizedVertex.newBuilder().setX(0).setX(0).build())
- // top right
- .addNormalizedVertices(NormalizedVertex.newBuilder().setX(1).setX(0).build())
- // bottom right
- .addNormalizedVertices(NormalizedVertex.newBuilder().setX(1).setX(1).build())
- // bottom left
- .addNormalizedVertices(NormalizedVertex.newBuilder().setX(0).setX(1).build())
- .build())
- .setPageNumber(1)
- .build();
-
- TableExtractionParams params =
- TableExtractionParams.newBuilder()
- .setEnabled(true)
- .addTableBoundHints(tableBoundHints)
- .build();
-
- GcsSource inputUri = GcsSource.newBuilder().setUri(inputGcsUri).build();
-
- // mime_type can be application/pdf, image/tiff,
- // and image/gif, or application/json
- InputConfig config =
- InputConfig.newBuilder().setGcsSource(inputUri).setMimeType("application/pdf").build();
-
- GcsDestination gcsDestination =
- GcsDestination.newBuilder()
- .setUri(String.format("gs://%s/%s", outputGcsBucketName, outputGcsPrefix))
- .build();
-
- OutputConfig outputConfig =
- OutputConfig.newBuilder().setGcsDestination(gcsDestination).setPagesPerShard(1).build();
-
- ProcessDocumentRequest request =
- ProcessDocumentRequest.newBuilder()
- .setTableExtractionParams(params)
- .setInputConfig(config)
- .setOutputConfig(outputConfig)
- .build();
-
- BatchProcessDocumentsRequest requests =
- BatchProcessDocumentsRequest.newBuilder().addRequests(request).setParent(parent).build();
-
- // Batch process document using a long-running operation.
- OperationFuture future =
- client.batchProcessDocumentsAsync(requests);
-
- // Wait for operation to complete.
- System.out.println("Waiting for operation to complete...");
- future.get(360, TimeUnit.SECONDS);
-
- System.out.println("Document processing complete.");
-
- Storage storage = StorageOptions.newBuilder().setProjectId(projectId).build().getService();
- Bucket bucket = storage.get(outputGcsBucketName);
-
- // List all of the files in the Storage bucket.
- Page blobs =
- bucket.list(
- Storage.BlobListOption.currentDirectory(),
- Storage.BlobListOption.prefix(outputGcsPrefix));
-
- int idx = 0;
- for (Blob blob : blobs.iterateAll()) {
- if (!blob.isDirectory()) {
- System.out.printf("Fetched file #%d\n", ++idx);
- // Read the results
-
- // Download and store json data in a temp file.
- File tempFile = File.createTempFile("file", ".json");
- Blob fileInfo = storage.get(BlobId.of(outputGcsBucketName, blob.getName()));
- fileInfo.downloadTo(tempFile.toPath());
-
- // Parse json file into Document.
- FileReader reader = new FileReader(tempFile);
- Document.Builder builder = Document.newBuilder();
- JsonFormat.parser().merge(reader, builder);
- Document document = builder.build();
-
- // Get all of the document text as one big string.
- String text = document.getText();
-
- // Process the output.
- if (document.getPagesCount() > 0) {
- Document.Page page1 = document.getPages(0);
- if (page1.getTablesCount() > 0) {
- Document.Page.Table table = page1.getTables(0);
-
- System.out.println("Results from first table processed:");
- System.out.println("Header row:");
-
- if (table.getHeaderRowsCount() > 0) {
- Document.Page.Table.TableRow headerRow = table.getHeaderRows(0);
-
- for (Document.Page.Table.TableCell tableCell : headerRow.getCellsList()) {
- if (!tableCell.getLayout().getTextAnchor().getTextSegmentsList().isEmpty()) {
- // Extract shards from the text field
- // First shard in document doesn't have startIndex property
- List textSegments =
- tableCell.getLayout().getTextAnchor().getTextSegmentsList();
- int startIdx =
- textSegments.size() > 0 ? (int) textSegments.get(0).getStartIndex() : 0;
- int endIdx = (int) textSegments.get(0).getEndIndex();
- System.out.printf("\t%s", text.substring(startIdx, endIdx));
- }
- }
- }
- }
- }
-
- // Clean up temp file.
- tempFile.deleteOnExit();
- }
- }
- }
- }
-}
-// [END documentai_batch_parse_table_beta]
diff --git a/samples/snippets/src/main/java/documentai/v1beta2/ParseFormBeta.java b/samples/snippets/src/main/java/documentai/v1beta2/ParseFormBeta.java
deleted file mode 100644
index a211a920..00000000
--- a/samples/snippets/src/main/java/documentai/v1beta2/ParseFormBeta.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright 2020 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package documentai.v1beta2;
-
-// [START documentai_parse_form_beta]
-
-import com.google.cloud.documentai.v1beta2.Document;
-import com.google.cloud.documentai.v1beta2.DocumentUnderstandingServiceClient;
-import com.google.cloud.documentai.v1beta2.FormExtractionParams;
-import com.google.cloud.documentai.v1beta2.GcsSource;
-import com.google.cloud.documentai.v1beta2.InputConfig;
-import com.google.cloud.documentai.v1beta2.KeyValuePairHint;
-import com.google.cloud.documentai.v1beta2.ProcessDocumentRequest;
-import java.io.IOException;
-import java.util.concurrent.ExecutionException;
-
-public class ParseFormBeta {
- public static void parseForm() throws IOException, ExecutionException, InterruptedException {
- // TODO(developer): Replace these variables before running the sample.
- String projectId = "your-project-id";
- String location = "your-project-location"; // Format is "us" or "eu".
- String inputGcsUri = "gs://your-gcs-bucket/path/to/input/file.json";
- parseForm(projectId, location, inputGcsUri);
- }
-
- public static void parseForm(String projectId, String location, String inputGcsUri)
- throws IOException, ExecutionException, InterruptedException {
- // Initialize client that will be used to send requests. This client only needs to be created
- // once, and can be reused for multiple requests. After completing all of your requests, call
- // the "close" method on the client to safely clean up any remaining background resources.
- try (DocumentUnderstandingServiceClient client = DocumentUnderstandingServiceClient.create()) {
- // Configure the request for processing the PDF
- String parent = String.format("projects/%s/locations/%s", projectId, location);
-
- // Improve form parsing results by providing key-value pair hints.
- // For each key hint, key is text that is likely to appear in the
- // document as a form field name (i.e. "DOB").
- // Value types are optional, but can be one or more of:
- // ADDRESS, LOCATION, ORGANIZATION, PERSON, PHONE_NUMBER, ID,
- // NUMBER, EMAIL, PRICE, TERMS, DATE, NAME
- KeyValuePairHint keyValuePairHint =
- KeyValuePairHint.newBuilder().setKey("Phone").addValueTypes("PHONE_NUMBER").build();
- KeyValuePairHint keyValuePairHint2 =
- KeyValuePairHint.newBuilder()
- .setKey("Contact")
- .addValueTypes("EMAIL")
- .addValueTypes("NAME")
- .build();
-
- // Setting enabled=True enables form extraction
- FormExtractionParams params =
- FormExtractionParams.newBuilder()
- .setEnabled(true)
- .addKeyValuePairHints(keyValuePairHint)
- .addKeyValuePairHints(keyValuePairHint2)
- .build();
-
- GcsSource uri = GcsSource.newBuilder().setUri(inputGcsUri).build();
-
- // mime_type can be application/pdf, image/tiff,
- // and image/gif, or application/json
- InputConfig config =
- InputConfig.newBuilder().setGcsSource(uri).setMimeType("application/pdf").build();
-
- ProcessDocumentRequest request =
- ProcessDocumentRequest.newBuilder()
- .setParent(parent)
- .setFormExtractionParams(params)
- .setInputConfig(config)
- .build();
-
- // Recognizes text entities in the PDF document
- Document response = client.processDocument(request);
-
- // Get all of the document text as one big string
- String text = response.getText();
-
- // Process the output
- if (response.getPagesCount() > 0) {
- Document.Page page1 = response.getPages(0);
- for (Document.Page.FormField field : page1.getFormFieldsList()) {
- String fieldName = getText(field.getFieldName(), text);
- String fieldValue = getText(field.getFieldValue(), text);
-
- System.out.println("Extracted form fields pair:");
- System.out.printf("\t(%s, %s))", fieldName, fieldValue);
- }
- }
- }
- }
-
- private static String getText(Document.Page.Layout layout, String text) {
- Document.TextAnchor textAnchor = layout.getTextAnchor();
- if (textAnchor.getTextSegmentsList().size() > 0) {
- int startIdx = (int) textAnchor.getTextSegments(0).getStartIndex();
- int endIdx = (int) textAnchor.getTextSegments(0).getEndIndex();
- return text.substring(startIdx, endIdx);
- }
- return "[NO TEXT]";
- }
-}
-// [END documentai_parse_form_beta]
diff --git a/samples/snippets/src/main/java/documentai/v1beta2/ParseTableBeta.java b/samples/snippets/src/main/java/documentai/v1beta2/ParseTableBeta.java
deleted file mode 100644
index b3bdeffd..00000000
--- a/samples/snippets/src/main/java/documentai/v1beta2/ParseTableBeta.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Copyright 2020 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package documentai.v1beta2;
-
-// [START documentai_parse_table_beta]
-
-import com.google.cloud.documentai.v1beta2.BoundingPoly;
-import com.google.cloud.documentai.v1beta2.Document;
-import com.google.cloud.documentai.v1beta2.DocumentUnderstandingServiceClient;
-import com.google.cloud.documentai.v1beta2.GcsSource;
-import com.google.cloud.documentai.v1beta2.InputConfig;
-import com.google.cloud.documentai.v1beta2.NormalizedVertex;
-import com.google.cloud.documentai.v1beta2.ProcessDocumentRequest;
-import com.google.cloud.documentai.v1beta2.TableBoundHint;
-import com.google.cloud.documentai.v1beta2.TableExtractionParams;
-import java.io.IOException;
-import java.util.List;
-
-public class ParseTableBeta {
-
- public static void parseTable() throws IOException {
- // TODO(developer): Replace these variables before running the sample.
- String projectId = "your-project-id";
- String location = "your-project-location"; // Format is "us" or "eu".
- String inputGcsUri = "gs://your-gcs-bucket/path/to/input/file.json";
- parseTable(projectId, location, inputGcsUri);
- }
-
- public static void parseTable(String projectId, String location, String inputGcsUri)
- throws IOException {
- // Initialize client that will be used to send requests. This client only needs to be created
- // once, and can be reused for multiple requests. After completing all of your requests, call
- // the "close" method on the client to safely clean up any remaining background resources.
- try (DocumentUnderstandingServiceClient client = DocumentUnderstandingServiceClient.create()) {
- // Configure the request for processing the PDF
- String parent = String.format("projects/%s/locations/%s", projectId, location);
-
- TableBoundHint tableBoundHints =
- TableBoundHint.newBuilder()
- .setBoundingBox(
- // Define a polygon around tables to detect
- // Each vertice coordinate must be a number between 0 and 1
- BoundingPoly.newBuilder()
- // top left
- .addNormalizedVertices(NormalizedVertex.newBuilder().setX(0).setX(0).build())
- // top right
- .addNormalizedVertices(NormalizedVertex.newBuilder().setX(1).setX(0).build())
- // bottom right
- .addNormalizedVertices(NormalizedVertex.newBuilder().setX(1).setX(1).build())
- // bottom left
- .addNormalizedVertices(NormalizedVertex.newBuilder().setX(0).setX(1).build())
- .build())
- .setPageNumber(1)
- .build();
-
- TableExtractionParams params =
- TableExtractionParams.newBuilder()
- .setEnabled(true)
- .addTableBoundHints(tableBoundHints)
- .build();
-
- GcsSource uri = GcsSource.newBuilder().setUri(inputGcsUri).build();
-
- // mime_type can be application/pdf, image/tiff,
- // and image/gif, or application/json
- InputConfig config =
- InputConfig.newBuilder().setGcsSource(uri).setMimeType("application/pdf").build();
-
- ProcessDocumentRequest request =
- ProcessDocumentRequest.newBuilder()
- .setParent(parent)
- .setTableExtractionParams(params)
- .setInputConfig(config)
- .build();
-
- // Recognizes text entities in the PDF document
- Document response = client.processDocument(request);
-
- // Get all of the document text as one big string
- String text = response.getText();
-
- // Get the first table in the document
- if (response.getPagesCount() > 0) {
- Document.Page page1 = response.getPages(0);
- if (page1.getTablesCount() > 0) {
- Document.Page.Table table = page1.getTables(0);
-
- System.out.println("Results from first table processed:");
- List detectedLangs = page1.getDetectedLanguagesList();
- String langCode =
- detectedLangs.size() > 0 ? detectedLangs.get(0).getLanguageCode() : "NOT_FOUND";
- System.out.printf("First detected language: : %s", langCode);
-
- Document.Page.Table.TableRow headerRow = table.getHeaderRows(0);
- System.out.println("Header row:");
-
- for (Document.Page.Table.TableCell tableCell : headerRow.getCellsList()) {
- if (tableCell.getLayout().getTextAnchor().getTextSegmentsList() != null) {
- // Extract shards from the text field
- // First shard in document doesn't have startIndex property
- System.out.printf("\t%s", getText(tableCell.getLayout(), text));
- }
- }
- }
- }
- }
- }
-
- // Extract shards from the text field
- private static String getText(Document.Page.Layout layout, String text) {
- Document.TextAnchor textAnchor = layout.getTextAnchor();
- if (textAnchor.getTextSegmentsList().size() > 0) {
- int startIdx = (int) textAnchor.getTextSegments(0).getStartIndex();
- int endIdx = (int) textAnchor.getTextSegments(0).getEndIndex();
- return text.substring(startIdx, endIdx);
- }
- return "[NO TEXT]";
- }
-}
-// [END documentai_parse_table_beta]
diff --git a/samples/snippets/src/main/java/documentai/v1beta2/ParseWithModelBeta.java b/samples/snippets/src/main/java/documentai/v1beta2/ParseWithModelBeta.java
deleted file mode 100644
index b549e487..00000000
--- a/samples/snippets/src/main/java/documentai/v1beta2/ParseWithModelBeta.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright 2020 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package documentai.v1beta2;
-
-// [START documentai_parse_with_model_beta]
-
-import com.google.cloud.documentai.v1beta2.AutoMlParams;
-import com.google.cloud.documentai.v1beta2.Document;
-import com.google.cloud.documentai.v1beta2.DocumentUnderstandingServiceClient;
-import com.google.cloud.documentai.v1beta2.GcsSource;
-import com.google.cloud.documentai.v1beta2.InputConfig;
-import com.google.cloud.documentai.v1beta2.ProcessDocumentRequest;
-import java.io.IOException;
-
-public class ParseWithModelBeta {
-
- public static void parseWithModel() throws IOException {
- // TODO(developer): Replace these variables before running the sample.
- String projectId = "your-project-id";
- String location = "your-project-location"; // Format is "us" or "eu".
- // AutoML model name formatted as:
- // "projects/[PROJECT_ID]/locations/[LOCATION]/models/[MODEL_ID]"
- String autoMlModel = "your-full-resource-model-name";
- String gcsUri = "gs://your-gcs-bucket/path/to/input/file.json";
- parseWithModel(projectId, location, autoMlModel, gcsUri);
- }
-
- public static void parseWithModel(
- String projectId, String location, String autoMlModel, String gcsUri) throws IOException {
- // Initialize client that will be used to send requests. This client only needs to be created
- // once, and can be reused for multiple requests. After completing all of your requests, call
- // the "close" method on the client to safely clean up any remaining background resources.
- try (DocumentUnderstandingServiceClient client = DocumentUnderstandingServiceClient.create()) {
- // Configure the request for processing the PDF
- String parent = String.format("projects/%s/locations/%s", projectId, location);
-
- AutoMlParams params = AutoMlParams.newBuilder().setModel(autoMlModel).build();
-
- GcsSource uri = GcsSource.newBuilder().setUri(gcsUri).build();
-
- // mime_type can be application/pdf, image/tiff,
- // and image/gif, or application/json
- InputConfig config =
- InputConfig.newBuilder().setGcsSource(uri).setMimeType("application/pdf").build();
-
- ProcessDocumentRequest request =
- ProcessDocumentRequest.newBuilder()
- .setParent(parent)
- .setAutomlParams(params)
- .setInputConfig(config)
- .build();
-
- // Recognizes text entities in the PDF document
- Document response = client.processDocument(request);
-
- // Process the output
- for (Document.Label label : response.getLabelsList()) {
- System.out.printf("Label detected: %s\n", label.getName());
- System.out.printf("Confidence: %s\n", label.getConfidence());
- }
- }
- }
-}
-// [END documentai_parse_with_model_beta]
diff --git a/samples/snippets/src/main/java/documentai/v1beta2/QuickStart.java b/samples/snippets/src/main/java/documentai/v1beta2/QuickStart.java
deleted file mode 100644
index a06c05d5..00000000
--- a/samples/snippets/src/main/java/documentai/v1beta2/QuickStart.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright 2020 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package documentai.v1beta2;
-
-// [START documentai_quickstart_beta]
-
-import com.google.cloud.documentai.v1beta2.Document;
-import com.google.cloud.documentai.v1beta2.DocumentUnderstandingServiceClient;
-import com.google.cloud.documentai.v1beta2.GcsSource;
-import com.google.cloud.documentai.v1beta2.InputConfig;
-import com.google.cloud.documentai.v1beta2.ProcessDocumentRequest;
-import java.io.IOException;
-
-public class QuickStart {
-
- public static void quickStart() throws IOException {
- // TODO(developer): Replace these variables before running the sample.
- String projectId = "your-project-id";
- String location = "your-project-location"; // Format is "us" or "eu".
- String inputGcsUri = "gs://your-gcs-bucket/path/to/input/file.json";
- quickStart(projectId, location, inputGcsUri);
- }
-
- public static void quickStart(String projectId, String location, String inputGcsUri)
- throws IOException {
- // Initialize client that will be used to send requests. This client only needs to be created
- // once, and can be reused for multiple requests. After completing all of your requests, call
- // the "close" method on the client to safely clean up any remaining background resources.
- try (DocumentUnderstandingServiceClient client = DocumentUnderstandingServiceClient.create()) {
- // Configure the request for processing a single document
- String parent = String.format("projects/%s/locations/%s", projectId, location);
-
- GcsSource uri = GcsSource.newBuilder().setUri(inputGcsUri).build();
-
- // mime_type can be application/pdf, image/tiff,
- // and image/gif, or application/json
- InputConfig config =
- InputConfig.newBuilder().setGcsSource(uri).setMimeType("application/pdf").build();
-
- ProcessDocumentRequest request =
- ProcessDocumentRequest.newBuilder().setParent(parent).setInputConfig(config).build();
-
- // Recognizes text entities in the PDF document
- Document response = client.processDocument(request);
-
- // Get all of the document text as one big string
- String text = response.getText();
-
- // Process the output
- for (Document.Entity entity : response.getEntitiesList()) {
- System.out.printf("Entity text: %s\n", getText(entity, text));
- System.out.printf("Entity type: %s\n", entity.getType());
- System.out.printf("Entity mention text: %s\n", entity.getMentionText());
- }
- }
- }
-
- private static String getText(Document.Entity entity, String text) {
- int startIdx = (int) entity.getTextAnchor().getTextSegments(0).getStartIndex();
- int endIdx = (int) entity.getTextAnchor().getTextSegments(0).getEndIndex();
- return text.substring(startIdx, endIdx);
- }
-}
-// [END documentai_quickstart_beta]
diff --git a/samples/snippets/src/main/java/documentai/v1beta2/SetEndPointBeta.java b/samples/snippets/src/main/java/documentai/v1beta2/SetEndPointBeta.java
deleted file mode 100644
index e3651084..00000000
--- a/samples/snippets/src/main/java/documentai/v1beta2/SetEndPointBeta.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright 2020 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package documentai.v1beta2;
-
-// [START documentai_set_endpoint_beta]
-
-import com.google.cloud.documentai.v1beta2.Document;
-import com.google.cloud.documentai.v1beta2.DocumentUnderstandingServiceClient;
-import com.google.cloud.documentai.v1beta2.DocumentUnderstandingServiceSettings;
-import com.google.cloud.documentai.v1beta2.GcsSource;
-import com.google.cloud.documentai.v1beta2.InputConfig;
-import com.google.cloud.documentai.v1beta2.ProcessDocumentRequest;
-import java.io.IOException;
-
-public class SetEndPointBeta {
-
- public static void setEndpoint() throws IOException {
- // TODO(developer): Replace these variables before running the sample.
- String projectId = "your-project-id";
- String location = "your-project-location"; // Format is "us" or "eu".
- String inputGcsUri = "gs://your-gcs-bucket/path/to/input/file.json";
- setEndpoint(projectId, location, inputGcsUri);
- }
-
- public static void setEndpoint(String projectId, String location, String inputGcsUri)
- throws IOException {
- DocumentUnderstandingServiceSettings settings =
- DocumentUnderstandingServiceSettings.newBuilder()
- .setEndpoint("eu-documentai.googleapis.com:443")
- .build();
-
- // Initialize client that will be used to send requests. This client only needs to be created
- // once, and can be reused for multiple requests. After completing all of your requests, call
- // the "close" method on the client to safely clean up any remaining background resources.
- try (DocumentUnderstandingServiceClient client =
- DocumentUnderstandingServiceClient.create(settings)) {
- // Configure the request for processing the PDF
- String parent = String.format("projects/%s/locations/%s", projectId, location);
-
- GcsSource uri = GcsSource.newBuilder().setUri(inputGcsUri).build();
-
- // mime_type can be application/pdf, image/tiff,
- // and image/gif, or application/json
- InputConfig config =
- InputConfig.newBuilder().setGcsSource(uri).setMimeType("application/pdf").build();
-
- ProcessDocumentRequest request =
- ProcessDocumentRequest.newBuilder().setParent(parent).setInputConfig(config).build();
-
- // Recognizes text entities in the PDF document
- Document response = client.processDocument(request);
-
- // Get all of the document text as one big string
- String text = response.getText();
-
- // Process the output
- for (Document.Entity entity : response.getEntitiesList()) {
- System.out.printf("Entity text: %s\n", getText(entity, text));
- System.out.printf("Entity type: %s\n", entity.getType());
- System.out.printf("Entity mention text: %s\n", entity.getMentionText());
- }
- }
- }
-
- private static String getText(Document.Entity entity, String text) {
- int startIdx = (int) entity.getTextAnchor().getTextSegments(0).getStartIndex();
- int endIdx = (int) entity.getTextAnchor().getTextSegments(0).getEndIndex();
- return text.substring(startIdx, endIdx);
- }
-}
-// [END documentai_set_endpoint_beta]
diff --git a/samples/snippets/src/test/java/documentai/v1beta2/BatchParseFormBetaTest.java b/samples/snippets/src/test/java/documentai/v1beta2/BatchParseFormBetaTest.java
deleted file mode 100644
index c16720ea..00000000
--- a/samples/snippets/src/test/java/documentai/v1beta2/BatchParseFormBetaTest.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright 2020 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package documentai.v1beta2;
-
-import static com.google.common.truth.Truth.assertThat;
-import static org.junit.Assert.assertNotNull;
-
-import com.google.api.gax.paging.Page;
-import com.google.cloud.storage.Blob;
-import com.google.cloud.storage.Storage;
-import com.google.cloud.storage.StorageOptions;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.PrintStream;
-import java.util.UUID;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.TimeoutException;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public class BatchParseFormBetaTest {
- private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT");
- private static final String INPUT_URI = "gs://cloud-samples-data/documentai/invoice.pdf";
- private static final String OUTPUT_PREFIX = String.format("%s", UUID.randomUUID());
- private static final String OUTPUT_BUCKET_NAME = PROJECT_ID;
-
- private ByteArrayOutputStream bout;
- private PrintStream out;
-
- private static void requireEnvVar(String varName) {
- assertNotNull(
- String.format("Environment variable '%s' must be set to perform these tests.", varName),
- System.getenv(varName));
- }
-
- @Before
- public void checkRequirements() {
- requireEnvVar("GOOGLE_CLOUD_PROJECT");
- requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS");
- }
-
- private static void cleanUpBucket() {
- Storage storage = StorageOptions.getDefaultInstance().getService();
- Page blobs =
- storage.list(
- PROJECT_ID,
- Storage.BlobListOption.currentDirectory(),
- Storage.BlobListOption.prefix(OUTPUT_PREFIX));
-
- deleteDirectory(storage, blobs);
- }
-
- private static void deleteDirectory(Storage storage, Page blobs) {
- for (Blob blob : blobs.iterateAll()) {
- System.out.println(blob.getBlobId());
- if (!blob.delete()) {
- Page subBlobs =
- storage.list(
- PROJECT_ID,
- Storage.BlobListOption.currentDirectory(),
- Storage.BlobListOption.prefix(blob.getName()));
-
- deleteDirectory(storage, subBlobs);
- }
- }
- }
-
- @Before
- public void setUp() {
- bout = new ByteArrayOutputStream();
- out = new PrintStream(bout);
- System.setOut(out);
- }
-
- @Test
- public void testBatchParseForm()
- throws InterruptedException, ExecutionException, TimeoutException, IOException {
- // parse the GCS invoice as a form.
- BatchParseFormBeta.batchParseFormGcs(
- PROJECT_ID, "us", OUTPUT_BUCKET_NAME, OUTPUT_PREFIX, INPUT_URI);
- String got = bout.toString();
-
- assertThat(got).contains("Fetched file");
- }
-
- @After
- public void tearDown() {
- cleanUpBucket();
- System.setOut(null);
- }
-}
diff --git a/samples/snippets/src/test/java/documentai/v1beta2/BatchParseTableBetaTest.java b/samples/snippets/src/test/java/documentai/v1beta2/BatchParseTableBetaTest.java
deleted file mode 100644
index 7de6df5c..00000000
--- a/samples/snippets/src/test/java/documentai/v1beta2/BatchParseTableBetaTest.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright 2020 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package documentai.v1beta2;
-
-import static com.google.common.truth.Truth.assertThat;
-import static org.junit.Assert.assertNotNull;
-
-import com.google.api.gax.paging.Page;
-import com.google.cloud.storage.Blob;
-import com.google.cloud.storage.Storage;
-import com.google.cloud.storage.StorageOptions;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.PrintStream;
-import java.util.UUID;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.TimeoutException;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public class BatchParseTableBetaTest {
- private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT");
- private static final String INPUT_URI = "gs://cloud-samples-data/documentai/invoice.pdf";
- private static final String OUTPUT_PREFIX = String.format("%s", UUID.randomUUID());
- private static final String OUTPUT_BUCKET_NAME = PROJECT_ID;
-
- private ByteArrayOutputStream bout;
- private PrintStream out;
-
- private static void requireEnvVar(String varName) {
- assertNotNull(
- String.format("Environment variable '%s' must be set to perform these tests.", varName),
- System.getenv(varName));
- }
-
- @Before
- public void checkRequirements() {
- requireEnvVar("GOOGLE_CLOUD_PROJECT");
- requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS");
- }
-
- private static void cleanUpBucket() {
- Storage storage = StorageOptions.getDefaultInstance().getService();
- Page blobs =
- storage.list(
- PROJECT_ID,
- Storage.BlobListOption.currentDirectory(),
- Storage.BlobListOption.prefix(OUTPUT_PREFIX));
-
- deleteDirectory(storage, blobs);
- }
-
- private static void deleteDirectory(Storage storage, Page blobs) {
- for (Blob blob : blobs.iterateAll()) {
- System.out.println(blob.getBlobId());
- if (!blob.delete()) {
- Page subBlobs =
- storage.list(
- PROJECT_ID,
- Storage.BlobListOption.currentDirectory(),
- Storage.BlobListOption.prefix(blob.getName()));
-
- deleteDirectory(storage, subBlobs);
- }
- }
- }
-
- @Before
- public void setUp() {
- bout = new ByteArrayOutputStream();
- out = new PrintStream(bout);
- System.setOut(out);
- }
-
- @Test
- // https://github.com/googleapis/java-document-ai/issues/207
- public void testBatchParseTable()
- throws InterruptedException, ExecutionException, TimeoutException, IOException {
- // parse the GCS invoice as a table.
- BatchParseTableBeta.batchParseTableGcs(
- PROJECT_ID, "us", OUTPUT_BUCKET_NAME, OUTPUT_PREFIX, INPUT_URI);
- String got = bout.toString();
-
- assertThat(got).contains("Fetched file");
- assertThat(got).contains("Results from first table processed:");
- assertThat(got).contains("Header row");
- }
-
- @After
- public void tearDown() {
- cleanUpBucket();
- System.setOut(null);
- }
-}
diff --git a/samples/snippets/src/test/java/documentai/v1beta2/ParseFormBetaTest.java b/samples/snippets/src/test/java/documentai/v1beta2/ParseFormBetaTest.java
deleted file mode 100644
index 4418e42d..00000000
--- a/samples/snippets/src/test/java/documentai/v1beta2/ParseFormBetaTest.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright 2020 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package documentai.v1beta2;
-
-import static com.google.common.truth.Truth.assertThat;
-import static org.junit.Assert.assertNotNull;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.PrintStream;
-import java.util.concurrent.ExecutionException;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public class ParseFormBetaTest {
- private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT");
- private static final String INPUT_URI = "gs://cloud-samples-data/documentai/invoice.pdf";
-
- private ByteArrayOutputStream bout;
- private PrintStream out;
-
- private static void requireEnvVar(String varName) {
- assertNotNull(
- String.format("Environment variable '%s' must be set to perform these tests.", varName),
- System.getenv(varName));
- }
-
- @Before
- public void checkRequirements() {
- requireEnvVar("GOOGLE_CLOUD_PROJECT");
- requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS");
- }
-
- @Before
- public void setUp() {
- bout = new ByteArrayOutputStream();
- out = new PrintStream(bout);
- System.setOut(out);
- }
-
- @Test
- public void testParseForm() throws InterruptedException, ExecutionException, IOException {
- // parse the GCS invoice as a form.
- ParseFormBeta.parseForm(PROJECT_ID, "us", INPUT_URI);
- String got = bout.toString();
-
- assertThat(got).contains("Extracted form fields pair:");
- }
-
- @After
- public void tearDown() {
- System.setOut(null);
- }
-}
diff --git a/samples/snippets/src/test/java/documentai/v1beta2/ParseTableBetaTest.java b/samples/snippets/src/test/java/documentai/v1beta2/ParseTableBetaTest.java
deleted file mode 100644
index fb691956..00000000
--- a/samples/snippets/src/test/java/documentai/v1beta2/ParseTableBetaTest.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright 2020 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package documentai.v1beta2;
-
-import static com.google.common.truth.Truth.assertThat;
-import static org.junit.Assert.assertNotNull;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.PrintStream;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public class ParseTableBetaTest {
- private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT");
- private static final String INPUT_URI = "gs://cloud-samples-data/documentai/invoice.pdf";
-
- private ByteArrayOutputStream bout;
- private PrintStream out;
-
- private static void requireEnvVar(String varName) {
- assertNotNull(
- String.format("Environment variable '%s' must be set to perform these tests.", varName),
- System.getenv(varName));
- }
-
- @Before
- public void checkRequirements() {
- requireEnvVar("GOOGLE_CLOUD_PROJECT");
- requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS");
- }
-
- @Before
- public void setUp() {
- bout = new ByteArrayOutputStream();
- out = new PrintStream(bout);
- System.setOut(out);
- }
-
- @Test
- public void testParseTable() throws IOException {
- // parse the GCS invoice as a table.
- ParseTableBeta.parseTable(PROJECT_ID, "us", INPUT_URI);
- String got = bout.toString();
-
- assertThat(got).contains("First detected language");
- }
-
- @After
- public void tearDown() {
- System.setOut(null);
- }
-}
diff --git a/samples/snippets/src/test/java/documentai/v1beta2/ParseWithModelBetaTest.java b/samples/snippets/src/test/java/documentai/v1beta2/ParseWithModelBetaTest.java
deleted file mode 100644
index ae3f7013..00000000
--- a/samples/snippets/src/test/java/documentai/v1beta2/ParseWithModelBetaTest.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright 2020 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package documentai.v1beta2;
-
-import static com.google.common.truth.Truth.assertThat;
-import static org.junit.Assert.assertNotNull;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.PrintStream;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public class ParseWithModelBetaTest {
- private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT");
- private static final String AUTOML_PROJECT_ID = "java-docs-samples-testing";
- private static final String INPUT_URI = "gs://cloud-samples-data/documentai/invoice.pdf";
- private static final String AUTO_ML_MODEL_ID = "TCN6871084728972835631";
- private ByteArrayOutputStream bout;
- private PrintStream out;
-
- private static void requireEnvVar(String varName) {
- assertNotNull(
- String.format("Environment variable '%s' must be set to perform these tests.", varName),
- System.getenv(varName));
- }
-
- @Before
- public void checkRequirements() {
- requireEnvVar("GOOGLE_CLOUD_PROJECT");
- requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS");
- }
-
- @Before
- public void setUp() {
- bout = new ByteArrayOutputStream();
- out = new PrintStream(bout);
- System.setOut(out);
- }
-
- @Test
- public void testParseWithModel() throws IOException {
- // parse a PDF using AutoML model.
- String model =
- String.format(
- "projects/%s/locations/us-central1/models/%s", AUTOML_PROJECT_ID, AUTO_ML_MODEL_ID);
- ParseWithModelBeta.parseWithModel(PROJECT_ID, "us", model, INPUT_URI);
- String got = bout.toString();
-
- assertThat(got).contains("Label");
- }
-
- @After
- public void tearDown() {
- System.setOut(null);
- }
-}
diff --git a/samples/snippets/src/test/java/documentai/v1beta2/QuickStartTest.java b/samples/snippets/src/test/java/documentai/v1beta2/QuickStartTest.java
deleted file mode 100644
index 597a3a8b..00000000
--- a/samples/snippets/src/test/java/documentai/v1beta2/QuickStartTest.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright 2020 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package documentai.v1beta2;
-
-import static com.google.common.truth.Truth.assertThat;
-import static org.junit.Assert.assertNotNull;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.PrintStream;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public class QuickStartTest {
- private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT");
- private static final String INPUT_URI = "gs://cloud-samples-data/documentai/invoice.pdf";
-
- private ByteArrayOutputStream bout;
- private PrintStream out;
-
- private static void requireEnvVar(String varName) {
- assertNotNull(
- String.format("Environment variable '%s' must be set to perform these tests.", varName),
- System.getenv(varName));
- }
-
- @Before
- public void checkRequirements() {
- requireEnvVar("GOOGLE_CLOUD_PROJECT");
- requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS");
- }
-
- @Before
- public void setUp() {
- bout = new ByteArrayOutputStream();
- out = new PrintStream(bout);
- System.setOut(out);
- }
-
- @Test
- public void testQuickStart() throws IOException {
- // parse a PDF document.
- QuickStart.quickStart(PROJECT_ID, "us", INPUT_URI);
- String got = bout.toString();
-
- assertThat(got).contains("Entity");
- }
-
- @After
- public void tearDown() {
- System.setOut(null);
- }
-}
diff --git a/samples/snippets/src/test/java/documentai/v1beta2/SetEndpointTest.java b/samples/snippets/src/test/java/documentai/v1beta2/SetEndpointTest.java
deleted file mode 100644
index f3d64dfc..00000000
--- a/samples/snippets/src/test/java/documentai/v1beta2/SetEndpointTest.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright 2020 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package documentai.v1beta2;
-
-import static com.google.common.truth.Truth.assertThat;
-import static org.junit.Assert.assertNotNull;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.PrintStream;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public class SetEndpointTest {
- private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT");
- private static final String INPUT_URI = "gs://cloud-samples-data/documentai/invoice.pdf";
-
- private ByteArrayOutputStream bout;
- private PrintStream out;
-
- private static void requireEnvVar(String varName) {
- assertNotNull(
- String.format("Environment variable '%s' must be set to perform these tests.", varName),
- System.getenv(varName));
- }
-
- @Before
- public void checkRequirements() {
- requireEnvVar("GOOGLE_CLOUD_PROJECT");
- requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS");
- }
-
- @Before
- public void setUp() {
- bout = new ByteArrayOutputStream();
- out = new PrintStream(bout);
- System.setOut(out);
- }
-
- @Test
- public void testSetEndPoint() throws IOException {
- // process a pdf in different region.
- SetEndPointBeta.setEndpoint(PROJECT_ID, "eu", INPUT_URI);
- String got = bout.toString();
-
- assertThat(got).contains("Entity");
- }
-
- @After
- public void tearDown() {
- System.setOut(null);
- }
-}
diff --git a/versions.txt b/versions.txt
index b28358a1..d32d6438 100644
--- a/versions.txt
+++ b/versions.txt
@@ -1,12 +1,12 @@
# Format:
# module:released-version:current-version
-google-cloud-document-ai:2.4.3:2.4.3
-grpc-google-cloud-document-ai-v1beta1:0.16.3:0.16.3
-grpc-google-cloud-document-ai-v1beta2:0.16.3:0.16.3
-grpc-google-cloud-document-ai-v1beta3:0.16.3:0.16.3
-grpc-google-cloud-document-ai-v1:2.4.3:2.4.3
-proto-google-cloud-document-ai-v1beta1:0.16.3:0.16.3
-proto-google-cloud-document-ai-v1beta2:0.16.3:0.16.3
-proto-google-cloud-document-ai-v1beta3:0.16.3:0.16.3
-proto-google-cloud-document-ai-v1:2.4.3:2.4.3
+google-cloud-document-ai:2.5.0:2.5.0
+grpc-google-cloud-document-ai-v1beta1:0.17.0:0.17.0
+grpc-google-cloud-document-ai-v1beta2:0.17.0:0.17.0
+grpc-google-cloud-document-ai-v1beta3:0.17.0:0.17.0
+grpc-google-cloud-document-ai-v1:2.5.0:2.5.0
+proto-google-cloud-document-ai-v1beta1:0.17.0:0.17.0
+proto-google-cloud-document-ai-v1beta2:0.17.0:0.17.0
+proto-google-cloud-document-ai-v1beta3:0.17.0:0.17.0
+proto-google-cloud-document-ai-v1:2.5.0:2.5.0